Important Java tip:
In a try-catch-finally block, finally is always called.
Do not assume that you are in finally because your try threw an exception. Cleaning up resources that you built in try during finally will really make your program fail.
Important Java tip:
In a try-catch-finally block, finally is always called.
Do not assume that you are in finally because your try threw an exception. Cleaning up resources that you built in try during finally will really make your program fail.
Now, I’m honestly trying to not work on the project specifics except during the work week of Monday – Friday. Granted, like everyone else; I find a project I like; I dive in with both feet. Ironically, the average diver would probably hazard trying to go in hands first. But, then again; I’m not a diver.
What this means is that I spend the weekend trying to refine the work that needs to be done. I spend it learning technologies, experimenting with them and dreaming how they will incorporate. Despite being a holiday weekend (well, Yulishmash spill-over) I knew there wasn’t going to be much to get done. Also, with family in town, I really can’t kick them out of my home office when it’s also the guest room. (Yes, my home office has a Thinking-Queen-Sized-Bed)
So, it was down to sitting on the couch with laptop and hashing out the following. First was refreshing Java. I touched Java aeons ago. This was probably back when you could count Java’s age on one hand. Java is not yet 20, though it did become legal this year in the states. I’ve done a boatload of C and a shipload of Objective-C, and maybe a dinghy of C++. But Java was something that I kept getting pulled back from spending too much time in. Believe it or not; I’ve survived as a third-party Apple OS developer for over 25 years.
Java itself isn’t so much the problem. Object-oriented code with some syntax adjustments. Obj-C protocols are Java interfaces… sort of. The problem with most OO languages are the libraries and the build processes. In java is comes down to Packages, Jars, ClassPaths, and the like. So to learn Java I also brought in Eclipse. Eclipse is a popular Java IDE. Well, after watching 5 horrendously painful lectures on the baby steps of Java for non-programmers, I was able to get the ever joyful “Hello World” up and running. But why stop there?!?
Next up was loading Tomcat. Tomcat is a web server that runs mini Java programs (known as Servlets). This allows me to do dynamic generation of content dependent on calls to a server. The server takes the request and passes it to the Servlet. The servlet uses java to parse the request, do stuff, and return data. So my next job was setting up Tomcat on my internal server (on the scared side of my firewall) and trying to write a Servlet.
This stage didn’t go quite as smoothly. Servlets have their own brand of packaging that goes even further into the world of Java. Thanks to some helpful folks at StackOverflow I was able to get a better handle on WEB-INF directories and my Java crashing web.xml file. Granted, after all that, the Servlet still wouldn’t run. After many hours it was sleep time.
Today, undaunted, I went back to the Servlet. I tried to figure out why the samples that came with Tomcat worked but mine belched “Resource not found” errors. Then I learned about how Tomcat Servlet paths worked and there was my happy “Hello World!” Servlet running on my Tomcat Server. (2 notches on the tinkerer’s belt)
So, obviously “Stuff” means fetching from the data store. We go to MySQL for that. This is a low effort relational database that will let me keep the data that I will pick and choose for my web requests. Client calls URL, URL hits Servlet, Servlet parses request, Servlet fetches from MySQL, Servlet pushes response out to client.
For those of you who do this all the time like it’s a piece of cake. Remember, some of us have been working on an entirely different kind of pastry. So, I salute the work you do so effortlessly. I hope to get there soon-ish.
Some fine tuning on a quick install of MySQL, a mini throw-away database and VOILA, Servlet is responding and showing a nicely formatted table. Now going back to the client; as previously mentioned I’m going to be using a data format called “JSON.” JSON has a lot of clients and APIs that can consume data in that format and turn it into something usable. So, next up on my agenda was finding a JSON library my Servlet could consume.
Remember, this is all seat of the pants, and I’m likely doing half of this all wrong. But if I can get a working proof of concept that looks good enough for seed money, then I can hire in people who do this for a living to do it right. So, I find an open source JSON java library. I even figure out how to turn it into a JAR (Java Archive) and soon was able to have a sample java program burping out my data in the much hoped for data format.
So, next up is moving this JAR and JSON code into the Servlet. Once that is there, we have an end-to-end request from MySQL JSON generator. But by then it’s the end of the weekend and it’s back to working on the client proper with the hand coded data set.
All this and I had a cold this weekend, too. It’s quite an adventure and I’m really thrilled with what we’ve accomplished so far. We being now a team of 5 contributors (including myself) even if half don’t really consider themselves contributors yet.
As we get closer to our Proof of Concept I will endeavor to get less vague.
Til next time…
Back to code!
A few thoughts going into Monday’s Sing-Off Season 4 Finale (this is being written before Monday’s show and does not take into account any of Monday’s performances).
Each of the three groups left has a different strength.
Vocal Rush has my heart; Ten has my head; Home Free has my ear.
Vocal Rush is full of youthful energy and exuberance. They have several strong leads and can pass the melody among them without a loss of momentum. I always find myself rooting for them. Sometimes the energy gets a little out of control and affects the harmony, but I have to really be listening for it, in most cases, for minor tuning issues to affect how I feel at the end of the performance. Which is usually wonderful.
I would be happy, and not surprised, if they won because they have an infectious sound and lots of potential. I would also not be surprised because, as a young group, they will bring the Glee and Pitch Perfect crowd to concerts and to iTunes.
Ten has experience, a mature depth to their choral sound, rich harmonies, and the ability to mix their voices to sound like even more than ten. I was surprised to learn in one of the background videos that none of them read music, and learn all of their parts by ear from the arranger (who is also the percussionist). They have been playing up their Gospel/Soul roots and it has been effective in showing off their style. I’m not the biggest fan, personally, of the gospel-revival “come to Jesus” arrangements BUT there’s no doubt that when they build a song up to that frenzy, it’s infectious (and also in tune).
I would be happy for Ten if they won. They will be great in a tour with other artists (either the SingOff tour or with other Soul groups). I do not think they will win because they are not quite commercial enough for Sony.
Home Free has tight, seemingly effortless harmonies, a smooth-faced, smooth-voiced lead, a kick-ass bass and a country swagger. I really love listening to them even though country is not my favorite genre. They have shown some growth and imagination in their arrangements; varying the style and drama within the song. I would like to see more of that variety and more of a build up to the climax of a song. That might be the only thing keeping them from being this year’s Pentatonix (more on that in a minute).
I would be happy if Home Free won. They show off the best of what a small a cappella group can do. I think they stand a fair chance of commercial success because Country music is hot, and Country fans are loyal. They may even have a rabid band of followers from the fair/festival circuit already.
One final note…
Since the P-word keeps getting brought up this year, the inevitable comparison to Pentatonix will surely show on the finale since they will actually be performing. None of this years groups are as good or as exciting at PTX. We have not seen Shawn Stockman stand up and laud anyone for “being sent from the future to save a cappella.” However, I think Home Free, and not VoicePlay, are this years closest equivalent because of the tight harmony (basically a quartet with a percussionist). Sure, PTX and VP each had four men and a woman, but in PTX, Kristi does not (usually) sing lead; she fills in the middle harmony. VP was much more “all about the girl”, almost like the guys were her backup singers. PTX has a lead but it always feels like an ensemble no matter who has the melody. Home Free has much more of the ensemble feel along with the close harmonies, but a much different energy.
Until next time…