15 November, 2011

Moving on

I'll be leaving Popcap in the end of December. I'm halfway through my 3 months (!!!) notice and it's now just a question of winding up my work and spending the last few weeks with my colleagues.

It's the fourth place in a row where I decide that I've had enough and it's time to move on.
Maybe it's just me, but jobs feel like a snake's skin - sooner or later you reach the limit and the only way to grow is to throw it and get a new one.

This time it's different though. Instead of looking for work at someone else's company, I'll focus on my own ideas and try to create products and a business around them. I won't be calling it a startup yet and don't want to hype it too much. It's just a few things I'd like to try and I'll spend the next 6-12 months looking for gold nuggets or getting my butt kicked by the universe.

Thankfully the last 12 years gave me the experience to believe I know what I'm doing and enough savings to be able to afford an experiment or two. But probably the most important, I can count on my family for all the support and all the pressure I can wish for (and maybe a little more).
Plus I've already done some crazy things that looked pretty impossible in the beginning. It can't be that much harder than loosing 40 kilograms or running a marathon.
Right?

07 September, 2011

What's next?

I haven't blogged much lately, mostly because I was busy, but also because some pretty exciting things were happening at my current job and I was waiting for things to settle.
Now it's all done and dusted. And my life is completely upside-down!

I've never imagined that being so free to choose what to do next would be that frightening.
Should I pick some of the less risky options or do I just jump and do what I've always dreamed of? What if I choose wrong? What if I fail? Am I capable enough? Can I afford it?
It's so much easier when there is someone or something to blame, when there are "good" reasons to delay your decisions and your plans for the future are in the future.

So what will I do?
Haven't quite decided yet. Though one thing is for sure - there will be changes. Soon!

Until then I'll be doing lots of traveling, meeting people, talking to family and friends and figuring out things.
Oh, and I'll be writing here much more frequently .

15 June, 2011

IQ Pushups

I've been playing with Brain Workshop lately. It's a free (open source) software that implements the dual task n-back exercise and lets you play with different levels of difficulty.

What is n-back?
According to some recent research this is brain-training that actually works. Do it 20 minutes per day for a few weeks and chances are you'll be measurably smarter (for a very specific definition of smart)!
Like with physical exercise mileage could vary, but it's still pretty fascinating news.

So nothing surprising in the sudden spike of intelligence at this blog.

14 June, 2011

Monitoring the execution of asynchronous JavaScript callbacks

In JavaScript sometimes it's useful to know if an asynchronous callback function was called, how many times and if it completed or failed. Of course you could implement it by changing some state in the outside scope, but this means adding code to the function and it won't work for existing 3rd party code.
I've written a small jQuery extension, jquery.monitor.js, (there is no actual jQuery dependency in the implementation by the way) which creates a wrapper around the callback function that keeps the latest call status and history in a property called monitor.

Example:

var m = $.monitor(mycall);//wrap the callback, m.monitor.status is 'unused'
$.getJSON("my.json", m()); //calling m() prepares a callback and sets m.monitor.status to 'queued'
$.getJSON("another.json", m());


When the callback starts, m.monitor.status will be set to 'called' and when it completes it will become 'completed' or 'failed' if it raised an exception.

In addition there are 4 counters for the history of each state: monitor.queued, monitor.called, monitor.completed and monitor.failed (in the example above m.monitor.queued and m.monitor.called will be 2 and the sum of m.monitor.completed and m.monitor.failed will be equal to 2).
To check if all queued calls have completed use the m.isPending method (for this to work the result from calling m() should not be reused for consecutive callbacks!!!) and to reset the monitor use the m.clearMonitor method.