Tuesday, October 30, 2007

A moment's respite

Time to take a break from real-time Java. Having worked on our programming languages assignment for most of my waking hours in the past two days, a lot of stress and frustration has built up, and something needs to come out. Unfortunately, I don't need to use the bathroom, so I guess I'll be regurgitating what I've been thinking about in the past few days. This happens to be how not to engineer software.

Our software engineering class has thus far probably taught me more things that are bad practices rather than good. Unfortunately, these practices reflect upon just how bad our development process actually is when executed. Here they are, in no particular order of importance:

  • Using version control without knowing how to use version control. Everyone knows that version control is necessary, especially for larger projects. To argue otherwise is essentially arguing with a brick wall—nobody cares. Unfortunately, knowing that version control is necessary still gives little incentive on how to use version control proficiently. I'm not here to give a lecture on how to be a version control expert, because undoubtedly I'll be wrong about something. However, it's amazing how some people in Computer Science at the senior level simply don't "get" version control. Our department steadfastly believes that teaching tools is a waste of time—such is the job of C&IT. At this point, I'm almost convinced that they're wrong, to some degree. One teammate assumes that checking out a new repository and copying all of his files over before committing is a good way to fix conflicts. This is obviously a very bad idea, especially if you have files that are out of date, and it just so happened to be the case. His solution? Blame Subversion for everything. The problem is between the keyboard and chair. Seriously.
  • Not communicating properly. When an e-mail goes out to your customer, all of the relevant people on your team should receive a copy of that e-mail. For us, that's everyone on the team. There's no reason not to, and leaving out people results in very one-sided communication.
  • Not listening. When a teammate has something to say, learn to listen. Interruptions are not usually helpful. Neither is waiting until the teammate is done talking, but not listening. This really shouldn't have to be mentioned, but this is actually a common occurence. Listen to the other person, and then if he/she is wrong, then explain why. Interrupting because you're 200% convinced your method is infallible is unacceptably rude and arrogant.
  • Project tracking instead of project leading. A recent article on Reddit summarized the problem nicely. A team leader is not responsible merely as a gateway to the customer; a leader is ultimately responsible for keeping the team accountable and heading in the right direction. Can't do that? Please don't be a team leader. You may get this fuzzy, warm "leadership" experience to put on your resume, but the result will be that your team will fail.
  • Allowing feature creep. This seems to be a fairly common problem. On a deadline as short as ours (one semester), it's vital to stick to the defined specification. "I think ______ would be nice" is completely unacceptable. This will result in a traffic jam and a failure to complete the project on time.
  • Not using an issue tracker. Humans are typically not very good at context switching. Typically, when you find a bug, the best way to deal with it is to file a bug report. If you decide to fix the bug immediately, unless you were specifically looking for the bug, you're context switching away from what you were previously doing, which can end up being quite a distraction.
  • Lack of in-code documentation. This is probably something that virtually all CS majors at Purdue are guilty of. When we're working alone, there's no reason for us to comment; we're all brilliant geniuses that always retain understanding of what our code does. Unfortunately, this brilliance doesn't transfer when you work on teams. In-code documentation is important for quick reference. In addition, many languages support extracting the documentation out from code into various document formats, which adds even more benefit to code documentation. This alone should be a good reason to document function headers. Nobody is asking for an essay, but at the same time, nobody understands what your function does.

All in all, this is a very random assortment of pitfalls I've seen among my software engineering team. Some of these are more easily corrected than others, but sometimes I wonder if it's even worth it, with so little time left.

Ah, time. Where did it go? This semester feels like it's gone by faster than the rest, perhaps due in part by the post-graduation stress that I'm experiencing. I'm flying out to Google for an on-site interview on Thursday; Microsoft has invited me to an on-site interview, but I don't know when; grad school applications are still looming over my head. It was probably a bad idea to take three CS classes this semester, of all semesters.

5 comments:

Luke said...

Amen to that Dan! I don't know if you saw my post about learning DRCSs but it was definitely aimed at the same complaints you've mentioned. Here's the last two lines of my article: "It’s not up to people to teach you how to use a DRCS, it’s up to you to make sure you don’t get behind the times. If you have trouble or just plain dislike learning new technologies then maybe computer science is not your path."

I took a few months of crap from a teammate (not you Logan =) ) about Mercurial being crappy because I insisted we use it. It turned out 99% of the problems were that the teammate was using horrible coding techniques and sloppily coding which caused mass amounts of conflicts when someone tried to work on the same code. Then on top of that, he didn't know or understand how to merge files by hand apparently. Again, how someone got this far in CS without knowing these basics (clean coding styles and how to merge files) is beyond me!

I don't think teaching version control would be the best answer. I think requiring the students to use it and then requiring the TAs to be able to support them would help. That's how I learned emacs. Just disable g/jedit from the computers and they'll have no choice but to use vim/emacs.

Anonymous said...

hey jerkface :)

for our final project, our team name is going to be "be nice we're trying" :)

ok and now to comment on your post:
1) if software companies were looking for looks, charm and communication skills in their engineers, they wouldn't be able to hire anyone.
2) not listening/project tracking/feature creep ... isn't this just what you should have learned in 1st grade? The whole play nice, stop hitting each other, hands to yourself kinda thing?
3) wow your school sucks ... :) nyah nyah

in other news, my sisters + running buddy got together to buy me an lcd monitor for my birthday ... for the long haul ahead. i'm all excited to try it out :)

Anonymous said...

some more because i don't think i used it enough --> :) :) :) :) :) :)

saiyr said...

Of course, I still RSS all of the blog feeds of people that I know. I certainly agree that revision control doesn't need to be an "official" topic in CS, but it should be encouraged much more than it is now. It'd be nice if turnin used revision control at the backend, for example.

Julia: I hate you. I want an LCD monitor :( I was working in a lab today with a gigantic widescreen monitor. Fitting six Vim windows on one monitor is like ultimate goodness.

1. I didn't say anything about being pretty, but I think a lot of people still look for communication skills. Without those, you really are just a grunt.
2. I don't know, what are you talking about :(
3. >:|

Anonymous said...

Ha ha, so I have some fun tales from the working world about version control.

At my place of employment, I work on a POS system with 1 other developer. It's coded in about 200k - 300k lines of vb6. The problem with vb6 is that it doesn't play nice with version control (except for Microsoft's version control) because the form data is embedded at the top of the same file as the rest of the code for the form.

When I check out form A and my coworker has already checked it out and is working in design view on it, adding/deleting controls etc., and then I start working in design view and modifying the form, this creates a large problem for whoever merges last.

If it's me, then I have to merge (very, very, very tediously) all the form changes I did with all the form changes he did, which is complicated by the fact that vb6 does not save the control data in a predictable order.

So instead of using version control we just let each other know which forms we are working on at what times, and don't mess with those forms that the other is working with.

Then we have a central server where we store the working copy and we just use xplorer2 to do a diff on the date/time each file was last modified to see which forms we need to copy over.

Sounds complicated, but it's not nearly as complicated as using version control in this case. The (really) good news is that we're starting from scratch in C# sometime in the next year or so.