Wednesday, January 16, 2013

Monday, December 10, 2012

Ubuntu for Android

Now this is something straight out from a sci-fi movie.  Imagine plugging your phone to a dock and it immediately becomes your computer.  Imagine carrying your phone + a flat screen monitor and keyboard as peripherals instead of a laptop.



The time is near, cause Ubuntu for Android is here!

Monday, July 30, 2012

When Brand Comes Before Substance

Judging from the feedback of colleagues who attended Blackhat, this video is accurate.


Sunday, July 22, 2012

No Go

As mentioned in my previous blog post, I was experimenting with Google's Go language.

Admittedly, I'm a Google fanboy and I was very eager to use Go.  However, my eagerness was quickly tempered when I realized Go performs poorly in regex.  At first I was doubting my self and my skills, but a quick question to the good people at Go's group golang-nuts reveals that this is a known performance issue.

Bad luck, as I need to run through thousands upon thousands of regex per second.

But some good luck fell my way as my engineer, Joey, pointed me to Python's multiprocessing module which allows me to create worker processes not limited by the Global Interpreter Lock (as compared to the multi-threading module).

So, I just re-coded my previous code using Python multiprocessing, added another worker to fetch from our RabbitMQ messaging platform and voila!  a stable and running program!

So far, this is what it does to a 16 core supermicro server... just the way I want it.


Thursday, July 5, 2012

Trying Go

Go What?

Google I/O just finished last week and one of the more interesting announcements for me was the official version 1 release of Go (or golang).  I've been keeping tabs on this programming language for a while because my team is challenged by a flux of massive amounts of data.  A modern programming language that natively supports concurrency seems like a good candidate for our processing systems.

Right now, our backend is a library of several programming languages, but most of it is in Python and C.  Some people called Go a good mix of Python and C, so having something in between the high level Python and the low level C is something worth exploring.

Initial Impressions

The last time I coded in any flavor of C was 10 years ago, with Python (and a little bit of Perl) as my main programming language for the past 10 years (and it is only on occasions when I need to code, I'm originally a reverse engineer, so it's my job to de-construct software, not build it).

If you're expecting Python-like syntax in Go, you'll be disappointed (like I am).  The syntax and programming convention is very much like C - curly braces, pointers and all.

If you're used to Python's implicit type conversions (list items can be treated as strings), then again, you'll be disappointed.  Go has very strict typing, and converting a list item into a string is the first wall I hit playing with Go.

Go is also very strict with imports and unused variables.  It just won't let you compile if you declare a library/package or variable that you didn't use.

But other than these initial eccentricities, Go is a language that is easy to play around with.  I already have around 150 lines of  Go code in 2 days of converting a 50 liner Python code.  And during this time, I'm already playing around with concurrency within Go.

As expected for a young language, documentation is not very detailed and sample code is not abundant.  This is probably my major gripe against Go at this point in time.

Lastly, I'd like to link to Graham King's article on darkcoding.net about his experience with Go, which is a very good summary on things you should and should not expect from Go.  I suggest you go over and read it to check if Go is suitable to your requirements before you invest in the time it takes to explore Go.

I'll be blogging about my adventures in Go in the next few weeks so stay tuned if this is something that you fancy.