I Bought A New Computer And I’m Switching To Linux

A few days ago I bought a new computer. As a survey I went straight to Ars Technica’s System Guide from August 2007. It’s the best guide I’ve seen, enumerating the pros and cons of every part. They always give three configurations: Budget Box, Hot Rod and God Box. I went for the Hot Rod for two reasons:

  • I don’t need a God Box, which is mostly for gamers.
  • While the retail prices here are about the same as in the US, we don’t have rebates so the prices are eventually higher.

Trying to follow the suggested configuration of the August 2007 Hot Rod, the configuration of my new computer is:

  • Motherboard: Gigabyte GA-P35-DS3R (142$)
  • Processor: Intel Core 2 Duo E6750 Retail (235$)
  • RAM: 2GB PC6400 DDR2-800 SDRAM (73$) – in two 1GB DIMM modules
  • Video: Gigabyte GV-NX86S256H (NVIDIA 8600GTS) (217$) – here I chose a cheaper model than the suggested one by Ars because the model they suggested was considerabely more expensive and I really don’t need that kind of graphics power.
  • Sound: on-board – I decided not to buy a sound card because the on-board one should be enough for me and I also have Sound Blaster Audigy at home, which I’m very happy with.
  • Network: on-board
  • Hard Drive: Western Digital Raptor 10000 RPM 74GB (203$) – I decided to follow Jeff Atwood’s advice and get a 10000 RPM hard drive, which costs more and has less space, but I have my old hard drive for the non-boot partitions and it should be enough. In any case, considering that the hard drive is the computer’s bottle neck these days, I think it will prove to be a good choice.
  • Optical Drive: Pioneer DVR-212 DVD±/CD-RW (44$)
  • Case: Compucase HEC CI-6919B-NPS (61$) – when it comes to cases, I have no idea. I took something that is not the very high end but is supposed to be good, strong and quiet.
  • Power Supply: ThermalTake TR2 550W (101$) – power supply is also something I have no clue. I took a power supply that is quiet and has good support here in Israel in case something goes wrong. Again, this isn’t high end stuff, but probably good enough to last.

Like the title of this post says I decided to finally switch to Linux. I ran Linux a few years ago on a dual boot machine, but had no Internet connectivity back then (USB ADSL modem, not compatible with Linux) so I didn’t do much with it. This new machine should be completely Linux compatible, my cable modem should support Linux (I specifically asked for one) and following my experience with Linux at work I think it would be a better choice over Windows.

I’ve been a Windows user since Windows for Workgroups 3.11. I enjoyed playing with it, was excited about Windows 95, happily used Windows 98 until Windows XP arrived and currently I have Windows XP installed on my home computer. Windows Vista’s pricing is a big turn-off for me, and it offers no exciting feature for me both as a user and as a developer. While .NET is advancing and C# has exciting features, I am no longer on the Microsoft technologies path, which requires you to always remain updated even in terms of programming language (I’m not a Magpie developer, even though I do enjoy advances in computer languages). I think I’ll continue to run Windows XP in a virtual machine on my new Linux box, just for the “must have” stuff.

I plan to install Ubuntu Linux. I believe it’s the safest choice these days, considering that it’s a very popular distribution and has a vibrant community with a lot of support. It also has a strict release schedule that promises new, better versions with an upgrade path that guarantees I won’t be left behind with an old version of Linux.

9 Days Without Writing – I Haven’t Noticed

Time seems to go on faster lately – it’s been 9 days since I last wrote on this blog and I haven’t noticed. Even though I mostly don’t have much to say and I usually share links, it’s still important to me to regularly write on the blog.

The thing is that once you share some stuff on a blog, you want the next thing you share to be even better than before. I mean, I still have a lot of stuff I read on the web that’s interesting on a daily basis, but a lot of it comes from the same sources (mostly my RSS feed list) so it would seem like I’m repeating myself a lot – posting links to the same sources again and again.

Anyway, I hope to return to write regularly – even if it doesn’t mean posting daily.

3 years of working out

Today marks three years since I started working out. The 4-days-a-week routine now contains two different aerobic workouts: One is an 25-minute HIIT (high intensity interval training) workout, followed by a ~12.5kph run for 20 minutes. The other is a steady state 10kph run for 1 hour.

The HIIT workout is always hard, but the difficulty varies – one day I finish it without feeling like I did an extremely difficult effort, and on another day I might find it hard to continue to the weights workout that follows.

The 10km run is never really hard. It’s a little exhausting, being a one hour thing, and sometimes I get some leg pains, but nothing serious. I actually started thinking about trying for a 15km run, just to see what it feels like. I’m worried that it might hurt my knees, though – I’m pushing it far enough as it is.

Over the past year I gained some weight. I’m not very happy about the extra fat (I looked thinner after the first year of my workouts), but I think my body adjusted to the workouts and I was also much more strict about my diet (I still avoid eating junk food, sweets or snacks). That’s the reason I started doing the 10km runs – for diversity of workouts, but even though they don’t seem to help, I like having two different aerobic workouts.

So this is it, three years and counting. Congratulations and praises from all 5 readers are welcome.

Another Car Accident

A few days ago, during the new year’s holiday, I was in a car accident. This time, since all the traffic stopped in front of me, I hit the brakes too late and crashed into the two cars in front of me (the first car saw me coming and tried to get away, but didn’t make it). I thought I hit the cars at high speed, but my air bags didn’t blow up and I didn’t feel like I got thrown forward and backward because of the crash. So maybe it wasn’t too bad. Still, my car wouldn’t start afterwards and I had to get it towed.

The two guys in the car were really cool. I guess they saw I was shocked and confused, so they were extremely forgiving. I’m not sure I would have been as peaceful as they were if someone would have crashed into my car like this. Anyway, no one was hurt so I guess I had a lot of luck in that sense. I’m still driving an alternate car, supplied by the car leasing company.

Ace And I Moved To A New Apartment, Doing Integration At Work

This post was initially supposed to be called “Sorry For The Lack Of Updates”, but instead I decided to write about what’s currently going on in my life so that it’ll be apparent why I haven’t been updating as much as before.

I moved to a new apartment a few days ago. In four days I managed to pack all my stuff and move out. The move itself was OK, but naturally the movers sucked (it was the first time I didn’t tip the movers). Then I had to close every door and window in the apartment because I feared Ace would run away. When I finally brought her into the apartment, I took her in my car without a cage. It was actually a funny experience – she looked out the closed windows like dogs do and people were staring at the car with a lot of bewilderment.

After four days in the closed (yet air conditioned) apartment, I took Ace outside with a leash. She didn’t seem to be scared and didn’t try to run, so I let her go free. She did a lot of sniffing, and then (using some Tuna) I lured her in through the window so that she could see the connection between the inside and the outside of the apartment, which is on the ground floor. Being the smart cat that she is, that was enough for Ace. She is now a happy, free cat. She goes in and out a lot, and it seems as if she thinks the outside is an extension of the apartment.

I don’t have an Internet connection in the apartment yet. I will have on in three days. Not having an Internet connection at home isn’t nice, but isn’t too bad also – I wasn’t doing much surfing during weekdays at home anyway. But I couldn’t update the blog from home, as well.

At work I’m doing integration work for a few weeks. It’s not something that I enjoy too much – I prefer programming much more – but it’s part of the job. Doing integration has some positive side – you learn about parts of the system you didn’t know too much about before. One of the negative sides is that I don’t manage to catch up on my RSS feeds. I mean, I do read some (Internet-related) news, but not as much as I do when I’m programming. And naturally – I don’t have time to update this blog.

Today, though, I decided to take a few minutes and write this post. I’m not going to even proof-read it. So there you go.

Some Soft Drinks May Seriously Harm Your Health

I previously linked to an article about what happens to your body if you drink a coke. Now there’s a new study that “suggests a common preservative found in drinks such as Fanta and Pepsi Max has the ability to switch off vital parts of DNA”. Reading this was the last straw for me. Up until now I drank quite a lot of Diet Coke in an attempt to avoid the calories, but this is simply too much. A co-worker of mine classifies all these drinks as “poison”. I can see why now.

While I drink a lot of water during and after my workouts and during lunches, I still want something else sometimes. Since the health issue is more important than the calories issue, I (almost completely) switched to 100% pure orange juice. Hopefully this won’t come with a weight gain.

My Programming Lessons – #2 – Be Paranoid About Your Code

I chose this to be the second lesson because I feel this is one of the things I learned through experience. It’s the basis of many many other lessons.

So what does it mean to be paranoid about your code? While you’re writing code, for some strange reason, you have this false confidence that it will work. It’s false because it’s statistically impossible to write code that works the first time. Consequently, you have to assume that everything you write will fail.

Sometimes a failure is not bad – it depends on what you’re writing. If you’re implementing a word count feature for a document editor and your code causes the editor to crash, then there’s always auto-save that will give the user his latest changes minus the last 2 minutes or so. But if you’re writing the auto-save feature for that same document editor, your feature can ruin big, important documents that belong to clients who will never buy software from you again.

In practice, being paranoid about code means that you should check every return value from every function and exit error situations as gracefully as possible (the optimum being working in a transaction-like manner). Include sanity checks and assertions as much as you can, so that during tests your code will crash early instead of dragging an error to the point where it can’t be found.

Both advices, “crash early” and “anything can fail”, are well known in one form or another. Today they seem obvious to me, but I first read them in a book called “The Pragmatic Programmer”, which is a great read for developers at all levels.

My Programming Lessons – #1 – Learn When To Quit

I decided to start the “My Programming Lessons” series with a lesson I don’t consider the most important but still important enough.

Learning when to quit programming is hard. You have a deadline, you’re stressed and things aren’t going well – maybe the compiler complains about something you don’t understand or maybe the program doesn’t print “hello” even though that’s the first line being executed (or so you believe). This is the exact time you should let everything go and simply head home to rest.

You should let go because when you’re in this state you’re probably more destructive than constructive. The next day, if you’re like me and you re-examine your code often, you’ll probably replace all the crappy code you wrote with smaller, better code that will work first time around. And that’s the good scenario. The bad scenario is that you’ll keep trying to rework that crappy code until it seems to work and this almost always means a bug is hiding in there somewhere.

It takes some insight to learn when the right time to quit is. For me, now that I have a few years of programming experience, I usually know when to quit before I’m destructive. If this time of the day arrived and I still feel like I have to work, I usually do other (not as critical) work like documentation.

Motorola Asked Me To Remove References To Them

Today I got a call from a former manager of mine in Motorola. He kindly asked me to remove references to my work at Motorola.

Since they chose the high road and decided to ask me this personally with a friendly voice (as opposed to using a lawyer) I agreed to the request and removed almost all mentions (except for very general ones) of Motorola and my work there.

Writing Software – Part 3

I worked in Motorola for two years. I enjoyed working there very much, but decided to leave and look for a job in Linux and for a smaller company. I got tired of big companies and I also wanted some experience on Linux. The problem is that once you start working on one operating system (or technology) you pretty much get stuck with it, unless you get a chance to switch. I got a chance simply because there was enough demand and not enough Linux programmers to supply it.

So these days I work for Diligent on Linux. Programming on Linux brought me closer to what I learned in the university. The operating system itself has a very small collection of functions you can use (unlike Windows) and you have to work your way up from there using the huge collection of available libraries. For a Windows programmer like me it seems strange that there is no CopyFile(source, destination) function in Linux (which is part of the Windows API since the beginning of time). Also, some functions simply don’t implement all their advertised interfaces, like getting a process’s memory usage with getrusage(). What’s great about Linux is that you can see the implementation of the function, for example in the Linux Cross Reference. Also, in Linux, if you complain about something they will simply tell you: go and implement it yourself.

So this is my experience so far. I admit that I thought this series would be longer and maybe include more of what experience taught me over the years. However, when it comes to software engineering, there are so many gurus sharing their experience, code and their processes in a much more coherent way than I can, that it seems pointless to reiterate things. As an example, here’s Coding Horror’s top 6 list of programming top 10 lists post. I might start posting short “lessons I’ve learned” posts on this blog in the future.