Ashik’s IT Thoughts

June 23, 2016

Play Chess – My Presentation @TubeMogul

Filed under: Uncategorized — ashikuzzaman @ 6:06 pm

At my office today we had the evening of Night Of Passions where 9 people presented on 9 passions/hobbies for 10 to 15 minutes each. Yours truly was was one of them. I presented, no surprise, Play Chess to appeal this game to my colleagues.

Play Chess For Fun - 1Play Chess For Fun - 2Play Chess For Fun - 3 Play Chess For Fun - 4

Play Chess For Fun - 5Play Chess For Fun - 6


June 22, 2016

Visualize 15 algorithms in 6 minutes!

Filed under: Uncategorized — ashikuzzaman @ 9:02 pm

May 26, 2016

My Engineering Article from TubeMogul – Git Commit Message

Filed under: Uncategorized — ashikuzzaman @ 4:41 pm

Today TubeMogul Engineering Blog published my first engineering article.

TubeMogul’s Engineering team uses a number of tools to help us collaborate and track progress more effectively, including Git, the popular version control system. Git’s commit messages are an integral part of establishing context for code changes, and maintaining an effective workflow. Read on for some best practices for creating effective Git commit messages. Read the complete article here.



April 7, 2016

Password Strength In TubeMogul

Filed under: Uncategorized — ashikuzzaman @ 9:14 pm


March 17, 2016

TubeMogul DevCon 2016

Filed under: Uncategorized — ashikuzzaman @ 12:45 pm

Last week we had the 4 days long TubeModul DevCon 2016 conference held, first 2 days at TubeMogul premise at EmeryVille and the last 2 days at Lawrence Hall of Science, Berkeley University.

You can find some more details on the TubeMogul Engineering Blog post.

February 6, 2016

When Disney Land is Rennovated as Java World

Filed under: Uncategorized — ashikuzzaman @ 2:07 pm


November 23, 2015

Java Programmer’s Life

Filed under: Uncategorized — ashikuzzaman @ 8:32 pm

November 20, 2015

Working with Fixed Map – Unmodifiable or Immutable?

Filed under: Java — ashikuzzaman @ 2:18 pm

We often have to work with a defined collection of values in our programs. Maps are one way of holding those defined values and retrieving those by names when we need to use. One easy way of reusing those predefined values have been using static maps in a class so that we don’t instantiate those same values again and again every time we use it. That’s a very basic and minimal thing to start with for any program.

But as your system goes bigger and you start sharing code among many team members and many modules of your system, and as performance issues become more important than anything else, and on top of it if you are working on multi-threaded environments – you know you have to play the game at a higher level than this.

We recently hit a relevant bug around using static hashmap that led me to refactor and restructure a similar basic code to a more sophisticated fixed collection. I learnt that the use case for a completely fixed map is not well understood and clear to everyone. At the end of the analysis and refactoring what I came up with can be simplified to a small program that I developed for my readers here.

Please look at my public github repository for the source code while I walk you through it –

There are two major ways of generating a fixed map other than writing your own collection data structure. First option is what comes with Java Standard Edition – an API to make any collection unmodifiable that gives you a read-only view of a modifiable collection. For Map it is Collections.unmodifiableMap(map).

Second option to make a map fixed we get from Google’s Guava library – Immutable collections. For Map, it is ImmutableMap which can be used instead of HashMap that we use more often in simple java programs. It makes sure once you build the map, you can no more add, update or remove any entry from it. While both of these give you a simplistic fixed size map, they have important behavioral difference. Additionally, none of them can guarantee you a truly fixed map where not only entries can’t be manipulated but each value for each entry also can’t be manipulated either. Let’s see where the gap is with them and how we can overcome the gap.

In, and from the above project, we are working with a modifiable map, an unmodifiable map (that wraps around the modifiable map) and an immutable map (that picks the values of the modifiable map to build itself). Both unmodifiable map and immutable map, once built, will not allow you to add any new element, remove any existing element or update any element with a new value using their own references. But we can add any number of elements to modifiable map even after the other 2 maps are built out of it. And that’s where the difference between unmodifiable map and immutable map becomes evident. Look at the program output for first 4 print statements and see where unmodifiable map falls short. While immutable map wont change in size even if you add new entry to the modifiable map out of which it was built, the unmodifiable map will increase in size as long as you are using a different entry point (other than the reference variable of unmodifiable map itself) to the modifiable map to add new elements. So clearly, Immutable map has an edge over Unmodifiable map when it comes to working with fixed maps.


However, the next 4 print statements (5 to 8) show the shortcomings of both unmodfiable and immutable maps. When you say the map is immutable, you are only making sure no add, delete or update happens at an element level, more precisely, using the key of the element. But nothing is stopping you from adding a new element inside the values of a map, if the value itself is a collection. So in our case each map element values are individual set of Strings. So nothing is stopping the program to add values inside those Strings using the unmodifiable or immutable map references. This is the result of famous copy by value and copy by reference debate of Object Oriented Programming. And hence you see new values got added for “animals” as part of #7 and #8 prints. So despite Immutable map doing a better job than Unmodifiable map, I call it a fake fixed map. A true fixed map, better if I coin a term fixed content map, needs to ensure that even the individual values for each element is untouchable (i.e. read only).

To achieve that we extend FixedContentMap from FixedMap (because all fixed content map is a fixed map but some fixed maps may be fake fixed maps!). We just build the values in fixed content map as immutable sets. So now if anyone wants to change the value of the fixed content map, including the contents of any element – they will face a java.lang.UnsupportedOperationException as is evident when you run the program (you won’t see print statement #12 ever getting executed).

So my conclusion is, if used correctly, Google’s Guava library will allow you to work with truly fixed content collections in Java.

October 15, 2015

The Mythical Man-Month by by Frederick P. Brooks Jr.

Filed under: Uncategorized — ashikuzzaman @ 8:58 am

October 7, 2015

Joined TubeMogul Leaving Salesforce

Filed under: IT, Official — ashikuzzaman @ 11:30 am

It’s been 6 weeks since I joined TubeMogul leaving Salesforce. The decision to leave Salesforce was not an easy one, as Salesforce is one of the leading and most innovative software companies in the world with approximately 17 thousand employees. When I joined there 8 years back, they had a little more than 3 thousand employees. So I saw Salesforce rising at a pace, that is only believable if you live in Silicon Valley’s startup atmosphere. I was in a good book in my own department and had a good network of people working in different departments; as I have been working there for so long. There were further growth scope and no doubt Salesforce pays good enough to employees in Silicon Valley (I have to assume elsewhere too). So why move out of Salesforce at all? Here was my rationale.

I have been working in IT Applications Development since my early years in Salesforce. The first half (4 years) I was working on a Java based module and the last half I have been working on / Apex (Salesforce’s own programming language developed on top of Java). During the second half I started feeling that I am getting out of touch with the Open Source projects and Java community; as being an application developer, I didn’t get a chance to do platform development which allows you to experiment with lots of cutting edge new open source frameworks coming out or the JVM based programming languages. So I considered moving within Salesforce to one of their platform teams but then I became part of a very large project (Project Delight) which I didn’t want to miss. The project took 2 and half years to finish and it was a very good experience in my career, seeing first hand how a large number of teams, each having its own development culture can work together to achieve a bigger goal and what various types of obstacles can come on the way. But once that project was done, I was getting ready for a bigger role on the next big project. But then I started feeling that the core problems that are awaiting me, we have already solved many of those in my last project. So instead why not jump into something completely new, where I will be hopelessly helpless?

That’s when one of my ex-colleague simply submitted my resume to a software company despite my reluctance (confession: I am a lazy person). But as my interview was scheduled. I started looking into what is there in the latest java world and I saw that the companies are moving to Java 8. When experimenting a few programs in Java 8 following the Manning book, I clearly understood it’s a complete revamp of the Java programming language. Lambda expressions, streams, functional style programming are few that excited me too much and I was no more ready to get back to Apex coding (not that Apex is bad, its just proprietary). I honed my Java 8, data structures and algorithm, spring and other open source projects familiarity for couple of weeks to get ready for interviews.

As naturally happens, I got selected by a few companies and rejected by a few others during the interview process. The job market is so good that I had at least half a dozen more interviews waiting for me the next week before I decided to stop interviewing and pick the best I had upto that time. TubeMogul was a clear winner in many areas. Of them are –

  • They are complete java and open source shop
  • They have different engineering teams where you might be able to move around over time – platform core (rtb), machine learning, big data & stats, ui, udb, appeng and more….
  • They are the 5th best place to work in San Francisco Bay Area according to Glassdoor review of 2015
  • They are a mid size company (500+ employees) making it ideal for a growing company and yet not too small to go bankrupt
  • Their business domain Real Time Bidding (RTB) is something completely unknown to me. So it will definitely pose challenges to me in multiple levels (which is what I was looking for).
  • They offered me a decent package. Although I humbly note that if you are working in Silicon Valley as a software engineer, most of the companies will offer you a good package; otherwise they won’t be able to attract or retain good employees.
  • I liked talking to each of the 4 people who interviewed me in TubeMogul as well the recruiter who handled the whole negotiation process in a very professional manner. My manager Murtaza is a very composed man, something similar to Rajesh Misquita at Salesforce whom I admire a lot.

I did let my team in Salesforce know 6 weeks ahead of time about my decision. I went to Bangladesh on vacation for 3 weeks to attend my brother’s marriage in between. I left a good relation with the management and peers before leaving Salesforce. I will always cherish the memories of working in such a nice a big company like Salesforce. But it’s time to move on.

When I joined TubeMogul, I saw my assessments were mostly correct. Except Java, I think everything else was simply unknown to me or I have used/worked on more than a decade ago. I still have not mastered the way to explain what RTB industry is all about. One of the very first things I did here is formed TubeMogul Chess Club. The pace of work is fast and everyone is very friendly. Let me go through a few more months, but as of now I believe my decision was correct to join TubeMogul.

« Newer PostsOlder Posts »

Create a free website or blog at