Routing in Rails is a breeze, but when dealing with polymorphic resources it is less than polished. Consider this example: an eCommerce application consists of products, which I can view in the scope of the store, a category or my shopping cart. This would require the following routes: /products/1 /category/2/products/1 /cart/3/products/15 This is simple to [...]
Category > Programming
Routing Polymorphic Resources in Rails
Routing in Rails is a breeze, but when dealing with polymorphic resources it is less than polished. Consider this example: an eCommerce application consists of products, which I can view in the scope of the store, a category or my shopping cart. This would require the following routes: /products/1 /category/2/products/1 /cart/3/products/15 This is simple to [...]
Embedded RSS
I have recently been asked several times about the code details for my Arduino RSS Reader. I have been freely handing this out, so it is now posted here for everybody to download: Download RSS Reader Sketch This zip archive contains the Arduino sketch and a few custom libraries (including the RSS parser). The amount [...]
Parsing RSS on an 8-bit Micro
One of the most common questions asked of my Embedded RSS Reader is how to process the XML data of an RSS feed on the 8-bit microprocessor. In a conventional application, it is trivial to use an XML library to parse the data into a tree-like structure. In PHP5, for instance, you could simply write: [...]
SEO: The Black Art
I am currently grappling with a client’s under-performing website. Our conversion rate is fairly good, which is understandable with the good products and range of price points. We cannot, however, actually get people on to the website in question. The site has been examined by countless SEO companies who recommend increasing the website’s exposure, obtaining [...]
A Better Real-time Library for Arduino
For my project I required a simple timer library for the Arduino development environment, something with a simple-but-powerful interface to schedule tasks to complete in the future or at regular intervals. There doesn’t really seem to be anything suitable online – a host of over-complicated APIs that use several classes, structs and rely heavily on [...]
Reading RSS on the AVR
Last February, I saw an RSS Reader implemented on an AVR ATmega8, which seemed impressive but was, in reality, just a serial-controlled LCD terminal. The general consensus was that it’d be cool if this were done without the requirement for the PC – this was the topic of my third-year project at university. My Embedded [...]
Another Step Forward
I now have all the component parts in place for my Embedded RSS reader, Ethernet, TCP and the liquid crystal display (who knew the pin-out was backwards?). The software is almost complete too, just a morning of integration and a little testing then there should be something to post here in the form of a [...]
Downloading RSS to the AVR
I have finally managed to fix a nasty little bug with my AVR-powered RSS reader (more details coming here shortly). Basically, it would get half-way through downloading the RSS document, pause for a second and the AVR would restart itself. I thought it was an issue with the network connection, but trying to diagnose over [...]
Pointers on the Atmel AVR
I have just resolved a rather weird bug in a 3rd party library for the Atmel AVR. Compiling under OS X the code runs perfectly, but on the AVR it runs like a dog. The secret is, apparently, in the heavy use of C pointers and pointer arithmetic to manage complex data structures within the [...]
