250th entry!
For my 250th entry, I thought I would celebrate. There are many things that I would like to celebrate as today has been a Good Day. The first few points are geeky, but don’t despair – there are non-geeky ones in the second half.
Firstly, Six Apart have released a new beta version of Movable Type, the software I use for this blog. Version 3.3 looks like it’s going to be great fun to play around with when I have a spare moment. Support for tags (sidetrack – will we look at sites which use tags a few years from now and muse “so 2006” to ourselves?) among other things, such as easier ways to manage pretty permalinks than my hacked-together .htaccess file. (As ever, if you didn’t understand that sentence then you’re normal.)
Secondly, the website I’m designing for the church I’m working for is progressing far quicker than I’d predicted yesterday. Yesterday morning I wrote a timetable for the next two weeks of coding. I had finished up until Saturday by mid-afternoon, and have even started on next week’s work. (I should probably correct my timetable.) Linked to this is the apparent lack of hacking needed for Internet Explorer – currently there’s only one design bug I can find and it looks reasonably straightforward (though I may find myself using conditional comments for the first time).
Thirdly, my attempts to learn Ruby have proved fruitful – after a couple of evenings of playing with it, I have learnt enough to write my first TextMate command.
#!/usr/bin/env ruby
text = STDIN.read
commentbegin = /^<!--/i
commentend = /-->$/i
if(commentbegin.match(text) && commentend.match(text))
print text.gsub("<!--","").gsub("-->","")
elsif(commentbegin.match(text))
print("#{text}-->")
elsif(commentend.match(text))
print("<!--#{text}")
else
print("<!--#{text}-->")
end
Given an input of the selected text or, if no text selected, the current line, this command adds HTML comments to HTML code, allowing you to quickly comment the text at the press of a few keys (Ctrl+Cmd+C for me). Not only that – if it detects the code is already commented, it removes the comments instead. So with one keyboard shortcut, you can comment and uncomment the selected text or current line. I’ve also written a version for CSS, and can easily write one for any language (including Ruby, PHP, Perl or Python, the four I occasionally work with). Before that though, I think I’m going to simplify it so instead of writing out the comments each time I can just add them as a variable, and only have to change them in one place when writing it for a different language. (Currently the variables are regexp only, so I’ll have a play to see what I need to do.)
Learning Ruby was worthwhile even if I only use it to write TextMate commands. That’s useful enough for me. TextMate is brilliant as it is, but being able to write new commands for it so easily is fantastic.
Fourth on my list of reasons why today is a Good Day is my progress with hiragana, the primary Japanese syllabary. I received a couple of books on hiragana through the post which I’ve started looking at, and I can now recognise and draw the first ten characters: あいうえおかきくけこ. Yes, I know typing them is cheating. Tonight’s lesson: さしすせそ – very easy as I know two of them already. Tomorrow morning is たちつてと – this time I know three of them. I’ll be finished in no time…. (There’s fourty-six basic ones then another fifty-something compound ones. Oh, and katakana, which has different symbols for every single hiragana – so that’s another hundred-odd. I won’t even start on the thousands of kanji, though I know three already: 一二 and 三.)
Fifth on my list: a good night’s sleep last night, waking up early but refreshed, and no hayfever to speak of all day. I’m now pleasantly sleepy and ready for bed after working for most of the day. May tomorrow be as productive and enjoyable.
Sixth and last thing: I’m reading two brilliant books. The first is Can we believe Genesis today? by Ernest Lucas, a professor at Bristol Baptist College and Oxford chemistry graduate. He has written a book exploring the philosophical, scientific, historical and literary issues to do with the beginnings of time and the book of Genesis, and has done it superbly. I bought this book after Denis Alexander’s talk, and it has clarified some of the issues that Dr Alexander mentioned briefly, repeated a lot of what was best in the talk, and gone further in many areas beyond biology. The most interesting thing worth mentioning so far is the difference between methodological naturalism and metaphysical naturalism. The former is what orthodox science is based on – that is, science is based on what can be observed and tested in nature. The latter goes one step further and says that nature is the only reality there is, as it is the only reality we can observe and test. This is philosophically a false link. Without a higher reality than that which we can observe and test, there is no philosophical grounds for human rationality and therefore for any scientific understanding whatsoever. That is a simplified explanation of what the book says in a much better but longer way.
The second book I’m reading I’ve only just started in preparation for my first ever sermon: God’s Way of Reconciliation: An Exposition of Ephesians 2 by D. Martyn Lloyd-Jones – the greatest preacher of the twentieth century. Before Doctor Who there was Doctor Lloyd-Jones, and the Doctor was the cornerstone of the evangelical church in Britain for many years, much like John Stott is today. He’s dedicated four chapters to the first three verses, and a cursory glance suggests them all to be fascinating. Roll on website completion so I can get properly started on this.
Matthew @ 13:11, June 8, 2006 to Diary | Comments (3)
Comments:
John
すごいマシウ! がんばってください。にほんごはかんたんだよ!
btw the cafe has just made some fresh cookies, still warm!
Comment added at 06:59, June 9, 2006
John
Wow! that was the fastest I’ve seen you move in a while! ;-)
Comment added at 07:04, June 9, 2006
Matthew
It was raining :p
Comment added at 07:06, June 9, 2006
Post a comment:
Most XHTML auto-generated via Markdown. Email addresses are required but will never be displayed. If you have a website (or want to link to someone else's) please enter it in the URL field. Otherwise, leave this blank.
If you have a TypeKey identity, you can sign in to use it here.