A competent programmer

Most programmers know what's to focus on when trying to become better in their profession. This website offers a very good list. But lately I am finding increasingly that there are other things a programmer must be able to do in order to be truly successful that technology-focused sites often neglect to mention.

These are traits that are not often focused on by a lot of programmers I know. They're implicit things that some programmers just seem to be forgetting, or don't place a high enough value of. But I think if you don't possess the traits mentioned in this post then you can never be an effective programmer. Here's some of the things I found extremely useful on my current project. They apply to projects done in teams but you can just as easily apply them to lone wolf projects (but you'll be playing out all the roles mentioned below by yourself).

  • Deal with crap legacy code. Know how to deal with badly written and undocumented legacy code. Don't refactor a solution that's worked for years if it's not necessary. Don't break shit. Get to know the code before attempting to make major changes in it. If you are thinking that you will not be confronted with a situation like that then you are naive and should go back to school.
  • Know your priorities. Yes, designing that new e-mail framework from scratch is a great challenge, but there's also 5 minor bugs that break the product. Don't indulge yourself on what you like better, don't rely on other people to prioritize for you, know what's important yourself. This is one of the most important skills a programmer can have, especially when functioning in a team.
  • Communicate. Don't do something without confirming what it is you're actually doing. Don't try to get away with doing things according to the problem description if you know the problem description doesn't make sense.
  • Know better. People will ask you to do stupid shit, then change their mind and ask you to do even more stupid shit. Expect this and program your system accordingly so you don't have to change it all the time while you're in requirement limbo. (Which can last months, trust me.)
  • Don't trust people. If a person tells you that a piece of code is not in use and you can delete it, ignore him/her completely and do a full-text search. The only thing you can trust as a programmer is full-text search!
  • Don't trust new technology. If you have a crappy solution to a problem that has been working fine for years, don't change it. Almost always there will be business logic behind the crap solution that you are not aware of and will unknowingly refactor away, realizing only weeks later that you broke something important. (Unit tests avoid this problem, of course.). This point is a bit tricky and depends on the case, the crappiness of the original source code and the wackiness of the framework you're planning to replace it with.
But the most important skill is, in my opinion: achieving the right balance between writing clean code and getting things done. This is by far the most difficult thing to master for any programmer, and I have seen countless of my brilliant colleagues (and myself too) fail horribly at this. At some point in your project you will have an upcoming deadline that you simply cannot complete in time. Then what do you do? Do you try to do things properly and deliver an incomplete product? Do you fudge things up and deliver poor quality code? And where do you draw the line?

This is a bit tricky, but it's nothing compared to deciding on which technologies to use months before a deadline. That's when you really need to be able to estimate what the project's going to need and what technologies should be used. Compromises must be made and you must think about how much crap you'll tolerate given the deadline. That is the real skill of a programmer. It's not about achieving technological brilliance in every facet of the project, it's about getting the product out the door, and making compromises along the way to do it.

 

Posted in Tech | Tagged

Broadband

I got my Internet fixed yesterday, and I am very much ashamed to say that the fault was entirely on my side. For months I have not been able to upload anything because the connection keeps cutting off. A Virgin media mechanic came over twice but was unable to fix the problem. The third mechanic came over yesterday and diagnosed what I was unable to: the problem was between the cable model and my laptop's wifi.

I have no excuse for my lack of testing. It's something I could easily have figured out if I had run a speed test on my iPad or on my girlfriend's pc. My girlfriend told me that Internet was fine but she never showed me proof so I didn't believe her. What's worse, I didn't even troubleshoot the problem myself, which is very un-engineery of me. I could have found the cause easily but my knowledge of computers led me to believe that it couldn't possibly be the wifi. Such misplaced arrogance.

The virgin mechanic told me that sometimes foreign laptops work on different wifi channels from the cable modem, which causes problems in communication, eg. Communication just cutting off after a short while. It didn't sound very believable to me but the wifi definitely turned out to be the cause. The mechanic gave me a massively long Ethernet cable and everything just works beautifully.

I blame my own lethargy and overconfidence for not troubleshooting the problem. Had I known less about computers I would have tried more things, especially if I didn't come home from work tired every day. Not an excuse, just an explanation.

One of the most important reasons for me to have broadband Internet is so I can back up my photos to my pc in holland. Ironically, on the same day my Internet was fixed, I called home and we diagnosed my home pc to be broken beyond (remote) repair. So sad...

Posted in Tech

Backing up photos

Today I finally took some time to work on a viable solution for backing up my photos. I've been panicky about my data ever since my first hard drive crash, and I've been looking for a good solution to store my photos off-site ever since I came back to Europe. I may be overprotective of my data, but let me explain my reasoning first.

I make TONS of photos. And videos, from time to time. I do time-lapses, as you can see from the post below. I throw nothing away. On adventurous years in the past I've had more than 100GB worth of data. (For comparison, this year has been about 20GB, but I've lost interesting in photography ever since coming back to Europe. Europe sucks). This rules out any form of online storage as it's just too expensive. Besides that, it's just not permanent enough, as the data size will only increase and never decrease.

Back in Japan I started backing up my photos to blu-ray (47GB per disc) and sending or bringing them back to my parents. This worked for me because I would still have the primary copy on my home PC, which back in Japan contained a RAID-1 mirror set-up and an external hard disk for backup. That way, even if one hard disk crashed, the other one would have my photos, and if the house burned down I could still grab the external hard disk which contained the most recent ones that I hadn't sent back to my parents yet.

These days though, I have no 'proper' PC in my home, just a laptop. A bloody awesome laptop with 750GB of storage, but a laptop nonetheless. No backup drive, no RAID mirroring. If the hard disk dies, it's all gone. As I said before, online services charge too much than I'm willing to pay to put all my photos online. I don't have a blu-ray burner in my laptop, but blu-ray discs are expensive in this part of the world and not getting any cheaper. Blu-ray has quite failed, it seems. Another solution would be to buy a hard disk, copy the photos and send that back home, but I don't trust the postal service to keep the thing in one piece.

Since sending via snail-mail is not an option only the internet is left. Online services are too expensive, so there's only one way left: I need to copy the photos from my laptop to my PC in Holland, which is always on and always connected and has a RAID mirroring setup with plenty of space. Unfortunately Virgin Media, my local internet provider here in the UK, has failed to fix my internet several times already and generally sucks ass and should just go bankrupt, only provides an upload speed of about 20kb/sec. The line is far from stable and the connection often drops, requiring me to re-upload. In fact, I have NEVER been able to upload even a thumbnail of a photo to my blog while on the Virgin connection, I need to use my mobile phone's tethered internet connection for that. The message is: I will not always have access to a fast or stable internet connection, so I can't just plain-old dump the originals to my home PC.

The last problem I must face is the fact that my PC in Holland will simply not always be online. Sometimes the internet connection will break, sometimes the connection will be slow. Very rarely a hard drive might break and I will have to instruct my parents on how to fix it. Something I know they will fail to do. So my photos are at risk. Nevertheless I devised a solution that would involve sending thumbnails of my photos in increasing size, from small to large, to a webserver managed by me (which is always online). At a later point my Holland-PC would access the webserver and start downloading the thumbnails and the originals. It seemed like an interesting project to do, and as an added benefit would provide me with a website full of thumbnails of my photos that I could share with others.

I"m not doing it though. I simply don't have time for it. Or more specifically, considering the amount of mental energy I am spending on programming during working hours, the last thing I want to do is debug a Python/Django request in my free time. As I found out today, I'd rather spend a Sunday working professionally on something useful that gets shared with lots of people instead of working on my half-assed hobby project.

I downscaled my demands and decided that I could just as easily solve the problem with a free Dropbox account. I would still generate thumbnails of my photos, but instead of uploading them I would place them in my free Dropbox account until it was filled up. Then I would run another (scheduled) script on my PC in Holland which would download/copy the files from the Dropbox folder onto the RAID-mirror and then delete them from the Dropbox folder, freeing it up for my local script to add more photos.

I didn't do that either. I was about to get started on it when I realized a much simpler solution: USB Memory Sticks. They sell for ridiculously cheap these days. I can mail them to my parents very cheaply and they're much more likely to stay in one piece than a hard disk. I can include the checksums of all files I put on the stick so I can verify that they were transferred correctly. Then my parents can put them in their vault or whatever and my photos will be much safer than they could ever be anywhere else. The only issue I can see is that if I start taking more photos I might end up having to buy lots of USB sticks. When that time comes I might consider sending a hard disk and doing the same checksum trick. In fact, that might be better in any case, financially. I don't know if I can trust my data on there for the long term though.

Considering the amount of mental energy I've already spent on this problem I've got mixed feelings about my conclusion. The only thing I can say for certain is that any solution not involving hardware is wrong, and that any solution involving hard disks should be weighed very carefully. Flash memory that is not read from is reliable and shock-proof and should be viable until far into the future.

 

 

 

 

Posted in Tech

The Cave, the Zone and the Place

A Nerd in a Cave. This is one of those articles I read and simply cannot believe how much of it is about me. I have a Cave as described in the article. I get cranky just like that when people interrupt me when I'm in the Zone (and I've on occassion Snapped at people, sorry about that >_<;) and I have a Place to get away from it all and charge my energy. I'm glad to see there's more people having the same environmental needs as I do. His last sentiment rings very true as well:

The risk with these places is the same risk with all comfortable places. In the comfort, we forget that some of the most interesting stuff happens elsewhere.

Posted in Tech , Thoughts

WFH

I am in the lucky position to be working at a company that allows me to be working from home every once in a while. Having worked at a fairly traditional company in Japan that would never allow someone in my role to do that, I giddied at the thought. Yay, I can write software without having to wear clothes! Think of the efficiency! That initial giddyness wore off, but working from home definitely has its merits.

One thing I won't point out is the plus that no one will disturb you so you can concentrate on your work. It's offset by an equally large minus, which is that no one will disturb you so you have no idea what's going on in your project and how urgent those tickets that were assigned to you really are. Lack of communication balances with lack of disturbance.

To me the most interesting thing about working from home is the shift in perspective. I still have the exact same amount of work to do as I did had I been working at the office, but somehow I look at things differently. I find myself thinking more in the long term when working from home, and prioritizing work accordingly. I tend to procrastinate a bit more when working from home, but I appear to offset it by doing more creative work and laying the foundations for larger, long-term changes. In the office it's much easier to get caught in the pattern of releasing urgent bugfixes, deploying to different sites, then releasing bugfixes to the urgent bugfixes, deploying again, etc. etc.

In short, working from home allows you to have a completely different perspective on whatever project it is you're doing. Perhaps the reverse could work too: take a home project and work on it in an office. I wonder how that would turn out.

Posted in Tech

'Cool' technology

I own an iPad 2 and an Android phone: the Google Nexus S. When I think about cool and awesome technology, I think immediately of the iPad 2. When I think of a plastic lump of turd, I think of my Android phone. Android is just not cool yet. Why? Also, the user experience on iOS is so much better than Android, it's not even funny any more. I would much rather see Android be successful than iOS, but the Android 4.0 had better be real damn good, otherwise I'll be forced to buy a bloody iPhone...

Posted in Tech

Dell Tech Support: Excellent

Last week my screen suddenly gained several large vertical lines of dead pixels on the right side of my screen. Since my laptop is only a few months old, I was not very happy with that. I called tech support yesterday and scheduled for my laptop to be fixed. Dell will fix it within 2 weeks for free, but if you pay 30 pounds they'll come by the next day and fix it on-site, which is exactly what they did. I am now starting at a lovely new screen that was very expertly attached by the Dell repairman. The repairman told me the XPS 15Z is the hardest one to fix because all the components are so cramped together inside the case. Very funny guy, very good service.

...

Now, the dreadful call to Virgin Media again..

Posted in Daily Life , Tech | Tagged ,

Open source!

I used to host a bunch of my private projects on Unfuddle, which is a great website for hosting personal projects that have potential for growth that are also novel ideas that might generate revenue. In practice though, those ideas tend to be forgotten after a while and die a silent death. I received some e-mails from unfuddle about old projects of mine that were about to expire, so I decided to share them on my github account instead and make them open-source. Feel free to do anything you like with it :)

  • Rankkeeper was an attempt at creating a generic media-rating website à la Anime Planet
  • Goalkeeper was a scheduler/time tracker that was supposed to use the pomodoro technique to help people keep track of what they do. It was a cooperative project that ever really came off the ground.
  • The Android client for Moodlogger is actually a work-in-progress, but I don't have a lot of time recently and other people have expressed their interest in developing an Android version, so here you go.

Posted in Tech | Tagged

Moodroid

At least I got started on it...

Posted in Tech

From Python and Objective-C to Java

Switching from my main work in Python to a hobby project that until recently I did in Objective-C, but now switching to Android. Here's some thoughts of a braindead person at 01:26AM.

Things I noticed when switching from Obj-C to Android:

  • Installing the Android SDK is only a fraction of the size of Xcode.
  • Xcode worked out of the box, whereas Android wouldn't even download. I had to try this several times to get it to work. Rather poor.
  • Thank the lord almighty for Eclipse and all its lovely proper IDE features. I never ever want to see Xcode again.
  • Creating code in Eclipse/Java is so easy! It lowers the threshold for creating properly structured code a lot.
  • Ugh, lots of exception catching
Things I noticed when switching from Python to Android:
  • Yuck, so many brackets and semicolons.
  • Autocomplete works 10000 times better in Java
  • Yummy, structured code. Fancy architectures. I like it.
  • I find myself thinking of very fancy solutions to architectural problems in Java, which I quite enjoy. Then I realize that in Python these problems don't even occur, and I can just write useful code instead of boilerplate bullshit.
  • ORM: this is an unfair comparison, but I have never seen an ORM that works as good out-of-the-box as the django one. No Java ORM comes even close (been working with ORMLite).
  • Spent about 20 minutes tinkering with generics to create an optimal solution to some query problem. In Pythonworld such a problem wouldn't even occur.
Things I noticed when switching back from GIT to SVN:
  • I don't miss git's merge featureset at all because I'm on a hobby project that won't need much merging anyway. SVN is adequate.
  • That being said, SVN shot itself in the food when I tried to rename a file (!), breaking the svn file system somehow, after which I had to restore from the repository manually.
  • Eclipse's graphical diffs are still much faster with SVN. If only the git Eclipse plugin could do this, then I could forget about SVN completely.
Since I'm comparing stuff anyway, here's one more.

Things I noticed when switching from Windows 7 to Ubuntu:

  • Multiple monitors do not work on my laptop's nvidia graphics card.
  • Switching to built-in Intel graphics did make multiple monitors work, but performance was so poor that I could not drag windows around.
I gave up at this point. Even in my professional environment I still have no need to run linux. Note that I have nothing against Ubuntu! I'm trying to like it, and would love to get away from Windows if a better alternative was available. But for the way I use my PC, Ubuntu is simply not better than Windows (7). Every time I take the plunge and install Ubuntu (this happened several times before) something happens that puts me off Ubuntu and makes me switch back to Windows. I just can' t be bothered to spend time on something as trivial as an OS. I want to be productive instead. If I went into full-on hacker mode I'm sure I could configure Ubuntu to suit my needs. But I'm sure it would take me hours and hours of hard work, whereas Windows is just perfect out of the box (well, after you add a few programs). Sorry Ubuntu, perhaps I'll try again next year.

Posted in Tech