June 2006

Jason’s new law of string manipulation coding

Never do in 65 lines of messy string manipulation loops what you can accomplish in 3 lines of RegEx code.

Backreferences rock.

For the curious, I was trying to “englishify” hours of business information, so a set of 14 open/close strings would be translated into stuff like “Mon. - Fri.: 9 - 5″ or “Mon., Wed.: 9 - 5, Fri.: 8 - 4″ or “Mon - Wed., Fri.: 9 - 5, Sat - Sun.: 12 - 6″ or whatever, and the only think that rocks harder than backreferences in a task like this is TestDriven.NET. I was able to write the messiest code ever while testing it out, get it working, and then make it pretty and maintainable. It’s nice to be able to skip step and go straight to the pretty code, but sometimes, particularly with algorithms, it helps to push the bits around the screen for a while.

Technorati Tags: , ,

.Net
Programming

Comments (0)

Permalink

Building Scalable Web Sites

As follow up to my Carson Workshops post, I just noticed that Cal Henderson has a book out called Building Scalable Web Sites, and it’s on Safari.  Added.

Speaking of Safari, I like the new look, but I really miss the bookshelf management features.  In the old version, if you tried to add a book but your bookshelf was full, there was a workflow that would let you pick a book to remove and then add the new book in a single sequence.  Now I need to go remove the old book, find the new one again, and add it, but hey, there’s lots of plugs for “upgrade your account” so you can get more slots in your bookshelf.  I’m sure it’ll help with their upsell conversions,  but it still kinda stinks…

Just so I can end this post on a high note, I absolutely love the fact that I can type “Building Scalable Web Sites” into the address bar of FireFox and I get the O’Reilly page for the book.  Sure, it doesn’t work for everything (though “miserable failure” becomes funny all over again when it’s through the address bar), but it saves me a step for well known stuff.

Interweb++

Comments (0)

Permalink

July 19 is going to be Flick-tastic!

I just registered for Carson Workshops’ Building Enterprise Web Apps on a Budget seminar! Yay!

Seriously, I’m stoked. I’ve never seen a program outline so in sync with the kind of stuff I do on a daily basis, and Cal’s talk at the Future of Web Apps summit was one of my favourites from the set. Life’s awesome!

Better still, this might just be my rationalization for a new laptop. Oh yeah, I feel the rationalization train pulling up…

Interweb++

Comments (3)

Permalink

Riding the virtualization train

Remember that new hardware I wrote about the other day? The idea, at the time, was to run the Vista beta 2. Except it didn’t install. OK, if I run another OS I can do it in Virtual PC and forget all this dual boot nonsense, right? Er… Ubuntu doesn’t work in Virtual PC, at least on my computer - I get a kernel panic on the install. Debian is installing OK so far - I’m using the network install. We’ll see how it goes.

While I was in the installing mood, I decided to finally take advantage of Microsoft Virtual Server R2, which is so free I don’t even have to hunt for the MSDN disks. I think they only officially support Suse and Red Hat, but I’m (apparently) in a Debian mood:

Debian install, times 2
I ran Linux pretty much exclusively from 1995 to 1999, but I really haven’t kept up, so this will be exciting. All I know about Debian is it’s what Dreamhost runs (and even that I’m not sure about…)

I haven’t had the best of luck with these things as of late, but we’ll see how it goes. The end goal is to get Asterix working on one of the images to make use of that Unlimitel number I bought last month ($2.50 a month for a phone number is pretty decent, I reckon).

General
Debian

Comments (0)

Permalink

Wednesday quickies

Two quick thoughts today:

1) If you’re a company offering consulting services in the field of business development, you probably shouldn’t do your website in Microsoft Office.  I’m not being a design snob here (note the default WordPress template in use here); I just figure you’d want your site to work on the other 15% of the browsers besides Internet Explorer.

2) If you’re a company doing just about anyting online, the Mix 06 sessions are available online for free and are well worth a look.

biz

Comments (0)

Permalink

Desktop Tuesday Review of Mobile Monday

I made it out to Toronto’s inaugural Mobile Monday last night. There have been a lot of tech get-togethers sprouting up as of late (BarCamp, DemoCamp, Mesh, Social Tech, etc.), but this one was a bit different. A different crowd, to be sure, and definitely a different venue - it was held at the Fort York Armory building in the Officer’s Mess room, which was packed with military memorabilia.

The format was pretty straightforward - some introductory networking, then a talk, and then some more networking to round out the event, which lasted about 2 hours. I ran into a few people I knew, and met a few other great folks, so I’ll definitely go back next month.

The speaker was Michael O’Farrell from .mobi, and he provided an overview of the initiative. Basically, it’s a “trustmark” TLD that will enforce best practices for web pages that present to mobile devices. If you see a .mobi domain, it should display properly on your phone, and a lot of big players have gotten into it.

I’m having a hard time not being cynical, or at least frustrated, by this project. I know it’s great that a bunch of groups got together and decided on something that could actually be accomplished right now, but it reeks of compromise, and if the future of the mobile web is going to look the same as the current setup (I read some news through my phone the other day. It hurt.), I’m incredibly disappointed.

And that’s my biggest problem with .mobi - today, most PC-based web sites are coded to a core set of browsers, and things like Netscape 4 compatibility doesn’t come up much. If .mobi is going to be a trustmark, it implies that older phones will still work 5 years from now. While Michael mentioned that some countries have a refresh cycle of as little as 6 months per phone, the Canadian market is subsidized by the carriers, with a typical refresh of every 2 or 3 years. I’d hope that the state of mobile data improves at least a little in that time, but we may not be able to see it if everyone’s still coding to the lowest common denominator, effectively turning mobile data into the next Minitel.

I didn’t get a chance to hear if/how this was being addressed, but I hope it is. It’d be a real shame if this initiative just turns into an excuse for phone manufacturers and carriers to stop innovating.

Technorati Tags: ,

Mobile

Comments (0)

Permalink

Simple mechanics elude me

I paid for a bunch of my schooling by working with computer hardware, installing this and that, etc, but I really haven’t gotten into it in recent years - in fact, the lack of options was the exact reason I bought my first iMac in 2001.

Lately though, it’s become really obvious that I’m not part of the hardware scene. Sure, I can replace a dead laptop drive (the Powerbook has an insane number of screws, but it had the same number when I was done with it, so I count myself as semi-skilled), but I tend to make (hopefully) common mistakes like learning about SATA drives by accidentally buying one and taking it home to find out it doesn’t fit (to be fair, it was the store’s mistake - I did ask for IDE).

A drive enclosure failure convinced me to go shopping at lunch today for some new parts - I want to try the new Vista beta, so I bought a new 250 gig drive and a DVD burner. That was pretty easy. Putting them into the case, of all things, turned out to be challenging.

I’ve got what’s called a Cooler Master Centurion 5 (CAC-T05) case, which is, uh, a case… Like most cases I installed in my youth, it has face plates in front of the drive bays that aren’t being used. The new DVD burner needed a home, so one had to pop out. In the past, they were the snap-in kind, and I’d just pull them out, but these ones wouldn’t give, even after bending them a bit (they’re metal). I have a history of breaking things only to discover the “missing” screw immediately afterwards, so I went online to see if there was a guide. For a case. A frickin’ chunk of metal that merely encloses the thousands of dollars of space-age electronics. That I couldn’t figure out.

Anyway, the good news is that I wasn’t alone - I saw several reviews that commented on the face plates. None had a picture. The Cooler Master site didn’t have much to offer either: even the “how do I mount my drive bay devices to the case” question in the FAW just said “you have to dismount the front panel (frame) of the chassis.” Yeesh.

The answer, it turns out, was in the “How do I clean the perforated screen for the C5’s front panel?” answer. I’ll never understand PC hardware again. Maybe it’s a zen thing; a tidy case is a productive case or some such.

You can see the obvious solution here, if you’ve bothered to read this far. Just hover the mouse over the little S at the end of question 1.

Technorati Tags: ,

General

Comments (1)

Permalink

Printing from Tiger to a shared Windows printer

As a Tiger-friendly addendum to these fine instructions for printing from an OS X machine to a shared Windows printer (our 2K3 server is always on, while the Macs are sometimes asleep), one must do the following to add a printer:

  1. Select the Printer Setup Utility in Applications — Utilities.
  2. Click on the Add button in the toolbar.
  3. Click on the More Printers… button at the bottom of the dialog.
  4. On the top drop down, select Windows Printing. The other dropdown will vary depending on your network (I picked Workgroup), and then pick out your server and printer from the list. A printer model of Generic seems to work fine.

Technorati Tags: , , ,

OS X
Networking

Comments (0)

Permalink

Social Tech Spring Social (partial) recap

I had a great night out at the Social Tech Brewing Co’s spring social.  When I go to normal tech-related meetups I usually have a hard time (still!) conveying what I do for a living, but when it’s a gathering to discuss technology and not-for-profits, I’m right at home.  There’s probably a lesson there somewhere.  Oh, and there was beer.
As it was my first meeting, I don’t know how the turnout compared to other events, but given the topic, I thought 12 or so was decent, and I’ve now got a lot of conversation to digest and follow up on.  Due to an earlier pants-related mishap, I was without pen and paper, so here’s a quick recap of the links I can remember:

…and others.  Apologies for my lack of record keeping, perhaps others will blog about it.

Technorati Tags:

Non Profits

Comments (0)

Permalink

Dreamhost fixes the broke stuff, finally

The latest Dreamhost newsletter announced that they’re doing away with CPU usage limits on their shared plans.

It’s about time.

This wasn’t ever an officially posted policy, as far as I can tell (the newsletter says that they never had a set threshold or an admin facility where you can monitor it), but I was seriously stressed out late last year when I started getting daily emails from them reporting that my CPU usage (primarily from VP) was too high, and I needed to either tweak my app or buy a dedicated server.

I didn’t mind the blackmail so much, since I’d been thinking about getting a dedicated box for a while (I’ve since shelved, er, racked the plan), but the funny part came around when I wrote to them for a quote.  It turned out that they didn’t have any available. Their data centre was full.

Shortly after that, I stopped getting emails about CPU, and now the unofficial policy is officially dead.

I’ve been with DH since 2001, and overall they’ve been awesome.  Sometimes you get a hiccup like the one above, but it was really great to see them step up and take care of the problem.

Technorati Tags: Dreamhost,

Dreamhost

Comments (3)

Permalink