Dwarf Fortress' creator on how he's 42% towards simulating existence
pcgamer.com
pcgamer.com
I don’t even use version control. If you don’t know what that is then you’re not gonna yell at me. If you even know what version control is you’re gonna be like, ‘You don’t use version control? You don’t use source control? What is wrong with you? How can you even work?’
If you're the sole developer of a project and you have, say, hourly backups, then maybe version control is a waste of effort? I would still use it out of habit, but it seems perfectly reasonable to me that Tarn would choose not to.
But I really hope he's got automatic, offsite backups going.
Same goes for Terry A. Davis.
VC is part of code. Not using it is, to me, like refusing to use verbs.
If you see SCM as too time consuming, then I think you need more practise, and as such, should be using as much as you can.
In some cases these can be very simple, and the simplest cases I can think of are: version control - backups, build system - batch/script file, issue tracker - text file.
Although once you know one of the more complex versions of each system then it's easier to just use that. (Git/SVN/CVS, make/CMake/Premake, etc)
We play Dwarf fortress; Tarn is playing the meta game.
Lot's of programmers are creatures of habit. It probably is faster for him to work without version control. Until that one day when it isn't and he wishes he was.
Eh? I don't buy RI because
* I can cover the replacement cost of everything covered by pretty much every RI policy I've ever seen
* Over the decades I've been living on my own, I've never had a situation where any RI policy would kick in
Therefore, RI policies are nothing but money set ablaze for me. I'd rather make use of that money.
Yes. That's why I said that I could cover the replacement cost of everything. :)
My real loss would be the data that doesn't have offsite backups. I'm unaware of any RI policy that will cover highly-competent data recovery services. (And if one exists, I expect that it will be outrageously expensive.)
That's fairly expected. Given my current RI cost and how much it covers, they're losing money if I make a significant claim more than every 200 years or so.
Renters caps at 300k and they added that cap becuase you can easily reach that level of damage. Still it's 10$ a month so the odds of that happening are rather low.
Sorry, but can I just check, are you saying this is the alternative as in you SHOULD do this, or are you saying this is the alternative as in you SHOULD NOT do this?
It's just the way you wrote it sounds like you're saying this is the recommended way of developing, which I'm sure is not what you meant.
Also, is winmerge available in .deb/.rpm?
The approach is an alternative, as in: you can do it. I used to work that way before I used version control, and I know I'm not the only one. I definitely prefer the workflow with version control, that's for sure, but some seem not to find it especially compelling when working alone and that is their prerogative.
When you're working on your own, any process is fine, if you are comfortable with it. The object of the exercise is to create useful/interesting/etc. products for people to use/enjoy/etc. - and you'd have a hard time arguing that this is a goal Dwarf Fortress has failed to meet.
(Unsurprisingly, I've yet to meet anybody that's preferred working without source control on shared code. But perhaps they do exist.)
Strong disagree. If you're working on things that are sufficiently complex, you'll not-infrequently find yourself in a situation where the thing you were working on has become broken, and you can't remember how or when it broke.
Single-dev version control lets you make frequent checkpoints so that you can compare the current state to a previous one to discover the source of and quickly recover from failures of the mind such as these.
My git history is littered with one or three word commit messages. If I ever go to publish my code (or finish with what I was doing) then I rebase all that shit into a coherent history. But, until that point I don't spend even a microsecond worrying about attaching meaningful messages to my checkpoint commits.
But to fix an accident? That's what ~5-min ZFS snapshots are for.
At university the lab systems had a networked home directory setup, and one of the greatest things was a '/yesterday/' link to your personal homedir, exactly as it was 1 day ago.
I have no idea how they set it up, but something along these lines is plausible.
git log --patch
to look at your history, combined with git checkout $COMMIT
to get the code to perform any tests required? (Or, if you have a reliable automated test, git bisect start HEAD $KNOWN_GOOD_COMMIT -- && git bisect run $TEST
will automatically find the error for you.) [0][1]And remember that the git checkpoint creation process is -at its most verbose- running
git commit -m "C"
[0] You can use points-in-time as commit references, like 'master@{30 minutes ago}' or 'HEAD@{2016-01-01}'[1] And even if you don't have a test, you can easily manually run the bisect machinery.
And of course with even one other developer working on the same code base I'd say VC is practically mandatory.
If and only if you're a solo developer working on a single computer and work on a pretty linear, one feature at a time development.
And if you're a solo dev, you won't need to "waste" a lot of time in version control anyway. All you need is "git init", "git add" and "git commit" and you're already better off than without. Anything on top of that is optional but useful.
I would recommend learning git for anyone. Sure, it's a big hassle, because it forces you to rethink your habits. But in the end, learning it has done me nothing but good and using it enforces me to follow good practice at the same time.
Also, just the support of 'git stash' to throw away experiments that didn't work easily is worth it. Tagging versions for release, demos, whatever .. git can help there too.
It doesn't. Nothing prevents you from adding/committing several days worth of work with a "changed stuff. fixed some other stuff" commit message.
If people have good reasons for not doing certain things, then fine, but when people are just averse to it because they're lazy, well, that irks me (when I have to deal with them.)
I didn't speak up about it because I was only a contractor at the time, but it made me wince to see a whole history list of his commits with like 20 "latest and greatest" and maybe three commits that actually said what he did.
But most places I've been to, people have been pretty good about explaining what they've committed, when version control was being used.
git log --pretty=oneline --abbrev-commit --graph --stat
Seeing the names of the changed files in each commit gives me a lot more of context than simply the commit description.
At my current job we have dev tasks associated with the changesets (if applicable), so that helps provide context also.
What it is:
git commit -am '(what changed)'
Effortless combination of history, backup, and publishing. There’s very little reason not to do it. Up to preference how often it’s done and how detailed messages are.My 'backups' may as well be a cronned:
git add . && git commit -m "Daily snapshot" && git push
Ta-da! You are now 'using' source control.This or any other automatic backup solution has a big problem though: if the backup happens while you have a syntax error or something in your code then your test suite will fail and any bisect type functionality you have will be useless.
You waste more time picking your nose.
If you save a copy of your code each day, you are using version control - just an ad-hoc, error-prone sort of version control that wastes space and makes it painful to do any of the things people use version control for.
If you know your project is for sure _personal_ (i.e. not shared) and a small _proof-of-concept_ (i.e. if you go further in that direction you will do a rewrite anyway), I think it is overkill. Your code and data will be in so much flux, that good old copying is faster than dealing with the VC.
Thinking about it, I think it makes sense to add VC to a project, when it delivers its first satisfying result, I would call that the proof-of-concept program. At that point you throw it away/archive it, or you have bigger plans, then you probably add version control knowing you have this working prototype and rewriting stuff.
You do not have the history to that point, but it would not be helpful anyway.
Easy branching and merging enable exploratory programming in a way that makes you stop worrying about a whole class of regression bugs forever.
All of these are created to mitigate human errors. If you think that you don't make them, why bother? Write the whole thing in hand-crafted optimized assembly, from beginning to the end.
But obviously, that's a slippery slope. You can do anything in between.
The other end of that BS argument line is that you could use the same logic to depend on ALL available tools -- and refuse to write anything without an IDE, package manager, language features like contract programming, formal proofs, etc.
This is true, but there is still a psychological difference: We have become slaves of our window managers and development tools. The fewer tools you use, the more true creativity is unleashed.
The best works of humanity have been written before the existence of version control (and computers for that matter).
I see version control as a necessary evil for multi-developer projects.
I would argue that for me, personally, using version control "unleashes more true creativity" because I can fire and forget my changes and just branch out or roll back until I find something I like, without thinking too much about where and what to backup. The not actually writing code or designing aspects of development then take less time out of my work.
I tell my developers when they're worried about testing something on code, just create a branch and try it, and if it fails, just move on. You shouldn't ever be worried about losing code, or changing things. This is one of the greatest advantages of SCM -- how many variations of a codebase you can have, and how easy that can be.
That's so HN.
The entire article is about this.
It would be hard to find a paragraph where this isn't explicitly mentioned.
You didn't skim very well.
If I made a game that had a day and night, sleep and awake, food, drink, sex and death, I could claim that it simulates 100% of the interesting parts of existence. To cast that as actually simulating existence would be silly, though.
- If you're using services like github or bitbucket, you have remote backups of your source in case your HDD breaks.
- You have clear documentation of your progress, the changes, what you implemented when.
- You can always revert to a prior point. If you try to implement a risky feature that might break a lot of things, and if it does, you can revert to an old version with 1 command. If you have hourly backups, or folders with regular full backups, you will scramble to find the right version to revert to (I happen to know from experience!)
- If you take a break from the project, you can quickly pick up from where you left off when you read your last commit message.
Trust me, once you started using VC on solo projects, you can't imagine your life without that convenience. It's so easy to set up and just makes your life easier in many ways.
The lunacy of one guy writing so much depth and detail has it's own magic that you can't really get anywhere else. Maybe it is indeed a waste. I think i've spent more for that game than any other, save maybe WoW because of all the expansions.
It contains utilities to do just about everything you feel is lacking, save some major interface overhauls. I agree, the interface is byzantine, but at the end of the day, it's basically like emacs or vi....
Tools in the Newbs Pack include 3D fort imager, StoneSense, Dwarf task/military/nobles manager Dwarf Therapist, dozens of pixel art packs to turn your d's and c's into little dogs and chickens. There are even tools to directly modify the game: turn off aquifers, turn off invasions, remove races, turn off vampirism, limit the number of children.
The only wasted potential in Dwarf Fortress is people who maybe can't get into it because it's so freakin' complex. Tarn knows the code's a mess. He's not a programmer. He's a mathematician. He writes code that works, and when it does, he moves on. Nothing in Dwarf Fortress was written to be touched by an outsider. It's a truly personal project for the Adams.
Sure, maybe we have enough flexibility right now, but Dwarf Fortess definitely isn't a paragon of polish or accessibility.
Also, if you don't think DF has polish, you've never played it. The polish is very subtle, but the game is SUPER polished with tons of details you'll miss if you don't go deep.
A lot of trouble has been put into making tools such as Dwarf Therapist in the Lazy Newb Pack. They're basically made by snooping the memory of the DF process (unless I'm mistaken here). If DF source code was available (even if it would be immutable), a tremendous amount of effort could have been into better use than practically reverse engineering parts of the core game.
In my opinion, Dwarf Fortress could be much better if the source code was open or at least available.
To put a different license and dump the source somewhere, you don't need to change your personal process at all.
They're keeping it close to their hearts, where it belongs. Call me a purist but I'm more than happy with the way it's progressing.
Kind of uninteresting for most players, but hey; this IS hacker news.
Saguaro wood density only exists online thanks to Dwarf Fortress, for one example.
This would result in completely different game in the end, probably a lot more mainstream.
I'm glad he decided not to pursue that path.
Apparently even though it's text only there are points in the game where it slows down to a few frames per second.
However, this is a 14 year old, very complex codebase. Tarn has said himself that multithreading is highly improbable at this point, it's not something you can just drop in. It would probably absorb an entire release cycle.
http://softwareengineeringdaily.com/2015/10/22/dwarf-fortres...
Even more weirdly, the article calls Tarn Adams just "Adams", as if that name is unambiguous when discussing Dwarf Fortress.
Fortress became unplayable due to catsplosion. I love this game.
Just put all cats in a cage and leave few males wandering around to deal with vermin. The last time I played (few years ago, don't remember the exact version) this worked flawlessly.
Room Carnage
This is the link for episode 58, but start from 1
https://www.reddit.com/r/dwarffortress/comments/49iiom/roomc...
Maybe that's why I'm a bit disappointed now that I actually am one, but that's life :p.
A few years ago I looked for any studies on the usefulness of a version control system over, say, a versioning filesystem. (Examples of such include the VAX filesystem which auto-versioned every save, Dropbox does the same for at least 30 days, and the Mac Time Machine gives access to previous backup snapshots.)
I wondered if for some projects auto-versioning on save or clock event in a VFS would be more useful than manual versioning with a VCS. For an common scenario, co-authors working on a paper might have a shared Dropbox directory. They can modify the images, Word document, etc. safely without risking forgetting something because there's the option to see older versions of the directory.
Those studies have not been done. I know for myself, for the initial stages of a project, I find it more effective to iterate through multiple directories (eg, "foo", "foo2", "foo3") so I can easily compare different approaches, than to create a new repo, name the branches, and check out each one to get the same effect. I also have hourly backups, so I won't loose much in the way of code.
It's very rare that a change will hit only one file, at the least it's likely to imply changes in the test suite as well, and likely there'll be several objects collaborating. Being able to group those changes together and then annotate them with a commit message is hugely useful to me for a couple of reasons. Firstly I can roll that change set back as a single unit, but more usefully I can look at the history of a given file, of even a given line of code, and then map the changes to the wider context that influenced them. I couldn't tell you how many times I've wondered just why a line is doing something, run git blame, and instantly been given an answer by a past version of me who still has all the details fresh in their head.
We don't really know, beyond personal experience, which is why this is very debatable.
It worked great, and even though I now use git for even personal projects, I'm not sure it's on balance useful, along the lines of your thinking.
Because: VC warps your thinking. You change your work habits and spend time crafting this artifact, the VC commit history, which is secondary to your actual goal. For example, there's a tendency to quickly jump between different areas, or make unrelated changes, because that works against the nice 'commit-per-thing' history that looks nice in VC.
So no VC doesn't seem so crazy to me :)
Even huge projects involving large numbers of people can be and have been done without version control, if you have a large enough project management staff. You'd be mad to try to do it that way merely because you can, now that version control has gotten so good, but it's still not a necessity. It's not vital.
In fact, I did just that yesterday.
And being able to visit old code? I can't remember a single instance in my career where that was important. I can imagine scenarios where it might be, but they've never happened in real life. The other thing I realised is that most source control systems are useless if you change a file's name, you can get to the old file, but you simply can't be bothered. So it's actually easy to effectively 'lose' old code through refactors.
Source control is great for looking up the 'why' of what you did 6 months later and for backups.
The stupid guy that wrote this ugly code was me too.
I still use a VCS, if only for synchronizing code between computers, and for actually erasing dead code without regrets.
Otherwise we would be judging all programming languages by the use cases and the pitfalls of COBOL.
It would be nice to be able to get a better ui which clearly he has no interest in coding himself.
> People are still doing this kind of stuff with the game being close
> and making this amazing stuff. Why not put the code open source?
> It’s basically a kind of paranoia or prudence about what might happen.
> Because there’s forking that would just be way easier just to have other
> projects going out there, people selling it and stuff. And people asking
> for, say they’ve fixed some of the bugs, and they’re like, ‘Here, could
> you incorporate this patch?’ I become a project manager, and it brings
> out some of the [reasons] why I’m not in an industry job, right? I have
> no experience working with other coders.It’s basically a kind of paranoia or prudence about what might happen...