Does your application have a "Constants" file? It's a class with a list of constants used across the application? It's a large file with a list of Strings that don't have any relationship to one another and has a bunch of comments and carriage returns to "organize" the file.Move them.
Exposing a public constant allows developers to access state from all areas of the application. => Limit global variables and global constants. Move them into the class that is responsible for using the constant.
Constant files grow over time => Don't introduce the constants file pattern. Your constants are related to some domain concept. Are they Roles? Are they keys for a cache or session storage? Move them to the correct class and make them private.
Constants are an implementation detail => Don't force you teammates to find the correct key name to access some session variable. Create a method to get and set the value. The storage provider and index is an implementation detail and should be wrapped in a method that knows the storage key and provides appropriate casting.
Do yourself and your team a favor and move the constants into the classes that need them.
Thursday, November 3, 2011
Friday, July 8, 2011
The Five Year Rule
I have a rule that has guided my career since college. It has worked well for me and provided me a simple way to evaluate career opportunities.
When people hear my rule for the first time, their initial reaction is to laugh. After further reflection they realize it contains truths about professional career development.
WARNING: Do not attempt to apply this rule to personal relationships!
When people hear my rule for the first time, their initial reaction is to laugh. After further reflection they realize it contains truths about professional career development.
The Five Year Rule
There are two reasons to have the same job for five (or more) years:
- You love your job.
- Another company wouldn't hire you.
WARNING: Do not attempt to apply this rule to personal relationships!
Friday, June 24, 2011
Mobile Blogging
Two enhancements to the blog.
- Mobile Theme - It looks ok on a phone
- Mobile Posting - Just setup my phone to post directly to my blog. This could be a bad idea.
Thursday, January 27, 2011
Leader or Manager
As a Leader or a Manager we make decisions based on all of the available information at the time and the impact to stakeholders.
I'm going to over simplify the difference between a Leader and a Manager by observing a single aspect in the decision making process.
I'm going to over simplify the difference between a Leader and a Manager by observing a single aspect in the decision making process.
Managers make decisions based on the direction of a superior.
Leaders make decisions based on what why believe is best for their team.I have held both roles in my career. The tricky part is knowing when to be one over the other...yes there are times for both.
Subscribe to:
Posts (Atom)