Released April 26th, 2007
A client site still uses cvs, the ever trusty version control system. After what seemed a run of the mill merge I noticed this:
C lib/jt400_3_3.jar
cvs update: move away lib/jt400_3_3.jar; it is in the way
Very peculiar. That file hadn’t changed on the branch. I googled around and an explanation started to come together.
First, from the always excellent Roedy Green’s Java & Internet Glossary on Mindprod:
CVS is disturbed by the appearance of repository files it did not put there. Your best bet is simply to delete the entire directory containing the offending file by hand, and re checkout or reupdate the directory to build the necessary entries. Then you can add the files safely.
Then, I found this mailing list post:
This means the file that CVS wants to checkout exists on the local machine but CVS never created the file in the past. This it isn’t CVS’s file and it complains rather than blindly overwriting.
The solution everywhere was the same: just blow away the directory and check it out again. Worked for me. Now I need to puzzle out how it happened in the first place…
Posted in System Administration | 2 Comments »
Tagged: CVS System Administration Utilities
Released April 22nd, 2007
If you have a model that uses set_table_name you may hit a snag when trying to use fixtures and unit tests. The solution is twofold: name the fixture file using the legacy table name, and use the set_fixture_class method in your unit test. I coudn’t find this method mentioned in Agile Web Development with Rails, and there’s only a brief mention on the rubyonrails.com site. Still, some web searches turned up the answers.
Here is a simple example:
Read the rest of this entry »
Posted in Systems Integration | 2 Comments »
Tagged: rails ruby
Released April 18th, 2007
I have seen several examples of sending email using oracle with non-ascii characters floating around the Internet, but few seem to tackle sending these ’special’ characters in both the subject and the body. Many also take a shortcut and use 8bit transfer encoding for the body. I am 99.9% sure that this will work on today’s mail servers, but basic SMTP only really needs to support 3 transfer encodings – 7bit ascii, base64, and quoted-printable.
Read the rest of this entry »
Posted in Database | 3 Comments »
Tagged: Oracle
Released April 12th, 2007
There have been a couple recent enhancements to sitemaps that everyone should start using.
The first is that Google now supports embedding kml data into sitemaps. This allows you to provide a hint as to where information is related to geographicaly as well as more detailed information to be used in popups on the map. For more information on how to make the integration see the maps sitemap API page. We already support sitemaps in our content management solution and we will be integrating this new mapping feature as well.
The second new feature added has to do with getting your sitemap included in search engines. Now all search engines that support sitemaps will inspect your robots.txt file for a pointer to your sitemap. This should remove the need for everyone to submit their sitemap to every search engine. You may still want to submit your sitemap because there are nice tools from engines like Google that let you investigate more information about your site but now you won’t have to if all you are looking for is your site to be crawled correctly.
Posted in SEO | No Comments »
Released April 11th, 2007
If you ever need to work with something other than a day when using sysdate you are in luck. As it turns out you can work on sysdate with fractional days. This is just what a person needs when they want to do something like:
SELECT mycol FROM sometable WHERE sometimestamp < "30 seconds ago"
The main trick here is to know that sysdate math is based in days and fractional days work. Here are a few examples:
Remove hours from a date:
sysdate – hours/hours in a day
Remove minutes from a date:
sysdate – minutes/(hours in a day * minutes in an hour)
or
sysdate – minutes/minutes in a day
Remove seconds from a date:
sysdate – seconds/(hours in a day * minutes in an hour * seconds in a minute)
or
sysdate – seconds/seconds in a day
The example above would be:
SELECT mycol FROM sometable WHERE sometimestamp < sysdate - 30/(24*60*60)
Posted in Database | No Comments »
Tagged: Oracle
Released April 6th, 2007
A few days ago Google made their “My Maps” announcment and since then there has been nothing but buzz buzz buzz about it. So I figured I would take a minute to show how someone can use this new tool from Google to create their own embedded maps for their site.
Read the rest of this entry »
Posted in Systems Integration | 7 Comments »
Tagged: gis
Released April 3rd, 2007
We had the need to hook up a simple ruby web process (non-rails) to our production apache server. As Leslie Hensley pointed out, fcgi and scgi are on the way out, and mongrel + mod_proxy_balancer is the new way to go. We use mongrel extensively in our rails deploys, but always just used WEBrick to do simple serving. To make a long story short, we had to ask ourselves….is mongrel that much better (and in this case better == faster) than WEBrick?
Read the rest of this entry »
Posted in System Administration | 3 Comments »
Tagged: apache ruby
Released April 1st, 2007
Updated Rails 1.2 performance numbers have been released. While these number look pretty good it is hard to get a good idea of exactly what the performance of Rails is. A couple of other benchmarks that include Rails such as performance tests for 6 frameworks and Grails vs Rails benchmarks show a different picture. Both of these come up with much worse performance than the first. Maybe the issue is that the second two benchmarks are using Apache ab but the first uses a new version of rails bench. Of course most people probably aren’t that worried about the benchmarks that much because you can find ways to make anything fast as shown with Rails doing 4000 requests a second.
Posted in Web Development | No Comments »
Tagged: rails ruby
Released March 28th, 2007
Everyone has probably noticed this already but the old is new again cycle for “online” desktop apps has been shortening at a rapid pace. Everywhere you turn you see people talking about offline and online apps and what should be online vs offline. If you take your time machine back you would see something like the following timeline:
- 1970s 3270
- 1980s X terminal
- 1990s Java applets
- 2000 Flash
- 2005 Ajax
Up until about 2000 it was taking 10 years to cycle from “we want everything on our desktop” to “we want everything on the server”. Now the cycle seems to have sped up to every year and then to constant. A couple recent examples of new faces on this old idea are Adobe’s Apollo and Joyent’s Slingshot.
Fundamentally not much has changed from the 1970s. The goal is to centralize computing resources into one place (in the simple view of things) and make issues like software deployment easier.The main difference now is that the industry has come to the point where there isn’t any turning back and everyone has bought on to the need and usefulness of online apps. The main sticking point seems to be finding a way to resolve issues that come up from users being disconnected from time to time. I’ll bet that one won’t be fully resolved until you have connectivity anywhere and everywhere you go.
Posted in Software Development | No Comments »
Tagged: ajax
Released March 19th, 2007
By default tomcat doesn’t UTF-8 encode get parameters like it does post parameters. This doesn’t seem to be the case with other application servers. So before you get yourself into trouble with your internationalized web application, make sure you make this change.
Posted in Web Development | 1 Comment »
Tagged: java tomcat