Udemy and Netflix are so alike!

Two totally different, but somewhat related fields have seen an exponential growth in last few years.

Online learning platforms and On-demand movies/box sets/videos platforms.

To be fair, there aren’t that many of them, but ‘exponential growth’ makes it more dramatic and that’s the effect I am going for.

Udemy, Netflix, Coursera, Amazon Prime, blah, blah, blah and so on and so forth.

But, why are you subjected to this universal and mundane information. You know there are online learning platforms, you also know there are online movies platforms, so what’s the point.

Well, the point is an epiphany that I had whilst “enjoying my daily commute to work” watching a course on Udemy.

I realised that Udemy and Netflix are so alike!

Here’s the reason why.

Because a tiny percentage of the content on these platforms is just pure gold and the rest is utter rubbish.

So, the challenge then is to separate the wheat from the chaff.

Leave a comment

BBC Snippets

Back in 2010, I had the opportunity of working at BBC with a really outstanding and innovating group of people. I worked on a project called, BBC Snippets. From it’s humble beginnings as a Rails project built on sphinx to micro-services built on top of solr, it was the most satisfying and fun project I’ve ever worked on. To top it all, it was solving a real issue. It reduced the researching and creating snippets time down to a few minutes.

Well, now you can listen all this from the guy who has been working on it from the start.

Hope you enjoy!

Leave a comment

The Art of Interviewing

Interviewing is surely an art!

Appropriate questions coupled with a prudent approach will do the job. But, then how many interviewers really do it properly. Here’s some of the wisdom I’d like to share:

* A 5-min phone conversation is not enough evidence to prove if a programmer is fit for the team.

* A whiteboard exercise to solve a technical test is an API memory test and should be banished.

* Whiteboard is good for discussing technical architectures and that’s exactly what it should be used for.

* Giving a tough maths question to solve as a technical test is not going to reveal a candidate’s understanding of HTTP protocol. Keep things relevant to the job.

* Follow KISS (Keep it Simple stupid) principle. Programmers like to program. So, give them a relevant problem and a computer and let them do what they like to do.

* Not remembering the entire programming language API is not a bad thing unless you work in a bunker, cut off from the rest of the world.

That’s all for now.

Leave a comment

Quote of the day

On big data, John Naisbitt once said:

Drowning in data starving in knowledge.

Leave a comment

SIC code for Ecommerce

If you didn’t know, SIC stands for Standard Industrial Classification and it’s a way of classifying different industries.

You must be wondering why the hell am I talking about SIC codes. Well, I have been trying to contact people about Suggestion.io, the project I have been working on lately. Now, in order to spread the word you need contacts with their emails. We have collected a lot of emails thorough invites but not having enough prospect users at the top of the funnel leads to only a handful at the other end and in order to truly succeed you must pour in a lot of users at the top of the funnel.

No matter where you buy the list of contacts from, you will have to filter the results by the industry type. Suggestion.io’s main audience is online ecommerce stores and after going through the list of 2003 SIC codes, I found 52.60 (Not in Retail stores) which matches perfectly to our requirements. I have not had the chance to explore the results further but I am sure it is what we are looking for.

I hope it will help in your future endeavours.

Leave a comment

Remove remote branch info locally from git

You use git for version control.

You got a new feature to write.

You do the work and push your work into a new feature branch.

Open a PR for your work either on bitbucket or github or anything else.

PR gets merged and the remote branch is deleted.

But, wait, you have the remote repository still listing locally when you run:

git branch -r

Now, I don’t want it. Once the branch has been disposed of remotely, it has no business on the local machine.

So….there are two ways to get rid of it.

1. Remove all remote branches deleted remotely with this command:

git remote update origin --prune

2. Remove just one branch locally:

git remote prune my-new-feature

There is however a subtle difference in the two, i.e. you can pass options to the latter command to execute a dry run before actually doing it, like the command below:

git remote prune -n my-new-feature

Hope it helps!

Posted in Programming | Leave a comment

Selenium WebDriver and starting Safari in a clean session state

I first used selenium on a java project a while back and selenium has grown by leaps and bounds. With continued support and a myriad of bindings, it’s a tool to go to for automated testing. However, it does sometimes stumps you with nuances you’ve not seen in the past. One such quirk I came across this week was starting safari in a clean session state. Unlike Chrome and Firefox, it’s impossible to start safari in a clean session state. A clean session state means devoid of any hangovers, cookies, for instance is a good example.

The project I was working on was set up with cucumber features using capybara that in turn uses selenium webdriver’s ruby bindings for communicating with the browser. Like any astute developer, I googled for solutions.


Google search for ‘safari in clean session state’ may throw you off into a completely different directions, for instance:

1. Pass clean_session state as true as an additional option when a new capybara driver is registered for safari.

However, this will not work. Why? Because, there’s a comment in selenium webdriver’s code pointing out the fact that it’s still outstanding.

2. Open safari with different flags like ‘-n -b -F’.

This doesn’t work either. Even if it did, you will have to delve deep in selenium webdriver land to pass that option in and monkey patch a solution for this. Thankfully, it doesn’t work because monkey-patching is never a reliable way to fix bugs.

So, what’s the solution?

Well, the only way to fix it is by deleting the cookies before a feature run. Typically, add some code to delete cookies in a before hook for capybara to run before each feature.

It took a lot of trying, experimentation and patience to find this solution and sincerely hope it helps someone.

Posted in Programming | 2 Comments

Passing parameters to Angular providers in configuration phase

Providers are probably the most significant concept in Angular 1. Services and factories use providers underneath, which makes it even more powerful. Anyways, Angular 1 has two phases in it’s lifecycle, configuration phase and run phase. Providers are initialised in the configuration phase. In this phase none of other angular services, like, $http, $location and so on are available to use. I had to pass some values to a custom provider and the only way you can do it is through the config defined on the module.

I never knew you could do that and this tiny post is just a note to self as a reminder.

Leave a comment

Python2 not found error on installing emscripten on Mac OS X (Yosemite)

On the weekend, I had the need to use a C library and decided to give node.js a try as I have been spending more time in the Javascript ecosystem. Google revealed few ways to connect to a C library from node, namely, node-ffi, emscripten and so on. Node-ffi is similar to ruby-ffi and is a wrapper around libffi.

Given that I have used ruby-ffi in the past, I decided to give emscripten a try this time around. The installation guides are spot on and work like a charm except one minor thing. For some reason, on running the emscripten (using ./emcc command) it complained about not finding python2. Not sure why it’s looking for python2 in the PATH, but I created a symlink to the installation of python in /usr/bin and called it python2 instead.

Hope this simple fix doesn’t cause any more issues later on.

Leave a comment

Responsive is the flavour of the month

You don’t have mobile and desktop anymore.

You have devices!

Small devices equates to mobile, medium ones to tablets, large to desktops and extra large to retinas. I understand the whole responsive thing to an extent but in order to learn a bit more about the tools and techniques out there, I took the Responsive Images course at Udacity. It was to the point, concise and absolutely free. Here are a few things I picked up:

  • SVG Optimiser
  • pixel density across different phones
  • Picture element and the srcset attribute to provide a list of fallback options to the browser. srcset passes the responsibility of downloading and rendering the right image for the right device.
  • calc for figuring out the margin and width dynamically.
  • There’s an easy way to create your responsive images via grunt. I couldn’t find a similar thing for webpack, as webpack works quite differently from grunt (or gulp).

All in all, I really enjoyed going through the videos and doing the exercises and and highly recommend it to anyone feeling a bit weak on the whole responsive thing.

Posted in Programming | Tagged | Leave a comment