The Good Soldier Skat is a great essay in which I found much to sympathise with. In it Richard Hillesley contrasts a traditional regulated bureaucratic business with the freedom of open source projects. It's not so much a case for open source software as the idea of trusting and freeing your workers. Companies really should look to successful open source projects to see how to organise and motivate their own teams. It means letting go of some control, which is a risk, but the benefits could be much greater.
Via programming.reddit
See also The Success of Open Source and Innovation Happens Elsewhere
Rigidly defined areas of doubt and uncertainty.
Friday, March 23, 2007
Monday, March 19, 2007
The Pyramids are crap
The Pyramids are crap. Egyptians should be embarrassed by these massive monuments to stupidity. They're a constant reminder of how utterly useless the ancient Egyptians were at architecture. What's the very simplest way to build a tall structure that won't fall over? Pile the bricks on top of each other. And that's essentially what the pyramids are. Big piles of bricks.
The only thing you should be impressed by is the fact that the Pharaohs had such resources and power at their command that they could be so wasteful with them. I'm sure the slaves worked as hard as any man can, and the pyramid building operation was run as fast as it possibly could be. All that hard work. What a waste. It only goes to show that hard work doesn't pay off.
I'm not going to build any pyramids.
The only thing you should be impressed by is the fact that the Pharaohs had such resources and power at their command that they could be so wasteful with them. I'm sure the slaves worked as hard as any man can, and the pyramid building operation was run as fast as it possibly could be. All that hard work. What a waste. It only goes to show that hard work doesn't pay off.
I'm not going to build any pyramids.
Thursday, March 01, 2007
Movie title fun
[From The Jay]
Looks like the Web 2.0 meme has drifted into the movie business. Surely this is the first movie with a minor version number? A good move in my view, much easier to keep track of than all re-remasterings and directors cuts of directors cuts.
Looks like the Web 2.0 meme has drifted into the movie business. Surely this is the first movie with a minor version number? A good move in my view, much easier to keep track of than all re-remasterings and directors cuts of directors cuts.
Sunday, February 25, 2007
Ubiquitous version control
The more I use it the more applications I find for version control, and each time I find a new application it alters the way I work.
In the first instance, version control is just a safe place to store your code and keep track of changes between revisions.
If you use a concurrent versioning system such as svn then it also becomes a tool for collaborative working. Two people can work on the same file and each time one of them commits their work to the repository the other can automatically incorporate the changes in their copy of the file.
I've started using the same functionality to manage staging and live versions of websites. The web server connects to svn just like any other user and can update its copy of the site to the latest version with a single update command. Bye bye ftp.
I sometimes work from home and it's very useful to be able to pick up the exact code that I've been working on at the office. Martin Fowler takes this even further in MultipleDesktops. In my latest project I've set up the repository with not just the code, but also the specification documents, the HTML pages I need to get started and my own notes and documentation.
One problem I have with using version control for remote working is that I don't want to commit broken code. Then I watched this screencast on Atomic Coding (BTW aren't screencasts great). It's very much in the spirit of agile and test driven development, and is made easier by using dynamic languages without a compilation cycle. The trick is to make small steps, where each step produces working code of some description. When the time between commits is no more than a couple of hours there's not much opportunity to leave code where I can't get at it remotely. Another benefit of atomic coding is that commits act as a kind of bookmark so I can keep track of where I am when I'm switching between several projects, which is often the case when your working on web site timescales.
I don't think I'll have hard time adapting to the atomic approach. The biggest change will be at the start of a project where I usually write a lot of code before running anything. To code atomically I'll have to make sure each class runs before I move on to the next one.
In the first instance, version control is just a safe place to store your code and keep track of changes between revisions.
If you use a concurrent versioning system such as svn then it also becomes a tool for collaborative working. Two people can work on the same file and each time one of them commits their work to the repository the other can automatically incorporate the changes in their copy of the file.
I've started using the same functionality to manage staging and live versions of websites. The web server connects to svn just like any other user and can update its copy of the site to the latest version with a single update command. Bye bye ftp.
I sometimes work from home and it's very useful to be able to pick up the exact code that I've been working on at the office. Martin Fowler takes this even further in MultipleDesktops. In my latest project I've set up the repository with not just the code, but also the specification documents, the HTML pages I need to get started and my own notes and documentation.
One problem I have with using version control for remote working is that I don't want to commit broken code. Then I watched this screencast on Atomic Coding (BTW aren't screencasts great). It's very much in the spirit of agile and test driven development, and is made easier by using dynamic languages without a compilation cycle. The trick is to make small steps, where each step produces working code of some description. When the time between commits is no more than a couple of hours there's not much opportunity to leave code where I can't get at it remotely. Another benefit of atomic coding is that commits act as a kind of bookmark so I can keep track of where I am when I'm switching between several projects, which is often the case when your working on web site timescales.
I don't think I'll have hard time adapting to the atomic approach. The biggest change will be at the start of a project where I usually write a lot of code before running anything. To code atomically I'll have to make sure each class runs before I move on to the next one.
Sunday, January 14, 2007
How not to advertise software
"If programmers built planes" shows a team of engineers working to finish a plane in mid flight. A rather unfortunate metaphor. I thought it was a parody, but apparently EDS paid for this.
It's true that requirements change and software grows and evolves with business, but good programmers make sure it never has to fly with gaping holes in it's hull, or an untested undercarriage. The plane metaphor states the problem very well, but doesn't show how EDS think they can solve it. How do you write an exciting advert around ideas like test driven design, encapsulation and refactoring? Something I should think about, because they're ideas I need clients and my non-technical colleagues to understand and appreciate.
It's true that requirements change and software grows and evolves with business, but good programmers make sure it never has to fly with gaping holes in it's hull, or an untested undercarriage. The plane metaphor states the problem very well, but doesn't show how EDS think they can solve it. How do you write an exciting advert around ideas like test driven design, encapsulation and refactoring? Something I should think about, because they're ideas I need clients and my non-technical colleagues to understand and appreciate.
Friday, August 04, 2006
It's just a ride
Today's XKCD comic is inspirational:

As I mentioned in my comment on Will's blog, the fact that anything I say or do on the internet can potentially come back to me is always at the back of my mind. I should probably not let that worry me so much and get on with enjoying this moment.
As I mentioned in my comment on Will's blog, the fact that anything I say or do on the internet can potentially come back to me is always at the back of my mind. I should probably not let that worry me so much and get on with enjoying this moment.
Tuesday, August 01, 2006
Fixing the back button in ajax
I didn't think this was possible, but thanks to Mike Stenhouse's article in the Content With Style blog and the accompanying demo I can now see how to overcome my biggest objection to ajax. The problem, as I mentioned in my last post, is that most ajax sites break the normal user interface conventions of the web by effectively disabling the back button. If you press it on an ajax page such as Google maps you don't undo the last step you made, you exit the application entirely and lose the history of all the clicks since you entered it. I thought this was impossible to fix because to make a new entry in the browser history you need to change the URL of the page, which loads a whole new page for the new URL.
The key insight of Mike's article is that it's possible to change the URL without reloading the page. How? With a page anchor: a link to a particular point in the same page. Changing the URL to point to a different part of the same page doesn't force a page reload, but it does add an entry to the history buffer. By adding '#1', '#2', '#3' etc to the end of the URL you can track every click in an ajax application.
Now, I'm very interested in continuation based web frameworks. The idea was pioneered by Paul Graham, and more recently implemented in Avi Bryant's Seaside framework. Continuation frameworks allow the creation of stateful web applications without using ajax. A continuation is a representation of the state of the whole application at a point in time. When you call a continuation it's like returning to that state. By encoding a reference to a continuation in a URL you can return your application to the state it was in at the time the page was generated. Pressing the back button becomes the equivalent of an undo operation.
My visualisation of a continuation based framework is one where a second dimension of time is added to the URL's first dimension of space. eg http://www.alexfarran.com/#2006-08-01-16:41:53. With ajax now able to track each click I could couple each ajax state to a continuation, and recreate it at any time on any machine. I think that would be cool.
The key insight of Mike's article is that it's possible to change the URL without reloading the page. How? With a page anchor: a link to a particular point in the same page. Changing the URL to point to a different part of the same page doesn't force a page reload, but it does add an entry to the history buffer. By adding '#1', '#2', '#3' etc to the end of the URL you can track every click in an ajax application.
Now, I'm very interested in continuation based web frameworks. The idea was pioneered by Paul Graham, and more recently implemented in Avi Bryant's Seaside framework. Continuation frameworks allow the creation of stateful web applications without using ajax. A continuation is a representation of the state of the whole application at a point in time. When you call a continuation it's like returning to that state. By encoding a reference to a continuation in a URL you can return your application to the state it was in at the time the page was generated. Pressing the back button becomes the equivalent of an undo operation.
My visualisation of a continuation based framework is one where a second dimension of time is added to the URL's first dimension of space. eg http://www.alexfarran.com/#2006-08-01-16:41:53. With ajax now able to track each click I could couple each ajax state to a continuation, and recreate it at any time on any machine. I think that would be cool.
Thursday, July 20, 2006
When ajax attacks
O'Reilly have done something stupid. They've rewritten their Safari online books site as an ajax application, now my back button works only intermittently and the forward button not at all. Plain old HTML is perfect for reading documents online - that's what it's for! Their new ajax based system is harder to use. To regain the usability of the old site they'll have to re-implement the browser history in javascript. And for what benefit? Faster page loads, apparently. Hardly a priority unless you're some kind of demon speed reader.
Really, there are one or two applications where ajax is very useful, but that doesn't mean you have to use it everywhere.
Update: It looks like they've de-ajaxed the chapter select navigation. It doesn't work without javascript turned on, so I think they must be encoding data in the URL that the page then uses to dynamically request it's content from the server.
I mailed O'Reilly support and they told me you can still access the original non-ajax site at http://access.safari.oreilly.com
Really, there are one or two applications where ajax is very useful, but that doesn't mean you have to use it everywhere.
Update: It looks like they've de-ajaxed the chapter select navigation. It doesn't work without javascript turned on, so I think they must be encoding data in the URL that the page then uses to dynamically request it's content from the server.
I mailed O'Reilly support and they told me you can still access the original non-ajax site at http://access.safari.oreilly.com
Monday, June 26, 2006
My wheel
After riding the London to Brighton ride last week my already slightly wobbly rear wheel was looking decidedly out of true. Truing a wheel is in my opinion the trickiest maintenance task you can do with a bike. Every one of the 36 spokes needs it tension minutely adjusted until the wheel is straight and round to millimetre accuracy. It took me a while. I don't have a truing stand, so I used the brakes and a piece of card taped to the frame to as a guide. The procedure is pretty simple:
- Rotate the wheel to a point where it's to far to the left or right, or a too far in or out.
- Find the mid point of the imperfection and mark it with a small piece of electrical tape attached to the nearest spoke.
- Adjust the tension of the surrounding spokes on either or both sides of the wheel.
- Repeat....
Friday, June 16, 2006
HOWTO: Add libtidy support to PHP5 in Ubuntu.
Oddly, the default PHP5 package on Ubuntu doesn't have support for the HTML tidying library, libtidy (bug #41690). I followed the instructions in the Debian APT Howto and the Ubuntu Document Storage Facility and replaced the installed package with one I compiled myself from the source. On the off chance someone else finds it useful I've posted the steps I took here:
Create a directory for compiling the source code in.
Get the source code package from the source repository. (Note you don't need root privileges for this step as you're not installing anything, just downloading the source to your personal directory).
Install the other packages needed by the source code to compile.
In the downloaded source code there is a file
and install the newly created packages.
Apache is automatically restarted as part of the build process, and a quick check with
UPDATE
When the package manager next downloads the latest version of php5, your changes will be overwritten. So be careful what boxes you tick when it asks you what to update. To get the latest version with your changes added to it repeat the above process. Easy enough for a simple one line change, but for bigger changes you should create a diff file, or manage your version in svn.
Create a directory for compiling the source code in.
$ mkdir source
$ mkdir source/php5
$ cd source/php5/
Get the source code package from the source repository. (Note you don't need root privileges for this step as you're not installing anything, just downloading the source to your personal directory).
$ apt-get source php5
Install the other packages needed by the source code to compile.
$ sudo apt-get build-dep php5
In the downloaded source code there is a file
php5-5.1.2/debian/rules. Add --with-tidy to the end of the list of options in COMMON_CONFIG. Now compile the modified source.
$ cd php5-5.1.2
$ dpkg-buildpackage -rfakeroot -uc -b
and install the newly created packages.
$ cd ..
$ sudo dpkg -i *.deb
Apache is automatically restarted as part of the build process, and a quick check with
phpinfo() shows the new compile date and lists the tidy module.UPDATE
When the package manager next downloads the latest version of php5, your changes will be overwritten. So be careful what boxes you tick when it asks you what to update. To get the latest version with your changes added to it repeat the above process. Easy enough for a simple one line change, but for bigger changes you should create a diff file, or manage your version in svn.
Monday, May 15, 2006
Google is my spam filter
My email and hosting provider's (ukfsn.org) spam filter is not particularly effective any more so I've outsourced the task to Google mail. I like Google's mail app, but I don't want to be reliant on it. I don't want to have to abandon my email address or stop using my favourite email client. Fortunately Google have made gmail flexible enough for me to use it completely transparently. I've configured ukfsn to redirect all my email to my gmail address, and gmail to allow my PC to fetch email over the POP3 protocol. Another useful feature is the 'Send mail as:' option in gmail settings. This means I can log on to gmail and still send email from my preferred email address, rather than the gmail address. Useful when I'm away from my PC.
The spam filter is working nicely. No false positives yet. I just need to import all my filters to gmail to seperate out all the mailing list posts, and at some point I might want to figure out how best to upload my email archive.
The spam filter is working nicely. No false positives yet. I just need to import all my filters to gmail to seperate out all the mailing list posts, and at some point I might want to figure out how best to upload my email archive.
Thursday, April 13, 2006
Speed learning tool
I've started using supermemo.net to help me learn Ruby. You take notes in a question and answer format, then the software works out how often you should be asked each question based on how well you answer. I find that taking notes in a Q&A format is a good idea in itself because it exercises active recall rather than passive recognition. The repeat frequency calculations should take some of the drudgery out of memorisation by making the exercise more efficient.
Thursday, March 23, 2006
I heart Ruby
I've been working my way through the Pickaxe book, mostly over a nice coffee and panini at Caffé Nero, and I'm really enjoying what I'm finding out about Ruby. It takes the best ideas from more academic languages such as Lisp and Smalltalk and puts them in a practical setting, with a well designed expressive syntax. It gives me a great feeling of liberation to know I that all these wonderful new toys (full OO, continuations, closures, introspection, metaprogramming) are within easy reach. I can see myself devoting a lot of time to Ruby. I'm sure it's a worthwhile investment.
Friday, February 24, 2006
Analysis Paralysis
Yesterday I was thinking myself into a corner about the best way to refactor some code I'd written. The thoughts just went round and round in my head with no hope of conclusion. This can get pretty tiring after a while, so I went for a short walk. While walking, the facts seemed to order themselves and present me with a couple of simple options to choose from. So now I can just get on with implementing them.
I've just finished reading Blink, and that surprised me with some interesting stories about the power of the unconscious mind. Sometimes consciously thinking about something doesn't work as well as leaving your unconscious to get on with it. I think I might do well to heed Ap Dijksterhuis's advice in this New Scientist article 'Sleeping on it' best for complex decisions
I've just finished reading Blink, and that surprised me with some interesting stories about the power of the unconscious mind. Sometimes consciously thinking about something doesn't work as well as leaving your unconscious to get on with it. I think I might do well to heed Ap Dijksterhuis's advice in this New Scientist article 'Sleeping on it' best for complex decisions
“At some point in our evolution, we started to make decisions consciously, and we’re not very good at it. We should learn to let our unconscious handle the complicated things,”
Saturday, July 16, 2005
Perfection vs performance
This essay The psychology of learning by Robert Strandh is worth reflecting on. He draws attention to people being too 'performance oriented' - sticking to what they know will give them immediate results, at the expense of discovering better ways of working. I'm generally more 'perfection oriented'. I'm interested in learning for its own sake, particularly when it comes to computers. However, I have been guilty of dismissing ideas, tools and languages I haven't spent enough time to understand. Maybe I'll give them another look, or at least acknowledge my ignorance.
Of course, and this is something he doesn't mention, you can be too perfection oriented. The trick is knowing the difference between the two attitudes and choosing the right one at the right time.
Of course, and this is something he doesn't mention, you can be too perfection oriented. The trick is knowing the difference between the two attitudes and choosing the right one at the right time.
Thursday, July 07, 2005
Oh no, not again!
So terrorist bombings have become a fact of daily life once again. That's just brilliant.
Wednesday, June 08, 2005
Apple, Intel and Hollywood
Wired and Bubblegeneration have the most insightful commentary on Apple's decision to switch to Intel processors. As Cringely has pointed out several times, Apple wants to have the same success as a digital movie distributor as it has had as a digital music distributor. Hollywood won't cooperate without strong DRM protection which Intel can provide.
Strategies that acknowledge that digital reproduction and modification is easy and inevitable, and work with that will be more productive than those that waste energy fighting against it. Can Apple be a platform for all players, or have they chosen the losing side?
Strategies that acknowledge that digital reproduction and modification is easy and inevitable, and work with that will be more productive than those that waste energy fighting against it. Can Apple be a platform for all players, or have they chosen the losing side?
Wednesday, May 25, 2005
A message from Bill
"I’m dead, you’re in hell. Ironic how that turned out."From http://www.whatwouldbillhickssay.com/
Bill Hicks
Sunday, May 22, 2005
Revenge of the Sith
Now that was more like it! A Star Wars movie with a bit of passion at last! That was what I wanted to see when The Phantom Menace came out. Did we really have to go through episodes I and II to get here? It seems now that they were only backstory to the main event. Take out the filler and you're left with no more than an hour of material - if that.
What a program is
"Programs must be written for people to read, and only incidentally for machines to execute."
- Abelson & Sussman, SICP, preface to the first edition
These words ring very true to me right now, as I read through reams of open source code composed of deeply nested six page long if statements, sparse one-line comments and a smattering of global variables for extra flavour.
My own formulation of the same sentiment might be "Programs are documents used by programmers to communicate their ideas to each other, which also happen to be readable by computers." Or more briefly "Code is documentation".
Now any book that starts with a statement like that must be worth reading. It's been on my to-read list for a long time, but never really seemed essential. Now I think it is. The systems I work with are getting bigger and more complex, so I need more guidance on how to deal with that.
- Abelson & Sussman, SICP, preface to the first edition
These words ring very true to me right now, as I read through reams of open source code composed of deeply nested six page long if statements, sparse one-line comments and a smattering of global variables for extra flavour.
My own formulation of the same sentiment might be "Programs are documents used by programmers to communicate their ideas to each other, which also happen to be readable by computers." Or more briefly "Code is documentation".
Now any book that starts with a statement like that must be worth reading. It's been on my to-read list for a long time, but never really seemed essential. Now I think it is. The systems I work with are getting bigger and more complex, so I need more guidance on how to deal with that.
Subscribe to:
Posts (Atom)