News for hackers. Stuff that matters.
Re:Software development is a loser’s game by terracatta on Thursday April 01, 2021 @10:49AM (#26661144)
> If we invert software development, the goal isn’t then to write code that works, it’s spending time on avoiding writing poor quality code and bugs.

This line is packaged to sound really insightful, but is it?

The goal of software development is to create software in support of some greater mission. That mission might be to make someone's life easier, to make money, to advance human knowledge, or many other things.

If I write no software today, I've also written no new bugs. But have I made any progress toward achieving the mission?

Feels like this person is very frustrated with novice engineers writing buggy code and has assumed a gatekeeper role to protect the integrity of the codebases in which he holds responsibility. It may be a necessary role at his organization, but I just don't agree with the cynical and depressing message.

Re:Software development is a loser’s game by scottious on Thursday April 01, 2021 @11:31AM (#26661736)
I think you're right, but I also think the author isn't necessarily wrong.

Using his tennis analogy, each chunk of code written is like swinging at the tennis ball. You don't have to have the perfect curve-ball, you just have to NOT screw it up.

I've too often seen developers try to attack the ball with the perfect swing and the most force possible, only to have it go straight into the net. If they just focused on getting it over the net as simply as possible, the end result usually means less code that's easier to understand.

Example: junior dev needs to write a data transformation pipeline. They write a microservice and deploy it in Docker on Kubernetes. They do a lot of hand-wringing about reactive design and non-blocking I/O. They end up wrestling with the deploy and getting it done on time. All it needed to be was a simple single-threaded command line utility.

In 15 years, I've seen this story play out tons of times... I'm basically watching devs trip over themselves. I'm not saying I'm perfect either, this has happened to me too.

Re:Software development is a loser’s game by justin_oaks on Thursday April 01, 2021 @12:19PM (#26662523)
This reminds me of advice I give to junior devs who over-complicate things in the planning phase: "Start with the stupidest thing that will work".

You need to make something work before you can make it work well. You need to start simple before you dig into the complexity. Sometimes you find that the "stupid" solution is good enough.

Re:Software development is a loser’s game by BoiledCabbage on Thursday April 01, 2021 @02:46PM (#26664499)
> This reminds me of advice I give to junior devs who over-complicate things in the planning phase: "Start with the stupidest thing that will work".

> You need to make something work before you can make it work well. You need to start simple before you dig into the complexity. Sometimes you find that the "stupid" solution is good enough.

100% true.

People love to dig at Test Driven Development, but it solves a common problem and is great for junior developers because it has 3 important rules.

1. Understand your requirements. And not in a wishy-washy hand-wavey way. But in an explicit, expressed as a single test verifiable/falsifiable requirement.

2. Implement the simplest solution that meets your requirements. Don't over-engineer anything, don't chase the latest fad, don't sleeve solve a way more complicated generic problem that you think we'll hit later, because you don't have enough experience to know how likely we are to hit it and the costs to make that tradeoff.

3. Keep you codebase clean and well factored. Don't let cruft and hacks build up.

Ignoring TDD, any junior engineer that can consistently exhibit those three behaviors is almost by no longer a junior engineer. Those are hard things to learn as an early coder.

Yes as you become mid-level and senior you should be more independent and break the above often - but at that point you have good foundations and the experience to make the tradeoffs to know when to deviate and by how much.

TDD is a very effective method for solving a problem that otherwise often takes a while to solve. Developing good fundamentals.

Re:Software development is a loser’s game by pdimitar on Friday April 02, 2021 @04:33PM (#26675665)
> 3. Keep you codebase clean and well factored. Don't let cruft and hacks build up.

I feel obliged to mention that this very often goes against "do the stupidest thing that will work".

Most of the time in my career a clean codebase has naturally led to an intelligent solution which is definitely not the stupidest thing that will work.

Finally, it's also often the case that stupid code requires exorbitant amounts of comments or documentation, undermining the notion of it being simple to extend (which many conflate with the original premise). A little bit more intelligent code is usually self-describing.

Re:Software development is a loser’s game by ryandrake on Thursday April 01, 2021 @12:50PM (#26662972)
I wonder if there is something going wrong in the software engineering education pipeline that is encouraging developers to always keep reaching for the most complex tool in the toolbox rather than the simplest. We all see this all the time, so the problem is widespread. Maybe it’s not education but career growth: It sounds like “resume-driven development” where people are incentivized to add complex tools to their toolbox merely so they can get hired at places that select for complex tool use.
Re:Software development is a loser’s game by anaerobicover on Thursday April 01, 2021 @01:03PM (#26663199)
I think it's just inherent in the personality types that are successful at software. We are good at understandinging complex things, and we like it; it makes us feel good to master them, and creating one is a special variety of mastery, so we incline towards that.

I think it also takes experience to see that simple solutions can be more robust; the more natural response to foreseeing future problems (another trait) is to have specific responses for all of them, which generates a complex result.

Re:Software development is a loser’s game by justin_oaks on Thursday April 01, 2021 @01:28PM (#26663574)
Sometimes people haven't been exposed to different ways to solve problems, so they reach for the first thing that comes to mind. Sometimes the never learn to consider multiple solutions and weigh their costs and benefits.

I once had a boss who still coded, even though all the developers begged him to stop. His code was spaghetti, but worse was his inability to come up with more than one solution to a problem. If the first solution he came up with was complicated and error-prone then that's the one he proceeded with.

Re:Software development is a loser’s game by BlargMcLarg on Thursday April 01, 2021 @01:04PM (#26663204)
I hear this often, and I see many on HN be in favor of this narrative, but I have the opposite experience. Its often the cargo-culting companies pushing these soft requirements onto education, as students and companies will otherwise complain about not being employable / finding starters who reach their expectations respectively. Most of the time, I see seniors reach for overly complicated solutions, when much simpler solutions exist. Which later falls apart when errors happen silently and simple ideologies like "single truth" are ignored for no particularly good reason, leading to massive duplicate code and gotchas.

At this point, I'm extremely unconvinced the problem is just education or juniority/seniority. The "paper factory" is just doing what companies are demanding. The real problem is a general lack of competence being used to market products, be they good when used properly (e.g. GoF, where many readers only look at design patterns and completely forget "composition over inheritance"), or snake oil.

Re:Software development is a loser’s game by pdimitar on Friday April 02, 2021 @04:35PM (#26675686)
In my experience the most common cause for this phenomena is that the devs are afraid they won't be employable if they don't utilize those fads or, as you very correctly summarized it: resume-driven development.
Re:Software development is a loser’s game by tsimionescu on Thursday April 01, 2021 @12:32PM (#26662705)
I think it's important to note here that you need to start your thinking or design from the simplest possible solution, but that doesn't mean it always makes sense to actually implememt that solution.
Re:Software development is a loser’s game by justin_oaks on Thursday April 01, 2021 @01:03PM (#26663197)
Agreed. That's why I advise to start simple/stupid, not necessarily deploy the stupid solution. It's a direct response to those who start out with crazy-complicated schemes in mind.
Re:Software development is a loser’s game by terracatta on Thursday April 01, 2021 @11:38AM (#26661848)
This is the type of practical experienced based advice that was missing from the original post.

I completely agree with you.

Re:Software development is a loser’s game by LMYahooTFY on Thursday April 01, 2021 @12:42PM (#26662840)
>If they just focused on getting it over the net as simply as possible, the end result usually means less code that's easier to understand.

I'm sure there's some range of nuance to your point, but it's also in line with the iterative philosophy isn't it? Do you find patching/revising things later to skew better/worse or some other downstream consequences?

It seems like you find that approach more efficient overall?

Re:Software development is a loser’s game by david38 on Friday April 02, 2021 @12:38AM (#26669054)
This is a fault of the team culture if it allows junior devs to do that.

The whole point of design reviews, code reviews, senior devs, and more is to ensure that stuff that doesn’t work or can’t be maintained doesn’t get deployed.

Re:Software development is a loser’s game by pdimitar on Friday April 02, 2021 @06:20PM (#26676562)
> ensure that stuff that doesn’t work or can’t be maintained doesn’t get deployed.

That part (especially the second: maintenance) is endlessly contested in calls until some of us just give up and let the others reinvent the wheel for themselves because they don't listen to experience.

Re:Software development is a loser’s game by protonimitate on Thursday April 01, 2021 @11:01AM (#26661292)
Agreed - this article reads like a "get good" message to "amateurs". Which, sure, you should be striving for constant improvement - but if you work in an environment where sloppy/quick work is incentivized I would argue it's the responsibility of the "professional" to push back and set up an environment for success.

Blaming all your issues on more junior members of the team is a huge red flag, and this article doesn't really offer any insight into how to bridge the gap between "amateur" and "professional" (which, imo, falls on the senior members of the team).

Re:Software development is a loser’s game by hoskinator on Thursday April 01, 2021 @11:14AM (#26661463)
I agree junior members should be helped. Lots of developers have a cowboy approach but they aren't junior.

Senior members should set and enforce the standards via best practices, code reviews and setting the definition of done e.g. unit tests, data, deployable etc

Re:Software development is a loser’s game by slowwriter on Thursday April 01, 2021 @11:11AM (#26661418)
I feel like it’s the word ‘goal’ that makes one stumble here. I agree that he is not really describing the ‘goal’ of software development. He’s describing how to succeed at software development in order to reach a larger goal.

And although it took me a while to understand what the author is getting at, I do kind of see his point which in my mind could be summarized as: slow and steady wins the race. Or: In order to speed up (in the long run), slow down (in the short term). Be conservative, be thorough, understand that developer productivity isn’t about that LOC per x unit of time.

One analogy that comes to mind for me is Formula 1. Sure, it would be faster, right now, to just not pit. You would have to drive into the pit, stop and wait for the tyres to be changed and drive out again. Meanwhile your opponents are zooming past you out on the track. But if you don’t pit, soon enough your tyres will be worn down and it becomes impossible to keep heat and performance in them, and after a while longer you might even have to stop completely due to a puncture.

The ‘pitstop’ could be anything that ensures productivity in the long term and as such helps in reaching the final goal, and those are the things that take a professional to understand the importance of.

Re:Software development is a loser’s game by potatoz2 on Thursday April 01, 2021 @12:01PM (#26662243)
I didn't read the article the same way. I think we're all, in a certain way, amateurs, at least in some cases: when we're rushed, stressed, distracted, or all three. As a project accumulates people working on it and, crucially, as existing code is modified and added to, the probability that you'll introduce a bug approaches 1.

I think the article is saying we should focus on tooling that makes natural human errors less likely, instead of trying to focus on writing more code: in other words, write less code, ship it once without errors, instead of writing more code and having to go through the dev to prod feedback loop repeatedly. The tooling that helps you do that are DevOps practices, testing (and testability), simpler/more conservative design, and some time spent thinking about how to construct the software (or reconstruct it, when modifications are needed).

Re:Software development is a loser’s game by duxup on Thursday April 01, 2021 @11:06AM (#26661356)
I always read these and wonder "So uh, did you go and talk to the guy and help him out?"

Now maybe they did and the other person refuses to listen (not common in my experience), but I always wonder... you can't just make up 'rules' and expect folks to magically write good code because they followed a rule.

Re:Software development is a loser’s game by eithed on Thursday April 01, 2021 @11:15AM (#26661471)
I understand where you're coming from, but I'd read it as writing code that will behave the way it's anticipated without any gotchas - merely writing code that works in a specific scenario shouldn't be the goal. Additional benefit would be to write code that easily extendable, but that's not mentioned here.
Re:Software development is a loser’s game by 908B64B197 on Thursday April 01, 2021 @01:01PM (#26663156)
> Feels like this person is very frustrated with novice engineers writing buggy code and has assumed a gatekeeper role to protect the integrity of the codebases in which he holds responsibility.

I wonder what his recruitment pipeline looks like where 80% of engineers end up not being productive.

Sounds like he's hiring wrong to begin with.

Re:Software development is a loser’s game by varispeed on Thursday April 01, 2021 @11:43AM (#26661929)
What is the alternative? If you let shoddy code in, it is difficult to get rid of and it may become a foundation for even shoddier one (if you let that in, then why you won't let this in).
Re:Software development is a loser’s game by eplanit on Thursday April 01, 2021 @11:16AM (#26661495)
Did Deepak Chopra write the article? It's like "when you're nowhere you're 'now here'". It seems so clever... at first.
Re:Software development is a loser’s game by commandlinefan on Thursday April 01, 2021 @11:21AM (#26661575)
> The goal of software development is to create software in support of some greater mission

If that's the goal - the only goal - then all code is equal, and it doesn't matter how it's written. So... go crazy? Use global variables and goto statements? Hardcode path names and don't bother with build scripts? Writing software that works is challenging, but writing software that can be safely modified is even more so.

Re:Software development is a loser’s game by Raidion on Thursday April 01, 2021 @11:29AM (#26661702)
I mean, if the only requirement is "have software that works", yea, go nuts. Look at a ton of tech demos, working is the goa the goal, the code sucks, it's fine, it's gonna be rewritten anyway.

Practically the requirements are "have software that works, and will be sustainably developed and improved for 5 years". Making the trade offs in terms of "perfect code" to "good enough code" is what makes a software developer (in most settings) go from "good" to "great". Good software engineers can see all the edge cases and future paths. Great software engineers can prioritize those against business goals.

Just like "global variables and goto statements" is bad, so is "perfect, provably correct, and overtested" code in the vast majority of business settings.

Re:Software development is a loser’s game by NortySpock on Thursday April 01, 2021 @11:24AM (#26661616)
Right, but in most cases, supporting a greater mission is a marathon, not a sprint, so bad code in an early version is very painful later, and detracts from the long term mission.

You gotta think long term (usually)