23 ms·
That first reply is so funny to me because it hits too close to home https://twitter.com/nice_byte/status/1466940940229046273 https://twitter.com/nice_byte/sta
by ncann 5y ago
That first reply is so funny to me because it hits too close to home
https://twitter.com/nice_byte/status/1466940940229046273 https://twitter.com/nice_byte/status/1466940940229046273
The more I do this, the more I gravitate towards the simple things.
- bsder 5y agoThe more experience you have, the more you see through the code to what is underneath. "...there's way too much information to decode the Matrix. You get used to it, though. Your brain does the translating. I don't even see the code."
- feoren 5y agoThe problem with this is that most software is absolute garbage and most code is an awful, unmaintainable mess. The middle of that curve are all the people who are trying to improve that situation. The right side of the curve are the people who have given up. But maybe that does make them the smarter ones.
- deleted 5y ago[deleted]
- cs702 5y agoThat image[a] is so funny because it is so true: Anyone who has ever written any software has felt like the unenlighted half-person in the middle of that distribution at least once -- for example, when learning how to code with a different approach in a new language. I have felt like that more than once. Everyone here has, I suspect. -- [a] https://twitter.com/nice_byte/status/1466940940229046273/photo/1 https://twitter.com/nice_byte/status/1466940940229046273/pho...
- reikonomusha 5y agoDespite being a joke, I know it's the "Ha Ha Only Serious" [0] sort. I can't help but think this is severely biased by the trends of "enterprise software," where you eventually "give up", and clock your 9–5 writing if+for making a fine living, but erroneously pass that off as a mature, Jedi-like way of thinking about programming, like the meme suggests. (And, consequently, you spend no less time debugging hairy, nested, imperative conditionals with for-loops that are off-by-1.) I have no beef with if+for, but a large part of the reason they're "goto tools", if you will, is because industry is slow to assimilate many state-of-the-art ideas, sometimes by as much as 40 years. Simpler building blocks does not necessarily mean simpler solution. If only! [0] https://en.m.wiktionary.org/wiki/ha_ha_only_serious https://en.m.wiktionary.org/wiki/ha_ha_only_serious
- engineeringwoke 5y ago> debugging hairy, nested, imperative conditionals with for-loops that are off-by-1 Isn't this just a complicated case of ifs and fors?
- reikonomusha 5y agoSure, but the word "just" is doing a lot of work. It seems to be where a code base of uncomplicated ifs and fors leads to asymptotically, because both of those constructs don't prohibit you in any way from sneaking in "just another line" to either of them.
- 8ytecoder 5y agoIt’s just so sad that the lowest common denominator has become the standard now. When I first learnt Clojure it entirely changed the way I think and solve problems. The code really was elegant. Obviously, it can only be read by someone who can also understand programming beyond ifs and fors. That’s a non-starter in most environments - enterprise or otherwise. Funny enough, I see most innovations coming from consultants who do the same work for multiple companies and realise the repeating patterns and extract an abstraction.
- sharken 5y agoIfs and fors are the easiest concepts to explain to non-developers, so it makes sense to start there. I wouldn't say that they are the standard now, but using and mastering all features in a language is hard. Add to that design patterns, classes and code layout it becomes a full-time job to keep up. I have been in contact with code most of my professional life, but still isn't comfortable writing large amounts of code. The simple reason is that i don't do it full-time. Here are the features in C# just to illustrate how complex a programming language is. https://www.c-sharpcorner.com/article/c-sharp-versions/ https://www.c-sharpcorner.com/article/c-sharp-versions/
- qsort 5y agoI agree that modern software development for non-full time developers is brutal, several of my data scientist colleagues are remarkably brilliant people and yet they struggle with some more advanced programming concepts. However, most of those features are relatively standard and are more conceptual than syntactical in nature. Bashing people because they don't know stuff is stupid and counterproductive, but I shouldn't be forced to code in the programming equivalent of roman numerals just because someone else can't be properly fucked to understand lambdas or interfaces or generics, all stuff that's literally covered in your run-of-the-mill CS 101 course. It all boils down to having enough humility and empathy to understand that other people are not, in fact, the same as us.
- thewarrior 5y agoExcept it never can be that simple because many systems have millions of ifs when the entire system is considered. So architecture and parallel evolution of those millions of ifs becomes an entire field of study :)
- kubb 5y agoI gravitate towards useful abstraction. I've written the same loops (find an element, find a maximum, do something to every element, filter elements, etc.) 10 000s of times by now. It got old after the first 100.
- jstx1 5y ago- it's okay to use printing instead of a debugger - you don't need to write classes for everything - it's okay to write something in a more verbose way to make it clear for other people - your tools don't need to be perfect to get things done I need more of these, maybe some that aren't as reductionist as Carmacks's original post.
- mjevans 5y agoThe really useful 'print' debug lines might be kept at additional 'debug' flag levels. This is particularly useful for tracing the behavior of programs that no longer have debug symbols and are running in real environments.
- vlunkr 5y agoThis post by Aaron Patterson made me realize it's fine to debug with print statements https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debugger... In rare cases I pull out a real debugger, but most of the time the right prints in the right places are just as good. I can also iterate much faster because I'm not jumping between the code the the debugger, or pulling the debugger out of the loop it's stuck in.
- therealjumbo 5y agoI've come to the conclusion that it's a good skill to have since it's (or logging which is basically the same) the only debugging method that's always guaranteed to be available. For example there's lots of build and CI tools out there that have no Real Debugger.
- gdulli 5y agoI'd never seen that meme before, but there's a Bruce Lee quote (maybe apocryphal) that has had a lot of meaning for me ever since I got over the same hump myself. “Before I learned the art, a punch was just a punch, and a kick, just a kick. After I learned the art, a punch was no longer a punch, a kick, no longer a kick. Now that I understand the art, a punch is just a punch and a kick is just a kick.”
- jareklupinski 5y agomakes me think of the Buddhist "Before enlightenment: chop wood, carry water. After enlightenment: chop wood, carry water". not my favorite source since it doesn't go into the 'scaling the mountain' bit, but every source that talks abt that part seems to be...eh: https://buddhism.stackexchange.com/questions/15921/what-is-the-meaning-of-the-zen-quote-before-enlightenment-chop-wood-carry-wat https://buddhism.stackexchange.com/questions/15921/what-is-t...
- kwertyoowiyop 5y ago“Before enlightenment: if then. After enlightenment: if then.”
- lanstin 5y agoI always took that to mean something like this: Q: What is the difference between an enlightened person and an ordinary person? A: There is no difference, but only the enlightened person knows this.
- montalbano 5y agoFunny, I posted this on another HN thread [0] recently, but it's perfectly relevant again: We shall not cease from exploration And the end of all our exploring Will be to arrive where we started And know the place for the first time. T. S. Eliot - Little Gidding [0] https://news.ycombinator.com/item?id=29043941 https://news.ycombinator.com/item?id=29043941
- dharmab 5y agoHow then am I so different from the first men through this way? Like them, I left a settled life, I threw it all away To seek a Northwest Passage at the call of many men To find there but the road back home again Stan Rogers, "Northwest Passage"
- kwertyoowiyop 5y agoSounds good. I still remember my BASIC.
- freyir 5y agoNew developers write simple but shortsighted code. It gets the job done, but it will be painful to work with in the future. Intermediate developers, bitten by their past mistakes, decide to future proof their work. But they don’t just look one or two steps ahead, rather they try to look five steps ahead and identity problems that do not and may never exist. Consequently, they over-engineer, over-abstract, and over-complicate everything. Carmack’s recent “But here we are” speech resonated with me. Advanced developers identify the right balance for each task between simple and complex, concrete and abstract, and pragmatic and idealistic. In my experience, they favor simple and pragmatic solutions, use abstraction effectively, and can satisfy near-term goals quickly without painting themselves into a corner. “As simple as possible, but not simpler.” I try to avoid working for tech leads stuck in the second phase, which is not uncommon. If you suggest taking the “ifs and for loops” approach of solving a simple problem with a simple solution, they’ll assume you’re on the wrong side of the bell curve.
- systemvoltage 5y agoWell said, this hits home. Also constant refactoring and maintenance of the codebase without adding any new features.
- firebaze 5y agoBull's eye.
- dekervin 5y agoAnd that's also why a lot of Architecture Astronaut that looooved Java, didn't see Python coming.
- deleted 5y ago[deleted]
- hiram112 5y agoFunny, I took over a modern python service and I was pretty shocked at what I inherited. Long gone are the days of "There's one way to do things". Instead, this thing would give the most "enterprisey" Spring JEE application a run for its money with its endless annotations, dependency injection magic, all sorts of pseudo-types - both the "built-in" Python 3 ones like Set and List, but also the libraries like Pydantic. But unlike Java, these types aren't even really guaranteed by the language at compile time, so even if your IDE plugin can successfully detect them, things will still (silently) slip through at runtime. The async functionality that's been bolted on to the language is worse than even the old and confusing Java multi-threading primitives, and the funny thing is it still doesn't actually run things in multiple threads. For that, your simple Rest API is running on layers of C programs like Uvicorn which itself is then wrapped by another few processes running Gunicorn which in turn is probably running behind NGINX. LOL, and we thought the Servlet stuff with Tomcat and JBoss was clunky - this is insane. To be honest, if there ever was a sweet spot for Python, it would have been for smaller code bases that weren't complex enough for big "enterprisey" langs like .Net or Java, but were more permanent and complex than shell scripts or (back in the day) Perl could handle. But nowadays, I don't think modern Python fits any use case real well. It's still dynamically typed, slow, single-threaded, and has a poorly managed ecosystem and hodge-podge of tools like virtualenv, pyenv, poetry, etc. that never quite become standardized and stable. So unless you've got a bunch of Python experts who aren't interested in moving to a better lang, I'd find it hard to go with Python for new projects.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- throw10920 5y agoDo you write your code in notepad or pico, or use brainfuck as your primary programming language, or copy your code to a new folder for version control? Those things are all the simplest in their tool category.
- bmitc 5y agoThis is basically the progression in any field or craft. As one becomes more experienced, one basically figures out the optimized stuff needed to successfully solve the problem in hand, successful in the sense that it both meets current requirements and enables future changes or evolution. I describe this path of discovery as: beginner: function over form intermediate: form over function transcendence: form is function However, I will disagree that coding is just about ifs and for loops. To me, coding, programming, software development, or whatever you want to call it is about three things: how to use a computer to do something, communication between people (including your future self), and how to think about a domain. “ifs and for loops” does not capture this.
- tester756 5y agoI'm may be biased because I spent too much time arguing about this but you hear those $fancy_principles / fp / hard oop / "clean code" evangelists, and then you go to any repo of real world software - linux, compilers, kubernetes, git, blablabla and everywhere you see for loops, goto, ladders of if statements
- kaba0 5y agoI mean, you cherry-picked by quite a criteria there. It’s all C and Go, and they somewhat lack higher level abstraction capabilities. On the other hand compilers are often written in C++, or are bootstrapped in the very same language though. Also, what about OpenJDK, elastic search, all the web servers running the whole cloud? Linux might be the underlying OS, but that’s not the program actually doing business logic. If anything, it’s just another layer of abstraction. Also, let’s be honest, C does all these “virtual method” magic on a per-project basis which will not be understood by any tool ever (all those function pointers to whole new implementations passed from God knows who, with barely any typing). At least FP and OOP knowledge somewhat transfers and is queryable by tools.
- tester756 5y agoOk, another example: C# Compiler, .NET internals/std/yadayada, same stuff. My claim is: Almost all real world, OSS, big, battle-proven code bases are nowhere even close to evangelist's "sanity". They're full of loops, nulls, gotos, ifs and all ""bad stuff"" >all the web servers running the whole cloud I literally opened first file that I've seen in nginx repo and take a look at this: shitton of ifs, for loops gotos and all of that in one, a few hundreds lines long method. https://github.com/nginx/nginx/blob/master/src/http/ngx_http.c#L122 https://github.com/nginx/nginx/blob/master/src/http/ngx_http... >On the other hand compilers are often written in C++ are they? >or are bootstrapped in the very same language though. thus what?