Sunday, July 20, 2014

Building new Raspberry Pi Model B+

Buying the Raspberry Pi Model B+

I ordered the 512MB Raspberry Pi Model B+ Project Board on 7/14/2014, I was lucky somehow I got free shipping code by default, otherwise it cost $9.99 to ship to California with their "Super Saver Shipping" option.  I got the package on the 19th in a padded brown envelope.

Unpacking the Raspberry Pi Model B+

Building my case with spare LEGO

Install NOOBS on SD

Getting Started with NOOBS

Hooking it up

  • Keyboard (Dusty DELL generic 101-keyboard>
  • Power supply (Apple iPhone/iPod power supply fit the requirement*)
  • Micro USB cable as power cable
  • Ethernet cable
  • HDMI cable
  • Micro SD card (8GB+)
* Power supply rated at 5V dc, and a minim current of 600-1800mA.

Turn it on the first time

Raspberry Pi Software Configuration Tool (raspi-config) will be launched automatically after the first boot. It can be launched manually by the command

sudo raspi-config

Change Local

4 > I1 > en_US.UTF-8 UTF-8

Change Timezone

4 > I2 > US > Pacific Ocean

Change Keyboard Layout

4 > I3 > Dell 101-key PC > English (US) > default > No compose key > Ctrl+Alt+Backspace = terminate the X server

Set hostname

8 > A2 > [newhostname]

Enable SSH

8 > A4 > <Enable>

Change Password

2 > [new password]

Update

8 > A7

Saturday, July 5, 2014

Hands on compare Go IDEs: Eclipse vs LiteIDE

Trying to start practicing Go, downloaded the latest Go 1.3 and tried to find the best IDE for the job.  I know Go can be written with vi, but it would be difficult for someone using Visual Studio everyday, over 10 years.  Anyway, I google on "Go IDE Comparison" and went with the first result: Comparison of IDEs for Google Go - GeekMonkey.  There were 9 editors but only 2 caught my attention: Eclipse and LiteIDE.  Both IDE has debugger capability and able to run on Mac and PC.

I used LiteIDE on Windows and felt that it was too lite, so I started exploring Eclipse.  Most of my time spent on figuring out how to get the right Java version on my Mac.  I am not a java fan, so I wanted to make the java footprint as small as possible.  I downloaded jre 1.7u60 and 1.8u3, both of them installed properly, but Eclipse failed to start because it could only to find the Apple java 1.6.

$ /usr/libexec/java_home -V only returned "Java SE 6".  It seems like jre only good for running applet on browser.  Then I installed the jdk 1.7 SE, it worked finally, wasted 2 hours of my life.  After starting Eclipse, then I install GoClipse plugin for Go programming, wrote the hello world, started debug, oops ... debug failed, gdb not found.  I had wasted enough time on configuration, move on to LiteIDE.

LiteIDE does not require any runtime environment configuration, it just work out of the box.  I wrote the hello world, it builded and ran fine, then put some break points and tried debug, oops ...  debug failed, gdb not found.  gdb was removed from the new OSX, google and found a detail article on Installing GDB on OS X Mavericks.  Follow the instruction and install gdb from homebrew.  It built but failed to add symbolic link, /usr/local/bin/gdb, permission problem on /usr/local/share/man/man5.  To fix the permisson:

$ sudo chown -R myself /usr/local/share/man/man5
$ brew link gdb
$ sudo chown -R root /usr/local/share/man/man5

Go back to LiteIDE and keep Go-ing.