News for hackers. Stuff that matters.
Re:Dwarf Fortress Development by db48x on Tuesday June 28, 2016 @11:55PM (#11999393)
Actually, he's done that in the past. He let some folks from the DF forums have part of the source code, specifically the part which uses OpenGL to draw the graphics. They were able to improve it so that it was much more efficient, and so that it could use TrueType fonts. The results were quite successful, in that the graphics now take up much less of the game's time, and TrueType fonts can make the game much more approachable.

On the other hand, Tarn has said that he now no longer understands this part of the code. If he ever needs to modify it he'll either have to learn how it works from scratch, or farm the work out to the community again. Since he has no desire to become a project manager, he's unlikely to do the latter.

Also, the game isn't completely closed-source; it uses SDL, libpng, zlib, etc.

Interestingly enough, this hasn't really stopped people from improving on DF after the fact. Just take a look at the dfhack and Text will be Text projects, for instance.

Re:Dwarf Fortress Development by aeontech on Wednesday June 29, 2016 @01:41AM (#11999721)

  On the other hand, Tarn has said that he now no longer understands this part of the code. If he ever needs to modify it he'll either have to learn how it works from scratch, or farm the work out to the community again.
Reasonable, but that's when, surprise, revision history is pretty useful in figuring out what the changes are and why they were made :)
Re:Dwarf Fortress Development by db48x on Wednesday June 29, 2016 @02:00AM (#11999786)
In theory yes, but in practice I've rarely been satisfied with the 'why' of a change unless I was able to talk to the author about it. Everyone seems to leave these things out of commit messages, because they seem so obvious at the time. Bug trackers are often better for this than version control.
Re:Dwarf Fortress Development by rkangel on Wednesday June 29, 2016 @09:08AM (#12001372)
This is something that I hammer into newer members of my team (mostly about code comments rather than commit messages):

The comment that tells you what happened is merely saving you some time parsing the code. The comment telling you why it's done like that is completely irreplaceable.

Re:Dwarf Fortress Development by noxToken on Wednesday June 29, 2016 @09:46AM (#12001573)
It has earned me the Stickler moniker, and I'm absolutely alright with this. They've never had the displeasure of refactoring code from 3 years prior where the function's name is getIpAddress(), but it does 6 additional things within the method. The docs says, "Gets the IP address". The commit message says, "gets user's IP address". The function really gets the IP address, does some weird encoding (of which I'm still not sure why), does some other stuff with the request headers, then returns the IP.

Documentation saves lives, people.

Re:Dwarf Fortress Development by retro64 on Wednesday June 29, 2016 @11:48AM (#12002443)
You may want to also consider refactoring this code. A function should do what it says, not have unexpected side effects.

Not only can this be surprising to a client, but it also makes it difficult to leverage the code for reuse elsewhere ("I only wanted the IP address, not the rest, guess I'll write one called getIpAddressOnly", etc).

Functions like this also tend to become muddled and difficult to maintain because as time marches forward, functionality may need to be added between these side effects, and again, unless it is refactored, it has to end up within the same function, making the whole problem even worse.

Re:Dwarf Fortress Development by rkangel on Wednesday June 29, 2016 @10:10AM (#12001715)
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live"
Re:Dwarf Fortress Development by stefs on Wednesday June 29, 2016 @10:52AM (#12001988)
the best thing in life (almost better than hearing the lamentation of their women) is when there's a good explanation WHY it's done like that and later someone changes the code while not updating the WHY (writing documentation is for people who don't get things done).
Re:Dwarf Fortress Development by yitchelle on Wednesday June 29, 2016 @04:46AM (#12000305)
Agreed. I guess that he is not practicing basic software engineering. Developing code is not just updating code and then check it into version control with a helpful comment. They should be some documentation for the "what, how, who, why" answers.
Re:Dwarf Fortress Development by sevensor on Wednesday June 29, 2016 @09:18AM (#12001422)
I sympathise with this point of view, but I think it misunderstands what Tarn is doing. DF is a weird (also fun and deeply rewarding) piece of outsider art. Source code is his medium, but expecting him to apply professional software engineering practices is like expecting Andy Warhol to use the same process as Campbell's when making the label for a soup can.
Re:Dwarf Fortress Development by aeontech on Wednesday June 29, 2016 @01:49PM (#12003285)
That's a really great way to look at it, thank you :)
Re:Dwarf Fortress Development by ajuc on Wednesday June 29, 2016 @05:28AM (#12000433)
Commit messages with a link to the bug tracker and some short description are the best IMHO.