tag:blogger.com,1999:blog-165772512009-02-20T17:52:14.093-06:00Java Bar & GrillRead. Think. Be merry.Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-16577251.post-1151178605119146562006-06-24T14:49:00.000-05:002006-06-26T02:48:32.466-05:00MovedJava Bar & Grill has moved. Please update your links.Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1148521185338135152006-05-24T20:12:00.000-05:002006-05-24T21:06:48.933-05:00FindBugs and MoreI discovered FindBugs today and just for fun, I ran it against our current project. Among many, many other things, BugFinder flagged code that created new instances of Boolean rather than use Boolean.TRUE or Boolean.FALSE. This method was tagged as one of the offenders:public Boolean validateMinLength(String value, int length) { try { if (value == null || value.length() == 0) { returnJeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1144028179257978442006-04-02T20:32:00.000-05:002006-04-04T20:50:26.820-05:00NoFluffJustStuff Conference Takes Omaha by StormUnsurpassed QualityNoFluffJustStuff just concluded the Greater Nebraska Software Symposium, its first-ever stopover in Omaha, NE. It couldn't have turned out better, despite the stormy weather. The presenters are all first rate--they don't just talk about this stuff; most all have invaluable real-world experience they are willing to share. There is honestly not a dud in the bunch. I'm Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1141874312786445392006-03-08T21:09:00.000-06:002006-03-08T21:21:56.533-06:00Bar and Grill Lab Notes: GroovletsIt seems whenever I read discussions about JSF, Struts, etc., someone invariably claims they’re happiest foregoing frameworks and writing Servlets by hand. I have an inexplicable aversion to HTML code in println() statements so I’ve hand-coded a grand total of one simple “Hello World!” Servlet. I even once wrote a Java tool that converted the pointy-bracket output from a WYSIWYG HTML editor to Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1141580233483569412006-03-05T11:28:00.000-06:002006-03-06T06:37:03.073-06:00Why JavaServer Faces will DominateJavalobby Readers’ Choice: Top Java Books consists of 112 books with a total of 72,079 pages. Rick Ross, founder of Javalobby, writes, …if you read fifty pages per day every day, then you would finish reading this collection sometime in the middle of January, 2013! Of course, there’s some question whether all of this material would still be relevant by then, and there’s also the small issue of Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com1tag:blogger.com,1999:blog-16577251.post-1137413171560289742006-01-16T06:06:00.000-06:002006-01-16T06:06:11.600-06:00Crazy Shirt Folding - Google VideoWish I'd have known about this in boot camp.Crazy Shirt Folding - Google VideoJeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1134307842303139312005-12-11T07:25:00.000-06:002005-12-11T07:31:48.186-06:00Well Done SoftwareNot long ago, a friend told me about the excellent food at a frou-frou steakhouse that recently opened downtown. I tend to favor frugality, but he assured me the bacon-wrapped filet medallions were worth the second mortgage. My wife, Barbara, and I did a cost-benefit analysis and decided the budget could take the hit if we postponed our Branson vacation until next summer. I made dinner Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com2tag:blogger.com,1999:blog-16577251.post-1133708048137029062005-12-04T08:45:00.000-06:002005-12-04T08:54:08.150-06:00Dilly Bar ArchitectureA few years back, my wife and I participated in a treasure hunt as part of a social event/fund raiser for an organization. One clue led us to the local Diary Queen where we had to tell the clerk behind the counter a password (derived from a previous clue), after which we were each given a Dilly Bar as our next clue. For those who don’t know, a Dilly Bar is the Dairy Queen version of an ice creamJeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1132500987024293412005-11-20T09:19:00.000-06:002005-11-21T08:06:28.753-06:00Selling Groovy to Luddite Tech LeadsOn my current project, I refactored hard-coded data to a simple XML file similar to the following: <test><parent code="A"><child>a</child><child>b</child></parent><parent code="B"><child>b</child><child>c</child></parent></test>Currently, we use Jakarta Commons Digester to parse XML. For this example, the code looks something like this:Digester d = new Digester();d.push(new ArrayList());Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com4tag:blogger.com,1999:blog-16577251.post-1131289299946714352005-11-06T08:18:00.000-06:002005-11-06T09:01:39.956-06:00Beyond RubyAre personal programming languages the “Next Big Thing?” Not “personalized,” but “personal”—each programmer with his own language. It’s possible if Dr. Gregory V. Wilson’s vision is realized. In Extensible Programming Systems for the 21st Century, Dr. Wilson expresses the beliefthat next-generation programming systems will store source code as XML, rather than as flat text. Programmers will not Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com1tag:blogger.com,1999:blog-16577251.post-1130596853934016802005-10-29T09:32:00.000-05:002005-10-29T21:57:09.456-05:00Groovy: Minimalism vs. Java-esque VerbosityI’ve learned in my journey through life that it’s far easier to criticize than it is to critique. Criticism is adversarial while a critique is neutral. Misanthropic web sites like The Daily WTF use criticism as crass entertainment (I admit, I’ve had a chuckle or two there, but I’ve almost always felt guilty about it later) rather than as a tool to help improve the code base.I am, however, still Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com2tag:blogger.com,1999:blog-16577251.post-1129482325866738842005-10-16T12:03:00.000-05:002005-10-17T15:36:43.593-05:00Has JSR Derailed Groovy?The changes from Groovy beta-10 to the JSR release took me by surprise. I toyed with beta-10 Groovy earlier this year and found it promising. I had to put it down for awhile and when I picked it back up last week I downloaded the most recent version, JSR-03. I had no significant code base in beta-10 but I was curious about what had changed so I checked out the Migration from Classic to JSR page Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com6tag:blogger.com,1999:blog-16577251.post-1128787777817584412005-10-08T10:40:00.000-05:002005-10-08T11:11:47.913-05:00How Do You Want Your Eggs?Efficiency is king in the restaurant industry. A simple but effective technique to improve efficiency is to provide customers with numbered menu combinations. It works for a couple of reasons:It’s quicker to order #1 than to order two eggs, bacon, hash browns, and toast. Customers decide faster when a large, varied a la carte menu is condensed to fewer, simpler choices. The sooner customers Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com1tag:blogger.com,1999:blog-16577251.post-1128176787882921442005-10-01T09:16:00.000-05:002005-10-01T09:33:07.910-05:00The Universe is My ComputerEarly in our pre-history, technology compensated for our pitiful vulnerabilities. As our survival as a species became less doubtful, we used technology to enrich our lives. All the while, technological development transformed the things around us to suit our needs. Soon, according to Ray Kurzweil, technology will transform us.Kurzweil, in his new book, “The Singularity is Near,” contends that theJeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com5tag:blogger.com,1999:blog-16577251.post-1127578470797416732005-09-24T11:07:00.000-05:002005-09-24T16:28:33.103-05:00The Fall of the Java EmpireEncapsulation is one of the first things a neophyte learns about object oriented programming. Defined here as “the concept that an object should totally separate its interface from its implementation,” it is one of the three pillars of object oriented programming, inheritance and polymorphism being the other two. Encapsulation freshly imprinted in his mind, the neophyte is then assigned to writeJeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com10tag:blogger.com,1999:blog-16577251.post-1127269502668670912005-09-20T21:19:00.000-05:002005-09-20T21:31:44.833-05:00Gunfight at the Software Development CorralScene: The local saloon. B. Duf, the aging gun-slinger, sits with his chair tilted back, his gun rests on the table, barrel pointed toward the swinging doors. He waits. Enter the up-and-coming, XP Kid. He pauses just inside the doors, letting his eyes adjust to the change in light. B. Duf sets his chair down on all fours and puts his hands on the table.B. Duf: You lookin’ fer me?XP Kid: Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1126924068901713662005-09-16T21:26:00.000-05:002005-09-16T21:30:03.696-05:00Software for the AgesWhen Alexander the Great marched into Egypt, the pyramids were as ancient to him as he is to us. Built to last an eternity, there are few signs the pyramids won’t outlast mankind. No one is certain how the Egyptians constructed the pyramids, but there can be little doubt they accomplished wondrous feats with primitive tools. Among the devices used must have been instruments of measurement (Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1126832571031634532005-09-15T19:36:00.000-05:002005-09-24T13:17:22.536-05:00Test Your Privates with JUnit-addonsAfter posting a solution to testing private methods on my original blog, I learned about JUnit-addons, which helped simplify the test code.In the snippets below, my original technique used reflection to invoke an object’s private method. Using PrivateAccessor from JUnit-addons simplifies the code.Original technique:Method m = AddonsExample.class.getDeclaredMethod( "getMyObject", new Class[]{});Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com5tag:blogger.com,1999:blog-16577251.post-1126450090432789422005-09-11T09:45:00.000-05:002005-09-11T12:07:35.736-05:00How Much is Free?The other day a neighbor asked to borrow a hammer. For reasons I won’t go into here, I had two identical, golden hammers, so I offered to give him one.“How much do you want for it,” he asked.“You can have it for free,” I said.“Well,” he said, “it’s not really free.”After evaluating my puzzled expression, he explained (or attempted to explain) his reason.Intuitively, we know that a hammer has twoJeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com0tag:blogger.com,1999:blog-16577251.post-1126377402946350602005-09-10T13:33:00.000-05:002005-09-10T13:42:41.853-05:00Whither Java?It’s a tragic comedy to see the white-knuckled attempts of middle-aged people vainly hanging on to their evaporating youth. Men buy convertibles and join Hair Clubs. Women establish first-name relationships with plastic surgeons. They go to great effort and expense to avoid or delay the inevitable. So it is with Java. It’s been the dominant programming language longer than any other in the Jeffhttp://www.blogger.com/profile/12464759177268472231noreply@blogger.com4