jonoropeza.com

Making software and software development teams. Mostly the people parts.


Letting o1 Cook

An experiment: Could OpenAI's o1 model recreate the 80s Nintendo classic Duck Hunt using JavaScript, CSS and an HTML canvas element, my prompts, and no other help from me (I'm not allowed to edit the code).

As you can see above, while missing quite a few features and animations, o1 and I were able to get to working code that runs the core of the game in about 30 minutes of wall time, not including the additional 30 minutes I used to capture the deltas as git commits and make notes.

Not bad for an hour's work. I estimate it would have taken me 4 hours working without o1, with most of that time being spent understanding the canvas api which is not an area of experience for me.

What you see above represents five prompts, with a correction made after the last prompts. You can see the code that o1 produced along with my prompts here.

When I tried to give it a sixth prompt, o1 started making a series of mistakes that I can only attribute to reaching its limit of the complexity it can juggle.

The mistakes started innocently enough: ~200 lines of code hand waved away with a comment "the rest of the code omitted for brevity".

From that point on, however, I wasn't able to get o1 to reconcile its mistakes and get the game back to where it was. Trying to add another feature, starting with introducing a reloading sequence, broke several other features.

Rather than take over on the coding, I let it stand: forever in o1's version of Duck Hunt, you will be able to machine gun ducks into submission.

Other thoughts:

o1 is likely currently better suited to writing classes or functions with defined inputs and outputs than the entire program. This is how I use Cursor these days, coding specs and letting it fill in an initial implementation.

One obvious exception to that is APIs you don't know. Here it might be best, if like me you learn best through experimenting with a real world example, to let a model write a program that fully exercises the API, providing you with a working example that you can tinker with.

While the game works, several of the architectural decisions make me question extensibility and maintainability. Specifically, placing the checkCollisions() function and all its logic in the Game class seems likely to cause Game to fall into the God Class anti-pattern https://en.wikipedia.org/wiki/God_object as more and more physical interactions are added to the system.

I fired up Cursor after the session and asked Claude Sonnet 3.5 to criticize the code with regard to maintainability and extensibility. Here are the highlights:

Class Dependencies

  • Tight coupling between classes

Collision Detection

  • Collision logic is tightly coupled with game logic
  • No separate physics system
  • Hard to extend for different types of collisions

Code Organization

  • Mixed concerns (game logic, rendering, input handling)

There were other critiques but most of them were either things I didn't ask o1 to consider, like error handling, or relatively easy things to fix later like magic numbers & string constants.

Even with AI doing all the coding, it's still a tool that will likely increase the surface area an individual engineer can work on without eliminating the need for software engineering.

My contrarian guess is that AI coding tools will make more work for software engineers; In an instantiation of Jevons paradox, more low quality code will be written because AI tools lower the barrier to entry for a lot of code to be created by people who don't know how to recognize high quality code.

It seems possible that with enough competent models, day to day software engineering looks like defining an interface and requirements, then asking 3-10 different models for their implementations that you look over, weigh against each other, and choose the best. Because a lazy developer is a good developer, most will opt to be on the low end of that range, and a way of standing out from your peers will be rigorously testing using more models.

Last thought: That was fun, can't wait to try the same thing using o3.

posted in Artificial Intelligence


The Best Things I Read In 2024

13 books, articles, newsletters, poems and posts that changed the way I think and/or look at the world this year.

One thing to callout from the start: I don't necessarily agree with all or even any of the content of each post - these are the best things I read this year, and one criteria for best for me might be a thing that catalyzes a position in the polar opposite direction - nor do I endorse any of the authors.

Enough preface. Here we go...

(mis)Translating the Buddha by Romeo Stevens

Probably the best thing I read all year, the idea that the key principles I'd learned about Buddhism and meditation might be wrong because lost in translation was shocking, awakening and ultimately something I spent the better part of the year pondering.

Tanha isn't desire, and therefore desire isn't the enemy, it's actually fixing the attention on something you don't have or even that you have and are afraid of losing.

Woah.

And it goes on: What if Dukkha - all life is suffering - means worthlessness or something closer to nihilism.

You've encountered this for yourself if you've experienced something cool during contemplative practice but then had a kind of 'so-what?' moment. The sense that this experience, while interesting and probably a temporary respite from your worries, hasn't actually addressed the core problem.

Anicca becomes something much more acute if translated as the inability to sustain things as they are moment to moment.

Anatta might be the biggest rewrite: Rather than dissolution of self, it's more like giving up control.

How to do the jhanas by Nadia Asparouhova

I got here while exploring the concepts in the Mistranslating The Buddha post, and this kinda blew my mind a bit too. I haven't taken a class yet or done a retreat, and I haven't gotten much further than J1 using the technique of looping joy. What I found at that first step though, it seems really promising, almost ridiculously so. Planning to get into this more next year.

Outlaw Country by Emma Marris

I've been thinking of buying rural land somewhere and building a cabin. Not a novel idea by any means, and like many decisions it's a gateway to both hard work and complexity. I don't fear the former but I don't underestimate the latter: owning a second piece of property simply makes your life more complex in several dimensions.

Besides being a sad tale that makes you think about human character, intervention, and what could be done, this is a good piece describing to a city boy what kinda vibe there is in some of the rural Oregon places I drive through.

What Makes Housing So Expensive? by Brian Potter

I'm back to working in construction tech, and my wife and I are looking around for our first house, so this is really topical for me. One thing that comes to mind each time I read this is how little is changing in home construction. Taking the pie chart as your mental model, you would assume Framing is a problem that is and will be ever present in building houses. Well, maybe? Or maybe not.

I'd like to work on that problem some day, but I have to admit I don't know how to even begin. Software has been my specialty, and I can design and reason about the most complex systems. However, when it comes to innovating in the atoms space, I often feel ineffectual and just plain dumb.

Machines Of Loving Grace by Dario Amodei

Dario Amodei is the CEO of Anthropic, a public benefit corporation "dedicated to building AI systems that are steerable, interpretable and safe". This is the post that Construction Tech needs: realistic, optimistic, representing at least one step change, and touching on all surfaces.

Also worth reading this followup.

The Pendulum Swings: How To Respond To Tech's Downturn by Stay Saasy

This was written in 2023 but I found it really helpful in 2024 as I managed through hopefully the bottom of a downsize.

Centennial by James A. Michener

Every year I take a big trip. Last year it was London + Spain + Portugal. This year it was Montana and Colorado: Drive from Portland to Bozeman, three nights in Bozeman, then down to Denver to spend a week working from an Airbnb.

One amazing thing about Michener is how accurate his research was. While reading, you'll come across an idea or fact, look it up, and find he got it exactly right—despite working in the 70s and 80s, long before tools like Google, Wikipedia, or ChatGPT. Talk about dedication, and an inspiration to setting your work apart by doing the hard work that nobody else is doing.

Probably the most interesting idea I came across in Centennial is grazing rights, and the animosity cattle ranchers felt towards sheep herders when the latter arrived on the scene in the late 1800s. We eat a lot of Willamette Valley lamb, and I've found that when I talk about this, some people find it shocking. "You eat lamb?" they'll exclaim, with veiled disgust that reminds me of the cattle ranching community's response to suggestions of eating lamb in the book. A reminder that tendrils of sentiment remain in the culture long after the original source has dissipated.

Five medical breakthroughs in 2024 by Saloni Dattani

Being reasonably healthy and still relatively young, I tend to pay more attention to the preventative or maybe more accurate thrive side of the health equation, but medical breakthroughs are interesting to me as well.

Why Everything is Becoming a Game by Gurwinder Bhogal

Changemaking begins with awareness and making stakeholders aware of a problem, at least according to most frameworks I've seen. Seen from that perspective, a lot of the inputs on default social media are someone else's change making program being executed.

...consider the long-term outcomes of the games you’re playing: if you did the same thing you did today for the next 10 years, where would you be? Play games the 90-year-old you would be proud of having played.

The Year of McDonald’s by Chris Arnade

A lot of these are on here because I learned something new. This one is where I gloat and say that this is a thing I know and that I'm shocked so few people know. The first time I had a sense Trump might win - I don't do politics, but I'll say that Trump winning doesn't bring me any joy - was how the professional media and the voices online responded to his photo op "working" in a McDonalds. They might as well be making fun of seniors depositing social security checks. Tone deaf elitism to the max. And over the years, whichever party is most tone deaf - Republicans in 1992, Democrats in 2000, Republicans in 2008, and Democrats twice now in 2016 and 2024 stick out to me - is usually, from what I've noticed, the party that loses.

If you like this, read this too.

Entropy: The Hidden Force Making Life Complicated by Shane Parish

All of Shane's mental model posts are good. This just happened to be one I kept coming back to, probably due to being in my 40s and thinking about aging and why we age as a fundamental part of living. This is a good model to consider aging from, and then anti-aging is convincing your body to maintain structure. Also, all-day links and tangents throughout this post.

Founding fathers on today's America by o1-pro as prompted by Andrej Karpathy

AI writes. Writes well. Monotone sentences and paragraphs, but that will change. This is good piece on its own, but mostly it's here because it has me thinking of the possibilities both good and bad of being able to 10x or even 100x the scale of written words a single person can produce.

Who Was Bitcoin’s Satoshi? I Need to Know and So Do You by Tyler Cowen (Paywall)

A beautiful thought exercise on something that seems a trifle but grows in magnitude as you read this. Bitcoin is less than an order of magnitude move to the upside from the world's richest person being completely anonymous and completely unknown. If that isn't Cyberpunk as fuck, I don't know what is. 

posted in Reading List


Baking and Complexity

I love to cook. Next to making software, it's probably the thing I enjoy doing the most. I don't, on the other hand, really bake. I dabble at it, throwing together a clafoutis or quick upside-down cake every now and then, but I balk at anything serious.

A few weeks ago I found a recipe for bread that I'm hooked on:


I make a half recipe of the dough last minute before going to bed. Then I wake up at dawn and bake off a couple loaves. The recipe works for me for a couple reasons:

  • Exactitude isn't a requirement: While I use a scale to measure out my flour + salt + yeast, it seems more forgiving than most bread recipes. A few dozen grams this way or that yields good results.
  • The variables are arranged such that a mix suffices. No kneading. Kneading is work, but it's also complexity. How much do you knead? What's the goal of kneading and how do you know when you have or haven't achieved the goal? What's an over-knead look like, and how do you prevent it? Etc.
  • Liquid content is high enough that the mixing takes 30 seconds max. No stand mixer required. Which minimizes clean-up.

Baking, like software development, requires more precision than it appears from the outside. Need for precision causes complexity: rather than eyeballing ingredients like I might when working on a stew or braise, I have to keep & maintain a scale to weigh out my flour.

Complex environments attract people who are capable of working in complex environments. Both through necessity and desire - complexity is challenging and challenging is fun. Chess is more popular than checkers.

People who like complexity will tend to amplify complexity through intrinsic and extrinsic motivations.

posted in Software Development


Spring Cleaning

Spring is in full bloom in Portland, every tree is pushing buds and leaves, a row of perfect tulips can send my mind into a miniature mania, and it's a fine time to tidy things up.

  • I added a page for all posts that have descriptions.
  • I've (finally!) started importing my old posts (pre-2019) into this new blog engine.
  • Cleaned up a bunch of stale and dead links.
  • Added two frameworks to one of the posts that I refer to the most, my Dimensions of Engineering Management Focus
  • Playing with ways of using the ChatGPT API to automate tasks such as editing, writing descriptions and suggesting links.
  • Wrote drafts of posts to wind up my time at AllStripes and thoughts on the healthcare industry (finally!) and a new post talking about what I'm working on now (finally!).

Happy Spring!

posted in Personal


The Best Things I Read In 2023

Anyway, after all that, I played with two big ideas in 2023: Complacency + me, and the question of how to use my time more effectively. And most of my favorite readings this year either inspired or referenced those ideas. And chess acted as the classroom for several lessons. Oh and Charlie Munger died, so I had to come back there. And poetry.

Of note is that listing a post here does NOT mean I agree with or endorse all of the content in the post. 

Also, there are plenty of rereads and older stuff on here.

Notes on Puzzles by Nabeel S. Qureshi

My favorite thing I read this year, and the piece I spent the most time thinking about and making connections to (see below). 

Like anything we spend serious time with, we make it personal with our own threads, and then we forget which bits of context originated from the piece itself and which were added by us. Sort of a personal Mandela Effect - which for some reason had a moment this year - and maybe an insight into how we think and know things. So I had to read this once again to get down what I got out of it that's actually in it:

The difference between a decent chess player and a great chess player is that while both players can avoid blunders and identify good moves, the great chess player isn't satisfied finding one good move. Great players' processes are to find another half-dozen to a dozen moves in a given position, and then to select the best one. That pushing on once you've found a good enough move is hard, really hard, it goes against conservation of energy principles, and it makes the difference between good work and great work.

Or as World Chess Champion Emanuel Lasker once said,“When you see a good move, look for a better one”.

That idea, generalized and applied to any aspect of life that requires skill to succeed at, and the personal insights that generated, was what kept me coming back to this piece again and again in 2023 to reread and rethink.

Thinking, Fast and Slow by Daniel Kahneman

Thinking about Notes On Puzzles led to me to reread Kahneman's now classic book. Which I realized on this pass was about, amongst other things, the kind of default mode complacency that you see if you observe yourself playing chess and settling on the first good move you find rather than pushing on and looking for more good moves. One of which might just be a great move. And then finally how knowing when to run that full, expensive process versus just going with the your best thought right now is the trick and maybe THE trick.

How to Become a 1000 Year Old Vampire (posted anonymously)

I came back to this now decade+ old piece this year because of this: "Another big angle on this idea is that every hour is an opportunity, and you want to make the best of them. This seems totally obvious but I definitely "get it" a lot more having thought about it in terms of becoming a 1000 year old vampire." - well, I didn't grok that the first half dozen times I read this, but this year something clicked and I decided to do something I've resisted for decades now: I'm dividing the power hours of every day except Sunday into twenty two half-hour blocks, and being intentional about what I'm doing in those half hours.

On Trucking by Richard Kong

I've been fascinated by long-haul trucking since I was kiddo riding in the backseat of my parents Ford Pinto, spending long trips trying to get truckers to blow their horn using the universal signal. My dad would get so mad when one of them would comply - inevitably as the truck was passing us (trucks used to drive faster than many passenger cars, at least Ford Pintos) - which would cause him to leap out of the drivers seat in surprise, left hand gripping the wheel, right hand already reaching back to give me a gentle but firm whack. 

This piece is a great tour of how the trucking industry works. It inspired me to draft up a similar piece on what I'd learned about the health industry(ies), a project I unfortunately I got sidetracked on, but fortunately someone wrote a much better piece on the same subject anyway (see below).

The Most Precious Resource is Agency by Simon Sarris

As I wrote above, Notes On Puzzles caused me to realize that complacency and being satisfied with the first correct-ish answer I come up with is a weakness. And then I came back to this gem from a couple years ago after wondering, where did this come from, and realizing how with a public school education I was able to get by on horsepower rather than having to work. IOW instead of cultivating beneficial habits, I throttled up the engines for a moment when called on with a problem, and then went back to daydreaming. This piece piles on with "It seems that the more you ask of [young] people, and the more you have them do, the more they are able to later do on their own" which totally resonates.

Lex Friedman interviews Jeff Bezos

For some reason I've listened to and read a fair amount from or about Elon, Zuck, Jobs, Tim Cook, but other than his letters to shareholders I've never read anything about or from Bezos before. I have to admit that everything I thought I knew about him comes from Steve Yegge's infamous (and fantastic) Platforms Rant which if you've never read and you're in tech, you totally should.

The bits about Amazon are interesting, but I really appreciated the focus on Blue Origin and what his vision is there and why. A second space race is heating up, and that's super exciting.

Bolero by Gerald Stern

I started reading Stern's poems just after mom died last year. And then the poet himself died. And I've been reading his work all year, but Bolero is the poem I keep coming back to the most.

The pharma industry from Paul Janssen to today: why drugs got harder to develop and what we can do about it by

Late entry but this is gold if you want to understand how pharma works. As I mentioned above, I started to write a piece like this as my time at AllStripes came to an end up February but I got distracted. This is much better.

The Revised Psychology of Human Misjudgment, by Charlie Munger via Shane Parish

Charlie Munger and Jimmy Carter each got their 99 years. This is such a classic. "The brain of man conserves programming space by being reluctant to change, which is a form of inconsistency avoidance" is mostly closely related to my general theme of complacency. There's gold all over this piece though, and it pays dividends if read slowly and consistently for years.

Jim Harrison's 13 Rules For Drinking

This is on the list every year, and hopefully will be into the future, because it means I'm still in the fight. Harrison intended it to be about drinking, but really it's wisdom in how to manage any and all of the pleasures that threatens to overmaster us and steal our life. Drinking, overeating, video games, TV, Tik Tok, etc:

"The ability to check yourself moment by moment has been discussed at length by wise folks from the old Ch’an master of China all the way down to Ouspensky. This assumes a willingness to be conscious... we don’t have much freedom in this life, and it is self-cruelty to surrender a piece of what we have because we can’t control our craving."
posted in Reading List


Tasting 2022 In Oregon

If 2021 was the year of the late June Heat Dome, 2022 stands out for a mid-April cold snap that hit vines right at or immediately after bud break. Just like 2021, one of the most interesting questions has been what effects this outlier event would have on the wines.

My impression so far is that the elements that made up 2022 - whatever percentage of it was that cold snap - have created an uneven and bifurcated vintage that reminds me of 2013, where there's a set of wines that seem "normal" and unaffected, and a set of wines that just seem less than they should be, and it's hard to predict which camp a wine will be in until you spend time with it

Because of this, as much as it pains me as a fan of the home team, and as much as it hurts to say this on the back of the disastrous 2020 vintage, I'm passing on most 2022 offers and planning to buy the least of any vintage since 2013.

A lot of people might disagree. I just find the wines too uneven, a bit meh, or both.

I'll get a good laugh if I'm proven wrong on this, by the way. 2011 really caught me out and I ended up scrambling to buy back vintages because I didn't understand what cold vintage wines were like on release. Maybe this will be a repeat. That would delight me. After all, we primarily learn from being wrong.

For now though - and maybe this is a guy with an overloaded cellar talking - I'm saving my money and the cellar space to overweight on 2023 which, based on a few Willamette Valley bottlings I've tasted so far, I have a feeling is going to be killer.

posted in Wine


Tasting 2021 In Oregon

The pinot lover who lives in or around Portland gets to experience a summer twice. One while it happens. And again two and a half years later, when the best single vineyard wines have been released.

We're two and a half years out from 2021, so now we're tasting this extraordinary summer. What was extraordinary about it? In late June I flew to California to meet my boss who I'd been working remote for. Spent a nice weekend hiking and eating in the Bay Area. Then I came home to the inferno. Walking upstairs with my bags, the thermometer in the shade showed 115. 115! And not much cooler in the apartment: Like a lot of folks, this was the year that decided it for us on replacing window units with HVAC.

What would a heat have in late June / early July do to the grapes?

A heat wave in late June, over a month before veraison, hits developing berries that are tiny and green. The vines respond in a number of ways - I won't pretend to understand the biochemical specifics, some combination of smaller fruit and thicker skins - the sum of which result in more tannin in the wines.

Talking to winemakers, this lines up with what they've told me: The heat hit so early that what it did was shut down grape berry growth, resulting in a year with a lot of small fruit which actually provide this concentrated flavor and dark color.

My favorite wines & usual suspects from the big, expressive, intense 2021 vintage:

  • 2021 Thomas - Always intense, the 2021 has tertiary notes already and should be really interesting
  • 2021 Cameron Clos Electique - Really shows the elements of the year
  • 2021 Cameron Abbey Ridge - Always a treat comparing the two Cameron single vineyards - this is more accessible now, I suspect the CE will become the more complex and interesting wine by ~2028
  • 2021 J.K. Carriere Vespidae - Always interesting, this year's reminded me of the Clos Electrique in the sense of a part of parts that I'm guessing will come together nicely in 5-7 years. I'm a big fan of Jim's wines most years but especially the burlier vintages like 2018 and this one.
  • 2021 Evesham Wood Temperance Hill - Stopped by a few weeks ago to taste their 2021s, this was my favorite. I find Eola-Amity and especially Temperance Hill Vineyard wines especially interesting in these vibrant vintages and this didn't disappoint. Pure red savory intensity.
  • 2021 Goodfellow Willamette Valley - The 2021 is especially good if you like low-noted, sinewy, Nuits-Saint-George style pinot with savory notes and nice acidity on the finish. Ridiculous value at around $20.

I'm overweight 2021 relative to the last few years, buying more than any vintage since 2018 to both drink now and enjoy for the long run. 

posted in Wine