uwMike.com

I'm in Waterloo at the moment, and next available to work in September 2008.

Archive for the 'Geekery' Category

A Different Itinerary

April 10th, 2007 5

When I was in California a few weeks ago, Delta had oversold my return flight, so I ended up with a generous coupon to be redeemed for future Delta travel. Thus, in the process of checking out flights, I paid special attention to the offerings from Delta. Why not get my return trip to Toronto as a freebie, if I could?

Well, it turned out that the best Delta could do was around $250, so I’m saving my coupon for the future. But as I browsed the options Delta proposed to me, one in particular stood out as kind of bizarre. Surreal, you might even say. I guess these kinds of things happen when you have a computer proposing itineraries:

Delta Surreal

Read on…

Prettify Bookmarklet

March 22nd, 2007 0

Google recently released google-code-prettify, a nifty little JavaScript for colouring up source code embedded in HTML pages. Anyway, here’s a version that you can install as a bookmarklet.

Parallelism

February 14th, 2007 0

Bjarne Stroustrup, designer of C++:

All that said, I don’t know what the next major conceptual shift will be, but I bet that it will somehow be related to the management of concurrency. As programmers, we have been notoriously bad at thinking about lots of things happening simultaneously, and soon our everyday computers will have 32 cores.

From a recent interview in Technology Review, part 1 and part 2. Read on…

WP-Cats, for Wordpress 2.1

February 2nd, 2007 1

A handful of people emailed me about WP-Cats not working with the newest Wordpress. I’ve fixed the problem now—the compatible version is available as WP-Cats 0.13a. Over the past couple months, I’ve also received a number of feature requests for it, many of which I think would be useful and sensible, so expect to see a proper update at some point in the future.

Also, I now have a much better understanding of how to properly use closures and JS objects, so that truly heinous JavaScript will get cleaned up a bit, too.

MME Logo

February 1st, 2007 1

Brandon pointed out to me the new website for the Mechanical and Mechatronics Engineering Department has launched, featuring my logo in the document footer, similar to how ECE’s is.

MME Logo

My understanding is that there will be an official unveiling in the summer term, at which I’ll be asked to give a brief explanation of process and inspiration. So you can all come out to that with your clappers and big foam fingers… or just know that the inspiration was doodling on a tablecloth at Montana’s, and the software used was the excellent Inkscape.

Engines and Fireflies

January 8th, 2007 4

I had another opportunity recently to make a visualization out of JavaScript; I thought I’d share two examples of using the language for this purpose.

The 6-Stroke Wankel

Last winter, there was brief flurry of activity over some guy building a six-stroke engine. The principle was ingenious—rather than waste excess heat through a cooling system, why not harvest it as an extra power stroke, by injecting distilled water into your cylinder? The rapid expansion of the liquid into gas would provide a small boost, plus drastically reduce the amount of cooling infrastructure necessary on the engine block.

6-Stroke Wankel

My immediate thought was, well, what about doing that with a Wankel? A Wankel rotary engine is a lightweight, high-torque system. Mazda uses standard 4-cycle Wankels with their RX7 and RX8 cars, but what about a 6-cycle one, that implemented this water-injection cycle?

Jeff helped me out with some of the formulas, and we ended up figuring out what the thing should look like. Now, it could certainly be modeled in a tool like SolidWorks, or AutoCAD, or maybe even MATLAB, but what’s the fun of that, when only people who have the software can look at it?

Instead, I tried going the SVG route. SVG is an open standard vector language that’s positioned to compete with Flash. Through various problems, it’s not as widespread as it could be, but all of Firefox, Opera, and Safari provide reasonable support for static SVG, and Firefox provides excellent support for SVG animation. So you’ll need to be using Firefox to view this, but here’s the animated demo of the six-stroke Wankel. Read on…

Googled

October 30th, 2006 3

It’s a verb, a noun, an adjective and nothing if not an enigmatic company; the greatest place for a hacker to work, a pattern for the future, and more romantically, a cathedral awaiting Alan Turing’s soul. In January, I’ll be heading to NYC for a few months of working with the Google Maps Team—it’s hard not to be a little excited.

Once again it is that my life has taken a bizarre and unpredictable turn. Surprise is the flavour that keeps one anchored in the present; I have no complaints.

The Elevator Question

October 25th, 2006 0

In an article about telephone interviews, one of the design questions Joel says he asks is, “How would you implement code to operate the elevators in a high rise?”

Presumably, he’s looking for something like this; a system that avoids “starving” the top and bottom floors.

Toronto Reference Library ElevatorIt’s a really interesting question, though. Legend has it that SimTower had its origins as an elevator simulation, but then the SimTower elevator cars have that bizarre property that they can pass each other in a single shaft. I’ve heard explanations that each “shaft” represents a 15-deep bank of elevators, but that would require each condo and office to also be a group of 15, which in turn messes with all the other money- and people-scales in the game; ultimately, I think it’s easier to treat the elevators as fantastic and the game rules as highly abstract.

When this article showed up last spring, it was unfortunately the middle of my exams, but I still took a few hours and tinkered with a quickie simulation. The notion of a rotating elevator is a highly interesting one—even moreso when you add in some kind of usable system that lets you declare your destination floor before boarding. The real challenge there, then, is to create a game theory-based control system that can group together people aiming for a single floor while still minimizing the wait time of each individual user. And also taking into account that lots of people will make mistakes, change their mind, and misunderstand the system.

Basically, I’m just writing because officially I’m studying for Signals, and it’s quicker to write than to dig out that code and start playing with it again. But yeah, I’ll post it up eventually.

The Internet Makes the World Smaller

October 23rd, 2006 2

Iced Wheel

When I changed my banner image for the fall, it was more an act of defiance than as some sort of genuine reflection of the reality outside. We’ve now had several dustings of snow, and there was the small issue of my bicycle brakes being encased in ice, fused to the wheel.

Anyhow, I ran into Matthias Wandel at Swing Club this afternoon—he’s a UW grad, and has a number of really neat project writeups on his site. It was just funny that I was half-heartedly studying some circuits in the studio, and when I asked him about an op-amp question, his response was more about what a useless circuit it was, than what exactly the filter behaviour would be.

In other news, I seem to be getting the hang of Tango a bit more. It’s a far simpler dance than Lindy, and certainly less flexible, but fun enough in its high-heeled, strutting sort of way. Like any of the more intimate dances, it’s more about the subtle communication between partners than big showy spins and tricks.

Co-dependent Parts

October 17th, 2006 0

In an article about mistakes a startup can make, Paul Graham writes:

Think about the overall goal, then start by writing the smallest subset of it that does anything useful. If it’s a subset, you’ll have to write it anyway, so in the worst case you won’t be wasting your time. But more likely you’ll find that implementing a working subset is both good for morale and helps you see more clearly what the rest should do.

I found this interesting simply because it has been my strategy for tackling our Realtime Operating Systems project this term. No individual piece of the project is particularly difficult, but it is a little tricky to map out a plan for incrementally developing it.

It’s obvious that certain auxiliary things can be bolted on later, but the majority of the assignment has to be in place before it does much of anything at all.

My approach? Get the major bits running in entirely separate, proof-of-concept programs. One group member is implementing a simple text parser, another the IRQ system, and I’m working with the final person on the switching stuff. There will still be an awkward moment when these parts have to be glued together, but at least each component will be known to function correctly on its own.

© 2004-2008, Mike Purvis, some rights reserved. I'm running Wordpress, and I have an RSS feed.