News for hackers. Stuff that matters.
Re:What Programming a Game in 48 Hours Taught Me About Progr... by zeteo on Wednesday August 28, 2013 @07:16PM (#6293269)
>if I could transfer the pace of production from Ludum Dare into my normal work, I would complete a game like House of Shadows in less than 2 months

While the article lists many plausible reasons why the pace of work turned out to be faster on the shorter project, there is also one that is not mentioned but perhaps the most important: complexity doesn't scale linearly. It's always faster to write the first 1000 lines of code from scratch than to add 1000 lines to a project that is quite large already, mostly because each newly added component has a growing chance to interact with an ever increasing number of older components.

Re:What Programming a Game in 48 Hours Taught Me About Progr... by antimagic on Thursday August 29, 2013 @03:47AM (#6294738)
Another big difference is that at Ludum Dare, the programmer is also the product manager - is that feature going to take too long to implement? Well, good news, you don't have to write a report to the product manager explaining why it's going to take too long to implement and suggest three alternatives. No, you just identify the problem, pick an alternative that achieves the overarching aim in a different manner, and implement it.

This effect is particularly insidious, because often the long slow complicated thing that the product manager wants is just the sort of interesting challenge that developers enjoy. They don't point out to the product manager that there is a simpler solution, because that would take away the shiny toy. LD does not have this problem because the developer knows that she can't allow herself to go off on a 3 week exploration of compiler theory, because otherwise her product won't be ready in time.

Re:What Programming a Game in 48 Hours Taught Me About Progr... by adcoelho on Thursday August 29, 2013 @06:52AM (#6295175)
From my experience those slow complicated things are often avoided by developers even if it would allow them to delve further in some obscure interesting programming. The programmer's performance is also measured by their ability to achieve the goals within the defined deadlines and accepting a task just because it's interesting even if it means a big delay is not very common. At least in my working environment which is very deadline driven(as I assume most are).

But I am not dismissing your argument on the delay imposed by the extra layer between the project manager and the developer, specially if they have no programming experience.

Re:What Programming a Game in 48 Hours Taught Me About Progr... by benjamincburns on Thursday August 29, 2013 @09:21AM (#6295637)
Sorry in advance for this; I think I put my pedant pants on this morning by mistake.

I agree that complexity doesn't scale linearly. That's a very insightful thing to note. However, the fact that LOC correlates with "probability of a change causing unintended consequences" in many codebases is coincidental rather than causal. The underlying cause of the unintended consequences is almost always poor structure and/or poor planning.

Two words: cohesion and coupling.

Highly cohesive systems which are loosely coupled are far easier to extend and modify without fear of weird and unintended "spooky action at a distance" interactions.

Re:What Programming a Game in 48 Hours Taught Me About Progr... by zeteo on Thursday August 29, 2013 @11:11AM (#6296229)
Beyond Aylw's very good point that loose coupling demands its own share of effort, I'd also like to add that it only delays the inevitable. Even if you manage to organize your modules in a perfect, non-leaking tree and to only reference bug-free, well-documented external libraries, you still have two fundamental problems:

1. Each module necessarily has access to functionality provided by all its "ancestors". In the best case, this number still grows logarithmically with project size, and accordingly the difficulty of adding or modifying code in a "leaf" module.

2. New libraries and language features are generally seen as a neverending bonanza. But before you can effectively modify a module you need to understand how it currently works, which necessarily involves understanding the external tools used in it (quirks and all). As the variety of these external tools increases with code size (at quite possibly a super-linear rate), the complexity of working with any given module deepens accordingly.

The Holy Grail of software development would of course be perfect layering: each layer completely masks its predecessor, and is no more complex. Someone who achieved it could indefinitely roll off as much useful code on day 500+ as they did on day 1. But I'm not aware of any practice or methodology that dares to even remotely promise such utopian benefits.

Re:What Programming a Game in 48 Hours Taught Me About Progr... by benjamincburns on Thursday August 29, 2013 @01:22PM (#6297100)
Again, I was being pedantic. I should really work on that.

I didn't explain clearly enough that I agree with your assessment that as a codebase grows the effort involved in maintaining/adding to/modifying it grows as well. However I disagreed with what you said was the main reason for this. I think that your "main reason" is definitely a contributing factor, but it's too complex to be boiled down like that.

I also agree that maintaining a properly structured project definitely takes considerable effort. Further I'd argue that when this is done well the effort is largely front-loaded. This means that as the program matures, the effort required to implement new features of a given complexity will largely taper off. I believe this is the best-case logarithmic growth you're talking about.

Obviously worse cases would be linear, quadratic, and so-on. I view the differences between these curves as essentially the amortized value gained by doing this kind of front-loaded architectural work. If you get it perfect, you gain the difference between log(n) and perhaps some kⁿ, depending on project size/scope.

Speaking of scope, this ideal is only achievable where project scope is relatively well defined and relatively static throughout the life of the project. Sure, you can make a spam filter play chess, but, well, you get the idea...

And yes, leaky abstractions, complicated tools, all of that definitely contributes in horribly awful, ugly, hard-to-predict ways. If you care to read my thoughts on this topic in particular, I think I summed them up nicely in my reply to this comment [1] on the short-lived topic "Why I hate Frameworks."

Boiling all of this down, I think all I'm really getting at is that complexity drives effort, but there are ways of minimizing the complexity of large codebases. Sure external forces often make this minimization effort obnoxiously difficult, but it's still possible. While we might disagree on what "often" really means in the prior sentence, I think otherwise we're wholly on the same page.

Anyway, I'll try to go change my pants...

1: https://news.ycombinator.com/item?id=6284038

Re:What Programming a Game in 48 Hours Taught Me About Progr... by Aylw on Thursday August 29, 2013 @09:50AM (#6295789)
While this is true, keeping a large project from getting ... err, decohesed and coupled, takes a lot of time as well. You will have less lines of code, but you'll definitely spend a lot more time than that first 1000 lines on a large project.
Re:What Programming a Game in 48 Hours Taught Me About Progr... by ha-ha-ha on Wednesday August 28, 2013 @08:24PM (#6293547)
Hah, very interesting.

On the other hand companies generally put their very best developers on new products and features - i.e. writing those first 1000 lines. While the mediocre devs get to extend and maintain those products/features, by copy paste or what got you.

Re:What Programming a Game in 48 Hours Taught Me About Progr... by mapleoin on Thursday August 29, 2013 @03:58AM (#6294766)
That's because those first 1000 lines of code contain the project architecture and style which will heavily influence the next 10000 lines.
Re:What Programming a Game in 48 Hours Taught Me About Progr... by leokun on Thursday August 29, 2013 @01:08AM (#6294375)
I have never heard of a place where "mediocre devs" get siloed off as a normal way of operating a business. If you have under-performing engineers you should change your hiring and think about mentoring or exits for those you have already.
Re:What Programming a Game in 48 Hours Taught Me About Progr... by fournm on Thursday August 29, 2013 @05:22AM (#6294978)
It's more common in enterprise-y settings, since you don't have to pay them as much. Hire a few senior people to do the heavy lifting and stick all the maintenance programming stuff on the others.
Re:What Programming a Game in 48 Hours Taught Me About Progr... by leokun on Thursday August 29, 2013 @01:44PM (#6297261)
Do they know they are considered mediocre? I think I might change my career if I ended up like that.
Re:What Programming a Game in 48 Hours Taught Me About Progr... by chii on Thursday August 29, 2013 @01:01AM (#6294357)
that's because its more fun to work on that new 1000 lines, vs having to dredge thru old code to add the 1000 lines.