Thursday, December 20, 2007

Sign of the times?

I was in a large book store chain recently and as I always do, I strolled down the technology isle and found this very interesting:


Is this a sign of the times? The heading tells me there will be "Java" books here... but the first two rows are all Python, PHP, Ruby/Rails and a little TCL book in there for good measure. :) Dynlangs (scripting languages) are beginning to take the front seat for development these days... do the folks at this store know this? Or was this a simple stacking slip?

With projects like JRuby, Jython and the like gaining steam as viable alternatives to the Java programming language on the JVM... maybe the heading should just read "JVM" and this stacking order would work just fine!

Thoughts?

Monday, December 17, 2007

Rake 'ing in the Tomcats

So I needed to have a quick way to start/stop/restart/tail -f logs for two different Apache Tomcat instances, Rake is a great tool for this.

I wrote the following very quickly, sure there may be other "frameworks" out there to do this, but I didn't download anything, just wrote it and off I go. (no xml, sorry Ant)

[sourcecode language="ruby"]
# home directory for all this stuff
HOME = '/path/to/my/tomcats'
# defining our servers and their locations
SERVERS = {
:one => "#{HOME}/tomcat_one/",
:two => "#{HOME}/tomcat_two/"
}

# sure there is a better way than this.?.?.
task :default do
puts "\nThe following are the tasks you may choose from:\n"
app = Rake.application
app.do_option('--tasks', ARGV.shift)
app.display_tasks_and_comments()
end

SERVERS.each do |name, dir|
namespace "#{name}" do
desc "start the #{name} server instance"
task :start do
Dir.chdir(dir)
puts `./bin/startup.sh`
end

desc "stop the #{name} server instance"
task :stop do
Dir.chdir(dir)
puts `./bin/shutdown.sh`
end

desc "tail the #{name} server log"
task :tail do
system("tail -f #{dir}/logs/catalina.out")
end
end
end

def server_names
SERVERS.keys.join(', ')
end

[:start, :stop].each do |action|
desc "#{action} servers (#{server_names()})"
task "#{action}" do
SERVERS.keys.each do |key|
task("#{key}:#{action}").invoke
end
end
end

desc "restart servers (#{server_names()})"
task :restart do
task(:stop).invoke
task(:start).invoke
end
[/sourcecode]

Wednesday, December 12, 2007

You know you are getting old when

Just a few things that make me feel old sometimes... what does the same for you?

  • someone's definition of "legacy code" includes something you wrote

  • you know what "load *,8,1" means

  • you remember when we used to call them "scripting languages"

  • you simply can't continue to code after 2:30 AM

  • you had a BBS handle

  • this means something to you: "Hello everybody out there using minix -"

  • these screens ring a bell? : http://toastytech.com/guis/guitimeline.html

Friday, December 7, 2007

Rails 2.0 Released

Rails 2.0 Rails 2.0 Released.



This blog post is the official word releasing Rails 2.0 on the community.

The post includes a nice intro to some of the new features of Rails 2.0.

For a more in depth look at new features, head on over to Ryan Daigles' list of Rails 2.0 features which contain much more detail.

Monday, December 3, 2007

New Ruby Shootout

Antonio Cangiano recently completed a new Ruby performance shootout:
The Great Ruby Shootout

JRuby has a very nice showing this time compared to the shootout done in February.



Congrats JRuby team!

On a separate note, Charles Nutter (JRuby core developer) recently asked that all benchmarks currently being outperformed by Ruby 1.8.x should be reported as bugs!!! Bold and inspiring!