Sunday, August 30, 2009

Why would you go to a conference that you have to pay for?

A co-worker of mine asked me last week, “You are paying for NFJS (http://www.nofluffjuststuff.com/)? Why would you do that? Why would you go to a conference that you have to pay for?”

This took me aback. How do I answer this? Where do I begin. Was he missing the big picture of being involved with technology? This guy is a very bright guy. Has his Masters from MIT, has worked on open source projects, and continually impresses me with his development skills.

I first began to list out the items laid out in Jared Richardson's talk about Career 2.0 (http://qik.com/video/1009098) which I had just happened to catch at NEJUG (http://www.nejug.org) the previous week. I suggest following the link on qik.com and watching that video as he is a much better presenter than I and can make his case much more eloquently than I could here.

However, one piece of Jared's talk that I felt was missing regarded money. During my college career, I spent over $100,000 on tuition and I didn't even get a degree in Computer Science (Geography for those interested). The biggest lesson I learned coming out of school was that I have to continue to learn or that $100,000 might as well have been thrown away.

So how can I continue to learn? I read books, go to lectures, listen to podcasts, do some side projects to learn new languages, and go to conferences. Conferences tend to be a concentrated time to find out what languages to learn, what practices to improve upon, and what books to read.

I believe the question should not be, “Why am I paying for NFJS?”. The question should be, “How can I afford not to go to NFJS?” If my company is not going to pay for me to improve, who will? How do not waste the initial $100,000 investment?

If you know a better way, then please let me know.

Wednesday, August 19, 2009

Tomcat Sessions and Java objects

Just ran into a problem today where we had a Java Object with transient member variables put into Tomcat's session. According to this thread in Java Ranch (http://www.coderanch.com/t/86379/Tomcat/Problems-disabling-Session-Persistence-Manager), objects put into session should implement Serializable. Member variables which are transient will not be preserved when being retrieved from session, and should be commented as such. This has lead to a few bugs in my code and was a gotcha that I never really thought of before, but makes perfect sense. Hopefully next time I will remember.

Friday, August 14, 2009

How to decode utf-8 entities in javascript

Let's say a request comes back from the server with ø in the response (which is gzip encoded because it is an AJAX call). A quick and dirty way to decode this entity in javascript is:

var encodedText = 'Gøøøse'

var temp = document.createElement('span');
temp.innerHTML = encodedText;
var decodedText = temp.innerHTML;
temp = null;

this will set decodedText to: 'Gøøøse'

Introduction

This blog space is going to be used to hold technical finds, solutions to problems I have been running into and things which I don't want to keep trying to remember. I will hopefully be entering information often, and maybe you will find solutions or useful links here as well.

I hope that some of the things written here are useful to others as well.

Jon