13 April 2014

New Place On The Internet

Hi everyone,

I am excited to tell you that I have finally made the decision to move my blog to my own website, unfortunately thatcodeplace.com was already taken so I started thinking about alternative names. Eventually I settled for thatcodecorner.com I like the name, it has the same feel that I was going for with this name, a cool place to hang out and talk about code and things related to being a developer.

I hope you will join me in my new home on the internet and we can take this beautiful journey called life together.

-R

12 April 2014

Habits, the good ones

I often wonder how certain people can be so good at what they do. When I look at sports stars or successful writers I often think to myself what separates those people from me? What i takes them to the next level? I believe that there are numerous factors that contribute to the success of those people, but I think one pattern that I have seen is easy to implement. Good habits.

When watching someone famous give an interview the number one piece of advice you will hear from them is "never give up". That is true, but giving up or not giving up is a habit. You can develop a habit of completing things and seeing things through to the end, just like you can develop a habit of giving up and always taking the easy way out.

Spiral Effects of Habit
Habits create their own inertia, that's why it's difficult to give up smoking if you've been doing it for years. The good news is that the same applies for good habits. Want to get into the habit of doing something productive, like say creative writing? You should just start writing, don't worry about being good or bad, just get into the habit of writing once a day for twenty minutes. Now the general rule of thumb on the internet is that if you do something for 21 to 30 days you will create a habit, I've found from personal experience that it sometimes takes a bit longer. Especially if it's something you are not naturally good at. The trick is to keep at it, eventually the habit will create it's own inertia and it will become easier and easier to stick to your writing.

However you should be careful because the same is true for negative habits, like the ones I've mentioned before, once you start taking the easy way out it becomes easier to do next time and before you know it you are coasting.

One day at a time
I remember reading something that has stuck with me for years, unfortunately I can't find it again but the story goes something like this (I'm going to paraphrase liberally since I can't find the original story):
"I was extremely overweight, I decided to do something about it. So I got a personal trainer and asked her to help me lose weight, things were going well but one day I was running up some stairs with my trainer and then it hit me. I am going to have to do this every day for the rest of my life. And suddenly my energy drained out of me and I stopped running, I was out of breath and told my trainer that I could not do this, there was no way I could do this for the rest of my life, the tears were coming to my eyes. My trainer looked at me and said, -Don't worry about the rest of your life, that will take care of itself. Worry about the next step, and once you've taken that one worry about the one after that. Before you know it you will be done and you will feel great-"

It's always stuck with me, even though I can't remember the source. Sometimes I get overwhelmed by the idea of starting something new. My stress levels go up and I start worrying about things that may or may not happen, I worry about failure, I worry about making a fool out of myself, what will people think of me?

But the above story is a great reminder that I should focus on the next step. If I want to learn a new habit I won't do it by stressing about failure. You learn new habits by doing things in the present, not by thinking about things in the future. Take the next step, and then the one after that...

Find something that works for you
There are a few habits that everyone can benefit from, exercise more, eat healthy be a good person. The good thing about those habits is that they will allow you to build on them and create more good habits, it's a lot easier to learn to write when your mind is fresh from some early morning exercise. In fact I believe that the above three habits will allow you to build a solid foundation for building more good habits on them. They are essential in my very humble opinion :)

One thing that a lot of people get wrong is they believe that they can create a habit using sheer willpower. I'm sorry to tell you this, but you probably can't. Willpower belongs to the pre-frontal cortex, and this piece of your brain is the one that burns the most energy and it the most susceptible to fatigue. And guess what, if you are relying purely on willpower you will get tired one day. Then that chocolate that you've been successfully ignoring for the past two weeks will be consumed.

So find a system that can remind you, or help you when your willpower drops. I found using HabitRPG works for me. It combines things I love the most getting better at things, a list like structure that allows me to tick things off and levelling up!

Find your system, hack at it and make it work for you.

Conclusion:
Self improvement is something that I am really passionate about, I expect that I will write about this and similar topics again in the future. The point I was trying to get across is that to become really good at something you need to Cultivate Good Habits and Prune Bad Habits. If you do this even for just a month you will look back at your month and stare in amazement at the big difference in your life. And the lives of the loved ones around you.

One final word of warning, don't try to break all your bad habits all at once. Rather attack them one at a time as you defeat one bad habit the others start losing their grip on you. Divide and conquer.

-R

30 March 2014

Build Scripts

Recently I had a chance to create a build script at work for one of our existing projects, for numerous reasons that are besides the point this blog the project didn't have any form of build procedure.

To compound the problem we have multiple builds for different clients each build with it's own settings, all being done manually. So I recommended a build script and got the go ahead, which made me happy.

In this post I will speak about why having build automation is a good idea from your side as a developer. When starting off a project, it might seem like a build script is a waste of time, however if you expect the project to grow (which you should, otherwise why are you building it?) you will need it, even if it's just a simple ANT build script.

There are a list of advantages you should know about when doing build automation but I will let you Wikipedia it yourself, I will rather talk about what it will do for you, the humble developer.

Peace of Mind
Sometimes, unless you are working for a really huge company you might have to do the deploys yourself. Development is a complex task, why would you want to worry about if you are doing the deploy correctly? Are all the jars there? Did you configure the database connection information back from test?  Even if you are not the one doing the deploys, do you really want to give someone else the chance to break your code with a sloppy deploy? These are all needless worries and even if you are really good at remembering all of these, you are wasting your time doing them. Which brings me to my second point.

It's what computers are good at
Computers are good at doing repetitive tasks with one hundred percent accuracy. A computer will do the same thing it's told without getting tired or bored. It doesn't care if it's Friday afternoon and you have to meet your friends after this build for a few beers. You do care, and you should. So let the computer work on the Friday afternoon while you enjoy a few beers with your friends.

Develop quicker
Proper build automation will allow you to focus on development. On releasing awesome code quicker and with more frequency. There is a reason that a proper build procedure is part of the Joel Test in fact it is Step 2. Being able to build with only one button will allow you to iterate over bugs quicker because you don't need to spend brain CPU cycles on what you need to do once you finish this line of code. You code, press play and check if things are working.

Conclusion
As per the Joel Test, I agree that a proper build procedure should be the second thing on your mind, if you don't have one you are making your life needlessly difficult and unpleasant, and who needs that? Am I right?