Category: Team Manager

Senior should be a Junior for a Day

There are times where a Senior Developer should take a step back and become a Junior Developer.  There are times when a Junior Developer can teach a Senior Developer new skill, thoughts and patterns.  Granted there are a fair number things that Senior Developer can teach a Junior Developer.  In this blog I will discuss why a Senior should become a Junior – for a short time.  Continue reading

Importance of Code Refactoring

By continuously improving the design of code, we make it easier and easier to work with. This is in sharp contrast to what typically happens: little refactoring and a great deal of attention paid to expediently adding new features. If you get into the hygienic habit of refactoring continuously, you’ll find that it is easier to extend and maintain code.
—- Joshua Kerievsky, Refactoring to Patterns

I had recently seen the above quote while sifting through some periodicals that I read and it reminded of the importance of Code Refactoring. Refacotring is a mindset that you must put yourself into. You have to decide that you do not write perfect code the first time and that there may be some room for improvement. An hour or two a day may be all you need to review your own code.

I recently spent two hours reviewing code from one of my modules that I had written. It had the same or similar code written in 5 sections in the code and had the same purpose to these sections. Each section had 11 or more lines of code in it. I took one of those sections of code and converted it to a function and then replaced the 5 sections with this new function. Ultimately I had eliminated 51 lines of code out of one module.

Reasons for Refactoring Code
1. Consolidating and eliminating “Like” or “Similar” Code
2. Breaking out a extraordinary long function into more manageable bites
3. Make error trapping easier to handle
4. Make code more readable and maintainable
5. Removing nested IF or logic Loops
6. Make it easier to document
7. Create Reusable code
8. Better class and function cohesion.

The benefits now are the following:
1. Similar code is now the same which is the way it was meant to be ( coded over three days, the code morphed a bit ).
2. Since the code had the same purpose, it looks the same now and behaves the same.
3. Code is in one spot instead of 5 – makes it easier for a base change
4. Error trapping is much more controlled.

If you cannot review your own code ( some people cannot and should not be ashamed for it ), you should get yourself someone you can trust to review the code for you. The do not have to modify the code, they can either insert comments to you, print out and scribble on the pages or meet with you. Never take it as bad thing if someone wants to change your code; take it as a learning experience. If you are using someone else, challenge them back. Make sure they know what they are talking about. A face to face meeting is always a good idea. A mentor, or team lead should be taking on the role of code reviewer. Code reviewer should be recommending ways to refactor your code. This should be done prior to release, deployment and ending a project. The review should always be done with the developer(s) responsible for writing the code. Should never be done without as that undermines the developer(s) and no one learns anything from it.

New Project or Team Manager – First Two Weeks

There are plenty of tasks a person could do in their first two weeks as a new Project or Team Manager.  I have isolated some of the more important tasks that need to be addressed in the first two weeks of starting the new position.  Mind you these can vary depending on the size of team and the discussions with your new superior.

  1. Discuss your role and management styles with new superior.  Ensure you are both on the same page.
  2. Become intimate with company policies
  3. Get to know everyone on the team including their name, responsibilities
    and what they have done in the past
  4. Review all project descriptions and time lines
  5. Find out what each team member is currently working on and where they are in the time lines
  6. Compare where each team member is at on the time lines with the actual time line
  7. Discuss progress with My Boss
  8. Team Meeting
    • discuss priorities
    • discuss what everyone’s expectation is.
    • discuss what I expect of them
    •  ideas to get the projects back on track
    • look for team suggestions
  9. Discuss progress with my superior
  10. Meet with each member
    •  – discuss where they are in the project
    •  – together figure out how to advance in a more efficient way
    •  – set some realistic goals
  11. Discuss progress with my superior