22 ms·
The Grug Brained Developer (2022)
- 0xKvnq 1y agoimpressive :)
- PaulHoule 1y agoContent 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 1y agoThe style is the most charming part of this essay.
- parpfish 1y agoi 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 1y agoIt 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 1y agoYou 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 1y ago> 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
- juliangmp 1y agoI assume you're referring to C++ with all of its... features. And yeah, its a mess. Even when you think you have a good understanding of at least one part of the language, you'll stumble across some small section of cppreference that makes you question your entire career.
- shadowgovt 1y agoBeing 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 1y agoHow does someone know twenty C++ developers and zero C developers though?
- flkenosad 1y agoBorn in the 80s.
- Jtsummers 1y agoThat 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 1y agoMaybe they use only Microsoft Windows?
- PaulHoule 1y agoAs 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 or read the spec twice. 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.
- devrandoom 1y agoC++ called and filed a complaint about receiving a haymaker of a suckerpunch out of nowhere.
- flkenosad 1y agoHonestly, burn.
- deleted 1y ago[deleted]
- ednite 1y agoSome 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 1y agoFrom the creator of HTMX.
- eidorb 1y agoMassive grug.
- tannhaeuser 1y agogrug guy THINK big brain and make up hypermedia api and so complicated words like revealed religion but only in his imagination. more important app is like how programmer intended. web only for docs like unix files anyway no good to think too much.
- recursivedoubts 1y agoi've seen things you wouldn't believe...
- JohnScolaro 1y agoThis 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 1y agotrap in crystal
- deleted 1y ago[deleted]
- ChrisArchitect 1y agomight be some good points in here but it's sooo hard to read.
- _shantaram 1y agohttps://reidjs.github.io/grug-dev-translation/ 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 1y agoRIP phone readers.
- graypegg 1y agoWorks great in reader mode! Better than most actually.
- ern 1y agoGood one....I put it into Claude with a prompt to not change the meaning but make it more normal
- fwip 1y agoIt 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.
- deleted 1y ago[deleted]
- 12_throw_away 1y agoThis has by far the best discussion of the visitor pattern I've yet to come across.
- tempaway43563 1y agoI went to look for that bit. It said: "Bad" lol
- dgb23 1y agoI 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-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 1y agoIt's an engineering tradeoff. https://prog2.de/book/sec-java-expr-problem.html 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/expression.txt https://homepages.inf.ed.ac.uk/wadler/papers/expression/expr... - Wadler's description of the expression problem.
- dgb23 1y agoThank 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.
- debois 1y ago[flagged]
- anthomtb 1y agoSo 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 1y agoI 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 1y ago> 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".
- balamatom 1y agoA word and its meaning are usually antonyms.
- djeastm 1y ago>I keep trying to explain this to tiny dev teams I'm curious what role you have where you're doing this repeatedly
- jiggawatts 1y agoThe 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!"
- poidos 1y agoThis 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 1y agoProfessor 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 1y agoi'm not crying your crying
- arturocamembert 1y ago> 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 1y agogrug obviously never took on invisible t-rex this grug keeps one on one invisible t-rex, grug cursed
- EstanislaoStan 1y ago"...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."
- hackable_sand 1y agoI know this is fiction because everyone is focused on the same problem.
- dev0p 1y agoI felt like my third eye has been opened after reading that. Truly inspiring.
- dekhn 1y agoIt took me decades to learn these lessons on my own. many, many shiney rock lost to agile shaman!
- deadbabe 1y agoWasn’t HTMX just a meme? I can’t really tell if it’s serious because of Poe’s Law.
- recursivedoubts 1y agohtmx sucks: https://htmx.org/essays/htmx-sucks/ https://htmx.org/essays/htmx-sucks/
- someothherguyy 1y agowell, 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 1y agoexactly! get the mug! https://swag.htmx.org/products/htmx-sucks-mug https://swag.htmx.org/products/htmx-sucks-mug
- deleted 1y ago[deleted]
- deadbabe 1y agoSo it is bad?
- recursivedoubts 1y agoDefinitely for some stuff! https://htmx.org/essays/when-to-use-hypermedia/ https://htmx.org/essays/when-to-use-hypermedia/ https://htmx.org/essays/#on-the-other-hand https://htmx.org/essays/#on-the-other-hand
- recursive 1y agoIf you read this and concluded that it's bad, then you probably shouldn't use it.
- alerter 1y agoProbably my single favourite programming article.
- ysofunny 1y agothis 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 1y agoThis 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 1y agoVery entertaining (and enlightening) read. I love the 'reach for club' visuals, made me laugh out loud a few times.
- VoodooJuJu 1y ago[dead]
- jrodewig 1y agoThis is one of my favorite pieces of non-fiction. No sarcasm.
- culebron21 1y agoI read it back then and then forgot the word and couldn't find it with search. LOL. Thanks for reposting!
- tartoran 1y agoThis has to be adapted to the LLM era as well.
- tptacek 1y agoIn my experience, LLM agents are pretty Grug-brained.
- Night_Thastus 1y agoGrug has common sense. LLMs don't even have that.
- Cerium 1y agoThey might be grug brained but they act big brained. Very clubable.
- tptacek 1y agoThat's one of their great charms, because you don't have to feel bad when you club them.
- ethan_smith 1y agoLLMs actually reinforce grug principles - they work best with simple, consistent patterns and struggle with the same complexity demons that confuse humans.
- replete 1y agogrug 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 1y agosad 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 1y agoThe 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 1y agoGrug 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 1y agoI've been fooling around with applying grugspeak to famous essays on tech. https://docs.google.com/document/d/1emldq9MovfYshOSkM9rhRUcllxgLeP2-ZA9c2EYACQM/edit?usp=sharing https://docs.google.com/document/d/1emldq9MovfYshOSkM9rhRUcl... not as good as the original, i know!
- dang 1y agoRelated. Others? The Grug Brained Developer (2022) - https://news.ycombinator.com/item?id=38076886 https://news.ycombinator.com/item?id=38076886 - Oct 2023 (192 comments) The Grug Brained Developer - https://news.ycombinator.com/item?id=31840331 https://news.ycombinator.com/item?id=31840331 - June 2022 (374 comments)
- dgb23 1y agoOne 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 1y ago> Everything should be made as simple as possible, but not simpler
- ahartmetz 1y agoThe 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.)
- cowthulhu 1y agoI feel like this would fit the bell curve meme - Novice dev writes simple code Intermediate dev writes complex code Expert dev writes simple code
- bluefirebrand 1y agoI gave this advice to an intermediate dev at my company a couple of years ago Something along the lines of "Hey, you're a great developer, really smart, you really know your stuff. But you have to stop reaching for the most complicated answer to everything" He took it to heart and got promoted at the start of this year. Was nice to see. :)
- temptemptemp111 1y ago[dead]
- jonathan-adly 1y agoI 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 1y agohtmx. and clojure. mmmmm.
- chris_wot 1y agoI'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?
- recursivedoubts 1y agowhile it's #1 I might as well say, there's a book: https://www.lulu.com/shop/carson-gross/the-grug-brained-developer/paperback/product-2m47wqg.html?page=1&pageSize=4 https://www.lulu.com/shop/carson-gross/the-grug-brained-deve... it's the same content + an index, so not worth buying unless you want the hard copy, but maybe a good convo-starter for the ol'dev team
- GMoromisato 1y agoOne of the many ironies of modern software development is that we sometimes introduce complexity because we think it will "save time in the end". Sometimes we're right and it does save time--but not always and maybe not often. Three examples: DRY (Don't Repeat Yourself) sometimes leads to premature abstraction. We think, "hey, I bet this pattern will get used elsewhere, so we need to abstract out the common parts of the pattern and then..." And that's when the Complexity Demon enters. We want as many bugs as possible caught at compile-time. But that means the compiler needs to know more and more about what we're actually trying to do, so we come up with increasingly complex types which tax your ability to understand. To avoid boilerplate we create complex macros or entire DSLs to reduce typing. Unfortunately, the Law of Leaky Abstractions means that when we actually need to know the underlying implementation, our head explodes. Our challenge is that each of these examples is sometimes a good idea. But not always. Being able to decide when to introduce complexity to simplify things is, IMHO, the mark of a good software engineer.
- zie1ony 1y agoYou must be a Rust developer.
- GMoromisato 1y agoWorse--C++
- mplanchard 1y agoFor folks who seek a rule of thumb, I’ve found SPoT (single point of truth) a better maxim than DRY: there should be ideally one place where business logic is defined. Other stuff can be duplicated as needed and it isn’t inherently a bad thing. To modulate DRY, I try to emphasize the “rule of three”: up to three duplicates of some copy/paste code is fine, and after that we should think about abstracting. Of course no rule of thumb applies in all cases, and the sense for that is hard to teach.
- GMoromisato 1y ago100% agree. Duplication is far cheaper than the wrong abstraction. Student: I notice that you duplicated code here rather than creating an abstraction for both. Master: That is correct. Student: But what if you need to change the code in the future? Master: Then I will change it in the future. At that point the student became enlightened.
- magarnicle 1y agoI know, I get it, but I've realised that I'm not actually grug-brained. The way my brain works, I remember things pretty well; I like to get into the details of systems. So if more complexity in the code means the app can do more or a task is automated away I'll make the change and know I'll be able to remember how it works in the future. This doesn't mean OP is bad advice, just make a conscious decision about what to do with complexity and understand the implications.
- pixelatedindex 1y agoThe knowing how it works in the future should really just be comments, right? And if it’s a bit more complex, perhaps a markdown file in a docs folder or stuffed in a README? When working with a large enough organization, tribal knowledge is an invisible t-rex
- magarnicle 1y agoI don't think comments can capture the complexity of everything - there's too much interaction between systems to explain it all. I'm probably unique here in that my tribe is just one person: I wouldn't recommend adopting a pet t-rex in a team.
- anonymars 1y agoWhat about the rest of your team?
- magarnicle 1y agoI am the rest of my team. So yeah, not applicable to most people.
- d4v3 1y agobig brain dev say, "me add complexity. no problem." grug whisper: “problem come later.” grug see lone dev make clever code. grug light torch for future archaeologist.
- Sparkyte 1y agoOMG is that the technical name for my development style? I'm not like super deep in technobabble since there are so many coined names and references that it is nearly impossible to assign the correct one. Grug brained dev I am I guess.
- cjcenizal 1y ago[flagged]
- deleted 1y ago[deleted]
- jongjong 1y agoI used to be against complexity and worried about such narratives making fun of people who tried to avoid it but now I'm grateful. If software developers didn't have such strong biases in favor of complexity, LLMs would probably be producing really high quality code and have replaced us all by now... Instead, because the average code online is over-engineered, un-reusable junk, their training set is a mess and hence they can only produce overengineered junk code. Also, this may provide long term job safety since now LLMs are producing more and more code online, further soiling the training set.
- dmurray 1y agoI can't believe this is (2022). I would have confidently told you I read this 10 years ago and guessed that it was already a classic then.
- mixmastamyk 1y agoSame. I think it is inspired by an earlier work.
- titanomachy 1y ago“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.
- avhception 1y agoUsing a debugger on my own code is easy and I love it. The second the debugger steps deep into one of the libs or frameworks I'm using, I'm lost and I hate it. That framework / lib easily has many ten thousands of person-hours under it's belly, and I'm way out of my league.
- ronjakoi 1y agoBut you can just use the "step out" feature to get back out when you realise you've gone into a library function. Or "step over" when you can see you're about to go into one.
- avhception 1y agoWhile that's true, it doesn't necessarily help me understand why my parameters for said lib or whatever lead to things blowing up.
- never_inline 1y agoIDEs tend to have a "just my code" option.
- msluyter 1y ago"Step out" is how to get out of the lower level frameworks, and or "step over" to avoid diving into them in the first place. I can't speak for other IDEs, but all of the JetBrains products have these.
- 2OEH8eoCRo0 1y agoI still call coffee "black think juice"
- jonstewart 1y agoRelated, https://en.wikipedia.org/wiki/Anti-intellectualism_in_American_Life https://en.wikipedia.org/wiki/Anti-intellectualism_in_Americ...
- anonymars 1y agoIn what way would you say they are related? I've read both but don't see it
- mrkeen 1y agoIntroducing a needless us/them dynamic. Don't do it the way those elites do it, do it like us real grugs. That's why it's so easy to rush in and agree with everything. In another article, you might have to read 3 points for microservices, and 4 against. But here? Nope. Factoring? Just something you do with your gut. Know it when ya see it. Grug isn't going to offer up the why or how, because that's something a reader could disagree with.
- anonymars 1y agoI don't see it as an us/them, he even says: > note: grug once think big brained but learn hard way It's basically a lot of K.I.S.S. advice. Of course you should use the best tool for the job, but complexity often sneaks up on you. > Factoring? Just something you do with your gut. Know it when ya see it. Grug isn't going to offer up the why or how, because that's something a reader could disagree with. I would dispute this characterization. Grug says it's difficult, and it is, but gives specific advice, to the extent one can: - grug try not to factor in early part of project and then, at some point, good cut-points emerge from code base - good cut point has narrow interface with rest of system: small number of functions or abstractions - grug try watch patiently as cut points emerge from code and slowly refactor - working demo especially good trick: force big brain make something to actually work to talk about and code to look at that do thing, will help big brain see reality on ground more quickly
- recursivedoubts 1y agoi'm a professor
- sammy0910 1y agothis is a masterpiece of writing -- well done
- mcqueenjordan 1y agoOne of my favorite LLM uses is to feed it this essay, then ask it to assume the persona of the grug-brained developer and comment on $ISSUE_IM_CURRENTLY_DEALING_WITH. Good stress relief.
- CactusRocket 1y agoI am not very proficient with LLMs yet, but this sounds awesome! How do you do that, to "feed it this essay"? Do you just start the prompt with something like "Act like the Grug Brained Developer from this essay <url>"?
- rm_-rf_slash 1y agoCould put it in a ChatGPT project description or Cursor rules to avoid copy pasting every time.
- xupybd 1y agoThe guy that wrote this is a raging schizophrenic that argues with his own alt on X
- recursivedoubts 1y agocomplete lunatic, hate him!
- xupybd 1y agoIKR. He's at it again https://x.com/intercoolerjs/status/1935190940903424241?t=WuM64M42jv-pQMGsPigGcQ&s=19 https://x.com/intercoolerjs/status/1935190940903424241?t=WuM...
- rTX5CMRXIfFG 1y agoI avoided this page since it was a terrible programmer at work who shared it to me a couple years back. The title and the writing style made me think of him in new depths. Perhaps there’s something here for it to trend in HN, but I’m sure it resonates to all skill levels of programmers in wildly different ways—the comments are only an illusion of consensus and wisdom.
- soundpuppy 1y agoI think even the simplest of programming tools is still unfathomably powerful, enough to where you could eliminate data structures and still be where we are today. BitTorrent had a great amount of complexity, and look what streaming did to it.
- ninetyninenine 1y ago“grug once again catch grug slowly reaching for club, but grug stay calm” Relateable.
- grantbel 1y agoA classic. And it’s inspired many more grugs like grug ceo https://www.sam-rodriques.com/post/the-grugbrained-ceo https://www.sam-rodriques.com/post/the-grugbrained-ceo
- be87581d 1y ago[dead]
- chuckadams 1y agoGrug quickly tire of verbal gimmick that go on way too long.
- recursivedoubts 1y agoi grant you a full refund
- neoden 1y agoSo this is how a troll from The Witcher 3 would explain software engineering
- r-bryan 1y agoOh FFS why is print-vs-debug being debated as either/or? Both can be valuable, depending on the circumstances. It's clearly both/and.
- recursivedoubts 1y agoit's not presented as either-or in the article: i talk about how debuggers AND logging are both important tools
- b0a04gl 1y ago[dead]
- bfung 1y agoCoding too hard, this grug use AI.
- librasteve 1y agobig fan of HTMX (pinnacle of grug) i have started to use repl debugging … just insert a repl statement anywhere in your raku code and you can interact with the code state
- fellatio 1y agoPinnacle of grug is PHP and plain forms. Maybe a validate on submit in JS.
- Jean-Papoulos 1y agoI argue that complexity is good. Complicated things though, those are bad. The world is complex, and we must deal with it. But as long as we organize our work and don't let it spiral into being complicated, we'll be fine.
- recursivedoubts 1y agovery hard for most developers (maybe even you) to tell the difference "be organized" is, of course, good advice
- pantalaimon 1y agoThis is why I like embedded. The bigger the CPU, the more room the complexity spirit daemon has to thrive.
- orthoxerox 1y ago> big brain developer Bob Nystrom Lies and slander, munificent is quite open about his grugness and his grug-brained approach is why his book is so good.
- recursivedoubts 1y ago> visitor pattern mmmm
- ethbr1 1y agoThe distain for shamans in palpable and obviously born out of similar work experience. *shudder* Shamans suck for the same reason architects suck -- take "getting stuff done" out of someone's responsibilities, and they lose the plot pretty quickly.
- osigurdson 1y agoWhile I agree that complexity is bad the fact that we don't really have a shared understanding of what complexity is doesn't help. At worst, it can be just another synonym for "bad" that passes through the mental firewall without detection. For instance is having multiple files in a project "complex"? If I am unfamiliar with a codebase is it "complex" and I therefore have to re-write it?
- recursivedoubts 1y agoPart of the problem with complexity is that it is very easy for engineers to justify. Yes, there is an important distinction between necessary and accidental complexity, but, to take a point from the essay, even necessary complexity can be reduced by saying "no" to features. This is why I treat "complexity bad" as a mantra to keep me in the right mindset when programming. Complexity bad. Even necessary complexity. We may have to deal with it, but, like fire, it's still dangerous.
- zero_shift 1y agoWhat exactly is complexity? How do I recognise it? When do I tell whether something is complex or I am just not very familiar with it?
- recursivedoubts 1y agoreally hard questions but complexity bad
- osigurdson 1y agoIf Grug sees new code base, sometime Grug get anxiety about learning new code. What in it for Grug? Says Grug. Rather start new project and say "complexity bad" to other Grugs. If other Grug or big brain disagree, create Grug tribe - show bible to other Grugs and big brains. Must convert to Grug way or leave team. Complexity bad.
- prmph 1y ago> complexity very bad Oh boy, this is so true. In all my years of software engineering this is one of those ideas that has proved consistently true in every single situation. Some problems are inherently complex, yes, but even then you'd be much, much better off spending time to think things through to arrive at the simplest way to solve it. Again and again my most effective work has been after I questioned my prior approaches and radically simplified things. You might lose some potential flexibility, but in most case you don't even need all that you think you need. Some examples: - Now that reasonably good (and agentic) LLMs are a thing, I started avoiding overly complex TypeScript types that are brittle and hard to debug, in favor of writing spec-like code and asking the LLM to statically generate other code based on it. - The ESLint dependency in my projects kept breaking after version updates, many rules were not sophisticated enough to avoid false positives, and keeping it working properly with TypeScript and VSCode was getting complicated. I switched to Biome.js, and it was simpler and just as effective. However, I'm recently having bugs with it (not sure if Biome itself or the VSCode extension is to blame). But whatever, I realized that linting is a nice-to-have, not something I should be spending inordinate amount of times babying. So I removed it from the build tool-chain, and neither do I even need have it enabled all the time in VSCode. I run Biome every now and then to check the code style and formatting , and that's it, simple. - Working on custom data migration tooling for my projects, I realized forward migrations are necessary to implement, but backwards migrations are not worth the time and complexity to implement. In case a database with data needs to be rolled back, just restore the backup. If there was no data, or it is not a production database, just run the versioned initialization script(s) to start from a clean state. Simple.
- ttoinou 1y agoYour two first examples, you just hide the complexity by using another tool, no ? And I don’t see how number 3 is simpler. In my maths head I can easily create bijective spaces. Emulating backward migration through others means might be harder (depending on details of course thats not a general rule)
- prmph 1y agoI'm not sure where the complexity is hiding in my examples. For the code generation, note that some types are almost impossible to express properly, but code can be generated using simpler types that capture all the same constraints that you wanted. And, of course I only use this approach for cases where it is not that complicated to generate the code, and so I can be sure that each time I need to (re)generate it, it will be done correctly (ie., the abstraction is not leaky). Also, I don't use this approach for generating large amounts of code, which would hide the inherent structure of the code when reading it. For the eslint example, I simply made do without depending on linting as a hard dependency that is always active. That is one of my points: sometimes simply some "niceties" would simplify thing a lot. As another example in this vein, I avoid too much complex configuration and modding of my dev environment; that allows me to focus on what matters. In the migration example, the complexity with backward migration is that you then need to write a reverse migration script for every forward migration script. Keeping this up and managing and applying them properly can become complex. If you have a better way of doing it I'd like to hear it.
- 0xbadcafebee 1y agoMe no like grug perpetuate complexity myth. Little grugs no understand complexity is not monolith. Me want fix that. Complexity not bad. Complexity just mean "thing have many consideration". Some thing always have many consideration. Not bad if useful and necessary. Complexity still difficult and raise problem. So try avoid complexity when unnecessary and no add value. But shun complexity bad when it detract value or raise new problem. Little grug benefit from not over-simplify. Not everything just good or bad, most thing both, it depend.
- recursivedoubts 1y agothat's a good point, but complexity bad
- 0xbadcafebee 1y agoif complexity bad, then houses bad, air conditioning bad, roads bad, clothing bad, farming bad, computers bad, .... simpler to live naked in wood, use big rock hunt food. but grug really like pizza. use computer order pizza, leave tip on app. grug no have to social interact, make grug happy. manage complexity well and it make good result, worth occasional pain. soon complexity become normal.
- recursivedoubts 1y agoit's a good point, well worth considering, but also complexity bad
- rmnclmnt 1y agoShare this gem on a team chat, everyone had a good laugh and now everytime we discuss some weird situation, we start speaking as grug brains… Don’t know how I lived without it so far
- jeffrallen 1y agoI am grug, and I endorse this message.
- 1-more 1y agoThis concept is really interesting when you think about statically typed, pure functional languages. I like working in them because I'm too pretty and stupid to think about side effects in every function. My hair is too shiny and my muscles are too large to have to deal with "what if this input is null?" everywhere. Can't do it. Need to wrap that bad boy up in a Maybe or some such and have the computer tell me what I'm forgetting to handle with a red squiggly.
- 9rx 1y agoFormal proof languages are pretty neat, but boy are they tedious to use in practice. It is unsurprising that effectively no code is written in them. How do you overcome that? Where the type system isn't that expressive, you still have to fall back to testing to fill in the places where the type system isn't sufficient, and your tests are also going to 'deal with "what if this input is null?" everywhere' cases and whatnot by virtue of execution constraints anyway.
- 1-more 1y agoI'm just talking null-less FP languages such as Haskell and Elm, not a full proof system such Lean and Agda or a formal specification language such as TLA+. I'm not sure I agree with your prior that "your tests are also going to 'deal with "what if this input is null?" everywhere' cases and whatnot." Invalid input is at the very edge of the program where it goes through a parser. If I parse a string value into a type with no room for null, that eliminates a whole class of errors throughout the program. I do need to test that my parser does what I assume it will, sure. But once I have a type that cannot represent illegal data, I can focus my testing away from playing defense on every function.
- 9rx 1y agoAssume that there was room for null. What is your concrete example of where null becomes a problem in production, but goes unnoticed by your tests?
- 1y ago
- maxlin 1y agoThis just became my favorite article of all time.
- hmartin 1y agoI had Claude rewrite this in readable English and add links to other perspectives: https://gist.github.com/hbmartin/c169c55d3cffeed0ca4a66f0f2f65bf1 https://gist.github.com/hbmartin/c169c55d3cffeed0ca4a66f0f2f...
- endoblast 1y agoThe original reads easier in the voice of the cookie monster: https://www.youtube.com/watch?v=shbgRyColvE https://www.youtube.com/watch?v=shbgRyColvE
- grug_ 1y ago[dead]