Posts
Avoiding religion in programming
Thou Shalt Rend Software and Religion Asunder
Steve McConnell, Code Complete Second Edition
There are numerous infamous religious wars in the world of programming. Windows vs. Unix, Windows vs. Mac, IDEs vs. text editors, Emacs vs. vi, Python vs. Ruby, where to put the curly brace, spaces vs. tabs, 2 spaces vs. 4 spaces; the list goes on ad nauseum. The fact that these arguments never end shows that there is no “true” answer.
Posts
Making Windows more Unixy
At work I’m stuck on Windows (XP). At home I use Linux (Arch) and Windows (7). I still use Windows because I need to check that software I write runs on Windows, and certain things like iTunes and Spotify still work much better on Windows. I hate developing on Windows though.
I, like many others, would like to be able to have a Unixy (I didn’t think it was a real word, but look!
Posts
Nike: all your runs are belong to us
I like to run, and I like tech, so obviously I like to measure and graph my runs. So I use Nike+. Unfortunately, Nike+ has a rubbish pure-flash website (rant: do people still make pure-flash sites? This is 2010!).
I want a way to get to my run data without having to use Nike’s website, so I’ve decided to code something up. I’m learning Rails at the moment, so I’ve decided to do this as a Rails app.
Posts
Static vs. dynamic typing: an introduction
A different kind of type ...
This is the first of a series of posts on the differences between static and dynamic typing in programming languages. This post is intended as an introduction to the topic.
What is a type? The following definition comes from artima.com:
My definition is that a type is metadata about a chunk of memory that classifies the kind of data stored there. This classification usually implicitly specifies what kinds of operations may be performed on the data.
Posts
Static vs. dynamic typing
Over the next few weeks, I’m going to be writing a number of posts on the subject of static vs. dynamic typing. I think it’s a fascinating area to explore, and it’s one that affects our lives as programmers every day, yet it seems that a lot of people don’t really understand the distinction.
I won’t pretend to be an expert on the subject – I see this as much a learning experience for me as for the reader.
Posts
PyQt, PIL and Windows
Edit: Although the following approach works on a small sample application, as the app gets more complex it’s less likely to work. I’ve moved to just using PyQt images in the GUI, and PIL images in the backend. If anyone has any ideas on how to make this work let me know in the comments.
Here’s a fun one. If you’re using PIL and PyQt4, you may want to display a PIL image in your PyQt GUI.
Posts
Static typing: the presumption of guilt
I was listening to Software Engineering Radio recently; the interview with Gilad Bracha on Newspeak. In it, Gilad talks at length about dynamic typing, and its superiority over static typing. This was the best argument for dynamic typing I’d heard, and it slotted perfectly with my growing respect for dynamic typing.
Some background information: Gilad Bracha co-wrote the second and third Java Language Specifications. He is the creator of Newspeak, a dynamically typed languaged influenced by Self and Smalltalk.
Posts
Samsung Fn hotkeys and Arch Linux
I’ve got a new Samsung R530 laptop. The first thing I did when I got it was to install Arch Linux (my Linux distro du jour). I nearly broke everything when I installed Grub in the Windows boot partition (I think Grub and NTLDR were fighting), but it all turned out well in the end.
I really like developing in Linux - it really is the perfect development environment. It’s just a pain that everything doesn’t work out of the box.
Posts
Rsync to a mounted Linux CIFS share
I was in a position where I wanted to rsync some files from my Linux box to a NAS drive. The drive in question is a Lacie Internet Space (like this but white), which runs Linux. I guess because it’s designed mainly for Windows use, it uses the SMB/CIFS protocol.
In order to rsync files to the NAS, I mounted the drive with fstab. This worked OK, but when I tried to do rsync -va --del, I got a load of permissions errors, whether I ran it as me or root.