Posted by Daniel Butler
Fri, 27 Apr 2007 14:42:00 GMT

Ruby's own Edgar Allen Poe, _why the lucky stiff, mastermind of the continually-evolving Why's (Poignant) Guide to Ruby and Try Ruby!, has done it again with Hackety Hack: The Coder's Starter Kit. But what exactly has _why done, and why?
In The Little Coder's Predicament, _why posits that, unlike us first generation hackers who grew up with Vic 20s, C64s, Amigas, and other machines which came with simple, accessible programming environments, kids aren't learning programming on today's consoles and desktops because companies are now fearful of placing the power of a programming language in the hands of its users. With Hackety Hack, the expressiveness of Ruby, the power of web-based applications using JavaScript and AJAX, and _why's own creativity and artistry have converged to produce a quirky, easy-to-use, and, most of all, fun, programming environment that kids will take to faster than you can type FOR X=0 TO 255: POKE 32768+X,X: NEXT.
Brian DeLacey explains, "Hackety Hack is as significant a computer-age innovation as the mouse because it makes computers accessible in wholly new educational and transformational ways."
Hackety Hack currently comes as a standalone installer for Windows (Version 0.3.1 if you want it), and it works pretty damn well. (Further platform support should be forthcoming, as well as non-English translations.) As you create programs and follow through the self-guided tutorials, you can create, edit, and save files, which are preserved between sessions. Ruby's expressiveness is encapsulated in a DSL which integrates beautifully with JavaScript. say writes to the output area; ask uses a JavaScript dialog to grab input from the user, and sleep presents an animated JavaScript progress bar. All and all, a very kind and sensible interface for the babies.
I've been asked what I would recommend as ways to get kids involved with programming, and in the past I've recommended Try Ruby!, but Hackety Hack has taken the self-guided tutorial and freedom of a true, (albeit sandboxed), programming environment to the next level, with a powerful set of methods that make common and modern tasks easy. The simplicity shows through, and as _why explains in The Hackety Manifesto, "Hello world should be one line. In fact, downloading an MP3 should be one line!!."
Best of all, Hackety Hack is free, and will remain so. Thanks, _why. And thanks to all (the 50+) who contributed to this creation.
Hackety Hack @ Wikipedia
Posted in Ruby, Open Source, Programming | 4 comments
Posted by Daniel Butler
Wed, 31 Jan 2007 21:05:00 GMT

Have you ever had the urge to name a data model in your Ruby on Rails application something obvious, like Action, Table, File, Columns, or Database? Well, don't. Choosing a name like that might work for you in some cases, but it might fail miserably for someone else using a different database engine (i.e., MySQL verses PostgreSQL verses Oracle).
Think you can remember all the problematic names? Think again. There are at least 974 known keywords which can give you problems. I started with the ReservedWords pages on the Ruby on Rails Wiki, and pulled in and merged all the SQL-92, SQL-99, SQL-2003, PostgreSQL, MySQL, SQL Server and ODBC reserved keywords, and put them in one place, mainly for my own future reference.
So what if your data models are about Databases, Tables, Columns, and Files? Simply think of a Good Prefix™, and name all your models accordingly: DaDatabase, DaTable, DaColumn, and DaFile, with resulting table named da_databases, da_tables, da_columns, and da_files. It's easy, painless, and helps you group similarly-purposed tables and models accordingly, and you don't have to wrack your brains thinking of synonyms for obvious model names like "Action". I use Geo- for location-oriented data, Sys- for System-oriented tables, Log- for transactions, and App- for application-oriented tables.
Read on to see the full list ...
Read more...
Posted in Ruby on Rails | 4 comments
Posted by Daniel Butler
Sat, 02 Dec 2006 23:08:00 GMT

Mike Houghton invites all web technologists in the Tallahassee area to the first meeting of Refresh Tallahassee on Thursday, December 7 at 6:30 pm at the Moore Consulting Group. So what is Refresh Tallahassee? Mike writes:
Good question. Here’s a working definition--Refresh is a community of metro Tallahassee designers and developers who interface to invigorate the web development culture in our area. Refresh is about crafting the best client-user relationship web-based media can offer. It’s a meeting at the crossroads of user-experience and usability, sharing ideas about how to “make it easy to be happy.”
See you there!
Refresh Tallahassee Site
Refresh Home Page
Posted in Web Design | no comments
Posted by Daniel Butler
Thu, 02 Nov 2006 01:59:00 GMT

Subversion exports can be difficult to manage in your Ruby on Rails application, especially if you want to make local changes to a vendor-supplied plugin that shouldn't really be applied back to that vendor's trunk (or cannot be). Another reason to keep the vendor's code checked into your own tree, is that you'll be able to better see changes to the vendor's code as they happen and assess the impact on your own code, as well as audit vendor changes that break your application in some way. Externals cannot provide such a safety net. So, into the cylinder of Rails plugins enters Piston by François Beausoleil of Sherbrooke, Québec, Canada. His description:
Piston is a utility that eases vendor branch management. This is similar to svn:externals, except you have a local copy of the files, which you can modify at will. As long as the changes are mergeable, you should have no problems.
Watch him demonstrate its usage:
$ piston import http://dev.rubyonrails.org/svn/rails/trunk vendor/rails
Exported r4720 from 'http://dev.rubyonrails.org/svn/rails/trunk' to 'vendor/rails'
$ svn commit -m "Importing local copy of Rails"
$ piston update vendor/rails
Updated 'vendor/rails' to r4720.
$ svn commit -m "Updates vendor/rails to the latest revision"
As a bonus feature, you can lock piston-gripped trees with piston lock to prevent subversion from updating past a specific vendor's revision that works with your application. Nice work, François.
Piston @ RubyForge
Posted in Ruby on Rails | no comments
Posted by Daniel Butler
Fri, 27 Oct 2006 15:08:00 GMT
Wow, can discovering and installing helpful Rails plugins get any simpler than this?
$ gem install rapt
Successfully installed rapt-0.2.1
$ rapt search "full text search"
Active Search
Info: http://www.agilewebdevelopment.com/plugins/show/22
Install: http://julik.textdriven.com/svn/tools/railsplugins/simplesearch
Indexed search engine
Info: http://www.agilewebdevelopment.com/plugins/show/63
Install: http://langwell-ball.com/svn/indexed-search/trunk/indexedsearchengine/
Acts as Ferret
Info: http://www.agilewebdevelopment.com/plugins/show/83
Install: svn://projects.jkraemer.net/actsas_ferret/trunk/plugin/actsas_ferret
Searchable
Info: http://www.agilewebdevelopment.com/plugins/show/236
Install: http://svn.mojodna.net/repository/acts_as_searchable/trunk
Query Analyzer
Info: http://www.agilewebdevelopment.com/plugins/show/392
Install: http://svn.nfectio.us/plugins/query_analyzer
acts_as_solr
Info: http://www.agilewebdevelopment.com/plugins/show/400
Install: http://opensvn.csie.org/thiago/rails/plugins/acts_as_solr/
ExceptionTextable
Info: http://www.agilewebdevelopment.com/plugins/show/268
Install: http://svn.pinds.com/rails/plugins/exception_textable/
FCKeditor
Info: http://www.agilewebdevelopment.com/plugins/show/369
Install: svn://rubyforge.org//var/svn/fckeditorp/trunk/fckeditor
$ rapt install http://opensvn.csie.org/thiago/rails/plugins/acts_as_slr/
- ./actsas_solr/CHANGELOG
- ./acts_as_solr/README
- ./acts_as_solr/init.rb
- ./acts_as_solr/install.rb
- ./actsas_solr/lib/actsas_solr.rb
- ./acts_as_solr/lib/templates/solr.yml
- ./acts_as_solr/schema.xml
All made possible by Ben Curtis' RaPT tool and the Rails Plugin Directory. Thanks, Ben!
Ben's Blog Entry on RaPT
RaPT @ RubyForge
Posted in Ruby on Rails | no comments
Posted by Daniel Butler
Thu, 26 Oct 2006 20:08:00 GMT
Alex Wayne has updated his FlexImage plugin for Ruby on Rails, and it now allows for all sorts of special effects such as translucent overlays, drop shadows, and borders, in addition to its existing image processing capabilities. The plugin is described as:
"FlexImage is a plugin that allows you to put image data in your database And retrieve at any size, qulaity or cropping you like. Combine this with page caching and you have a fast and easy way to manage large numbers of uploaded images that are always just the right size for your needs."
As an example, an image can be resized with an added drop shadow with the following snippet:
flex_image :action => 'show',
:class => MyImage,
:size => 200,
:crop => true,
:shadow => true
Thanks, Alex!
Alex's Blog Posting
FlexImage API Documentation
FlexImage at the Ruby Plugins Directory
Posted in Ruby on Rails | 1 comment
Posted by Daniel Butler
Wed, 25 Oct 2006 22:24:00 GMT
Zed Shaw, author of Mongrel, has provided a fix for the exploitable error in Ruby's cgi.rb library. The error occurs when incorrectly crafted MIME boundaries for multipart uploads causes cgi.rb to loop infinitely waiting for input.
The following servers are affected:
- Mongrel
- Lightspeed
- CGI Standalone
- Any other server using cgi.rb
If you're running any of these, you may want to upgrade or patch. More information on the error can be found in Zed's post to the Ruby on Rails forum.
Posted in Ruby on Rails | no comments
Canoe, Suwanne, River, Florida (June 2002)