I've had the idea for a while that I've wanted to do a multiplayer game with friends via Dropbox, so I roped a few people like Tate into it and we found it works surprisingly well.
After a few rounds of back-and-forth I took the liberty of rendering out a mega-screenshot and setting it up as a zoomify image. (The stitching was all done by hand, so there's a few rough edges around city borders.)
Simcity 4 is by far my favourite version of Simcity. It has a sweet 2.5D aesthetic (3D models are rendered down to 2d on a fixed trimetric orthographic projection), but more importantly it has a large community of modders and lets you build massive regions spanning multiple cities.
Newer versions in the Simcity franchise sacrifice detail for simplicity and tend to be more "town building" than "city building" sims. Of the newer games I prefer Cities XL (which I feel redeemed itself after a botched launch and a few re-releases), but it's difficult to go past the homely charm of Simcity 4.
Dates and Javascript haven't traditionally been very nice. The Date object
is the only real API for managing dates and code to deal with it can be extremely verbose.
Parsing dates with Javascript
Parsing dates has traditionally been difficult with the Date object only supporting non-standardised inputs dependent on the browser:
But with ECMAScript 5 we can also parse ISO 8601 dates, which gives us a little more leeway. From the MDN date docs:
simplified extended ISO format (ISO 8601) is always 24 or 27 characters long (YYYY-MM-DDTHH:mm:ss.sssZ or ±YYYYYY-MM-DDTHH:mm:ss.sssZ, respectively). The timezone is always zero UTC offset, as denoted by the suffix "Z".
To parse a date in plain Javascript, you can now pass a well formed ISO8601 string to the constructor:
var dIso = new Date('2014-04-12T12:22:00.000+10:00');
var dRfc = new Date('Sat Apr 12 2014 12:22:00 GMT+1000');
var dUnix = new Date(1397269320000);
All the above will all return a valid date. Note that the Unix timestamp is in milliseconds. If you're trying to read a Unix timestamp in seconds you may need to multiply it by 1000.
Update: Turns out Safari is a laggard with ISO 8601 dates and like IE8, can't parse them at all. If you need ISO8601 dates on the client, you'll have to resort to either a custom solution or something like moment.js which supports parsing them.
Formatting dates in Javascript
The problem of formatting dates in a particular way in Javascript is difficult. If you wanted to print a basic YYYY-MM-DD timestamp you could do something like the following, but you'd also have to implement logic around padding zeroes and incrementing the zero-based month and the syntax for the most basic notation is horrible. It's no fun.
var d = new Date();
return d.getYear() + '-' + (d.getMonth+1) + '-' + d.getDay();
// 2014-4-12
One of the better libraries for managing dates in Javascript is Moment.js, which brings slick chainable date handling to the browser (or node). The main downfall is that it’s quite heavy, but when you need to be able to manipulate a lot of dates it’s totally worth it.
Our previous example can be condensed into the following:
return moment().format('YYYY-MM-DD');
Moment has some other sweet features, particularly around date parsing and manipulation so you should definitely check it out.
Specific date formats in JS and Moment
While we're at it, here's a cheat sheet of specific date formats you may need to use in JS.
Date
Raw JS
Moment
RFC 2822
myDate.toUTCString()
moment().format('ddd, DD MMM YYYY HH:mm:ss ZZ')
ISO 8601
myDate.toISOString()*
moment().toISOString()
Unix Timestamp
Number(myDate)
moment().valueOf()
Note that the native Date.toISOString method was introduced in ECMAScript 5, so only works in IE 9 and above.
I spoke at the Web Directions What Do You Know night in Brisbane tonight. Here's a slightly more in-depth version of what I talked about, with links to all the good stuff. You can also view my slides though they're quite large.
Recently the Google Maps Mania blog wrote a post entitled “The slow death of the Google Maps API”, not so much lamenting the demise of Google Maps as much as embracing the change that’s occurred in this space and it got me thinking.
Google Maps used to be the only real solution to showing maps online, and I’m sure you’ve plopped down the Google Maps embed code on a contact page in your day. But lately there’s been a lot more choices cropping up in both software and services so I’m going to quickly go through some of the cool stuff you can do with maps.
Mapbox: probably better than Google?
Firstly I’ll mention that in my opinion the main competitor to the Google Maps API right now is Mapbox. Mapbox has a bunch of services and APIs for both apps and the web, and you should check them out if you haven’t already (their blog is well worth a read too).
They have a sweet web interface that lets you completely customise your map styles and content, and offer a bunch of goodies for creating and managing maps including TileMill which is the ultimate map mashup customisation whatsit.
If you’re looking to plop a map onto a contact page these guys can absolutely get you there, but if you’re looking to do a full-on data visualisation they’ve got you covered too.
Leaflet
Mapbox are throwing a lot of support behind open source tools like Mapnik, Node and especially Leaflet.js which is the BSD licensed mapping library that most of their service runs on.
Leaflet is especially nice to use as both a user and a developer because it’s it’s super-fast and works well even down to IE7. It's completely styleable with CSS has excellent touch support for mobile devices which makes it really awesome if you need a responsive maps solution.
In terms of data visualisation, it uses SVG by default (with a VML fallback) or you can draw onto HTML5 canvas if you don’t need IE8. There's also a large number of modules you can use, both official and otherwise.
Heatwave Tracker
I’ll briefly mention the ABC News heatwave tracker which I did late last year, showing an animated map of temperatures for the past week.
This one was originally going to use Google Maps but had some performance issues on mobile that prompted the move to Leaflet.
This visualisation ended up using the basic Leaflet API to draw circles for each weather station and animating them using requestAnimationFrame. Under the hood Leaflet created a SVG circle for each of these points which turned out to be hardware accelerated to varying degrees across browsers, so it was super fast with around six-hundred data points updating at sixty frames per second.
There was no particularly tricky code involved in this, it’s all just using Leaflet’s standard APIs without any optimisations on the map side of things. The Leaflet port from Google Maps took about an hour which gives you some indication as to the effort involved.
This feature used a combo of Leaflet with a bunch of custom code to create a collage of maps, images, and audio showing the history of air travel. The most interesting feature is the html5 canvas-based visualisation showing all the planes in the sky over the last twenty-four hours which you can zoom, pan, and explore like a traditional map.
It's kinda mesmerising.
This one was commissioned by The Guardian and built by Kiln who I have somewhat of a map geek crush on right now. They used TileMill for the background layer (I had a suspicion!).
@k_i_l_n@AshKyd In more detail, Natural Earth polygons + SRTM30 elevation data processed with gdaldem for the relief shading layers.
But Leaflet isn’t the only client-side library that’s doing interesting things in mapping. While Leaflet is positioned as a more traditional Google Maps replacement, D3 takes a more data-driven approach to visualising geodata.
Well D3 also has geodata functionality that can do wonderful things with more of a focus on your raw data rather than a traditional map.
This demo is from the D3 geo.projection plugin shows a few of the different types of map projection you can use in your projects, and you can see the way the map is animating between different projections that the library has a lot of power over a traditional flat map.
Earth
While this isn’t something you’d usually use in itself, it does lend to some interesting ways of visualising data, such as in the Earth global weather visualisation by @cambecc.
This is a really compelling mashup of wind, air pressure and temperature projected on a 2D globe then animated to show about as close as you can get to real time world-wide weather conditions.
This demo uses D3 and Backbone.js to display data which has been pre-processed from a number of different sources. It’s using the orthographic projection of D3 which presents a sweet 2d globe effect which you can spin and zoom to explore the nuances of the planet.
Because this is using the HTML5 canvas as a 2d drawing platform, all the individual data points you see moving on the screen have to be calculated each time you adjust your viewpoint. This is all done in D3 rather than on a GPU for instance, which might not be something you'd do in a super-high performance situation, but it's a really good demo of what D3 is capable of.
Google is still good…
Google Maps is still great, but they've really been focusing more on the consumer with their offerings of late.
The new version of Google Maps is a fantastic use of WebGL and is really a showcase use for the technology, but you can't develop against it for use in your own apps. In terms of the Maps APIs they've stagnated over the years and as a result we're seeing more innovation from other players rather than Google themselves.
So next time you're looking at doing anything to do with maps, check out some of the alternatives. You might find yourself getting more done, doing cooler things and generally looking better among your peers.
What does everyone else know?
If you weren't at Web Directions What Do You Know, here are some the other talks from the night.
Just a quick rant because I’ve been trying since October to get myself set up with fibre Internet in South Brisbane.
A little background for those of us who don’t know: South Brisbane fibre is wholly owned by Telstra, and isn’t part of the NBN. The plans are different, a lot of ISPs don’t seem to bother competing here and everything has to go through Telstra’s wholesale division.
The unit I moved into has never had a landline connected so I got hit with a ~$300 connection fee straight up. Initially Telstra thought there was a connection at this address and disconnected my landlady next door, taking out her phone and Internet for the better part of a week which was a massive pain. After that it took about a month for them to get around to installing the network stuff in my unit and another month for me to convince them it wasn’t working and come out to actually plug the fibre in at the comms room.
It literally took four hours for the poor tech to unravel the network here and get it connected. In the process I think he unplugged the line into another unit where the tenants were trying to get their own Internet connected, so they’ll probably be hit with the $300 connection fee as well.
The tech was a funny guy. Reasonable enough, although he asked me to fix his computer while he was working which was a bit awkward. When he finally got the line connected he confirmed with me that it was 30 mbit, at which point I mentioned I was trying to get 100 mbit and that something must be wrong. Before telling me that 30 mbit should be more than enough for my needs he mentioned that Telstra Wholesale only goes up to 30/1 mbit and that I’d have to sign up for a Telstra plan if I wanted to go higher.
I was pretty mad at this point, but hey, I had Internet for the moment.
Since then I’ve spent another month chasing iiNet trying to get the bottom of the 100 mbit situation. iiNet themselves have never heard of the 30 mbit limit, they’ve verified on their end that I should be getting 100 mbit, and have been super reluctant to chase it up for me. I’ve complained by phone, email, Twitter, all the while being told that someone would chase it up for me and give me a call back, or email me, or follow it up internally somehow.
I just called up now and they have no record of any of the email or phone correspondence I’ve had, the guy has reiterated that “it should be fine, have you tried power cycling your modem?” and asked me to plug my PC directly into the wall. (I’ve already done this when I initially reported the problem, I even had to borrow a laptop with Ethernet from a friend to do so.)
There is something really wrong with this line but I’m so damn tired of chasing telcos to get it fixed. pic.twitter.com/ooJvBPmb1q
Meanwhile my practical speeds with two separate modems are fluctuating between the full 30 mbit and 0.5 mbit/second depending on the stars. I actually had a 700 millisecond ping to Speedtest.net this morning.
Waiting at the lights, my bag popped off the back of my bike somehow. I noticed straight away because the weight was different, but by the time I’d stopped and turned around, the ute behind me had driven over it with not one, but both sets of wheels.
The guy looked at me briefly, then drove off. I didn’t even think to note his license plate, I was too busy freaking out on the traffic island. My laptop is seriously my most important possession and it was immediately obvious it’s been completely written off.
I checked out my insurance, but it’s only for medical and third party which means I’ve got nothin’. I can shift some money around, but it’s certainly changed my short-term plans.
So I set out on a search for a new computer. I wasn’t going to buy another Samsung Series 9 because the quality of the screen was absolutely rubbish and having used it for a month or so I couldn’t justify the price again. So I went searching, and found the Dell XPS 13.
Not the Developer Edition
I was originally looking at the Ubuntu Developer Edition which isn’t available in Australia. The Developer Edition comes with Ubuntu pre-installed, and a bunch of compatibility patches and developer tools already loaded on.
It’s a pretty attractive deal, because Dell have been contributing their modifications back to the Linux kernel to make sure this machine is the Linux latop amongst the Windows-crippled alternatives out there.
The XPS 13 is the same machine, just with Windows pre-installed instead. All the same bits and pieces under the hood (and a few extra stickers), but you can wipe Windows and install your choice of Linux distro over the top with no problems at all.
The Specs
There are a few models of this machine available, and I can’t find mine on the Dell site any more, so your mileage may vary.
Size
13.3″
CPU
Intel i5/i7 available
RAM
8GB Dual channel DDR3 1600Mhz
Storage
128 GBSSD (Mine has 256 GB, but this no longer seems to be an option.)
My initial thoughts on this laptop were really positive. This laptop feels expensive.
The device has a full 13.3″ screen, but the size of the laptop is tiny owing to the really small bezel around it. The chassis is an attractive complement of machined aluminium on the lid, carbon fibre on the base, and a silicone finish on the palmrests which is surprisingly nice to use.
There’s a metallic cover on the bottom of the laptop which opens to reveal the Windows and Intel stickers as well as FCC information and other important bits.
There are two USB3 ports, one on the left and one on the right. There’s also a Mini DisplayPort and a headphone jack. There are no other ports on the laptop. If you want to use something like cabled Ethernet you’re going to have to pick up a USB adaptor online ($10 ought to do it on eBay), or if you need more devices you’ll have to look into a USB3 hub.
I’ve noticed the lid can be a little tricky to open as the weight isn’t quite balanced with the opening mechanism but on the flip side, the lid is fixed in place wherever you put it. There’s no wobble or anything because of the heavily weighted hinge.
Installing Linux on the XPS 13
There’s a few ways you can install Linux, by USB flash drive or via an external DVD drive, it’s pretty straightforward.
While the device comes with Microsoft’s “Secure Boot” enabled, you have the option of going into the menus and turning it off. In addition, a number of Linux distros come with Microsoft signed keys that will run with Secure Boot enabled anyway.
Another nice touch is the ability to fall back to BIOS emulation mode, which lets you boot older OSes of if you run into shoddy UEFI support in your distro of choice.
You can get into the UEFI/BIOS interface by pressing F2 on boot. (Keep pressing it until it tells you it’s got it.)
Other than Secure Boot, this is a really straightforward machine to install on. You’ll have no problems.
The Keyboard
The keyboard is really quite nice. It’s backlit, and the chiclet style keys have a fair bit of give to them.
It’s quite nice to type with, much nicer than the Samsung Series 9 for instance, although they’re a bit softer than the generally quite firm MacBook Pro.
I’ve also been told the keyboard is an unusual layout (although I haven’t noticed), but either way you’ll likely get used to it in no time.
The Screen
The screen is the total show stealer. The original XPS 13 had a measly 768p screen, whereas this one has the full 1080p and it’s gorgeous.
I’ve gone through a few screens lately, and this is easily the best one I’ve ever used. It’s easily better than my 2010 era MacBook Pro, and wipes the floor with the rubbish used in most Windows laptops on the market these days, including the Series 9.
I suspect it’s an IPS screen although I haven’t been able to verify this information anywhere other than one or two news and blog sites. It has perfect colour reproduction, with no vertical colour distortion whatsoever and perfect viewing angles from all directions.
In terms of brightness it’s a 350 nit panel, which is pretty damn good. You can find other brighter laptops on the market, but this one’s perfectly good for indoor and outdoor use. It’s a glossy screen as opposed to a matte, which means it can be impossibly glarey in the wrong environments but I’ve never found myself unable to use the laptop due to lighting conditions.
Whether you’re a designer or developer, you should absolutely consider this laptop for the screen alone.
Trackpad
The trackpad is really nice. It has a smooth finish and tracks well with one or two fingers. It’s gesture capable, although I haven’t used any of these features.
Dell and Canonical have apparently taken the existing Cypress trackpad driver and extended it to support the Developer edition perfectly. These changes have been merged upstream into the proper Linux kernel and should be available on most new distributions.
I’m using the drivers that Fedora 18 picked up, and I’m not sure whether they’re the right ones or not. I’ve noticed very occasionally that the trackpad can get a little jumpy and I’ll need to suspend/resume to reset it. I’m interested in whether people have this issue in newer kernels than version 3.9.4-200.
Noise
This machine actually has a little more noise than I’m used to. While it’s no rocketship like my previous MacBook, it can get somewhat loud under load.
I’ve also noticed that the fan makes funny noises even when not under load. It’s barely noticeable, but if you shove your ear up to the bottom of the laptop you can hear it ticking and scraping. It’s a little bit of a concern, I’m not sure if I need to open it up and clean it or if that would make it worse.
External Monitors/VGA Out
This laptop uses Mini DisplayPort, like older MacBooks, which is pretty well supported.
The laptop itself doesn’t come with any cables, but you can grab a Mini DisplayPort cable to output to DisplayPort, DVI, HDMI or VGA.
I’ve driven my Dell U2711 27″ screen at 2560×1440 over DisplayPort with no problems. I understand there may be difficulties converting from DisplayPort to dual-link DVI etc for very large resolutions, so it pays to use DisplayPort→DisplayPort whenever you can.
I’ve also had problems connecting the Mini DisplayPort to a VGA projector using an Apple dongle. Turns out the Apple dongles are a bit special and won’t work with this particular laptop, so if you’re going to be presenting anywhere you’ll need to bring your own non-Apple adaptor.
Other features
The battery is a 47 WHr 6-Cell Battery but I can’t tell you much more than that. It’s not as good as the Samsung Series 9 for instance, but I rarely find it fails me when I’m out and about through the day. You should check out some other reviews for information on the battery life.
Graphics are standard Intel HD Graphics 4000, which are pretty standard across the board. The benefit of Intel graphics is that everything in Linux is supported so much nicer than with nVidia or ATI. If you’re looking for gaming, it’s not the worst you could do, but you should check around to see how the HD 4000 graphics fare on various games.
Sound is quite good. It’s much better than the Series 9 or 2010 MacBook Pro for instance. I’m not sure where it comes from, but it seems beefier than your average laptop sound. I haven’t put it through any vigorous tests (because it’s laptop sound after all) but I quite like it.
Output from the headphone jack is generally good too, free of pops and hisses, and I haven’t heard any processor squeal come through my earbuds which can be a problem on cheaper systems.
Conclusions
The Dell XPS 13 (Non-Developer Edition) is an awesome laptop and if you’re a Linux user looking for a quality device you should absolutely get this one.
While there’s a lot of different materials gone into the build, the quality is stellar. It’s a good weight, feels tough, and I consider it an extremely attractive design.
All the useless loose ends have been removed (CD Drive, Ethernet, serial) leaving only the very basics. If you need more you can extend it with USB adaptors. It’s the ultimate minimal experience.
The speed is great, the compatibility is stellar and the display is the killer feature that beats out all the other devices on the market (with the exception, of course, of the retina Macs which aren’t much use in Linux anyway).
Everyone who sees the laptop loves it, and I recommend it for everybody. If you’re not convinced, leave a question in the comments and I’ll see what I can do to answer it. Otherwise, you’re going to love this laptop and should check it out now.
I've spent the last couple of days adding features to my site about cycling in Brisbane and my favourite would have to be allowing GeoJSON annotation of maps.
What's GeoJSON?
GeoJSON is a Javascript-based file format designed to hold geographical information, similar to KML or GPX. It's supported by default in the Leaflet mapping library which I use on Briscycle, and is supported out of the box by the JOSM map editor, which means I have a full suite of authoring tools at my disposal.
How does this help?
Previously each page about a particular cycleway or feature would have an embedded map at the bottom showing the Briscycle map layer, including various features shown on the full version of the map. This was okay, but not particularly clear, especially when explaining something like the Moreton Bay Cycleway which is some hundred kilometres long, winding around the coastline from Redlands to Moreton Bay.
GeoJSON annotation is great because it lets me add an extra layer to the map, including lines, icons, pinned features and more.
In the case of the MBC, this includes an educated guesstimate of the entire route which people can follow from their desktop or mobile phone.
In other places I've used it to point out map features relevant to that particular route, but not necessary to display on the main map. It's even possible to use GeoJSON as the primary map source without a tile layer in the background, for instance if you wanted to map out your office or property.
Making a GeoJSON file
GeoJSON is a JSON-based file format, so you could technically write it by hand. This, however, sounds like no fun at all.
I used JOSM, an OpenStreetMap editor which offers a bunch of satellite and map overlays and lets you draw features straight onto the map. Being an OpenStreetMap editor, it's heavily tag based, which makes it translate very easily to GeoJSON, so when I was done drawing and adding my tags, I could save it straight out to a GeoJSON file.
It's a good idea to save your GeoJSON file in the OpenStreetMap XML format as well, since JOSM doesn't appear to be able to re-open GeoJSON files. If you need to convert a GeoJSON file back to OSM format for editing, you could use something like the trusty GPSBabel.
Mapping a GeoJSON file with Leaflet
GeoJSON is pretty well supported by the LeafletJS mapping library, and you can get up and running straight away using the default GeoJSON layer type.
I've passed a custom style function which checks the attributes on each path to decide how it should be styled. The onEachFeature lets me create popups when a user clicks certain elements, and I've added a custom pointToLayer function to override the default marker and display standard OpenStreetMap icons for points.
If you're looking for a mapping library, you really can't go past Leaflet. It might not be as mature as others on the market, but it's by far the nicest to develop with, and it's gorgeous on the client-side.
Trying to wrap my head around mobile tech and the various protocols involved. After some quick research, this is what I’ve learned:
GSM
GSM is a 2G network spec that does calls and text, but doesn't (nicely?) support data transfer. You can add data capabilities to a GSM network with GPRS or EDGE.
UMTS
UMTS is an incompatible evolution of GSM which supports calls, text, and data. The initial release (R99/Release 1999) supports data transfer speeds of up to 384 kbit/s.
HSPA can be added to a UMTS network to acheive much faster, and eventually 4G download speeds.
CDMA
Meanwhile, CDMA networks are still popular in North America and have evolved to 3G speeds with progressive upgrades (CDMA One, CDMA 2000, and now . For the most part CDMA phones don't require SIM cards and are not compatible with 3G networks. I don't know how these phones are registered onto the network.
UMTS actually uses the underlying concepts of CDMA to operate, but when referring to simply "CDMA" people are generally talking about the trade name rather than the technique.
LTE and 4G
LTE is a data-only network based on, but incompatible with UMTS which provides 4G speeds of nearly 300 mbit/s down. As it's a packet network, traditional voice calls can't be placed (without carriers re-engineering their network) so phones either use VoIP or fall back to the next available network to talk. LTE is slated to be the first global mobile network, as even CDMA carriers are reportedly implementing it.
I think that just about covers it. Have I got this all right? Do leave a comment.
I’m debating with myself whether to make my game engine pseudo-3D, using transforms and masks and whatnot to generate and texture isometric tiles.
On one hand there’s something to be said for tile-based systems to have every graphic meticulously crafted by a master designer, but on the other hand, I’m not that designer. It’d be so much easier to slap a grass texture down and transform it to match a programmatic grid. Maybe adjust the brightness to simulate lighting, then cache that sucker to achieve decent performance and move on to the next tile.
I think it’s feasible. It would allow for much easier creation of game elements such as hills and height, walls, roads, and so many more cool things. It’s also a total departure from my original idea of a traditional isometric game engine, but once it’s implemented it would make things way easier for both myself and anyone who wanted to create a map in the future because one high resolution texture could be used for countless tile combinations.
I think I’m going to give it a try, because if nothing else it’s a damn cool idea.
SVG and Canvas Transformation Matricies
Both SVG and HTML5 Canvas have basic transformations such as rotation and scaling, but they also have a more advanced “transformation matrix” mode which lets you do more complex transformations. I’m not pretending to understand it properly.
A transformation matrix has six parameters, named A—F. A lot of the documentation I found on them wasn’t particularly useful, so here’s my take on how each value works:
Name
Description
Default Value
Explanation
a
width
1
1 equals 100%. A value of -1 would mirror image the object on the left hand side. .5 would halve the width, and 2 would double it, etc.
b
Y axis shear
0
A positive value shears the object downward on the righthand edge.
c
X axis shear
0
A positive value shears the object rightward on the bottom edge.
d
height
1
Similar in operation to a, above.
e
x offset
0
Offset the object on the x axis.
f
y offset
0
Offset the object on the y axis.
So for instance, if you wanted to create an isometric tile from an image, you could use the following transform:
matrix(1,-.5,1,.5,0,0)
This would keep the same width, shear both axis by 50% effectively rotating the image 45°, and halve the height giving us our iconic half-height isometric tile.
Some other transformations relevant to isometric game tiles might might include:
Operation
Output
matrix(1,0,0,1,0,0)
matrix(1,-.5,1,.5,0,0)
matrix(1,-1,1,.5,0,0)
matrix(1,1,-1,.5,0,0)
matrix(1,0,1,.5,0,0)
matrix(1,0,-1,.5,0,0)
You’ll notice that the output tiles are significantly larger than would be generated with a straight out rotate and scale. You may need to add an additional scale operation to adjust the size of these tiles to fit your game board.
Putting it Together
Once you put these tiles together, you start to get an idea of how we can use canvas (or SVG) matricies to create isometric tiles for your game.
If you wanted to play around with transforms with a visual tool, you could check out Inkscape, the best vector editor in the world. The matrix transformation sidebar is found by clicking the menus Object , Transform, then clicking the “Matrix” tab.
My Avanti Blade 8 C has been at Lifecycle for the past two weeks and I haven’t heard a peep from them. I’ve had enough of the thing breaking down, and I don’t trust it not to fall apart underneath me.
Trust is an important thing to have in a bike. The amount of times the internal hub has skipped a gear as I’ve been climbing a hill, seized up or started making noises halfway home, and the number of times I’ve been left weeks waiting for Lifecycle to get back to me has left me angry and stressed out. Not being able to trust my bike to get me places is not only stressful, but makes me not want to ride at all.
For the last two months I’ve been riding my fallback bike which is a bit small for me and doesn’t have a pannier rack, meaning I have to wear a backpack which gets a bit sweaty. It’s a good bike, very reliable, and pleasant to ride short distances, but it’s not especially good for commuting.
So after stumbling upon a new bike store in Aspley, and stumbling inside only to stumble upon the perfect bike, I took twenty-four hours to arrange my funds and buy the sucker.
It’s a Ridley X-Bow (Crossbow), which is billed as an ideal commuting bike. I took the opportunity to upgrade it with mud guards and a pannier rack, and fitted it with a set of SPD pedals that I had traded Thom for assorted cheeses days earlier.
It’s a very nice bike.
It’s going to take a bit of getting used to because I’ve only ever ridden anything with flat handlebars, and these have three spots where hands can go. The gear changing mechanism is a bit strange to me as well, but I’m sure it’ll be fine once I’m used to it. Furthermore I’ve not ridden a bike with SPD pedals despite owning the shoes for a year now, so that will take some getting used to too.
I took it for a quick spin before it got dark this afternoon so I could work out how to use the pedals in particular, but I want to take it out for a longer ride before I have to go back to work on Monday, just to get the hang of it.
Spent the day plying with SVG. I've always used Inkscape for as long as I can remember, but it's taken me this long to actually dive in and start using the underlying markup for anything more than designing stuff.
I wrote a library to take an input string in a particular format and output a fully blown diagram to scale, based on the measurements and configurations from the input. The idea is that not just myself but also the lay person can rapidly prototype a bunch of diagrams (perhaps dynamically) for the new web site, and later reuse the library for internal projects.
I'm really rather impressed with myself. Aside producing a really cool tool, I've learned a fair bit about SVG itself and how it works. It's a pretty neat language, and features a lot of traits from XML, and CSS. I can see why it was poised (and I suppose still is, although it really fizzled thanks to Internet Explorer) as a web language. I really quite enjoy XML as a markup language, so it's quite fun to use it for drawing lines, filling rectangles with predefined gradients and translating things across the page.
I'm pretty proud of my work today, and I'm quite pleased to add another entry to my wide repertoire of half known things.