The MySQL 5.0 release is finally adding stored procedures, triggers, and views. This is a welcome addition. With the strong storage management features, clustering, and replication from the 4.x releases, MySQL now has all the capabilities of an "enterprise" database. (Of course, the lack of these features didn't stop thousands of users from deploying earlier versions in enterprises, even for "mission-critical" applications.)* Here's a fairly trivial example: create procedure count_table_rows () reads sql data begin select table_name, table_rows from information_schema.
Continue Reading »-
MySQL 5.0 Stored Procedures -
The dumbest thing I've seen today I generally like Swing, but I just found something in the Metal L&F for JSlider that strikes me as a big WTF. The BasicSliderUI allows you to click in the "track" of the slider to scroll by a block. That's either 10% of the span of the slider, or a minimum of 1 unit. The MetalSliderUI overrides that sensible behavior with a method that scrolls by just one unit. Period.
Continue Reading » -
Programmer productivity measurements don't work. Programmer productivity measurements don't work. The most common metric was discredited decades ago, but continues to be used: KLOC. Only slightly better is function points. At least it's tied to some deliverable value. Still, the best function point is the one you don't have to develop. Likewise, the best line of code is the one you don't need to write. In fact, sometimes my most productive days are the ones in which I delete the most code.
Continue Reading » -
More Beanshell Goodness Thanks to the clean layered architecture in our application, we've got a very clear interface between the user interface (just Swing widgets) and the "UI Model". In the canonical MVC mode, our UI Model is part controller and part model. It isn't the domain model, however. It's a model of the user interface. It has concepts like "form" and "command". A "form" is mainly a collection of property objects that are named and typed.
Continue Reading » -
Smalltalk style prototyping for Java? I've been eyeing Beanshell for some time now. It's a very straightforward scripting language for Java. Its syntax is about what you would expect if I said, "Java with optional types and no need to pre-declare variables." So, a Java programmer probably needs all of about thirty seconds to understand the language. What I didn't expect was how quickly I could integrate it into my applications. Here's an example.
Continue Reading » -
One of the most fun features of my current project One of the most fun features of my current project is our "extreme feedback monitor". We're using CruiseControl to build our entire codebase, including unit tests, acceptance tests, and quality metrics, every five minutes. To make a broken build painfully obvious, we've got a stoplight hanging on one wall of the room. (I may post some pictures later, if there's interest.) Kyle Larson found the stoplight itself in a gift shop (Spencer's, maybe, I can't remember.
Continue Reading » -
I forgot to mention that I will be speaking at OTUG I forgot to mention that I will be speaking at OTUG on April 19th! I will be speaking on "Living With Systems in Production: Avoiding Heartbreak in Long-Term Relationships With Your Code" From the summary of the talk: Everything changes after Release 1.0. One batch of consultants leave, key developers jockey to get themselves reassigned, and the free-wheeling development environment is replaced by the painful rigor of operations. Or, at least, it should be.
Continue Reading » -
Leaving AntHill for CruiseControl We've been using AntHill to do continuous builds. It has served us well, but we're now moving away from it and towards CruiseControl. There are a few main reasons for this. First and foremost, AntHill runs inside of Tomcat. This is billed as a feature, but for us, it was a big problem. There are two layers of Java containers between your OS and your build. Trying to get environment variables (like "DISPLAY=localhost:99.
Continue Reading » -
The Veteran and the Master The aged veteran said to the master, "See how many programs I have written in my labors. All of these works I have created needed no more than a text editor and a compiler." The master said, "I do have an editor; indeed, I have also a compiler." Said the aged one, "Yet you shackle them within an 'environment'. Why must your environment be integrated? My environment has never been integrated, yet I am a mighty programmer.
Continue Reading » -
On Relativism and Social Constructions The key operative precept of post-modernism is that all reality is a social construct. Since no institution or normative behavior stems from natural cause, and there is no objective, external reality, then all institutions and attitudes are just social constructs. They exist only through the agreement of the participants. Nothing can be sacred, since sanctification comes from outside, by definition. If nothing is sacred, and institutions have no more reality than a children's amorphous game of ball, they deduce that any construct can be reconstructed through willful choice.
Continue Reading »