Archive for the ‘Software Engineering’ Category
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, October 3rd, 2006
At GreatSchools we’ve had 3rd party ad server outages or slowness effectively make our site unusable as users browsers waited for certain ads to render before rendering the rest of the page. I had originally thought just specifying height and width of the div element around the ad would be enough for the browser to move on given a slow ad load but in my tests with various ad servers that turned out not to be the case. After some research I discovered that the trick that some sites (such as Digg.com) employ is called source ordered content where you put the content in the order you’d really like it in (be it for SEO or for deferring ad calls) and then using CSS or Javascript to move it to the proper place.
(more…)
Posted in CSS, Design, Javascript, Software Engineering, Web | 1 Comment »
Thursday, August 31st, 2006
I’d been wanting to make my Ruby on Rails based San Francisco Sailing Weather site available for mobile / cell phones. Now that I’m on vacation in Germany I had a stretch on a train ride where I was able to crank out a simple working version. Here are the steps I took:
(more…)
Posted in Ruby, Ruby on Rails, Software Engineering, WAP and WML | 5 Comments »
Tuesday, June 13th, 2006
I attended the June 12th, 2006 San Francisco Ruby Meetup at CNet which was my first. There was quite a turnout, I’d guess maybe 80-90 people. The presentations focused more on process and lessons rather than in-depth technical sessions. Here are my notes: (more…)
Posted in Ruby, Software Engineering | 3 Comments »
Wednesday, June 7th, 2006
In my previous post I wrote about setting MySQL to a stricter sql-mode to make it behave like most other databases, however, I recently ran into a case where I couldn’t set the global sql-mode without breaking some legacy applications. I imagine this is also often the case when you host on a shared server where a global configuration change would be out of the question.
(more…)
Posted in MySQL, Ruby, Software Engineering | No Comments »
Monday, May 29th, 2006
Let’s say you have an Employees table and you want a column to track the status of an employee such as ['employed', 'resigned', 'retired', 'terminated', etc...]. You have a couple of options including:
- Using your database’s custom enumeration data-type if it has one
- Creating an int or char column and let the mapping live in the code
- Creating a lookup table
(more…)
Posted in Database, Ruby, Software Engineering | 3 Comments »
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 »
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 »