tag:blogger.com,1999:blog-90438818442678504182024-03-13T16:02:22.241+02:00That Code PlaceJourney of a developerUnknownnoreply@blogger.comBlogger8125tag:blogger.com,1999:blog-9043881844267850418.post-79316091803122504892014-04-13T19:53:00.000+02:002015-04-27T20:49:30.544+02:00New Place On The InternetHi everyone,<br />
<br />
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 <a href="http://thatcodecorner.com/">thatcodecorner.com</a> 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.<br />
<br />
I hope you will join me in my new home on the internet and we can take this beautiful journey called life together.<br />
<br />
-RUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-9043881844267850418.post-38529795668401661512014-04-12T13:30:00.003+02:002015-04-27T20:48:03.403+02:00Habits, the good ones<div style="text-align: right;">
</div>
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.<br />
<br />
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.<br />
<br />
<u><b>Spiral Effects of Habit</b></u><br />
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.<br />
<br />
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.<br />
<br />
<u><b>One day at a time</b></u><br />
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):<br />
"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, <i>-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-</i>"<br />
<br />
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?<br />
<br />
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...<br />
<br />
<u><b>Find something that works for you</b></u><br />
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 :)<br />
<br />
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.<br />
<br />
So find a system that can remind you, or help you when your willpower drops. I found using <a href="https://habitrpg.com/" target="_blank">HabitRPG</a> 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!<br />
<br />
Find your system, hack at it and make it work for you.<br />
<br />
<b><u>Conclusion:</u></b><br />
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.<br />
<br />
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.<br />
<br />
-RUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-9043881844267850418.post-48440542460701642882014-03-30T11:38:00.002+02:002015-04-27T20:48:16.285+02:00Build Scripts<div style="text-align: left;">
</div>
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.<br />
<br />
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.<br />
<br />
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 <a href="http://ant.apache.org/" target="_blank">ANT</a> build script.<br />
<br />
There are a list of advantages you should know about when doing build automation but I will let you <a href="http://en.wikipedia.org/wiki/Build_automation" target="_blank">Wikipedia </a>it yourself, I will rather talk about what it will do for you, the humble developer.<br />
<br />
<u>Peace of Mind</u><br />
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.<br />
<br />
<u>It's what computers are good at</u><br />
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.<br />
<br />
<u>Develop quicker</u><br />
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 <a href="http://www.joelonsoftware.com/articles/fog0000000043.html" target="_blank">Joel Test</a> 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.<br />
<br />
<u>Conclusion</u><br />
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?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-9043881844267850418.post-70167385080693019772013-11-09T20:25:00.003+02:002013-11-09T20:25:26.159+02:00Why Linux?<div class="separator" style="clear: both; text-align: center;">
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/512px-Tux.svg.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/512px-Tux.svg.png" width="275" /></a></div>
I am a huge <a href="http://en.wikipedia.org/wiki/Linux" target="_blank">Linux</a> 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 <a href="http://www.apple.com/pr/library/2013/10/23OS-X-Mavericks-Available-Today-Free-from-the-Mac-App-Store.html" target="_blank">direction</a> (I say free as in free beer).<br />
<div>
<br /></div>
<div>
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.<br />
<br /></div>
<div>
<b><u>Free (as in free beer)</u></b></div>
<div>
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.<br />
<br />
<b><u>Secure</u></b><br />
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.<br />
<br />
<b><u>Easy on Resources</u></b><br />
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.<br />
<br />
<b><u>Free Applications</u></b><br />
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 <a href="http://www.gimp.org/" target="_blank">GIMP</a> or <a href="http://www.blender.org/" target="_blank">Blender</a> if you want to do some 3D rendering. Also most of the applications you already use are available on Linux (<a href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">firefox</a>, <a href="https://www.google.com/intl/en/chrome/browser/" target="_blank">chrome</a>, <a href="https://www.dropbox.com/install?os=lnx" target="_blank">dropbox</a>, <a href="http://www.videolan.org/vlc/index.html" target="_blank">vlc</a> and many more).<br />
<br />
<b><u>Final Note</u></b><br />
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.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-9043881844267850418.post-43098414055450458292013-03-16T10:14:00.003+02:002013-03-16T10:15:22.945+02:00Bad Blog Posts<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; height: 218px; margin-left: 1em; text-align: right; width: 211px;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-Q7YRxIRAPtc/UUQb29mDAsI/AAAAAAAAAKI/tPNiOD4UdUM/s1600/20130316.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="http://1.bp.blogspot.com/-Q7YRxIRAPtc/UUQb29mDAsI/AAAAAAAAAKI/tPNiOD4UdUM/s200/20130316.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Image courtesy of <a href="http://www.freedigitalphotos.net/images/view_photog.php?photogid=1962" target="_blank">Master isolated images</a> / <a href="http://freedigitalphotos.net/">FreeDigitalPhotos.net</a></td></tr>
</tbody></table>
I spent a lot of time on my <a href="http://thatcodeplace.blogspot.com/2013/03/image-not-related-on-jpa-if-you-have.html" target="_blank">On </a><a href="http://www.blogger.com/blogger.g?blogID=9043881844267850418" target="_blank">JPA blog</a> 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.<br />
<br />
<u><b>The Reason(s)</b></u> <br />
I have two reasons. <b>Firstly</b> I want to improve my communication skills, I want to be able to get my point across accurately and effectively. <b>Secondly</b> 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.<br />
<br />
<u><b>The Bad</b></u><br />
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 <i>and</i> 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.<br />
<br />
<u><b>The Good</b></u><br />
There was something good that came out of this, I learnt how <i>not</i> 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.<br />
<br />
<u><b>The Conclusion</b></u><br />
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.<br />
<br />
<u><b>Not Good Enough</b></u><br />
I can hear what you are thinking, this is not good enough, we <i>need</i> to understand what the<b> </b>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 <a href="http://thatcodeplace.blogspot.com/2013/03/image-not-related-on-jpa-if-you-have.html" target="_blank">On JPA</a> post. For now I would suggest that you read books on the concepts. I can highly recommend <a href="http://www.manning.com/panda/" target="_blank">EJB 3.0 in Action</a> this book covers JPA very well. I see the <a href="http://www.manning.com/panda2/" target="_blank">3.1 in Action</a> 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.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-9043881844267850418.post-5690991810563539192013-03-14T12:35:00.002+02:002013-03-14T12:35:25.401+02:00On ProcrastinationI'll write this one some other time.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-9043881844267850418.post-50138717421450099142013-03-10T18:36:00.002+02:002013-03-16T14:51:23.209+02:00On JPA<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-lcgvKhm4P0M/UTyzFbPw9YI/AAAAAAAAAJ4/wpfPjP_HS28/s1600/JPAblog.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="149" src="http://2.bp.blogspot.com/-lcgvKhm4P0M/UTyzFbPw9YI/AAAAAAAAAJ4/wpfPjP_HS28/s200/JPAblog.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Image NOT related :)</td></tr>
</tbody></table>
NOTE: Feel Free to read this post, however read <a href="http://thatcodeplace.blogspot.com/2013/03/bad-blog-posts.html" target="_blank">this </a>first<br />
<br />
If you have ever done any amount of <a href="http://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition" target="_blank">Java EE</a> development you have probably come across JPA (<a href="http://jcp.org/aboutJava/communityprocess/final/jsr317/index.html" target="_blank">The Java Persistance API</a>) a <i>few</i> times. In this article I will write a high level overview on JPA and what tools the API provides.<br />
<br />
JPA consists of three main areas of functionality: Object Relational Mapping (ORM), The Entitiy Manager and the Query Interface (JPQL and native queries). Each of these sections deserves an entire post on it's own, for now I will only be providing an overview and as I get time I will write the more detailed posts.<br />
<br />
<u><b>1. Object Relational Mapping (ORM)</b></u><br />
On a high level ORM is a way of working with objects in your program that represent data inside your database. The beauty of this is that developers are abstracted from the database level and can work with what they know best, objects. The only difficulty is the initial work required to map your Java Entities to your database tables, columns and relationships between tables (This step is very difficult because doing this incorrectly can create massive performance issues, consider yourself warned). This mapping is done using annotations. There is a lot to ORM, in this post I will only cover the basics.<br />
<br />
These are the most frequently used <a href="http://www.objectdb.com/api/java/jpa/annotations" target="_blank">annotations</a> in ORM, learn them well:<br />
<br />
<b>Class Level</b><br />
@Entity - Marks this class as an Entity.<br />
<br />
<b>Field Level</b><br />
@Id - Marks a specific column as the Identifier.<br />
@Column - Marks a variable as a column in your database, most frequently used when your Java instance variable names don't match your column names, along with the <br />
@Basic - Mostly <br />
<br />
<b>Field Level: Relationships</b><br />
@OneToOne - Marks a typical One to One relationship.<br />
@OneToMany - Marks a typical One to Many relationship.<br />
@ManyToOne - Marks a typical Many to One relationship.<br />
@ManyToMany - Marks a Many to Many relationship.<br />
<br />
<br />
Using those annotations you should be able to map your classes to your tables pretty easily, doing this efficiently however takes some experience, don't get discouraged. There are other things I would like to talk about, like <a href="http://docs.jboss.org/hibernate/orm/4.0/hem/en-US/html/listeners.html" target="_blank">JPA Entity LifeCycle Listeners</a>, mapping <a href="http://en.wikipedia.org/wiki/Compound_key" target="_blank">Compound Keys</a> and Inheritance, but that will have to wait for another time.<br />
<br />
One final thing on ORM, I would highly recommend you read up on <a href="http://en.wikipedia.org/wiki/Domain_model" target="_blank">Domain Modeling</a>. This knowledge will make you a better/more rounded developer, not only when working with JPA but overall.<br />
<br />
<u><b>2. The Entitiy Manager (EM)</b></u><br />
This is the workhorse of JPA, on a high level the entity manager is used for the <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete" target="_blank">CRUD</a> operations in your application. The EM also manages your entities at long as those enties are within scope of the EM. Management of entities and the two persistance contexts (Transaction-scoped Persistence context and Extended Persistence context) will be covered in the detailed article but if you really can't wait feel free to read up on them. :)<br />
<br />
JPA can be used outside of a container, because of this there are two ways for an EM to be created and managed. The EM can be container managed or application managed. If you really can't use a container then you can create a EnityManager using an EntityFactory. I won't be covering application managed EMs but it's useful to know you can use JPA when a container is not available.<br />
<br />
Using a container you can inject an EM into your bean with the <a href="http://docs.oracle.com/javaee/6/api/javax/persistence/PersistenceContext.html" target="_blank">@PersistenceContext</a> annotation once you have access to the EM the following methods should interest you most:<br />
<br />
<a href="http://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html" target="_blank">EntityManager</a> methods:<br />
find: look up provided entity by pk<br />
merge: updates an entity to the database (almost like a database UPDATE statement)<br />
persist: saves a new entity to the database (almost like a database INSERT statement)<br />
remove: deletes provided entity from the database<br />
<br />
The EM has other interesting methods like clear and flush but I encourage you to look them up yourself. I am going to cover some more EM methods in the next section.<br />
<br />
<u><b>3. Query Interface</b></u><br />
I covered the find method in the entity manager but that method is pretty one dimensional, it's not often that you lookup data only on the primary key. JPA therefore provides us with another useful object, Query. You create a Query object using your EM and since I'm sure that you read the Java docs on EM I provided earlier you'll know that I am talking about createNamedQuery, createNativeQuery and createQuery methods.<br />
<br />
Let me speak about Dynamic Queries and Named Queries quickly. A Dynamic Query is created as part of your createQuery method you type the JPQL or native SQL as part of the method invocation so for example em.createQuery("Select c from Customer"); or em.createNativeQuery("Select * from Customer"); Named Queries on the other hand are defined in the Enity class itself (using the <a href="http://docs.oracle.com/javaee/5/api/javax/persistence/NamedQuery.html" target="_blank">@NamedQuery</a> annotation) and are available everywhere that has access to that Entity. Good candidates for Named Queries are queries that will be used by different parts of your application.<br />
<br />
Now for Native Queries and JPQL Queries (Java Persistence Query Language), JPA allows you to create a Query object by writing the native SQL of your DBMS provider. This is discouraged as one of the big benefits of JPA is that is allows you to swap out DBMS providers with little to no code changes, using native SQL in your application will greatly limit this ability. Rather write JPQL, this is a more generic Query Language that your persistence provider then translates to native sql.<br />
<br />
Using the Query Interface you can retrieve data from your database based on a multitude of different conditions. If you are going to be working in JPA for a significant amount of time I suggest you learn JPQL well.<br />
<u><b><br />Final Word Before The Conclusion</b></u><br />
There is a bit of confusion about the difference between JPA, Hibernate and Persistence Providers so let me see if I can clear it up a bit. <a href="http://www.blogger.com/link%20http://jcp.org/aboutJava/communityprocess/final/jsr317/index.html" target="_blank">JPA</a> is the specification that has been defined by the Java EE guys, this is basically a document that tells application servers (or in this case Persistence Providers) what they have to do to be considered compliant. Application Servers use what is termed as Persistence Providers that implement the JPA specification, although persistence providers can and do exist outside of the container. Finally what is Hibernate, well in the beginning the JPA was pretty cumbersome to use (or so I've heard I was lucky that I only started developing when EJB 3.0 and JPA 2.0 was available) and the smart people at Hibernate saw an opportunity to do a better job than the JPA was doing and that's when Hibernate came into existence. I hope that clears things up a bit.<br />
<br />
<u><b>Conclusion</b></u><br />
This article got a lot bigger than I expected, and there are lots of interesting topics that I did not cover, but I have taken note of them and will do so when I have the time. Overall JPA is a really cool API and it provides lots of powerful tools for the developer to use, if you are looking to write an application with database interactions I would highly recommend JPA, but be a word of warning JPA can cause performance issues if you don't know how to use it correctly so my suggestion would be to first research the topic and maybe even read a few chapters on a good JPA book.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-9043881844267850418.post-56336852078973523432013-03-03T14:54:00.003+02:002013-03-16T08:40:31.951+02:00On Technology Choices<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-Gk15lTQ3OIU/UTNHBSZETqI/AAAAAAAAAJo/PhUPws8w9mc/s1600/20130303blog.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="177" src="http://2.bp.blogspot.com/-Gk15lTQ3OIU/UTNHBSZETqI/AAAAAAAAAJo/PhUPws8w9mc/s320/20130303blog.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The Trees of Choice</td></tr>
</tbody></table>
In the Information world there are lot of different ways of dealing with obstacles, choice is a good thing... well mostly. The issue with lots of choices is that you get lots of different opinions from lots of different people. The best piece of advice I can give is to remember that _almost_ all technologies have their place, however their implementations depend on The Situation. Be wary of people who advise one technology or approach across all or even most, situations. Their intentions might be good but they are _probably_ wrong more often than they think.<br />
<br />
<b>No Silver bullets</b><br />
There are no silver bullets in technology. There is no single unifying technology or software or approach that will make your development three times faster and completely bug free, if someone claims that this I suggest you read about snake oil salesmen. There are technologies and approaches that are more appropriate in different circumstances for example if you are writing an application that allows other companies servers to connect to your servers and request data or do bank account validations, I would strongly recommend using web services for that. Also depending on your situation you might want to go with SOAP web services or use the RESTful style. That however does not mean that web services are automatically the best choice when it comes to servers speaking to each other, depending on your situation you might want to use FTP file drops or socket connections.<br />
<br />
<b>Solving Technology Choice Problems</b><br />
Often the solution to a technology choice problem is clear, there is an approach or technology that is superior, you have done something similar a bunch of times and you know where the hidden traps are. You know the strengths and weaknesses of your approach and you know that for this problem they fit perfectly. That's great I would still recommend a minute or two of quiet contemplation to figure out if you are not missing something and if you are happy then get it done.<br />
<br />
What happens when you encounter a new type of problem? As a side note, with technology and approaches changing so frequently I would suggest that you do this occasionally with problems you have solved dozens of times, this will just keep you on your toes and make sure your approach is _still_ the best one.<br />
<br />
<b>Four Step Choice Program</b><br />
<b>Step 1</b> <br />
Make sure you truly understand the problem, this seems like an obvious step but generally people tend to skip over it because they are excited to get their hands dirty. Trust me I know the feeling. I would still suggest that you spend some time just thinking about the problem, understanding what's at your problems core. What are you required to do so that the problem goes away? Do you need security? High availability? A database?<br />
<br />
<b>Step 2</b> <br />
Make sure you understand your constraints. There is a saying I have heard often, "Everything is possible given enough time and money". Unfortunately we rarely have enough time and _never_ enough money. In the real world we work with constraints, all the time. Only have java skills? This needed to be done two weeks ago? The servers will only arrive in three weeks? I tend to like constraints and that's why I think about them second. Understanding your constraints will save you a significant amount of time, because if I know that we only have java skills available for this task I won't bother looking at approaches that require C++. Why I like constraints is a topic for another time.<br />
<br />
<b>Step 3</b><br />
With your problem well defined and your constraints taken into account your next step is to do research. Even though your problem might feel unique I would suggest researching ways that other people have solved similar problems (and you should not have any issues finding similar problems since you did NOT skip step 1 and you truly understand the core of your problem). <br />
<br />
<b>Step 4</b><br />
After you have researched similar solutions to your problems I would suggest that you start planning how you are going to solve your problem. What approaches are you going to take? what technology stack does your problem need? How much coffee will be needed to implement? What infrastructure do you need?<br />
<br />
<b>After word</b><br />
Working in technology is awesome, there are so many problems to fix, so many different ways to do things you should never be bored, keep your ear to the ground pay attention to what people around you say and do. Most importantly keep learning, keep growing. There are still things I would like to write about on technology choices, I would also like to explore the steps above in greater details. However that will have to wait for another day.Unknownnoreply@blogger.com0