Live data from Hacker News

The Grug Brained Developer (2022)

grugbrain.dev

111–120 of 603 posts

Re: The Grug Brained Developer (2022)

#111
post #72
post #50

Earlier quoted context omitted.

In my experience, LLM agents are pretty Grug-brained.

They might be grug brained but they act big brained. Very clubable.

That's one of their great charms, because you don't have to feel bad when you club them.

Re: The Grug Brained Developer (2022)

#114

> given choice between complexity or one on one against t-rex, grug take t-rex: at least grug see t-rex I think about this line at least once a week

"...even as he fell, Leyster realized that he was still carrying the shovel. In his confusion, he’d forgotten to drop the thing. So, desperately, he swung it around with all his strength at the juvenile’s legs.

Tyrannosaurs were built for speed. Their leg bones were hollow, like a bird’s. If he could break a femur …

The shovel connected, but not solidly. It hit without breaking anything. But, still, it got tangled up in those powerful legs. With enormous force, it was wrenched out of his hands. Leyster was sent tumbling on the ground.

Somebody was screaming. Dazed, Leyster raised himself up on his arms to see Patrick, hysterically slamming the juvenile, over and over, with the butt of the shotgun. He didn’t seem to be having much effect. Scarface was clumsily trying to struggle to its feet. It seemed not so much angry as bewildered by what was happening to it.

Then, out of nowhere, Tamara was standing in front of the monster. She looked like a warrior goddess, all rage and purpose. Her spear was raised up high above Scarface, gripped tightly in both hands. Her knuckles were white.

With all her strength, she drove the spear down through the center of the tyrannosaur’s face. It spasmed, and died. Suddenly everything was very still."

Re: The Grug Brained Developer (2022)

#115
“Good debugger worth weight in shiny rocks, in fact also more”

I’ve spent time at small startups and on “elite” big tech teams, and I’m usually the only one on my team using a debugger. Almost everyone in the real world (at least in web tech) seems to do print statement debugging. I have tried and failed to get others interested in using my workflow.

I generally agree that it’s the best way to start understanding a system. Breaking on an interesting line of code during a test run and studying the call stack that got me there is infinitely easier than trying to run the code forwards in my head.

Young grugs: learning this skill is a minor superpower. Take the time to get it working on your codebase, if you can.

Re: The Grug Brained Developer (2022)

#116

Earlier quoted context omitted.

It would be really embarrassing to use one of the most popular, time-tested languages. Even if we decided to use Zig for everything, hiring for less popular languages like Zig, lua, or Rust is significantly harder. There are no developers with 20 years experience in Zig

Being at a firm where the decision to use C++ was made, the thought process went something like this: "We're going to need to fit parts of this into very constrained architectures." "Right, so we need a language that compiles directly to machine code with no runtime interpretation." "Which one should we use?" "What about Rust?" "I know zero Rust developers." "What about C++?" "I know twenty C++ developers and am conf…

And none of those 20 C++ developers can learn rust? What’s wrong with them?

Re: The Grug Brained Developer (2022)

#117
post #45

Earlier quoted context omitted.

I don't work in typical OO codebases, so I wasn't aware of what the visitor pattern even is. But there's an _excellent_ book about building an interpreter (and vm) "crafting interpreters". It has a section where it uses the visitor pattern. https://craftinginterpreters.com/representing-code.html#the-... I remember reading through it and not understanding why it had to be this complicated and then just used a tagged u…

As far as I understand it, the limited circumstances when you absolutely need the visitor pattern are when you have type erasure , i.e., can't use a tagged union or its equivalent? In that case visitors are AIUI a very clever trick to use vtables or whatever to get back to your concrete types! but ... clever tricks make grug angry.

even when you have tagged unions, visitors are a useful way to abstract a heterogenous tree traversal from code that processes specific nodes in the tree. e.g. if you have an ast with an `if` node and subnodes `condition`, `if_body`, and `else_body` you could either have the `if node == "if" then call f(subnode) for subnode in [node.condition, node.if_body, node.else_body]` and repeat that for every function `f` that walks the tree, or define a visitor that takes `f` as an argument and keep the knowledge of which subnodes every node has in a single place.

Re: The Grug Brained Developer (2022)

#118

So many gems in here but this one about microservices is my favorite: grug wonder why big brain take hardest problem, factoring system correctly, and introduce network call too

I have a conspiracy theory that it’s a pattern pushed by cloud to get people to build applications that:

- Cannot be run without an orchestrator like K8S, which is a bear to install and maintain, which helps sell managed cloud.

- Uses more network bandwidth, which they bill for, and CPU, which they bill for.

- Makes it hard to share and maintain complex or large state within the application, encouraging the use of more managed database and event queue services as a substitute, which they bill for. (Example: a monolith can use a queue or a channel, while for microservices you’re going to want Kafka or some other beast.)

- Can’t be run locally easily, meaning you need dev environments in cloud, which means more cloud costs. You might even need multiple dev and test environments. That’s even more cloud cost.

- Tends to become dependent on the peculiarities of a given cloud host, such as how they do networking, increasing cloud lock in.

Anyone else remember how cloud was pitched as saving money on IT? That was hilarious. Knew it was BS way back in the 2000s and that it would eventually end up making everything cost more.

Re: The Grug Brained Developer (2022)

#120
post #118

So many gems in here but this one about microservices is my favorite: grug wonder why big brain take hardest problem, factoring system correctly, and introduce network call too

I have a conspiracy theory that it’s a pattern pushed by cloud to get people to build applications that: - Cannot be run without an orchestrator like K8S, which is a bear to install and maintain, which helps sell managed cloud. - Uses more network bandwidth, which they bill for, and CPU, which they bill for. - Makes it hard to share and maintain complex or large state within the application, encouraging the use of mo…

Those are all good points, but missing the most important one, the "Gospel of Scalability". Every other startup wants to be the next Google and therefore thinks they need to design service boundaries that can scale infinitely...
Post reply on HN