Monday, October 20. 2008
A Java Swing user interface I am working on which makes extensive use of a custom JTableModel implementation was failing. In certain instances when my data structure changes, it purges empty cells. If the cursor was left in these cells while this was taking place, the table would become unresponsive, often requiring an application restart to fix.
Watch for issues with setValueAt, which in some cases can be called with invalid values. In particular if the cursor is editing a field, the table is not refreshed until the edit focus leaves the widget even if you try to force it with validate() calls. In my instance the ideal fix was to add checks and do nothing instead of throwing exceptions.
With getValueAt, some table widget types choked on my default of null, which I was returning for invalid cells. Using an empty string instead of null for these invalid cells fixed this problem.
Sunday, October 19. 2008
Having just returned from the Central PA Open Source Conference, I found it to be a very informative and useful conference. A wide array of interesting topics in different fields were covered, and there were many items I can apply over the next few months to my own projects.
My favorite session was Hardware and Honeybees, in large part because it showed interesting uses for technology and hardware hacking, something as a software-oriented person I do not see much of. Using cell phone text messages to control electric fences, web cameras to monitor hive status, and inexpensive temperature monitors to find problems were all topics in this interesting talk.
Continue reading "Central PA Open Source Conference"
Wednesday, October 1. 2008
 While eating at Neato Burrito today I noticed these delicious looking treats in their dessert bin in front of the cash register.
Labeled Bailout Brownies, they consist of a rich chocolate brownie with gold foil-wrapped chocolate coins adhered to the top with a chocolate glue. While eating, the coins stay on the top until their location is reached, when instead of the coin falling off, a hunk of chocolate comes loose with the coin. After prying the coin loose from the chocolate base, a nice imprint of the coin can be seen in the short period before the chocolate inevitably disappears. In a caricature of the real economy, the shadow of the coin is much more tasty than the chocolate within the coin itself.
A wonderful sweet relief from the stress and woe caused by this trying time.
Wednesday, September 17. 2008
Firefox 3 introduces a new behavior when your doctype is XHTML Strict; certain tags that do not allow minimization as per the spec no longer close anyway. For example, if you use a <script src="blah.js" /> tag in your heading, Firefox 3 will take the whole rest of the page as a script, which will result in a blank page. This is good as it enforces standards compliance, however jspx minimizes tags, so you may have <script src="blah.js"></script> on your page, but the actual rendered page will minimize it.
There are many ways to fix this issue by playing tricks on jspx, I recommend:
<script src="blah.js"><!-- //prevent jspx minimization --></script>
This reminds me when I'm working on the code why that comment is there. Hopefully this will be fixed in the jspx spec at some point.
Saturday, July 26. 2008
 Water spurting out from between sidewalk segments and flowing down the road has become a common sight this week as the local water authority has been steadily increasing the water pressure. The old 70's vintage pipes in my apartment complex couldn't take the pressure and are turning the complex into a waterfront property. As they repair one segment, new ones open up shortly thereafter, often just a few feet away.
Thursday, July 24. 2008
 I bicycled to work today. A 5.3 mile trip from Summerdale to downtown Harrisburg (Pennsylvania), I have been talking about cycling to work ever since I moved in the spring. A series of issues as well as a need to improve my general fitness level so I could do so successfully delayed my attempt.
I am hoping this is the start of many such trips; I want to do this once or twice a week starting out. As my health improves and I get more comfortable biking in less optimal conditions (rain and perhaps snow), I should be able to do this more often.
Continue reading "First Bicycle Commute"
Tuesday, July 22. 2008
Dairy Queen's Blizzard of the Month is a Girl Scout Thin Mint ® Blizzard. I have had more of these than I would like to admit to this month and still love them. Often with Blizzards they have too much of the featured ingredient and not enough ice cream. These cookies are good enough that I enjoy this particular blend even when it is supersaturated with them.
Generally I prefer hand-dipped ice cream to soft. Handel's Homemade Ice Cream has a wonderful version of this combination, but as I thought they were only in Ohio (which I only venture to when visiting family or camping) I haven't eaten any of it this year. It seems they now have a York, PA location . . .
Tuesday, July 15. 2008
While ordering a burrito at one of my favorite Harrisburg eating establishments, Neato Burrito, I handed some change to the cashier in exchange for the rolled meal. The sharp-eyed cashier noticed one of the coins I handed him wasn't what I thought it was.
Having never seen such a coin before I paid in more appropriate currency and went to a table, glad this entertaining item came up as a side activity to occupy myself with during lunch. While enjoying my burrito I used one of my ever present internet connected gadgets to look up what this coin was; a 1 Jiao Chinese coin, which is one-tenth of a Chinese Yuan. At current exchange rates it would be worth about one and a half cents.
Continue reading "Chinese 1 Jiao Coin"
Thursday, June 5. 2008
A project I am working on requires binary image files and form data to be submitted simultaneously. This is rather easy to do with Spring, following the directions available in the latest documentation to handle file uploads in a form. It does not mention there that you can mix form fields as well as file upload fields when doing this, but it works as expected.
Continue reading "Spring Binary and Text Forms"
Saturday, March 22. 2008
 I received this in a fortune cookie while eating at a chinese restaurant with my mother.
Tuesday, March 4. 2008
 Another season of delicious chocolate egg-shaped confections is upon us. Once upon a time there were wonderful ones available in my home town, but they started adding vegetable shortening to those as a filler. That cheap concoction is disgusting, so I have been seeking a better variety.
The wonderful sample shown here is a Peanut Butter/Chocolate Truffle from St. John (Barner's) Lutheran Church. A simple treat containing only peanut butter, corn syrup, and chocolate, these are quite delicious. They are also reasonably sized, a nice side feature for those watching their waist.
Wednesday, February 27. 2008
Here is the easiest process I have found for setting up Ruby and PostgreSQL on OS X Leopard at this time.
I recommend PostgreSQL for Mac instead of fink as it is more actively maintained and easier to install. Note that when downloading, use the alternate download not the Sourceforge links, as the Sourceforge download is not current and has issues. This installer places the PostgreSQL CLI commands in /Library/PostgreSQL8/bin/ and will auto-start PostgreSQL on system startup. It includes some graphical tools, but I recommend ignoring them and and installing pgAdmin III if you want an administration GUI (I usually just use the CLI tools).
Ruby has a couple PostgreSQL gems, I recommend ruby-pg which appears to be the only one actively maintained. The easiest way to get it installed is to download the latest .gem, then run the following command to install it in the directory where you saved it (replace the version number as necessary):
PATH=$PATH:/Library/PostgreSQL/bin/ gem install pg-0.7.9.2008.02.05.gem
Don't waste your time trying to find documentation for this gem online, point your browser at the documentation on your local machine, which for this version was at:
file:///Library/Ruby/Gems/1.8/doc/pg-0.7.9.2008.02.05/rdoc/index.html
Wednesday, February 13. 2008
The latest pre-release version of Firefox 3 is available. As a main focus of this release, performance and memory usage are improved. In particular Zimbra, the most heavyweight web application I use, has much better performance when used with this version. A more native look and feel on OS X and Growl notification support are nice features too. It is enough of an improvement that I do not intend to go back to version 2 after experiencing this pre-release.
Continue reading "Firefox 3 Beta 3 Released"
Tuesday, February 5. 2008
I use the built-in Apache 2.2 ajp ProxyPass support when deploying Tomcat and JBoss applications via Apache. When doing so, be careful your slashes match up or you can have subtle problems with applications which use redirects. For example, I was deploying a JSPWiki but having an odd problem with authentication where logins would seem to fail but then work fine if I manually reloaded the page. I was using this Apache configuration:
ProxyPass /webdevwiki ajp://127.0.0.1:8009/webdevwiki/
ProxyPassReverse /webdevwiki ajp://127.0.0.1:8009/webdevwiki/
This appeared to work fine, but when logging in an extra slash would get added to the Login.jsp redirection page. This kept the redirect to the main page from working, causing it to reload the Login.jsp infinitely even though login had been successful. A manual click of the reload button fixed the site, with authentication and all other functions working until trying to log in again.
ProxyPass /webdevwiki ajp://127.0.0.1:8009/webdevwiki
ProxyPassReverse /webdevwiki ajp://127.0.0.1:8009/webdevwiki
Removing the extra slashes as shown fixed this issue.
Friday, February 1. 2008
 After talking about it for a long time, we finally got new windows installed in the living room at Perry View Farm. The old ones were leaking, difficult to open, and had failed seals causing moisture build-up between the panes.
Vinyl new construction windows from Dove Windows (5000 series), these are double hung models that replace the crank-out windows we had before. The additional glass area due to the thinner sides and middle is the most noticeable difference, adding a lot more light and visibility to the room.
|