I’m not sure if I’ve already shared my rendition of the Imperial March.
I’m not sure if I’ve already shared my rendition of the Imperial March.
This took me more googling and experimentation than it should have. If you want to set cookies using selenium webdriver under rails (for your cucumber specs for example), you want to use add_cookie
. For example, we use this in our web_steps to authenticate the user by setting the auth cookie directly:
I’ve been playing around with a little social places site at weheartplaces. One thing I’m really proud of is the streetview-based navigation. When you’re viewing a place, you can spin around, and there’s a little hyperlink over other places nearby. Hover over that hyperlink and you can see the name and address of the place, and click then link to zoom through to that place page, where you can edit the details or comment on the place.
Taking from a colorlovers scheme, I came up with this logo.
A logo I made when I was a teenager for the business I wanted to start at the time.
I bought a nice road bike, a Giant OCR2, for my daily commute from Petone to Wellington. I don’t bike on rainy days though, busses on those days.
Did some quick capt updates today. I bumped the version of jQuery, Backbone and Underscore. I fixed some bugs that new users would have found with a missing /app/templates/
folder, and I (finally) got around to renaming controllers to routers. My next task with capt is to write some specs for it, and write some more examples to show how to use it.
There’s been a pretty large gap in my blogging. This is my attempt to get back in the saddle. I spent a few weeks over christmas in the philippines, meeting my partners family, and going diving at Moalboal and Alona beach.
Today I’ve been fighting a 10+ gigabyte mysql import. I’ve come across and solved a few problems that might be handy to someone in the future.
I recently needed to be able to parse CSV export from excel, in Javascript. The only way I could find to parse it was a stream-oriented parser, so I came up with this that seems to cope with the majority of strangeness, including multiline cells, quotation marks, and escape and non-escaped cells.
I’ve extracted the non-blocking .map
and .select
implementation that I use in my mobile apps to keep them responsive while processing large arrays. I called it overscore.js and it’s available on github.
As another part of my series on Javascript mobile apps, I’m going to discuss tooling.
I’ve worked on three javascript mobile apps now, one used internally by Lonely Planet, one on the appstore, and another an unreleased site I built myself. I’ve been wanting to write up my notes on development for a while, so since it’s a sunny day and the house is tidy, I’ll put up some notes. First up…
So, Google just released a static street view api, which is awesome, since showing a streetview of a place will usually jog someones memory much quicker than a top down view.
I needed some code for lerping google maps latlongs (for providing a custom streetview navigator). Here’s the function in coffeescript:
In the rankers app that I’ve recently finished for a client, I cached the users data offline, but needed a way to quickly and easy to see if the user had the freshed version of the data.
With my capt apps, I do most of the development and testing using the desktop safari browser, and then move onto testing on actual devices later on, once I’ve got the app mostly working. I use this fragment of code to detect if I’m running inside phonegap, or if it’s a desktop browser, and then instantiate my app appropriately.
I’ve written a particularly gnarly query here that I thought I would share. It’s for iterating over a collection of points that have names, and identifying points that likely candidates for merging.
It must drive the google search team crazy, when they look at the sort of html the rest of the google organisation spits out. Take for example - this google places page. There is no html, no metadata, no microformats, no schema.org support. It’s basically impossible to index. How can they run the worlds biggest web crawler, but generate such obtuse and impossible to index code themselves? It’s astounding I say!
I’ve got two apps on the go using Phonegap, and this is just a quick post to say that I can highly recommend the mobile web as a development platform. My list of tools / libraries that I use: