Archives for Programming

Perl sig-int and open

skip to solution While recently re-writing our build script into a simple perl script I came across a problem. I wanted to have the script put output from the commands that it was executing onto both the screen and into a file at the same time. No problem, in perl you can open commands like [...]

time_t and printf

The bane of my existence is work where I use c++ primarily with MFC. Now today I have come up to one or the most strange occurrence while debugging the database code in our product. I was formatting a string with sprintf and all of my time values were being formatted as “(null)“. I know [...]

Vertical text align of radio buttons in java

I have been doing some GUI java code in both swing and SWT recently and find text alignment a niggling annoyance of mine. Often you want to align components with the text line vertically of combo or check boxes. Here is the code for determining the width in pixels for the two most popular GUI [...]

Netbeans

I have become a bit obsessed with the java community lately more in a consuming fashion than a participatory fashion, reading Java Desktop and listening to the Java Posse and it just keeps coming up how much everyone loves Netbeans and that everyone should be using it for Java development. Features such as Mattise look [...]

gstreamer port to Java

It has long been discussed in the java community about the lack of a good multimedia framework for the platform. After reading Chris Adamson’s wrap up of his JavaONE BoF I felt here is a cause I could really get behind. I starting thinking yes wouldn’t it be great if gstreamer was ported to java. [...]

Asserting SwingWorker

I have had a chance to play around with some java code recently for a change of pace and I was excited to use the new SwingWorker class in JSE6. However I also am in the habit of programming with asserts which I found out to be a problem if one triggers while running in [...]

A Podcast for the Few

I have been listening to the software engineering radio podcast for a few months now it covers a number of topics on current software engineering trends and has interviews with different developers. I enjoyed the recent episode on dynamic languages for static minds, which applies so well to me, although I still haven’t been converted [...]

Open Java and Windows Options

Well it’s officially been announced that Java J2SE, J2ME, J2EE will all be released by sun as reference implementations under the Gnu GPL + classpath exception. Which I’m sure will bring a new era of Java, especially to Linux since Java will be able to be shipped with distributions without concern just like Mono is [...]

Code Cutting

Well this page always seems to get a bit neglected when nothing much happens…… Something interesting that I have come across is the w3c DOM in java and how there isn’t a definitive guide to how to output it to pretty print, ie human readable, there were a few examples with xerces-j but I thought [...]

Interesting Java Proposal

In the java community there has been a long and heated debate about adding delegates to the language. There is a white paper on Suns website explaining there position on the debate. Which is in response to Microsoft’s implementation of them in J++ which in tern could be deemed as the turning point for Microsoft [...]