Skip to content

Jun 03 2023

latitude and longitude logic, the hardest part of programming is naming, spoiler for a chatgpt plugin im working on, lazy plot devices

Bram Adams
Bram Adams
2 min read
Jun 03 2023

Table of Contents


Built by AI! (tbh I didn't even bother to check if the feet and meter formulas were correct lol)

def convert_lat_lon_into_cardinal_direction(lat, lon, wiki_page_lat, wiki_page_lon):
    if lat > wiki_page_lat:
        lat_direction = "north"
    elif lat < wiki_page_lat:
        lat_direction = "south"
        lat_direction = ""
    if lon > wiki_page_lon:
        lon_direction = "east"
    elif lon < wiki_page_lon:
        lon_direction = "west"
        lon_direction = ""

    feet = round(364000 * ((lat - wiki_page_lat)**2 + (lon - wiki_page_lon)**2)**0.5)
    meters = round(feet * 0.3048)
    return {
        "lat_direction": lat_direction,
        "lon_direction": lon_direction,
        "feet": feet,
        "meters": meters

The struggle of naming a method that calls other methods. main? logic? process?

async def process(lat, lon):
    geo_loc = await geosearch(lat, lon)
    random_geo_loc = choose_random_geo_loc(geo_loc)
    title = random_geo_loc['title']
    summary = get_page_summary(title)

    cardinals = convert_lat_lon_into_cardinal_direction(lat, lon, random_geo_loc['lat'], random_geo_loc['lon'])
    return {
        "title": title,
        "summary": summary,
        "cardinals": cardinals,
        "geo_loc": random_geo_loc



Roald Dahl’s poem “Television” says it all: “So please, oh please, we beg, we pray / go throw your TV set away / and in its place, you can install / a lovely bookshelf on the wall.” (View Highlight)
April 25 2023
Books vs Coachella. Spaces vs Tabs. The battle rages on around the fallen soldiers.


In 2015, archaeologists reported that they'd found 3,000-year-old honey while excavating tombs in Egypt, and it was perfectly edible.


"I can explain" then some external interruption is such a lazy plot device, it's like why do you need to prevent characters from learning information due to hand of god events, its so lame (from watching XO Kitty)

alexa tts kindle is actually pretty great. reading while listening is a pretty powerful reading experience


A cool thing I made is coming.
slow down spoiler 1.png
slow down spoiler 2.png is a reader-supported published Zettelkasten. Both free and paid subscriptions are available. If you want to support my work, the best way is by taking out a paid subscription.


Bram Adams

writer, programmer


Related Posts

Members Public

September 23 2022

stop delivering, if you want to make money, anyway

September 23 2022
Members Public

September 22 2023

the lies we tell ourselves about ourselves

September 22 2023
Members Public

September 21 2023

i declare war!

September 21 2023