Live data from Hacker News

Organizing complexity is the most important skill in software development

johndcook.com

161–170 of 286 posts

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

#161

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…

> Another thing I learned is that dumb, explicit code is highly desirable I knew for a long time that "dumb" code was easier to reason about, but it wasn't until I started looking at compiler output and profiling my code that I realized being "clever" in the source text really didn't matter. Now I'm quite happy to write code in the most straightforward fashion, rather than foolishly "compress" things. I imagine the s…

There are definitely exceptions to this (generally correct) rule, in situations where performance does matter. RAM is still incredibly slow compared to the CPU caches, so painstaking cache-optimization can make a huge difference when that's the bottleneck.

Of course, if you're just writing some I/O bound program anyway, it hardly matters.

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

#163

Earlier quoted context omitted.

In my case, it's the "lot of work" issue that is the problem. It's really easy for me to ignore the work I don't understand very well (marketing) or don't enjoy very much (which is largely a function of not understanding very well) for raw programming. I have a couple of friends doing a startup in the same space in which I'm writing some software, and their software is nowhere near as far along as mine, yet I don't h…

Why don't you join forces with your friends? If your tech is as far advanced as their business development, it sounds like you could join as an equal founder.

Well, they're pretty sold into their idea (which doesn't interest me) and they have one or two other people involved (so I'd be coming in as an outsider anyway). I've met their developer once and he seemed like a nice guy, though very inexperienced (not to speak ill, he's just young). So basically, they have a team together and I don't want to break them up, before their time, if that time should ever come.

Some of it is selfishness on my part, too. I want as much ownership and control as I can keep, and I want it to be on my ideas. I've tried working on other people's ideas before and it just doesn't move me. I have a pretty clear vision of where I want to go, both tech and business. I guess I'd rather keep going slow right now than get side-tracked working on someone else's ideas.

If their current project ever tanks, they might be interested in coming on board with me. I think we're both just trying to see where everything we're currently working on is going.

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

#164

I like this little article a lot. Personally, I try to write code in a way that reads like a book. Lots of comments, explicit function names, explicit variable names, object names, class names, ect. Talking about languages higher level than C/assembly here obviously. I am amazed at all the code I see that has terrible/too generic names for functions and variables and objects. Some people get so obsessed over short fu…

Totally agree on variable/function names, but for some reason I love complicated one liners. I know its wrong, but its my way of measuring how smart I really am(even though its not).

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

#165
post #41

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 I think there is. Show the candidate some bad code. Not WTF code, but something you wouldn't be proud of but is realistic. Bonus points if you're comfortable enough to pull this out of your own production system. Ask the candidate about adding some functionality, but be clear that cleanup and refactoring changes are fine (even encouraged). The co…

And then -- and this is important -- actually follow through on allowing and encouraging refactoring, as indicated in the interviews, instead of insisting on "features first, features fast" in practice.

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

#166
post #2

Organization is the hardest part for me personally in getting better as a developer. How to build a structure that is easy to change and extend. Any tips where to find good books or online sources?

>> How to build a structure that is easy to change and extend.

This is a very good book on subject, very clear:

http://www.amazon.com/Practical-Object-Oriented-Design-Ruby-...

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

#167

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 tha…

I would be hesitant of this so easily accepting this view due to selection bias.

Java and C++ are often found in huge, legacy, or enterprise oriented code bases.

The are plenty of ways to use the abstractions in Java and C++ to write nice code. Just like it is possible to find a Scala or Clojure code base that went crazy with the usage of "cutting edge" features and abstractions in those languages.

And at least with Java, your IDE will always be able to navigate the code effectively.

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

#168
post #55
post #41

Earlier quoted context omitted.

> Sadly there's (seemingly) no way to interview people for this ability I think there is. Show the candidate some bad code. Not WTF code, but something you wouldn't be proud of but is realistic. Bonus points if you're comfortable enough to pull this out of your own production system. Ask the candidate about adding some functionality, but be clear that cleanup and refactoring changes are fine (even encouraged). The co…

This happened to me once. I went for an an interview at a huge real estate company. They had a chat with me for exactly five minutes, then gave me a computer (an old one, with keyboard not working properly) and some legacy code. I wasn't asked to fix it, but I was asked to make a small change and given half hour for it. That code had no documentation and no comments. Then 5 more mins to explain what I understood abou…

> gave me a computer (an old one, with keyboard not working properly)

What I like most about this is how close to reality their interview model is. Less than stellar equipment, legacy code, and a maintenance task... just a normal Monday.

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

#169
post #55

Earlier quoted context omitted.

This happened to me once. I went for an an interview at a huge real estate company. They had a chat with me for exactly five minutes, then gave me a computer (an old one, with keyboard not working properly) and some legacy code. I wasn't asked to fix it, but I was asked to make a small change and given half hour for it. That code had no documentation and no comments. Then 5 more mins to explain what I understood abou…

How'd you do it if the keyboard wasn't working?

They changed the keyboard twice :p

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

#170
post #99

Earlier quoted context omitted.

Compilers aren't real-time, distributed, multi-user, ... basically anything that is hard from a software engineering perspective which includes deployment and testing. Compilers have reproducible test cases (if they don't, that is a bug in itself). You can catch regressions in a compiler with an automated test suite, and bisect their version history to see where it was introduced. Bug reports from the field tend to b…

Agreed. Nowadays, writing the runtime environment including a concurrent garbage collector is more complicated than writing the compiler.

When you say concurrent, do you mean "works with threads" or "doesn't pause"?
Post reply on HN