2012 is a new year and for many, a fresh start. I see 2012 as an opportunity to do something new, start fresh on other items and a chance to turn a new leaf. Often, your colleagues, bosses and friends whom known you for a long time and will not allow you to turn a new leaf; Do it anyways! Push forward in making yourself a better person this year. Do not let others hold you back. This is your chance to rid yourself of bad habits, learn something new, implement new ideas and grow as a person. Continue reading New Year – Fresh Start
Category: self-improvement
Driving to Your Goals
Monday night at London Western Toastmasters, I gave a speech about getting the momentum going. It was geared to getting used to speaking, getting in front of the club and practicing. I had equated it to driving a 5 speed transmission car. When we start looking at our goal, we are stuck in neutral. Continue reading Driving to Your Goals
Be Kind to Those You Meet
You never know when you meet someone what they will be to you in your life. You may meet them in a service club, be a customer of yours, be a friend or an in-law. You just never know when that argument with the sales associate be something that bites you down the road. Continue reading Be Kind to Those You Meet
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.
Can Senior Developers Learn From Junior Developers
I relate this back to when you are listening to grandparents tell story after story. Somewhere in those stories you learn from their history. Now when they ask about you, they learn more modern things. Like the time I showed grandpa how to tour castles from my computer. He learned that there was a tremendous amount of information at their fingertips, if they embraced something new.
It is important to listen to each other. We as senior developers have lots to teach, but we also have lots to learn. Most of us have been doing the same thing day-in and day-out. We have learned new languages and new technologies, but not necessarily to the extent of the new developers joining your team. They have recently exited their programs to join the work force. During their college or university days, they had a hunger to learn. Most of them soaked up everything their teach taught them and then explored other avenues and ideas to a greater extent. New developers are little sponges and you never know what they have absorbed during their school. Most after graduation have continued their learning either through their senior developer, through further schooling or simple through other means like reading or internet.
I am a believer that I cannot know everything and that everyone has something to teach me. I have had some very good junior developers show me some cool new tricks. Through those new tricks, I am able to show them how to refine those tricks into something truly amazing. There are some great minds out there.
Remember, today’s junior developers are doing things that we did not even fathom at their age. I went to school with Windows 3.1, OS2 warp and COBOL programming. They went to school with DotNet, PHP and Windows 7 and Linux.
I currently do not have a junior developer working with me, but when I did; I used to have Monday mornings as a sharing time. We would meet in the boardroom (breakfast sometimes) and share what we have learned or done. We also used to discuss issues or choices. We used this opportunity to learn from each other.
Listen to what your juniors have to say. You may just learn something as well as teach them something.
Related Reading: Can Senior Developer Learn From Junior Developers
How a Senior can Help a Junior Developer
Senior developers have a responsibility to help those who are new to the profession. We are the one group of people that the junior developer can turn to after college. Essentially the college gave the new developer 2 years of education, a piece of paper and tossed them out to sink or swim.
I personally do not like to see anyone sink. I believe no matter what the skill set is, a person could be a little better if a helping hand is given. I am not suggesting a babysitter, as no one really wants that. I am suggesting an open door, an open mind and a little patience. Juniors will make mistakes and they will often be a little cocky thinking they know it all coming out of school, but we need to remember their minds are still in the stage of learning.
Juniors can learn much more at their stage in life. Their minds are like sponges and soak in the good and bad habits and knowledge that we share with them. The best thing we can do for them is to teach them everything we know, encourage them to do extra learning on their own and to listen to them. When I last managed a small team, I asked for a weekly report, which consisted of:
1. What are they working on?
2. Where are they on the schedule of tasks?
3. What obstacle have then encountered? Are they still stuck, if not how did they over come it?
4. What is one thing they learned new this week?
During our weekly meeting, I would get one or two of the developers to talk about either the obstacle or their new found knowledge with the rest of the team. This way all new and old developers had a chance to share and learn from each other.
In summary, help them learn in every aspect. Listen to their ideas and new found knowledge. Have an open door for questions. Lastly; be cautious of your bad habits.
Related Reading: Can Senior Developer Learn From Junior Developers
Are You Everything That You Can Be
Upon personal reflection, I realized that I could be more. I have been putting my time and energy into the wrong things. Watching TV, internet surfing and generally mucking around. This weekend I spent hanging out with my one year old son, watching the Jack Layton state funeral and reading a library book: Made in Canada Leadership. I suddenly feel inspired to do something different.
Are you everything that you can be? Not yet, but I am going to work on it. Will not happen over night, but I will certainly aim for it. I decided the first step is to understand what is happening in London by setting my PVR for the council meetings. A little education will help.
Now ask yourself the same thing: Are you everything that you can be? You cannot be everything overnight, but you can strive for it as a personal goal.
What are you bringing to your team
Every team has a slacker. Your team can be at work, on the rink, ball diamond, or your marriage. Are you the slacker? Why are you the slacker? Are you listening to people other than yourself?
Everyone has the ability to listen to themselves, but are you listening to others. If you are not listening, you are probably not contributing to your team fully. Your team needs you. It is not about your needs ( well may be a little ). If you make it more about your team, you will be a better person and team player.
There are various reasons that you may not be bringing enough to your team:
- You may not be aware. Try listening
- Your skills may not be up to snuff. You know how to learn – so do it.
- You are bored. Really? Learn something new. Try something new.
- You are lazy. Sorry, I cannot help you with that. Look in the mirror and see if you can live with it.
- You do not respect your team member(s). Why not? Figure it out and resolve it. Everyone has a different personality, learn the good things about that person(s)
- You are too quiet… sit up and use your voice.
Who Is Andrew Pallant
I was recently asked the question “Who Is Andrew Pallant?“. Although I am Andrew Pallant; I find this question very complex and complicated to answer. One must reflect ever so often to rediscover who you are and what you are doing. As I was caught off guard by the question, I had to pause and think. This was hard. Can you answer the question freely?
Here is a series of questions to ask yourself:
- Who is <>?
- What am I doing?
- Am I adding value to my life?
- Am I adding value to others?
- What are my current goals in my personal life and professional life?
- Am I completing my goals?
Andrew is a proud father of 2 children. I am a confident person who works hard. Whenever I am given a task or take on a task, I give 120% of myself. I never take short cuts. When I manage or lead a team, I am firm, fair and open to new ideas. I do not like to miss deadlines, but if I do, there must be a really good reason. I am friendly, generally fun, and always sincere. When I am on a team, I listen to others, and try to learn from them. I am continuously learning and listening as I believe no one can know everything.