Archive for the ‘Java’ Category
Monday, January 22nd, 2007
The Java Posse hosted a great podcast interview with the authors of JRuby: Charles Nutter and Thomas Enebo. Additionally you get to hear what Tor Norbye is up to with his work on NetBeans Ruby integration and it looks like there’s some nice code assist features in the works! Really good code assist is the thing I miss most when doing Ruby (in RadRails) as opposed to Java (in IDEA).
It’s exciting to see the convergence of my two favorite languages coming along!
Posted in Java, Ruby, Software Engineering | No Comments »
Wednesday, December 6th, 2006
One thing I love about Ruby (and really miss when working in Java) is its interactive command line interpreter irb (or script/console if you’re using Rails). I really wish irb had tab completion and saved history configured by default out of the box. The good news is it’s easy to configure by creating a $HOME/.irbrc file with the following contents:
(more…)
Posted in Java, Ruby, Software Engineering | 3 Comments »
Monday, November 20th, 2006
In Java it always irks me when I have to create a collection and then populate it in separate steps as follows:
List states = new ArrayList();
state.add(State.CA);
state.add(State.WY);
Then today I read about using an anonymous subclass with instance initializer to initialize a collection which appeals to the block loving Rubyist in me:
(more…)
Posted in Java, Ruby, Software Engineering | 10 Comments »
Thursday, October 19th, 2006
Tonight I just completed the upgrade from Spring 1.2 and Hibernate 3.1 to Spring 2.0 and Hibernate 3.2 for work. I was expecting a rough upgrade but was pleasantly surprised how easily it went.
(more…)
Posted in Database, Java, Software Engineering | 2 Comments »
Friday, October 13th, 2006
At work as part of our XML data feed product we end up doing XSLT transformations on XML files starting a a few MB all the way up to several hundred MB. Using the 1.4.2 JDK it took over 4 days to do the XSL transformation on the largest file so over lunch one day we started brainstorming our troubleshooting approach. When we tried it on the 1.5 JDK the same transformation took a couple of minutes as opposed to 4 days. Talk about an improvement!
(more…)
Posted in Java, Software Engineering, XML | 1 Comment »
Tuesday, May 16th, 2006
Being able to quickly and easily create test fixtures for your database is important yet it’s not always easy. There are basically 3 approaches I’ve seen used:
1. Use a MySQL or PostgreSQL dump that gets imported before the tests are run. I’ve never seen this approach used with Oracle, most likely because it’s such a PITA to export to text (or at least it used to be)
2. Just create the schema before the tests and then populate the test data in code
3. Use a database test fixture tool such as the XML based DBUnit for Java or Ruby’s YAML based fixtures
(more…)
Posted in Database, Java, MySQL, Ruby, Software Engineering | 3 Comments »
Saturday, April 22nd, 2006
When monitoring a production website (especially with a dozen or so application servers) you don’t want to rely on combining the logs and reviewing them manually for exceptions, you want the servers to notify you when there’s a problem. There are really 3 pieces to doing this properly and they are:
(more…)
Posted in Java, Software Engineering, Systems Administration | 2 Comments »
Friday, April 14th, 2006
Go into any IDE and create a default Web project and you’ll often get JUnit, but I have yet to see one include some form of web testing support (e.g. Cactus, Cargo, and HttpUnit) and that’s just lame! (more…)
Posted in Java, Ruby, Software Engineering, Web | 3 Comments »
Tuesday, April 4th, 2006
Update: Bryce pointed out a servlet filter you can implement to disable JSESSIONID’s… very nice!
When we started moving GreatSchools from Perl to Java + SpringMVC + Hibernate one of the first things we had to figure out was how to disable jsessionid’s from getting appended to URL’s when using c:url in a JSP page. Jsessionid is terrible for search engine optimization because crawlers that don’t have cookies enabled will get URL’s from your pages with a jsessionid parameter appended. This makes it virtually impossible for a crawler to match the URL from an inbound link to your site with a page it has already crawled. What’s worse is that you risk having your page rank hurt with Google because it thinks you’re serving duplicate content, ouch!
(more…)
Posted in Java, Search Engine Optimization, Web | 8 Comments »
Monday, March 27th, 2006
This tongue in cheek post by Dion about Ruby not scaling made me chuckle but also got me thinking!
The whole question of whether a modern language scales or not is really the wrong question to ask. Almost any language will scale horizontally. Here’s one anecdote as an example: when we were going through the language selection process at GreatSchools several years back we rewrote some key pages in PHP, Java, and Perl (mod_perl) to try them out. Not surprisingly (more…)
Posted in Java, Ruby, Software Engineering, Web | 5 Comments »