Skip to main content

Blog Archive for joshy during August 2003

While crusing through the AWT/Swing documentation for another project I ran across a method I never knew existed: Toolkit.setLockingKeyState(int keyCode, boolean on). It's been there since 1.3 (which is what, 3 years old now) but I never noticed it before. Hmm, I thought. What could I use that for. Well, lately I've been doing database apps that sometimes have long access times, so why not create...
While working on another project I came up with a silly idea. How could I force windows to remain completely on screen and to snap to the screen edges? A simple form of window snapping. Since you can receive an event every time the window is moved it's easy to create a Component Listener to do it. import java.awt.*;import java.awt.event.*;public class WindowSnapper extends ComponentAdapter {...
I've seen lots of arguments on the merits of weak typing. It encourages flexiblity. It lets me write code faster. I don't worry about the details until later. I can do cool runtime tricks. I don't buy it. I use a strongly typed language because the code it produces is more robust. Typing solves a slew of common programming errors all at once. It ensures that my code will always do exactly what I...
I have a webserver. It's a small box sharing a friend's static DSL line with a few other boxes. It does the job pretty well, hosting the websites for my family members. When the blogging revolution hit I wrote some journaling software for myself. It was written in Perl originally, later switching to a servlet with XSLTs. This was great for me but not so great for my sister when she wanted a...
In my years as a professional programmer I have used many Revision Control Systems (RCSes). It's that software that manages and protects the software you use. One of the tools of the toolmaker. Many companies pay tens of thousands of dollars for this software, often licensing it per-seat, and yet a perfectly good free alternative exists: CVS. In fact I will argue that there almost no reasons not...