Archive for May, 2007

OS Re-installation In Order?

Thursday, May 17th, 2007

So I botched my triple boot of Windows XP , Vista, and Ubuntu on my laptop. It wasn’t that it didn’t work, it’s that my partition sizes were wrong. I totally underestimated how much space XP would need to run with everything that I use. I guess I didn’t realize how much software I actual install in XP.

On top of that, I created my largest partition as a FAT32 share so all my OSes could see it. But it turns out that Windows XP does everything considerably slower on that drive. So the huge enterprise java application that resides there takes forever to do anything with. It is even slow to open up a file explorer and search through that partition. When I use it in Linux, it seems fine. Could be because I used gparted during the Ubuntu installation to partition the drive, and Windows doesn’t like that. But I have a coworker who has a similar problem and he partitioned with Partition Magic.

In a completely separate debacle, last night I was trying to get a clean install of Apache2 on Ubuntu when I somehow removed all my packages, including network-manager (of “connecting to my WPA encrypted home wi-fi network” fame). I was running a “sudo apt-get remove” script, but the targets were only apache based, so I have no clue why it started removing everything. If I hadn’t stopped it, I really think it would have removed every package that was installed. I guess I need to boot from the Ubuntu CD to get things repaired… but with the state of my partitions it might be worth it to give the whole installation another shot.

I’ve found that I will never use Windows Vista, so there’s really no point in making space for it. I gave it 10 GB, and it used up every last bit of it just for the typical install. I also gave XP 10 GB, but I should have given it 20 GB. It started complaining yesterday that it didn’t have enough space.

I’m not sure what I’m going to do about a shared partition. Maybe I’ll just have to resort to doing all my work Java development on Windows XP and all my web development projects on Ubuntu. I need Apache, PHP, Ruby on Rails, and possibly Tomcat/Groovy/Grails installed in Ubuntu.

My problem with Ubuntu’s installation process is that I don’t really know whether to use the Synaptic Package Manager thing or do it from the command line with “apt-get”. I think I’m going to start from scratch. It would probably be safe to just split my hard drive space 40/40/20, with 40% for each OS and another 20% in a FAT32 share for anything I need to pass between them. I’m not planning on making this a music/movie/pic laptop since I have plans for a file server at home.


I’m in Fortran translation Hell

Tuesday, May 15th, 2007

I learned a lot more low-level concepts because I started programming in Fortran77 before Java. It taught me about some key computer science subjects that were not taught in my CIS curriculum in school. So I have an affinity for the ancient language. But lately I’ve been translating some old Fortran77 code into Java to be used in an engineering application at work, and sometimes it makes me want to grind down my eyeballs with a Dremel tool.

It’s not so much the Fortran77 language as it is the programmer who was responsible for the code I’m working on translating right now. I have to cut the guy some slack because there were no such things as software engineers back in the 70’s. So we ended up with mathematicians, physicists, and engineers doing anything they could with the tools that had available without regard to the software developers who would come 30 years later to rehash their work into object-oriented languages.

Here is an example of one thing that is making my life miserable right now.

Fortran supports “GO TO” statements that allow you to arbitrarily “GO TO” any line of code in the program at any time. While it seems like this might simplify things at times, it NEVER EVER EVER DOES. What the “GO TO” allows is the ability for the programmer to break out of any loop at any time and choose a new point for the execution to flow to. This means that you can jump out of a loop and never return to the place you jumped from. If you happen to jump into another loop, so be it. Fortran will happliy continue along and start looping wherever the execution landed. This can make code almost impossible to understand. In fact, this is probably the source of the “spaghetti code” term.

Logic is sacrificed at some point in the whitespace between the typing of “GO” and “TO”.

If you are an OO programmer, there is no easy and straightforward way to break out of a loop and into another loop in the code, never to return to the previous loop. Even if you call another method to run some repetitious code, you’ll always return to the place where the original execution called the method. So if you want to make an OO language do something similar to what the “GO TO” does, you have to set up a way to break out of the loop immediately after the point where the “GO TO” occurs.

Here is another example of my dilemma. There is something in Fortran77 called an “arithmetic IF statement”. It goes something like this:

IF (VAL) 10, 20, 30

The value is evaluated. If “VAL” is less than 0, the execution will “GO TO” line 10 in the code. If “VAL” is = 0, “GO TO” line 20. And of course if “VAL” is greater than 0, “GO TO” line 30.

Horrible. Just horrible.

To add insult to injury, the programmer who wrote the program I’m currently working on favors the arithmetic IF statement over regular IF statements. So instead of writing

IF (X .EQ. 0) THEN
  CALL STUFF()
END

he writes

IF (X) 10, 20, 10
10 CALL STUFF()
20 CONTINUE

And he does this all the time. I’m going to go dunk my head in boiling pitch now.


Ubuntu on the new laptop

Saturday, May 5th, 2007

UbuntuOkay, so Ubuntu rocks!

I’ve moonlighted with Linux in the past (Slackware, Suse, & Fedora), but I’ve always ended falling back to the old crotchety standby, Windows. I kept Slackware running on my extra PC for web development for a long time, but eventually I had to scrap it for parts. But now that I’ve got Ubuntu (7.0.4 Feisty Fawn) running on my new laptop, I don’t know that I’ll ever go back.

Sure, there are things that it won’t work for. My current work project pretty much requires a Windows platform to run on, so I’ll have to keep a Windows partition. Actually, I’m planning on setting up a triple boot with XP and Vista (why not?).

So I am still looking for something that will work as well as Launchy on my Ubuntu install. I’ve tried Gnome Deskbar-applet with no success yet; I’ve also tried Katapult, but it won’t pick up the hotkeys (Alt+Space should launch it). I think I may have problems with my hotkeys all around on the laptop with Ubuntu, because my Gmail hotkeys won’t work either. So that is the main thing I have to research right now.

Using Beryl - The Cube

But I’ll tell you the coolest thing about this crossover so far: BERYL. It’s awesome. Turns your desktop manager into a 3D cube with dragable windows. Adds sweet effects to lots of stuff, and makes working in the Ubuntu OS a very smooth and excellent experience.


Thinkpad out, Dell in

Saturday, May 5th, 2007

Dell Inspiron 6400I’m not going to go into the details, but the Thinkpad I bought didn’t work out. After two botched repair attempts on a failing wifi card, I demanded a refund. So now I have a Dell Inspiron 6400. It took over 6 weeks for Lenovo to get the Thinkpad produced and shipped to me, and I think it took Dell about 10 days.

And with this laptop I have:

  • 1.73 GHz processor (better than Thinkpad)
  • 2GB RAM (better than Thinkpad)
  • 160GB hard drive (better than Thinkpad)
  • 1280 x 800 pixel screen (better than Thinkpad)
  • 2-yr in-home repair warranty (better than Thinkpad)

And all this for about the same price as the Thinkpad. Now there are some people that I work with who have had horrible experiences with their Dell notebooks, but I’m trying to keep a positive outlook. So far, there was a bit of a rattle when I put the first CD into the DVD-ROM drive… but nothing since. Maybe it was a poorly balanced CD?

There was really one thing that I really liked about the Thinkpad, and that was the design. I liked that it was black, that the “Enter” key was blue. I really liked the little red nub in the middle of the keypad that I could use as a mouse. I got so used to using it that I felt crippled when the new Dell came without one. But you have to be flexible in this line of business, so I’m getting over it.