Friday, March 27, 2015

Mongoose value defaulting


Pretty neat way of defaulting object values in mongoose. Say you want to have a default proximity uuid assigned to one of your documents. Simply enclose this in a type and default definition like the one below. Added bonus of being quite readable as well.

beaconProximityUUID: {type: String, default: BEACON_PROXIMITY_UUID}

Saturday, February 21, 2015

Synology DS1513+

Synology DS1513+

Been researching on a good backup solution for the home to keep up mostly with the photos we snap from time to time. Am currently using a WD MyBook thats about to be full.

Yeoman and the Angular Fullstack Generator

If you have not heard of this yet and you are developing Angular JS applications, now is the time to take it for a spin https://github.com/DaftMonk/generator-angular-fullstack

This single-handedly takes the sting out of developing javascript web applications generating the boiler plate code required to have something up in running in literally a couple of minutes. You get a Bootstrap, a Passport.js backed authentication layer, a mongoose framework for your mongodb data store and the pre-requisite glues for your angular and node to talk to each other.

Wednesday, October 08, 2014

3 Point Architecture


Just a quick mental dump for today. Modern architecture simplified.
  1. Information Flow
  2. Separation of Roles
  3. Immutable, whenever possible

Tuesday, October 07, 2014

Adventures in micro-cluster land

The past few months I had been busy tinkering with a micro-cluster during weekends to have a more in-depth peek at the Hadoop 2 eco-system. Six Odroid U3s stitched together by an el-cheapo DLink DGS-1008A gigabit switch. This is by far much more better than spinning Amazon EC2 instances or the two node Hadoop 1 cluster I tried a few years back.

One thing that keeps bugging me however is the intermittent connectivity am having with the cluster. A bit odd am getting a far more stable connection doing an ssh from the laptop into the cluster, than from one of the nodes in the cluster trying to ping or ssh another node.

This makes the master namenode unable to start properly and causes intermittent timeouts whenever it tries to start-cycle the host listings on the slaves config. And toying around ethtool with half/full duplex settings doesn't help either -- out of despair I tried even the 10 base half duplex but it still didn't work. The ODroid are using an smsc95xx USB 2.0 module and is purported to work in 100 base full duplex mode.

Am suspecting its either the cables or the network switch. Also looking at getting a powered USB charging hub to make setup a little bit more tidy. Alright, back to some other stuff for now.


Wednesday, September 03, 2014

Elasticsearch

The rise of BigData is now prompting engineering teams around the world to graple the last mile that comes along with huge data sets: how do you turn them to actionable insights? A picture is worth a thousand numbers, naturally, data visualization is the preferred medium.

If you start separating the tiers required for managing tons of data for visualization, the need for a fast searchable data store with analytical capabilities will emerge. This is where elasticsearch comes into the picture. Its a swiss army knife stack that can be used as a regular lucene backed data store, or call in the power of aggregations (facet replacement) and you have a decent analytical engine.

The question is where does Hadoop/Teradata maps into this in the overall scheme of Big Data. I'd say if your data set is only in the few GBs a clustered Elasticsearch is all that you need. If your data is running in terrabytes then its probably worth to have that in a Hadoop cluster and run your jobs there that either feeds in back to Elasticsearch or use Elasticsearch as one of the inputs to your favorite Hadoop script.

On one end, I can't believe this prompted me to write a three paragraph blog post!

Monday, January 13, 2014

Two weeks into 2014

Wow. Time flies ridiculously fast. 

Still got a ton of things to do. Liking the steady pace of stuff I had been itching to do but didn't materialize last year. The family settling in the new place is helping a lot to make schedule for some things.

Finished my first book for 2014. Still a lot on my reading list. Not to mention my impossible long Pocket list and the a dozen or so Safari reading list. 

On the personal side of things, managed to run consistently at a 7/kph pace for 30 mins in recent attempts. 

All in all a good start. A good start indeed.

Tuesday, December 31, 2013

Happy New Year! Welcome 2014!


2013 has been pretty tough. Relocating from one country to another is never easy. The kids had to take a break for 6 months since they came in after the middle of the school year coming from an international school.

Malaysia had been our home for the past 6 years. Lots of fond memories. The laid back way of life specially on the weekends. It was harder for the kids who had already develop long term friends among school mates. But alas, life is a journey. 

Singapore is now our new home. The past 8 months just went by pretty quick. We had to adapt quickly and scramble to gear up the kids for getting into a local school. The first thing my wife did was find a good tuition teacher to adjust the kids level to the intended year (P4 and S1 respectively). We were quite relieved when the results came in! My boy got into a mainstream school and my elder girl managed to get into the express stream. Huge sigh of relief. Official school days start tomorrow. Let the adventure begin.

On a professional level, I have to adapt managing teams remotely and really switch gear from getting things done hands-on style to a more coaching style to spread the technical leadership to varying teams. Pretty challenging no doubt to be thrown far out of your comfort zone. But change is always an opportunity to take things to a different level. So bring it on.

2013 also opened our eyes to the wonders of travel. We realized the kids are in an age where they could really appreciate traveling. Its a way for them to see portions of the world and be exposed to other cultures. This is far better than buying them toys. The memories of traveling with family has more deeper staying power than material things we provide. Those memories will last their lifetimes. Added bonus, each can now carry their own carry on baggage. Gone are the days we have to haul the baby bottles and diapers and have one bag just full of stuff toys. We can travel light and that makes traveling with the family more enjoyable. :)

I have rekindled my love for photography as well. And had taken quite a few images that am pretty proud of. Its a great way to exercise the creative part of the brain and a welcome respite from the hard hitting and fast paced technology world at work. 

All in all, am thankful to God for 2013. While you learn from mistakes, its always important to count your blessing and be grateful. Everyday is a gift. Don't take it for granted. 

So I guess thats it for a new year blog post. Again happy new year! Looking towards 2014 and all the challenges and excitements it may bring! :)

Wednesday, October 09, 2013

Everyday Photography

Slow-Cooked-Beef-Ribs-3769 by nocs
Slow-Cooked-Beef-Ribs-3769, a photo by nocs on Flickr.

Recently I had been picking up the camera and again re-trying an old passion of taking photographs of things I like. Mostly taking shots of our kids and surrounding neighbourhoods.

In parallel my wife also is re-kindling her love for cooking. This presents awesome opportunities to photograph the new dishes as she weaves her magic around the kitchen.

Saturday, October 05, 2013

iOS 7 bit

NDA embargo is lifted. Among other things, its now rockin' base64 string encoding API. Yep, its the simple things that matter. Enjoy!

NSString *base64EncodedString = [[string dataUsingEncoding:NSUTF8StringEncoding] base64EncodedStringWithOptions:0];

Saturday, June 01, 2013

Google Cloud Endpoints.

Dabbling with Google's new cloud endpoints. Since am not using Eclipse (Intellij IDEA fanboy). It was a bit of a jar hunting game. To save you the trouble, the downloadable backend code includes dependencies on gson.jar and the gcm server jar which, wait for it... Only comes bundled with the Android SDK tools under Cloud Messaging.

Lets see how this goes.

Saturday, October 16, 2010

Sunday, November 01, 2009

Windows Live Writer

 

No kidding, this is a slick native desktop blogging client for windows. Able to automatically pick up the blogger CSS styles for a truly WYSIWG experience.

Usually, you get software like this on the Mac, its quite refreshing to have something like this on Windows. Makes for a very nice companion for netbook computers which are ubiquitous nowadays.

And the best part of course is its FREE. Get it now!

Saturday, August 01, 2009

Long time no post again.

Its been eons again since I have written a blog post. Even 140 character updates are rarer nowadays.

It could either mean too busy at work or more interested in real life (IRL) activities or both.

For some reason, I do like to write. Its just I find it hard still to write cohesive sentences. Explaining /dev/brain contents that mildly conforms to the rules of proper grammar. I always admired people who have that gift. The gift of writing.

Its not hard to find where the weakness lies. Its the inability to focus on writing one topic from start to end. The mind wanders off too frequently in the blink of an eye. Hyper active mind leads to fractured blog posts 99.999% of the time.

But as always, optimism is always there. Will never get tired of trying. :)

Friday, May 15, 2009

N95 and Garmin Mobile XT

On a quick note, N95 + Garmin Mobile XT loaded with Malaysia and Singapore maps really rocks! Even better than the bundled GPS on our Persona. All searches by default is based on your location. For example searching for a Shell station, you would see it searching within 5km, 10km, 20km... radius. That said it makes a two year old phone an extremely practical all in one mobile device.

When will Google maps make its data available offline? An off-line version would make LBS dreamers/developers extremely happy.

Malaysia is more travel-able with a GPS device. Makes you more confident to drive to places you had never been to. We went to Blue Lagoon in Port Dickson without getting lost. If you are a foreigner in Malaysia, a GPS device is one of those must have gadgets to enjoy travelling the country. Like the Philippines, lots of tourist spots to visits. Its ironic actually that we haven't explored home as much as we have here in Malaysia.

HP Mini and Nasi Kandar

Saturday morning with a mini and maggi goreng.

Surprisingly wifi is available as auto detected by the mini. For the first time am blogging in this indoor Nasi Kandar.

Anyway, its been a while since we have the mini, my daughter uses it regularly at home for school homework and general surfing. It seems to hold up to the task. Was keen on trying it outside and see how long the battery holds up and see how suitable it is for occasional blogging and surfing un-tethered.

Performance is not that bad. The only bummer is the glass covered screen. While it makes pictures pop indoors, it reminds you how impractical it is to use under direct sunlight. Even using it under the shade makes it hard to read things due to the screen reflection.

Planning to test it also for mild Java happy coding sessions. Installed trial version of Idea and Glassfish Prelude v3 and see if the atom processor bundled with 2GB RAM is up to these tasks.

Aside from these, you got to love the keyboard. Its a joy to use. Not too cramped as the other netbook these days. Pretty much comfortable to touch type.

Oh, we also remove the thin plastic film covering the webcam. Now the video sessions with Skype doesn't look too dark and crappy. Bluetooth works without a hitch with our Nokia phones. Audio is better than expected. The weird trackpad takes a bit getting used to, but since am not a mouse person, am not that bothered.

On the Nasi Kandar side of things, the daging goreng is not so good as it once was. New cook perhaps? The one we got today is a bit hard to chew. Hmmnnn... Maybe time to try out other menus.

Note to self, teach the kids to touch type. An invaluable skill when using glass covered screens. :)

Live long and prosper, as Dr. Spock would say. The new Star Trek movie rocks!

Monday, April 20, 2009

Oracle Buys Sun!

WTF???

What is the future of Java and Glassfish?

Interesting times to be a Java aligned technologist...

Sunday, April 05, 2009

My love, my life...


_MG_0631
Originally uploaded by nocs
Had a great time this Sunday. Took the lovey and kids to Pantai Morib for a much needed break.

Beach was ok, but food was fresh and delicious! We had grilled fish, fried prawns and calamari cooked kampung style? I could still imagine the taste of the prawn somewhere there in my tastebuds. It was really good and am not even a prawn lover to begin with :).

We also had a blast with kite flying. For RM8, you have a ready made kite to go along with the fresh sea breeze. It got stuck to one of the trees in the end tho. And am afraid we did lost one of Janro's slippers stuck in the sand somewhere.

Planning to go to nearby tourist destinations every once in a while on weekends. Hope it helps lovey recover faster from the recent surgery. Its surprisingly cheaper than going to malls and its just feels great to bond with the family this way.

Thursday, April 02, 2009

Diets and dogs


Our dog
Originally uploaded by nocs
Surprised to know there is a free book for dieting... Named as The Hacker's Diet aimed primarily at geeks perhaps.

Overweight and a bulging beer belly (ironically I rarely drink beer or alcohol for that matter), its those odd moments in time when you want to write something about it. In the futile hope to keep that motivation to get fit even for just a while.

Alright, probably just an excuse to blog some nonsense and just let the fingers do the typing.

Anyway, just watched Marley and Me with the lovey and kids. Even our dog was probably touched by the story. The sad reality of life. More sad is the fact that we do have a dog, and I could just imagine the pain it would cost us, especially my daughter when its life span would near its end.

Some great lessons there. Give the dog your love, and it will love you till the end. Nothing fancy, just love, pure love. Something thats becoming rarer nowadays.