My (Sort-of) First Java Program
After wasting much of the beginning of the year on another project that I ended up having to scrap and the rest of the year doing things for other people's sites, I've finally managed to finish (or at least 98% finish) a little project of my own.
In terms of site development and building some working examples, this year started out pretty badly. I already had (and still have) a great deal of work to do for this place, but I decided I'd still put development of the site on hold for a while whilst I got into something I'd been meaning to learn about for a while now: Java programming.
I only meant to have a bit of a tinker to start out with, but I quickly came up with an idea for an application I'd like to build. So I ended up spending the next few months learning about Java programming in general, GUI programming with Swing, writing threaded applications, learning the basics of my IDE of choice (Netbeans) and, of course, putting it all into practice by actually building the program.
I started out pretty well and was making steady progress with the program. It was meant to be a program for taking meta data and images of various formats and compiling them into a single P3T format file that you could copy to your Playstation 3's HDD and use it to customize the console's menus and Wallpapers. I even managed to write an image reader plugin for the Java programming language that would allow Java to read images in Sony's GIM format as it it were a natively supported image format. However, just as I was nearing completion of the application's GUI, I realized I was going to have to scrap almost all of it all and start again.
I had been building my application's GUI using a tool in Netbeans called Matisse. It's supposed to be an easy way of building a GUI for your Java applications. You just drag each component you want out of a menu, drop it where you want it and then resize it and set its values etc. I usually prefer not to use such tools and instead just learn how to hand-code everything so that I know exactly how things work, but given the sheer amount of learning I was already having to do I saw it as a reasonable compromise that would allow me to just get on with things. I figured if I could just get the core of the application built properly, I could come back and do an revamped front-end once I've had more time to learn about how to properly hand-code a GUI. In hindsight, I really wish I had just learned to hand-code the GUI from the start because Matisse is the reason I've had to scrap it all and start again.
Not only does Matisse produce incredible amounts of totally unnecessary and unmanageable code as you happily drap-and-drop your way to completion, but it also refuses to allow you to make any changes to it. If you want to write in some event handling code, you have to ask it to make a rather restrictive space for you to write in. You can't even hold a group of related components on an array for easy iteration and manipulation. The final nail in the coffin came, though, as I was placing the last 10-15% of the components. Netbeans takes a fair chunk out of your computer's memory as it is, but Matisse is just silly. By the time I was placing the last components of the GUI, Netbeans with Matisse was taking up so much memory that it slowed my computer to a crawl and just got worse with every extra component placed.
Obviously I couldn't continue developing a project that crippled my computer every time I opened it, so I had to just scrap it. So after months of effort I had absolutely nothing to show for it. Money's also been pretty tight too, so I couldn't even get back to focusing on this place. Instead, I ended up spending most of my time writing some articles for JupiterMedia's Webreference.com. I've done a few articles for a few JupiterMedia-owned sites on various subjects such as Javascript accessibility, using SSL on sites and making server-side source code available via http. I've been wanting to post my articles that I'm allowed to put up (there's an exclusivity period between when they first publish my articles and when I can put them on my own site) so I have more content for my own site, but writing these articles (and a few other things) have meant I still haven't had the time to build the articles section for this site.
So with a need to write articles for Jupitermedia's sites and a need to get at least some kind of content or working examples put up here I decided to have a try at mixing both. I decided to do an article on learning to understand the numeric codes used to specify colours in web pages and various other places. However, instead of just writing a stand-alone text-only article, I decided to try and build an application to go with the article that could be used as a portable colour finding tool and also as a visual aid to the explanations of how the colour values work.
Obviously I learned to hand-code the GUI and did it all manually this time which made the process of making the application much less laborious and resource-intensive for my poor old PC. I've now finished both the article and the program. It'll be around a week or so until my article will be published on Webreference.com, but the program Colourcoder is available now from the Colourcoder Homepage. It's intended for stand-alone use as well as a visual aid to the article and I intend to make gradual improvements to it (and the currently absent) documentation over time.
I would say to use the contact page to mail me is you find it useful or have any suggestions for improvement, but I haven't built it yet. I guess posting comments to this entry will do for now until I have more time to get a better solution built, but I'm not really in any kind of rush because I can't imagine many people even visit this place, never mind have any interest in it or Colourcoder.
Now. Back to work on that PHP mail message class I started writing about 14 months ago...
0 comments for this entry.