Posted by & filed under Open Source.

I’ve done some more work on the enclosure today, thanks to the wide variety of tools provided by the All Hands Active hackerspace in downtown Ann Arbor. A lot of people have been questioning the case I’m building for the Raspberry Pi, since it is so much bigger than the unit itself. I think these pictures should start to show what I have in mind; basically I want to stick certain hardware into the enclosure with the Pi, and then use extenders to get some of the ports available externally (like the RJ-45 in the pictures). I have a feeling the lack of an HDMI port may bite me in the ass in the future, but for now, none of my plans involve video.

So far, all of the modifications to the case have been done using a file. There are better tools to use for this (like a band saw) but I guess I’m just old fashioned. You can’t see it in the gallery, but I’ve also got an audio jack soldered to a speaker now. Some of my plans involve TTS so that the machine can tell you what it is doing.

I still need to get a GPS receiver into this unit, as well as a bluetooth dongle, which will require a USB hub. If the hub requires power, I’ll probably have to get two power sources into the device, which won’t be pretty. Wish me luck!

Posted by & filed under Open Source.

This is a duplicate of the same post at NeoInvoice.com, since that site will be gone soon.

Good news for those of you who would like a large application to tear apart! The Flippa Auction has ended without any bids, and I will be open sourcing NeoInvoice in the next few days. This would theoretically be bad news for our active users, but honestly, NeoInvoice doesn’t have any.

I started NeoInvoice back in late 2009 or early 2010 while needing some invoicing / time tracking to keep track of what I was doing for my clients. The smart thing to do would have been to search for some online software which does exactly what I need. Goodness knows that these apps do exist, here is a small list of this very crowded space:

  • http://www.freshbooks.com
  • http://www.blinksale.com
  • http://www.invoicemachine.com
  • http://www.lessaccounting.com
  • http://www.billingorchard.com
  • http://www.getcashboard.com
  • http://www.billmyclients.com
  • http://www.invoicesmadeeasy.com
  • http://www.invoiceplace.com/invoice
  • http://www.invotrak.com
  • http://www.simplybill.com
  • http://www.time59.com
  • http://www.getharvest.com
  • http://www.getballpark.com
  • http://www.invoice2go.com
  • http://www.bill4time.com
  • http://www.invoicebus.com

But, as you can probably tell, I never did look for this sort of software. I instead did the crazy thing and built software from scratch which did everything I needed it to; time tracking, invoicing, issue tracking, email PDF invoices, you name it! I also completely failed to market the project. Like, I did the worst job anyone could ever do, even for a programmer.

Don’t get me wrong. I don’t regret having built this application. For the longest time I knew I had a lot of PHP development skill, but unfortunately I never had any projects worth mentioning. After building this project, it went straight to the top of my Resume. And I credit this to a lot of things, namely my career at Quicken Loans, as well as my entry into Y Combinator. Not to mention all of the skill I learned while building the project.

NeoInvoice is built using CodeIgniter 1.7.2, as well as an open source AJAX framework named MochaUI, which is based on MooTools. Without having built NeoInvoice, I never would have realized how much I dislike both of these technologies. NeoInvoice also makes use of some PHP 5.3 features, a tweaked lighttpd server, MySQL, and Memcache. I was able to learn a lot about these technologies thanks to NeoInvoice.

I also prematurely optimized the website by pointing a hundred web browsers to the main AJAX page and having them all reload the site every 5 seconds for an hour, followed by tweaking the code and caching over and over until it held up. This results in 7 PHP script executions per request, which is about 140 per second. The site was able to hold up to the abuse, even on the cheapest shared hosting I could find, which means the site should be able to handle perhaps a thousand concurrent normal users.

At the time of writing this, the repo is not yet public. In a few days, after I’ve made sure no user data is in the repo, recorded a video showing all of the features of the website, and killed the live site, it will be available. The URL will end up being https://github.com/tlhunter/neoinvoice. You can bookmark that URL or keep an eye on my GitHub user account, tlhunter.

The site has around 11,000 LOC written for it (so none of the framework code is counted in that) including PHP, JavaScript, MySQL, CSS.

Posted by & filed under Uncategorized.

This great article, entitled “The care and feeding of software engineers“, does a pretty good job talking about us software engineers and why we do the things we do.

The article quotes a tweet by Mark Berry, which does a good job of summing up burn-out:

I can’t state this enough: Programmers don’t burn out on hard work, they burn out on change-with-the-wind directives and not ‘shipping’. — @markab

It is a long read, but worth it if you interface with software engineers for your career (or even if you have one as a partner).

Posted by & filed under OS X.

Here’s a hard to find utility in OS X for working with wireless:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

The utility provides a lot of functionality normally provided by the wireless-tools packages on Linux, such as iwconfig, iwlist, etc. Here’s the –help listing of the utility:

$ airport --help
Supported arguments:
 -c[]      --channel=[]         Set arbitrary channel on the card
 -z        --disassociate       Disassociate from any network
 -I        --getinfo            Print current wireless status, e.g. signal info, BSSID, port type etc.
 -s[]      --scan=[]            Perform a wireless broadcast scan.
                                Will perform a directed scan if the optional  is provided
 -x        --xml                Print info as XML
 -P        --psk                Create PSK from specified pass phrase and SSID.
				The following additional arguments must be specified with this command:
                                --password=  Specify a WPA password
                                --ssid=      Specify SSID when creating a PSK
 -h        --help               Show this help

Unfortunately, the output of the commands are disimilar, so if you’re parsing the output of the command (like I am), you’ll need to rebuild your parser.

Also, there is an XML output option, but it uses the goofy Apple dictionary format where keys and values are siblings and maintain no sort of logical relationship. So, it may be easier to parse than the raw output, but you’ll probably have to do some gross hacking to get it to work. Does anyone know of a clean way to parse “plist” xml?

Posted by & filed under Linux.

With my Raspberry Pi project, it has been using DHCP to get an IP address, and my network keeps assigning a different value (I know there are solutions to this but I haven’t made use of them yet). So, I went ahead and installed nmap using the homebrew package manager for OS X:

$ brew install nmap

And now, I can scan the local network to see what devices are up:

$ sudo nmap -sP 192.168.1.1-254

Starting Nmap 6.00 ( http://nmap.org ) at 2012-06-10 10:12 EDT
Nmap scan report for 192.168.1.1
Host is up (0.0041s latency).
MAC Address: B8:8D:12:5A:00:00 (Apple)
Nmap scan report for 192.168.1.2
Host is up (0.0039s latency).
MAC Address: E8:E0:B7:17:00:00 (Toshiba)
Nmap scan report for 192.168.1.6
Host is up (0.32s latency).
MAC Address: B8:27:EB:4C:00:00 (Raspberry Pi Foundation)
Nmap done: 254 IP addresses (3 hosts up) scanned in 5.46 second

The better solution would be to have the device use a static IP address (or even cooler, add a tiny LCD screen to show the current IP address :D).

Posted by & filed under Reviews.

All of the links in this post goes to the relevant Amazon product, in case you want to purchase the same hardware.

Here’s some pictures of my Raspberry Pi enclosure. It is basically a hard drive enclosure which I drilled and filed down. You can get a similar enclosure from Amazon, however that version doesn’t have all of the holes like mine does (which might make it a little harder to drill out).

In the first picture, you can see where I added the WiFi antenna. Basically, I made sure the USB wireless card was flush against the bottom of the enclosure, figured out where the antenna aligned, and drilled it out with a bit slightly larger than the threading. It made for a pretty solid hold.

In the remaining pictures, you can see how I made room for the SHDC card, as well as the USB port for charging the device. Beneath the Raspberry Pi, there is a sheet of acrylic plastic I cutout so that the board wouldn’t short out with the aluminum enclosure. I kinda half assed it so far; it is simply held down with electrical tape. I also put another, smaller, piece of acrylic on the end farthest away form the SD card, so that the board would sit flat (that SD slot is about the same thickness as the acrylic).

Unfortunately, the Raspberry Pi doesn’t have any screw holes, so I can’t securely mount the board. For now it is floating around, and as soon as the USB cord is removed the device starts to bounce around the enclosure. I’m probably going to throw some double sided tape in there to hold it down.

I have two USB male/female cords, and an unpowered USB hub. I’m not sure which combo I’ll end up using quite yet. You can see a USB Bluetooth dongle in the pictures, but it needs to be on the outside of the case for it to function properly. This could be easily done by putting the female end of the cord flush against one of the enclosure holes and plugging it in from the outside. If I end up adding additional devices (like a USB GPS device) I’ll definitely need to use the hub.

Posted by & filed under Reviews.

This is a review of the FM Transmitter (CZH-05B) which I recently purchased from amazon. It had been on the site for about $100 for a while, but a few days ago it dropped to around $60 bucks, so I jumped on it. The device is capable of transmitting at either 0.1 Watts, or 0.5 Watts, where the latter apparently has a range of one mile (I haven’t tested this yet though).

The device itself is pretty fragile. If you plug in a mono-microphone into the mic jack, it will break your device. If you turn it on without an antenna, it will break your device. The antenna on the back does not stay upright, it will fall over on its own. The print on the device looks quite cheap; it’s easy to tell this came from some factory in china.

These setbacks aside, the device seems to run pretty good. The sound quality sounded quite nice.

There are two modes, which are toggled using the power button. The station select mode lets you set a station, and shows an icon of a speaker with a slash through it. During this time the transmitter is not transmitting. Once you set it to transmit mode, you can no longer select a station, but your audio is being transmitted. This is so that you aren’t scrolling through all the stations and destroying all of the signals.

This device lets you transmit on the non standard FM stations (e.g. stations ending in an even decimal number). Some modern radios allow you to pickup these semi-hidden stations. I believe the stations were done like this because signals would bleed out to the neighboring stations, e.g. 100.2 would pick up 100.1 and 100.3.

Warning: Make sure you check with local laws. Depending on how you use it, this thing could be illegal. Make sure you are not broadcasting over top of other stations. If anyone ever complains, stop using the device immediately. Basically; don’t be a dick.