Method Names

Quick, what does this method do:

isSupressMultiLanguage()

If you guessed that it determines if multi-language is turned on or off you’d be correct.

Quick, what does this method do:

isMultiLanguageSupressed()

If you guessed that it is does the same thing, you’d be correct.

The point of this is that each is readable. One may flow off the tongue slightly easier than the other, however both are perfectly legitimate verbiages for the underlying flag. Both point directly to the intent of the method and give a clear picture of what its purpose is.

So what is the opportunity cost? Zero. From a development standpoint it is pretty clear that these mean the same thing and a developer can get a feel for what each method does at a glance. As long as a developer can tell what a method does from just the name, the actual naming of the method is just a matter of personal preference.

My Bookshelf

I get asked from time to time what I read. Here is what my current bookshelf looks like.

I recently finished these:
Confronting Reality: Doing What Matters to Get Things Right
The Life of Pi
In the Line of Fire: How to Handle Tough Questions…When It Counts
I Am Legend

I am currently reading these:
The Peopleware Papers: Notes on the Human Side of Software
Principle-centered Leadership
Code Complete: A Practical Handbook of Software Construction

I have these lying in wait:
Java Concurrency in Practice
The Algorithm Design Manual
A Beginner’s Guide to Discrete Mathematics
The Age of Turbulence: Adventures in a New World

I plan on buying these but want to finish what I have first:
Getting to Yes: Negotiating Agreement Without Giving In
The Toyota Way
Facts and Fallacies of Software Engineering (Agile Software Development)
Peopleware: Productive Projects and Teams

Learn To Juggle

Over the years interns, junior engineers, aspiring programmers, and CS students have asked me what they can do to get better. I usually recommend some books that will help shift their thinking to the next level and try to direct them towards topics that interest them, such as GoF if they aspire to be an architect. There are a number of books I usually recommend, such as Effective Java. I was thinking about this question a bit this morning during my commute and concluded that there is a higher level to this answer than what I have been providing and it is industry agnostic. Learn to juggle.

I’ve found over the years that as my life and career has progressed that I have more of a need to be able to juggle many different aspects of my life, without forgetting or dropping any of them. There are a few distinctions when juggling. You can juggle small objects, large objects, or a combination of the two. Small objects are the light weight ones that are fairly easy to hold, catch, and throw and are thus not extremely important in contributing towards long term goals. Large objects are heavy, bowling ball like objects, that are very important to one or more of your long term goals. The importance of the object to long term goals is always going to be directly proportional to the size of the object. Considering this, the smallest object will always be the least important while the largest object will always be the most important.

The size of the objects may change over time. For example, early on family may not even be one of the objects however, as in my case, I found myself with a small object labeled “Girlfriend”. This object grew over time and became a large object labeled “Family”. This object has now grown to be the biggest and is thus the most important. Likewise, some objects may shrink or eventually drop off. For a long time the object labeled “Surfing” was my biggest but slowly shrank and eventually fell off all together.

When juggling there is always a threshold before things start hitting the ground. This threshold will differ from person to person and will vary depending on the type and number of objects being juggled. In addition, this threshold can be changed and will typically not require the number of objects in the air to be taken into account so much as the total weight of the objects. For example, if my threshold is 20 and I have 20 objects all valued at 1 then I am at my threshold. However, if I have only two objects, one valued at 20 and one valued at 1, I am over my threshold and something must give.

It is important to note here that there will always be some objects that are, in themselves, over our personal thresholds. These are items that we will likely be able to achieve, given time, but that we will have to drop all other things and get a lot of support for. For example, I theoretically could be the Mayor of my town. However, I don’t know much about the job, don’t have a political background, don’t have funding, and really don’t have a large constituent base. This doesn’t mean that I couldn’t do it but simply that the object is larger than my threshold so to even attempt such a large undertaking I’d need to drop the value of all other objects.

heavy-1.png
My juggling until last week when school dropped out (Original image borrowed from here)

I have taken the time to value my objects, though I have never actually assigned them numbers. For example, my “Family” object is the biggest, followed by career, and so forth. Understanding the ordering of your objects is the first step to being able to juggle well. The main reason for this is that as some objects grow and others shrink you will inevitably find yourself with a need to drop some things off. Without understanding the importance hierarchy, how would you know what to drop?

Finally, understand when your threshold changes. A number of years ago I found that I could handle far less than I can today. There are a number of reasons why this threshold can shift. The reasons why are not as important as understanding that your threshold can shift and always being able to gauge where it currently lies. Just because you could juggle 15 large objects last week doesn’t mean you still can today.

So, if you want to excel at anything in life, learn to juggle.