ruby

Ruby stdout and stderr

Very cool, thanks to a comment from a reader I just learned about the Ruby $stdout and $stderr variables. In short, you can write to STDOUT and STDERR in Ruby using code like this:

$stdout.puts "stdout"
$stderr.puts "stderr"

If you put those two lines in a Ruby script, and then run the script like this:

ruby test.rb > stdout 2> stderr

you'll find that the stdout and stderr files will contain the two different strings.

Cato - A database CRUD assistant

I'm getting closer to releasing my "programming language independent" CRUD generator application. I'm now calling it Cato. My previous code names for it were Db2App and SideKick, but when I thought about the name SideKick, I couldn't help but think about Inspector Clousseau's trusty sidekick Cato Fong, and thus the application name was born. :)

A Ruby JPEG example - Use Ruby to get the date and time from a JPEG file

A few weeks ago when I upgraded my iPhone 3G to iOS 4, I hooked up my iPhone to my old Windows computer, where it was originally sync'd. Downloading my iPhone photos onto my Windows XP computer was a pain, and worse than that, in the process, the iPhone photos were pulled off the phone in some random order, so all the photos are completely out of order when I look at them in the Windows Explorer or the Mac Finder.

Early alpha release of my Agile/Automated GUI Testing software

Automated GUI Testing Software: If you happen to be looking for something to do this weekend, here's a very early release of our free (GPL) Agile GUI Testing software (AGT).

In short, just download the file below, and when you un-tar it, it will create a "scripts" folder. That folder contains our GUI testing software, along with two sample scripts. If you'd like to see how the sample scripts work, they are shown in this two-minute YouTube video (Agile GUI testing, basic demo).

My Agile/Automated GUI testing software: A sample script

Automated GUI Testing Software: I'm still debating on the name of my GUI testing software (I've been calling it XGT, for eXtreme GUI Testing software), and today I'm calling it Agile GUI Testing (or Agile GUI Tester). None of that matters at the moment, but after pounding away on it some more last night, I thought I'd share a sample script of how this software works.

To that end, here's a sample Agile GUI Testing software script that does the following:

Ruby developer jobs

During the past year I've worked with all sorts of programming languages, technologies, and frameworks, including Ruby and Rails; Java, Spring, Struts, and JSF; and PHP, CakePHP, and Drupal.

A review of five free text editors for Mac OS X (Part 3)

jEdit

jEdit is an open source Java-based text editor that has been around for years. On the positive side it's free, reasonably quick, and most importantly, it has a ton of third-party plugins. All those plugins are what keeps me coming back to look at jEdit from time to time.

A Ruby script to remove binary (garbage) characters from a text file

Problem: You have a file that should be a plain text file, but for some reason it has a bunch of non-printable binary characters (also known as garbage characters) in it, and you'd like a Ruby script that can create a clean version of the file.

Solution: I've demonstrated how to do this in another blog post by using the Unix tr command, but in case you'd like a Ruby script to clean up a file like this, I thought I'd write up a quick program and share it here.

Ruby - How to convert ASCII decimal (byte) values to characters

Problem: You have a byte value, or a string of byte values, and you want to use a Ruby script to convert each byte to its equivalent ASCII character.

Solution

I just ran into this problem while working on a script to remove binary/garbage characters from a Unix text file. In short, the file had a bunch of binary "garbage" characters in it, and I wanted a clean version of the file that contained only printable ASCII characters in it.