Posts
Vim exercises for the beginner
Vim comes with a great little thing called vimtutor. This walks you through the basic Vim commands, so you’re able to get up and running. Each lesson has a small exercise to try out the command or commands taught.
Going through these lessons, I wished that there were more exercises for each lesson, so the key strokes would sink in better. So, without further ado …
Introducing Vim exercises! I’ve only done a few lessons so far, but eventually I’d like to do exercises for all the lessons in vimtutor.
Posts
Something confusing about Ruby: Object and Class
In Ruby, everything is an object, every object has a class, and all classes inherit from Object. Three very simple statements.
Here’s where it gets complicated:
Classes are objects If a class is an object, then it has to have a class. That class is Class. Here’s an example
class Example; end #an empty class Example.class # => Class So, if Class is a class, what is its class?
Class.class #=> Class Ok, fine.
Posts
Why classes are confusing in Ruby
I wrote before about how Object and Class are confusing in Ruby. I think I know what’s so confusing about it now.
In most other OO languages there are two concepts, objects and classes. Objects are instances of classes, and classes can be subclasses of other classes. Basically, each object or class has what could be described as a pointer. An object has a pointer to its class, and a class has a pointer to it’s superclass.
Posts
Ruby post-Python: second impressions (or: how I learned to stop worrying and love the implicit)
So, it’s three months since I wrote Ruby post-Python: first impressions. I’ve got a few small things to say, and a few bigger things. I’ll start with the small things:
I was worried before about the change from elif to elsif, but it turns out this hasn’t been a problem. Having a decent case statement means I haven’t had to write a single elsif since I’ve been using Ruby.
The case statement is AWESOME.
Posts
JavaScript and jQuery for programmers
I’ve been thinking a bit about JavaScript and jQuery. To some, jQuery is the spawn of the devil - to others it’s the greatest thing since sliced bread, and possibly better. A lot of JavaScript developers hold a lot of hostility towards jQuery, which I don’t fully understand.
The other issue is whether to learn jQuery without learning JavaScript first. Received wisdom is that this is a Bad Thing® - you should learn the basics before you come to rely too much on a framework.
Posts
Something I just learned about Emacs part 1: deleting whitespace
I’m very much a trainee Emacs user at the moment. I’ve been using it for about a year, and I’m much faster in it than in any other editor, but I’ve still got so much more to learn.
I’m planning to document these new things as I learn them in the hope that (a) writing it down will help me remember, (b) if (a) fails then at least I’ve got this as a references, and (c) maybe someone else is at a similar level of Emacs mastery to me, and they’ll learn something new with me.
Posts
Why McConnell was wrong: Idiomatic programming
This is a topic that’s been on my mind since I read Code Complete, Second Edition. I think in general, Steve McConnell is right on the mark in Code Complete, but there’s one point which I really disagree with him on: Programming into your language. It first comes up in section 4.3, and is reprised in section 34.4. He repeats the point throughout the book (if it had just been one instance I would have forgotten about it, but he hammers away at every opportunity).
Posts
Finding your passion
Some time in the decade just gone I went to university to do Music and Sound Recording (Tonmeister). I chose this course because I loved to make music, and I loved technology. I also happened to be doing the right A levels (Maths, Physics and Music). The Tonmeister course was a great mix of music theory and practice, audio theory and recording practice. We recorded through a Neve V series desk onto 2 inch multi-track tape, as well as through a Sony OXF-R3 into ProTools.
Posts
Why JavaScript is AWESOME
JavaScript is an awesome language. Now, a few years ago, you’d be marked out as a weirdo for saying something like that. I think there’d probably be some kind of witch-burning ceremony or something, because JavaScript was this stupid language which had stupid syntax and stupid scope and was used to do stupid things by stupid people and just led to awful spaghetti code and killed kittens.
These days people are more understanding, and more and more are coming out of the JavaScript closet.