[HN Gopher] The Grug Brained Developer (2022)
___________________________________________________________________
The Grug Brained Developer (2022)
Author : smartmic
Score : 305 points
Date : 2025-06-17 20:24 UTC (2 hours ago)
(HTM) web link (grugbrain.dev)
(TXT) w3m dump (grugbrain.dev)
| PaulHoule wrote:
| Content 1, Style 0
|
| Thinking you are too smart leads to all sorts of trouble, like
| using C++ and being proud of it.
|
| If you think your intelligence is a limited resource however
| you'll conserve it and not waste it on tools, process and the
| wrong sort of design.
| idlewords wrote:
| The style is the most charming part of this essay.
| parpfish wrote:
| i think the parent is agreeing with the grug article by
| saying "content wins over style", not giving the style of the
| article a score of 0
| guywithahat wrote:
| 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
| juliangmp wrote:
| You don't need developers with 20 years of experience in a
| specific language.
|
| Any decent engineer must be able to work with other languages
| and tools. What you're looking for is someone with experience
| building systems in your area of expertise.
|
| And even then, experience is often a poor substitute for
| competence.
| hiimkeks wrote:
| > You don't need developers with 20 years of experience in
| a specific language.
|
| You may in trivia quiz languages that have more features
| than anyone can learn in a lifetime
| shadowgovt wrote:
| 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 confident we can hire
| three of them tomorrow."
|
| The calculus at the corporate level really isn't more
| complicated than that. And the thing about twenty C++
| developers is that they're very good at using the tools to
| stamp the undefined behavior out of the system because
| they've been doing it their entire careers.
| kragen wrote:
| How does someone know twenty C++ developers and zero C
| developers though?
| flkenosad wrote:
| Born in the 80s.
| Jtsummers wrote:
| That wouldn't stop someone from knowing any C developers.
| It's still a common language today, and was more common
| when those 80s kids would have become adults and entered
| the industry.
| kragen wrote:
| Maybe they use only Microsoft Windows?
| PaulHoule wrote:
| As a kid in the 1980s I thought something was a bit off
| about K&R, kind of a discontinuity. Notably C succeeded
| where PL/I failed but by 1990 or so you started to see
| actual specs written by adults such as Common Lisp and
| Java where you really can start at the beginning and work
| to the end and not have to skip forward. That
| discontinuity is structural though to C and also C++ and
| you find it in most books about C++ and in little weird
| anomalies like the way typedefs force the parser to have
| access to the symbol table.
|
| Sure C was a huge advance in portability but C and C++
| represent a transitional form between an age where you
| could cleanly spec a special purpose language like COBOL
| or FORTRAN but not quite spec a general systems
| programming language and one in which you could. C++,
| thus, piles a huge amount of complexity on top of a
| foundation which is almost but not quite right.
| guywithahat wrote:
| People sometimes forget we're not just trying to use the
| shiniest tool for fun, we're trying to build something with
| deadlines that must be profitable. If you want to hire for
| large teams or do hard things that require software
| support, you often have to use a popular language like C++.
| devrandoom wrote:
| C++ called and filed a complaint about receiving a haymaker of
| a suckerpunch out of nowhere.
| flkenosad wrote:
| Honestly, burn.
| ednite wrote:
| Some solid nuggets here. Totally agree on keeping it simple and
| not rushing. I've rushed things before to meet unrealistic
| deadlines, resulting in bad first impression. Took a step back,
| simplified, and let the design emerge. Ended up with something
| users actually loved. Thanks for sharing.
| factorialboy wrote:
| From the creator of HTMX.
| eidorb wrote:
| Massive grug.
| JohnScolaro wrote:
| This was shared with me years ago by another developer I worked
| with. I still reference it today as I continue my external battle
| with the complexity demon.
| skippyboxedhero wrote:
| trap in crystal
| ChrisArchitect wrote:
| might be some good points in here but it's sooo hard to read.
| fwip wrote:
| It isn't as skimmable as some other writing styles, but if you
| read it one word at a time (either aloud or "in your head"),
| it's not too bad.
| kunzhi wrote:
| Sometimes if I'm reading something and having trouble with
| the words or sentences, I'll slow down and focus on the
| individual letters. Usually helps a tremendous amount.
| fwip wrote:
| Apologies if I came across as condescending.
| _shantaram wrote:
| https://reidjs.github.io/grug-dev-translation/ :)
|
| (no affiliation, I enjoy the original and wish for it to reach
| as many people as possible)
| sodapopcan wrote:
| RIP phone readers.
| graypegg wrote:
| Works great in reader mode! Better than most actually.
| anthomtb wrote:
| I like it. Grug is grammatically incorrect but concise, which
| forces my Big Brain to step back, allowing my Grug Brain to
| slowly absorb the meaning of each word.
| idlewords wrote:
| Grug use few words, make it easy read grug.
| maxboone wrote:
| https://youtu.be/_K-L9uhsBLM
| IshKebab wrote:
| Since you're being downvoted I just wanted to say I agree. I'm
| sure it was cathartic to write but it's not a good way to
| actually communicate.
|
| Also like a lot of programming advice it isn't actually that
| useful. Advice like "avoid complexity" _sounds_ like it is good
| advice, but it isn 't good _advice_. Of _course_ you should
| avoid complexity. Telling people to do that is about as useful
| as telling people to "be more confident".
|
| We mostly learn to avoid complexity through trial and error -
| working on complex and simple systems, seeing the pitfalls,
| specific techniques to avoid complexity, what specific
| complexity is bad, etc. Because not all complexity is bad. You
| want simplicity? Better trade in you Zen 4 and buy a Cortex M0.
| And I hope you aren't running a modern OS on it.
|
| Ok "avoid _unnecessary_ complexity "? Great how exactly do you
| know what's unnecessary? Years of experience that's how.
| Nothing you can distill to a gimmicky essay.
| yawaramin wrote:
| Yeah that's the point, to communicate the idea that some
| complexity is unnecessary, and we should beware of it,
| instead of just accepting wholesale whatever complexity is
| handed to us, like many in this industry do.
| arduanika wrote:
| The medium is the message though.
| 12_throw_away wrote:
| This has by far the best discussion of the visitor pattern I've
| yet to come across.
| tempaway43563 wrote:
| I went to look for that bit. It said:
|
| "Bad"
|
| lol
| dgb23 wrote:
| 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 union
| instead.
|
| Maybe I'm too stupid for OO. But I think that's kind of the
| point of the grug article as well. Why burden ourselves with
| indirection and complexity when there's a more straight forward
| way?
| Jtsummers wrote:
| It's an engineering tradeoff.
|
| https://prog2.de/book/sec-java-expr-problem.html - Not the
| writeup I was looking for but seems to cover it well.
|
| > Why burden ourselves with indirection and complexity when
| there's a more straight forward way?
|
| Because each way has its own tradeoffs that make it more or
| less difficult to use in particular circumstances.
|
| https://homepages.inf.ed.ac.uk/wadler/papers/expression/expr.
| .. - Wadler's description of the expression problem.
| dgb23 wrote:
| Thank you for those links. The first one is especially
| clear.
|
| However, this is just not something that I typically
| perceive as a problem. For example in the book that I
| mentioned above, I didn't feel the need to use it at all. I
| just added the fields or the functions that were required.
|
| In the first link you provided, the OCaml code seems to use
| unions as well (I don't know the language). I assume OCaml
| checks for exhaustive matching, so it seems extremely
| straight forward to extend this code.
|
| On the other hand I have absolutely no issues with a big
| switch case in a more simple language. I just had a look at
| the code I wrote quite a while ago and it looks fine.
| recursivedoubts wrote:
| I love crafting interpreters and mention it on grugbrain:
|
| https://grugbrain.dev/#grug-on-parsing
|
| but the visitor pattern is nearly always a bad idea IMO: you
| should just encode the operation in the tree if you control
| it or create a recursive function that manually dispatches on
| the argument type if you don't
| 12_throw_away wrote:
| 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.
| ahartmetz wrote:
| I care about naming, and I find the name of the visitor pattern
| infuriatingly bad. Very clubbable. I think I have never created
| one called "Visitor" in my life.
|
| Given the syntax tree example from Wikipedia, I think I'd call
| it AstWalker, AstItem::dispatch(AstWalker) and
| AstWalker::process(AstItem) instead of Visitor,
| AstItem::accept(AstVisitor) and AstVisitor::visit(AstItem).
|
| "The walker walks the AST, each items sends it to the next
| ones, and the walker processes them". That means something.
| "The visitor visits the AST items, which accept it" means
| basically nothing. It's more general, but also contains very
| little useful information. So the visitor might need different
| names in different situations. Fine. Just add a comment
| "visitor pattern" for recognizability.
|
| I remember a situation where I needed to walk two object trees
| for a data comparison and import operation. I created an
| AbstractImporter that walked the two trees in lockstep in a
| guaranteed order and invoked virtual methods for each
| difference. It had a non-virtual doImport() for the ordered
| data walk, and doImport() called virtual methods like
| importUserAccount(), importUserAccountGrouMemberships() etc.
| There were two subclasses of AbstractImporter: ImportAnalyzer
| collected differences to display them, then there was a
| selection step implemented by a kind of list model + a bit of
| controller logic, then an ImportWorker to make the selected
| changes. All rather specific terminology and not exactly the
| visitor pattern.
| debois wrote:
| I fed the essay to ChatGPT and asked it to be Grug. Answers are
| sometimes more helpful:
|
| https://chatgpt.com/g/g-DCibUiOmB
| anthomtb wrote:
| 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_
| jiggawatts wrote:
| I keep trying to explain this to tiny dev teams (1-2 people)
| that will cheerfully take a trivial web app with maybe five
| forms and split it up into "microservices" that share a
| database, an API Management layer, a queue for batch jobs to
| process "huge" volumes (megabytes) of data, an email
| notification system, an observablity platform (bespoke!) and
| then... and then... turn the trivial web forms into a SPA app
| because "that's easier".
|
| Now I understand that "architecture" and "patterns" is a jobs
| program for useless developers. It's this, or they'd be on the
| streets holding a sign saying "will write JavaScript for a
| sandwich".
| someothherguyy wrote:
| > Now I understand that "architecture" and "patterns" is a
| jobs program for useless developers.
|
| Yet, developers are always using patterns and are thinking
| about architecture.
|
| Here you are doing so too, a pattern, "form submission" and
| an architecture, "request-response".
| djeastm wrote:
| >I keep trying to explain this to tiny dev teams
|
| I'm curious what role you have where you're doing this
| repeatedly
| jiggawatts wrote:
| The customer is a government department formed by the
| merger of a bunch of only vaguely related agencies. They
| have "inherited" dozens of developers from these mergers,
| maybe over a hundred if you count the random foreign
| outsourcers. As you can imagine there's no consistency or
| organisational structure because it wasn't built up as a
| cohesive team from the beginning.
|
| The agencies are similarly uncoordinated and will pick up
| their metaphorical credit card and just throw it at random
| small dev teams, internally, external, or a mix.
|
| Those people will happily take the credit! The money
| just... disappears. It's like a magic trick, or one of
| those street urchins that rips you off when you're on
| holiday in some backwards part of the world like Paris.
|
| I get brought in as "the cloud consultant" for a week or
| two _at the end_ to deploy the latest ball of mud with live
| wires sticking out of it to production.
|
| This invariably becomes an argument because the ball of mud
| the street urchins have sold to the customer is not fit
| for... anything... certainly not for handling PII or money,
| but they spent the budget and the status reports were all
| green ticks for years.
|
| Fundamentally, the issue is that they're "going into the
| cloud" with platform as a service, IaC, and everything, but
| at some level they don't fully grok what that means and the
| type of oversight required to make that work at a
| reasonable cost.
|
| _" But the nice sales person from Microsoft assured me the
| cloud is cheaper!"_
| mattmanser wrote:
| It's all they've seen. They don't get why they're doing it,
| because they're junior devs masquerading as architects.
| There's so many 'senior' or 'architect' level devs in our
| industry who are utterly useless.
|
| One app I got brought in late on the architect had done some
| complicated mediator pattern for saving data with a micro
| service architecture. They'd also semi-implemented DDD.
|
| It was a ten page form. Literally that was what it was
| supposed to replace. An existing paper, 10 page, form. One of
| those "domains" was a list of the 1,000 schools in the
| country. That needed to be updated once a year.
|
| A government spent millions on this thing.
|
| I could have done it on my todd in 3 months. It just needed
| to use simple forms, with some simple client side logic for
| hiding sections, and save the data with an ORM.
|
| The funniest bit was when I said that it couldn't handle the
| load because the architecture had obvious bottlenecks. The
| load was known and fairly trivial (100k form submissions in
| one month).
|
| The architect claimed that it wasn't possible as the
| architecture was all checked and approved by one of the big
| 5.
|
| So I brought the test server down during the call by making
| 10 requests at once.
| jiggawatts wrote:
| > So I brought the test server down during the call by
| making 10 requests at once.
|
| Back in the very early 2000s I got sent to "tune IIS
| performance" at a 100-developer ISV working on a huge
| government project.
|
| They showed me that pressing the form submit button on just
| _two_ PCs at once had "bad performance".
|
| No, not it didn't. One was fast, the other took 60 seconds
| almost exactly. "That's a timeout on a lock or something
| similar", I told them.
|
| They then showed me their 16-socket database server that
| must have cost them millions and with a straight face asked
| me if I thought that they needed to upgrade it to get more
| capacity. Upgrade to _what!?_ That was the biggest machine
| I have ever seen! I 've never in the quarter century since
| then seen anything that size with my own two eyes. I don't
| believe bigger Wintel boxes have _ever_ been made.
|
| I then asked their database developers how they're doing
| transactions and whether they're using stored procedures or
| not.
|
| One "senior" database developer asked me what a stored
| procedure is.
|
| The other "senior" database developer asked me what a
| transaction is.
|
| "Oh boy..."
| default-kramer wrote:
| I'm convinced that some people don't know any other way to
| break down a system into smaller parts. To these people, if
| it's not exposed as a API call it's just some opaque blob of
| code that cannot be understood or reused.
| poidos wrote:
| This is, I think, my favorite essay about building software. The
| style is charming (I can see why some might not like it) and the
| content is always relevant.
| butterlesstoast wrote:
| Professor Carson if you're in the comments I just wanted to say
| from the bottom of my heart thank you for everything you've
| contributed. I didn't understand why we were learning HTMX in
| college and why you were so pumped about it, but many years later
| I now get it. HTML over the wire is everything.
|
| I've seen your work in Hotwire in my role as a Staff Ruby on
| Rails Engineer. It's the coolest thing to see you pop up in
| Hacker News every now and then and also see you talking with the
| Hotwire devs in GitHub.
|
| Thanks for being a light in the programming community. You're
| greatly respected and appreciated.
| recursivedoubts wrote:
| i'm not crying your crying
| deadbabe wrote:
| Wasn't HTMX just a meme? I can't really tell if it's serious
| because of Poe's Law.
| recursivedoubts wrote:
| htmx sucks:
|
| https://htmx.org/essays/htmx-sucks/
| someothherguyy wrote:
| well, at least he is (you are?) consistent in this style of
| criticizing others' ideas with satirical sarcasm fueled
| prose focused on tearing down straw men.
| recursivedoubts wrote:
| exactly!
|
| get the mug!
|
| https://swag.htmx.org/products/htmx-sucks-mug
| deadbabe wrote:
| So it _is_ bad?
| recursivedoubts wrote:
| Definitely for some stuff!
|
| https://htmx.org/essays/when-to-use-hypermedia/
|
| https://htmx.org/essays/#on-the-other-hand
| recursive wrote:
| If you read this and concluded that it's bad, then you
| probably shouldn't use it.
| brushfoot wrote:
| Solopreneur making use of it in my bootstrapped B2B SaaS
| business. Clients don't need or want anything flashy. There
| are islands of interactivity, and some HTMX sprinkled there
| has been a great fit.
| deadbabe wrote:
| Wish I had your clients, instead of ones that say a page
| needs more "pizazz!"
| aspenmayer wrote:
| I'm getting zombo.com vibes from this client request.
| wvbdmp wrote:
| The pizazz clients want sites for _their_ customers, the
| no-frills clients want sites for _them_ to use
| themselves.
| dgb23 wrote:
| I started using htmx relatively early on, because its a more
| elegant version of what I've been doing anyways for a series
| of projects.
|
| It's very effective, simple and expressive to work this way,
| as long as you keep in mind that some client side rendering
| is fine.
|
| There are a few bits I don't like about it, like defaulting
| to swap innerHTML instead of outerHTML, not swapping HTML
| when the status code isn't 200-299 by default and it has some
| features that I avoid, like inline JSON on buttons instead of
| just using forms.
|
| Other than that, it's great. I can also recommend reading the
| book https://hypermedia.systems/.
| arturocamembert wrote:
| > 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
| boricj wrote:
| grug obviously never took on invisible t-rex
|
| this grug keeps one on one invisible t-rex, grug cursed
| dekhn wrote:
| It took me decades to learn these lessons on my own.
|
| many, many shiney rock lost to agile shaman!
| alerter wrote:
| Probably my single favourite programming article.
| ysofunny wrote:
| this very cool
|
| I smell a formal grammar behind dumbiffied grug english.
|
| nonetheless, I think that when it says:
|
| > so grug say again and say often: complexity very, very bad
|
| at the end of that section, it shoulud say instead:
|
| > so grug say again and say often: complexity very, very, very
| bad
|
| this disambiguates 3 instances of same concept/idea AND, even
| better, showcases 3 values of increasing strength like for
| warning, error, critical use. most compact.
|
| end of groog
| devrandoom wrote:
| This will be discussed in the next standup and everyone has to
| have an opinion. We'll need approval from legal and that takes
| at least a week so we want to minimise ping pong emails.
|
| But it should be fairly quick, expect an updated version around
| end of summer or just after.
| layoric wrote:
| Very entertaining (and enlightening) read. I love the 'reach for
| club' visuals, made me laugh out loud a few times.
| jrodewig wrote:
| This is one of my favorite pieces of non-fiction. No sarcasm.
| culebron21 wrote:
| I read it back then and then forgot the word and couldn't find it
| with search. LOL. Thanks for reposting!
| tartoran wrote:
| This has to be adapted to the LLM era as well.
| tptacek wrote:
| In my experience, LLM agents are pretty Grug-brained.
| Night_Thastus wrote:
| Grug has common sense. LLMs don't even have that.
| Cerium wrote:
| They might be grug brained but they act big brained. Very
| clubable.
| replete wrote:
| grug read words and move head up down lot
|
| grug make other work grugs read this after yellow circle arrive
| next
|
| grug thank clever grug
| minkzilla wrote:
| sad but true: learn "yes" then learn blame other grugs when fail,
| ideal career advice
|
| When I first entered the corporate world I thought this wasn't
| true, there was just poor communication on part of technical
| teams. I learn I wrong. grug right.
| shadowgovt wrote:
| The anecdote about rob pike and logging made me chuckle.
|
| Fun fact about Google: logging is like 95% of the job, easily...
| From tracking everything every service is doing all the time to
| wrangling the incoming raw crawl data, it's all going through
| some kind of logging infrastructure.
|
| I was there when they actually ran themselves out of integers;
| one of their core pieces of logging infrastructure used a
| protocol buffer to track datatypes of logged information. Since
| each field in a protocol buffer message is tagged with an integer
| key, they hit the problem when their top-level message bumped up
| against the (if memory serves) int16 implementation limit on
| maximum tag ID and had to scramble to fix it.
| AutistiCoder wrote:
| Grug user want keyword research tool.
|
| Grug user find program that does that and more.
|
| Grug user confused by menu.
|
| Grug user wish tool only did keyword research.
| vonnik wrote:
| I've been fooling around with applying grugspeak to famous essays
| on tech.
|
| https://docs.google.com/document/d/1emldq9MovfYshOSkM9rhRUcl...
|
| not as good as the original, i know!
| dang wrote:
| Related. Others?
|
| _The Grug Brained Developer (2022)_ -
| https://news.ycombinator.com/item?id=38076886 - Oct 2023 (192
| comments)
|
| _The Grug Brained Developer_ -
| https://news.ycombinator.com/item?id=31840331 - June 2022 (374
| comments)
| dgb23 wrote:
| One thing to appreciate is that this article comes from someone
| who can do the more sophisticated (complex) thing, but tries not
| to based on experience.
|
| There is of course a time and place for sophistication, pushing
| for higher levels of abstraction and so on. But this grug
| philosophy is saying that there isn't any inherent value in doing
| this sort of thing and I think that is very sound advice.
|
| Also I noticed AI assistance is more effective with consistent,
| mundane and data driven code. YMMV
| cortesoft wrote:
| > Everything should be made as simple as possible, but not
| simpler
| ahartmetz wrote:
| The time and place for sophistication and abstraction is when
| and where they make the code easier to understand without first
| needing a special course to explain why it's easier to
| understand. (It varies by situation which courses can be taken
| for granted.)
| jonathan-adly wrote:
| I send this article as part of onboarding for all new devs we
| hire. It is super great to keep a fast growing team from falling
| into the typical cycle of more people, more complexity.
| joeevans1000 wrote:
| htmx.
|
| and clojure.
|
| mmmmm.
| chris_wot wrote:
| I've always wondered at the best way of doing integration tests.
| There is a lot of material on unit tests, but not so much on
| integration tests. Does anyone know of a good book on the
| subject?
___________________________________________________________________
(page generated 2025-06-17 23:00 UTC)