5 reasons to use Coffee Script

So the guys were asking me in the office why one should use Coffee script and the joke on the topic was that I would write down Andre’s 5 reasons to use Coffee script.  So here they are :

  1. Write less code – less is more!
  2. Write better JavaScript code, null checks are built in for you on variables
  3. Conforms coding to a set standard, there should be very little changes
  4. Simple class definitions & lambda expressions
  5. Who doesn’t like caffeine ?

Ok the last one is not a real reason but option 4 is 2 reasons!

You can try coffee script here

 

 

My Mac needed a Keyboard Change

I am really worried right now about getting this back together.
I am really worried right now about getting this back together.
Leatherman file vs aluminium casing.  Leatherman 1, casing 0
Leatherman file vs aluminium casing. Leatherman 1, casing 0
It seems the Mac engineers put in one screw too many.
It seems the Mac engineers put in one screw too many.

So I was wondering what it would take to replace the keyboard on my Macbook Pro, the tab key has been irritating me for a while and hooking on things as the little plastic holders got broken.

A couple of weeks back I ordered a keyboard from China on E-Bay.  Problem was the keyboard I ordered didn’t exactly match my Macbook Pro’s configuration.

I liked the new keyboard so with little deliberation I decided to use my Leatherman to make the adjustments to the aluminium casing.

4 hours later and I have my new keyboard installed and my Macbook is now unique!

Warning:

As you can see the keyboard is working, all the lights are on!
As you can see the keyboard is working, all the lights are on!

I had to screw out more than 60 screws in the process.

Coding with Go

The mascot of GO is a little freaky creature!!!

So I have just reinstalled my Windows 8.1 system and was beginning to do some testing of Python and I stumbled on the Go language.  It

has been a while since something has tweaked my curiosity so.

And here for my benefit and those of you who would also like the full experience is a short tutorial of how to get started.

First off, download the git installer for Windows, it is useful for getting access to the source code with Go and is a must have on a cleanly installed machine.  Make sure you install the run git from the command line option for the best results.

http://git-scm.com/download/win

Secondly you should get hold of the GCC compiler, in order to do the more advanced stuff with Go you need a compiler. I struggled a bit with this one as I seemed to only get to download source code at first.

http://ufpr.dl.sourceforge.net/project/mingwbuilds/mingw-builds-install/mingw-builds-install.exe

The builds installer sorted that for me, make sure you choose the correct options for your windows installation, if you are not sure choose the win32 option.  I also chose where I wanted to install my compiler so that I could add it to my PATH variable in windows.

The Go installer worked quite easily and I only had to add a variable for the GOPATH in my environment variables which in my case pointed to c:\Go\bin

http://go.googlecode.com/files/go1.2.1.windows-amd64.msi

The next bit was easy, create a go file helloworld.go and write your first bit of code for the hello world example:

package main
import “fmt”
func main() {
fmt.Println(“hello world!”)
}

And then going to commandline and running it with:

go run helloworld.go

That’s it for now, enjoy the coding!

 

 

 

 

 

The Boys and Radio Etiquette

Andre with a catfish
Me with a catfish which I caught with my bare hands!!!

Wow, I didn’t know I could spell etiquette properly, in fact I misspelt the word by adding an extra “t” after the “e” on the first attempt.  Liam and Jayden got some 2 way radios as a gift and so it became apparent that they needed to learn some radio etiquette.

Just for fun here are some of the basic pro words:

SEND: “Receiving you loud and clear, Send!” – I’m hearing you, give me the rest of the message.
OVER: “Can you hear me?, Over!” – End of your current Message
OUT: “Ok speak tomorrow, Out!” – End of Transmission.
ROGER,COPY: Simple acknowledgement of receiving a message.
WILCO: I will comply, to be used instead of “Roger” and meaning that what ever instruction was given will be carried out.
AFFIRMATIVE:”Going to the movies tomorrow is Affirmative!”
NEGATIVE:”My HIV test was Negative!”
LOUD AND CLEAR: See the above sample in Send.
BROKEN AND UNREADABLE: Probably means you should check your batteries or distance or signal strength, or you are standing behind a large tree or all of the above.

And that is it in a nutshell, radio communication 101!

The Drop

Frank looked up into the dark smoggy sky, the drop would happen any minute now.  He shivered, even in the thermal layering of his body suit.  To think five years ago he wouldn’t of had to wear a suit, since then the pollution and radiation had been growing steadily worse.

Squinting through the haze he could see the other waiting vehicles.  Every man on his team knew what had to be done to secure the package.  It wasn’t the first time they would be risking their freedom for the operation.  Most of the guys held down legitimate day jobs below surface at the government production yards and factories. Frank was already on pension but it hardly covered the oxygen costs let alone the rent.

Tonight’s shipment would be over ten tons, if their calculations were correct then nothing would be left on the wasteland. Problem was if it was in liquid form, transportation was more difficult.  Two kilos or litres of the stuff fetched top dollar on the black market, most of it was sold to those who could afford it, they couldn’t care less where it came from.  How much did the average person earn per day, maybe at most 500 grams if they were in a top paying position, even then it would be fifty percent recycled.

His helmet intercepted the shuttle signal. “Foxtrot, we’re making the drop.  Entry should be in T minus 8”.  The voice was distant and tired.  It wasn’t easy running a boot-leg operation from other side of the moon even if it meant a fortune back on Earth, most guys didn’t get to land but maybe once every five years.  Even then you had a good chance of being caught,  suspicion of boot-legging alone came with a twenty year sentence.  What else were you doing if you weren’t part of the government funded space and exploration programmes?  The Mafia had its own operations running of course, most of their proceeds went into the government tanks in exchange for turning a blind eye.  Private funded operations like the one Frank was part of only counted for ten percent of the pure stuff.

At least they guaranteed it was 100% non-recycled.  Frank had spent the better part of 10 years on the run, four hundred and thirty trips wasn’t bad, more than eight thousand tons from the asteroid belt.  They had grounded him two years ago because of heart problems so now he had to help out with the pick-up operations which were a little less risky.  “OK Foxtrot, we’re handing over the package now, and setting course back to the belt”, his helmet wheezed static again.

The hand held tracking device flickered a pale green as he punched in the release codes.  Five thousand feet above in the starless sky the parachutes opened to break the decent of the precious cargo.  If the authorities picked up their activity they could always punch in the self destruct sequence. The whole cargo would go up in vapour & not a trace of evidence would be found.

The airlock hissed behind him as he clipped off his helmet.  He heard his wife stirring in the bedroom, she would also want a share of tonight’s spoils.  In less than a minute he had stowed away his suite and put the oxygen tanks on to refill.  He slipped his one litre flask from his shoulder bag, it was cold to touch, most of the contents had melted by now which was more natural than defrosting by microwave.  The other stock was now safely in the subterranean warehouse ready for auction next week. “How did it go?, Honey” she asked as he poured her a glass. “Not bad”, he replied as he sat down and sipped his glass of 100% pure water