<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
	<channel>
<title>davidfindlay.org</title><link>/index.html</link><description>RSS feed for davidfindlay.org</description><dc:language>en</dc:language><dc:creator>David Findlay</dc:creator><dc:rights>Copyright 2006-2014 David Findlay</dc:rights><dc:date>2014-04-10T22:02:23-04:00</dc:date><admin:generatorAgent rdf:resource="http://www.realmacsoftware.com/" />
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
<lastBuildDate>Wed, 14 May 2008 11:31:32 -0400</lastBuildDate><item><title>TechShop</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-04-10T22:02:23-04:00</dc:date><link>/weblog/files/2014_04_techshop.html#unique-entry-id-104</link><guid isPermaLink="true">/weblog/files/2014_04_techshop.html#unique-entry-id-104</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Recently I joined </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.techshop.ws" rel="self">TechShop</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> and started taking the classes they offer in the use of the tools (which are required in order to use those tools).<br /><br />I made the kids a t-shirt and tote bag for their fake restaurant &mdash; DuckBill&rsquo;s &mdash; in the silk screening class:<br /><br /></span><img class="imageStyle" alt="duck bill&#38;#39;s template" src="/weblog/files/duck-bill0027s-template.jpg" width="490" height="653" /><img class="imageStyle" alt="duck bill&#38;#39;s merchandise" src="/weblog/files/duck-bill0027s-merchandise.jpg" width="653" height="490" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /><br />And some acrylic trinkets on the laser cutter:<br /><br /></span><img class="imageStyle" alt="hello kitty laser cutter" src="/weblog/files/hello-kitty-laser-cutter.jpg" width="653" height="490" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><img class="imageStyle" alt="daleks laser cutter" src="/weblog/files/daleks-laser-cutter.jpg" width="653" height="490" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />I still have lots to learn but I can see a multitude of projects in my head that access to all these tools opens up: including a proper case for that </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2014_03_badminton_iv.html" rel="self" title="web log:Badminton Scoreboard IV: Working!">badminton scoreboard</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">.<br /></span>]]></content:encoded></item><item><title>Badminton Scoreboard IV: Working&#x21;</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-03-18T23:04:28-04:00</dc:date><link>/weblog/files/2014_03_badminton_iv.html#unique-entry-id-103</link><guid isPermaLink="true">/weblog/files/2014_03_badminton_iv.html#unique-entry-id-103</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2014_02_badminton_iii.html" rel="self" title="web log:Badminton Scoreboard III: PCB">Last time</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> I had just sent the boards for fabrication on February 22nd. I got them back on March 7th:<br /><br /></span><img class="imageStyle" alt="Boards" src="/weblog/files/badminton_boards.jpg" width="751" height="564" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />They look amazing. I find it hard to believe how easy, cheap ($9.10 for 3, shipped), and quick it was to go from the Sparkfun Eagle tutorials to a physical board in my hands.<br /><br /></span><h2>Assembly</h2><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />I should have left room on the board to fold over the bigger caps, but other than that putting together one of the boards went pretty well:<br /><br /></span><img class="imageStyle" alt="Initial Assembly" src="/weblog/files/badminton_assembled4.jpg" width="564" height="751" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />It didn&rsquo;t work though, and after a minor panic I realized I had switched the 5V and GND pins for the radio when creating the schematic. Once I switched the jumper cables attached to them around it worked!<br /><br />Next I hacked a bandaid box as a case. It works okay for now, but it was hard to cut and so the edges are pretty rough. I&rsquo;ve joined my local </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://techshop.ws" rel="self">TechShop</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, so I plan to make a better case for it at some point.<br /><br />Here&rsquo;s the initial assembly in the case:<br /><br /></span><img class="imageStyle" alt="In the box" src="/weblog/files/badminton_box.jpg" width="751" height="564" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />You can see what an awful mess of jumper cables I had. I realized at this point that I should have used male connectors on the board for the radio and display, not female. I have a solder sucker but no braid, so it took me ages to get them swapped, and I did something bad to the radio 5V connection in the process. Rather than go through the pain of taking the male connector off, after spending so long to get it on there, I took the easy way out and just used the 5V pin on the ICSP header. I will now for next time.<br /><br />To clean up the jumper wire mess I tried making a ribbon cable using standard male connector pins, with heat shrink around each connection, but I could tell it wasn&rsquo;t going to hold up to use. It also looked like crap.<br /><br />I didn&rsquo;t have any pre-made 1x5 cables but I realized I did have 2x5 cables, and who cares if you don&rsquo;t happen to actually connect one row of the pins to anything? One of those cleaned up the display connection nicely.<br /><br />The radio was more problematic since I had screwed up the 5V and GND connections&mdash;if they&rsquo;d been right I could have plugged the radio directly into a female socket on the board as originally intended. Instead I used a 1x3 servo cable and 3 jumper wires. Not ideal, but much better than the mess I had before.<br /><br />This left me with:<br /><br /></span><img class="imageStyle" alt="After Cable Cleanup" src="/weblog/files/badminton_final.jpg" width="751" height="564" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><h1>Field Test</h1><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">I took the roughly assembled version to our next badminton evening to try it out. The range of the key fobs was much greater than it had been on the breadboard: they worked from every corner of the gym. I suspect the difference is due to interference from the breadboard&rsquo;s many connections, but whatever it was the real-world range with the custom board meant the key fobs were actually going to be practical.<br /><br />The scoreboard worked pretty much perfectly, except that sometimes if you released the button too quickly it wouldn&rsquo;t register the button press. That meant we ended up having to look at the scoreboard while pressing the key to make sure it registered. By the end of the evening it was clear that adding a beep when it recognized a button press would make it more user friendly.<br /><br /></span><h2>Adding a Buzzer</h2><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">A piezo buzzer ought to do the job just fine, but I hadn&rsquo;t broken out any of the other digital I/O pins. However the ICSP header has connections to MOSI, MISO and SCK. These correspond to digital pins 11, 12 and 13 of the Arduino respectively, so I was able to hook up the buzzer between SCK and GND and add a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>tone()</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> call for D13. It seems like it will be loud enough, but I won&rsquo;t know until we play next if it really is.<br /><br /></span><h2>Updating the Firmware</h2><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">I updated the code to add the beep then tried to upload it using my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.atmel.com/tools/avrispmkii.aspx" rel="self">AVRISP mkii</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, via the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>File/Upload Using Programmer</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> menu item in the Arduino IDE. It kept failing with a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>&ldquo;bad AVRISPmkII connection status: MOSI fail&rdquo; </em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">error. It took me a really long time to figure out why: I probed the pins, double checked the schematic, compared it to a SparkFun arduino clone design, asked a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://electronics.stackexchange.com/questions/102271/unable-to-program-atmega168-bad-avrispmkii-connection-status-mosi-fail" rel="self">question</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> on the Electronics Stack Exchange  and got nowhere. Then, a week later as I was redoing the cables I noticed a solder bridge between MOSI and GND on the underside of the board, where I&rsquo;d soldered the ICSP header pins. I fixed the bridge and it started working. I can&rsquo;t believe I didn&rsquo;t find that earlier!<br /><br /></span><h2>Fin</h2><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Here&rsquo;s the final state of the connections, including the buzzer:<br /><br /></span><img class="imageStyle" alt="Final" src="/weblog/files/badminton_final-2.jpg" width="751" height="564" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />And here it is in action (taken before I added the buzzer):<br /><br /></span><img class="imageStyle" alt="In Action" src="/weblog/files/badminton_in_action.jpg" width="589" height="442" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><h2>Lessons Learned</h2><ul class="circle"><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Get the schematic right!</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Allow more room around the outside so the lettering isn&rsquo;t chopped off.</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Check for solder bridges when things don&rsquo;t work.</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Make room for strain relief for the battery power connection cables.</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Make room for mounting holes.</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Make room for bending capacitors flat to the board.</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Think harder about whether male or female connectors are what&rsquo;s needed before soldering them.</span></li></ul>]]></content:encoded></item><item><title>Badminton Scoreboard III: PCB</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-02-22T19:22:09-05:00</dc:date><link>/weblog/files/2014_02_badminton_iii.html#unique-entry-id-102</link><guid isPermaLink="true">/weblog/files/2014_02_badminton_iii.html#unique-entry-id-102</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Now that I got it working with a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2014_02_badminton_ii.html" rel="self" title="web log:Badminton Scoreboard II: Bare">bare ATmega168</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, the next logical step is clearly to create a custom circuit board for the Badminton Scoreboard.<br /><br />I followed along with SparkFun&rsquo;s excellent tutorials on </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://learn.sparkfun.com/tutorials/how-to-install-and-setup-eagle" rel="self">setting up Eagle</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> and using its </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://learn.sparkfun.com/tutorials/using-eagle-schematic" rel="self">schematic</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> and </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://learn.sparkfun.com/tutorials/using-eagle-board-layout" rel="self">board layout</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> tools. For getting the PCB created, one of the places SparkFun recommended was </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://oshpark.com" rel="self">OSH Park</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. OSH Park lets you upload an Eagle board file, so you don&rsquo;t need to generate Gerber files. Their site gives you a nice preview of what the board will look like, so you can check out the solder masks and your silkscreening before committing to an order. They charge $5/square inch for 3 boards, including shipping, which seems pretty reasonable to me.<br /><br />Here&rsquo;s what I came up with:<br /><br />The top:<br /><br /></span><img class="imageStyle" alt="top" src="/weblog/files/top.png" width="740" height="419" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /><br />and the bottom, which is supposed to look like a bit like a badminton court (not to scale, as I positioned the court lines to avoid the pads as best I could):<br /><br /></span><img class="imageStyle" alt="bottom" src="/weblog/files/bottom.png" width="740" height="395" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />I read a few tutorials on bare board Arduinos and never really got a consistent answer on what values to use for the bypass capacitors, so I winged it a bit. I&rsquo;ve no idea how well the winging went, if I spaced the components out enough, or if I laid the tracks properly, but I should find out when I get the boards back in a couple of weeks.</span>]]></content:encoded></item><item><title>Badminton Scoreboard II: Bare</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-02-22T19:13:49-05:00</dc:date><link>/weblog/files/2014_02_badminton_ii.html#unique-entry-id-101</link><guid isPermaLink="true">/weblog/files/2014_02_badminton_ii.html#unique-entry-id-101</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">I managed to find my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.atmel.com/tools/avrispmkii.aspx" rel="self">AVRISP mkII</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> and I had a regulator and resonator and other sundry parts necessary, so I switched the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2014_02_badminton.html" rel="self" title="web log:Badminton Scoreboard">Badminton Scoreboard</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> from an Arduino to a bare ATmega168 on the breadboard, just because I hadn&rsquo;t tried that before. Getting the Arduino boot loader onto it was easy, using the Arduino IDE. Getting the sketch onto it was unnecessarily complicated: for one, there are out of date instructions out there telling you that you need to edit the Arduino IDE settings file by hand: you don&rsquo;t any more &mdash; you just need to hold down Shift when you press the Upload button, or choose File/Upload Using Programmer; and for two, Upload Using Programmer has a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://github.com/arduino/Arduino/issues/1791" rel="self">bug</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, where it will fail if you don&rsquo;t have any device connected via USB serial, even though you aren&rsquo;t actually going to program a device over USB serial. I plugged in a Spark Core and it merrily went on it way and used the programmer to get the sketch onto the 168.<br /><br />So it&rsquo;s still a rats nest of jumper cables, but no more Arduino board:<br /><br /></span><img class="imageStyle" alt="Bare 168 Badminton Scoreboard" src="/weblog/files/Bare168.jpg" width="751" height="564" />]]></content:encoded></item><item><title>Badminton Scoreboard</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-02-16T10:04:44-05:00</dc:date><link>/weblog/files/2014_02_badminton.html#unique-entry-id-100</link><guid isPermaLink="true">/weblog/files/2014_02_badminton.html#unique-entry-id-100</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">My wife and I play badminton every Friday with a couple of friends. We have a great time, but we&rsquo;re usually so busy chatting as we play that we keep on forgetting the score.<br /><br />My friend suggested that I ought to make a scoreboard, so here we are. I knew I would need a display, some buttons, and a microcontroller, and that for simplicity the microcontroller should be Arduino-compatible. As I was looking at displays I came across the M4 receiver at Adafruit. It&rsquo;s a simple RF receiver with four digital output pins; you press a button on a key fob and the matching digital output goes high. The range is supposed to be in the 20-30 feet range, and so it ought to work for my needs. Using key fobs instead of buttons on the scoreboard means I can make the scoreboard smaller too.<br /><br />Here&rsquo;s what I&rsquo;m using:<br /></span><ul class="circle"><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.adafruit.com/products/1096" rel="self">Simple RF M4 Receiver - 315MHz Momentary Type</a></span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.adafruit.com/products/1095" rel="self">Keyfob 4-Button RF Remote Control - 315MHz</a></span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.adafruit.com/products/1268" rel="self">1.2" 4-Digit 7-Segment Display w/I2C Backpack</a></span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">An Arduino Diecimila 168 that I had lying around. (I&rsquo;ll use something more compact for the finished product.)</span></li></ul><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />I wrote an </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://github.com/finsprings/badminton_scoreboard" rel="self">Arduino sketch</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> that watches for the button presses and adjusts the score accordingly. Here are the controls I decided on:<br /></span><ul class="circle"><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Keyfob A button: left player + 1</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Keyfob B button: right player + 1</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Keyfob C button: left player - 1</span></li><li><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Keyfob D button: right player - 1</span></li></ul><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">The sketch knows the scoring system of badminton, so when the game is over it makes the display blink. Any key press after that resets the score to 0-0, ready for the next game.<br /><br />It pretty much worked first time, except that the range of the key fobs in my prototype is only about 18 inches. I noticed that if I remove the display the range improves dramatically, so I think it&rsquo;s just that I&rsquo;m powering the Arduino from USB and there&rsquo;s not enough current to power the receiver and display properly. That shouldn&rsquo;t be an issue when I switch to a battery pack. [</span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; font-weight:bold; font-weight:bold; ">UPDATE</span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">: Yup, that&rsquo;s what it was: the range is fine when powering it from a 4xAA battery pack.]<br /><br />Here&rsquo;s the working prototype:<br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><img class="imageStyle" alt="Badminton Scoreboard Prototype" src="/weblog/files/badminton-scoreboard-prototype.jpg" width="621" height="466" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />And here&rsquo;s the sketch:<br /><script src="https://gist.github.com/finsprings/34389f7ddd65a034d52f.js"></script></span>]]></content:encoded></item><item><title>First Alarm</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-02-05T10:22:44-05:00</dc:date><link>/weblog/files/2014_01_firstalarm.html#unique-entry-id-99</link><guid isPermaLink="true">/weblog/files/2014_01_firstalarm.html#unique-entry-id-99</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">My </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2014-01-freezermonitor.html" rel="self" title="web log:Freezer Monitor">Freezer Monitor</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> sent me my first alarm notification yesterday while I was eating lunch at work:<br /><br /></span><img class="imageStyle" alt="Freezer Alarm" src="/weblog/files/freezer-alarm.jpg" width="320" height="568" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />(That timestamp is in UTC: I should tweak the monitoring script to adjust that for me.)<br /><br />When I got the alarm I pulled up a CGI page in MobileSafari to query the current temperature. The temperature was back to normal pretty quickly so I didn&rsquo;t need to be concerned further. When I got home I mentioned it to my wife and sure enough she had opened the freezer at around that time, so the alarm makes sense. Maybe I&rsquo;ll extend the monitoring script so that after it sees an alarm-triggering temperature it will poll for a few minutes to see if it goes back to normal.</span>]]></content:encoded></item><item><title>Freezer Monitor</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-02-03T22:28:11-05:00</dc:date><link>/weblog/files/2014-01-freezermonitor.html#unique-entry-id-98</link><guid isPermaLink="true">/weblog/files/2014-01-freezermonitor.html#unique-entry-id-98</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">As I mentioned </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2014_01_sparkcorechart.html" rel="self" title="web log:Spark Core Freezer Monitoring Success">previously</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, my primary motivation &mdash; or at least my justification for playing with the Spark Cores ;) &mdash; is to monitor the temperature in the old freezer out in our garage: it stores a cache of pig and cow that would be expensive to replace.<br /><br />I wrote a Python script to read the temperature and issue a notification to my iPhone via the API that goes with </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://prowlapp.com" rel="self">Prowl.app</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. It will also send a notification if it is unable to retrieve the temperature for an extended period.<br /><br /><script src="https://gist.github.com/finsprings/ab5a34ef877787fdf08f.js"></script><br /><br />I have this script installed as a launchd service on our always-on house Mac, via </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.peterborgapps.com/lingon" rel="self">Lingon X</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> (easily worth the $10 to save me from having to edit plist files like an animal).<br /><br />Now to see about hooking the other Spark Core up to the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://blinkinlabs.com/blinkytape/" rel="self">BlinkyTape</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">&hellip;</span>]]></content:encoded></item><item><title>Spark Core Freezer Monitoring Success</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-02-03T18:58:52-05:00</dc:date><link>/weblog/files/2014_01_sparkcorechart.html#unique-entry-id-97</link><guid isPermaLink="true">/weblog/files/2014_01_sparkcorechart.html#unique-entry-id-97</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">After installing the Spark Core as a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2014_01_sparkcore.html" rel="self" title="web log:Spark Core">freezer monitor </a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">last night, I ran </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>curl</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> in a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>while</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> loop in bash to pull the temperature reading every minute overnight and append the results to a text file. This morning, after a little bit of sed and grep tweaking, I pulled the readings into Numbers and charted them:<br /></span><img class="imageStyle" alt="Freezer Temperature Chart" src="/weblog/files/Freezer Temperature Chart .jpg" width="855" height="538" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">You can see that the temperature rises to around 3</span><span style="font:13px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">℉</span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. The compressor then kicks in and lowers the temperature to around &minus;3</span><span style="font:13px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">℉</span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. The temperature then slowly rises up to around 3</span><span style="font:13px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">℉</span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> again, and so on &mdash;&nbsp;illustrating the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://en.wikipedia.org/wiki/Hysteresis#Control_systems" rel="self">hysteresis</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> of the temperature control system in the freezer.<br /><br />I wrote a Python script to automate the process of grabbing the result, parsing the JSON and adding the result to the table being charted in the spreadsheet:<br /><script src="https://gist.github.com/finsprings/c0affb6daed24f69824e.js"></script><br />This isn&rsquo;t particularly practical, but was interesting to see nonetheless. My main goal is monitoring, so I will drop the charting part in favour of a simple notification to my phone via </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.prowlapp.com" rel="self">Prowl.app</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> when the temperature gets too high.</span>]]></content:encoded></item><item><title>Spark Core</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2014-02-02T23:16:02-05:00</dc:date><link>/weblog/files/2014_01_sparkcore.html#unique-entry-id-96</link><guid isPermaLink="true">/weblog/files/2014_01_sparkcore.html#unique-entry-id-96</guid><content:encoded><![CDATA[<img class="imageStyle" alt="Spark Core" src="/weblog/files/spark-core.jpeg" width="220" height="220" /><br /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">My </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://www.spark.io" rel="self">Spark Core</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> modules arrived a week or so ago. I got one with a chip antenna and one with a u.FL connector, because I plan to use it in a building that&rsquo;s too far from my router for the chip antenna to work. I also picked up a battery board and relay board, although I don&rsquo;t have specific projects in mind for either.<br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />The Spark Core contains an STM32F103 microcontroller (ARM Cortex M3) paired with a TI CC300 WiFi module. An iPhone app lets you easily gets your cores onto your network. They come with a bootloader that supports reflashing over WiFi. In fact Spark even provides an IDE that allows you to edit code and flash it to any of your modules from the comfort of your favourite browser.<br /><br /></span><img class="imageStyle" alt="Spark Build IDE" src="/weblog/files/spark-build-ide.png" width="844" height="568" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Spark have made the Spark Core as compatible with Arduino as they can, so many Arduino libraries should work providing they aren&rsquo;t doing anything AVR-specific, although currently the IDE doesn&rsquo;t support multiple files so you&rsquo;ll need to copy-paste the library code. Despite the single-file limitation, which they&rsquo;re working on, the IDE is pretty nice: it even supports some Emacs key bindings. The IDE also allows you to expose </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://docs.spark.io/#/api/reading-data-from-a-core-variables" rel="self">variables</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> from the Spark Core; these variables can be accessed via a REST API on Spark&rsquo;s servers, which mean you don&rsquo;t need to configure tunneling or DynDNS for your cores.<br /><br />I already had a Maxim </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.maximintegrated.com/datasheet/index.mvp/id/2812" rel="self">DS18B20</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> 1-Wire digital thermometer chip lying around, and it took just a few minutes to get that temperature sensor working thanks to Miles Burton&rsquo;s </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="https://github.com/milesburton/Arduino-Temperature-Control-Library" rel="self">Dallas Temperature Control Library</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> for Arduino.<br /><br />The non-library part of the sketch is shown above. It registers an integer variable called </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>temperature</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> in </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>setup()</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, which is then populated each time around in </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>loop()</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. <br />Here&rsquo;s a sample of the JSON you get back from querying that </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>temperature</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> variable:<br /><pre><br />$ curl "https://api.spark.io/v1/devices/1234567abcdef/temperature?access_token=feedbeef&rdquo;<br />{<br />  "cmd": "VarReturn",<br />  "name": "temperature",<br />  "result": 3,<br />  "coreInfo": {<br />    "last_app": "",<br />    "last_heard": "2014-02-03T04:30:09.921Z",<br />    "connected": true,<br />    "deviceID": "1234567abcdef"<br />  }<br />}<br /></pre><br />Between the REST and the JSON it&rsquo;s pretty trivial to digest the output programmatically. I put together a little CGI script in Python to make it easy to query the temperature:<br /></span><img class="imageStyle" alt="Temp CGI" src="/weblog/files/temp-cgi.png" width="877" height="583" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">After I had the breadboarded sensor working, I prepared it for duty monitoring the temperature of the freezer in our garage, I put the DS18B20 on the end of a cable with some heat shrink over the connections and mounted the Spark Core in an old iPod touch box, with holes drilled for the sensor cable, antenna and USB power cord. Here it is, gently clamped to the top of the USB power adaptor:<br /><br /></span><img class="imageStyle" alt="Freezer Monitor" src="/weblog/files/freezer-monitor.jpg" width="882" height="661" />]]></content:encoded></item><item><title>Wand</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2011-05-01T12:37:09-04:00</dc:date><link>/weblog/files/2011_05_wand.html#unique-entry-id-95</link><guid isPermaLink="true">/weblog/files/2011_05_wand.html#unique-entry-id-95</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">My wife has been reading the Harry Potter books to our kids. So, naturally, my son wanted the $30 crappy plastic officially licensed wand when he saw it in the book store.<br /><br />Rather than buy it, I made him one from a stick that he picked out in the yard:<br /><br /></span><img class="imageStyle" alt="Carter &#38;#38; Wand" src="/weblog/files/carter-0026-wand.jpg" width="612" height="612" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><h2>Construction</h2><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">I dremeled a channel to run the wires from an LED at its tip to a switch and power at the base. Initially I used a 3V coin cell because it was light and not bulky. Then I remembered I had a pager motor lying around, so I added that into the mix at my son&rsquo;s request. Unfortunately the coin cell wasn&rsquo;t able to drive the LED and the pager motor so I switched to a 9V battery instead. (Also, I couldn&rsquo;t find the coin cell holders that I know are around here somewhere&hellip;)<br /><br />The 9V is a bit bulky but I think we&rsquo;ll be able to fashion a housing that isn&rsquo;t too obtrusive.<br /><br /></span><img class="imageStyle" alt="Power Closeup" src="/weblog/files/power-closeup.png" width="616" height="630" />]]></content:encoded></item><item><title>Books</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2011-03-03T20:49:27-05:00</dc:date><link>/weblog/files/2011_02_books.html#unique-entry-id-94</link><guid isPermaLink="true">/weblog/files/2011_02_books.html#unique-entry-id-94</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">I couple of friends asked me on </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://twitter.com/finsprings" rel="self">twitter</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> what iOS development books I&rsquo;d recommend, based on my experience building </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://notesy-app.com" rel="self">Notesy</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">.<br /><br />I grabbed a shot of the books I still had in my bedside table and sent them along with a few comments. But digging them out made me realize just how many technical books I&rsquo;d managed to cram into that little Ikea cuboid.<br /><br />Here&rsquo;s them all hanging out on our bed:<br /><br /></span><img class="imageStyle" alt="Books!" src="/weblog/files/books.jpg" width="804" height="601" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />&mdash; and that&rsquo;s not counting the multiple years&rsquo; of Wood magazine I also have in there. I think it&rsquo;s safe to say I&rsquo;m a geek. </span>]]></content:encoded></item><item><title>Pittsburgh Glass Center &#x7c;&#x7c;</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2011-01-30T22:27:52-05:00</dc:date><link>/weblog/files/2011_01_glasscenter.html#unique-entry-id-93</link><guid isPermaLink="true">/weblog/files/2011_01_glasscenter.html#unique-entry-id-93</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">After enjoying ourselves at the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2010_12_glasscenter.html" rel="self" title="web log:Pittsburgh Glass Center">Christmas-themed &ldquo;Make It Now&rdquo; event at the Pittsburgh Glass Center</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, we knew we had to go back. They put on another event for Martin Luther King day, and this time Carter and Mary came too. All three of them made fused glass tiles:<br /><br /><br /></span><img class="imageStyle" alt="Make It Now Glass" src="/weblog/files/glass-two.jpg" width="514" height="194" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />That&rsquo;s Cameron&rsquo;s tree on the left, Mary&rsquo;s design in the center and Carter&rsquo;s kitty-cat on the right. Mary preferred hers prior to it fusing, as she&rsquo;d used a lot of zig-zag pieces of glass. I think my favourite is Carter&rsquo;s cat.</span>]]></content:encoded></item><item><title>Pittsburgh Glass Center</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-12-10T22:17:20-05:00</dc:date><link>/weblog/files/2010_12_glasscenter.html#unique-entry-id-92</link><guid isPermaLink="true">/weblog/files/2010_12_glasscenter.html#unique-entry-id-92</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">After hearing from friends who&rsquo;d been in a class at the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.pittsburghglasscenter.org/" rel="self">Pittsburgh Glass Center</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> I&rsquo;d been looking forward to making it down there myself. I wanted to take Cameron, but from their site it looked like she wouldn&rsquo;t be old enough to attend most of the classes. Luckily they do &ldquo;Make It Now&rdquo; quick classes with holiday themes, and those don&rsquo;t have an age restriction. I signed us up for the blown glass ornament class as soon as I could and started counting down the days until we went.<br /><br />It being such a quick, busy, and kid-friendly, class we didn&rsquo;t get to be too close to the furnaces or the hot glass, but we did get to pick out our colours and do the blowing. I chose green and yellow, and Cameron chose red and blue. Our teacher did all the hard work but it was still a lot of fun. We&rsquo;ll be going back for sure.<br /><br /></span><img class="imageStyle" alt="Glass Blowing" src="/weblog/files/glass-blowing.jpg" width="519" height="388" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />On the way out we spotted signs for a &ldquo;fused glass&rdquo; glass that was also open for kids. This is where you take a glass tile and arrange various pieces of glass mosaic fashion on it, with a dab of glue to hold it in place. They then heat the tiles in the kiln to fuse the glass together. Cameron chose to do a square snowman and it came out perfect!<br /><br /><br /></span><img class="imageStyle" alt="Glass Art" src="/weblog/files/glass-art-2.jpg" width="388" height="519" />]]></content:encoded></item><item><title>Carter soldering too&#x21;</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-11-07T22:10:00-05:00</dc:date><link>/weblog/files/2010_11_soldering.html#unique-entry-id-91</link><guid isPermaLink="true">/weblog/files/2010_11_soldering.html#unique-entry-id-91</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">After </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2010_09_makerfaire.html" rel="self" title="web log:Maker Faire NYC">Cameron trying out soldering</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> at Maker Faire in September, Carter decided he&rsquo;d like to give it a go too. Cameron was also keen to make another kit, so I picked up he </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.sparkfun.com/products/9205" rel="self">ClockIt</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> for her and the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.sparkfun.com/products/9563" rel="self">Lectro Candle Kit</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> for him.<br /><br /></span><img class="imageStyle" alt="Lectro" src="/weblog/files/lectro.jpg" width="188" height="188" /><img class="imageStyle" alt="ClockIt" src="/weblog/files/clockit.jpg" width="188" height="188" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />Both of them soldered really well &mdash; at least as good as me (not that that would be hard) &mdash; and both their kits worked first time. I was particularly impressed with Carter while he soldered the ATtiny95 onto the board: he seemed to know when to clean the tip, when to apply a little dab of extra solder and so on, all without me needing to provide much in the way of guidance.<br /><br /></span><img class="imageStyle" alt="Carter soldering" src="/weblog/files/carter-solder.jpg" width="800" height="600" />]]></content:encoded></item><item><title>Maker Faire NYC</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-09-30T21:00:32-04:00</dc:date><link>/weblog/files/2010_09_makerfaire.html#unique-entry-id-90</link><guid isPermaLink="true">/weblog/files/2010_09_makerfaire.html#unique-entry-id-90</guid><content:encoded><![CDATA[<img class="imageStyle" alt="makerfairelogo" src="/weblog/files/makerfairelogo.gif" width="252" height="60" /><br /><br /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">We took the kids up to New York to World Maker Faire. It was really hot for September, to the point where Carter had sun stroke, or at least dehydration, on the Saturday, poor kid, so we had to duck out early. He rallyed on Sunday though, and we got to spend the full day there.<br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />We screen printed t-shirts, Cameron learned to solder with SparkFun, the kids both made casts of their fingers in algir, and we got to take things apart in the deconstruction zone. We also managed to catch up with some Hack Pittsburgers while we were there too.<br /><br />All in all, it was a really fun weekend, and we&rsquo;ll definitely go again next year: perhaps to the Detroit one this time.<br /><br /></span><img class="imageStyle" alt="Cameron soldering the SparkFun Simon kit" src="/weblog/files/cameron-solder.jpg" width="519" height="388" />]]></content:encoded></item><item><title>Notesy</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-09-19T21:14:57-04:00</dc:date><link>/weblog/files/2010_09_notesy.html#unique-entry-id-89</link><guid isPermaLink="true">/weblog/files/2010_09_notesy.html#unique-entry-id-89</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">I&rsquo;ve been remiss by not posting for ages. I&rsquo;ve got a couple of things I need to write up, but my time has been taken up lately by my continuing work for the ever-awesome </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://buglabs.net" rel="self">Bug Labs</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> and my first iPhone app: </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://notesy-app.com" rel="self">Notesy</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">.<br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />I hope your projects are all going well too.<br /><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Cheers,<br />Dave<br /><br /></span><a href="http://notesy-app.com" rel="self"><img class="imageStyle" alt="" src="/weblog/files/icon00402x.png" width="114" height="114" /></a><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span>]]></content:encoded></item><item><title>PodBreakout Mini and Teensy</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-04-15T22:30:57-04:00</dc:date><link>/weblog/files/2010_04_14_podbreakoutmini_teensy.html#unique-entry-id-88</link><guid isPermaLink="true">/weblog/files/2010_04_14_podbreakoutmini_teensy.html#unique-entry-id-88</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">A couple of weeks ago Paul at pjrc.com, the maker of </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://pjrc.com/teensy/index.html" rel="self">Teensy</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, kindly sent me one to review. A few days after that Mike at Kineteka sent me a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://shop.kineteka.com/Products/118-ipod-iphone-ipad-podbreakout-mini.aspx" rel="self">PodBreakout Mini</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> to try. Mike also sent me a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://shop.kineteka.com/Products/98-ipod-ipad-iphone-female-podsocket-breakout.aspx" rel="self">PodSocket</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> but I&rsquo;ve not had a chance to mess with it; could be handy for analyzing auth chip serial shenanigans once my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://dangerousprototypes.com/category/logic-analyzer/" rel="self">Openbench</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> arrives.<br /><br />The Teensy and the PodBreakout Mini seem like a match made in much-smaller-iPod-serial-remote-heaven, no? Let&rsquo;s see&hellip;<br /><br /></span><img class="imageStyle" alt="Teensy 2.0" src="/weblog/files/teensy20.png" width="267" height="228" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><img class="imageStyle" alt="PodBreakout Mini" src="/weblog/files/podbreakout-mini.jpg" width="300" height="225" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />The Teensy 2.0 that Paul sent me is based on the ATMEGA32U4. What makes this chip particularly interesting is that it has a real USB interface, rather than just a serial port with an FTDI chip in front of it doing serial-to-USB. That means you can use it to interact with a host computer as if it were a USB keyboard or mouse, for example. Ladyada has a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.ladyada.net/make/usbgamepad/" rel="self">recent project</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> using this feature of the Teensy. The ATMEGA32U4 also has a regular hardware serial port - that&rsquo;s going to come in handy in a minute.<br /><br />The Teensy can be programmed a few different ways. I used the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.pjrc.com/teensy/loader.html" rel="self">Teensy Loader</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> which comes in versions for OS X, Windows and Linux; I used the Linux version on my 64-bit Ubuntu 9.10 box and it worked fine, barring some minor device file quirkiness in Arduino Serial mode (which Paul tells me seems to be specific to 9.10).<br /><br />What&rsquo;s particularly handy for me is that Paul has done a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://pjrc.com/teensy/teensyduino.html" rel="self">lot of work</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> to integrate the Teensy with the Arduino IDE. Following his instructions I added the Teensy board types very easily using the script he provides.You run the Arduino IDE and the Teensy Loader simultaneously; when you verify a sketch the Teensy Loader detects this and magically uploads the sketch to the Teensy for you; that is you don&rsquo;t need to (and can&rsquo;t) use the upload button in the Arduino IDE. It&rsquo;s pretty slick.<br /><br />Once I had </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>Blink</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> up and running I set about seeing if my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://finsprings.github.com/arduinaap/" rel="self">iPodSerial</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> library would work. The usual Arduino </span><code>Serial</code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> object isn&rsquo;t of type </span><code>HardwareSerial</code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> for the Teensy so I had to tweak the library to take a </span><code>HardwareSerial</code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> object in its constructor rather than defaulting to </span><code>Serial</code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. Other than that it was fine. Again Paul has </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://pjrc.com/teensy/td_uart.html" rel="self">good information</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> about the differences. I think I could probably just </span><code>#ifdef</code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> based on the board type so the same version of the library would work for the Teensy or regular Arduino boards. I haven&rsquo;t done this yet though, so the version on github won&rsquo;t currently compile for the Teensy without the aforementioned minor tweaking.<br /><br />I didn&rsquo;t feel like hooking up a switch so I just tweaked the play/pause example sketch to toggle every few seconds. I tried this and it worked first time! (Well my code didn&rsquo;t first time, but the electronics all did).<br /><br />Now by default the Teensy comes configured for 5V, but there are </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://pjrc.com/teensy/3volt.html" rel="self">instructions</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> on how to switch it to 3.3V using an optional </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://pjrc.com/store/mcp1825.html" rel="self">3.3V regulator</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, which Paul had kindly included with my review Teensy. I followed them without any problems.<br /><br />WIth the board converted I had to tell the Arduino IDE to clock the Teensy at 8MHz instead of 16MHz (it&rsquo;s not rated for 16MHz when operating at 3.3V although it may work just fine, depending on what you&rsquo;re doing with it). This was just a matter of editing the </span><code>boards.txt</code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> file to cut-and-paste an existing section to make a new variant with the slower clock speed (the </span><code>build_f_cpu</code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> line below):<br /><br /></span><code>myteensy2_ser.name=Teensy 2.0 (USB Serial) - 3.3 volts<br/>myteensy2_ser.upload.protocol=halfkay<br/>myteensy2_ser.upload.maximum_size=32256<br/>myteensy2_ser.upload.speed=38400<br/>myteensy2_ser.upload.disable_flushing=true<br/>myteensy2_ser.upload.avrdude_wrapper=teensy_reboot<br/>myteensy2_ser.build.mcu=atmega32u4<br/>myteensy2_ser.build.f_cpu=8000000L<br/>myteensy2_ser.build.core=teensy_serial<br/>myteensy2_ser.build.post_compile_script=teensy_post_compile<br/></code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /><br />With the Teensy operating at 3.3V you no longer need a Logic Level Converter between it and the iPod, since both the serial ports are now operating at 3.3V.<br /><br />This is when I broke out the PodBreakout Mini that Mike had sent me. It doesn&rsquo;t have all 30 pins but it has what they call the &ldquo;most commonly used&rdquo; pins: 1, 3, 4, 5, 6, 8, 13, 12, 21, 23, 25, 27, 30. 12 and 13 are the serial port, so that&rsquo;s good. I wasn&rsquo;t sure what to do about GND though &mdash; I&rsquo;d been using pin 11. I checked with Mike and he said they hadn&rsquo;t observed any differences between the grounds, so I went with pin 1.<br /><br />Here&rsquo;s the final setup:<br /><br /></span><img class="imageStyle" alt="IMG_0960" src="/weblog/files/img_0960.jpg" width="640" height="480" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />It is a nice compact setup, it only needs three wires (Tx, Rx and GND), it doesn&rsquo;t need a converter board in the middle, and most importantly it works perfectly!<br /><br />The PodBreakout Mini&rsquo;s board fits entirely inside the usual white plastic case (which it comes with), so it ought to be much more robust than the full-size PodBreakout boards I&rsquo;ve been using up until now, where the wide board is hanging out the back of the connector.<br /><br />The Teensy seems to be a great value at $18 ($19 if you get the 3.3V regulator to go with it), and the size is nice too. I&rsquo;m going to start playing around with its USB features when I find some more time.<br /><br />Thanks again to Paul and Mike for sending me cool things to play with, with no strings attached.</span>]]></content:encoded></item><item><title>PodBreakout Warning</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-04-14T23:30:04-04:00</dc:date><link>/weblog/files/2010_04_14_podbreakout_warning.html#unique-entry-id-87</link><guid isPermaLink="true">/weblog/files/2010_04_14_podbreakout_warning.html#unique-entry-id-87</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; font-weight:bold; font-weight:bold; ">UPDATE: 4/21/10</span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> Kineteka have now updated their </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.kineteka.com/PodBreakout-v1.aspx" rel="self">pinout page</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">.<br /><br />I&rsquo;ve had email discussions with a few people who&rsquo;ve been having trouble replicating my work. They all had v1.4 PodBreakout boards, whereas the two I have are v1.2. So I asked Mike at Kineteka if there was a difference and he said there was:<br /><br /></span><blockquote><p>There is a slight difference in the v1.4 due to a manufacturing glitch.<br/>The boards still work the pinout is just flipped.<br/>The pins are odd /even as opposed to even / odd. see below.<br/><br/>Back side of dock connector v1.2<br/>&nbsp;02 04 06 08 10 12 14 16 18 20 22 24 26 28 30<br/>&nbsp;01 03 05 07 09 11 13 15 17 19 21 23 25 27 29<br/><br/>Back side of dock connector v1.4<br/>&nbsp;01 03 05 07 09 11 13 15 17 19 21 23 25 27 29<br/>&nbsp;02 04 06 08 10 12 14 16 18 20 22 24 26 28 30<br/><br/><br/>So for instance the audio pins 3,4,5,6<br/><br/>PodBreakout Pin &nbsp; &nbsp; &nbsp; &nbsp; V1.2 &nbsp; &nbsp;V1.4<br/>&nbsp;Right Line Out &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; 4<br/>&nbsp;Left Line Out &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp; 3<br/>&nbsp;Right Line In &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5 &nbsp; &nbsp; &nbsp; 6<br/>&nbsp;Left Line In &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 6 &nbsp; &nbsp; &nbsp; 5<br/><br/><br/>We are working on updating the http://<a href="http://www.kineteka.com/PodBreakout-v1.aspx">www.kineteka.com/PodBreakout-v1.aspx</a> &nbsp;page to reflect these changes should be up soon.<br/></p></blockquote><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />So if you have a v1.4 board you&rsquo;ll need to adjust your connections appropriately.<br /></span>]]></content:encoded></item><item><title>iPod Serial wake up&#x21;</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-04-14T21:18:43-04:00</dc:date><link>/weblog/files/2010_04_14_ipod_serial_wake_up.html#unique-entry-id-86</link><guid isPermaLink="true">/weblog/files/2010_04_14_ipod_serial_wake_up.html#unique-entry-id-86</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">In my talk last night I had my easy button rig hooked up to an iPod Photo, rather than the iPod Touch I built it for, and used with in my car for months. A couple of times it stopped working and I didn&rsquo;t know what had happened.<br /><br />I did some digging tonight and the iPod Photo will respond to the remote just fine until the iPod goes to sleep &mdash; either explicitly via the &ldquo;Sleep&rdquo; menu item, or implicitly because it times out after sitting unplaying for a while. After walking it up, it will no longer respond to the remote. Disconnecting and reconnecting the remote doesn&rsquo;t help; resetting the Arduino doesn&rsquo;t help either. Resetting the </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; font-weight:bold; font-weight:bold; ">iPod</span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "> does cause it to start responding to the remote again &mdash; without doing anything at all to the remote or its connection.<br /><br />As I mentioned, I used this remote for months, but only with an iPod Touch. I don&rsquo;t have the iPod Touch any more, but I do have an iPhone. I cannot reproduce this behavior on the iPhone. There&rsquo;s no real equivalent to the older iPod&rsquo;s sleep, but if I press the button on the top of the iPhone, which shuts off the display and causes the lock screen to appear when the main button is next pressed, the remote continues to work just fine.<br /><br />So that was with the SimpleRemote_with_Bounce example sketch. I then tried the SimpleRemote_ethernet sketch, since that lets me try other Simple Remote commands interactively. I put the iPod to sleep via its menu and tried sending &ldquo;play&rdquo; via my telnet connection to the Arduino running SimpleRemote_ethernet. Again it ignored me, just like it ignored the easy button. I then sent it the Simple Remote &ldquo;iPod on&rdquo; command, and voila! It woke right back up and started responding to me again.<br /><br />So then I modified the SimpleRemote_with_Bounce sketch so it would send &ldquo;iPod On&rdquo; just before sending &ldquo;Play&rdquo; and it worked! I can no longer reproduce the unresponsiveness after the iPod has gone to sleep.<br /><br />If you have been using the SimpleRemote or SimpleRemote_with_Bounce example sketches, please consider using the new </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://github.com/finsprings/arduinaap/tree/master/iPodSerial/examples/SimpleRemote_with_Bounce_and_wake/" rel="self">SimpleRemote_with_Bounce_and_wake</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "> instead (yeah, I have no imagination when it comes to titles, but I wanted to rename it). I&rsquo;ve deleted SimpleRemote and SimpleRemote_with_Bounce from the library on github to avoid confusion.<br /><br />If you try this and it works &mdash; or doesn&rsquo;t &mdash; for you, please let me know.</span>]]></content:encoded></item><item><title>iPod Serial Talk</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-04-14T17:59:52-04:00</dc:date><link>/weblog/files/2010_04_14_ipod_serial_talk.html#unique-entry-id-85</link><guid isPermaLink="true">/weblog/files/2010_04_14_ipod_serial_talk.html#unique-entry-id-85</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><br /></span><a href="http://www.flickr.com/photos/cibomahto/4519207557/" rel="self"><img class="imageStyle" alt="" src="/weblog/files/4519207557_02969d203d.jpg" width="480" height="319" /></a><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">I had the great pleasure of giving a talk about my </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://github.com/finsprings/arduinaap" rel="self">iPodSerial</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "> library at </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://makepgh.org/2010/04/meeting-2-a-success-thanks-for-coming/" rel="self">Make:PGH</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "> last night. I&rsquo;ve been a subscriber to Make Magazine since issue one, so this was especially exciting for me. Thanks to those that came out and suffered through my ramblings, to </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.hackpittsburgh.org/" rel="self">Hack Pittsburgh</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "> for hosting, and to the Make:PGH crew for setting it up. I enjoyed listening to </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.ericsinger.com/" rel="self">Eric Singer</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">&rsquo;s talk too.<br /><br />If, for some strange reason, you want a copy of the slides you can grab the PDF version </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://finsprings.org/iPodSerial.pdf" rel="self">here</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">.<br />If, for some even stranger reason, you want a copy of the Keynote file just contact me through the captcha link in the footer.</span>]]></content:encoded></item><item><title>iPod Serial and the Nunchuk</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-03-31T23:27:00-04:00</dc:date><link>/weblog/files/2010_03_26_ipod_serial_nunchuk.html#unique-entry-id-84</link><guid isPermaLink="true">/weblog/files/2010_03_26_ipod_serial_nunchuk.html#unique-entry-id-84</guid><content:encoded><![CDATA[I uploaded a <a href="http://github.com/finsprings/arduinaap/blob/master/iPodSerial/examples/SimpleRemote_nunchuck/SimpleRemote_nunchuck.pde" rel="self">new sample sketch</a> for my <a href="http://github.com/finsprings/arduinaap" rel="self">iPodSerial library</a> that uses the Wii Nunchuk to control the iPod. I used todbot&rsquo;s <a href="http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/" rel="self">WiiChuck adaptor</a> to connect the Nunchuk to the Arduino.<br /><br /><img class="imageStyle" alt="" src="/weblog/files/mqc.jpg" width="480" height="640" /><br /><br />The Wii Nunchuk has a joystick, from which you can read the X and Y axes, a Z button, a C button and the 3-axis accelerometer. I mapped the controls so that: left/right on the joystick is skip forward/backward; up/down on the joystick is scroll up/down; Z button is Play; c button is Ok/Select; and a tilt backward (using the Y axis of the accelerometer) is the menu button.<br /><br />You could of course map them any way you wanted to.<br /><br />Here&rsquo;s a quick video of it in action (the Arduino is off-screen to the right).<br /><br /><!-- Movie code starts !--><div class="movie-frame"><script type="text/javascript">QT_WriteOBJECT_XHTML('/weblog/files/page1_blog_entry84_2.mov', '1280', '736', '', 'autoplay', 'false' );</script></div><!-- Movie code ends !-->]]></content:encoded></item><item><title>iPod Serial and the iPhone</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-03-26T07:57:09-04:00</dc:date><link>/weblog/files/2010_03_26_ipod_remote.html#unique-entry-id-83</link><guid isPermaLink="true">/weblog/files/2010_03_26_ipod_remote.html#unique-entry-id-83</guid><content:encoded><![CDATA[<h2>Bad News</h2><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">I have discovered that I am unable to get Advanced Remote mode to work with the iPhone 3G or 3GS. I had been doing all my recent work on Advanced Remote mode with an iPod Photo so as not to put my iPhone through any pain. It was really hard to test before but I wrote an AdvancedRemote_ethernet example sketch (it's in the library in github) to help with that. Recently I spoke with Ben, who is doing some </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://blog.section9.co.uk/2010/03/iphone-rfid-reader.html" rel="self">RFID work with a jailbroken iPhone</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. He could get his iPhone to receive serial commands but not transmit them, and the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://blog.section9.co.uk/2010/03/iphone-rfid-reader-update.html" rel="self">key for him ended up being the presence of the 500kOhm resistor on pin 21</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> - without it his app on the iPhone couldn't transmit to the serial port.<br /><br />Because Ben had been asking me about it, I tried the Advanced Remote mode on my iPhone 3GS and then my wife's 3G. I was surprised to find that the iPhone sees the commands but it sends back a "feedback" response with error 4. The exact same code works perfectly with the old iPod Photo. At first I hoped this was because I'd removed the resistor on pin 21 - which wasn&rsquo;t needed for the iPod Photo - so I put it back, but still no luck. Then I thought that perhaps the iPhone is fussier about the value of the resistor - I was using a 560kOhm and it's supposed to be 500kOhm - so I ordered some 500kOhm resistors from digikey. These arrived yesterday so I swapped the resistor, but I saw the same problem. So it looks like the resistor is needed for applications on an iPhone to be able to transmit serial data, but for the built-in iPod application there needs to be either something more than that or something instead of that.<br /><br />I know the iPhone is </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.adafruit.com/blog/2010/02/09/re-updated-mintyboost-faq-iphone-3gs/" rel="self">incredibly specific</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> about the inputs it sees before it will charge itself through the dock connector, so I'm guessing there's something like that about it wanting to see something on some other pins before it's willing to be controlled via Advanced Remote mode too. It has to be possible because my car does it with my 3GS, and it's the kind where the car has a separate display and can show track information etc, so it must be using Advanced Remote mode. I may probe the cable that comes with my car if I can find some time.<br /><br /></span><h2>Good News</h2><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />The Simple Remote mode commands do work with the iPhone though. I wrote a SimpleRemote_ethernet example sketch and was able to go through the menus, change the volume, play/pause, etc. on my 3GS. The initial remote I had in my old car with the Easy button used this approach.<br /></span>]]></content:encoded></item><item><title>iPod Simple Remote Example</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-03-04T21:59:06-05:00</dc:date><link>/weblog/files/2010_03_04_ipod_simple_remote.html#unique-entry-id-82</link><guid isPermaLink="true">/weblog/files/2010_03_04_ipod_simple_remote.html#unique-entry-id-82</guid><content:encoded><![CDATA[<span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Today we&rsquo;ll look at one of the example sketches that comes with my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://finsprings.github.com/arduinaap/" rel="self">iPod Serial</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> library. This one is for the Simple Remote mode, aka iPod Remote mode, aka Mode 2. Simple Remote mode provides serial commands that are the equivalents of the commands available through the physical buttons on the iPod. For the nitty gritty see the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://ipodlinux.org/wiki/Apple_Accessory_Protocol#iPod_Remote_.28Mode_2.29" rel="self">protocol wiki page</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> on ipodlinux.org.<br /><br />The SimpleRemote_with_Bounce example sketch sends the Play/Pause message when it sees a button is down and sends the &ldquo;button released&rdquo; message when it sees the button is up. This is the sketch I used in my own </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/archive-sep-2009.html" rel="self">remote</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">.<br /><br /></span><script src="http://gist.github.com/322414.js?file=SimpleRemoteExample.cc"></script><br /><br />This sketch uses the <a href="http://www.arduino.cc/playground/Code/Bounce" rel="self">Arduino Bounce</a> library to <a href="http://en.wikipedia.org/wiki/Debounce#Contact_bounce" rel="self">debounc</a>e the button. There&rsquo;s a version that does the debouncing on its own, called SimpleRemote, but it&rsquo;s more complicated and wouldn&rsquo;t scale if you were to use it for more buttons.<br /><br />Let&rsquo;s take the example sketch line by line (mostly):<br /><br />Line 7 pulls in the Simple Remote mode header file from the library. You need to have placed a copy of the iPodSerial library in your Arduino IDE&rsquo;s libraries folder for this to work.<br /><br />Line 8 pulls in the Bounce library. You need to have placed a copy of the Bounce library in your Arduino IDEs libraries folder for this to work.<br /><br />Line 10 says we&rsquo;re going to have our button connected to the Arduino&rsquo;s digital I/O pin 5.<br /><br />Line 11 sets the debounce interval to 20 milliseconds, meaning that the button has to stay up or down for 20 milliseconds before the Bounce library will decide that is really up or down.<br /><br />Line 13 creates our Bounce object, which is what&rsquo;s going to do the debouncing for us.<br /><br />Line 14 creates our SimpleRemote object, which is what&rsquo;s going to talk to the iPod for us.<br /><br />Line 18 makes digital I/O pin 5 an input, so we can read from it to see if the button is up or down.<br /><br />Line 21 enables digital I/O pin 5&rsquo;s internal <a href="http://en.wikipedia.org/wiki/Pull-up_resistor" rel="self">pull-up resistor</a>. This sounds scary, but all it means to us is that we can connect a button between pin 5 and ground without any other circuitry, which is referred to as an active-low configuration. The means that the pin will read as LOW when the button is down (pressed) and HIGH when the button is up (released). That probably seem backwards but as long as we&rsquo;re expecting it to work that way it&rsquo;s not a problem.<br /><br />Line 23 takes care of setting up the serial connection to the iPod.<br /><br />Line 28 lets the SimpleRemote object take care of anything it needs to do with the iPod. This needs to be in our loop() function.<br /><br />Line 30 asks our Bounce object if there has been a change in the state of the button. That is, has the button just been pressed or just been released.<br /><br />Line 32 checks the new state of the button, now that line 30 has told us the button has just changed state. If the new state is LOW that means the button has just been pressed (since we&rsquo;re using an active-low button configuration).<br /><br />Line 34 will get executed if the button has just been pressed. It tells our SimpleRemote object to send the Play command, which toggles the iPod between Play and Pause, just like the physical Play / Pause button would.<br /><br />Line 37 will get executed if the button has just been released. The Simple Remote protocol requires this so that the iPod knows when the button has been released. Because of this, press-and-hold behaviours of the physical buttons also work through Simple Remote mode. So, for example,  if you press and hold the button using this sketch the iPod screen will fade to black after a few seconds, just like it would if you pressed and held the physical Play button.<br /><br />And that&rsquo;s it!<br /><br />If you look in the library at the file SimpleRemote.h you can see the full list of commands that can be sent:<br /><br /><ul class="(null)"><li>Play (the one we used in the example, that toggles between Play and Pause)</li><li>Volume Plus</li><li>Volume Minus</li><li>Skip Forward</li><li>Skip Backward</li><li>Next Album</li><li>Previous Album</li><li>Stop</li><li>Just Play (rather than toggling between Play and Pause)</li><li>Just Pause (rather than toggling between Play and Pause)</li><li>Toggle Mute</li><li>Next Playlist</li><li>Previous Playlist</li><li>Toggle Shuffle</li><li>Toggle Repeat</li><li>iPod Off</li><li>iPod On</li><li>Menu</li><li>Ok / Select</li><li>Scroll Up</li><li>Scroll Down</li></ul><br />Expanding the example to work with more buttons is pretty simple. Let&rsquo;s see what it would look like if we added volume plus and minus button support:<br /><br /><script src="http://gist.github.com/322448.js?file=SimpleRemote_with_three_buttons.pde"></script><br /><br /><br />]]></content:encoded></item><item><title>iPod Remote Part Deux</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2010-03-02T21:45:38-05:00</dc:date><link>/weblog/files/2010_03_02_ipod_remote.html#unique-entry-id-81</link><guid isPermaLink="true">/weblog/files/2010_03_02_ipod_remote.html#unique-entry-id-81</guid><content:encoded><![CDATA[<strong>3/26/2010 UPDATE:</strong> Advanced Remote mode is not working for me with iPhone. See <a href="/weblog/files/2010_03_26_ipod_remote.html" rel="self">update post</a>.<br /><strong>4/14/2010 UPDATE:</strong> See <a href="/weblog/files/2010_04_14_podbreakout_warning.html" rel="self">here</a> if you have a v1.4 PodBreakout board.<br /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />I had been using my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="/weblog/files/2009_09_07_ipod_remote.html" rel="self">iPod remote</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> for a few months. It worked well and scratched the itch it was built to scratch. But in December I got a new car with iPod and Bluetooth integration. I also got rid of my despised Blackberry and switched to an iPhone. This meant I no longer needed to use my custom remote, so I placed it lovingly in my electronics drawer and forgot about it for a while.<br /><br />Recently I was asked if I would present a talk at </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://makepgh.org/" rel="self">Make: PGH</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> about my experiences developing my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://github.com/finsprings/arduinaap" rel="self">Arduino iPod Serial library</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. I agreed, and it&rsquo;s tentatively scheduled for the April meet-up. Someone also sent me an email asking for some help troubleshooting their build of a remote, so I was inspired to dig the remote out of the drawer. I also took a look at the library I&rsquo;d created and decided that I really ought to finish what I&rsquo;d started.<br /><br />I already had a spare logic-level converter and PodGizmo from the original project, so I soldered them together and hooked them up to my </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://arduino.cc/en/Main/ArduinoBoardMega" rel="self">Mega</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">. (The Mega is great for testing serial protocol stuff because it has four real serial ports, compared to the one on a regular Arduino. I built the library with debug hooks in it so that I could spit out the protocol data going back and forth between the iPod and the Arduino, and without that it would have been really hard to debug it.)<br /><br />I discovered that the resistor connected to pin 21 isn&rsquo;t needed. I also realized that I could use the iPod to supply the low-voltage power to the logic-level converter. This cleaned up the wiring considerably (click on the image to go to Flickr where there&rsquo;s a full-resolution version):<br /><br /></span><a href="http://www.flickr.com/photos/finsprings/4403179910/" rel="self"><img class="imageStyle" alt="" src="/weblog/files/ipodserial.jpg" width="600" height="315" /></a><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />On the left is a </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.nkcelectronics.com/freeduino-arduino-diecimila-compatible-board-complete-kit.html" rel="self">Freeduino</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> with an </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.arduino.cc/en/Main/ArduinoEthernetShield" rel="self">Ethernet Shield</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> on top of it, but more on that later - the point is that you just need 5V, Ground and your Serial TX/RX lines on the Arduino side. The awful connections in the four wires between the logic-level converter and the PodBreakout board shouldn&rsquo;t be there. They only exist because I tried out the suggestion </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://hcgilje.wordpress.com/2010/02/15/iphone-serial-communication/" rel="self">here</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> to skip the logic-level converter and put a 1KOhm resistor between the Arduino TX pin and the iPod RX pin. I verified with an EE friend that this would be okay and he said:<br /><br /></span><blockquote><p>While not optimal, you should never see a problem with a 1k resistor. On TX_ARDUINO... (not RX_ARDUINO). What you're doing is relying on the protection diode of the iPhone to clamp the Voltage and sink some current. The resistor will do two things. 1) Limit the current possible to send into the iPhone (5V / 1k = 5mA max). Almost all digital protection circuits can handle 5mA for a few minutes at least. Therefore, even if you wire it up wrong, you will be very unlikely to fry anything. 2) Provide somewhere besides the protection diode in the iPhone to dissipate the power (V^2/R = 1.7*1.7/ 1k = 2.89 mW). 3mW isn't a lot of power for a diode, but it will help prevent the chip from wearing out prematurely.<br/>Vih on the ATmega328 (Duemilanove) is 0.6*Vcc when Vcc is 5.0V. This means that the input signal needs to be above 3.0V to be guaranteed to be seen as a "1". There's usually a bit of guard-band on that spec. However, I would NOT put a resistor on the iPhone output to the Arduino (RX_ARDUINO). If you did, you'd start to see bit errors at higher bit rates. At 9600 baud, you shouldn't see anything unpleasant on either side of the bus.</p></blockquote><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />As he said, it didn&rsquo;t do any harm to my iPod, but unfortunately I was unable to get any communication to work using this method. I tried it a few times, even with just the Play/Pause sketch, which requires no response from the iPod, without luck. It could be that I did something wrong though. The logic-level converters are under $3 so I&rsquo;m okay with continuing to use them.<br /><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">Back in September I had two example sketches included in the library: a Simple Remote Mode one that did play/pause, which was what I was using in my car; and a proof-of-concept sketch for Advanced Remote Mode. This went with the just-proof-of-concept Advanced Remote mode support I had implemented. Over the last few weeks I have added full support for Simple Remote Mode, which was pretty easy, and near-full support for Advanced Remote Mode (no picture block support), which was a lot more complicated. I also refactored the library code because it needed to be done, and that sort of thing makes me happy.<br /><br />I have been adding example sketches as I go, and I will talk about those in follow-up articles.<br /></span>]]></content:encoded></item><item><title>iPod Remote</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2009-09-07T22:55:12-04:00</dc:date><link>/weblog/files/2009_09_07_ipod_remote.html#unique-entry-id-80</link><guid isPermaLink="true">/weblog/files/2009_09_07_ipod_remote.html#unique-entry-id-80</guid><content:encoded><![CDATA[<strong>3/2/2010 UPDATE:</strong> See <a href="/weblog/files/2010_03_02_ipod_remote.html" rel="self">update post</a>.<br /><strong>4/14/2010 UPDATE:</strong> See <a href="/weblog/files/2010_04_14_podbreakout_warning.html" rel="self">here</a> if you have a v1.4 PodBreakout board.<br /><strong><br />UPDATE:</strong> Better photos up on <a href="http://www.flickr.com/photos/finsprings/sets/72157622314319194/" rel="self">Flickr</a>.<br /><br />I've been desperately short of Arduino play time in the last few months, but I did finally find time to finish my Arduino-based iPod remote (well, version 1.0 of it anyway). My remote has a single button that toggles between Play and Pause on the iPod. I wanted one like that for my car so I could easily pause my iPod Touch without having to: find it, unlock it; find the touch-screen pause button; and finally, pause it.<br /><br />So how to go about this?<br /><br />Well, the iPod dock connector actually exposes a serial connection to the iPod. You can see this on the pinout, the best online version of which I found on <a href="http://pinouts.ru/PortableDevices/ipod_pinout.shtml" rel="self">pinouts.ru</a>.  This serial connection can be used by docks, or in my case an Arduino, to interact with the iPod. The iPod speaks AAP on its serial port: the <a href="http://nuxx.net/wiki/Apple_Accessory_Protocol" rel="self">Apple Accessory Protocol</a>. There are several modes in AAP that you can interact with an iPod over serial in, but Simple Remote (mode 0x02) is by far the easiest, as it has no responses to deal with. Simple Remote mode allows you to play and pause the iPod, change tracks, adjust the volume and so on. Since that covered my needs it's what I implemented first. (I've also implemented part of Advanced Remote (mode 0x04) as we'll briefly see later.)<br /><br />With the pinout and protocol documentation in hand I ordered a couple of cheap iPod charging cables to hack on. However, when they arrived I realized that my soldering skillz were nowhere near good enough to make the connections I was going to need. Luckily I am not the first person to have this problem, and SparkFun has the solution: the <a href="http://www.sparkfun.com/commerce/product_info.html?products_id=8295" rel="self">PodGizmo breakout board</a>:<br /><br /><a href="http://www.sparkfun.com/commerce/product_info.html?products_id=8295" rel="self"><img class="imageStyle" alt="PodGizmo" src="/weblog/files/podgizmojpg.jpg" width="300" height="300" /></a><br /><br />The PodGizmo has connections to all the pins on the dock connector and gives you through-holes to solder things onto: perfect!<br /><br />I proceeded to hook up wires to the serial I/O pins (12 and 13), serial ground (11) and to pin 21: the rather curious-sounding <em>"Accesory Indicator / Serial Enable"</em> pin. The level of resistance between this pin and ground apparently tells the iPod what kind of accessory it is connected to. Since I wanted to use the serial interface, I went with a 500kOhm resistor, to select the <em>"r</em><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><em>elated to serial communication / used to enable serial communications Used in Dension Ice Link Plus car interface"</em></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> mode.<br /><br />With my connections made, I was about to hook it up to my Arduino, but then I remembered that the serial output of the Arduino is 5V. I wasn't sure what the iPod wanted but I guessed it probably only wanted 3.3V. I didn't know what to do, so I googled around for a bit looking at various level-shifting solutions. Some you could make from a few components but I was concerned they wouldn't be able to switch fast enough to get a good serial signal. Luckily, during my googling I came across another SparkFun gem: the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.sparkfun.com/commerce/product_info.html?products_id=8745" rel="self">BOB-08745 Logic Level Converter</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">.<br /><br /></span><a href="http://www.sparkfun.com/commerce/product_info.html?products_id=8745" rel="self"><img class="imageStyle" alt="Logic Level Converter" src="/weblog/files/bob_0745jpg.jpg" width="300" height="300" /></a><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /><br />This little guy lets you talk serial (or I2C, SPI, etc) at one voltage on one side and another voltage on the other side. Again: perfect!<br /><br />So with the level converter added to the mix, I was ready to hook it up to the Arduino.<br /><br />Of course, hooking up wasn't going to do much without some code to talk Apple Accessory Protocol, so that was the next task. I wrote an Arduino library for the parts of the Apple Accessory Protocol that I was going to need, and a bit more besides. I posted it on </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://github.com/finsprings/arduinaap" rel="self">github</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> in case anyone else wanted to use it. It comes with a couple of example sketches: a play/pause one using Simple Remote mode (wonder where I got that idea from); and one for Advanced Remote mode that pulls back information for the track that the iPod is currently playing. The latter could form the basis of an Arduino-based dock that showed track information on an LCD display, for example.<br /><br />Here's the example Simple Remote sketch. I'm using almost exactly this for my remote, the only difference being that I'm using an active-low on my switch with the Arduino's internal pull-up to avoid having an external resistor for the switch:<br /><br /></span><script src="http://gist.github.com/182707.js"></script><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />During development I used an </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://arduino.cc/en/Main/ArduinoBoardMega" rel="self">Arduino Mega</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> so that I could have a real serial port for the iPod and a real one for debugging messages. I probably could just have used the </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.arduino.cc/en/Reference/SoftwareSerial" rel="self">SoftwareSerial</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> library with a regular Arduino for debugging, but since I had the Mega around, I used it. My library defaults to having debugging messages disabled, but you can configure it in your </span><code>setup() </code><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">method to route those messages to any serial port you like.<br /><br />Once I had it working to my liking I transferred the sketch over to an </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://arduino.cc/en/Main/ArduinoBoardNano" rel="self">Arduino Nano</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">, since it would fit in an Altoids tin (of course). This is what it looked like at this point:<br /><br /></span><img class="imageStyle" alt="iPod Serial - Tidied Up" src="/weblog/files/ipodserial_tidied_up.jpg" width="608" height="458" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />You can see I'm just using a simple push button for the play/pause action. The Nano is sitting on a little breadboard and you can just see the resistor I have connected to pin 21. I probably should have just put the resistor on the PodGizmo breakout board, but I didn't.<br /><br />Next came testing it with my iPod Touch:<br /><br /></span><img class="imageStyle" alt="Testing" src="/weblog/files/ipod_serial_going_nano.jpg" width="600" height="452" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />Everything checked out, so next I switched out the little button for a REALLY BIG BUTTON:<br /><br /></span><img class="imageStyle" alt="Easy Button Installed" src="/weblog/files/easy_button_installed.jpg" width="600" height="450" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />As you can see it's an Easy Button from Staples; I just took out the Easy Button's batteries, soldered wires to either side of its switch, and routed them out through the hole conveniently left by the battery lid. The Nano is sitting on an Altoids tin at this stage, but it's not yet </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; font-weight:bold; font-weight:bold; ">in</span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> the tin. That came next, thanks to Mr Dremel:<br /><br /></span><img class="imageStyle" alt="Dremeling Done" src="/weblog/files/dremeling_done.jpg" width="600" height="452" /><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><br />I took it out to the car, hooked up the Nano's USB cable to my USB car adaptor (similar to </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.amazon.com/gp/product/B000RYSU7O?ie=UTF8&tag=davidfindlayo-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B000RYSU7O" rel="self">this one</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "> on Amazon, but you can get them lots of places), and tried it out. It worked pretty well, but there was one problem: I was still using a cable to connect the headphone socket on the iPod to the line-in jack on my car. The audio wouldn't go out the headphone socket unless I plugged the dock cable in first and then the headphone cable. As you've probably realized by this point, it was completely stupid of me to still be using a headphone cable: the dock connector has connections for line out! Having caught up with my smarter readers, I took the remote into the lab at work and add hooked up the line-out cable. This gives me true line out instead of the volume-adjusted headphone output, saves wear and tear on the headphone socket on my iPod, and avoids the what-to-connect-first problem, as there's only one thing to connect.<br /><br />So how does it work? It works great, thanks! The only real quirk I've noticed is that when I first connect it, my 2G iPod Touch will play audio out of its internal 'speaker' for a couple of seconds before realizing that it's connected to the dock and switching over. It even pauses the iPod when I turn off the car, presumably because the iPod sees the dock go away when the Nano loses power.<br /><br />No doubt someone will point out that the Nano is a gazillion times overpowered to do a couple of serial I/O sequences, and they'd be right. But: I already had the Nano anyway; and I plan on expanding the remote soon (dash-mounted, </span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; "><a href="http://arduinix.com/" rel="self">arduinix</a></span><span style="font:13px Arial, Verdana, Helvetica, sans-serif; ">-powered, nixie tube track status action anybody?).</span>]]></content:encoded></item><item><title>Django Time</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2009-09-02T20:35:53-04:00</dc:date><link>/weblog/files/2009_09_02_django_time.html#unique-entry-id-79</link><guid isPermaLink="true">/weblog/files/2009_09_02_django_time.html#unique-entry-id-79</guid><content:encoded><![CDATA[I was back home in Scotland in June and my dad happened to mention a problem he was having at work: he does forensic computer analysis and had written a case tracking system for his department in Access. However, the data model wasn&rsquo;t normalized and he was finding it difficult to extend it to meet their growing needs. I&rsquo;m not familiar with Access but I poked around a bit and did some googling, and it seemed like we could get it to at least support a couple of his desired changes, but it wasn&rsquo;t going to be pretty.<br /><br />It got me to thinking though, and when I got back to the States, I decided to try out re-implementing the system using <a href="http://www.djangoproject.com/" rel="self">Django</a>. Django is a web framework for Python, and I had been meaning to find time to try it out for a while. You define your data models as Python objects and Django handles the <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" rel="self">ORM</a> to get your data in and out of a database. It also provides APIs to query and manipulate the data easily from Python, and templating to help you display data in web pages.<br /><br />I won&rsquo;t presume that I could describe Django better than its authors, however, so here&rsquo;s its features lifted straight from djangoproject.com:<br /><br /><strong>Object-relational mapper</strong><br /><em>Define your data models entirely in Python. You get a rich, dynamic database-access API for free &mdash; but you can still write SQL if needed.<br /></em><strong>Automatic admin interface</strong><br /><em>Save yourself the tedious work of creating interfaces for people to add and update content. Django does that automatically, and it's production-ready.<br /></em><strong>Elegant URL design</strong><br /><em>Design pretty, cruft-free URLs with no framework-specific limitations. Be as flexible as you like.<br /></em><strong>Template system</strong><br /><em>Use Django's powerful, extensible and designer-friendly template language to separate design, content and Python code.<br /></em><strong>Cache system</strong><br /><em>Hook into memcached or other cache frameworks for super performance &mdash; caching is as granular as you need.<br /></em><strong>Internationalization</strong><br /><em>Django has full support for multi-language applications, letting you specify translation strings and providing hooks for language-specific functionality.<br /></em><br />What particularly attracted me to Django is its amazing out-of-the-box <a href="http://docs.djangoproject.com/en/dev/ref/contrib/admin/" rel="self">administration interface</a>. Django was developed in a news room environment, so they put together a pretty full-featured administration interface that lets journalists enter news articles, mark them for display on the newspaper&rsquo;s public pages, and so on. The public-facing part of the site then uses Django&rsquo;s template system in conjunction with is MVC framework to retrieve and present the data entered via the admin interface. <br /><br />In my use case, the system would only be used by a small number of people, all of whom would have at least some form of administrative access. So, I figured I could get a pretty usable system without having to do any &lsquo;webby&rsquo; stuff at all. And that&rsquo;s been pretty much my experience: the bulk of the system is in two Python source files: one that defines the data model; and one that customizes the administration interface.<br /><br />Django works with multiple databases, including <a href="http://sqlite.org" rel="self">SQLite</a>, for which I have a definite soft spot. It also comes with a for-development web server built-in. Given the small number of users, I hoped that I could use SQLite and the built-in web server for the final version, thereby saving my dad from having to install and maintain database and web servers. The built-in server isn&rsquo;t meant to be used in production, but we&rsquo;ll see how it does. The system doesn&rsquo;t have enough run time on it yet, but if it proves unreliable then switching to a full web server won&rsquo;t be too painful. I don&rsquo;t foresee SQLite being a bottleneck, but if it does we can switch it to MySQL or Postgres or something, although I&rsquo;d need to convert the data to do that probably.<br /><br />The Django site has an excellent four-part tutorial that walks you through most of its aspects. It was certainly enough to get me going. The online documentation for the APIs is also very good. It didn&rsquo;t take long at all to get a proof-of-concept up and running for my dad to try out. We used <a href="http://basecamphq.com/" rel="self">basecamp</a> to keep track of things as we worked through the nitty gritty of the design, git to track the source, and a couple of Django sites at my web host so my dad could play with the system as it came together (kudos to Andrew at <a href="http://dreamhost.com/" rel="self">dreamhost</a> for helping me get Passenger WSGI going with Django by the way).<br /><br />In just a few weeks of working on it spare time the system is up and running, complete with a couple of reports (HTML and CSV) and some features not envisaged at the outset (ain&rsquo;t that always the way?). I even wrote an importer that took the old cases from Access via a CSV file and imported them into the new one, using Django&rsquo;s model classes so that I didn&rsquo;t even have to write a single INSERT statement.<br /><br />If you're a pythony sort of person then I highly recommend taking a look at Django for your next webby projecty thingy.<br /><br /><img class="imageStyle" alt="Sample Screen Shot" src="/weblog/files/forensic_tracker.png" width="663" height="253" /><br />]]></content:encoded></item><item><title>Pinging Peanuts</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2009-04-14T13:59:58-04:00</dc:date><link>/weblog/files/2009-4-14-pingingpeanuts.html#unique-entry-id-78</link><guid isPermaLink="true">/weblog/files/2009-4-14-pingingpeanuts.html#unique-entry-id-78</guid><content:encoded><![CDATA[I was in need of a project to play with the <a href="http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/ProductID/92/List/1/Default.aspx?SortField=ProductName,ProductName" rel="self">Parallax PING)))</a> sensor. Fortunately, my mother-in-law had recently donated one of those birthday cards that plays a tune to my could-come-in-handy-for-a-project pile. So I decided to use an <a href="http://arduino.cc" rel="self">Arduino</a> with the PING))) to turn the tune on when something got close to it.<br /><br />The first step was to remove the sound module from the birthday card, which was pretty easy. I then removed the 3V coin cell battery and soldered on power leads in its place.<br /><br />Here&rsquo;s a close-up:<br /><br /><img class="imageStyle" alt="Closeup of the sound chip" src="/weblog/files/sound-chip-closeup.png" width="562" height="424" /><br /><br />The sound chip is buried under that black blob; beyond that there&rsquo;s just a couple of resistors, a capacitor, and a pair of white wires leading to the speaker.<br /><br />The Arduino&rsquo;s digital output pins operate at 5V when set to HIGH. I wanted to keep things simple on the control side, so I tried powering the sound module at 5V and it worked without any smoke or other obvious ill-effects. That meant that I could drive it directly, without having to step the voltage down. I probably should have checked the power draw to make sure that I wasn&rsquo;t going to overdrive the digital outputs on my Arduino, but I figured it would be fine so I didn&rsquo;t bother. I could also have tried knocking down the apparent voltage via one of the Arduino&rsquo;s PWM outputs or just stuck in an inline resistor, but again I was trying to keep it as simple as possible. So I just hooked the negative lead from the sound module to a ground connection on the Arduino, and the positive lead to digital pin 4.<br /><br />On the software side, I started from the example sketch for the PING))) that comes with the <a href="http://arduino.cc/en/Main/Software" rel="self">Arduino IDE</a> as of version 014 (it&rsquo;s at <em>Sketchbook/Examples/Sensors/Ping)</em> and tweaked it to do what I wanted.<br /><br />My sketch polls the PING))) sensor; if the distance reading that it returns is less than five inches, the sketch sets the digital pin connected to the sound module to HIGH, otherwise it sets it to LOW. And that&rsquo;s it! I love how the Arduino enables you create simple things like this in such a short space of time. The sketch is <a href="http://finsprings.org/pingingpeanuts.pde" rel="self">here</a> if you&rsquo;re interested.<br /><br />Here&rsquo;s the final setup, showing the <a href="http://www.nkcelectronics.com/freeduino-arduino-diecimila-compatible-board-complete-kit.html" rel="self">Freeduino</a> (an Arduino clone) in the background:<br /><br /><img class="imageStyle" alt="Pinging Peanuts" src="/weblog/files/pinging-peanuts.png" width="650" height="487" /><br /><br />And here&rsquo;s a video of it in action:<br /><br /><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/lke4RARgid8&hl=en&fs=1&rel=0&color1=0x006699&color2=0x54abd6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lke4RARgid8&hl=en&fs=1&rel=0&color1=0x006699&color2=0x54abd6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object><br /><br /><strong>Note:<br /></strong>If you use Linux and have version 4.3.0 of avr-gcc (which is the default in Ubuntu 8.10), then due to a bug discussed <a href="http://www.arduino.cc/playground/Learning/Linux" rel="self">here</a> you won&rsquo;t get valid readings from the PING))) sensor (you&rsquo;ll get enormous distance readings back, or at least I did). I upgraded to the Jaunty version and then it worked for me just fine.<br /><br />]]></content:encoded></item><item><title>HeartChuck</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2009-03-08T21:55:16-04:00</dc:date><link>/weblog/files/2009-3-8-heartchuck.html#unique-entry-id-77</link><guid isPermaLink="true">/weblog/files/2009-3-8-heartchuck.html#unique-entry-id-77</guid><content:encoded><![CDATA[I&rsquo;ve been messing around with the <a href="http://arduino.cc" rel="self">Arduino</a> lately. It&rsquo;s a fun, low-barrier-of-entry, platform for hacking around with LEDs, servos and other fun stuff.<br /><br />Recently I ordered the kit for an <a href="http://www.jimmieprodgers.com/openheart" rel="self">OpenHeart</a>: an LED panel in the shape of a heart that uses <a href="http://www.instructables.com/id/Charlieplexing-LEDs--The-theory/" rel="self">charlieplexing</a> to minimize the number of I/Os required to address the LEDs. The instructions were great and I picked up some tips to make my soldering better. The author made it very easy, even providing a <a href="http://www.jimmieprodgers.com/programheart" rel="self">flash-based programmer </a>that lets you define your animation sequence and writes the code for you, so for animations all you need to do is cut-and-paste the code into the Arduino IDE and download it.<span style="font:10px Arial, Verdana, Helvetica, sans-serif; "><br /></span><span style="font:10px Arial, Verdana, Helvetica, sans-serif; "><br /><br /></span><a href="http://www.flickr.com/photos/jaypee4227/2578471958/" rel="self"><img class="imageStyle" alt="OpenHert" src="/weblog/files/OpenHeart.jpg" width="508" height="383" /></a><br /><br />Fast forward a week or two and I watched episode 109 of Make TV, where John Park made a <a href="http://blog.makezine.com/archive/2009/02/maker_workshop_personal_flight_reco.html" rel="self">personal flight recorder</a> using an Arduino and a Wii nunchuck. <br /><br /><a href="http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/" rel="self"><img class="imageStyle" alt="Wiichuck" src="/weblog/files/wiichuck_adapter1.jpg.jpg" width="458" height="346" /></a><br /><br />He used a <a href="http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/" rel="self">Wiichuck</a> to connect the nunchuck to the Arduino; it&rsquo;s a really simple, but clever, board that saves you from having to hack off the custom connector, thereby rendering the nunchuck useless for future Wii boxing matches (and making you unpopular with your offspring in the process). The nunchuck has an I&sup2;C interface and the maker of the Wiichuck provides you with a wrapper to the Arduino&rsquo;s Wire library that makes it really easy to get the accelerometer, button and joystick readings.<br /><br />Tonight I decided to make the nunchuck control the openheart, which with all the hard work done by others didn&rsquo;t take very long at all. The Arduino sketch is available for <a href="http://finsprings.org/HeartChuck.zip" rel="self">download</a> if you&rsquo;re interested.<br /><br />Here&rsquo;s a video of it in action:<br /><br /><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/SOtFxFDy2aQ&hl=en&fs=1&rel=0&color1=0x006699&color2=0x54abd6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/SOtFxFDy2aQ&hl=en&fs=1&rel=0&color1=0x006699&color2=0x54abd6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object><br />]]></content:encoded></item><item><title>Making Phunky</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2009-02-25T17:02:42-05:00</dc:date><link>/weblog/files/2009-2-25-phunky.html#unique-entry-id-76</link><guid isPermaLink="true">/weblog/files/2009-2-25-phunky.html#unique-entry-id-76</guid><content:encoded><![CDATA[<img class="imageStyle" alt="BUGsound" src="/weblog/files/BUGsound.jpg" width="425" height="300" /><br /><br />Bug Labs recently came out with their <a href="http://buglabs.net/modules/bugsound" rel="self">BUGsound</a> module. I made a fun little application for it using the <a href="http://buglabs.net/modules/bugmotion" rel="self">BUGmotion</a>&rsquo;s accelerometer stream to pick from a set of samples. The accelerometer is a 3-axis, so I assigned each axis 3 samples to choose from; the application then chooses one of those 3 samples based on that axis&rsquo; current reading and mixes the chosen samples for all the axes together. I picked the sample changeover point for each axis based on experimentation by moving the BUG around while printing out the accelerometer readings.<br /><br />Figuring out how to get sample loops to mix on the fly at 44.1kHz was a little tricky, but it ended up not being much code (you can download it from <a href="http://buglabs.net/applications/Phunky" rel="self">http://buglabs.net/applications/Phunky</a> if you&rsquo;re interested).<br /><br /><h4>Implementation</h4>When the application starts it creates an instance of the <code>SampleStream</code> class, which extends <code>InputStream</code>, and starts playing it via <code>IModuleAudioPlayer.play()</code>; as far as <code>IModuleAudioPlayer</code> is aware, <code>SampleStream</code> is just a stream of data from a Wave file.<br /><br />The main loop in <code>PhunkyApplication.run()</code> then runs forever, grabbing samples from the <code>AccelerometerSampleStream</code> as fast as it can, and passing the X, Y and Z values over to the <code>SampleStream</code> instance.<br /><br />Since <code>SampleStream</code> extends <code>InputStream</code>, <code>IModuleAudioPlayer</code> is constantly grabbing sample data from it. <code>SampleStream</code> includes a faked Wave file RIFF header. It outputs that header first, and then outputs the mixed sample data from then on.<br /><br /><code>SampleStream</code> owns nine instances of the <code>Sample</code> class, which also extends <code>InputStream</code>. Each instance of <code>Sample</code> wraps a raw sample data file that comes with the application (more on them later).<br /><br />The nine <code>Sample</code> instances are assigned three-to-an-axis. Thus whenever <code>SampleStream</code> is asked for data to be played (after the fake Wave header has been output), it looks at the X, Y and Z values it was last given by the main application loop, uses those values to choose a <code>Sample</code> instance for each axis, then reads a sample from each and mixes them together.<br /><br />Because the reading of accelerometer data is decoupled from the generation of the mixed sample data, there&rsquo;s no concern about stuttering: <code>SampleStream</code> will simply continue mixing the same 3 <code>Sample</code> streams together until it gets updated accelerometer data.<br /><br />That sounds like a lot of code, but it really isn&rsquo;t: here&rsquo;s the entire <code>SampleStream.read()</code> method (<em>apologies for the formatting; I need to change the width of this column I really do&hellip;</em>):<br /><br /><br /><span style="font:11px Monaco; color:#7F0055;">public</span><span style="font:11px Monaco; "> </span><span style="font:11px Monaco; color:#7F0055;">int</span><span style="font:11px Monaco; "> read() </span><span style="font:11px Monaco; color:#7F0055;">throws</span><span style="font:11px Monaco; "> IOException {<br />  </span><span style="font:11px Monaco; color:#7F0055;">int</span><span style="font:11px Monaco; "> sample = 0;<br />		<br />  </span><span style="font:11px Monaco; color:#7F0055;">if</span><span style="font:11px Monaco; "> (</span><span style="font:11px Monaco; color:#0000C0;">tearDownRequested</span><span style="font:11px Monaco; ">) {<br />    System.</span><span style="font:11px Monaco; color:#0000C0;">out</span><span style="font:11px Monaco; ">.println(</span><span style="font:11px Monaco; color:#2A00FF;">"Returning -1 to make audio stream appear done"</span><span style="font:11px Monaco; ">);<br />    sample = -1;<br />  }<br />  </span><span style="font:11px Monaco; color:#7F0055;">else</span><span style="font:11px Monaco; "> </span><span style="font:11px Monaco; color:#7F0055;">if</span><span style="font:11px Monaco; "> (</span><span style="font:11px Monaco; color:#0000C0;">byteCount</span><span style="font:11px Monaco; "> < </span><span style="font:11px Monaco; color:#0000C0;">riffHeader</span><span style="font:11px Monaco; ">.</span><span style="font:11px Monaco; color:#0000C0;">length</span><span style="font:11px Monaco; ">) {<br />    </span><span style="font:11px Monaco; color:#3E7F5F;">// return the next byte of our canned header</span><span style="font:11px Monaco; "><br />    sample = </span><span style="font:11px Monaco; color:#0000C0;">riffHeader</span><span style="font:11px Monaco; ">[</span><span style="font:11px Monaco; color:#0000C0;">byteCount</span><span style="font:11px Monaco; ">];<br />  }<br />  </span><span style="font:11px Monaco; color:#7F0055;">else</span><span style="font:11px Monaco; "> {<br />    </span><span style="font:11px Monaco; color:#3E7F5F;">// return the most recently computed sample based on the update() data</span><span style="font:11px Monaco; "><br />    </span><span style="font:11px Monaco; color:#3E7F5F;">// pick which samples to combine to create out output sample</span><span style="font:11px Monaco; "><br />    </span><span style="font:11px Monaco; color:#3E7F5F;">// based on the accelerometer values we have been given</span><span style="font:11px Monaco; "><br />			<br />    </span><span style="font:11px Monaco; color:#7F0055;">if</span><span style="font:11px Monaco; "> ((</span><span style="font:11px Monaco; color:#0000C0;">byteCount</span><span style="font:11px Monaco; "> % 4) == 0) {<br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// we return sample data 8 bits at a time, but the samples</span><span style="font:11px Monaco; "><br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// themselves are 16 bits each, and in stereo so there are</span><span style="font:11px Monaco; "><br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// two samples that go together, so we mustn't switch streams</span><span style="font:11px Monaco; "><br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// in the middle of a sample or we'll be out of sync (returning</span><span style="font:11px Monaco; "><br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// half of one sample and half of the next). We can use the same</span><span style="font:11px Monaco; "><br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// byteCount as we used for the header because the header has an</span><span style="font:11px Monaco; "><br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// even number of bytes</span><span style="font:11px Monaco; "><br />      </span><span style="font:11px Monaco; color:#0000C0;">xIn</span><span style="font:11px Monaco; "> = chooseInput(</span><span style="font:11px Monaco; color:#0000C0;">x</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">xLowThreshold</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">xHighThreshold</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">x1</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">x2</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">x3</span><span style="font:11px Monaco; ">);<br />      </span><span style="font:11px Monaco; color:#0000C0;">yIn</span><span style="font:11px Monaco; "> = chooseInput(</span><span style="font:11px Monaco; color:#0000C0;">y</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">yLowThreshold</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">yHighThreshold</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">y1</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">y2</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">y3</span><span style="font:11px Monaco; ">);<br />      </span><span style="font:11px Monaco; color:#0000C0;">zIn</span><span style="font:11px Monaco; "> = chooseInput(</span><span style="font:11px Monaco; color:#0000C0;">z</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">zLowThreshold</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">zHighThreshold</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">z1</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">z2</span><span style="font:11px Monaco; ">, </span><span style="font:11px Monaco; color:#0000C0;">z3</span><span style="font:11px Monaco; ">);<br />    }<br />			<br />    </span><span style="font:11px Monaco; color:#7F0055;">try</span><span style="font:11px Monaco; "> {<br />      sample = </span><span style="font:11px Monaco; color:#0000C0;">xIn</span><span style="font:11px Monaco; ">.read() + </span><span style="font:11px Monaco; color:#0000C0;">yIn</span><span style="font:11px Monaco; ">.read() + </span><span style="font:11px Monaco; color:#0000C0;">zIn</span><span style="font:11px Monaco; ">.read();<br />    }<br />    </span><span style="font:11px Monaco; color:#7F0055;">catch</span><span style="font:11px Monaco; "> (IOException e) {<br />      </span><span style="font:11px Monaco; color:#3E7F5F;">// ignore it as it shouldn't happen with our InputStreams anyway</span><span style="font:11px Monaco; "><br />    }<br />  }<br />		<br />  ++</span><span style="font:11px Monaco; color:#0000C0;">byteCount</span><span style="font:11px Monaco; ">;<br />  </span><span style="font:11px Monaco; color:#7F0055;">return</span><span style="font:11px Monaco; "> sample;<br />}<br /></span><br />Because <code>IModuleAudioPlayer.play()</code> sees <code>SampleStream</code> as a simple <code>InputStream</code>, and <code>SampleStream</code> mixes together some <code>InputStream</code>s (the <code>Sample</code> instances) the code can be tweaked very easily to do different things: for example you could mix in another <code>InputStream</code> from the microphone, replace an axis with streams chosen by buttons, or any number of variations, without much of the code needing to be modified.<br /><br /><h4>Generating the Samples</h4>At first I tried using simple samples that I generated using the <code>tones</code> command-line utility, but they weren&rsquo;t all that exciting. So I played around with the excellent <a href="http://www.hydrogen-music.org/" rel="self">Hydrogen</a> drum machine application instead. I made loops from existing samples in Hygrogen (claves, cowbell, floor tom, etc.) and exported them as raw 44.1kHz 16-bit stereo, little-endian, sample files. These are a lot more fun (at least for a few minutes) and sound pretty darn good through the BUGsound.<br /><br /><h4>More Cowbell!</h4><br />Here&rsquo;s a video showing Phunky in action:<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/x9ON2kT5ct4&hl=en&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/x9ON2kT5ct4&hl=en&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br />]]></content:encoded></item><item><title>Bug Labs Community Site</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-12-09T13:44:28-05:00</dc:date><link>/weblog/files/2008-12-9-buglabs-community.html#unique-entry-id-75</link><guid isPermaLink="true">/weblog/files/2008-12-9-buglabs-community.html#unique-entry-id-75</guid><content:encoded><![CDATA[<br /><a href="http://community.buglabs.net" rel="self"><img class="imageStyle" alt="BUG Community Banner" src="/weblog/files/BUGCommunityBanner.png" width="465" height="117" /></a><br /><br />Bug Labs just made their community site <a href="http://twitter.com/buglabs/status/1045633079" rel="self">official</a>. You can find it at:<br /><br /><a href="http://community.buglabs.net/" rel="self">http://community.buglabs.net/</a><br /><br /><br />I&rsquo;ve posted <a href="http://community.buglabs.net/finsprings/posts" rel="self">a few things</a> up there so far. I think it&rsquo;s a neat idea: letting the community share what they&rsquo;re working on and what they&rsquo;ve figured out. You could sort of do that on the forums, but the new site is much more feature-rich. It isn&rsquo;t even restricted to projects directly involving the BUG; <a href="http://community.buglabs.net/kgilmer/posts/34-Cheap-Ambient-Audio-Round-1" rel="self">here&rsquo;s an example</a>.<br /><br /><br /><em>Disclaimer: I&rsquo;m doing some consultancy for Bug Labs now; but that is </em><strong><em>because</em></strong><em> I like the BUG and the folks at Bug Labs, not </em><strong><em>why</em></strong><em> I like it/them. :-)<br /></em><br /><br />]]></content:encoded></item><item><title>Drawdio</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-11-05T22:14:13-05:00</dc:date><link>/weblog/files/2008-11-5-drawdio.html#unique-entry-id-74</link><guid isPermaLink="true">/weblog/files/2008-11-5-drawdio.html#unique-entry-id-74</guid><content:encoded><![CDATA[A friend at work put me onto <a href="http://www.ladyada.net/rant/" rel="self">ladyada&rsquo;s blog</a> recently. I&rsquo;m a fan of her work: I built her <a href="/weblog/files/minipov.html" rel="self">MiniPOV</a> kit a while back and really enjoyed it, and I&rsquo;d recently picked up a couple of Arduino shield kits from her (that I haven&rsquo;t had time to build yet), so I was interested to keep up on her projects.<br /><br />On her blog I <a href="http://www.ladyada.net/rant/2008/10/new-kit-drawdio-makes-music-while-you-draw/" rel="self">came across the Drawdio</a>, a kit originally designed by J Silver (<a href="http://drawdio.com" rel="self">http://drawdio.com</a>). It uses a standard pencil and generates fun sounds using the conductivity of the carbon in the &lsquo;lead&rsquo;.<br /><br />Here&rsquo;s my one:<br /><br /><a href="http://www.flickr.com/photos/finsprings/3007234492/" rel="self"><img class="imageStyle" alt="" src="/weblog/files/img_2987.jpg" width="465" height="290" /></a><br /><br />I had been looking for a quick and cheap project to tryout my new <a href="http://www.amazon.com/gp/product/B000ARU9PO?ie=UTF8&tag=davidfindlayo-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B000ARU9PO">soldering iron</a><img src="http://www.assoc-amazon.com/e/ir?t=davidfindlayo-20&l=as2&o=1&a=B000ARU9PO" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> anyway, and this seemed to fit the bill; plus, the kids would like it, right?<br /><br />It only has a few through-hole parts so it doesn&rsquo;t take very long to assemble the kit at all, even for someone as inept at soldering as I am (loving that <a href="http://www.amazon.com/gp/product/B000ARU9PO?ie=UTF8&tag=davidfindlayo-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B000ARU9PO">Weller WESD51</a><img src="http://www.assoc-amazon.com/e/ir?t=davidfindlayo-20&l=as2&o=1&a=B000ARU9PO" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> by the way: beats the pants off my old chisel-style iron).<br /><br />The end result is pretty fun to play with, the only negative being that it could stand to be a bit louder. I&rsquo;m not sure if I&rsquo;m up to it, electronics-skillz-wise, but maybe I can hack in an amp someday?<br /><br />Here&rsquo;s a video (with apologies for the hairdryer sounds of my knoppmyth box&rsquo;s fans in the background), so you can hear what it sounds like:<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/p2gGSlJoVkw&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/p2gGSlJoVkw&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>]]></content:encoded></item><item><title>Still Here</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-09-01T22:48:16-04:00</dc:date><link>/weblog/files/2008-09-01-stillhere.html#unique-entry-id-73</link><guid isPermaLink="true">/weblog/files/2008-09-01-stillhere.html#unique-entry-id-73</guid><content:encoded><![CDATA[I&rsquo;m still here &mdash; really. Work has been mad as always, my son just started Kindergarten and my daughter just started Second Grade, and I&rsquo;ve been building a chicken coop too.<br /><br />I&rsquo;ve also been doing a fair bit of mucking around with building the upcoming R1.3 release of software for the <a href="http://buglabs.net/products" rel="self">Bug</a>. They switched their build system from <a href="http://savannah.nongnu.org/projects/ltib" rel="self">LTIB</a> to <a href="http://pokylinux.org/" rel="self">Poky Linux</a>:<br /><br /><a href="http://pokylinux.org" rel="self"><img class="imageStyle" alt="" src="/weblog/files/Picture 2.png" width="207" height="219" /></a><br /><br />That Poky Linux beaver may be the cutest darn thing I&rsquo;ve ever seen, but I digress. The Bug now sports the <a href="http://matchbox-project.org/" rel="self">Matchbox</a> window manager rather than old man <a href="http://en.wikipedia.org/wiki/Tom's_Window_Manager" rel="self">twm</a> (we&rsquo;ll miss you <a href="http://en.wikipedia.org/wiki/Xeyes" rel="self">xeyes</a>). It looks great, and the new touch screen driver is much more responsive than the old one. More on this when I&rsquo;ve had more time to play with it.<br /><br />For kicks, I just uploaded my Technical Books shelf (okay, the only one I bothered to scan books for at all) from <a href="http://delicious-monster.com/" rel="self">Delicious Library</a> to <a href="http://homepage.mac.com/finsprings/deliciouslibrary/" rel="self">MobileMe</a>. They did a pretty nice job making it look shiny:<br /><br /><a href="http://homepage.mac.com/finsprings/deliciouslibrary/" rel="self"><img class="imageStyle" alt="Delicious Library" src="/weblog/files/DeliciousLibraryHeader.png" width="473" height="245" /></a><br /><br />I feel compelled to point out that the old ActionScript books are there because of my wife&rsquo;s Chumby (stagnating plans to write a widget for it).<br /><br />Okay, back to reading some Arduino stuff&hellip;]]></content:encoded></item><item><title>Accessing the OS X Services Menu programmatically</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-07-28T00:02:56-04:00</dc:date><link>/weblog/files/2008-07-28-services-menu.html#unique-entry-id-72</link><guid isPermaLink="true">/weblog/files/2008-07-28-services-menu.html#unique-entry-id-72</guid><content:encoded><![CDATA[Work has been exceedingly busy lately, but I have found some time to get most of the way through Aaron Hillegass&rsquo;s excellent 3rd edition of <a href="http://www.amazon.com/exec/obidos/ASIN/0321503619/ref=nosim/davidfindlay-o20" rel="self">Cocoa Programming for Mac OS X</a>.<br /><br />The book is well written and well organized. I&rsquo;m an experienced non-Apple programmer, but this was my first foray into Objective C and Cocoa, and my first time using Xcode. As a C++ guy, I can&rsquo;t always bring myself to like the way Objective C goes about things, but there is a certain elegance in its simplicity. I&rsquo;m also impressed with Xcode and with Cocoa. I&rsquo;ve never done much in the way of visual programming, but I am obliged to use Visual Studio for work, and on occasion (I don&rsquo;t know MFC, really, I don&rsquo;t) I&rsquo;ve done some minor GUI stuff with it and always found it most distasteful. Cocoa and Xcode just blow it away: proper separation of model, view and controller!<br /><br />Falling back to my non-visual roots, I thought it would be interesting to see what it would take to make a command-line utility that would open up a list of files in <a href="http://aquamacs.org/" rel="self">Aquamacs Emacs</a> (like <a href="http://manual.macromates.com/en/using_textmate_from_terminal.html" rel="self">mate</a> does for TextMate). (Aquamacs Emacs will accept multiple files via <span style="font:12px Courier, mono; ">open -a Aquamacs\ Emacs</span>, and I have an alias set up to do that, so I don&rsquo;t actually need this utility, but it fit the bill for a good, small, learning task.)<br /><br />I struggled a bit with path manipulation - there has to be a better way to convert from relative to absolute than I came up with - and I only made it open one file, although it would be trivial to add a loop (multiple service calls - it won&rsquo;t take multiple files in one) to cope with that. I also had to do a bit of googling to figure out the incantantion to get my file onto the pasteboard properly.<br /><br />So, it&rsquo;s certainly sub-optimal, but it does at least work. Here&rsquo;s the <a href="http://pastie.textmate.org/private/caabbklcrd8g0wxzmj0w" rel="self">code</a>. It just takes the (first, absent the loop) file name from the command line arguments, places it on the appropriate pasteboard, then invokes <em>Services/Aquamacs Emacs/Open Selected File</em>.<br />]]></content:encoded></item><item><title>Radiohead Nude Remix</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-06-06T22:32:13-04:00</dc:date><link>/weblog/files/2008_06_06_radiohead_nude.html#unique-entry-id-71</link><guid isPermaLink="true">/weblog/files/2008_06_06_radiohead_nude.html#unique-entry-id-71</guid><content:encoded><![CDATA[This remix of Radiohead&rsquo;s Nude by James Houston is strangely wonderful. I haven&rsquo;t seen an EPSON LX-86 in ages...(hang on until at least 1:10 in before you give up)<br /><br /><object width="400" height="225">	<param name="allowfullscreen" value="true" />	<param name="allowscriptaccess" value="always" />	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1109226&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" />	<embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1109226&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><br /><a href="http://www.vimeo.com/1109226?pg=embed&sec=1109226">Big Ideas (Don't get any)</a> from <a href="http://www.vimeo.com/user354216?pg=embed&sec=1109226">1030</a> on <a href="http://vimeo.com?pg=embed&sec=1109226">Vimeo</a>.<br /><br />More details <a href="http://vimeo.com/1109226" rel="self">here</a>.]]></content:encoded></item><item><title>From iSight to Chumby with love</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-05-04T22:58:09-04:00</dc:date><link>/weblog/files/2008_05_04_isight_chumby.html#unique-entry-id-69</link><guid isPermaLink="true">/weblog/files/2008_05_04_isight_chumby.html#unique-entry-id-69</guid><content:encoded><![CDATA[Since my wife got her Chumby, I've been reading up on ActionScript. It's not been a terribly amusing process, and I haven't had much time to devote to it, so I haven't gotten any further than a prototype recipe chumbifier widget so far.<br /><br />Then the other day I was perusing the available widgets on chumby.com and came across, in the web-cams sections, a widget that will display and poll an arbitrary image given a URL. I thought it might be fun to make a self-spy cam, as it were, and have my MacBook upload the iSight camera image every few minutes while I was work. Then my ugly mug would show up on my wife's Chumby, between Chuck Norris Facts and the San Diego Zoo's panda cam.<br /><br />My first thought was to use Automator for this task. It has iSight support, and Transmit has Automator support, so it should have been pretty easy to take the picture and upload it to one of my websites. But Automator apparently insists on doing the 3-2-1-beep/flash means of taking a picture, as in Photo Booth. Putting up with that every few minutes would be irritating to say the least. So I did a quick google and came across <code><a href="http://www.intergalactic.de/pages/iSight.html" rel="self">isightcapture</a></code>. isightcapture is a command-line application that captures an image from your iSight camera and saves it to file. It was a simple matter to put together a shell script to capture the image and then use <code>scp</code> to upload it to my web host (I already had SSH public key authentication configured on the host, so I didn't need to worry about having to enter a password).<br /><br />This is pretty good; we have our image automatically taken and uploaded, ending up with something like this:<br /><br /><img class="imageStyle" alt="Raw" src="/weblog/files/grabme_raw.png" width="385" height="289" /><br /><br /><strong>Tweaking the Image</strong><br />So far, so good; but  there is room for improvement: 1) at 640x480 it's twice as big as the Chumby wants; 2) how would my wife know when the picture was taken? <code>isightcapture</code> can resize the picture, but let's pretend it can't. My wife likely doesn't care when the picture was taken, but let's pretend that she does. Humour me here, okay?<br /><br />Is there something out there that could solve both of these problems? Something free? Why yes. Enter <a href="http://www.imagemagick.org/script/index.html" rel="self">ImageMagick</a>. ImageMagick is an excellent full-featured image manipulation toolkit; indeed, you will see it prominently featured in the Acknowledgements section of Pixelmator, for example. It also is command-line driven, which is perfect for what I wanted to do here: resize the image and annotate it with a timestamp prior to uploading it. So, I built ImageMagick via via <a href="http://www.macports.org/" rel="self">MacPorts</a> and added a call to its <code><a href="http://www.imagemagick.org/script/convert.html" rel="self">convert</a></code> tool to my script with the following options:<br /><br /><code>+contrast +contrast +contrast -noise 3 -resize 320 -stroke blue -fill white -pointsize 18 -font Arial-Bold -annotate +20+20 "$(date '+%a %m/%d %H:%M')"</code><br /><br />That's a bit of a mouthful, so let's break it down:<br /><code>+contrast +contrast +contrast</code>	bumps up the contrast a little, as my iSight happens to face a window in my office;<br /><code>-noise 3</code>	denoises the image, which looks pretty pixelly in the poor light of my office;<br /><code>-resize 320</code>	resizes the image proportionally to a width of 320 pixels;<br /><code>-stroke blue -fill white</code>	sets the text to be white with a blue outline;<br /><code>-pointsize 18 -font Arial-Bold</code>	sets the text to be 18pt Arial Bold;<br /><code>+20+20</code>	sets the text origin at 20 pixels in and down (respectively) from the top left-hand corner;<br /><code>"$(date '+%a %m/%d %H:%M')"	</code>runs the command-line date program to get the timestamp in the format that I want: <code>Sun 05/04 23:28</code><br /><br />Running <code>convert</code> on our raw image with those options gives us:<br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry69_2.png" width="320" height="240" /><br /><br />Great! We now have an automatically-annotated image.<br /><h4></h4><strong>Automation<br /></strong>Now all that remains is to automate the process of running the shell script every few minutes, so that the image the Chumby will download from the website will actually change.<br /><br />You could use <code>cron</code> or <code>launchd</code> for this. Unfortunately, Apple recently changed things so that <code>isightcapture</code> wouldn't work from background daemons, likely as part of some security update. Fair enough, I suppose. To get round this we must introduce another quirk: a little AppleScript to make our script execute in the user's 'face', so that it can access the camera. To do this open up Script Editor and create a script with a line similar to the following:<br /><br /><span style="font:12px Verdana, sans-serif; color:#0000FF;">do shell script</span> <span style="font:12px Verdana, sans-serif; ">"/Users/dave/bin/grabme"</span><br /><br />Save your script out as an application. In my case I made it <code>grabme.app</code>.<br /><br />Now we can set up cron to run our AppleScript for us, by adding a line to our <code>crontab</code>:<br /><br /><code>0,15,30,45	10-17	*	*	1-5	open /Users/dave/bin/grabme.app</code><br /><br />This example will take a picture every 15 minutes between 10am and 5:45pm, Monday through Friday.<br /><br /><strong>On the Chumby<br /></strong>So now we have our image automatically captured and uploaded when we want it to. The next step is to configure the Chumby to display the image. In the widget selector on chumby.com, go to <em>Webcams</em> and then choose <em>Load Image From URL</em>. Put the widget in the channel you of your choice and then customize it with the URL your image is available at. Be sure to select the <em>prevent Caching</em> radio button.<br /><br />After all that you should be "rewarded" with:<br /><br /><img class="imageStyle" alt="iSight on Chumby" src="/weblog/files/isight_on_chumby.png" width="465" height="360" /><br />]]></content:encoded></item><item><title>ShareBuilder lets me down: Trusting Email Delivery</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-04-25T23:20:25-04:00</dc:date><link>/weblog/files/2008_04_25_email.html#unique-entry-id-68</link><guid isPermaLink="true">/weblog/files/2008_04_25_email.html#unique-entry-id-68</guid><content:encoded><![CDATA[I opened a ShareBuilder account in January so that I could buy a single share of Apple when it dropped from $200 to $130. I have an ING Direct account, and they recently acquired ShareBuilder, and with their no minimums approach it seemed to be a good fit.<br /><br />So, I bought my share for $130 plus a $10 transaction fee and didn't think much more about it. I set up the Stock widget in Dashboard to watch AAPL and was pleased to see it up to around $167 this week. Then I got an email from ShareBuilder acknowledging the transfer of funds from my account. I was very concerned, since I had made no such transfer. I immediately called them, and they told me that they had closed my account because they were unable to verify the information I had supplied when opening the account. They couldn't even tell me what part they had a problem with. Apparently they had sent me an email about it back in January; an email that I never received. One...single...email. I explained I had not received the email and they confirmed they had not bothered to make any kind of follow up whatsoever: no second email, no phone call, nothing. So they sold my share for the exact amount I originally bought it at and initiated the transfer of the money back to my checking account.<br /><br />Nice, huh? Who on earth uses a one-time email for something as critical as this? I don't expect personal service from an online provider on a daily basis, but I don't think it's too much to expect them to be a little more proactive before choosing to sell my portfolio and close my account. Now, I'm only out $30 so far on them selling my share before I wanted to, but what if I'd bought 1000 shares? Plus, how annoyed am I going to be once Apple's back to $200 and head north from there?<br /><br />As you can imagine, I declined their pathetic offer of one free trade and the 'opportunity' to go through the activation process again.]]></content:encoded></item><item><title>BUG Unboxing</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-04-17T21:26:35-04:00</dc:date><link>/weblog/files/2008_04_17_bugbundle.html#unique-entry-id-67</link><guid isPermaLink="true">/weblog/files/2008_04_17_bugbundle.html#unique-entry-id-67</guid><content:encoded><![CDATA[<img class="imageStyle" alt="BUGbase" src="/weblog/files/BUGbase.jpg" width="465" height="349" /><br />My <a href="http://store.buglabs.net/BUGbundle" rel="self">BUGbundle</a> arrived yesterday. I put a set of unboxing pictures of it on <a href="http://flickr.com/photos/finsprings/sets/72157604580497365/" rel="self">Flickr</a>. I pinged Engadget after I posted them, since they've been following the BUG for a while. I didn't really expect them to pick it up, but <a href="http://www.engadget.com/2008/04/17/bug-labs-hiro-p-edition-bugbase-kit-gets-unboxed/" rel="self">they did</a>. My Flickr stats will be forever skewed ;-)<br /><h4>UPDATE:</h4>Yup, 30000+ views of those Bug pictures in the last day and a half:<br /><br /><img class="imageStyle" alt="Flickr Stats" src="/weblog/files/FlickrStats.png" width="465" height="132" />]]></content:encoded></item><item><title>New British Coins</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-04-03T19:59:19-04:00</dc:date><link>/weblog/files/2008_04_03_british_coins.html#unique-entry-id-66</link><guid isPermaLink="true">/weblog/files/2008_04_03_british_coins.html#unique-entry-id-66</guid><content:encoded><![CDATA[Okay, so this isn't really tech-related, but the new British coin designs are seriously stylish!<br /><br /><a href="http://www.royalmint.com/newdesigns/designsRevealed.aspx" rel="self"><img class="imageStyle" alt="New British Coins" src="/weblog/files/new_british_coins.jpg" width="465" height="141" /></a><br />Thanks to <a href="http://daringfireball.net/linked/2008/april#wed-02-change" rel="self">Gruber</a> for the link.<br />]]></content:encoded></item><item><title>Come in Chumby</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-04-03T19:43:18-04:00</dc:date><link>/weblog/files/2008_04_03_chumby.html#unique-entry-id-65</link><guid isPermaLink="true">/weblog/files/2008_04_03_chumby.html#unique-entry-id-65</guid><content:encoded><![CDATA[<span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">So, my copy of </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.linuxjournal.com/" rel="self">Linux Journal</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "> arrived in the post the other day. I happened to show the front cover to my wife, and happened to point at the </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://chumby.com/" rel="self">Chumby</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "> that was featured there. She saw what it could do and asked for one for her birthday, which happens to be just around the corner. So now </span><s>I'm</s><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">she's getting a Chumby! I know </span><s>I'll</s><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">she'll like it a lot.<br /><br />I've been looking at the Chumby for quite a while, but the flash-only GUI put me off. However, the LJ article points out that you can save OpenOffice presenations to flash, and of course Keynote can do that as well. In the article, the author used that to create recipe cards that you could view on the Chumby, which I thought was a great idea. The Chumby folks are keeping the device as open as they can, so there should be opportunity to do some good ol' hackery on it too.<br /><br />For example, if you </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://wiki.chumby.com/mediawiki/index.html/Chumby_tricks#Hidden_screen_in_Control_Panel" rel="self">turn on a slightly hidden setting</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">, you can enable SSH, and you get this neat welcome message when you sign in:<br /><br /></span><a href="http://www.flickr.com/photos/ericrice/2284933079/sizes/m/" rel="self"><img class="imageStyle" alt="Chumby SSH Welcome Screen" src="/weblog/files/chumb_ssh.jpg" width="464" height="508" /></a><br /><br />It runs the Freescale iMX21 processor, which is a little old in the tooth - stuck on a 2.4 kernel for example - but still, it should be fun. By comparison, the <a href="http://buglabs.net/" rel="self">Bug</a> runs an iMX31 on a 2.6 kernel, but then it goes for $549 and the Chumby is only $179. My only real concern with the Chumby is the feeds concept, where it seems possible that they might push stuff to your Chumby that you didn't necessarily ask for, like adverts for example. But even then, since it's open you could just stop pointing it at their site and do your own thing.<br /><br />I'll post back once I've had a chance to <s>play with it</s>set it up.]]></content:encoded></item><item><title>Larry Lessig using Keynote</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-04-03T19:36:49-04:00</dc:date><link>/weblog/files/2008_04_03_lessig.html#unique-entry-id-64</link><guid isPermaLink="true">/weblog/files/2008_04_03_lessig.html#unique-entry-id-64</guid><content:encoded><![CDATA[<span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">Video of Larry Lessig's </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.apple.com/iwork/keynote/" rel="self">Keynote</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "> slides while talking at Penn. Very interesting, and effective style. I wonder what sort of clicker he's using: the standard Apple Remote maybe?<br /><br /><object type="application/x-shockwave-flash" data="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&feedurl=http%3A%2F%2Flessig%2Eblip%2Etv%2Frss%2Fflash&file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F790557&brandlink=http%3A%2F%2Flessig%2Eblip%2Etv&brandname=lessig%2Eblip%2Etv&showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" width="400" height="255" allowfullscreen="true" id="showplayer"><param name="movie" value="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&feedurl=http%3A%2F%2Flessig%2Eblip%2Etv%2Frss%2Fflash&file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F790557&brandlink=http%3A%2F%2Flessig%2Eblip%2Etv&brandname=lessig%2Eblip%2Etv&showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" /><param name="quality" value="best" /><embed src="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&feedurl=http%3A%2F%2Flessig%2Eblip%2Etv%2Frss%2Fflash&file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F790557&brandlink=http%3A%2F%2Flessig%2Eblip%2Etv&brandname=lessig%2Eblip%2Etv&showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" quality="best" width="400" height="255" name="showplayer" type="application/x-shockwave-flash"></embed></object></span>]]></content:encoded></item><item><title>Cabel Sasser&#x27;s talk at C4</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-30T22:17:47-04:00</dc:date><link>/weblog/files/2008_03_30_cabel_sasser_c4.html#unique-entry-id-63</link><guid isPermaLink="true">/weblog/files/2008_03_30_cabel_sasser_c4.html#unique-entry-id-63</guid><content:encoded><![CDATA[<span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">I just finished watching </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.cabel.name/" rel="self">Cabel Sasser</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">, from </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.panic.com/" rel="self">Panic Software</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">, talking about the design and development of </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.panic.com/coda/" rel="self">Coda</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">, their website development application, at the </span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://en.wikipedia.org/wiki/C4_(conference)" rel="self">C4</a></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "> Macintosh Developers' Conference. He's a great speaker: very dynamic, and funny, and his mannerisms bear an eerie resemblance to those of someone who used to work with me. His Keynote slides were good too; I must remember to include a vomiting kid in my next presentation!<br /><br />Here's the video from the talk; highly recommended.<br /><br /><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler_rentzsch_14"><param name="movie" value="http://www.viddler.com/player/66539611/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/66539611/" width="437" height="370" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_rentzsch_14" ></embed></object></span>]]></content:encoded></item><item><title>Lambda Functions and Closures officially in C++0x</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-29T23:53:09-04:00</dc:date><link>/weblog/files/2008_03_29_closures_in_cplusplus.html#unique-entry-id-62</link><guid isPermaLink="true">/weblog/files/2008_03_29_closures_in_cplusplus.html#unique-entry-id-62</guid><content:encoded><![CDATA[Herb Sutter just <a href="http://herbsutter.spaces.live.com/Blog/cns!2D4327CC297151BB!785.entry" rel="self">posted</a> about the most recent ISO C++ Standards Meeting. The most exciting news is that <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2550.pdf" rel="self">lambda functions and closures</a> have been officially voted into C++0x! This is really going to make taking advantage of the Standard Algorithms much more straightforward.<br />Here's a little taste from Herb's post:<br /><pre><br /><span style="font:11px Verdana, sans-serif; color:#444444;">In C++0x, you can just write:<br />// Calling find_if using a lambda, in C++0x:<br />find_if( w.begin(), w.end(),<br />    </span><span style="font:11px Verdana, sans-serif; color:#00107C;">[]( const Widget& w ) -> bool { w.Weight() > 100; }</span><span style="font:11px Verdana, sans-serif; color:#444444;"> );<br /></span></pre><br />Yes, you can already achieve the same thing today, with a standard binary predicate and a helper, thusly:<br /><br /><span style="font:12px Courier, mono; ">find_if(w.begin(), w.end(), bind2nd(greater&lt;int&gt;(), 100));</span><br /><br />but it isn't nearly as easy on the eye, is it?<br /><br />Lambda functions will also make it a lot easier in situations where now you'd be forced to use a custom predicate; previously you'd have to: create a functor; remember to make it inherit from <span style="font:12px Courier, mono; ">std::unary_function</span> or <span style="font:12px Courier, mono; ">std::binary_function</span> for completeness; stick it in an anonymous namespace (optional but recommended; and finally, use it in your invocation of one of the standard algorithms. That works, but if you're coding a <span style="font:12px Courier, mono; ">for_each</span>, because you're trying to be good and not write a loop on an STL container by hand, then having the interesting part of the loop in a functor makes the code much harder to follow: instead of it being right there in the loop, it has to be somewhere else, breaking up the flow of the logic in the poor reviewer's head.]]></content:encoded></item><item><title>New Look</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-29T21:49:38-04:00</dc:date><link>/weblog/files/2008_03_29_new_look.html#unique-entry-id-61</link><guid isPermaLink="true">/weblog/files/2008_03_29_new_look.html#unique-entry-id-61</guid><content:encoded><![CDATA[As you may have noticed - in the unlikely event that: a) you're reading this at all; and b) you're not reading it in a news reader - that I switched the site from RapidWeaver's built-in iPhone theme to <a href="http://www.seydesign.com/themes/dogpress/index.html" rel="self">seyDesign's dogPress theme</a>.<br /><br />I am still not happy with it, but then <a href="/weblog/files/2008_03_18_webdesigntoffee.html" rel="self">I can't do web design for toffee</a>, so I'll just have to be okay with the fact that it at least looks a tad better. It's still too narrow, and I had to pants around making the images smaller as the hard edge now makes them look awful when they stick out. RapidWeaver makes this inconceivably (I'll wait for you to reminisce about the Princess Bride here...okay, let's continue) painful. It lulls you into a false sense of security, because it does have a built-in feature to let you scale images, right in its Media Inspector:<br /><br /><img class="imageStyle" alt="RapidWeaver&#39;s Media Inspector" src="/weblog/files/rw_media_inspector.png" width="352" height="518" /><br /><br />Handy, right? Well, the problem is it that if you check "Scale Image" and start modifying the percentage, it does <strong>not</strong> update the height and width values shown below, or show the new values anywhere else that I could see. My theme has a constrained width for images of about 465 pixels, which I determined from experimentation. If scaling would update the size fields, I could just reduce the percentage until the height showed 465. But, because it doesn't, I have no choice but to disable it and scale the image by hand. So I enter the height of 465 and then determine the new height with <em>465/original-width*original-height</em>. The only saving grace here is that Spotlight will do basic calculations right in its search window:<br /><br /><img class="imageStyle" alt="Spotlight Calculator" src="/weblog/files/spotlight_calculator.png" width="363" height="158" /><br /><br />Very handy, but RapidWeaver should not have made me use it in the first place.<br /><br />RapidWeaver also won't let you preview old blog posts; normally that wouldn't be an issue, but it was for me when trying to find all the images that were too wide for the new theme. I ended up publishing the site as-is then using Safari to walk though it all and find the problem articles.<br /><br />I picked the blue variant of the dogPress theme and tuned the title and sub-title colours a little. I then used a photograph of The Gateway Arch in Saint Louis to make the header my own. Here's the original shot:<br /><br /><a href="http://flickr.com/photos/finsprings/76480274/" rel="self"><img class="imageStyle" alt="Gateway Arch" src="/weblog/files/gateway_arch.jpg" width="465" height="321" /></a><br /><br />I took this in 1992 with my Olympus &mu;1, a very compact and cool-looking (IMHO) film camera. I held it against the side of the arch pointing up; if you look closely, you'll see the observation windows at the top of the arch in the center of the image.<br /><br />So whaddya reckon? Less or more ugly than before?]]></content:encoded></item><item><title>SQLite</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-23T00:20:13-04:00</dc:date><link>/weblog/files/2008_03_23_sqlite.html#unique-entry-id-60</link><guid isPermaLink="true">/weblog/files/2008_03_23_sqlite.html#unique-entry-id-60</guid><content:encoded><![CDATA[We've incorporated <a href="http://sqlite.org/" rel="self">SQLite</a>* into a project at work recently. If you haven't come across it before, SQLite is "a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine". Pretty good for a library that weighs in at less than 250KB, huh? It's also trivial to embed, with its amalgamated version (where much of the precompilation is done already) consisting of just one C source file and one header file. There are also wrappers for SQLite's C API available for lots of languages, from .html to Tcl/Tk; there's even an ODBC driver for it if you're into that sort of thing.<br /><br />You can use a command line tool to interact with the database, or more commonly, you can integrate the library into your application directly. It's very full featured, with only a few SQL features missing (right outer joins, updatable views, foreign key enforcement, and a couple of other things), so you can perform some pretty powerful operations on your data right out of the box.<br /><br />Transactions use a journal file, so if power is lost during an update, SQLite will automatically rollback the incomplete transaction when power is resumed. This robustness, couple with its size, makes SQLite very popular with embedded device and cell phone manufacturers. It's used in many cell phones, and it is embedded into Apple Mail and many other common applications, including Firefox.<br /><br />The implementation of SQLite is pretty interesting, in that it compiles statements to byte code for its own virtual machine when you prepare them. The command line tool even has an <span style="font:12px Courier, mono; ">EXPLAIN</span> command that lets you see the byte code that a statement will generate, so you can see how it will run and potentially do some optimization. The code is well written and well documented. The code base has a 60/40 split between test code and source code and its regression tests have 98% code coverage. I wish I could say that about all of the projects that I've worked on over the years.<br /><br />Here's some resources if you would like to find out more about SQLite:<br /><br />- Leo Laporte and Randal Schwartz talked to SQLite's author D. Richard Hipp recently on <a href="http://twit.tv/floss26" rel="self">episode 26</a> of the FLOSS podcast.<br /><br />- There is an <span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.amazon.com/gp/product/1590596730?ie=UTF8&tag=davidfindlayo-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1590596730">excellent book</a><img src="http://www.assoc-amazon.com/e/ir?t=davidfindlayo-20&l=as2&o=1&a=1590596730" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></span> on SQLite by Mike Owens. It covers all aspects of SQLite, from its inception to writing extensions for it. There's also a couple of chapters that provide a nice introduction to relational database theory, and SQL. The only bad thing I can say about this book is that its index is next to useless.<br /><br />- There's also a nice video of D. Richard Hipp presenting <em>"An Introduction to SQLite"</em> at Google in May of 2006:<br /><br /><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-5160435487953918649&hl=en" flashvars="&subtitle=off"> </embed><br /></span><br /><br /> <em>*Pronounced ess-que-ell-lite according to its author (and he should know).</em><br />]]></content:encoded></item><item><title>Firefox 1.0: the NY Times ad</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-22T23:29:05-04:00</dc:date><link>/weblog/files/2008_03_22_firefox_1.html#unique-entry-id-59</link><guid isPermaLink="true">/weblog/files/2008_03_22_firefox_1.html#unique-entry-id-59</guid><content:encoded><![CDATA[As the release of Firefox 3 draws nearer, I thought it might be fun to look back at the NY Times 2-page advertisement from December 15th, 2004. You can <a href="/nytimes-firefox-final.pdf" rel="self">get the full PDF</a> from my site, but here's a couple of smaller shots of it:<br /><br /><p style="text-align:center;"><img class="imageStyle" alt="Firefox Ad: Page 1" src="/weblog/files/firefox_ad_page1.png" width="308" height="494" /><br /><br /><img class="imageStyle" alt="Firefox Ad: Page 2" src="/weblog/files/firefox_ad_page2.png" width="307" height="494" /><br /><br /><br /></p><p style="text-align:left;">And, hidden in the piece of land eminating from the fox's nether regions, is my name. Can you spot it?<br /><br /></p><p style="text-align:center;"><img class="imageStyle" alt="Firefox Ad: Closeup" src="/weblog/files/firefox_ad_closeup.png" width="399" height="313" /><br /><br /></p><p style="text-align:left;">In the 3+ years since it was released, Firefox has done amazingly well, sitting at around a 17% market-share right now according to <a href="http://marketshare.hitslink.com/report.aspx?qprid=0" rel="self">netapplications</a>. It pleases me to see an open source project scale to the level that Firefox has, take on the status quo and do so well. Version 3 Beta 4 looks pretty nice on the Mac too.</p>]]></content:encoded></item><item><title>MythTV on mac</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-22T23:06:01-04:00</dc:date><link>/weblog/files/2008_03_22_mythtv.html#unique-entry-id-58</link><guid isPermaLink="true">/weblog/files/2008_03_22_mythtv.html#unique-entry-id-58</guid><content:encoded><![CDATA[I repurposed my Pentium 4 HT tower a while back (no more Windows!) to run <a href="http://mysettopbox.tv/knoppmyth.html" rel="self">knoppmyth</a>, a custom Linux distribution for <a href="http://www.mythtv.org/" rel="self">MythTV</a> that makes it as easy as possible to set up a beige box as a PVR. In our house, this box's primary purpose is to record <em>Spongebob Squarepants</em> ad infinitum, with the occasional <em>Daily Show with John Stewart</em> thrown in for the adults. It works great; I don't even have a monitor hooked up to it anymore, just the TV with the <a href="http://www.hauppauge.com/site/products/data_pvr350.html" rel="self">Hauppauge 350</a>'s IR sensor hot-glued to the front.<br /><br />MythTV is often used just like this, with a single machine hooked up to a single television or monitor. However, it can also act as a media server for your network, making all the recorded shows, your music files and pictures available to any other machine on your network running the MythTV frontend. So, I was pleased to fine pre-built binaries of the MythTV frontend for OS X over on <a href="http://www.mythtv.org/wiki/index.html/Myth_on_Mac_OS_X" rel="self">their wiki</a>. I downloaded one from <a href="http://www.thesniderpad.com//component/option,com_remository/Itemid,36/func,select/id,2/" rel="self">The Snider Pad</a> and didn't have too much trouble getting it up and running. All I had to do was change the permissions in the MySQL configuration file on the MythTV box to allow non-localhost connections (set <span style="font:12px Courier, mono; ">bind-address</span> to <span style="font:12px Courier, mono; ">0.0.0.0</span> in <span style="font:12px Courier, mono; ">/etc/mysql/my.cnf</span>). After that, I could sit on my bed with the MacBook on its 802.11b connection and watch any of the recorded shows, or live TV even, remotely from my MythTV box.<br /><br />Here's the main menu:<br /><br /><img class="imageStyle" alt="MythTV menu on the MacBook" src="/weblog/files/mythtvmenu.png" width="449" height="291" /><br /><br />From there I'm only a couple of clicks from:<br /><br /><img class="imageStyle" alt="A yellow sponge character on MythTV" src="/weblog/files/mtythv_spongebob.png" width="449" height="291" /><br /><br />...wait, that's not the Daily Show...but I haven't seen this episode before...]]></content:encoded></item><item><title>The Way of the Brew Peg</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-19T21:30:54-04:00</dc:date><link>/weblog/files/2008_03_19_brewpeg.html#unique-entry-id-57</link><guid isPermaLink="true">/weblog/files/2008_03_19_brewpeg.html#unique-entry-id-57</guid><content:encoded><![CDATA[I've been a software engineer for quite a while now. How long, you ask? Let's just say that the <a href="http://en.wikipedia.org/wiki/Waterfall_model" rel="self">waterfall model</a> was state of the art when I was studying* for my CS degree. Actually, despite it being the title on my business card, I've always been reluctant to refer to myself as an engineer; writing code has always seemed to me more of a creative process, than one of precision as would befit the title "engineer". Code is constrained more by the experience and imagination of its creator, than by such practical considerations as capacitance and resistance that are the realm of an electrical engineer, to whom the title of engineer seems far more apropos.<br /><br />But that isn't to say that the work days of we <a href="http://en.wikipedia.org/wiki/Code_monkey" rel="self">code monkeys</a> are entirely devoid of process. I think it is terribly important to learn from the mistakes we've made in the past. We've learned that customers could not reasonably be expected to completely understand up front what it is they wanted a computer program to do; and so, the rather rigid waterfall model fell by the way side. In its stead we now see predominately <a href="http://en.wikipedia.org/wiki/Iterative_development" rel="self">iterative</a> models, with <a href="http://en.wikipedia.org/wiki/Agile_software_development" rel="self">Agile</a> seemingly leading the charge these days. This is all good progress, barring the odd self-indulgent wallowing in buzzwords that we've seen along the way. Still, I'm not much of one for blind faith when it comes to software development models or design practices; I don't particularly try and follow any given formal method of decomposition during design, or care whether a particular refactoring I just did has a cool name. So what do I do?<br /><br />I follow The Way of The Brew Peg:<br /><br /><img class="imageStyle" alt="Brew Peg" src="/weblog/files/brewpeg.jpg" width="262" height="346" /><br /><br />So what the heck is The Way of the Brew Peg? Well, at work we have a large coffee pot. It is filled often, as you might imagine, but there's a problem: it's very hard to tell, without stooping down and peering between the filter cup and the pot, whether the coffee is still brewing. Hence, there have been many cases of still-pouring coffee making its way onto the counter and floor as one poor caffeine-seeking soul pulls the pot out prematurely. Sure, an upgrade to a fancier coffee pot might have done the trick: had a glaring brew-indicator lamp, or a locking mechanism of some form. And we even have one of the most imposing looking coffee-in-a-teabag-thingies too.<br /><br />But you know what works great? A plain wooden clothes peg clipped to the handle of the pot. When your sleep-addled brain tells your hand to pick up the pot, your hand spots the impediment in its path and quickly relays caution back to the brain. Those two small pieces of wood held together with a spring have saved you from embarrassment, a potential scalding and some floor cleaning.<br /><br />The brew peg keeps me grounded. So while I consider the possibility of reuse when defining objects and interfaces, the brew peg stops me from taking that consideration too far, so that the intended purpose - right here, right now - of that object or interface is not compromised by some potentially nonexistent future need. The brew peg is the physical embodiment of practical simplicity; and, it's comforting to have an actual physical mnemonic in my design process to balance the otherwise overwhelming abstractness of it all.**<br /><br />So when you're writing that next design document, or defining that API, remember the brew peg. It may not have the pizzazz of a <a href="http://en.wikipedia.org/wiki/YAGNI" rel="self">YAGNI</a> or a <a href="http://en.wikipedia.org/wiki/Keep_it_simple_stupid" rel="self">KISS</a>, but will they keep you from burning your hand?<br /><br /><br /><em>* where by studying, I mean: playing Super Nintendo while watching </em><em><a href="http://en.wikipedia.org/wiki/Neighbours" rel="self">Neighbours</a></em><em> and listening to "Fools Gold 9:53" by The Stone Roses (played at 33</em><span style="font:12px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; ">⅓</span><em> RPM even though it was recorded at 45 RPM)<br /><br />** which is also why I like woodworking, as awful as I am at it</em>]]></content:encoded></item><item><title>Can&#x27;t do web design for toffee</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-03-18T22:07:04-04:00</dc:date><link>/weblog/files/2008_03_18_webdesigntoffee.html#unique-entry-id-56</link><guid isPermaLink="true">/weblog/files/2008_03_18_webdesigntoffee.html#unique-entry-id-56</guid><content:encoded><![CDATA[<a href="http://flickr.com/photos/ruthieki/104414661/" rel="self"><img class="imageStyle" alt="mmm, toffee" src="/weblog/files/toffee.jpg" width="248" height="187" /></a><br /><br />I haven't posted in a while because I have been playing with blogging tools. I currently use <a href="http://www.realmacsoftware.com/rapidweaver/" rel="self">RapidWeaver</a>, but it bugs me in a Microsoft Word sort of way; well okay, it's nowhere near <strong>that</strong> annoying, but still an annoyance nonetheless. It just does things the way it wants to, rather than the way I want it to. It's a bit for flexible than iWeb, granted, but its themes are not nearly as pretty, either.<br /><br />To satisfy my curiosity about what else might work, I set up a couple of Wordpress blogs (one canned, one not), and a Movable Type blog (way not canned) on my webserver. I then downloaded the much-acclaimed <a href="http://www.red-sweater.com/marsedit/" rel="self">MarsEdit 2</a>, a blog publishing application for the Mac. At first it seemed surprisingly bare-bones (although it's not <em>from</em> <a href="http://barebones.com/" rel="self">barebones</a>), but that actually isn't a bad thing; I suppose I just expected it to be flashier based on what I had heard about it. It has an intentionally non-WYSIWG editor, and the developer in me likes that; needs that even. Besides, <a href="http://daringfireball.net/" rel="self">Gruber</a> uses it, so it has to be good, right? So, I played around with it some more, and I started to really appreciate being able to set up a post the way I wanted it set up.<br /><br />But part of me still wanted more control. The little developer in my head, who forgets that I can't do web design for toffee, was saying <em>"let's do this using hand-crafted-with-love XHTML and CSS"</em>. I got as far as purchasing <a href="http://macrabbit.com/cssedit/" rel="self">cssedit</a>, a really great CSS utility from macrabbit software. I love how you can use it to override the style sheets on a site and tweak them live: really neat stuff. But as I said, I can't do web design for toffee, or any other highly-sugared sweet for that matter (and if you know me, you know how much I like highly-sugared sweets, and hence you know how bad I must be at web design). So, while I have used it to tweak RapidWeaver's themes a little, I haven't really gotten a lot of use from it.<br /><br />I considered looking at Panic's <a href="http://www.panic.com/coda/" rel="self">Coda</a> again. Coda is billed on Panic's site as "one window web development"; it includes a text editor, CSS editor and a cut-down version of <a href="http://www.panic.com/transmit/" rel="self">Transmit</a> - Panic's excellent FTP/SFTP/etc tool (which I use often). I played with Coda back when it came out, but I didn't care to learn another text editor (it uses <a href="http://www.codingmonkeys.de/subethaedit/" rel="self">SubEthaEdit</a>); and, as I mentioned before, I can't do web design for toffee, so creating the CSS from scratch likely wasn't going to work out well for any passing viewers' eye balls or sensibilities.<br /><br />So what to do? I think I could get either Wordpress or Movable Type to look the way I want, or as close to it as my can't-do-web-design-for-toffee skillz will allow (thank you, cssedit). I would then have to figure out how to get all the old posts out of Rapid Weaver. It stores your site's data in a single binary project file, so there doesn't appear to be an easy way to extract the individual posts. I could try and scrape the appropriate tags out of the rendered HTML but that seems kludgy at best. Maybe if I create a RapidWeaver them that has next to no formatting and publish that, the scraping might be easier?<br /><br />As I continue to ponder, I will stick with RapidWeaver. Maybe <a href="http://www.realmacsoftware.com/blog/files/news_from_hq.html" rel="self">version 4</a> will make me okay with staying the course?]]></content:encoded></item><item><title>New Hitachi Drive</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-02-28T22:42:21-05:00</dc:date><link>/weblog/files/2008_02_28_hitachi.html#unique-entry-id-55</link><guid isPermaLink="true">/weblog/files/2008_02_28_hitachi.html#unique-entry-id-55</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">So, within 10 days of me buying Hitachi's Travelstar 7K200, they have come out with a </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://www.engadget.com/2008/02/26/hitachi-pushes-out-2-5-inch-320gb-travelstar-5k320/" rel="self">Travelstar 5K320</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">. Luckily for me, that 5K prefix means that it's only 5400RPM though.<br /><br /></span><a href="http://www.hitachigst.com/portal/site/en/menuitem.e72a42d840269d155ad8f307eac4f0a0/" rel="self"><img class="imageStyle" alt="Travelstar 5K320" src="/weblog/files/travelstar320.png" width="399" height="169" /></a>]]></content:encoded></item><item><title>If Apple gives you lemons&#x2c; make lemonade</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-02-28T22:10:59-05:00</dc:date><link>/weblog/files/2008_02_25_apples_lemonade.html#unique-entry-id-54</link><guid isPermaLink="true">/weblog/files/2008_02_25_apples_lemonade.html#unique-entry-id-54</guid><content:encoded><![CDATA[When OS X 10.5.2 came out, with its associated graphics update, it broke the ability for my PowerMac FW800 to resume properly from sleep. It would go to sleep just fine, and it would seemingly wake up from sleep just fine too. However, it would not enable power to my monitors. I found that other users <a href="http://discussions.apple.com/message.jspa?messageID=6576043#6576043" rel="self">reported the same problem</a> on Apple's forums. I even connected via Screen Sharing and could see that the PowerMac was functioning fine; it just wouldn't turn on its monitors.<br /><br />So, Apple gave me a lemon upgrade; could I make some lemonade here?<br /><br />I have a USB 2.0 PCI card in the PowerMac, but even back on Tiger, if I put it to sleep with a power-drawing device attached to that card, it wouldn't sleep properly and I'd have to power cycle it to get it back. So, I had gotten into the habit of keeping the USB cable for my SD card reader unplugged from the reader, but plugged into the PCI card: a pain, but better than trying to copy 7MP images over USB 1.1.<br /><br />For backups, I used to have the computer wake itself up at 3am. I had SuperDuper scheduled to run at 3:05 and then put the computer back to sleep.<br /><br />Since sleep wasn't going to work any more, I changed my backup schedule so that SuperDuper would run at 12:30am and then power the computer off. I then changed the scheduled wake up to be at 7am, a few minutes before my wife would get up and check to see whether or not our daughter's school was on a 2-hour delay.<br /><br />The wakeup feature is accessible via the <em>Schedule...</em> button on the Energy Saver panel in System Preferences:<br /><p style="text-align:center;"><br /> <img class="imageStyle" alt="Energy Saver Schedule" src="/weblog/files/scheduled_wakeup.png" width="473" height="164" /><br /></p><p style="text-align:left;"><br />This did the trick nicely, because the scheduled wake up works even if the computer is off. So now, while I can't enjoy the power-saving benefits of sleep, I can at least keep my backup running out-of-hours and still avoid having to leave the PowerMac running 24x7.<br /><br />I think that qualifies as lemonade, even if it's only Country Time and not the real stuff.<br /><br /><strong>Update:<br /></strong>There is <a href="http://discussions.apple.com/message.jspa?messageID=6662601#6662601" rel="self">another discussion</a> going on on Apple's forums about a possible fix for this sleep issue. Basically, it involves rolling back the drivers in the graphics update in a somewhat kludgy fashion. I think I will just wait until Apple releases a real fix though.</p>]]></content:encoded></item><item><title>New Drive: Update</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-02-25T18:00:46-05:00</dc:date><link>/weblog/files/2008_02_25_newdriveupdate.html#unique-entry-id-53</link><guid isPermaLink="true">/weblog/files/2008_02_25_newdriveupdate.html#unique-entry-id-53</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">So I've had the 200GB, 7200RPM, </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://eshop.macsales.com/item/Hitachi/0A50940/" rel="self">Hitachi Travelstar&trade; 7K200</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">, in the MacBook for almost a week now. The first night I had it, I had it copy our entire iPhoto and iTunes libraries from the PowerMac. I"ve also added a Fedora Core 8 VM to go with my Windows XP VM, and I've turned on iDisk syncing.<br /><br />So what's left now:<br /><br /></span><img class="imageStyle" alt="Hitachi drive, after one week" src="/weblog/files/hitachi_after_a_week.png" width="468" height="383" /><br /><br />- 56GB, which means I've gobbled up 80GB with the aforementioned stuffed, but still a goodly amount left for more cruft - huzzah.<br /><br />On the speed front, it seems to be peppier, but I could be imagining that since it never felt all that slow anyway, even with the 5400RPM Toshiba in it. I also don't notice any more noise or heat. I haven't yet run off-grid long enough to see if battery life has been reduced.<br /><br />So far though, I couldn't be happier with the upgrade. I now have all of the movie files from our digital camera on the MacBook, so I can put them together in the new iMovie; I couldn't do that on the PowerMac as it's too old for the new iMovie to install on. It's also nice to have all of our music with me, since I sync my Nano to the MacBook (mostly just for podcasts for my commute, but occasionally I'll listen to some tunes).]]></content:encoded></item><item><title>You don&#x27;t know the power of the &#x3c;s&#x3e;darkside&#x3c;/s&#x3e; MacBook</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-02-24T01:20:48-05:00</dc:date><link>/weblog/files/2008_02_24_power.html#unique-entry-id-52</link><guid isPermaLink="true">/weblog/files/2008_02_24_power.html#unique-entry-id-52</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">I was catching up on some work tonight. I had a Visual Studio 2005 application running on an XP machine, connected via TCP/IP to a Java server application running on a Fedora Core 8 machine. During compilation, and commits to source control, I was going through my news feeds in NetNewsWire on my MacBook.<br /><br />No big deal, right? Well, the interesting thing is that only the MacBook was a real machine: the XP and Fedora machines were actually virtual, and running on the MacBook courtesy of VMWare Fusion. It hit me just how much computing power we have at our disposal these days: a 15-month old consumer-grade laptop running 2 virtual machines plus its own applications, all simultaneously and without any perceptible slowdown: this is not even a MacBook Pro!<br /><br />Here's what my Spaces-plus-Expose view shows me (Spaces is Leopard's multiple-desktop implementation, and Expose is OS X's way of showing you all the active windows on your desktop, so you can pick one to switch to; in true Apple-cool fashion, if you bring up the Spaces view and then ask for the Expose view it shows you the Expose view for each one of your desktops simultaneously):<br /><br /></span><img class="imageStyle" alt="Spaces plus Expose view of my MacBook" src="/weblog/files/spaces_expose.png" width="470" height="306" /><br /><br />In the top-left we have space number 1, where: I have started to write this post in RapidWeaver; iTunes is running (that's Californication from Red Hot Chili Peppers at the front, if you were wondering); Transmission is seeding the Fedora Core 8 DVD ISO; OmniFocus, iChat, Terminal, Mail and Safari are all doing their thing; and Activity Monitor is letting me know how this is all going. It's not shown, (eggs, chickens and what not) but I had Pixelmator going as well, long enough to blur a couple parts of the screenshot to protect the innocent.<br /><br />In the top-right, the Fedora 8 VMWare Fusion virtual machine is running a Java server application and its database backend.<br /><br />In the bottom-left, NetNewsWire is keeping me up-to-date.<br /><br />Finally, in the bottom-right, the XP VMWare Fusion virtual machine is running Visual Studio 2005 debugging an MFC application; by the way, I don't know MFC.<br /><br />Here's a close up of Activity Monitor, with the memory tab active, sorted by descending order of use of real memory:<br /><img class="imageStyle" alt="Activity Monitor" src="/weblog/files/activity_monitor.png" width="470" height="337" /><br /><br />The big hitters, unsurprisingly, are the two virtual machines, weighing in at around 500MB each. They were both configured with 512MB of RAM, so that makes sense. Next we have the kernel, close followed by RapidWeaver (the application that I use to write this). From there you're down in the weeds of measly 60MB chunks of RAM here and 40MB chunks of RAM there. From the stats at the bottom, you can see that there's 369MB (sum of free and inactive) of RAM free (see <a href="http://docs.info.apple.com/article.html?artnum=107918" rel="self">this Apple article</a> for an explanation of the different categories of memory).<br /><br />And just think, if you buy a MacBook now you can fit 4GB in it and the integrated graphics are faster than mine. How many VMs can you run?]]></content:encoded></item><item><title>New Hard Drive</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-02-19T17:01:24-05:00</dc:date><link>/weblog/files/2008_02_19_newdrive.html#unique-entry-id-51</link><guid isPermaLink="true">/weblog/files/2008_02_19_newdrive.html#unique-entry-id-51</guid><content:encoded><![CDATA[<img class="imageStyle" alt="lots of free space!" src="/weblog/files/hitachi_free_space.png" width="468" height="288" /><br /><br /><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">I replaced the hard drive in my MacBook today with a new 200GB, 7200RPM, </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://eshop.macsales.com/item/Hitachi/0A50940/" rel="self">Hitachi Travelstar&trade; 7K200</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">. I had read several reviews, all favourable, and supposedly it doesn't use much more power, or get much warmer, than the stock Toshiba 80GB. I use VMWare Fusion to run an XP VM and an OpenSolaris VM, so the 74GB on the stock drive wasn't cutting it. I ordered the new one from MacSales and picked up a </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://eshop.macsales.com/item/Newer%20Technology/U2NV2SPATA/" rel="self">Newer Technology USB 2.0 Universal Drive Adapter</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> at the same time; it lets you hook up just about any bare drive to a PC or Mac via USB 2.0.<br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><br />I hooked up the new Hitachi via the adapter and used Disk Utility to create a single 185.99GB partition. I set it up with 'GUID Partition Table' as the Partition Map Scheme, since that's required on Intel Macs for boot volumes. I then had SuperDuper make a bootable image of my existing hard drive, which took a couple of hours.<br /><br />Once I had that, I rebooted while holding down Option so that it would let me choose a boot volume on boot. The Hitachi showed up - a good sign - and I selected it. It came up, I logged in, and everything looked good, so I shut it back down and proceeded to swap the drive out. Fortunately Apple makes this about as painless as it could possibly be; providing you follow common-sense precautions for ESD you shouldn't have any trouble. I printed out the instructions at </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://www.macinstruct.com/node/130" rel="self">MacInstruct</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> and headed over to our hardware lab at work, since it has copious amounts of static-mat-covered workbenches and the Torx T8 you need to get the shield off the old drive. 10 minutes later I was up and running on the new drive.<br /><br />I should have named the new drive 'Macintosh HD' to match the old one, but I didn't and both Time Machine and Spotlight got a bit excited when I booted up. But my old Time Machine drive isn't going to be big enough for long, and I don't need any of the history that's on it anyway, so this wasn't a big deal for me.<br /><br />I'll report back on whether the RPM bump affects battery life and performance.</span>]]></content:encoded></item><item><title>SuperDuper&#x21; for Leopard is here</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-02-05T11:10:47-05:00</dc:date><link>/weblog/files/2008_02_05_superduper.html#unique-entry-id-50</link><guid isPermaLink="true">/weblog/files/2008_02_05_superduper.html#unique-entry-id-50</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">Today is a great day. Shirt Pocket have finally </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://www.shirt-pocket.com/blog/index.html/shadedgrey/superduper_25_released/" rel="self">released their Leopard-compatible version of SuperDuper</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">. As we speak I'm ditching my last Tiger SuperDuper backup and replacing it with a Leopard one. I've had Time Machine running since November but I'll breath easier with a bootable SuperDuper clone to go with it.</span>]]></content:encoded></item><item><title>BugLabs update</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-01-21T22:26:46-05:00</dc:date><link>/weblog/files/2008_01_21_buglabs.html#unique-entry-id-49</link><guid isPermaLink="true">/weblog/files/2008_01_21_buglabs.html#unique-entry-id-49</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">Well a lot has happened on the BugLabs front since last I posted: the bug won CNET's Best of CES award for Emerging Technologies; they opened their </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://store.buglabs.net/" rel="self">store</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> to early adopters today; and they let me know that they're sending me a very generous gift!<br /><br />Back in November, they had an "application cook-off" that I co-won with koolatron. Jeremy, the BugLabs marketing guy had said "prize details forthcoming" back then, and I'd pretty much forgotten about it until I watched the </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://youtube.com/watch?v=hBlo4XoIwLY" rel="self">Engadget video with Jeremy</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> at CES. I sent him a friendly reminder after he got back from CES and he wrote back with:<br /><br /></span><blockquote><p>Was waiting til Monday to do this, but hey, it's the weekend, why not? <img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry49_1.gif" width="15" height="15" /> <br/><br/>We're going to be sending two BUGbundles out, one for you, one for Koolatron. So you get the BUGbase and all four shipping modules, and we'll send you the "von Hippel" module when it's ready! <br/><br/>Sorry for the long, long wait - we had planned to do this some time ago, but the snag we hit early on in manufacturing basically nixed our whole approach. But, we're back up and running now...<br/><br/></p></blockquote><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><br />I was amazed. The kit's early adopter price is $549, so they are being exceedingly generous. I didn't spend nearly enough time with the bug to warrant that, but now that I have actual hardware coming I will need to get back into working on some of my apps.<br /><br />I took a gander over to </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://buglabs.net/users/finsprings" rel="self">bugnet</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> and saw that, now that the beta is open, the apps are getting a lot more attention. One person even commented on mine about a typo; in this case one that was in the SDK last time I had compiled the app, but which has since been fixed by BugLabs. In the closed beta there were a lot of crickets chirping after the initial excitement, so It's nice to see the community around the bug starting to come alive.<br /><br />I have to say, I'm excited to be getting a bug. With my intention to be more frugal in 2008, I had written off my chances of getting one to play with, but now I'm going to get one guilt-free! Maybe I will finally get round to making that </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://buglabs.net/applications/finsprings/GpsLogger" rel="self">GpsLogger</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> do some actual logging.</span>]]></content:encoded></item><item><title>Bye Bye OLPC XO</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2008-01-21T21:55:29-05:00</dc:date><link>/weblog/files/2008_01_21_olpc.html#unique-entry-id-48</link><guid isPermaLink="true">/weblog/files/2008_01_21_olpc.html#unique-entry-id-48</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">So, I ended up putting my OLPC XO up on eBay. Some nice chap from Mexico picked it up for far too much.<br /><br />I felt good about the donation part of the Give One Get One program, but not so good about adding $400 to my ever mounting AMEX bill. I had some grand ideas for working on some Python apps for it, playing with the Sugar frontend, and some other stuff. But, I realized over the Christmas break that I really wasn't going to have the kind of time to dedicate to it that would be required. Also, my kids are spoilt by access to nothing slower than a PowerMac G4, and so there wasn't much to offer on the XO that they didn't already have quicker access to, with better input devices, and a better screen, on the Mac.<br /><br />Now, that's not to say that I don't think that the XO is a worthwhile device. I think it will be useful to its target audience: children who likely would not have the opportunity to be directly exposed to information technology otherwise. And as the interfaces get a little more polished, and the selection of applications expands, it will become more and more useful. I saw recently that John Negraponte intends to sell the XO officially in the US, as opposed to just via the Give One Get One program that I acquired it through. The success of the </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://eeepc.asus.com/global/" rel="self">Asus Eee PC</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> shows that at least some portion of the populous has cotton on to the fact that they don't need the resources of the supercomputers-in-PC-clothing that are now available from Dell et al. I do think they will still want something a little swifter than the XO, but perhaps in the educational setting it might just do okay.<br /><br />I wish it well.</span>]]></content:encoded></item><item><title>OLPC XO First Impressions</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-12-20T23:15:16-05:00</dc:date><link>/weblog/files/122107_olpc.html#unique-entry-id-47</link><guid isPermaLink="true">/weblog/files/122107_olpc.html#unique-entry-id-47</guid><content:encoded><![CDATA[My <a href="http://laptop.org/laptop/" rel="self">OLPC XO</a> arrived today! <span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">I managed to pry it from the kids when they went to bed and started mucking around with it.<br /></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><br /><a href="http://www.flickr.com/photos/finsprings/2126149380/" title="IMG_1490.JPG by finsprings, on Flickr"></span><img class="imageStyle" alt="olpc" src="/weblog/files/olpc.jpg" width="465" height="349" /><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "></a><br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">It's a little slower than I was expecting (not that I was expecting it to be swift or anything), and the soft keyboard takes a little getting used to, but on the whole I'm liking it. The industrial design is great in my opinion, and has some neat little touch: the texturing in the case has large nobbles, and around the handle the nobbles become Xs, so that the texturing repeats the XO logo. The </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://laptop.org/laptop/interface/index.shtml" rel="self">Sugar UI</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> feels good and the included apps, a.k.a. </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://laptop.org/en/laptop/start/activities.shtml" rel="self">Activities</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">, provide a good cross section of functionality, from word processing to recording video on the built-in camera.<br /><br />The browser, which is Firefox derived, works well and even has some Flash support (via </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://www.gnu.org/software/gnash/" rel="self">Gnash</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">). It also has some integration with Sugar, since when I went to upload a photo to Flickr and hit the Browse button, a popup appeared showing my last few activities, including the picture I had taken. When I clicked on it, it inserted a /tmp path to a JPEG file into the form. Alas, when I hit the Ok button Flickr told me that the file was empty. I popped into the shell and could the file in question was indeed empty, but there was a non-empty JPG also in temp. I copied it to the path the browser was pointing at (I couldn't get it to let me edit he path in the browser for some reason), and this time the upload worked. I'm sure that's either just a kink or something I didn't do properly when saving the photo.<br /><br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; font-weight:bold; color:#222222;font-weight:bold; ">My MacBook looking at the XO:</span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><br /></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.flickr.com/photos/finsprings/2126330810/" title="MacBook looking at XO by finsprings, on Flickr"></span><img class="imageStyle" alt="macbook xo" src="/weblog/files/macbook_xo.jpg" width="465" height="349" /><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "></a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><br /><br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; font-weight:bold; color:#222222;font-weight:bold; ">My XO looking at my MacBook</span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> (the photo referred to above)</span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; font-weight:bold; color:#222222;font-weight:bold; ">:</span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><br /></span><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><a href="http://www.flickr.com/photos/finsprings/2126345074/" title="XO looking at MacBook by finsprings, on Flickr"></span><img class="imageStyle" alt="xo macbook" src="/weblog/files/xo_macbook.jpg" width="465" height="349" /><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "></a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><br /><br />The Neighborhood page in Sugar showed my home wireless network's SSID, but I couldn't figure out how to connect to it. I have since found out that you just need to click on the dot representing the network, but I expected there to be a "Connect..." option in the popup dialog that appears when you hover the mouse over the dot. In any case I use WPA and, at least according to the OLPC </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://www.laptop.org/en/laptop/start/connecting.shtml" rel="self">"getting connected" page</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">, "</span><span style="font:13px Verdana, sans-serif; color:#333333;">we do not support WPA-enabled WiFi access points; we anticipate including WPA support in early 2008."</span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> However, I did some googling and found that I could drop to the shell to get WPA working (see </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://wiki.laptop.org/go/WPA_Manual_Setting" rel="self">http://wiki.laptop.org/go/WPA_Manual_Setting</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;">). I created the script suggested, ran it, and rebooted the XO, and it came up on my WPA network.<br /><br />Some of the Activities require more than one XO. Fortunately, one of my colleagues at work ordered an XO the day after me, so his ought to be here soon. I'd particularly like to try out the </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://wiki.laptop.org/go/Acoustic_Tape_Measure" rel="self">Distance</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> Activity,<br /><br /><img src="http://laptop.org/en/img/distance.gif" alt="Distance"/><br /><br />which can measure the distance between two laptops by measuring the length of time it takes for sound to travel between them, but since it requires 2 XOs, it'll have to wait until we both can get them into the office after the holidays.<br /><br />For more photos of the XO, see the</span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"><a href="http://flickr.com/photos/finsprings/sets/72157603513432589/" rel="self"> unboxing set</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; color:#222222;"> I put on Flickr.<br /></span>]]></content:encoded></item><item><title>BugLabs Beta Now Open</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-12-18T19:41:46-05:00</dc:date><link>/weblog/files/121807_buglabsopen.html#unique-entry-id-46</link><guid isPermaLink="true">/weblog/files/121807_buglabsopen.html#unique-entry-id-46</guid><content:encoded><![CDATA[BugLabs have <a href="http://www.bugblogger.com/2007/12/sdk-now-availab.html" rel="self">now opened the beta up</a>, so you can now download the SDK, sign up for the forums and check out the apps on BugNet. Feel free to mock my quickly-hacked up apps ;-)]]></content:encoded></item><item><title>BugLabs update</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-12-17T00:24:51-05:00</dc:date><link>/weblog/files/121707_buglabs_update.html#unique-entry-id-45</link><guid isPermaLink="true">/weblog/files/121707_buglabs_update.html#unique-entry-id-45</guid><content:encoded><![CDATA[I realize I haven't posted about BugLabs for a while; actually, looking at the top of the window I'm typing in I can see it's been close to 6 weeks. Well, the truth is there doesn't seem to be much going on at all, in the beta program at least. The last posting from anybody in the forum was December 6th, and I've been super busy at work so I haven't played with it much either. Plus the questions I've posted as to the direction they plan to go as far as user input, and display mediation between modules haven't been answered, so I haven't really figured out what else I could usefully do to test the SDK at this point. I have seen some bugzilla emails come in, so I know the guys are still working on stuff. I'm sure they're trying to get the last few kinks out before they release, which they are/were slating for mid-December.<br /><br />We did get an update from Jeremy (the marketing guy) update the beta program back on November 20th:<br /><hr/><br /><em>Hi there - we know that it's gotten a little quiet around here and we want to apologize. We also want to give you an update (overdue!) so you don't think something is amiss. <br /><br />First - BIG thanks to everyone whose been involved in our beta program. We've learned a ton from you and are applying it to our software and hardware. We would not be where we are right now without you. Please keep pounding. There's more fun stuff on the way. <br /><br />Second, when we initiated this beta program we got a great response from everyone - applicants, selected testers, etc. Many people jumped in and started exploring, coding and building things. Others hung back and waited to see what unfolded. And the truth is, not very many did. It became clear to us pretty quickly that we were asking a lot of you. Without hardware to play with and more module types to mash up, folks ran out of energy. We intended to get more resources into the mix but we weren't able to because everyone's working hard on getting product out the door. Since then we've been hiring and I'm happy to say we will be making hardware available soon too! <br /><br />We are a few defects away from moving out of closed beta and into an open beta of the BUG SDK and BUGnet. And as I mentioned above, our hardware is fully up and operational (although we can't say there's no defects just yet!). Needless to say, we're pretty excited about getting to this point! <br /><br />In December, we'll be bringing the first batch of BUGbases and BUGmodules to market. These initial BUGbase units will be limited production v0.9 hardware. We're giving them that designation for a couple reasons. We decided to change the design of the front panel a little bit and will not be able to get that change into these first units before the end of the year. Same thing for the wifi chip set. We will not be able to incorporate our new wifi design into BUGbase before year end. So rather than delay shipment, we've decided to go into limited production. These units are functionally identical to what our final production units will be (with the only exception being wifi). All our BUGmodules will be v1.0 production and will be fully compatible with both our limited production and full production BUGbases. <br /><br />Between now and the open beta, you are welcome to continue to use BUGnet, the SDK, and participate in the forums. There will be at least one update to the SDK in the meantime. As we have reached this great milestone, we invited some of our blogger friends to come take a look at working hardware, here's a few videos (Gizmodo, TechCrunch, Silicon Alley Insider) that show it off. If any of you'd like to come by the office, please let us know, we'd love to meet you in person. For those of you in the SF Bay Area, we're having a meetup on November 29th and we hope you can stop by! <br /><br />Thanks again, <br />Jeremy</em><br /><hr/><br />I asked a couple of follow-up questions (sorry for the image c&p):<br /><br /><img class="imageStyle" alt="forum post" src="/weblog/files/forum_post.jpg" width="465" height="172" /><br /><br />I'll post back when he lets us know what the plan is. They demoed some units running <a href="http://trolltech.com/products/qtopia" rel="self">Qtopia</a> to the press, but not anything running within the BUG framework. It's going to be interesting to see how the BUG SDK fits into the rest of the device's infrastructure.]]></content:encoded></item><item><title>SuperDuper for Leopard almost here</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-12-17T00:03:04-05:00</dc:date><link>/weblog/files/121707_superduperleopard.html#unique-entry-id-44</link><guid isPermaLink="true">/weblog/files/121707_superduperleopard.html#unique-entry-id-44</guid><content:encoded><![CDATA[Dave Nanian over at Shirt Pocket posted an <a href="http://www.shirt-pocket.com/blog/index.html/shadedgrey/slowest_update_ever/" rel="self">update</a> on their progress with SuperDuper! for Leopard. And the good news is that he mentioned a release date more specific than "soon" this time: "within a few weeks". The article is an interesting read. I admire their fortitude in taking the time they need to make SD rock-solid on Leopard before releasing an update for it.<br /><br />I'm looking forward to the update. SuperDuper! has always been my backup solution for OS X and I've been feeling itchy running on Leopard without it; I've got Time Machine running, but you have to restore from a boot CD with that if things go awry - yuk. I'm particularly nervous for my PowerMac, since it's boot volume is on the same 3+ year-old 120GB drive in it that it came with. I really ought to pick up a new ATA drive for it before it goes belly up.]]></content:encoded></item><item><title>Playing with the OLPC XO Emulator</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-11-17T01:52:19-05:00</dc:date><link>/weblog/files/olpc_xo_emulator.html#unique-entry-id-43</link><guid isPermaLink="true">/weblog/files/olpc_xo_emulator.html#unique-entry-id-43</guid><content:encoded><![CDATA[While I wait for my XO to arrive (as they stated, there's no ship date yet), I thought I'd give the emulator a go. Conveniently the laptop.org site has a <a href="http://wiki.laptop.org/go/Emulating_the_XO/Quick_Start/Mac" rel="self">no-brainer startup guide on the OLPCWiki for running the XO emulator on the Mac</a> (and others) using a<a href="http://www.kju-app.org/kju/" rel="self"> port of QEmu to the Mac called Q.app</a>. (I first tried building qemu via MacPorts but it wanted to use GCC 3.3 and 10.5.1 has GCC 4.0; I didn't fancy pulling in the old compiler just for this.)<br /><br />I downloaded Q.app and a recent build of the XO emulator disk image - <code>olpc-redhat-stream-development-build-542-20070801_0412-devel_ext3.img</code><span style="font:12px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "> and configured a VM as per the instructions on the OLPCWiki. It started up first time, asked me for my name and I was in. Here's a view of the main page:<br /><br /></span><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry43_1.png" width="465" height="291" /><br /><br />I didn't mess around with the emulator's DPI settings as suggested, so it looked a little fuzzier than the real thing would. Paint wouldn't start for me, but the word processor, chat program, browser, and other things I tried did. Some, like the chat program and connect 4 game needed other XO users to be in your neighbourhood, and for some strange reason there wasn't anyone else running the XO emulator on my rural street at 2am; weird huh?<br /><br />I'm excited for it to arrive. I wish I could have gotten a couple to be able to have them talk to each other, but I was pushing my luck getting one, never mind two. One of the guys at work is thinking about getting one as part of the Give One Get One program. I'll have to try and persuade him so our XOs have someone to play with.]]></content:encoded></item><item><title>One Laptop Per Child: Give One Get One</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-11-12T10:25:49-05:00</dc:date><link>/weblog/files/olpc_giveonegetone.html#unique-entry-id-41</link><guid isPermaLink="true">/weblog/files/olpc_giveonegetone.html#unique-entry-id-41</guid><content:encoded><![CDATA[The OLPC Give One Get One program starts today. For a donation of $399 (plus $24.95 shipping), they will send one XO laptop to "empower a child in a developing nation" and "receive one for the child in your life in recognition". $200 of that $399 is tax-deductible and T-Mobile is throwing in a free year's access to their HotSpot service, which is in of itself worth $360.<br /><br />I ordered mine today. Even though I don't use my laptop at Starbucks that much, I'll get some use out of the HotSpot service and I would really like to see OLPC get off the ground and do well. There's some truly innovative technology in there - see <a href="http://www.youtube.com/watch?v=BBoghPvyhts" rel="self">David Pogue's video</a> for more details - and it's all good old-fashioned open source. How could I say no?<br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry41_1.jpg" width="313" height="256" />]]></content:encoded></item><item><title>Theme Change</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-11-11T13:07:59-05:00</dc:date><link>/weblog/files/change_to_iphone_theme.html#unique-entry-id-40</link><guid isPermaLink="true">/weblog/files/change_to_iphone_theme.html#unique-entry-id-40</guid><content:encoded><![CDATA[I switched to RapidWeaver's <a href="http://www.realmacsoftware.com/blog/files/iphone_theme.html" rel="self">iPhone theme</a> today. I was using a hand-tweaked version of Dark Glass, but it just wasn't cutting it for me. I couldn't get the code extracts to look good, and when I posted pictures that were wider than the blog column it looked bad and stomped on the tag/archive sidebar (usually I cut them down but sometimes I'm linking directly from another site). In the iPhone theme that information is moved to a pull-down which keeps the main page nice and clean. I like clean. Hope you do too.<br /><br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry40_1.jpg" width="402" height="225" />]]></content:encoded></item><item><title>BugLabs: Location-Aware To-do List Manager</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-11-09T23:36:37-05:00</dc:date><link>/weblog/files/buglabs_update_11_09_2007.html#unique-entry-id-38</link><guid isPermaLink="true">/weblog/files/buglabs_update_11_09_2007.html#unique-entry-id-38</guid><content:encoded><![CDATA[Things are still rather quiet on the Buglabs front. I have been very busy with release stuff at work, and the forum postings have been pretty thin on the ground. The community application count was still at four yesterday, and I posted two of those (and the other two are at least partially based on my two). There are 14 apps in total, but the others are from Buglabs directly. I don't know if it's that people didn't realize that beta-testing something like this would involve coding, or working with the emulator is just too intangible for them, or what. Some people have being having problems getting the SDK integrated into Eclipse but other than that I'd say it was going pretty smoothly for a beta. Perhaps when the actual Bug comes out the interest will pick back up.<br /><br />I'm trying to do my part anyway (this is fun for me) and so I posted the fifth community app tonight. I found time last night to put together a first pass at a location-aware to-do list manager application and cleaned up the GUI some tonight. It's far from pretty, but it has several (canned for now) to-do lists, each with a name, related location and list of items. On the VirtualBUG's LCD modules, it looks like this for now:<br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry38_1.jpg" width="320" height="240" /><br /><br />("Choose a Todo List" is a menu)<br /><br />Once you've plugged the LCD and GPS modules into the bug, it will by default show you the to-do list whose location is nearest to your current position. I made it so that you could also explicitly select a list from a menu though. I posted it as-is, but I need to come up with a way of actually creating and working with lists. The bug doesn't have a keyboard, but an on-screen one could be created, iPhone-style. I've also considered exposing the lists via a servlet, but that would only be helpful if you had a 'real' computer to-hand; ideally you could work with lists directly on the bug. Another possibility in the less-than-ideal camp is to make it sync with web-based to-do list sites such as <a href="http://rememberthemilk.com" rel="self">Remember The Milk</a> or <a href="http://www.tadalist.com/" rel="self">Ta Da Lists</a>. I posted my thoughts on the forum, so I'll see what the buglabs folks and the other beta-testers think before going much further. I certainly don't fancy trying to create the on-screen keyboard myself in PhoneME's AWT.<br />]]></content:encoded></item><item><title>BugLabs t-shirt</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-11-08T20:36:32-05:00</dc:date><link>/weblog/files/buglabs_shirt.html#unique-entry-id-37</link><guid isPermaLink="true">/weblog/files/buglabs_shirt.html#unique-entry-id-37</guid><content:encoded><![CDATA[Well the guys at buglabs made good on their promise and sent me a lovely gift for posting the first community app: a one-of-a-kind buglabs t-shirt. Warning, pictures of me below.<br /><br /><img class="imageStyle" alt="IMG_1384" src="/weblog/files/img_1384.jpg" width="576" height="768" /><img class="imageStyle" alt="IMG_1385" src="/weblog/files/img_1385.jpg" width="768" height="576" /><img class="imageStyle" alt="IMG_1386" src="/weblog/files/img_1386.jpg" width="768" height="576" />]]></content:encoded></item><item><title>BugLabs: Pictures of the real thing</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-11-07T23:31:35-05:00</dc:date><link>/weblog/files/buglabs_first_real_pics.html#unique-entry-id-39</link><guid isPermaLink="true">/weblog/files/buglabs_first_real_pics.html#unique-entry-id-39</guid><content:encoded><![CDATA[Last week, the folks at Buglabs posted <a href="http://buglabs.net/press_images.html" rel="self">pictures</a> of the real device. It's not what you'd call Apple-pretty but I like it because of that; it has a clunkiness to it that just appeals to me (although I like my PowerMac and MacBook too, don't get me wrong). Engadget posted an article when the pictures were released, including some shots that don't show up on the press page. My favourite of those is a <a href="http://www.engadget.com/photos/bug-labs-bugbase-and-bugmodules-hands-on-1/469218/" rel="self">shot of the labe</a>l that reads "Series 1.0 HIRO P." Nice little nod to <a href="http://en.wikipedia.org/wiki/Snow_crash" rel="self">Snow Crash</a> there.<br /><br />I noticed tonight that one of the press images, which is labelled "Community Applications Image", is the one that they used on the t-shirt they sent me, and it includes the name of the first app that I posted: GpsLogger (which still doesn't log; I ought to get on that, huh).<br /><br /><img src="http://buglabs.net/images/press/community_apps_med.jpg" width="465" height="432" alt="Buglabs Community Applications"/><br /><br /><img src="http://www.blogsmithmedia.com/www.engadget.com/media/2007/11/bug-labs-hands-on-01.jpg" width="465" height="310" alt="Engadget Buglabs Photo: HIRO P."/><br />]]></content:encoded></item><item><title>TaskPaper: a to-do app for the rest of us?</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-28T21:20:01-04:00</dc:date><link>/weblog/files/taskpaper_review.html#unique-entry-id-36</link><guid isPermaLink="true">/weblog/files/taskpaper_review.html#unique-entry-id-36</guid><content:encoded><![CDATA[I've been dipping my toes into GTD territory for some time. I've tried doing it in Backpack, Basecamp, iGTD, OmniOutliner, and the OmniFocus beta to name a few. I seemed to get on okay for a while with each of them, but eventually I gave up; they were either just too complicated, or web-based which doesn't play well with the uplink tube at my work. I came across <a href="http://hogbaysoftware.com/products/taskpaper" rel="self">TaskPaper</a> from Hog Bay Software. I had played with their WriteRoom app a while back, but it wasn't something I had too much of a need for.<br /><br />At first glance, TaskPaper seemed just too simple. But when I actually started using it, I found that its simplicity was exactly what I needed. It's like a piece of paper with fring benefits. The simple syntax->format mechanism fits my programmer brain, and the fact that I can make up my own structure in a document without the application getting in my way is priceless. That's what always ended up putting me off the fuller featured apps in the end, and it's what ultimately sold me on TaskPaper.<br /><br />To define a project, you type in the name of the project followed by a colon. That's it. TaskPaper turns what you've just type into a nice title. Within a project you can create to-do items by typing a dash as the first non-whitespace character on a line. It doesn't force that dash to be at the left margin though, so you can create simple subtask structure without any fuss. It doesn't do rollup of those subtasks, but then why does it need to?<br /><br />So if you type:<br /><br />Shopping:<br />- eggs<br />- milk<br />- cake<br />- more cake<br />Home:<br />- eat cake<br />- eat more cake<br /><br />you will end up with:<br /><br /><img class="imageStyle" alt="TaskPaper" src="/weblog/files/taskpaper1" width="466" height="247" /><br /><br />Easy! If you notice, there's a tab there at the top that says Home. That means it's showing you your entire todo document. You can type a search into the search and it will instantly restrict your view to the matching entries. For example, here's the view when I search for cake:<br /><br /><img class="imageStyle" alt="Show me cake!" src="/weblog/files/taskpaper_cake" width="464" height="217" /><br /><br />So you can still see your projects, but only the important, cake-related entries within.<br /><br />You can also click on a project title to focus on that project:<br /><br /><img class="imageStyle" alt="just shopping" src="/weblog/files/taskpaper_shopping" width="469" height="161" /><br /><br />You can also open multiple tabs on the same document:<br /><img class="imageStyle" alt="shopping tab" src="/weblog/files/taskpaper_tab_shopping" width="461" height="169" /><br /><br /><br />So you can see, it's pretty easy to get around in your to-dos. Once you find something you need to do, and then you actually go and do it, you can mark it as done by either clicking the circle in the margin or placing your cursor somewhere on the line and pressing Cmd-D. Here I only have more cake to finish my lists:<br /><br /><img class="imageStyle" alt="almost done" src="/weblog/files/taskpaper_done" width="460" height="230" /><br /><br />You will notice that "@done" appears in gray on a task that you have marked as complete. This hints at another feature of Taskpaper: tagging. You can tag items by prefixing the tag name with an ampersand. Here I'm trying to offset some of that cake:<br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry36_6.png" width="455" height="254" /><br /><br />And, like projects, and arbitrary text, you can also filter based on tags. TaskPaper even builds a drop-down list of them for you automatically:<br /><br /><img class="imageStyle" alt="my tags" src="/weblog/files/taskpaper_tags_dropdown" width="469" height="258" /><br /><br /><br /><img class="imageStyle" alt="show me healthy" src="/weblog/files/taskpaper_healthy" width="462" height="151" /><br /><br />So it actually does a fair bit more than you might expect, but just as importantly, it doesn't try to do too much. There's a 15-day trial, and if you like it it's $18.95 so I'd recommend giving it a go.]]></content:encoded></item><item><title>BugLabs: New SDK</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-28T21:13:59-04:00</dc:date><link>/weblog/files/buglabs_new_sdk_2.html#unique-entry-id-35</link><guid isPermaLink="true">/weblog/files/buglabs_new_sdk_2.html#unique-entry-id-35</guid><content:encoded><![CDATA[BugLabs pushed out an update to their SDK the other day. The status display on the VirtualBug now has 2 lines like the real one will have. They fixed a number of minor issues and also pushed through the pain to get it working on OS X. So do I switch back to working on my MacBook or do I stay pure and keep on working on Bug stuff on my Etch box?<br /><br />One of the other beta testers, koolatron, took the simple GpsLogger app I pushed out and came up with a much nicer version, complete with a properly centered google tile and button-based zooming. I haven't had much time to spend on the Bug, between the release march at work and DIY stuff at home. I'm looking forward to messing around with it again, but it probably won't be this week.<br /><br />Oh, I got a very nice email from the BugLabs marketing guy Jeremy:<br /><br /><blockquote><p>Dave,<br/><br/>Just wanted to let you know your first prize is coming at ya.  Please know it might show up in a fairly generic package, but it's unique and we spent a lot of time making something we thought had the right amount of personal touch.   Hope you receive it as fondly as we sent it, and please let me know when it arrives - sometime next week I believe.<br/><br/>Best,<br/>Jeremy</p></blockquote><br />I'll post back when it arrives.]]></content:encoded></item><item><title>BugLabs: Second App &#x22;BUGer&#x22;</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-16T13:39:29-04:00</dc:date><link>/weblog/files/buglabs_buger.html#unique-entry-id-34</link><guid isPermaLink="true">/weblog/files/buglabs_buger.html#unique-entry-id-34</guid><content:encoded><![CDATA[Over the weekend, the BugLabs folks posted a request to have the testers try and all work on the same task:<br /><blockquote><p>Hi, Now that you've had some time playing around in a fairly open context, we'd like to try a structured project where everyone is working on the same task, and see how the results play out. <br/><br/>The first project is to use the BUGbase and the motion detector module to build a home security system. This is a pretty straightforward project (in our estimation) and shouldn't take too long if you're already up to speed on the platform. For those of you new to the environment, it should be a good way to learn the basics of BUG. <br/><br/>Here's the "specifications" of the home security system: On any detected motion, the system should log an alert with the current date/time stamp. The alert log should be accessible via a Web interface. <br/><br/>Yup, it's that basic. For a little extra help, here are the basic steps to build the system: 1. Create a new BUG application, in the creation wizard select the IMotionSubject service. <br/>2. Register a listener for callbacks to when motion is detected. Create and append to a file and log the date and time of occurence. <br/>3. Create a menu item for the application that allows for the logging to be turned on and off. <br/>4. Create a servlet that retrieves the log data from the log file and presents it to a web client. <br/>5. Confirm that your application works by triggering motion events from the command line. <br/><br/>Once you are done, upload the app to BUGnet. If you need any help with the project, please let us know. <br/><br/>We also have a few ideas for those of you who want to push your app "to 11" (although you can be as creative as you want!), here are some of ours: * When an event happens, send an SMS * Send an email report at the end of every day * Double gold star project: also integrate with the camera, and make a picture available with each event. * something else??? <br/><br/>Thanks, we'd love to see this wrapped up in a week if possible! <br/>Best, <br/>Jeremy<br/>_________________<br/>I'm the Bug Labs "marketing guy"</p></blockquote><span style="font:12px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><br />I had a bit of spare time on Sunday night so I put together "BUGer" that does pretty much what Jeremy was asking for. I added in the camera stuff too, so BUGer takes a picture on each motion event. However the servlet container in the VirtualBUG doesn't yet support static resources, so the image can't be displayed on the webpage. It's there for when it can though. If I find time I may look at putting in the email part, but the PhoneME JME doesn't have email stuff in it that I could see, and scraping SMTP seems tedious, so I may not. I'm also not sure how you would do SMS unless you did it as email-to-your-cell-phone, which is just email from the BUG's perspective, since the SMS part is done by the carrier's email server.<br /><br /><br /></span><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry34_1.png" width="465" height="419" />]]></content:encoded></item><item><title>BugLabs: My first app came first...and last</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-13T19:18:17-04:00</dc:date><link>/weblog/files/buglabs_bakeoff.html#unique-entry-id-33</link><guid isPermaLink="true">/weblog/files/buglabs_bakeoff.html#unique-entry-id-33</guid><content:encoded><![CDATA[So midnight last night was the cut off for the first BugLabs application bake off. No-one else had posted an application so it was looking like a sure thing. However the BugLabs folks decided to extend the deadline by a couple of weeks, to give people some more time. But very nicely they've decided to "reward" me for posting an app despite the issues with the SDK (which have been pretty minor).<br />One of the other testers is working on a new and improved version of my GpsLogger application. I'm looking forward to seeing what he comes up with. I bumped my version to 1.0.3 last night after factoring out the utility classes to a separate package and doing some general cleanup and documentation. I'm thinking about doing some webcam stuff with it next. There's a sample app that posts images to Flickr, but I'd like to do it more like a regular webcam. It would be pretty cool to update a picture every few minutes while you're out and about (assuming of course you have municipal WiFi...).]]></content:encoded></item><item><title>BugLabs: My GpsLogger gets slightly less lame</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-09T15:10:58-04:00</dc:date><link>/weblog/files/buglabs_gpslogger_1_0_1.html#unique-entry-id-31</link><guid isPermaLink="true">/weblog/files/buglabs_gpslogger_1_0_1.html#unique-entry-id-31</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">I added the Google Tile code from one of the sample apps to my el-cheeso GpsLogger application for BugLabs last night. So now it shows the appropriate Google tile for where the position module is reporting that you are right now. I also created a few NMEA data log files using </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://earth.google.com" rel="self">Google Earth</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "> and </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.gpsbabel.org/" rel="self">gpsbabel</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">, so that I could have different fake routes to watch it run (since there's obviously no actual GPS chip in the Virtual BUG it just reads position data from a file).<br /><br /></span><img class="imageStyle" alt="GpsLogger" src="/weblog/files/GpsLogger.png" width="396" height="434" />b]]></content:encoded></item><item><title>BugLabs New Rendering</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-08T23:02:28-04:00</dc:date><link>/weblog/files/buglabs_rendering.html#unique-entry-id-30</link><guid isPermaLink="true">/weblog/files/buglabs_rendering.html#unique-entry-id-30</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://buglabs.net/" rel="self">BugLabs</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "> have a new rendering up on their home page of what the Bug and Modules will look like. I think the one in the bottom-left is the LCD. Engadget has it </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://www.engadget.com/2007/10/08/bug-labs-shows-off-new-product-render/" rel="self">here</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">.</span>]]></content:encoded></item><item><title>USENET Nostalgia</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-08T17:39:18-04:00</dc:date><link>/weblog/files/USEnet_nostalgia.html#unique-entry-id-29</link><guid isPermaLink="true">/weblog/files/USEnet_nostalgia.html#unique-entry-id-29</guid><content:encoded><![CDATA[<span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">I found what were likely my first USENET postings today, courtesy of the information hoover that is Google (more specifically Google Groups in this case). Riveting stuff it is too.<br /><br /></span><span style="font:13px Courier, mono; ">Newsgroups: misc.forsale<br />From: d...@dcs.ed.ac.uk (David Findlay)<br />Date: 29 Jan 93 13:47:31 GMT<br />Local: Fri, Jan 29 1993 9:47&nbsp;am<br />Subject: Sega Game Gear For Sale<br /><br />I have a 7 month old Sega Game Gear for sale (I got a SNES you see). <br />It comes with the following : <br />6 games, TV adapter (turns it into a portable colour TV), AC adapter, rechargeable battery pack, car lighter adapter,<br />carry case for all the above + all instruction booklets, manuals and receipt for remainder of guarantee. <br /><br />All this stuff cost me about 400 pounds so I will let it go for 250 ono (inc p+p). <br />Please e-mail me with offers. <br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><br />and:<br /><br /></span><span style="font:13px Courier, mono; ">Newsgroups: alt.fan.ren-and-stimpy<br />From: d...@dcs.ed.ac.uk (David Findlay)<br />Date: 3 Feb 93 14:07:24 GMT<br />Local: Wed, Feb 3 1993 10:07&nbsp;am<br />Subject: R&S in the UK<br /><br />Can anyone tell me if Ren and STimpy stuff is available in the UK? <br />My girlfriend is from Pennsylvania and I saw the specials on MTV there at Christmas, but I've never seen anything about them at home. <br /></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><br />I'm very happy to say that my girlfriend back then is my now my wife and has been for 13 years!<br />This also reminds me that I sent a VHS tape to some guy in England with a tenner 'cos he said he'd tape some Ren and Stimpy episodes for me (I was eager to swot up to impress my girlfriend). He never returned it, but on the plus side I did find the lyrics to the log song on </span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; "><a href="http://en.wikipedia.org/wiki/Archie_search_engine" rel="self">archie</a></span><span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">...<br /><br /></span>]]></content:encoded></item><item><title>&#x22;VOCOLLECT HEALTHCARE SYSTEMS LAUNCHES ACCUNURSE&#xae; VERSION 2.0&#x22; Press Release</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-08T13:04:25-04:00</dc:date><link>/weblog/files/accunurse_2_0_launches.html#unique-entry-id-28</link><guid isPermaLink="true">/weblog/files/accunurse_2_0_launches.html#unique-entry-id-28</guid><content:encoded><![CDATA[Sorry to shout, but <a href="http://healthcare.vocollect.com/index.html/en/pr/vocollect_healthcare_systems_launches_accunurse_version_2" rel="self">this</a> has been my work life for the last year and a half.<br /><br />Here's a picture of me with our new AccuNurse Voice Assistant (hastily taken with PhotoBooth, so excuse the backlighting):<br /><br /><img class="imageStyle" alt="Me and my Voice Assistant" src="/weblog/files/me_and_voiceassistant.jpg" width="320" height="240" /><br /><br />It looks a bit big in that picture because of the perspective, but it's actually pretty darn small.]]></content:encoded></item><item><title>BugLabs Update: My first app</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-10-07T17:32:37-04:00</dc:date><link>/weblog/files/buglabs_2.html#unique-entry-id-27</link><guid isPermaLink="true">/weblog/files/buglabs_2.html#unique-entry-id-27</guid><content:encoded><![CDATA[I finally found some time to sit down with the BUG SDK and play around. They're using the <a href="http://en.wikipedia.org/wiki/OSGi" rel="self">OSGi</a> framework under the hood: a dynamic module framework for Java. I wrote the beginnings of what I intend to be a GPS logger. So far it just shows a starting position, your current position and the distance between them (using the Haversine formula). There's still some work to be done in the SDK to define the constraints of the actual LCD device - for now the SDK just exposes an AWT Frame - so I haven't spent any time on GUI layout. The VirtualBUG emulator also doesn't work properly on OS X, apparently due to a bug in Apple's implementation of Swing. The buglabs guys have been working on that one but for now I've fallen back to working with it on Debian Etch on my MythTV box, and it's working fine on that.<br /><br />They had their first webinar with the beta testers on Thursday, but we're in the final throes of getting a release completed at work, so I couldn't attend. They've also initiated an application cook-off where they judge tester-created applications and award some prizes. I doubt my humble offering will make it too far in the process, but it was at least the first user-generated app uploaded  to the site.<br /><br />Right, I best be off for now; gotta remote into a customer site and do an upgrade soon. I'll leave you with the entry for my first app:<br /><br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry27_1.png" width="465" height="417" /><br />]]></content:encoded></item><item><title>Getting your pictures from Flickr into iPhoto</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-27T22:53:03-04:00</dc:date><link>/weblog/files/flickr_to_photo.html#unique-entry-id-26</link><guid isPermaLink="true">/weblog/files/flickr_to_photo.html#unique-entry-id-26</guid><content:encoded><![CDATA[Last month I posted about <a href="/weblog/files/flickrphotoinfo.html" rel="self" title="weblog:Backing up your Flickr photo info">backing up metadata for your Flickr photos</a> using a simple little Python script. That script gives you an XML file for each photo with all that photo's metadata stored inside it for ready access. If you're a recent switcher to OSX, you might want to take advantage of that data to get your photos from Flickr into iPhoto.<br /><br />Once you have iPhoto and Flick in sync, you can import new photos from your camera into iPhoto and then export to iPhoto using <a href="http://connectedflow.com/flickrexport/iphoto/" rel="self">FlickrExport</a> and they will stay in sync. Of course you may have no interest in getting your photos from Flickr to iPhoto, in which case feel free to stop reading. In my case, while I had the photos around, they were in multiple folders on my hard drive and didn't have any tags associated with them. On Flickr I had them tagged, dates corrected, and so on. Rather than recreate that process I decided it would be easiest to take what I'd done in Flickr and push it to iPhoto.<br /><br />The linked AppleScripts below were mostly what I used to accomplish this process, again in conjunction with the XML files from the script mentioned in <a href="/weblog/files/flickrphotoinfo.html" rel="self" title="weblog:Backing up your Flickr photo info">Backing up your Flickr photo info</a>. Now some caveats: I had never used AppleScript before when I wrote these, and my copy of <a href="http://www.oreilly.com/catalog/applescpttdg/" rel="self">AppleScript: The Definitive Guide</a> was still in the mail. If you know AppleScript you will be aware of how quite unlike most other scripting languages it is. The scripts below are undoubtedly not in best AppleScript style, and I didn't spend any time modularizing them, so you'll see common functions in each for XML parsing and so forth.<br /><br />So with that said, take them for what they are and do with them what you please. Hopefully between them they'll give you enough to make a start on whatever iPhoto library-munging project you've decided to take on.<br /><br /><ul class="disc"><li><a href="http://pastie.textmate.org/101632" rel="self">Copy photo "date taken" information from Flickr to iPhoto</a></li><li><a href="http://pastie.textmate.org/101634" rel="self">Copy photo metadata from Flickr to iPhoto (title, comment, keywords)</a></li><li><a href="http://pastie.textmate.org/101636" rel="self">Download photos from Flickr and import them into iPhoto</a></li><li><a href="http://pastie.textmate.org/101637" rel="self">Change YYMMDD_N titles to YYMMDD_0N in iPhoto</a></li></ul>]]></content:encoded></item><item><title>Breaking the 32MB barrier on Windows (pre-6) CE</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-26T20:47:29-04:00</dc:date><link>/weblog/files/ce_lma.html#unique-entry-id-24</link><guid isPermaLink="true">/weblog/files/ce_lma.html#unique-entry-id-24</guid><content:encoded><![CDATA[In Windows CE 5 and earlier, each process is limited to 32MB of virtual address space. That 32MB has to hold your executable, your DLLs, <strong>everyone else's DLLs</strong>, your heap, and some other stuff. If you're on a plain Windows CE device the so-called 'DLL crunch' isn't always too bad, since the OEM only has to include what they want or need to include in the platform image. However, on a Windows Mobile device, the OEM has to include everything required to get LTK verification: Pocket Word, and all that fun stuff. That means a bunch of extra DLLs that eat into the available space in your process' slot.<br /><br />In Windows CE 6, the limit was raised to 2GB, so you have much more breathing room (you are limited to 512MB of physical RAM, but still, what luxury).<br /><br />So, what do you do if you're developing for pre-6 Windows CE and you run out of heap space for your application? Well, you can play some tricks with DLL load ordering, but that only gets you so far. One neat trick I rely on is what I like to call the 'LMA incantation'. It goes like this:<br />If you ask for at least 2MB, and you ask for it in a particular way, then CE will allocate that memory for you from the Large Memory Area. This is the area of memory above where the individual 32MB slots exist for normal processes. It's normally used for memory-mapped files (which is another way you can make use of the LMA if you need to).<br /><br />Here's the incantation:<br /><br /><code>DWORD size = 2*1024*1024; // (or more)<br /><br />void *p =  VirtualAlloc(0, size, MEM_RESERVE, PAGE_NOACCESS);<br />p = VirtualAlloc(p, size, MEM_COMMIT, PAGE_READWRITE);<br /><br />// optional:<br />#define LMA_START_ADDRESS (0x42000000)<br />assert(ptr > LMA_START_ADDRESS)</code><br /><br />Now if you do this in one line rather than two, that is do the commit without the reserve, then you will get memory from your process' 32MB slot rather than the LMA, and the assert will of course fail.<br /><br />This one has saved my behind on more than one project. Enjoy!<br /><br />Notes:<br /><ul><li>From the <a href="http://msdn2.microsoft.com/en-us/library/aa908768.aspx" rel="self">MSDN description of VirtualAlloc</a>:<br /><blockquote><p>In Windows CE 5.01 and earlier versions, if you call VirtualAlloc with dwSize >= 2 MB, flAllocationType set to MEM_RESERVE, and flProtect set to PAGE_NOACCESS, it automatically reserves memory at the shared memory region. This preserves per-process virtual memory.... Since CE 6.0, irrespective of the value of dwSize, kernel will always try to allocate VM in user process space. Also, user applications cannot call VirtualAlloc with shared heap address range (0x70000000 - 0x7fffffff) since this is read only for user applications and read/write for kernel mode threads.</p></blockquote></li><li>A <a href="http://msdn2.microsoft.com/en-us/library/bb331824.aspx" rel="self">recent article</a> from CE whiz Doug Boling on CE memory architecture.</li></ul><br />]]></content:encoded></item><item><title>BugLabs Beta is a go&#x21;</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-25T22:59:25-04:00</dc:date><link>/weblog/files/buglabs_phase_one.html#unique-entry-id-25</link><guid isPermaLink="true">/weblog/files/buglabs_phase_one.html#unique-entry-id-25</guid><content:encoded><![CDATA[I'm honoured to have been chosen in the <a href="http://www.bugblogger.com/2007/09/beta-testers-se.html" rel="self">first wave of beta testers</a> to get access to the <a href="http://buglabs.net/" rel="self">BugLabs</a> beta. I read about BugLabs in an <a href="http://www.engadget.com/2007/08/28/bug-labs-fleshes-out-bugbase-bugmodule-details/" rel="self">Engadget blog post</a> and it sounded intriguing: "An open source, web-enabled, modular software + hardware platform."<br /><span style="color:#494B50;"><br /></span>We're not under a formal NDA or anything, but we've been asked not to disclose URLs for the various components of the beta program, and so on, which is fair enough:<br /><blockquote><p>By the way, please keep these links to yourself, they should all be considered confidential to the beta program. You are welcome to blog about, chat about, Twitter about, text about, email about, or send smoke signals about the beta program, but please don't share the links or SDK. </p></blockquote>They have bug tracking, forums and a WiKi already up and running, and they made an SDK available. The SDK includes VirtualBug: an emulator for the hardware, since hardware isn't available at this stage.<br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry25_1.png" width="430" height="114" /><br /><br />They built their SDK on top of Eclipse and I have to say it's pretty slick for things being so early. The instructions to get everything up and running are also unusually polished for a beta program.<br /><br />There are a few sample applications that do real things, like post pictures to Flickr with geo-tagging. Some things are still necessarily in the mock-up stage until the hardware is ready, like the camera module (which pulls pictures from file rather than an actual camera) and the motion sensor (which 'detects' motion by you typing the word 'motion' into the Eclipse console).<br /><br />Still, I'm very impressed at how it looks at this point. The few questions I've had have been replied to promptly in the forums and the folks at BugLabs all seem very helpful.<br /><br />I'm still getting my feet wet in the SDKs, but I'll post updates as I make progress.<br /><br /><img class="imageStyle" alt="Dragonfly SDK" src="/weblog/files/dragonfly_sdk_screenshot.jpg" width="465" height="264" />]]></content:encoded></item><item><title>Stephen Fry is a geek</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-20T23:01:12-04:00</dc:date><link>/weblog/files/stephenfryblogging.html#unique-entry-id-23</link><guid isPermaLink="true">/weblog/files/stephenfryblogging.html#unique-entry-id-23</guid><content:encoded><![CDATA[<a href="http://daringfireball.net" rel="self">Gruber</a> posted a link to <a href="http://stephenfry.com/blog/" rel="self">Stephen Fry's new blog</a>. Now I'm a big fan of Stephen Fry, and he's a good writer, but lo and behold he also happens to be a gadget freak and a Mac user to boot. I had no idea. He even had a Psion 3, one of my favourite PDA predecessors, and something I still keep around to play with now and again.<br /><br />His first post is all about smart phones. Let's hope he keeps it going. I for one am already subscribed to his feed.;]]></content:encoded></item><item><title>vmware spamming me; sneakemail saves the day</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-20T22:54:38-04:00</dc:date><link>/weblog/files/sneakemailvmware.html#unique-entry-id-22</link><guid isPermaLink="true">/weblog/files/sneakemailvmware.html#unique-entry-id-22</guid><content:encoded><![CDATA[So a while back, I signed up for the VMware Fusion beta. Shortly thereafter I started getting a ton of all the usual delightful varietes of spam through the address I have them. Now I use <a href="http://sneakemail.com" rel="self">sneakemail</a>, so the email address I gave them was actually a sneakemail alias that I set up specifically and solely for that purpose. Now that their mailing list has made it to the spammers, I can simply go into my sneakemail control panel and send that alias to the bitbucket. If you haven't come across sneakemail before, I highly recommend that you take a look. They have a free offering, but the real power is in the autoaddressing keys that you get with the paid account, which is only $2/month.<br /><br />I'm surprised, and a little disappointed, that a company of VMware's stature would let their mailing lists get abused like this though.]]></content:encoded></item><item><title>More C++0x fun</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-11T21:12:59-04:00</dc:date><link>/weblog/files/july2007iso.html#unique-entry-id-21</link><guid isPermaLink="true">/weblog/files/july2007iso.html#unique-entry-id-21</guid><content:encoded><![CDATA[For more C++0x fun, check out Herb Sutter's <a href="http://herbsutter.spaces.live.com/Blog/cns!2D4327CC297151BB!291.entry" rel="self">trip report for the July 2007 ISO C++ Standard meeting</a>.]]></content:encoded></item><item><title>OnSoftware Video Podcast</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-11T20:45:51-04:00</dc:date><link>/weblog/files/onsoftwarepodcast.html#unique-entry-id-20</link><guid isPermaLink="true">/weblog/files/onsoftwarepodcast.html#unique-entry-id-20</guid><content:encoded><![CDATA[<img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry20_1.jpg" width="108" height="108" /><br /><br /><a href="http://www.informit.com/podcasts/channel.aspx?c=dadf92ca-3bdc-484e-9cd8-cbfe0cfc0de6" rel="self">OnSoftware</a> is putting out some pretty neat video podcasts right now. As a (predominately) C++ guy, I found the ones with Bjarne Stroustrup, Herb Sutter and Scott Meyers to be particularly interesting.<br /><br />They're making me eager for <a href="http://en.wikipedia.org/wiki/C++0x" rel="self">C++0x</a> to get here! I realize it's going to be a while though: to my knowledge, Microsoft still haven't said when Visual C++ will have <a href="http://en.wikipedia.org/wiki/Technical_Report_1" rel="self">TR1</a> support, never mind C++0x. I can live with getting my <code><a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" rel="self">shared_ptr</a> </code>fix from the the <a href="http://boost.org/" rel="self">Boost libraries</a> for now, but having shared pointers fully and officially in the language, along with things like lambda functions, will certainly make life easier.<br /><br /><em>Note that you can get TR1 now from </em><em><a href="http://dinkumware.com" rel="self">Dinkumware</a></em><em>, and they'll likely be first to put out proper C++0x support once it's ratified (fingers crossed for 2009). P.J. Plauger and Pete Becker are very nice to deal. Indeed, we used Dinkumware on Windows CE 4.2 so that we could make use of streams. Unfortunately for our application, it's tough to justify the overhead of an alternate library, and we had problems on other people's devices that exported C++ APIs in their SDKs (they would export a function that returned a Microsoft </em><code>std::wstring</code><em> for example, which isn't binary compatible with a Dinkumware </em><code>std::wstring</code><em> so we'd end up wrapping their SDK in C: very ugly).</em>]]></content:encoded></item><item><title>Calling CYpress-5 </title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-09-08T00:44:18-04:00</dc:date><link>/weblog/files/phonefun.html#unique-entry-id-18</link><guid isPermaLink="true">/weblog/files/phonefun.html#unique-entry-id-18</guid><content:encoded><![CDATA[Fun little project for after the kids went to bed tonight: we picked up an old Western Electric Model 500 rotary telephone from <a href="http://boldoldphones.com" rel="self">boldoldphones.com</a> via eBay. We chose the cheaper one, so we had to clean it. That was no big deal, and it was fun unscrewing the handset couplings like spies used to do in the old movies ;-)<br /><br />I researched our exchange and found at <a href="http://dmine.com/phwolrd/nptco/co.htm" rel="self">Telephone World</a> that it used to be called CYpress-5, so I printed up a little label using the <a href="http://www.searchfreefonts.com/search/?q=1942" rel="self">1942 report</a> font, since it seemed fitting (well the 500 was introduced in 1949, and the coiled cable version is newer, but let's not split hairs).<br /><br />Then, I'm ashamed to say, I had to find instructions on getting the finger wheel off to replace the label. Luckily, I found just what I was looking for at <a href="http://www.porticus.org/bell/telephones-technical_dials-rotary.html" rel="self">porticus.org</a>.<br /><br />The phone looks great, and it sounds fantastic: the bell could wake the dead, and really brings me back to the beige British Telecom equivalent we had when I was growing up. Best of all was my daughter's reaction to it, and walking her through the use of the rotary dial.<br /><br /><a href="http://www.flickr.com/photos/finsprings/1345174704/" title="Photo Sharing"><img src="http://farm2.static.flickr.com/1338/1345174704_6caff64275_m.jpg" width="240" height="180" alt="CYpress-5 9007" /></a>]]></content:encoded></item><item><title>Parallels and Linux: 512MB is your lot</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-28T22:42:42-04:00</dc:date><link>/weblog/files/parallelslinux.html#unique-entry-id-17</link><guid isPermaLink="true">/weblog/files/parallelslinux.html#unique-entry-id-17</guid><content:encoded><![CDATA[Parallels 3.0 Beta 2 (Build 5120) came out the other day. I updated my copy and checked to see if they had fixed the problem I've been seeing with Linux VMs assigned more than 512MB. Unfortunately, they haven't.<br /><br />I'm running Slackware 12.0 in a Parallels VM with a vanilla 2.6.21.5 kernel. If I assigned that VM 512MB of RAM it runs just fine. If I give it 768MB or 1024MB, modprobe crashes on startup. Set it back to 512MB and it's happy again. I've seen <a href="http://paul.annesley.cc/articles/2007/05/01/ubuntu-704-feisty-server-parallels-cdromkernel-workaround" rel="self">other people</a> have similar issues trying to get Parallels to run the server version of Ubuntu.<br /><br />Parallels doesn't have this restriction with a Windows XP VM, so it has to be something they aren't emulating correctly for Linux. It makes me wonder if I ought to have waited for <a href="http://vmware.com/products/fusion/" rel="self">VMWare Fusion</a>, as I use VMWare Workstation at the office a lot, but the beta wasn't even out when I bought Parallels. Ah well, <s>640KB</s>512MB should be enough for anyone, eh?<br /><br /><br /><div class="image-left"><img class="imageStyle" alt="Slackware 12 in Parallels" src="/weblog/files/slackware12_parallelsjpg.png" width="465" height="322" /></div>]]></content:encoded></item><item><title>Putting the S back into SSH</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-21T14:50:58-04:00</dc:date><link>/weblog/files/sssh.html#unique-entry-id-16</link><guid isPermaLink="true">/weblog/files/sssh.html#unique-entry-id-16</guid><content:encoded><![CDATA[A <a href="http://www.dribin.org/dave/blog/archives/2007/08/21/ssh_agent/" rel="self">poignant article</a> from Dave Dribin recommending against <a href="/weblog/files/sshpublickey.html" rel="self" title="weblog:SSH Public Key Authentication">using SSH without a passphrase</a>. (Link via <a href="http://daringfireball.net/" rel="self">Daring Fireball</a>.) I am going to have to take a look at <a href="http://www.sshkeychain.org/" rel="self">SSHKeychain</a> as it looks pretty handy. As an aside, I just got done setting up a Slackware 12 VM on my MacBook and am using <a href="http://code.google.com/p/macfuse/" rel="self">MacFuse</a> via <a href="http://code.google.com/p/macfusion/" rel="self">MacFusion</a> so that I can edit files on the VM indirectly using TextMate. It works great with public key authentication.]]></content:encoded></item><item><title>SSH Public Key Authentication</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-19T14:23:10-04:00</dc:date><link>/weblog/files/sshpublickey.html#unique-entry-id-15</link><guid isPermaLink="true">/weblog/files/sshpublickey.html#unique-entry-id-15</guid><content:encoded><![CDATA[<a href="http://www.realmacsoftware.com/rapidweaver/index.html" rel="self">RapidWeaver 3.6.3</a> just came out, which is the web site publishing application that I use. One of the new features they've added is support for SSH public key authentication for publishing changes to a site to your web server. This reminded me that I've been meaning to post a quick how-to on this under-appreciated feature of SSH. So here goes.<br /><br />Back in the day we all used TELNET to connect to our servers. This was fine until bad people came along. TELNET sends your username and password in the clear, and so bad people started watching packets fly past and grabbed your account information out of the air. And then came Secure Shell, or SSH, which uses secure sockets technology to encrypt the connection between your client and server machines. No more password grabbing.<br /><br />By default you use SSH pretty much like TELNET, where you specify your username and password every time you connect. However, SSH also supports public key authentication, which allows you to securely <strong>not</strong> have to enter your username and password every time you connect. Yes, this sounds counterintuitive but it's true.<br /><br />What follows is a super-quick how-to. If you want more specifics check out Dave Aaldering's <a href="http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/" rel="self">SSH with Keys HOWTO</a> or the various man pages for ssh (try <span style="font:12px Courier, mono; ">man -k ssh</span> to see what man pages your system has for SSH).<br /><br />To configure anything for SSH you need to create SSH's configuration directory, if you don't already have it. On your client and server:<br /><span style="font:15px Courier, mono; ">mkdir ~/.ssh<br />chmod 700 ~/.ssh</span><span style="font-size:10px; "><br /></span><br />The chmod is so only your user account has access to the SSH configuration directory. That's important. Once you have done that, you can proceed to creating your key. On your  client:<br /><span style="font:15px Courier, mono; ">cd ~/.ssh<br />ssh-keygen -t dsa<br /></span><br />Accept all the defaults and specify a blank keyphrase when asked. You can include a passphrase, in which case the server will prompt you for this passphrase each time you connect. I'm assuming you want to skip that step, but feel free to specify a passphrase if you wish. The advantage is not specifying one is convenience. The disadvantage is that anyone with access to the console on your client machine will be able to access your server without a password.<br /><br />You should now have a public key in <span style="font:12px Courier, mono; ">~/.ssh/id_dsa.pub</span> and a private key at <span style="font:12px Courier, mono; ">~/.ssh/id_dsa</span>. The public key needs to go on your server. The private key needs to stay where it is (this is what identifies you to the server and lets you log in without needing to specify a password). You may want to backup the private key file, since if you lose it you'll have to go through these steps all over again.<br /><br /> Transfer your newly-created <span style="font:12px Courier, mono; ">~/.ssh/id_dsa.pub</span> public key file to the same directory on your server. Then on your server:<br /><span style="font:15px Courier, mono; ">cd ~/.ssh<br />cat id_dsa.pub >> authorized_keys<br />chmod 600 authorized_keys<br />rm id_dsa.pub</span><br /><br />This tells the SSH daemon on your server that you authorize clients that know the private key that goes with this public key. The <span style="font:12px Arial, Verdana, Helvetica, sans-serif; ">>></span> appends to <span style="font:12px Courier, mono; ">authorized_keys</span> if it already exists: you authorize as many clients as you wish (one for your laptop, one for your home desktop machine, etc.).<br /><br />Now that you've told the server it's okay for your client to connect using a key, try it out. On your client:<br /><span style="font:15px Courier, mono; ">ssh server-username@server-ip<br /></span><br />You should be logged in without being prompted for a password! If not, make sure that <span style="font:12px Courier, mono; ">~/.ssh</span> has permissions of 700 and <span style="font:12px Courier, mono; ">~/.ssh/authorized_keys</span> is 600. You may also need to tweak your server's SSH daemon configuration file. It's usually at <span style="font:12px Courier, mono; ">/etc/sshd_config</span> and the entry you want is <span style="font:12px Courier, mono; ">PubkeyAuthentication yes</span>.<br /><br />Once you have it working, if you want to disable log ins with a password, so that you can <strong>only</strong> do it with your key, set <span style="font:12px Courier, mono; ">PasswordAuthentication</span> in <span style="font:12px Courier, mono; ">/etc/sshd_config</span> to <span style="font:12px Courier, mono; ">no</span>. Be sure you don't lose that private key once you've done this though!<br /><br /><h3>Extra Credit</h3>If your username is different on your client than on your server then create <span style="font:12px Courier, mono; ">~/.ssh/config</span> on your client and add an entry like the following:<br /><br /><span style="font:14px Courier, mono; ">Server server-name-or-ip<br />  User  your-server-username</span><br /><br />You can also add <span style="font:12px Courier, mono; ">Port</span> and <span style="font:12px Courier, mono; ">Hostname</span> entries for your server which can be convenient if you want to refer to the host by a different name when connecting (or if it a name if it doesn't have a DNS entry), or if the port is not the usual 22 and you don't want to remember to have to use the <span style="font:12px Courier, mono; ">-p</span> option to the <span style="font:12px Courier, mono; ">ssh</span> command. See <span style="font:12px Courier, mono; ">man ssh_config</span> for all the details.]]></content:encoded></item><item><title>Linux MCE: wow</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-18T13:53:25-04:00</dc:date><link>/weblog/files/linuxmce.html#unique-entry-id-14</link><guid isPermaLink="true">/weblog/files/linuxmce.html#unique-entry-id-14</guid><content:encoded><![CDATA[I just watched the demonstration video for Linux MCE 0704, and it's pretty darn impressive. It is well produced and the set of features are very impressive. The low-resolution video is on Google Video:<br /><br /><span style="font:11px &#39;Lucida Grande&#39;, LucidaGrande, Verdana, sans-serif; "><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=2176025602905109829&amp;hl=en" flashvars=""/><br /><br /></span>There are higher resolution versions in <code>WMV</code> and <code>OGM</code> formats available via torrents from the Wiki <a href="http://wiki.linuxmce.com/index.html/Mirrors" rel="self">downloads page</a>. I downloaded the DVD ISO to play with it on my P4 linux box, but after the 2 and a half day download it failed the MD5 check. I burned it to a DVD+RW anyway, trying to be optimistic, but it failed a CRC check while untarring something. Oh well; I'll keep an eye on it and try downloading it again some other time. It's based on Kubuntu and integrated MythTV for PVR functionality. I've run a Myth box before but had some stability issues with it, so I'll be curious to see if things have gotten any better.<br /><br />The new <a href="http://fiire.com/fiire-chief.html" rel="self">Fiire Chief</a> gyroscopic remote control from Fiire that's featured in the video looks like a winner, but at $149 it's a bit out of my mad-money range for right now.<br /><br /><img class="image-center" alt="Fiire Chief picture" src="http://shop.polywell.com/fiire/images/fiire_chief_square_300.jpg"/><br />]]></content:encoded></item><item><title>Correct dates on Flickr photos</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-17T13:41:54-04:00</dc:date><link>/weblog/files/flickrdates.html#unique-entry-id-13</link><guid isPermaLink="true">/weblog/files/flickrdates.html#unique-entry-id-13</guid><content:encoded><![CDATA[When I drank the <a href="http://www.flickr.com" rel="self">Flickr</a> cool-aid, I had to move all of my pictures from my home-grown Perl/CGI webserver setup. They uploaded to Flickr just fine, but quite a few of them had incorrect dates due to incorrect or missing EXIF information. Fortunately I had all of the image files named in the <code>YYMMDD_n.JPG</code> format, so I knew there had to be a way to fix their dates programmatically.<br /><br />Starting from the <a href="http://pastie.textmate.org/86951" rel="self">python script </a>I had previously written to archive my photo tagging information (see <a href="/weblog/files/flickrphotoinfo.html" rel="self" title="weblog:Backing up your Flickr photo info">this post</a>), I just had to add a function that used a regular expression to parse the date information out of the photos' filenames and call <code>photos.set_Data</code> in the Flickr API. The function is up on <a href="http://pastie.textmate.org/88925" rel="self">TextMate's pastie site</a> for those interested.]]></content:encoded></item><item><title>iPhoto 7 first impressions</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-12T10:37:06-04:00</dc:date><link>/weblog/files/iphoto7firstimpressions.html#unique-entry-id-12</link><guid isPermaLink="true">/weblog/files/iphoto7firstimpressions.html#unique-entry-id-12</guid><content:encoded><![CDATA[My iLife '08 family pack arrived yesterday and I eagerly installed it on the G4 PowerMac (yes, it refuses to install the new iMovie on a G4, but that's for another day) and on my MacBook. I downloaded the iPhoto 7.0.1 update and started it up. It said it need to update my library and the process took hardly any time at all, in spite of being on the G4 and there being about 5000 pictures in the library.<br /><br /><span class="blog-entry-sectionhead">Events</span><br />When the main window appeared I was presented with a surprisingly small number of the much-touted Events. On closer inspection it seems that Events, at least from an upgrade, are pretty-much synonymous with the old Rolls, albeit given equal billing with Photos in the sidebar and a very pretty facelift. This was a little disappointing. I had understood that events were created based on their date taken, not the date they were imported into iPhoto (who cares about that date). I often batch import several days worth of pictures. Of course iPhoto will let you split an event, but the whole point of Steve's pitch was that you didn't have to do it manually. What made this more disappointing was the 3000 or so pictures I imported when I switched; these all showed up as 1 event spanning multiple years.<br /><br />Since I didn't feel like splitting that mega-event up, I decided to create events from the albums I had created. This proved to be a little clumsy, but perhaps I just didn't find the simplest way to do it.<br /><br />For each album, I:<br /><ol class="arabic-numbers"><li>Selected the album in the side bar.</li><li>Selected all the photos.</li><li>Picked Create Event... from the Events menu.</li><li>Accepted the warning about photos only being in one event at a time. (which can silence after the first time)</li></ol><br />This created an event. I could tell because the count after "Events" in the sidebar went up by one, but it left me with my pictures selected back in the album. I then had to:<br /><ol class="arabic-numbers"><li>Click Events in the sidebar.</li><li>Find the new Event (which fortunately was selected).</li><li>Edit the title of the new event and pick my key photo.</li></ol><br />Moving forward this shouldn't be so tedious, but had iPhoto created events based on the date each photo was shot, I think it wouldn't have giving me a better starting point.<br /><br /><span class="blog-entry-sectionhead">Tags</span><br />I use the excellent <a href="http://connectedflow.com/flickrexport/iphoto/" rel="self">FlickrExporter</a> to public my photos to my Flickr account (Fraser has updated it to use the new official Apple API in iPhoto 7 by the way). One of the many nice things about FlickrExporter is that it turns iPhoto keywords into Flickr tags. However, getting keywords added to photos in iPhoto 6 was a pretty tortuous experience; or it was until I discovered Ken Ferry's <a href="http://homepage.mac.com/kenferry/software.html#KeywordAssistant" rel="self">Keyword Assistant</a>. With Keyword Assitant I just wouldn't have been able to contemplate keeping my tagging up-to-date. A few days ago, Ken posted on the Keyword Assistant <a href="http://homepage.mac.com/kenferry/Software/KeywordAssistant/rss.xml" rel="self">blog</a>:<br /><blockquote><p>I'm happy to report that I won't be updating Keyword Assistant for iLife '08 for one reason: The native keyword interface in iPhoto 7 is good enough that Keyword Assistant is unnecessary! You can enter keywords by typing, the keywords autocomplete, use of a non-existent keyword will implicitly create it, and you can assign keywords for an entire album without using the mouse.</p></blockquote>And boy was he right. If you enable viewing of keywords in iPhoto 7, you can simply click in the space where the keywords are (or would be if there aren't any yet) and start typing. And I mean right under the photo in the main Photos view, not in the information popup in the sidebar. The keywords tab-complete, and you can use comma to accept one and start adding another, just like Mail does with contacts when you're addressing an email. Same goes for the photo's title: click on it and start typing.<br /><br />Tab takes you to the next photo's title; tab again and you're at that photo's keywords. You can create new keywords inline and it doesn't say boo. Very very nice.<br /><br /><span class="blog-entry-sectionhead">iPhoto Library a package</span><br />The <code>iPhoto Library</code> folder under <code>/Users/username/Photos</code> is now a package (so you have to right- or Ctrl-click on it and select Show Package Contents to get to your photos. iPhoto never really did like you poking about under its hood; I guess Apple want to make that even clearer with version 7.<br /><br /><span class="blog-entry-sectionhead">Web Gallery</span><br />Now that .Mac accounts have been bumped to a health 10GB, I decided to give the new Web Gallery feature a go. Creating a Web Gallery album was straightforward and they look nice in the browser. I did noticed that in Firefox, the slideshow option's fade doesn't work: each picture flashes off and on alarmingly during the transition to the next one. In Safari 3 Beta 3.0.3 when the new picture fades it, the old pictures shows once then disappears. I didn't noticed either of these quirks with Safari 2.<br />Minor browser quirks aside, the new Web Gallery looks great. The drag-to-see-the-pictures-inside feature of events  in iPhoto also works in the Web Gallery, and the thumbnail size slider too is straight out of iPhoto. Apple did a nice job here. I expect I will stick to using Flickr, but for others who don't feel the need to post every single photo of their kid for others to 'enjoy', Web Gallery looks like it will be just the ticket.]]></content:encoded></item><item><title>Backing up your Flickr photo info</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-12T02:27:11-04:00</dc:date><link>/weblog/files/flickrphotoinfo.html#unique-entry-id-11</link><guid isPermaLink="true">/weblog/files/flickrphotoinfo.html#unique-entry-id-11</guid><content:encoded><![CDATA[I gave up on my Perl/CGI scripted website for my kids' photos a couple of years back and moved them lock, stock and barrel to Flickr. It's a great service and I'm very happy with it. My initial upload was more than a thousand pictures, but I wanted to start out the right way so I tagged them all with people's names and so on. As you can imagine, this was pretty tedious, so I decided I would try and make sure I would never have to do that again. I did some digging around and came across the <a href="http://www.flickr.com/services/" rel="self">Flickr API</a>. The authentication mechanism is a trifle cumbersome but some kind soul had already gone through the pain and posted a CC-licensed Python script that did most of the work. I messed around for a little bit and ended up with a little Python script that downloads an XML file for each photo in my photostream. The XML file contains all the metadata for the photo, including its title, description, tags, dates taken and posted. I run this script every week or so and it grabs the data for the pictures I've posted since the last time I ran it. This way I have all my photos' metadata in a parse-able form, so if Flickr should ever go away I can write something to parse the files and import them to whomever at that time.<br /><br />I <a href="http://pastie.textmate.org/175044" rel="self">posted the script</a> via TextMate's excellent Pastie service, in case anyone is interested. I had to strip out my Flickr API key and its shared secret (which you need in order to access the Flickr API) for obvious reasons, but it's simple enough to <a href="http://www.flickr.com/services/api/keys/apply/" rel="self">get your own from Flickr</a>.<br /><br />UPDATE April 3rd, 2008:<br />I had to update the script to pass the authorization token when looking up your username as it started returning "failed to find user". The updated script is linked above.]]></content:encoded></item><item><title>PayPal Security Key</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-12T00:51:00-04:00</dc:date><link>/weblog/files/securitykey.html#unique-entry-id-10</link><guid isPermaLink="true">/weblog/files/securitykey.html#unique-entry-id-10</guid><content:encoded><![CDATA[I received my PayPal security key a couple of days ago. It's a device that generates a different 6-digit PIN every 30 seconds. Once activated on PayPal and/or eBay you have to append these 6 digits to your regular password. If you don't, it will ask you for the PIN once you've entered your password. According to the Director of Account Protections at PayPal, who was interviewed on a <a href="http://www.twit.tv/sn103" rel="self">recent episode of Security Now</a>, this is part of Verisign's VIP network, which is to include banks and such. So you should be able to use the same security key for your online banking, rather than ending up with a pocketful of dongles.<br /><br /><img class="imageStyle" alt="PayPal Security Code Page" src="/weblog/files/paypal_security_code_page.jpg" width="465" height="273" /><br /><br />The key worked for me to begin with, but then today both eBay and PayPal started rejecting the PIN I entered. Finally, PayPal made me go through the setup process again, to resync the server to the key's internal clock. Hopefully that won't happen too often. I also tried out the "I don't have my Security Key" option, and it just made me answer the usual security questions, so I'm not sure how much more secure the key is really making my account, but it's an interesting development nonetheless.]]></content:encoded></item><item><title>.Mac Storage Increase</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-11T11:57:49-04:00</dc:date><link>/weblog/files/dotmacstorage.html#unique-entry-id-9</link><guid isPermaLink="true">/weblog/files/dotmacstorage.html#unique-entry-id-9</guid><content:encoded><![CDATA[Apple has made good on its <a href="http://events.apple.com.edgesuite.net/r27842e/event/index.html?test=q1wa2sz3x" rel="self">promise</a> to bump .Mac accounts from 1GB to 10GB:<br /><br /><img class="imageStyle" alt="" src="/weblog/files/page1_blog_entry9_1.png" width="361" height="286" /><br /><br />Maybe I will be able to do something with it other than syncing my Keychains and Address Book now. I use <a href="http://flickr.com/photos/finsprings" rel="self">Flickr</a> for sharing my photographs, but the new iLife '08 Web Gallery might be useful for sharing movies (I've never had much luck with YouTube: it always seems to end up mangling my videos too much).]]></content:encoded></item><item><title>ZX81 Nostalgia</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-09T00:18:01-04:00</dc:date><link>/weblog/files/nostalgia.html#unique-entry-id-8</link><guid isPermaLink="true">/weblog/files/nostalgia.html#unique-entry-id-8</guid><content:encoded><![CDATA[I happened upon my Timex Sinclair 1000 the other day,  while looking for something in the cupboard. I bought it a few years back on eBay because my very first computer as a kid was a Sinclair ZX81. The T1000 is basically the same but has 2K of RAM instead of 1K. I plugged it in and it still seems to be working just fine.<br /><br /><img class="imageStyle" alt="IMG_0911" src="/weblog/files/img_0911.jpg" width="768" height="576" /><br /><br />It's been an awfully long time since I've coded in Sinclair BASIC but I threw something quick together:<br /><br /><img class="imageStyle" alt="IMG_0912" src="/weblog/files/img_0912.jpg" width="480" height="640" /><br /><br />and behold its graphic prowess:<br /><br /><img class="imageStyle" alt="IMG_0910" src="/weblog/files/img_0910.jpg" width="768" height="576" />]]></content:encoded></item><item><title>irony is...</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2007-08-09T00:07:19-04:00</dc:date><link>/weblog/files/ironyis.html#unique-entry-id-7</link><guid isPermaLink="true">/weblog/files/ironyis.html#unique-entry-id-7</guid><content:encoded><![CDATA[...wearing your EFF t-shirt on the day you happen to get a meritorious award for a patent disclosure.]]></content:encoded></item><item><title>del.icio.us extension in Firefox 2.0</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2006-10-24T21:58:56-04:00</dc:date><link>/weblog/files/firefoxdelicious.html#unique-entry-id-6</link><guid isPermaLink="true">/weblog/files/firefoxdelicious.html#unique-entry-id-6</guid><content:encoded><![CDATA[The official del.icio.us <strong>1.1</strong> extensions for Firefox doesn't work with the about-to-be-released Firefox 2.0. Fortunately it just takes a quick tweak to get it going:<br /><ol><br />	<li>Go to your Firefox <code>profile</code> directory and then to its <code>extensions</code> subdirectory. </li><br />	<li>Do a find for <code>del.icio.us.jar</code>. It should be in the <code>chrome</code> subdirectory of some distinctly unspellable directory.</li><br />	<li>Go to the directory above that <code>chrome</code> one. There should be a file called <code>install.rdf</code>.</li><br />	<li>Open that file in your favourite text editor. If it's the correct one it should say <code>em:name="del.icio.us"</code> somewhere in the file.</li><br />	<li>Assuming you found the correct file, change the line that reads <strong><code>em:maxVersion="1.5.0.*" /&gt;</code></strong> so that it reads <strong><code>em:maxVersion="2.*" /&gt;</code> </strong>instead.</li><br />	<li>Restart Firefox 2.0 and your del.icio.us extension should be working again.</li><br /></ol><br /><br /><br /><strong>UPDATE:</strong>I've heard that at least one person wasn't able to get this workaround to work. I'm not sure why that would be; perhaps the person has an older version of the extension. I know that on my work PC I didn't get Firefox 2.0 closed down all the way the first time I tried it, so the extension was disabled. When I closed down properly it worked as expected, just like it did on the other computers I've done it on. <br /><br />Also, it doesn't matter whether you do this before or after you install Firefox 2.0. You're just changing one line in a configuration file, so the only thing to make sure is that Firefox is exited fully before trying again. If your del.icio.us buttons or menu don't appear then go back to <code>Tools\Add Ons</code> and you'll probably see the extension is still disabled.<br /><br /><strong>UPDATE:</strong>Version 1.2 of the del.icio.us extension is out now and Firefox 2.0 should update it for you. This post may still be useful for other extensions that haven't been updated, but is otherwise moot.]]></content:encoded></item><item><title>Vista RC1 in a VM</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2006-09-16T20:11:09-04:00</dc:date><link>/weblog/files/vistarc1vm.html#unique-entry-id-5</link><guid isPermaLink="true">/weblog/files/vistarc1vm.html#unique-entry-id-5</guid><content:encoded><![CDATA[I got Vista RC1 running with a VMWare Workstation 5.5 virtual machine today. The graphical install doesn't work with VMWare out of the box (it sticks on the initial "loading files" screen).<br /><br />Fortunately echelon9 posted a <a href="http://www.vmware.com/community/thread.jspa?messageID=467411">workaround </a> on the VMWare forums.<br /><br /><ol><br /><li>Stop the virtual machine.</li><br /><li>Edit the virtual machine's VMX file to include the lines (bottom of the file is fine):<br /><pre><code>svga.maxWidth = "640"<br />svga.maxHeight = "480"</code></pre><br /></li><br /><li>Start the virtual machine. It will be stuck in VGA mode and the colors are limited so it won't look too hot, but the install should proceed just fine.</li><br /><li>Once your VM is booted into Vista, install VMWare Tools from the VM menu.</li><br /><li>Stop the virtual machine and remove the two lines from the VMX that you added earlier.</li><br /><li>Start the VM back up and you should be able to go into the Control Panel and change the resolution to something more usable.</li><br /></ol><br /><br />Once you've done all that you can do the next most important thing:<br /><br /><a href="http://www.flickr.com/photos/finsprings/244288012/" title="Photo Sharing"><img src="http://static.flickr.com/90/244288012_3edf9f803f.jpg" width="465" height="372" alt="vistafox" /></a><br />]]></content:encoded></item><item><title>greasemonkeying my backpack</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2006-09-03T23:43:37-04:00</dc:date><link>/weblog/files/greasemonkeybackpack.html#unique-entry-id-4</link><guid isPermaLink="true">/weblog/files/greasemonkeybackpack.html#unique-entry-id-4</guid><content:encoded><![CDATA[For a while now I've been maintaining a <a href="http://running.davidfindlay.org/" title="Dave's Running Log">running log</a> on a <a href="http://backpackit.com/?referrer=BPJ7ZL9" title="Backpack">Backpack </a>page. I like Backpack because it's quick and convenient to use. However, for my running log I could really use a little bit of spreadsheet functionality, to sum the miles I've run in a given month for me, and that's just not Backpack's bag (pardon the pun).<br /><br />So, since I'm reading <a href="http://www.manning.com/crane/" title="Ajax in Action">Ajax in Action</a> at the moment, it seemed like a good time to play a little bit with JavaScript and <a href="http://greasemonkey.mozdev.org/" title="greasemonkey">greasemonkey</a>. If you're not familiar with it, greasemonkey is a Firefox extension that allows you to apply custom JavaScript to webpages. You install scripts that you write or download, into greasemonkey. You then tell it, via one or more regular expressions, which pages the scripts should be applied to. I use a few greasemonkey scripts already, for viewing images (<a href="http://shiftingpixel.com/lightbox">Greased Lightbox</a>), tweaking Flickr's interface, and so on.<br /><br />So I decided I would write my own greasemonkey script to do all that bothersome addition for me on my running log. After a few false starts, caused by me trying to use <a href="http://www.joehewitt.com/software/firebug/">FireBug</a>'s console for logging, which isn't exposed in greasemonkey, I got it to work:<br /><br /><a href="http://www.flickr.com/photos/finsprings/233135324/" title="Photo Sharing"><img src="http://static.flickr.com/83/233135324_608390f864_o.png" alt="greasemonkeybackpack" height="405" width="313" /></a><br /><br />The text in green at the bottom is generated by the script (the total above it in black is my previous hard-coded one). The script isn't done yet; for one it has next to no error handling. Also, because of the ajax nature of Backpack, my totals get lost whenever I edit the page, forcing me to do a full page refresh to get them back. So, I might add a keyboard shortcut to turn the totals on and off next.<br /><br />FWIW, <a href="http://pastie.org/269080" rel="self">here</a>'s the script in all its "glory". Try not to laugh at my JavaScript skills or lack thereof.<br />]]></content:encoded></item><item><title>lifehacker</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2006-09-02T19:27:00-04:00</dc:date><link>/weblog/files/lifehacker.html#unique-entry-id-3</link><guid isPermaLink="true">/weblog/files/lifehacker.html#unique-entry-id-3</guid><content:encoded><![CDATA[If you haven't come across it before, <a href="http://lifehacker.com">lifehacker</a> is an excellent resource for general computing news, GTD, Web 2.0 and general hints and tips. They recently posted a little <a href="http://lifehacker.com/software/defragment/download-of-the-day--contig-file-defrag-windows-196302.html" title="Contig">tip</a> I sent them about Sysinternal's excellent <a href="http://www.sysinternals.com/Utilities/Contig.html">contig </a>utility.]]></content:encoded></item><item><title>MEDC 2006</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2006-05-13T20:12:00-04:00</dc:date><link>/weblog/files/medc2006.html#unique-entry-id-2</link><guid isPermaLink="true">/weblog/files/medc2006.html#unique-entry-id-2</guid><content:encoded><![CDATA[I just got back from Microsoft&#39;s Mobile and Embedded DevCon. It was hosted at The Venetian in Las Vegas. On Tuesday night they had Tao, this nightclub in the hotel, reserved exclusively for MEDC; it must have been the largest nerd conglomeration in a nightclub ever! We entered the SumoRobot challenge, where we had to program the AI in a Parallax SumoRobot modified to use the new .NET Micro Framework. I lost one of the IR sensors on the way into the ring and the poor robot was never the same after that.<br /><br />Oh well. So CE6 looks like it will be very interesting. We got betas of it and the big news is they&#39;ve ditched the 32/32 limit of past CEs (up to 32 processes each with a 32Mb &#39;slot&#39; of virtual address space); in CE6 <b>each </b>process gets its own 2Gb of virtual address space and up to 32k processes can be running simultaneously. Addressing of physical RAM is still limited to 512Mb, but DLLs now go in a shared 512Mb region of virtual address space, instead of eating from the 32Mb ceiling on down like before. That should mean worrying about DLL crunch when developing applications for PPC/WM is a thing of the past, at least for a little while.<br /><br />On the whole I was glad I went. Most of the sessions were enlightening to one degree or another, although there were a couple of nightmares. One session included the pearl of wisdom &quot;the emulator is good for emulating things&quot;. Boy, I&#39;m glad my manager was at that one instead of me.]]></content:encoded></item><item><title>MiniPOV</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2006-05-02T19:00:00-04:00</dc:date><link>/weblog/files/minipov.html#unique-entry-id-1</link><guid isPermaLink="true">/weblog/files/minipov.html#unique-entry-id-1</guid><content:encoded><![CDATA[<a href="http://www.flickr.com/photos/finsprings/138780729/" title="Photo Sharing"><img src="http://static.flickr.com/48/138780729_41cdb7f7ed.jpg" alt="minipov2" height="356" width="465" /></a><br /><br />I hadn&#39;t touched a soldering iron in years, but reading <a href="http://makezine.com" title="Make Magazine" target="_blank">Make Magazine</a> inspired me to pick one up and start playing again. I read an article about this persistence-of-vision kit. It uses an Atmel ATtiny2313 Microcontroller to cycle a bank of 8 LEDs through a pattern at about 400Hz. When you waggle the board from left to right, the persistence of your vision causes you to be able to read the message encoded therein. The <a href="http://ladyada.net/make/minipov2/make.html" title="MiniPOV V2" target="_blank">kit</a> is from Lady Ada, and I highly recommend it if you&#39;re new (or really rusty like me) at the old electronics game. It was cheap, fun and quick to build, and it didn&#39;t need any expensive tools. It is also reprogrammable, so you can tweak the C code, with free tools, and update the firmware from the parallel port of your computer. Not only that, but once you&#39;re bored of the POV thing, you can reprogram the microcontroller to do something else.]]></content:encoded></item><item><title>Gmail for your domain</title><dc:creator>David Findlay</dc:creator><dc:subject>web log</dc:subject><dc:date>2006-04-26T20:33:28-04:00</dc:date><link>/weblog/files/googledomain.html#unique-entry-id-0</link><guid isPermaLink="true">/weblog/files/googledomain.html#unique-entry-id-0</guid><content:encoded><![CDATA[Google recently began offering a beta of a service where they host email for your domain with their Gmail technology. I set up a few of the domains I manage and I have to say I&#39;m very pleased so far.<br /><br />You can sign up for the beta at <a href="https://www.google.com/hosted">https://www.google.com/hosted</a>]]></content:encoded></item></channel>
</rss>