Monthly Archives: May 2010

Bicycling in Rain and Mud

I recently posted here about bicycling in the mud and rain, and got some good suggestions (and also on the icebike mailing list). I eventually decided to replace my current bike (Trek 7.3FX) with a Specialized Tricross Sport Triple. As I mentioned in the bike store, “it seems odd to spend this kind of money on a bike only to ride it through mud and sand.” Another customer overheard and said, “It sure does — but don’t worry, it’ll be fine!”

But on the other hand, I figure that it is probably realistic for me to ride it around 3600 miles (5793 km) per year. At that rate, it will pay for itself in reduced car costs in about a year.

I picked it up last Friday, and on Saturday moved my accessories (headlight mount, tail light, water bottle cage, etc.) to it. The Bontrager Back Rack I from the 7.3FX did not fit well, so I ordered the Specialized Tricross Rack Set, which did fit well (I’m not using the front rack though).

This has been a wet week. I rode Thursday when it had stopped raining about 20 minutes before I left in the morning, and we got more rain in the afternoon. Although both the Tricross and the 7.3FX have 700x32C tires, even the factory tires on the Tricross performed far better in mud than the 7.3FX ever did — and I can still go much more wide if I feel it necessary. Actually, somewhat to my surprise, I didn’t really have a problem with kicking up mud; my enemy turned out to be kicking up sand. It didn’t really damage anything, and I had to try not to cringe as I saw the sand hitting the chain, etc. I rinse it off when I get to my destination, and clean/lubricate the chain frequently in these conditions.

I haven’t yet been on the bike during an active rain, but from what I’ve done so far, I think it will be fine. So at this point, there’s very little that will prevent me from riding.

Time to learn a new language

I have something of an informal goal of learning a new programming language every few years. It’s not so much a goal as it is something of a discomfort. There are so many programming languages out there, with so many niches and approaches to problems, that I get uncomfortable with my lack of knowledge of some of them after awhile. This tends to happen every few years.

The last major language I learned was Haskell, which I started working with in 2004. I still enjoy Haskell and don’t see anything displacing it as my primary day-to-day workhorse.

Yet there are some languages that I’d like to learn. I have an interest in cross-platform languages; one of my few annoyances with Haskell is that it can’t (at least with production quality) be compiled into something like Java bytecode or something else that isn’t architecture-dependent. I have long had a soft spot for functional languages. I haven’t had such a soft spot for static type checking, but Haskell’s type inference changed that for me. Also I have an interest in writing Android apps, which means some sort of Java tie-in would be needed.

Here are my current candidates:

  • JavaScript. I have never learned the language but dislike it intensely based on everything I have learned about it (especially the diverging standards of implementation). Nevertheless, there are certain obvious reasons to try it — the fact that most computers and mobile phones can run it out of the box is an important one.
  • Scheme. Of somewhat less interest since I learned Common Lisp quite awhile back. I’m probably pretty rusty at it, but I’m not sure Scheme would offer me anything novel that I can’t find in Haskell — except for the ability to compile to JVM bytecode.
  • Lua — it sounds interesting, but I’m not sure if it’s general-purpose enough to merit long-term interest.
  • Scala sounds interesting — a OOP and FP language that compiles to JVM bytecode.
  • Smalltalk. Seems sad I’ve never learned this one.
  • There are some amazing webapps written using Cappuccino. The Github issue interface is where I hear about this one.
  • Eclipse. I guess it’s mostly not a programming language but an IDE, but then there’s some libraries (RCP?) or something with it — so to be honest, I don’t know what it is. Some people seem very excited about it. I tried it once, couldn’t figure out how to just open a file and start editing already. Made me feel like I was working for Initech and wouldn’t get to actually compile something until my TPS coversheets were in order. Dunno, maybe it’s not that bad, but I never really understood the appeal of something other than emacs/vi+make.
  • A Haskell web infrastructure such as HSP or hApps. Not a new language, but might as well be…

Of some particular interest to me is that Haskell has interpreters for Scheme, Lua, and JavaScript as well as code generators for some of these languages (though not generic Haskell-to-foo compilers).

Languages not in the running because I already know them include: OCaml, POSIX shell, Python, Perl, Java, C, C++, Pascal, BASIC, Common Lisp, Prolog, SQL. Languages I have no interest in learning right now include Ruby (not different enough from what I already know plus bad experiences with it), any assembly, anything steeped in the Microsoft monoculture (C#, VB, etc.), or anything that is hard to work with outside of an Emacs or vim environment. (If your language requires or strongly encourages me to use your IDE or proprietary compiler, I’m not interested — that means you, flash.)

Brief Reivews of Languages I Have Used

To give you a bit of an idea of where I’m coming from:

  • C: Not much to say there. I think its pros and cons are well-known. I consider it to be too unwieldy for general-purpose use these days, though find myself writing code in it every few years for some reason or other.
  • Perl: The first major interpreted language I learned. Stopped using it entirely after learning Python (didn’t see any advantage of Perl over Python, and plenty of disadvantages.)
  • Python: Used to really like it. Both the language and I have changed. It is no longer the “clean” language it was in the 1.5 days. Too many lists-that-aren’t-lists, __underscorethings__, etc. Still cleaner than Perl. It didn’t scale up to large projects well, and the interpreted dynamic nature left me not all that happy to use it for some tasks. Haven’t looked at Python 3, but also it probably isn’t ready for prime time yet anyhow.
  • Java: Better than C++ for me. Cross-platform bytecode features. That’s about all that I have to say about it that’s kind. The world’s biggest source of carpal tunnel referrals in my book. Mysteriously manages to have web apps that require 2GB of RAM just to load. Dunno where that came from; Apache with PHP and mod_python takes less than 100M.
  • Haskell: A pretty stellar mix of a lot of nice features, type inference being one of the very nice ones in my book. My language of choice for almost all tasks. Laziness can be hard for even experienced Haskellers to understand at times, and the libraries are sometimes in a bit of flux (which should calm down soon). Still a very interesting language and, in fact, a decent candidate for my time as there is some about it I’ve never picked up, including some modules and web toolkits.
  • OCaml: Tried it, eventually discarded it. An I/O library that makes you go through all sorts of contortions to be able to open a file read/write isn’t cool in my book.

Bicycling Update

I’ve been bicycling to work for awhile now. It’s become pretty much routine for dry days. I can reliably ride the 10 miles to work in less than an hour, even with heavy winds.

My biggest enemy right now: rain. My first few miles are on gravel and sand roads, which aren’t maintained to the highest of standards. When it rains, there will be mud. I ride a Trek 7.3FX, which I bought with the idea of just riding when it’s dry. It works quite well for that. But its slick tires don’t work so well in mud. Plus our mud is sticky, and the tires pick it up, then deposit it on the frame that goes around the wheel and the brake arm. So I have a mess to clean up.

My current dilemma is: do I buy a second bike for use when it’s wet, or there’s a chance of rain? My 7.3FX can’t use tires that are very wide, and a different bike of course could. There would be expense involved, obviously, but I would really like to be able to ride more often than I can now. Winter was pretty damp here and I didn’t get to ride much at all over the winter months. Or, would different tires plus fenders do the trick on the 7.3FX? (I’m thinking not.)

If I do get a different bike, then the question would be whether to sell the 7.3FX. I really like that bike, and imagine it would be faster on the 7 miles or so of paved roads that I ride every day. Perhaps I’d keep it as a fair weather or long-distance bike.

I plan to visit the bike shop tonight and see what my options are.