Aquarium Reboot

Well, i don’t know how to start this, so i’ll just dive right in.  I’ve been an aquarium entheusiast most of my life.  i’ve always loved the peaceful tranquility that an aquarium brings to whatever room its in.  My dream for the longest time was to have a aquarium wall ( an aquarium the width,not height, of a wall, that you could look through into the next room).  Being a home owner, and knowing that that actually entails, i’ve re-adjusted my dream ( at least until i become a multi-billionaire, and can build the house around said aquarium.

We have had an aquarium going in our place of residence ( i saw that instead of house, as i’ve moved twice since i started having aquariums, 2 appartments now my house ) for a little over 10 years.  In that time, we’ve had at one time or another a 10 gallon, 25 gallon, a 77 gallon ( current, and main tank ), and one of those kritter containers ( betta show bowls, that also houses Aquatic frogs ).

Aquarium at the beginning of the reset

Which brings me to this post.  Since we have had kids, we haven’t spent nearly enough time caring for the tank as we should have, but kept it going.  It was on life support, but the fish kept on going, some would die of old age, and were not replaced.  About a month ago, discussing with my wife, we agreed, that since the boys were getting older and more independant we had more time to get back to caring for the tank.  Maintenance isn’t that bad ( the larger the tank the easier the maintenance ), and is about 30 minutes every other week, and maybe an addition 30 minutes once a month to clean the fitler.  Feeding isn’t an issue, as i do it when i feed my dog and takes but a second or two. Our filter was(i don’t know if it still is) top of the line, to avoid potential maintenance problems.

So it is with this mindset that we did a massive cleaning 4 weeks ago,  filter, 50% water change, the works.  The filter was disgusting, but being so understocked, the effect on the fish was relatively negligeable.  The inhabitants at that time were 2 clown loaches, 1 female Kribensis, 2 bristlenose pleco’s and 1 cherry barb.  That few fish in a 77 gallon tank that’s 4′ long, might as well call it empty.  3 weeks ago, we went out and started looking for new inhabitants, we were debating what to add, as we didn’t know what direction we wanted to go.  We settled on adding 3 tiny ( these things are ridiculously small compared to our other 2 ) clown loaches and a half dozen Congo Tetra’s, a fish we’ve had before and really appreciated for the colours, size and overall behavior ( swim in a pack, move alot around the tank, not very aggressive towards other fish ).  Fast forward 2 weeks, another water change, all inhabitants seem to be getting along, and what a difference having more fish in the tank makes.  Today my wife added another half dozen congo tetra’s, bringing out total to 12 congo’s.  We are now looking for another schooling fish to add, that has a different colour palette, to contrast the colours in the tank.

Student strike in Montreal

As many of you are aware, there have been massive protests with regards to students protesting the cost of an education in Quebec. Quebec has the lowest tuitions fees in all of Canada, about 1/3 of the costs in Ontario. Let me get the simple things out of the way first. Am I for a free education, of course(with some reservations), do I approve or even support these spoilt little brats in the methods HELL NO.

Montreal Students Striking on the Champlain Bridge
Students Tuesday morning halted Montreal-bound incoming traffic on the Champlain Bridge for more than an hour. They were protesting the Quebec government’s plan to hike tuition fees.

I think education is something that should be free, that everyone from every walk of life that are local residents and paying their taxes should be able to receive. I qualify this statement, to the extent, that paying for residents is one thing, as their tax money (in theory) goes back into the local economy (province, country, etc). We have some very well renowned schools, and offering free education to outsiders will rack up a bill we cannot afford.

My main issue against free education, is that it currently helps weed-out the perma-students. The people who just get degree after degree ( not furthering their education, just adding to it ) at the expense of the rest, or take extreme amounts of time to complete their degree because taking 4 classes is too hard and cuts into partying time.. Its not a sampler menu, where you should be able to pick up 5 different degrees, or take 10 years to do a 4 year program. I remember a guy I went to CEGEP with, he was in his 7th year at the school, on a 3 year program.

Back to the matter at hand. Something i really REALLY don’t understand with these student protests, is if you are trying to gain support from the masses, why upset them by complicating their lives. If you want the workforce to pay for your education, why stop them from being able to go to work? On Tuesday March 20th, they blocked the Champlain bridge trapping drivers on the bridge. The riot police had to be called in, and 97 fines were issued to the amount of 494$ each. 494$ is more than they want to raise tuition, what’s the point?

The one thing i don’t/can’t seem to understand, is why Quebec has some of the highest tax rates, where is all the money going, its not health care ( hospitals closing down, etc), its clearly not going to road repairs, and we can now say its not going to free education, where or where has our tax money gone.

The definitive way to implement a singleton in java

I’ve been interviewing a bunch of candidates lately ( we are hiring ) for a senior java developer’s position, and i’ve come to realize how far from the basics numerous people have become.  You ask them about some ajax feature, or new app on facebook, etc, they jump at the chance to talk about this, talk about that.  Ask them about some basic concepts, and other than textbook definitions, they can’t explain it.

The source of frustration for this post, is from an interview i had a couple weeks ago.  I asked the developer, who had about 2 years experience if i recall correctly and a bachelor’s degree in computer science ( i don’t recall from where, unfortunately), to explain to me what a singleton was.  His reply was typical, if not rehearsed

A singleton is an object that has only one instance in a virtual machine.  This is achieved by having a private constructor, and a static method that either returns an existing instance, or creates then returns the instance.

I love the singleton question, because it allows me to focus in on anything based on their answer.  I can follow up with threading, locking, resource allocation (database pools, etc ), memory allocation ( when is the instance created, etc ).  It is what i like to refer to as a ramp up question.  On the surface, its extremely easy to answer, but if the person don’t pay attention, or doesn’t know when to stop talking, they can get into real trouble.

On the surface the candidates answer was correct and accurate.  I decided to follow up with a how would you write such a method, the reply

I wouldn’t, i would put the @Scope(“singleton”) annotation or put singleton in the spring xml configuration

Once i climbed back into my chair, as i obviously fell out of it hearing that, i asked, what if you weren’t using spring, write me the code for it.  The candidate, wrote the code, but couldnt’ explain the threading risks, or the double checked locking failure .  So enough about interviews, here is the definitive method for implementing a singleton in java.

I did not invent this method, it is from Joshua Block’s Effective Java Reloaded talk from Google IO in 2008 at 28:56

public enum Elvis {
     private final String[] favoriteSongs =
         { "Hound Dog", "Heartbreak Hotel" };
     public void printFavorites() {

The reason behind this, is that the enum is created when the class is loaded.  It is automatically serializable, and will always reload to the same instance. That’s all for now.

Day programmer vs Night programmer : revisited

A couple days ago DZone linked to the following article.

The author goes on to define a Day programmer as someone who write code for a living, being mostly incompetant at their job, just doing this for a paycheck.  He then goes on to talk about night programmers as the leads of the technological world, the people that do most of the work, the people contributing to the evolution of their trade.

Every person i’ve ever met acknowledges that there is a distinction, I am no exception.  However I believe there are actually 3 categories of developers, and they aren’t as clearly defined as he makes it out to be. website host information  My categories are more along the lines of this

  1. Programmer
  2. Developer
  3. Elitist schmuck

Let me now describe how i see each person.  First here are the characteristics that i associate with a programmer.

  1. They are in the field mostly because they were decent with computers, and were looking for a good paying job
  2. They are the “do it” guys.  They aren’t here to make waves, they want to be told what to do, get it done and go home to their friends/families
  3. They look for the best paying job for their skillset, with little to no consideration for the work to be done
  4. They only see their assigned tasks, without thought of future impacts
  5. They people are the ones who do the brunt of the daily tasks
  6. Without these people projects would never get done

Most programmers don’t see a solution, they see code to write, and that’s it.  They also understand this limitation, and don’t regret it as their job is usually a means to an end ( feed their family, buy that lexus, the trip to Bora Bora ).  These are often the first hit when a company is having financial trouble or the economy slumps.

The difference between a developer and a programmer, although might seem simply refering to terminology, i believe there is a fundamental difference.  A developer is someone that will be uptodate, and someone who can propose a solution to a problem, not just take a requirement and bang out a bunch of code.  Here are some of the characteristics that i associate with a developer.

  1. These people got into the IT field because of their passion for computers
  2. They will/and do decide their next job not only in relation to the salary, but take into consideration the work they will be doing
  3. These are the people who read and participate in online communities, keep their skills fresh and updated, because something new can be something cool, and help them out later on
  4. They will go the extra mile for their projects/team/job/company but know that there must be a balance of life and work.  That balance will shift from time to time ( during crunch times at work, etc )
  5. They can see solutions to complex problems
  6. They see how today’s development will impact future requirements/enhancements
  7. People follow them based on their personality, and interactions with others
  8. These people are passionate about teaching others, because their passion will hopefully convert another to what they love

A developer will help you through the problems, and stick with it.  They won’t jump ship at first sign of a slightly better paying job, because they joined your company for more than just the paycheck.  They joined because of the atmosphere, the challenge, the opportunity to show that they can be a cornerstone resource, and that thought they could contribute.  These resources are the ones that will bring you solutions to your problems, instead of trying to find a way to fit your problem into their known pattern.

Now for the third category, what i call the elitist schmucks.  These are actually mostly detrimental to your projects, so beware.

  1. Live to right code, and nothing else
  2. Believe that they are the only ones that can solve a problem, even if there solution doesn’t fit into budget, timeframe, client needs, etc
  3. They don’t believe in team work, as it is a waste of their coding time
  4. They can’t understand when people don’t want to follow their brillance

The elitist schmuck, is a very intelligent individual, and can be a huge contributor to your project, as long as you let them decide everything on how it is done.  They have a vision, and as long as you don’t challenge that vision, things will be alright, until the next “big thing” hits, and you refuse to re-write your whole application/platform/etc into that new thing.

The difference i see between a developer and a schmuck, is the ability to work with a team, and with the business to achieve a solution.  The ability to say “Ok, this isn’t the ideal technical solution, but it fits the timeframe, the budget and will work for now.”  They often will propose multiple solutions to your problem, and offer the pro’s and con’s to each, and work to find the best fit.

just my 2 cents on the matter.

Best User Instruction manual ever

I’ve seen some pretty creative ones over the years, mostly online manuals, but this one has to take the cake.  When I saw this, I couldn’t resist sharing it.

The idea of having a step by step guide, available to new users, users who have never had a smart phone.   Take a look for yourselves.