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?

09 November 2013

Why Linux?

I am a huge Linux fan. I love the idea of open source, I love the idea that information wants to be free. I think that Linux has done a lot of good for the entire computer industry. In fact I believe that in future all operating systems will be free. Apple has already moved in that direction (I say free as in free beer).

In this post I want to explain why I think Linux is awesome as a desktop. There are a bunch of reasons why you would not want to use Linux and maybe I will write about that some time but in an attempt to keep my post focused I will write about what I think are the good points.

Free (as in free beer)
Free is an awesome price point and cannot be argued with. There are many flavours of Linux and with some research you will be able to find something to your tastes, best of all it's free. I have not included the "Free as in free speech" argument because to be honest the people who care about that are most probably already on Linux and the people who don't... well they just don't and it doesn't matter.

Secure
Linux is a super secure operating system. Trojans, viruses and other forms of malware basically don't exist on Linux. Open code and fast response time to vulnerabilities all contribute to Linux being one of the most secure operating systems around. This is in fact one of the best reasons to install Linux for people who don't know their ways around computers all that well. There is nothing as frustrating as being new to computers and then having your computer infected with some form of virus.

Easy on Resources
Operating systems these days are getting resource hungry Windows 8 is a perfect example, where the minimum recommended amount of RAM is about two gigabytes. Linux is a lot less resource intensive, you can happily run Linux on older, slower hardware. Also Linux runs well for longer, in my experience Windows starts to get slower the longer you have it running.

Free Applications
You will find free versions of most of the applications you work on in Linux, now that does not mean that those versions will automatically be better. However if you are starting out with something, say for example image manipulation and you don't have a specific favourite tool, you can easily look at something like GIMP or Blender if you want to do some 3D rendering. Also most of the applications you already use are available on Linux (firefox, chrome, dropboxvlc and many more).

Final Note
Those for me are some of the really cool reasons to use Linux, but remember it's better to use the right tool for the right job, if Linux is not the tool for you then use whatever is right.

16 March 2013

Bad Blog Posts

Image courtesy of Master isolated images / FreeDigitalPhotos.net
I spent a lot of time on my On JPA blog post, so it's hard for me to admit this but after some time went by and I read it again I realized it's bad. The information in the post is valid and correct however the post itself is still bad. To understand why that post was bad you have to understand why I decided to write on a blog in the first place.

The Reason(s)
I have two reasons. Firstly I want to improve my communication skills, I want to be able to get my point across accurately and effectively. Secondly I want to make other peoples lives easier, now that I have started to grasp the basics of what it means to be a developer (although I still have a long way to go) I hope that in some way I can make this awesome journey easier for someone else.

The Bad
So why do I consider my On JPA post bad? JPA is a huge concept the entire JPA specification should not be explained in one blog post. Well at least not by someone who is not a master at it. I understand JPA, I've worked with it a lot I am not a master at it (yet). So I tried to cover a topic that entire books are dedicated to in a +- 800 word blog post. Perhaps if I had a few more years experience with JPA and with writting I would have been able to pull it off at my current level I did not do JPA enough justice. So instead of a high level overview of what JPA is about there was a somewhat chaotic post on JPA at some places on a high level and at other places focused on the details.

The Good
There was something good that came out of this, I learnt how not to do blog post (yet). I think for now, until my writing skills level up a bit I will stick to writing blog posts on more focused topics, so instead of doing a high level overview on JPA I will instead do multiple, detailed posts focusing on the different aspects of JPA with maybe a small high level section where I explain where this specific element fits into the big picture.

The Conclusion
I think the reason I attempted to do such an ambitious post is because that is the way I prefer to learn concepts, I try and first understand something on a high level; where does it fit in, what has it been designed to do, what specific problem does it solve well etc. and then I start to get into the details. It always frustrated me when blog posts focused on one or two specific details and didn't explain the high level ideas and concepts, but now I understand why, it is difficult to do this correctly/well and it takes years of practice.

Not Good Enough
I can hear what you are thinking, this is not good enough, we need to understand what the high level concepts are, otherwise we will get stuck at every small issue. Well I agree with you. One day I hope to be able to effectively and accurately write about ideas and concepts, when that day comes I will gladly re-write my On JPA post. For now I would suggest that you read books on the concepts. I can highly recommend EJB 3.0 in Action this book covers JPA very well. I see the 3.1 in Action is going to be released soon, the "In Action" books have always been great so maybe it's better to wait until that one is out, although Entity Beans are deprecated in EJB 3.1 so there might not be a section on JPA.