These things are sexy. I don’t have any yet, but I’ll probably buy one, because I’m shallow like that.
Why Android should switch to Go
I’m sure you’ve heard about the recent situation where Oracle is suing Google for using Java in their Android operating system. Which is pretty ridiculous, since Java’s popularity is supposedly due to it being open source. (This isn’t the first time Oracle has sued someone, btw).
Why did Google pick Java for Android, anyway? There are plenty of nicer languages out there. Google ultimately picked Java because of its popularity and being a systems programming language, meaning it can do some low-level hardcore stuff (like C), while higher level languages (such as JavaScript) don’t have that sort of control (or efficiency). Since Google picked such a popular language, it was easier for new Android developers to write applications.
Android is a very popular mobile platform these days. But, iOS is very close in market share. And you know what language they chose? Objective-C, which is about as proprietary as can be. Nobody uses Objective-C outside of development for Apple products. So, it is reasonably safe to say that Apple chose an unpopular language for its platform; a language controlled and “created” by Apple itself (or, at least NEXTStep, the predecessor of OS X).
Google really needs to pick a different language for Android, a language it will have more control of, a system programming language, where popularity doesn’t matter (as proven by Apple iOS). Google should use Go. From golang.org:
Go is an open source project developed by a team at Google and many contributors from the open source community.
Go is distributed under a BSD-style license.
What more can you ask for? Go is new and doesn’t have a lot of followers yet, but Objective-C wasn’t exactly a favorite among programmers either. Google is the primary developer of Go. Google has control over Go. Go is open source (BSD) and can be used for anything, meaning developers who learn Go can use it wherever they want. Go is a system programming language.
Here’s some more information about Go, e.g., why it was created in the first place:
Go was born out of frustration with existing languages and environments for systems programming. Programming had become too difficult and the choice of languages was partly to blame. One had to choose either efficient compilation, efficient execution, or ease of programming; all three were not available in the same mainstream language. Programmers who could were choosing ease over safety and efficiency by moving to dynamically typed languages such as Python and JavaScript rather than C++ or, to a lesser extent, Java.
Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing. Finally, it is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. To meet these goals required addressing a number of linguistic issues: an expressive but lightweight type system; concurrency and garbage collection; rigid dependency specification; and so on. These cannot be addressed well by libraries or tools; a new language was called for.
Just for kicks, here are some syntax comparisons between the three languages I’ve mentioned:
Hello World in Go:
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
Hello World in Java:
Notice the arbitrary class name, I think the entry point is defined in a manifest file, although I am not sure.
class ArbitraryClassName {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Hello World in Objective-C:
#import <stdio.h>
int main( int argc, const char *argv[] ) {
printf("Hello World!");
return 0;
}
NeoInvoice For Sale
NeoInvoice is for sale on Flippa. If it doesn’t sell within the allotted timeframe, it will be open sourced, and all customer data will be destroyed.
Raspberry Pi SDHC Card
I’m buying the Transcend 8GB Class 10 SDHC Flash Memory Card as it is listed as a compatible SD card.
It is a class 10 card with 8GB of storage, which should make it the perfect device (if you think you need more than 8GB of storage, you should probably be storing data on an external USB drive).
NERF Gun Laser Instructions
Here’s a visual breakdown of my NERF gun. Think of it as instructions on how to build the thing. You’ll need a dremmel and the parts mentioned on this page. That page also has a video of the finished product.
Wireless Scanner Progress
My node-wireless module is getting closer and closer each day! The app now runs continuously, scanning for wireless networks at the specified interval, and reporting new or changed networks.
Here’s some sample output from the running application:
New: xfinityC2 [00:26:F3:66:F7:28] 74% 19:21:45 New: [00:26:F3:66:F7:29] 100% 19:21:45 New: [00:26:F3:66:F7:2A] 100% 19:21:45 New: [00:26:F3:66:F7:2B] 100% 19:21:45 New: PXLink [1C:AF:F7:D8:0C:6B] 74% 19:21:45 New: Holonet [00:19:5B:4F:2C:B3] 64% 19:21:45 New: Home-Data [30:46:9A:96:6F:BA] 88% 19:21:45 New: [00:26:F3:CD:02:3B] 82% 19:21:45 New: linksys [00:12:17:27:5E:AF] 72% 19:21:45 New: [00:26:F3:CD:02:39] 77% 19:21:45 New: [00:26:F3:CD:02:3A] 75% 19:21:45 New: 2WIRE210 [00:24:56:65:00:B1] 72% 19:21:45 New: 2WIRE926 [B0:E7:54:EA:3C:99] 68% 19:21:45 New: HOME-0238 [00:26:F3:CD:02:38] 75% 19:21:45 New: Santh [00:22:75:CA:D6:45] 71% 19:21:45 New: 2WIRE025 [00:26:50:09:E2:F9] 74% 19:21:45 New: Bonnie [00:1E:E5:32:5B:FD] 75% 19:21:45 New: [00:26:F3:51:B2:4A] 68% 19:21:45 New: [00:26:F3:51:B2:4B] 65% 19:21:45 New: 2WIRE005 [98:2C:BE:61:D6:89] 68% 19:21:45 New: HOME-B248 [00:26:F3:51:B2:48] 65% 19:21:45 New: J's Guest Network [66:33:4B:E4:48:B1] 72% 19:21:45 New: 2WIRE043 [34:EF:44:55:A3:A9] 62% 19:21:45 New: RODNEY [00:24:B2:00:F6:3C] 61% 19:21:45 New: TRENDnet [00:14:D1:39:20:F2] 65% 19:21:45 New: [00:02:A8:D2:07:8C] 77% 19:21:55 New: myLGNet078f [00:02:A8:D2:07:8D] 75% 19:21:55 New: [00:26:F3:51:B2:49] 61% 19:21:55 New: 2WIRE827 [00:25:3C:CA:FB:F9] 60% 19:22:5 New: AlexC [08:86:3B:5D:25:5E] 62% 19:22:25 New: 2WIRE108 [64:0F:28:6E:58:69] 64% 19:22:25 New: J's Network [60:33:4B:E4:48:B1] 72% 19:22:35
Permanently Delete Folders and Files from Git History
This is an awesome script I just came across. It allows you to permanently remove files and folders form your git history, and is pretty easy to use.
If you’re like me, and you have some private repo’s that you want to make public, run that command with the folders you want to cleanup. Once that is done, your repo will be different from the remote one, and you’ll need to do a git push –force. If anyone else was using the repo, they’ll want to get rid of their local stuff and do a pull (make sure everyone has pushed their code and you have all the changes before hand).
In my case, I didn’t have other contributors working on this particular project, so it was pretty easy to take care of. In this example, you can see that I needed to delete a bunch of database backups that I had been putting in the code repository (tsk tsk tsk).
tlhunter@amalthea:/Volumes/Server/neoinvoice (master) $ git-remove-history ./resources/database/ ... a ton of output, truncated ... Ref 'refs/heads/master' was rewritten Counting objects: 8280, done. Delta compression using up to 8 threads. Compressing objects: 100% (8138/8138), done. Writing objects: 100% (8280/8280), done. Total 8280 (delta 5024), reused 2323 (delta 0) tlhunter@amalthea:/Volumes/Server/neoinvoice (master) $ git status # On branch master # Your branch and 'origin/master' have diverged, # and have 311 and 311 different commit(s) each, respectively. # nothing to commit (working directory clean) tlhunter@amalthea:/Volumes/Server/neoinvoice (master) $ git push To git@github.com:tlhunter/neoinvoice.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:tlhunter/neoinvoice.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. tlhunter@amalthea:/Volumes/Server/neoinvoice (master) $ git push --force Counting objects: 5262, done. Delta compression using up to 8 threads. Compressing objects: 100% (2019/2019), done. Writing objects: 100% (4672/4672), 25.13 MiB | 250 KiB/s, done. Total 4672 (delta 2851), reused 4231 (delta 2590) To git@github.com:tlhunter/neoinvoice.git + 5f9b896...085a7b9 master -> master (forced update) tlhunter@amalthea:/Volumes/Server/neoinvoice (master) $
Node.js Robotics Software Suite
One thing I’ve been working a lot on lately is my node-wireless Node.js NPM module. This tool, when done, will allow node apps to fully control all aspects of one or many wireless connections. This includes connecting to a network, disconnecting, discovering networks, handling authentication. Everything will be event based, e.g. an event will happen when a network appears or disappears.
Now, you are probably wondering, why would anyone want to use this? Surely, I can just use my network manager to connect to my own wireless.
The purpose of this tool isn’t so that you can manually connect to a network, but so that a computing device which is put into an unknown environment can itself connect to a wireless network automatically!
But, this is just the first tool of many. I plan on building an entire suite of Node.js modules, each handling different aspects of what a computer is capable of doing when interacting with the outside world. Here are some of the other tools I will be building:
- Webcam – Take pictures, video, trigger events on movement, OCR
- Microphone – Listen to audio, dictation?
- Wireless – Detailed above
- Bluetooth – Similar to wireless module
- GPS – Get GPS coordinates, get events when moving a certain threshold
- Audio – Text to speech synthesis, play MP3′s, possibly play streams of audio
- Time – CRON like things
- Compass – Get inputs based on the current direction
- Other – Temperature, altitude, moisture readings, light sensors, motor control
Some more complex stuff I would like to build one day would be battery / solar panel management stuff, where if the system detects it is going to run out of power soon it will shut off a battery and enable a solar panel for recharging it. Other things it would do is establish a connection home and call out for help if need be.
All of the modules I build will be compatible with the ARM processor, so that small robots can be built using the Raspberry Pi (or similar) computer. Node.js itself isn’t tied to any particular platform, but some of these modules will likely require some sort of binary to make them work.
The picture above is going to be a prototype machine I am working on. You can see two of the wireless adapters it will use. Eventually it will contain a Raspberry Pi, a batter, and a bunch of other devices which can interact with the physical world. Later machines will have wheels and look more like toys than a boring box.
M-Audio Studiophile AV 40 Review
My M-Audio Studiophile AV 40′s arrived in the mail from Woot a few days ago and I’ve been using them ever since. These things kick ass, let me tell you. For only $100 they were an amazing deal and I’m glad to finally get rid of my old amp and speakers. With an amp built right into the speakers, these are a great space saver for any music producer or audio aficionado. The Woot sale is long gone, but you can purchase these for a similar price over at Amazon for about $150 (still well worth the price): M-Audio Studiophile AV 40 Powered Speakers
The first thing I should let you know, these aren’t as good as their expensive studio monitor counterparts. But, unless you’re mixing for big bands, you will not notice the difference.
On the front of the speakers are headphones out and a line in, both 1/8″, and a volume knob. Turning the knob all the way down will not power off the speaker, to do that you’ll need to use the switch on the back of the speakers. The device has RCA inputs, and outputs to run to the second speaker on the right. There is also a bass boost switch on the back of the speakers, which seem to contrast with the purpose of the speakers.
In order to get the optimal sound out of these speakers, you’ll want them to be standing vertically, and in a triangle with the position of the two speakers and your head, with the three items being 6 feet apart. If you don’t believe me, go ahead and move these things around, you will notice the difference.
These things also come with a double male 1/8″ pin (for the line in), a wire to the second speaker (of course), and an 1/8″ pin to RCA cable. I thought this was a nice touch, a lot of hardware manufacturers refuse to ship these sort of cables, especially when not all clients would need them. Thanks M-Audio for being awesome!
I do a little bit of music production, though not as much as I used to. These will be replacing my old speakers and will primarily be used for listening to music and for video game audio. So far they do an amazing job. They can get very loud and keep from distorting.
There are a few drawbacks to these speakers, although the drawbacks only apply to someone not using these for audio mastering. The bass isn’t the best on these things (the graph depicting frequency response for these has a big drop off near the bass end). Consumer level speakers do a little bit of internal EQing to boost the bass and treble and dropping the mid’s so that the music sounds a little better, these speakers do not do that. If you leave the speakers on all the time, they will get pretty hot in the back and suck power out of the wall. The power switch is on the back, so they can’t be hidden and forgotten somewhere on your bookshelf.
Conclusion: If you are an audio nut looking for a good deal and who doesn’t mind a little inconvenience in exchange for sound quality, grab these! If you’re a casual listener and don’t plan on doing any music production, there are better speakers out there for you.









