News for hackers. Stuff that matters.
Re:How Dwarf Fortress is built by chaostheory on Thursday July 29, 2021 @12:25PM (#27998267)
To me what was most surprising about Dwarf Fortress, given the complexity, is that Tad didn’t use git or any other code repository until more recently.
Re:How Dwarf Fortress is built by reader_mode on Thursday July 29, 2021 @12:48PM (#27998511)
I mean using SCM became the norm in maybe last 10-15 years ? When this was started I don't think using SCM was as ubiquitous as it is today, not to mention on a solo project. If you've been hammering away since then I can see how you might have missed it.
Re:How Dwarf Fortress is built by ska on Thursday July 29, 2021 @04:02PM (#28000758)
> I mean using SCM became the norm in maybe last 10-15 years

more like 30, at least in a lot of the industry. Even just looking at open-ish systems, people were excited about SVN in what, 2000?, because they had been working with CVS for years, if not a decade or more, at that point.

Re:How Dwarf Fortress is built by dangoor on Thursday July 29, 2021 @01:29PM (#27998970)
Pretty sure all of my professional work used SCM starting in the mid-90s (CVS). May not have been the norm for solo devs at that point, though.
Re:How Dwarf Fortress is built by reader_mode on Thursday July 29, 2021 @02:39PM (#27999900)
https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-s...

I've seen this post brought up as relevant regularly up till 2010.

You may have been lucky to avoid the dredges but SW industry in the 2000s was a copy-paste fest (not in the "copy from stack overflow" sense but as in "copy paste instead of creating a function"), PHP with SQL in templates and string concat queries all over the place, MVC was a revolution. I'm not saying this was everywhere just that it was very common.

I'm sure some wise guy will come up with retort that MVC was used in the 70s and what not, but my point is a lot of the industry discovered it with Rails and Django.

The way that we teach programming these days and languages/tools/frameworks just make some bottom tier mistakes from the past impossible (or very impractical). People often ignore this context when evaluating modern framework

Re:How Dwarf Fortress is built by coliveira on Thursday July 29, 2021 @03:27PM (#28000341)
In the Windows world SCM was not generally available until SVN was released as a File Explorer extension. This was sometime in the 2000s. Git took several years to become viable on Windows.
Re:How Dwarf Fortress is built by kryptiskt on Thursday July 29, 2021 @06:51PM (#28002428)
There were plenty of proprietary source control systems around. At my first job in 1998, we used Visual Sourcesafe, later switching to Perforce.

At another job I had the misfortune to get to know Rational ClearCase.

Re:How Dwarf Fortress is built by kevstev on Friday July 30, 2021 @12:12PM (#28009502)
I am absolutely stunned that people think that source control only came around recently in this thread. CVS came out in 1990, RCS... 1982, SCCS... 1972. Visual Source Safe was commonplace in the 1990s, as terrible as it was.

There may have been small teams that didn't use SC in the 1990s, but this has absolutely been a basic best practice for decades.

Re:How Dwarf Fortress is built by GordonS on Thursday July 29, 2021 @03:47PM (#28000561)
IIRC, Microsoft's TFS (Team Foundation Server) also came on the scene in the early 2000's. I first used SVN around that time, before TFS became the standard at Microsoft shops.
Re:How Dwarf Fortress is built by andrewaylett on Thursday July 29, 2021 @06:34PM (#28002295)
My first employer out of university kept their code in Visual Source Safe, Microsoft's first attempt at a VCS.

It was really, really bad.

My second employer used CVS. Tags were fun back then -- each file was versioned separately so committing multiple files while a tag was in progress might result in only some of your changes making it into the tag. My big innovation there was to add a validation step to our build machine to ensure that the tag matched the state of the branch once the tag had finished, and add the tag to the build version number. Presto: we can actually see which code was built into that day's full build :).

Re:How Dwarf Fortress is built by atrn on Thursday July 29, 2021 @07:55PM (#28002967)
There were others far before Windows. In the 1980s I used Polytron version control system and the MKS port of RCS on MS-DOS.
Re:How Dwarf Fortress is built by tialaramex on Thursday July 29, 2021 @07:21PM (#28002715)
The first large project I contributed to was GIMP in the mid-1990s and that was under CVS. I think the oldest personal repositories I have are a little later under Subversion, so yeah, certainly my personal projects in the era where I first used CVS to work on GIMP did not have version control.
Re:How Dwarf Fortress is built by foobiekr on Thursday July 29, 2021 @01:57PM (#27999394)
SCM was commonplace by the mid 1980s at the latest. My CS program used CVS to submit code in the mid 1990s and as a network engineer we used RCS in 1990.
Re:How Dwarf Fortress is built by smcameron on Thursday July 29, 2021 @03:04PM (#28000113)
I remember using sccs in the '80s.
Re:How Dwarf Fortress is built by usefulcat on Thursday July 29, 2021 @04:13PM (#28000893)
In 26 years I've never worked anywhere that didn't use SCM.
Re:How Dwarf Fortress is built by Octopodes on Thursday July 29, 2021 @01:33PM (#27999025)
Am I mistaken, or isn't his given name "Tarn?"
Re:How Dwarf Fortress is built by chaostheory on Friday July 30, 2021 @10:04AM (#28008094)
You’re right. I tend to make mistakes typing on mobile.
Re:How Dwarf Fortress is built by dpcx on Thursday July 29, 2021 @12:42PM (#27998433)
Did he finally start using one? I know that was one of the things that blew most people away, is that he had no change history for most of his code...
Re:How Dwarf Fortress is built by chaostheory on Friday July 30, 2021 @10:18AM (#28008240)
I could have misread, but in a less recent interview, I think he has been using git within the last two years. The interview where he mentioned that he didn’t use any source code repo was 4 years or older.
Re:How Dwarf Fortress is built by AstralStorm on Thursday July 29, 2021 @12:48PM (#27998503)
Well, if you deeply understand the code and reasons behind it (or it's superbly documented esp. with tests), the tool does not bring much beyond being a convenient backup or checkpoint system.

And especially if you don't have to work with a team.

Re:How Dwarf Fortress is built by chaostheory on Friday July 30, 2021 @01:31AM (#28004781)
I feel that a free and open tool that allows you travel through the 4th and 5th dimensions with your code is very useful, especially when everyone tends to forget what they've written several months ago. It's also a tool that forces you to document your changes.

Is it possible to climb a mountain without equipment? Sure, but it's a lot more dangerous and it'll take you longer to reach your goal.

Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @12:42PM (#27998431)
Why would that be surprising? For a single programmer working alone Git is an incredibly complicated tool.

P.S.: A lot of you are confusing "complicated" with "difficult".

Re:How Dwarf Fortress is built by kapp_in_life on Thursday July 29, 2021 @12:47PM (#27998492)
Is it? That's when git is simplest, having a single branch and never merging removes most of the complexities of git.
Re:How Dwarf Fortress is built by epolanski on Thursday July 29, 2021 @06:55PM (#28002466)
Why tho?

You can create as many branches as you want and do all the experimentation you want.

When I stopped caring about committing and branching (something I’ve too long associated with pushing code, like reaching milestones) and started doing both as much as possible I really felt lots of freedom.

Instead of overthinking I can create parallel different approaches and see where they lead to. It’s amazing.

Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @12:57PM (#27998614)
Sure, but it also removes most of the reason to use Git.
Re:How Dwarf Fortress is built by hhjinks on Thursday July 29, 2021 @01:05PM (#27998713)
Don't underestimate all the useful information a complete git log contains, even for solo developers. You can look years back and find out exactly why a change was made.
Re:How Dwarf Fortress is built by outworlder on Thursday July 29, 2021 @03:51PM (#28000615)
The main reason is the ability to undo mistakes. Or compare working code with non-working code (including bisect)

That's very valuable even when solo, and worth typing a "commit" command once in a while.

Re:How Dwarf Fortress is built by potatoman22 on Thursday July 29, 2021 @01:05PM (#27998709)
In my experience, most people use git as version control. Branching etc is very useful, but not necessary for a 1-person project.
Re:How Dwarf Fortress is built by tonyedgecombe on Thursday July 29, 2021 @01:37PM (#27999093)
I find branching useful whilst working on my own, I certainly wouldn't want to go back to CVS/SVN.
Re:How Dwarf Fortress is built by flatiron on Thursday July 29, 2021 @01:10PM (#27998774)
It is if you want to bug fix released items but keep steam rolling features for the next version.
Re:How Dwarf Fortress is built by emteycz on Thursday July 29, 2021 @01:06PM (#27998719)
I invite you to try using Git as much as possible for two weeks. After a week I started using Git for branching out of my main branch to test several different ideas and then compare them at once with other developers - colleagues or friends. I think that moved the meetings and discussions with my teammates up a level.
Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @01:13PM (#27998812)
I have used Git when working with FOSS projects, and I tried using it for my own but it never took. The sort of workflow it is built for just isn't how I like to do things when I work on my own.
Re:How Dwarf Fortress is built by mypalmike on Thursday July 29, 2021 @02:45PM (#27999910)
Solo workflow is as simple as write code, git commit, repeat. Throw in a git push every once in a while. All on master, no branching or forking.
Re:How Dwarf Fortress is built by galaxyLogic on Thursday July 29, 2021 @07:00PM (#28002505)
I do a lot of that in my solo project. I would add to your list "write a commit comment". It's like keeping a journal you can go back to. It gives me time to stop and think what have I done, what needs to be done next.

I don't much read my git-commit-comments but I think it is useful to write them.

I don't usually branch, at least at this stage of the project. Probably yes when I go to production when there is a need to fix bugs in the released version(s) without having to put all the latest code into it.

Even without branching commits are a good way to save the latest known good state I can easily go back to if things didn't work out.

Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @04:24PM (#28001031)
That's a lot of commandline I don't normally have to bother with. And if I'm not living in the commandline then I only end up running git when I reach some milestone I want to back up... which I can do just as easily with 7zip without installing anything I don't already have, and I can copy archives to my NAS without having to set up some remote repo.

You can try and convince me until you're blue in the face dude, but I've tried it and I just don't like it. End of story.

Re:How Dwarf Fortress is built by p1necone on Thursday July 29, 2021 @07:52PM (#28002946)
You don't have to use the command line, most code editors have built in UI for this, especially when you're only using these basic git features.
Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @08:05PM (#28003033)
I just use Notepad++. I like to keep my development environment simple.
Re:How Dwarf Fortress is built by p1necone on Thursday July 29, 2021 @07:50PM (#28002938)
When I'm hacking away on a personal project a huge amount of value in git (probably moreso than any other feature) just comes from having "what's in the repo" and "what I've changed today" (uncommitted changes) visible as diffs.
Re:How Dwarf Fortress is built by burnt_toast on Thursday July 29, 2021 @01:54PM (#27999352)
Personally, I started using git for my projects after I accidentally deleted a good chunk of source code and my closest backup was several weeks old.
Re:How Dwarf Fortress is built by GordonS on Thursday July 29, 2021 @03:51PM (#28000626)
The exact same thing happened to me, and I kicked myself hard for it. At the time I used source control at work (TFS and SVN; git wasn't yet ubiquitous), so I didn't really have an excuse.

I've used source control for all personal projects since, and it's in no way a burden. In fact, there have been another couple of instances since the first, where I would have lost a bunch of work without it.

Re:How Dwarf Fortress is built by ornornor on Friday July 30, 2021 @02:35AM (#28005095)
How? It’s very hard to completely lose code in git. Did you know about the reflog?
Re:How Dwarf Fortress is built by Pet_Ant on Thursday July 29, 2021 @12:46PM (#27998482)
Or any other is the point. I mean even locally I depend on commits as save points to just allow me to go crazy and experiment with the code. I mean you can just copy the codebase elsewhere as backup but using git or mercurial is easier than that.
Re:How Dwarf Fortress is built by nolok on Thursday July 29, 2021 @12:55PM (#27998583)
Not saying you're wrong, but to explain "how is that possible over 20 years without ever blowing things up": he says he uses visual studio since the beggining (the full blown ide).

Since he's working alone, he can easily use the local backup feature of it, which allow to easily rollback to automatically made copies of files, diff and cherry pick between current and backups, etc ... It's basically done automatically for you.

As long as you save your project regularly and don't need to merge code with anyone, it can go a long way.

Re:How Dwarf Fortress is built by nhooyr on Thursday July 29, 2021 @01:43PM (#27999176)
No it isn't! It's so easy and effective for keeping track of your work and backups.

If you want the absolute simplest way to use git, just setup an alias to do:

  alias gcmp="git add -A && git commit && git push"
Now all you need to do is run gcmp every time you're ready to log the new state of your codebase. How could it be simpler?

git only becomes more complex as your needs become more complex. At which point I'd recommend using something like https://magit.vc/ which makes complex git operations far easier. The CLI can only take you so far effectively unfortunately.

Re:How Dwarf Fortress is built by Yajirobe on Thursday July 29, 2021 @01:52PM (#27999313)
git commit to which branch? git push to which branch?
Re:How Dwarf Fortress is built by thebean11 on Thursday July 29, 2021 @02:11PM (#27999574)
Master/main? It's a single branch workflow.
Re:How Dwarf Fortress is built by mypalmike on Thursday July 29, 2021 @02:52PM (#27999970)
master, origin/master
Re:How Dwarf Fortress is built by p1necone on Thursday July 29, 2021 @07:47PM (#28002917)
I can't imagine working on any personal project without git. How often have you been working on something for a while, noticed part of it that was working before was now broken and had no idea why. If you'd been making regular commits to git you could go through recent/pending changes and work out was was different trivially.

Git is also incredibly simple on single person personal projects, just git init, git add, git commit and some way to view the history and pending changes (either the command line, or most editors have a built in viewer).

Re:How Dwarf Fortress is built by AstralStorm on Thursday July 29, 2021 @12:46PM (#27998484)
Actually extremely easy. Git add -a, git commit, git push.

It only gets complicated if you try to do complicated things.

Re:How Dwarf Fortress is built by nhooyr on Thursday July 29, 2021 @01:44PM (#27999189)
I believe it's:

  git add -A
With a capital A.
Re:How Dwarf Fortress is built by fatbird on Thursday July 29, 2021 @01:11PM (#27998784)
Change history, if nothing else. That alone brings a ton of benefit, from being able to view earlier versions, to recovering from mistakes or lost code.

If you have a remote repo then, you can also have offsite backups. If you never branch, it's still massively worth it.

Re:How Dwarf Fortress is built by asciimov on Thursday July 29, 2021 @03:57PM (#28000705)
Does git have benefits, yes.

Are git commands obtuse and unfriendly, yes.

The problem is that git is not intuitive and isn't automatic. I've seen more people loose code to git than be saved by having their repo offsite.

Re:How Dwarf Fortress is built by Bayart on Thursday July 29, 2021 @03:27PM (#28000346)
Basic git-fu (init, add, clean, commit, pull, push, branch, merge, stash, log) goes a long way to make your life easier. You can leave the fancy stuff for later.

There are even git repos of 99% done .gitignore files for most needs [1], which is most of the setup work for a solo project.

[1]: https://www.toptal.com/developers/gitignore

Re:How Dwarf Fortress is built by mwaitjmp on Thursday July 29, 2021 @04:55PM (#28001381)
The official github desktop app is really nice to use as well. At least on a Mac.
Re:How Dwarf Fortress is built by Bayart on Friday July 30, 2021 @02:13AM (#28004976)
The best graphical Git client I know about is Sublime Merge, if you want to try something new.
Re:How Dwarf Fortress is built by wisemanwillhear on Thursday July 29, 2021 @01:27PM (#27998947)
While Git is not without it's complexities, but as a developer who must use it with teams anyways, I find there are very simple workflows with almost no cognitive load that I'm able to use for my personal projects. Not only does this give me snapshots of my projects from any point in time, but backups as well since I use a free GitLab account as well.
Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @01:33PM (#27999016)
Yeah sure, but for someone who's workflow started 20 years ago without Git, it shouldn't be at all surprising that they kept not using Git for a long time.

There's really no reason to be surprised at all about this unless you're the kind of person who never did any programming before, like, 2010 and lack the imagination or knowledge to understand how programming could be done without it.

Re:How Dwarf Fortress is built by wisemanwillhear on Thursday July 29, 2021 @02:16PM (#27999635)
I can't disagree with that. We must all make wise decisions with endless competing "priorities" and limited time.

As someone who is on the other side and believes in the value of continuously growing one's skills, I want to convince people that Git has value in learning and using. More tools in our toolbelt makes us more effective craftsmen. Which the DF developer did get around to doing...

Re:How Dwarf Fortress is built by godshatter on Thursday July 29, 2021 @03:00PM (#28000076)
I agree with this. I've been using cvs as my source control system of choice as a solo developer on my own projects for years and haven't switched to anything newer. I use git at work, but it's not worth the hassle for me at home. The workflow with cvs for me is basically "cvs update" (in case I need to know what changed) and "cvs commit". I rarely use branches. I religiously make one small-ish fix per commit and at least compile it, though I always run smaller things.

If I switched to working with a team I'd definitely use git. But for just me, cvs is all I really need. The most complicated thing I do is probably tag a release or revert to a previous revision of something, which is pretty rare.

Re:How Dwarf Fortress is built by darkarmani on Thursday July 29, 2021 @02:59PM (#28000058)
What? How it more difficult that CVS or even RCS that lies under CVS?

That would have been the OS tool back in 1998.

Re:How Dwarf Fortress is built by AnIdiotOnTheNet on Thursday July 29, 2021 @04:17PM (#28000946)
For lone developers in 1998 it's more likely they would just occasionally make a copy of the code somewhere. That's still more or less how I work on my own stuff.