« back

Angeleah - Meet JAVA

13 Nov 2012

It's time to put and end to the confusion.

On Sunday, at Coderetreat as we introduced ourselves to the group, we were instructed to state what languages we felt comfortable in and then to state which languages we would want to work in for the day. We were encouraged to try something new if we felt comfortable with it. I decided that this could be a great way to get my feet wet with Java. I have never worked with a language that uses static typing. I always see example code in java and hear people talk about it's patterns so I figured nothing bad could come out of this besides some extra strokes on the keyboard. I was paired up with John Ryan (@jtigger), who was no stranger to Java. Luckily for me, he has experience working with n00bs, and was very clear and helpful in answering my questions about the language constructs.

While we were working on things, I would have a question and then I found that often times my response was something like "Oh, that's like this thing in Ruby." After doing some driving while we paired, I was warming up to this and no longer felt intimidated by the verbose nature of the beast. Then came exceptions. This was the first time seeing how exceptions worked. I had heard the term thrown around and had added it to my running list of terms and concepts to check out. I wasn't really getting it. John elaborated. He worked with me over lunch and hacked together an example using a vending machine. It turns out, for those of you who don't know, an exception is really just an event that occurs during the execution of a program that disrupts the normal flow of instructions. I was confused about why, if you would be in the situation with an exception, you would not just fix your program so that there were no problems. I just kept thinking, well, if you know this is going to break here, shouldn't you just make your code better? I was failing to see the usefulness. Then John pointed out that if you were designing an API, other people would be working with your code and that having an exceptions would be useful for times when people were possibly using your code improperly. Ah! The light clicked on.

Now, while working on my chat server in Clojure, I was set to use the clojure.contrib.server-socket but guess what. Where did Clojure Contrib server socket go? Into the abyss. Yes, that's right, no one has taken up that cross to bear and it's gone. I will need to rely on using something from java land in my project now and my little intro could not have come at a better time. Now, while I am feeling my way around in chat server darkness, I can rest assured when I come across java I will not feel like I've run into a monster in the dark.

Sweet! Thanks John!

comments powered by Disqus