Skip to content

quotes

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

Code

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"
    else:
        lat_direction = ""
        
    if lon > wiki_page_lon:
        lon_direction = "east"
    elif lon < wiki_page_lon:
        lon_direction = "west"
    else:
        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
    }

Videos

Quotes

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.

(pog)

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

Thoughts

"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

Images

A cool thing I made is coming.

https://bram-adams.ghost.io/content/images/2023/06/slow-down-spoiler-1.png
slow down spoiler 1.png
https://bram-adams.ghost.io/content/images/2023/06/slow-down-spoiler-2.png
slow down spoiler 2.png

bramadams.dev 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.