Simple technique for preventing bugs like this: don't copy-paste code. If you find yourself copy-pasting code think twice why you even have to do it (DRY principle) and be aware of the potential consequences. Even if some code has to be duplicate, I am forcing myself to just write it from scratch, exactly for this reason: do you really know that you have updated all your data? And yeah, unit tests would help in spotting this and other things. But aren't unit tests a duplication of your code, already?
UPDATE:
Maybe I should have stated my last question differently. I meant that in the context of checking that the data is correct, it would be the same as writing the duplicate code from scratch.
Just to play devil's advocate: sometimes DRY code is harder to understand, which makes it harder to see bugs. Whenever you introduce an abstraction to make your code DRYer, you have to remember the law of leaky abstractions. DRY code is a good principle to follow, but not an absolute law.
As for terse code: a line that's five times as hard to understand might be worth it, if it saves ten. (But I usually code in languages that are famously terse and have watertight abstractions---at least in the correctness sense, even if not in the performance sense.)
> But aren't unit tests a duplication of your code, already?
> UPDATE:
> Maybe I should have stated my last question differently. I meant that in the context of checking that the data is correct, it would be the same as writing the duplicate code from scratch.
Good units tests, especially for UI entry are difficult to envision. Have a look at https://news.ycombinator.com/item?id=15432567 where I tried to sketch a general way to address this class of problems.
> But aren't unit tests a duplication of your code, already?
No, as you'd only be specifying the input and output state, e.g. the change of a model's attributes or the correctness of a mathematical calculation. The code that implements the (business) logic of going from input to output state should be part of your application, not the test.
I have the heuristic that I leave decisions for the end of the day, based on what I have done. In fact, this is one of my goals per day, when things are unclear.
The habit of skipping them for whatever reason is also problematic. If you so easily skip them (as a team or as individual(s)), why have them in the first place?
Greece. I learned a lot in the process having just an undergraduate degree at the time. The students didn't appreciate it much unfortunately (wasn't a university but a vocational school; don't ask why Tanenbaum was on the curriculum). Just one came to me after the exam (I had to pass them all anyway) and congratulated me of making it so hard for them (him).
I remember writing an essay like this for an assignment. The professor called it 'strange'. Even if I had made some valid points, there was no way to validate them as it lacked real flow. Just bullet points with messages I wanted to communicate but with no real value on their own (and some symbolic paragraphs in between). Good to see a post calling out the naked emperor. The same post had received a better reaction in the comments the last time.
#2: I am working on my diet. Yes, staying healthy is crucial for programmers. Because of the nature of the work you have to be mindful about that.
#3: Good suggestions
#4: I should be doing that. I am trying to "learn" about new languages, but you can't really learn unless you practice and this can only be achieved gradually.
#5: Yes
#6: Working on that. Similar to #4.
#7: I once had a project of reviewing the security of a web application, learned a lot, and appreciated the importance of being security-aware. It was really cool being paid to work full-time on practically gaining new and useful knowledge for a few months.
#8: I am kind of lazy for that. But, currently, I am mostly experimenting.
#9: Yes
#10: Started doing that before programming
#11: Yes
#12: Have been doing that. But what is 'complete'?
Here's mine: http://www.pubsoccermanager.com/ It has gotten really slow in the last year, but I am planning to do something around it full time. Most obviously it would be a game, but I also have a couple of other ideas of how to monetize.
Slightly irrelevant, but how valid would it be to be asked the SVN commands in an interview? Should I go an memorize the SVN manual just to succeed in interviews, although I use a graphical tool?
It depends, are you trying to get a job contributing to SVN? I would say no.
Bringing it back on topic, I was just thinking the other day how I've been using git for the last two years straight, and still have to google Every.Single.Time when I have to do a command I don't often do, like unstaging a deleted file. And it's usually the same link to a StackOverflow post that my eye instantly zooms to because it's purple.
UPDATE:
Maybe I should have stated my last question differently. I meant that in the context of checking that the data is correct, it would be the same as writing the duplicate code from scratch.