Posts
Design of a MongoDB Analytics Database
We built a MongoDB based realtime analytics solution and learned a few things in the process. I would like to share some of our learnings in this post.
When tasked to find a good database for holding realtime analytics data, I was searching through the wisdom of internet to come up with a good choice. At a high level, the database needed to deliver the following:
Atomic counters so that events could be counted fast.
Posts
Deploying to TV Screens
Off late, I am working on a project to render real time business data with interesting visualizations, so people can feel the pulse of the business. For the last couple of months, I have been planning to write a detailed post about it. But after a few false starts, I am finally settling on smaller posts, telling a small part of the story each time.
So, have you ever worked on a web application that is primarily viewed through 55"+ 1080p TV screens?
Posts
My Take on Client-Side MVC
I just rolled off my last project this Wednesday. It was a great team, worked on some cutting edge technologies, mobile web, HTML5, mongo and some other fun stuff. Now that I got two "beach" days before jumping on to the next gig, I spent some time trying out Backbonejs to knockout one item from the long list of to-dos. This post is about my initial take on client side MVC, solely based on these two days with Backbonejs.
Posts
Are You Still Parsing HTML Element Ids?
To render a list, often times we use repeated HTML elements with a similar template. For example, the search results in ebay.com is a list of divs, each containing different data in the same template. In a server side, this rendering code is somewhat similar to this:
If you noticed, a product with it's database id = 123 will be rendered inside a div with id="product_123", and similarly div id="
Posts
Object Versioning is an Open Design Problem
This unsolvable maze is a local food from Bangladesh, known as Jilapi
Photo credits to udvranto pothikObject Versioning is often required by a business rule, for example, to maintain an audit trail or to be able to revert to a previous version, etc. This is the 3rd time in my career where this Object Versioning requirement made me think like -
There's gotta be an easier solution! But, I am yet to find one.
Posts
Care Driven Development: Javascript
There is * Driven Development, where they listed "all possible thing" driven development and dedicated a whole website to it! Well, I am adding one more to the list, "Care Driven Development", with an emphasis to Javascript coding.
Javascript coding, do you care enough?CSS is the most hairy spagetti piece of almost any web project. And its not leading by a far distance to it's first cousin; Javascript. But, the good thing is, it just takes a little care to clean the bush out of Javascript and make it pretty.
Posts
Enterprise Software Projects: oh, yeah!
I just rolled off my first ever enterprise software project couple of weeks ago. After staying six months on the project and while the memory is still fresh, I thought I would write a retrospect on the project and on my role.
The program is rather big, I guess it had ~300 people for the last couple or so years. I joined late for the program. So, by the time I went there, a massive amount of work has already been done, meaning a huge learning curve for me.
Posts
Aligning an HTML DIV Inside Another One
Across different projects, I have found people taking CSS shortcuts for translating the Photoshopped design templates into HTML. Back in the days, layout used to be all Table based and it was kind of straight forward to fit everything into grid cells. However, with CSS styling the extra flexibility to put elements in any arbitrary layout came extra responsibility - to make sure things still align nicely while being fluid to accommodate different screen resolutions and form factors.
Posts
Using instanceof is mostly a Code Smell
When using static programming languages such as Java, often time I have seen people writing methods that accept Object as a parameter. These methods typically don't really work on any Object, but works with multiple types of classes that don't have any common base class. Here's an example of such a method:
As you can see in this example, the process method actually expects one of CleanFloor or LaunchRocket instances.
Posts
Nightly Build is a Warning (or Horror)
Photo credits: insidethemagic
I think, Nightly build is an anti-pattern for Continuous Integration. If you are integrating continuously, then you shouldn't need a nightly build, that would be too discrete :(
If you already have a per-commit continuous integration setup, you shouldn't need the so called nightly build unless there's something bad about the code.
Often times, builds taking >10 minutes are put in the bucket of nightly builds.
Some people put batch processing related tests under such nightly builds.