Learning Programming Languages

I think learning new programming languages is both easy and very difficult. Syntax is nearly always easy, but understanding when to use a language and what are its strong points. Failing at this leads to the familiar “when all you have is a hammer, every problem looks like a nail.” On the other hand I read a quote somewhere along the lines “a good programmer makes the solution look like the language was made for solving it.”

Then again there is the huge job of learning all the common libraries and services languages have. Consider this: I’ve used Java on and off for various little programs at the university over the years, but it has been so occasional that I still need to refer to documentation for a lot basic stuff like accessing files etc. It is kinda tough when you don’t have a very good memory for stuff like that. Similarly for the last year and a half I’ve needed Perl steadily, but occasionally on my job: I really need the documentation to check pretty basic functions.

The point I’m rambling to is that routine is in my opinion the biggest factor in mastering a language. If you don’t use it, you lose it. Basics may stay, but the finer stuff goes away.

My current part time employment is coming to an end and yet again I’ve been wondering about applying to programming jobs. The thing is, I’d really like to finish my thesis first. The problem is that while I finish my thesis I lose most of what little routine I have for programming. That makes it tad more difficult to ace interviews in the winter. Luckily I’ll propably have couple of odd jobs at the Library during the summer, but those are more likely to be configuring software rather than developing it.

Tags: , , ,

Autosave in games

Earlier today I played Batman Arkham Asylum for a while and quit at some point. I’m about 80% through and just started the game to finish it tonight. No can do: corrupt save and that was that as there is only one save slot per “game”. The reason apparently is that I shut my Xbox 360 while the game was autosaving. So essentially the game uses a flawed autosave mechanism.

It’s pretty horrible user experience that shutting down the console at wrong moment you can destroy hours of work accidentally. The correct way would be to have at least one backup autosave slot for the same gaming continuum to make sure that shutdown doesn’t completely wipe out player’s progress in the game. It isn’t end of the world the player is thrown back to the checkpoint before last.

Compare this to for example Fallout 3, which autosaves every time you change between game areas. It always does a fresh save. Even if the last save gets corrupted you can load the previous one. Of course Fallout 3 also has manual save option, which is even better for security(and user control).

In general autosave is a very nice idea from user experience point of view even if it takes away some control from the user. From game developer perspective it is pretty good option to make your game to be played in a certain way. However, it does mean you need to be very careful that in no checkpoint the player can be in so dire straits that continuing would be extremely difficult.

Tags: , ,

Teamwork For The Win

Lately I’ve been doing research for my thesis. The thing is, planning card sorting and heuristic evaluation alone without a lot of experience isn’t much fun. I’d extrapolate this to any kind of reasonable difficult pursuit. It’s always easier with a team or partner even if every one is inexperienced.

Of course this is parallel to all the stuff I’ve been doing for my thesis. In usability testing, card sorting and heuristic evaluation you do find usability problems with just one test subject, but with more patterns start to emerge and the data you get is more meaningful. Similarly I naturally believe that the research portion of my thesis would be better if I did as a part of a team or with a partner.

I definitely prefer working in teams even though I’ve worked mostly independently. It’s a general win-win, in a working team you generally improve every member in the two most important aspects: skill and motivation. Can’t for the life of me remember whether it was Rands or Scott Berkun who wrote about the skill and will as the aspects manager must massage.

Tags:

Fileserver, part 3, setting up ACL permissions

Finally I have nearly everything moved to the new server. I’ve ended up using ACL for handling permissions for the CIFS shares. ACL isn’t too difficult to understand, but there aren’t too many resources on the net on it. Finding Daz’s “OpenSolaris cifs/smb server – configuring ACL’s on shares” article really helped. For example for the media files I did the following:
Read more…

Tags: ,

Cloning a Running Windows 2008 Server to a Virtual Machine

I’m ready to migrate my 1½ year old Windows 2008 installation to a virtual machine and finding out about the options run into Disk2vhd. It’s made by the Sysinternals team at Microsoft and what it does is snapshot of any drive to a VHD, virtual hard disk. The cool thing is that you can clone running Windows system with it.

Windows 2008 server migrated to VirtualBox on top of Opensolaris

The cloning is as simple as:

  1. download Disk2vhd and extract it to some folder.
  2. Start the software and choose which partition you want to clone.
  3. Wait for the cloning to finish, in my case this took about 50 minutes
  4. Copy the resulting .vhd file to your virtual machine host.
  5. Start your virtual machine software and make a new VM.
  6. Mount the disk on the VM you just made and boot.
  7. If everything went right you should now have a clone of your Windows system running in a VM

I just tried this and just like that I have my old Windows 2008 running in a VirtualBox virtual machine on top of OpenSolaris.

If you are migrating a Windows installation to VirtualBox you might want to check out the how-to on on the VirtualBox website.

Tags: ,

Fileserver, part 2 – taping raid card

I have my server running now with the following hardware:

  • Asus P7F-X motherboard
  • Intel Xeon x3440 processor
  • 4GB Kingston ECC DDR3
  • 6 Western Digital 1,5TB drives, model nro WD15EARS
  • 2 Samsung F3 500GB drives
  • Dell SAS 5/i sata raid card
  • Nexus Edge case

The first problem I ran into was no boot, if the raid card was installed. Solution was taping two pins from the pci-e connector. Now I have the system running and OpenSolaris build 132 installed. I still have to setup the shares and stress test the system.

Most importantly everything works out of the box with the build 132.

I haven’t been exposed to Unix much so setting everything up is bit of a chore. A lot of things zfs makes really simple, but there is still lot to learn. If I still care in couple of weeks I might write a guide, though there isn’t much of a need as Simon Breden already has a very good guide.

Tags:

Steve Krug’s new book on usability testing

Great guide to low-cost usability testing. 168 pages, so reading it slowly takes 2 hours and those hours just fly by. Generally books on the practical part of testing are kinda boring, but this one is really easy to read.

Tags: ,

Fileserver, part 1

I have this AMD 4850e/4GB non-ECC RAM/2,6TB/WS2008 serving files and other needs around the apartment. No RAID, no formal backups etc. Some of the more important stuff is on couple of disks and in the cloud etc.

At first I intented to buy only 2 more hard drives, adding maybe 2-3TB. Then I got this idea wouldn’t it be fun to do away with all the separate disks and handle all the storage as one pool. This lead me to ZFS and this wonderful write-up about it.
Read more…

Tags: , ,

Webapp business

I’ve been toying with Django for a week or so and started building a simple CRUD app. Essentially it is a todo list software. Mainly this is because it is suitably small project and it is also scratching my own itch. For the latter correct solution would be to be lazy and use Todoist or Remember the Milk.

If I get the software out and about within the next 6 months I might actually try to monetize it. I doubt there is a lot of money in it, though to my understanding the RTM guys do make a living with it. The price range for the extra features of Pro or Premium version is $3/month to $25/year. Even for a single developer you do need reasonable amount of subscribers to make a living. Anyways, we’ll see if anything comes out of this. There’s pretty much work involved in making everything ajaxy.

Still, this is interesting exercise, especially as both Django and Python are really new to me and so is the whole web framework world. Back when I worked on a .Net webapp using VB.Net pretty much everything had to be done by hand. Luckily these days I’m a lot better developer and much more interested in the whole field of sotfware development.

Tags: , , ,

Usability Implications of Requiring Parameters in Objects’ Constructors

Interesting finding from a research article by Jeffrey Stylos and Steven Clarke

A comparative study was
performed to assess how professional programmers
use APIs with required parameters in objects’
constructors as opposed to parameterless “default”
constructors. It was hypothesized that required
parameters would create more usable and selfdocumenting
APIs by guiding programmers toward the
correct use of objects and preventing errors. However,
in the study, it was found that, contrary to
expectations, programmers strongly preferred and
were more effective with APIs that did not require
constructor parameters.

So essentially the explicit approach of

1
2
3
var foo = new FooClass();
foo.Bar = barValue;
foo.Use();

was better than the denser

1
2
var foo = new FooClass(barValue);
foo.Use();

(code examples straight from the article.)

Tags: