Home Contact Sitemap

Preston Lee

Founder, CEO, OpenRain.com

About

During the day I run OpenRain in Phoenix: a Ruby on Rails development shop. During the night... well... I still have to run OpenRain, but when I find time to breathe, I exhale here. If you'd like to get in touch professionally, don't hesitate to contact me via the OpenRain website.

Peace,

Preston

What If Ruby Had Final Variables Like Java Or Erlang?

ruby

After a long confusing Ruby debate today at OpenRain on the merits of functional, Erlang-esque write-once-read-many variables, I’m going to step onto the podium and just say it… Ruby should get “final” or “const” variables in a similar semantic style to Java, except at runtime. Rather than ramble on for 12 paragraphs explaining exactly how this might work, read this fictitious Ruby code snippet instead. (Optional: Also check out the chapter on “final” in Hardcore Java.)

Final variables like this are really just an inline TDD mechanism.

Allowing local stack data to be constant provides no functional enhancements to the software, but alleviates the need for certain types of tests by using the compiler and/or runtime to assert certain memory is immutable. The “friend_best” method variant in the code snippet would obviously break most existing Ruby programs, but ups the bar for defensive programming by preventing many common bugs out-of-the-box while still providing support for traditional Ruby variables. At the very least we should have something like “friend_better”. Adding this information to the parse tree will also make it easier for IDEs to provide features more easily implemented for static languages.

TDD/BDD is in–no qualms about it–but we can make our code safer, cleaner and more concise by applying some of the lessons learned by our statically-typed language cousins over the last few decades.

Share/Save/Bookmark

Tags: , , , , , , , , ,

. 01 Jan 09 | Computer | Comments (0)

Speaking Twice At ABLEconf: Saturday, September 20th, 2008

I’ll be giving two sessions this Saturday, September 20th, 2008 at ABLEconf: Arizona Business and Liberty Experience hosted at the University of Advancing Technology. The first will be a ~50 minute getting-started-with-ruby-on-rails type session aimed at developers similar to the one I’m giving this Wednesday for Joe Developer. The second will be a plug-heavy talk over how OpenRain does F/OSS-friendly web development in the commercial space using F/OSS software and tools, targeted for a business-minded crowd.

ABLEconf is a new event so I’m not sure what to expect, though I’d put my money on a lot of systems-level event content since much of the participation seems to be from local Linux groups.

Share/Save/Bookmark

Tags: , , , , , , , , ,

. 15 Sep 08 | Computer | Comments (0)

Speaking At Joe Developer: Wednesday, September 17th, 2008

This Wednesday evening, OpenRain will be hosting and providing food for Phoenix’s East-valley Joe Developer group. I’ll be giving a getting-started-with-ruby-on-rails type demo, after which I’m sure there’ll be good conversation and fun. Attendance and food are free. Food will be hot at 6PM. [Venue] [Google Group]

Share/Save/Bookmark

Tags: , , , , , , ,

. 15 Sep 08 | Uncategorized | Comments (0)

Slides: Ruby P2P Development With Journeta

Here (PDF , Keynote) are the slides from my Phoenix Ruby Users Group presentation yesterday on Ruby P2P Development with Journeta. Thanks a ton for the great audience. I’m extremely pleased that everyone seemed to “get it”, and even more so that the suicidal audience-interactive demo went well. Chris Matthieu has recorded the session for the Rubyology podcast, which will be available soon for free on iTunes and the web.

While you’re on iTunes, you can also grab #68: Marc’s Ruby2Ruby presentation, as well as #48 given last year to the Phoenix Rails group on attachement_fu.

Share/Save/Bookmark

Tags: , , ,

. 09 Sep 08 | Uncategorized | Comment (1)

Presenting At September 2008 Phoenix Ruby Users Group

I’ll be presenting at the September 2008 Phoenix Ruby Users Group on Monday, September 8th, covering development of Ruby peer-to-peer applications using OpenRain’s latest gem release, Journeta. Topics will include Ruby’s threading model, basic networking review, Journeta usage, and live demos. 6:30PM, here.

[Location Details] [PRUG Google Group]

See you there!

Share/Save/Bookmark

Tags: , , , , , , ,

. 05 Sep 08 | Computer, Personal | Comment (1)