16/09/2010 at 17h22
If you still have commits with messages like ‘Oops, I forgot this file’, you’re doing something wrong. Just use
git commit --amend.
But I don’t use git!
You really should use git. Oh, for so many reasons, just one of them being the existence of
git commit --amend.
But we use Subversion at work.
You really should use git-svn. All the distributed, offline, history-rewriting goodness of git, and you can still commit to your central repository (after you used
git commit --amend to fix your commit).
But I made other commits in between.
There are more complex tools in git. You probably want to use
git rebase --interactive.
But I already pushed my changes upstream.
You’re still doing it wrong. You should have run your tests before pushing your changes.
But all my tests passed.
You’re not really testing properly then, are you?
Your argumentation is wrong.
You’re right. The tests are a red herring.
Let me think about it.
You should also have checked for any untracked and uncommitted files, using
But some of the files I forgot to check in were ignored by git.
Well, you’re doing that wrong then.
08/09/2010 at 05h22
Sometimes we say something that sounds right but is in fact the exact opposite of what we mean.
So it’s entirely possible that a talk you started presenting a year and a
half ago is so different now as to be almost indistinguishable from the original.
Andy Budd – 7 Ways to improve your public speaking
27/06/2010 at 21h10
In some of my Rails projects, I have been a contented user of the
memory_test_fix plugin. However, I rather dislike the use of Rails plugins, because I find updating them later on rather difficult, and I don’t like including external libraries in my own source tree (hence, I don’t like the practice of vendoring gems much either). When the concept of ‘gem plugins’ was introduced, I created a fork on github and created the necessary files to build the plugin as a gem, and have Rails properly load it.
15/04/2010 at 05h42
You can implement a programming language in assembly. C is an example. This
has the advantage of being able to leave your language and use assembly
when necessary. You drop down to assembly for speed.
You can also implement a programming language in lisp. CLPython is an
example. This has the advantage of being able to leave your language and
use lisp when necessary. You drop down to lisp for expressiveness.
If lisp is the ultimate language, does this not make it the best option for
implementing other languages?
11/04/2010 at 12h22
Because URL shortening services can go away at any time, I decided
to install my own. In the spirit of your-own-dogfood, and to make hacking
it as enjoyable as possible, it had to be in Ruby (this ruled out
YOURLS, which otherwise does exactly what I want). There are tons
of URL shortening projects in Ruby on GitHub. Unfortunately, they all
lacked one feature: password protection for the adding of URLs. In the end,
I picked a nice simple one and changed it to my liking. The result can be
found in my fork of turl.
Why is this safer than using one of the existing services? The reason tr.im
went under is that they couldn't make it pay for itself, and there was a
lot of abuse from spammers. Both problems are absent for my own service: I
don't need to make any money off of it, and I'm the only one who can create
new short URLs.
Some observations on developing this software:
For a small project like this, putting everything in one file is very,
very nice. Ramaze allows you to do this (as do other frameworks),
Ruby on Rails does not. I wonder how seamless the transition is if
your project starts small like this and then gradually becomes big enough
that you need to split it into different files.
Ramaze's documentation needs some love. Everything is documented well in
principle, but with the split-off of the
innate library, it took me
ages to find the documentation for the
a method and friends.
I really like the idea of
[Sequel][sq]::Model where you define the
table schema right in the model. I'm not sure how or how well it works
with migrations, but for a small project like this, it's nice and clean.
Ramaze could use some more options for session storage. In particular,
something file-based shouldn't be too much to ask for. I'm using the
LocalMemCache option, and keep having to log in.
I really like Ramaze, and am eager to try Sinatra. I have been
ignoring these more light-weight frameworks for far too long.
18/02/2010 at 19h15
Efficiency without ethics is psychopathic
Pecking Order by Peter Lennox via Kottke
02/02/2010 at 09h20
Daring Fireball quotes Zeldman:
Flash won’t die tomorrow, but plug-in technology is on its way out.
Exactly. And good riddance.
31/01/2010 at 12h18
Today I got an email from someone using a hotmail account. At the bottom was the following text:
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
Sign up now.
The text “Sign up now” links to a URL that is completely opaque. Not in the old-style non-Web-2.0 company website way, where at least the domain name would tell you it’s a legitimate link to one of the company’s websites. No, it’s domain part was
If we/they/whoever expect people to click such links, how can we ever expect people stop clicking links like
It’s almost as bad as training people to give their email login and password to any site that asks them to.
29/01/2010 at 12h47
Learning about monads is hard, and there seems to be no magic pill. Probably one reason is that they have several different uses. Many articles focus on one of those uses, making it hard to get the whole picture. On the other hand, articles that try to directly explain what monads are leave the reader wandering what they're good for. Some links.
- Brent Yorgey argues that any shortcut by focusing on a particular metaphor (e.g., monads are like burritos) will not work.
- Mark Dominus argues why monads are indeed like burritos.
- [Monads as Containers][cont] fits in nicely by abstracting away from burritos (or space suits) to containers. It goes on to talk about how this relates to IO and other uses for monads. I'm still working on reading through this article.
- sigfpe starts from the other end, showing how certain needs could automatically lead to monads. I haven't finished that one either, but so far it's been very insightful.
- I also found The Continuation Monad in Clojure very insightful. Again, it focuses more in the use and implementation, rather than abstract theory. I'm not yet sure whether the insights I myself got from it are actually correct. More on that later, perhaps.
13/12/2009 at 18h58
You have been running a Typo blog [since 2005][since], but you still can’t
quite get your Apache configuration right. In particular, you still get the
Not found: http://www.matijs.net/blog/2005/07.html/24/from-bryar-to-typo
Note the weird