Live data from Hacker News

Organizing complexity is the most important skill in software development

johndcook.com

71–80 of 286 posts

Re: Organizing complexity is the most important skill in software development

#71
I agree that most complexity in software systems comes from managing state. So here is a simple solution - stop doing it. Stop managing state.

Use the right tools for the job. Most mainstream programming languages are ridiculously inadequate for building any production software of any significant complexity without introducing more problems than you are trying to solve.

Use a mature functional programming language that works with immutable data and is designed for building complex industrial systems.

Use a language that was designed from the beginning with the understanding that your software WILL be full of bugs and errors, yet systems must always continue to run.

Use Erlang.

Re: Organizing complexity is the most important skill in software development

#72

I agree that it is an important skill in engineering to recognize when the complexity got too high - At that point you need to take a step back (or several steps back) and find a different path to the solution - Sometimes that means throwing away large amounts of code. It's about acknowledging (and correcting) small mistakes to make sure that they don't pile up into a giant, disastrous one. Another thing I learned is…

I agree. I like to remember that I'm passing code into the future where I might not be working on it anymore. Clear, well named code helps the next developer far more than an obtuse algorithm that smashes all logic into a single line.

Almost always this is true. But mature code has been iterated over, and some critical places the code has been optimized out of clarity. Nothing helps then but a document - comments are just not enough to explain the crooked road that lead straight to that solution.

Re: Organizing complexity is the most important skill in software development

#73

No part of a system is the most important part, from a car to a huge organization, all parts are equally required to interact and hence make such system 'work'. Having a clear functional organization at the start (and respect it throughout development) is very important, but after that is equally important to code clean and efficient code, to test, to debug, etc. Then, going up and dow on the solution stack is import…

Okay, if you need to be so detailed you also have to argue keep in mind that some parts are more important than others. Example with the car: If you leave out the head-rest you might sell your car for a few bucks less or have a harder time to get a customer (low importance), but if you have a car without some kind of motor you don't even have a car (high importance).

While there are many things that are important they all have different priorities, though.

All that said I'm also very sceptical that there is one thing you can learn and then you are a the best programmer. You have to learn thousands of things. And sometimes learning a currently low priority thing now might save you hundreds of hours of pain further down the road. So it's really hard to say what you have to learn.

Re: Organizing complexity is the most important skill in software development

#74

Arguably, this is what higher level languages like Java and C++ provide. Tight organizational language metaphors that help implement design patterns in a thoughtful, consistently structured manner.

The abstractions provided by Java and C++ aren't very good compared to those provided by, say, Haskell and Clojure.

For the most part, design patterns exist merely to fix the lack of a simpler lambda construct in the language. They more often than not add complexity rather than remove it.

The biggest balls of spaghetti code I've ever seen we're always OOP with design patterns. I've seen far more clean C codebases than Java or C++ ones.

Re: Organizing complexity is the most important skill in software development

#75
post #71

I agree that most complexity in software systems comes from managing state. So here is a simple solution - stop doing it. Stop managing state. Use the right tools for the job. Most mainstream programming languages are ridiculously inadequate for building any production software of any significant complexity without introducing more problems than you are trying to solve. Use a mature functional programming language th…

Here we go again with the "functional programming will solve all your problems" thing. It won't. Every language has it's inadequacies.

Re: Organizing complexity is the most important skill in software development

#76
post #49

the number one most important skill is how to keep a tangle of features from collapsing under the weight of its own complexity Agreed. very rarely is there some tricky data structure or algorithm that casts a looming shadow over everything else Agreed, BUT... In order to organize, sooner or later, you will have to get clever (with tricky data structures or algorithms). How I have always built something big and/or com…

Clever and magic are very often bad.

In ideal code, functionality and all paths of execution flow should be as visible as possible and easy to reason about.

Unnecessary abstraction should be avoided.

Naming should be consistent and sufficiently descriptive.

Re: Organizing complexity is the most important skill in software development

#77

This is incredibly true. I once turned 60kLoC of classic ASP in VBScript into about 20kLoC of python/django including templates. And added a bunch of features that would have been impossible on the old code-base. It turned the job from hellish (features were impossible to add) to very nearly boring (there wasn't much to do anymore). So with this newfound freedom I built some machines to automate the data entry and on…

I got fired from a job because I had done this and they couldn't figure out how to keep me billable after that. Well, I got fired because I would "show up late" and "leave early" because there was nothing else for me to do (even though I was actually pulling a full 40 hours, they were expecting 60 out of people). They could have given me more work, put me on new projects, etc., like I kept asking to be done, but inst…

Great takeaway. Debt tends to make 'good little workers'. Stay free my friends!

Re: Organizing complexity is the most important skill in software development

#79
post #28

This is incredibly true. I once turned 60kLoC of classic ASP in VBScript into about 20kLoC of python/django including templates. And added a bunch of features that would have been impossible on the old code-base. It turned the job from hellish (features were impossible to add) to very nearly boring (there wasn't much to do anymore). So with this newfound freedom I built some machines to automate the data entry and on…

> Sadly there's (seemingly) no way to interview people for this ability In a recent interview, I spent 45 minutes pairing with a current employee. Our goal was to take a (contrived) piece of legacy code, clean it up, and add a new feature to it. I imagine it was a very telling experience for them, and I feel it was more useful than the whiteboarding we'd done before. Hopefully we as an industry will keep iterating on…

Yeah, that is cool and lets you get a hand on the job and a feel for what you'd be working on, but it makes me a little wary. Doing work for some employer without getting paid is a red flag. It's not a total klaxon blaring, but it does raise eyebrows.
Post reply on HN