Thursday, February 26, 2009
Who Will Watch the Watchmen?
I'm a big fan of the Watchmen graphic novel. My wife and I have been very anxiously awaiting the opening of the movie. While previous Alan Moore movie conversions have been poorly received, I've got high expectations for this one. After watching the trailer I was quite surprised at how much the environment looked like it was taken directly from the book. We plan to go see the movie with some friends next weekend. So, who else will be watching the Watchmen?
Monday, February 23, 2009
Demo Day
Is there anything worse than demo day? I have a big review tomorrow and find out at the last minute that we must prepare a demo. Now in my mind, preparing a demo is something akin to performing a miracle. There's the ritual chanting (why aren't you working?), dramatic moments (leaping from your chair, tossing something across the room), and plenty of emotional extremes. But unlike all the great miracles, the demo doesn't last. You just hope it doesn't come undone during the show.
Friday, January 9, 2009
Java Serialization and Sockets
I remember working with sockets years ago and thinking how much work was involved to get simple messages over the pipe. Even though I was doing the sockets programming in Java, and Java greatly simplifies the actual socket connections, it was still intimidating designing a communications library and breaking everything up into bit streams.
Since then I've tried a number of high level communications schemes like CORBA, RMI, and web services. Let's face it, CORBA was just painful. The price of getting that high level connection was just too high. RMI was big improvement. With surprisingly little effort you could send fully instantiated objects over the pipe .. as long as the pipe didn't include any firewalls. Web services work great with firewalls, but you have to jump through hoops to maintain state. In case you haven't noticed, state is a pretty useful thing to have. Working in a stateless environment seems to be a step back into the dark ages. Of course, I can implement my own session state, but wasn't the initial goal to make things easier?
Recently I've been working with sockets again. But this time I've thrown Java serialization into the mix. This allows me to serialize high level Java objects and send them over the pipe without writing all the usual code to break the object down into bits and then recreate it on the other end. Sure, you still have to develop a communication language for the sockets, but far fewer commands are required, as everything is essentially just treated as a single piece of data.
While using sockets may seem like a step backwards, it is the single solution that provides both inherent statefulness and simple firewall traversal. I certainly won't be advocating sockets for everything, but if you find yourself working too hard just to get your network layer functioning maybe you should consider it.
Friday, May 9, 2008
Java and dot Net Integration with IKVM
A coworker of mine recently discovered a great Java and dot Net integration tool at IKVM.net. It is a customized JVM written in dot Net that provides a mechanism for dot Net to access Java code. I was skeptical at first, but have since been quite impressed with how well it works. We have a need for just such a tool on one of our current projects. As an interim solution we need to allow a dot Net application to access our Java framework. The distributed Java code uses RMI to communicate between modules. We provide a lightweight 'connector' that hides the communication layer and exposes public methods for the dot Net client. In the future we may provide web service style access and forgo the IKVM approach. But having done dot Net -> Java web services in the past I am not excited about doing it again.
Thursday, April 10, 2008
3000 Lines of Code a Day
I've been in a productive spell lately. Ok, maybe 3000 lines of code a day is an exaggeration. But I have definitely been on a roll. Usually I code small modules and test along the way. But since the project I've been working on is largely distributed that would have required too much additional work. So I coded the entire thing and now begin the testing. Somewhere along the way I picked up an uncanny ability to write large chunks of code and have them 'just work'. I believe it's because I build my checks into the code from the beginning .. Usually before I have written the significant bit of the code. My methods often begin with a series of sanity checks. If anything important fails the check, I throw an exception. This allows me to isolate most of the silly programming mistakes very quickly. It was a tough lesson to learn, but has saved me time and again.
Thursday, February 14, 2008
EVDO Makes the Grade
I've been an internet outcast for years. It's by choice, mostly. I choose to live in a rural area. But this choice has severely limited my internet connection options. The larger cities in Mississippi have been wired for broadband since about 1996, but folks in the sticks have been left completely out. Our choices have been dial-up (not even the 56k variety .. more like 33k), or satellite. I was a subscriber to DirecWay for a few years, but the service started out as bad and only got worse. Even when the service is working nominally, the inappropriately-named FAP (Fair Access Policy) keeps you from doing anything useful with the satellite connection. About a year back we ditched the satellite connection and turned on the data connection through our cell phone provider. The connection was much slower, but also much more reliable. And since the cell phone company does not impose any usage limits, the phone connection is actually a lot more useful than the satellite connection. But let's face it, GRPS is painfully slow. That's right, we don't even get EDGE in my area .. forget about UMTS!
When I recently found out that Alltel offers EVDO in my area, I jumped at the chance to try it out. I received a Franklin USB modem for my birthday and switched on the EVDO service. It's amazing! The ping times are relatively low, consistently less than 500ms (please understand, I'm used to seeing >1000ms pings with the satellite and >700ms pings with the cell phone service). The downstream speeds are good, between 600-700Kbps, while the upsream speeds are a usable 60-80Kbps. I've only had this service for a few days, but it looks like the real deal!
You may be thinking this review is unbalanced since my previous forms of internet connectivity have been so bad. So it's important to point out that the internet connection at my office is an 8Mbit cable connection. I know and appreciate what good internet is. And I'm certainly not saying the Alltel EVDO service competes with with that type of service. However, it is leaps and bounds better than any other form of service previously available. I've waited a long time for reasonable internet service in my area, but it looks like the wait is finally over.
When I recently found out that Alltel offers EVDO in my area, I jumped at the chance to try it out. I received a Franklin USB modem for my birthday and switched on the EVDO service. It's amazing! The ping times are relatively low, consistently less than 500ms (please understand, I'm used to seeing >1000ms pings with the satellite and >700ms pings with the cell phone service). The downstream speeds are good, between 600-700Kbps, while the upsream speeds are a usable 60-80Kbps. I've only had this service for a few days, but it looks like the real deal!
You may be thinking this review is unbalanced since my previous forms of internet connectivity have been so bad. So it's important to point out that the internet connection at my office is an 8Mbit cable connection. I know and appreciate what good internet is. And I'm certainly not saying the Alltel EVDO service competes with with that type of service. However, it is leaps and bounds better than any other form of service previously available. I've waited a long time for reasonable internet service in my area, but it looks like the wait is finally over.
Thursday, February 7, 2008
Java Plugins
I learned something pretty neat today. The team at my office is working on a medium-sized Java project and we have the need (desire really) to develop some components as plugins. One of the guys came across some example code to do just that (thanks to the folks at javaranch.com). After seeing the example we realized that Java has a handy utility built right in that handles plugins nicely. The ClassLoader class (sorry, I forgot the namespace and don't have a reference handy) makes quick work of plugins. And check out his friend UrlClassLoader to load code from any standard URL style resource. Stuff like this is why I like Java. I have developed plugins before in C++ and Linux. It was not this easy. So go ahead and make your code plugable. It's easy!
Subscribe to:
Posts (Atom)