I am wondering about OS X’s tendency to replace much of the known Unix infrastructure with new tools. I just used dscl and niutils to recover some data and found that some tools available on older Unix (and modern Linux) flavours would perform the same tricks.
First Post: on complications inside OS X
CodeMash Early-bird Registration Ending Soon
Just a quick reminder CodeMash early-bird registration ends on November 15, so be sure to register soon in order to take advantage of the special $125 pricing!
Register here:
https://www.codemash.org/register.aspx
CodeMash Sessions Posted!
I’m very pleased to announce we’ve completed the selection process for 45 of the 49 speaker sessions scheduled for the coming event! You can view descriptions of most of these sessions here:
http://codemash.org/SessionList.aspx
Among other topics, this year’s sessions cover among other topics Dojo, Python, .NET, Ruby, Rails, RIA, Guice, Castle, Hobo, Django, Grails, Zend Framework, TDD, Groovy, and even a few robots…. What’s not to love?!?
Jason
The Last Language War Post You'll Ever Need to Read
My colleague Tom Welsh passed along a link to David Rupp’s posting of a hilarious panel conversation “transcript” between various modern programming languages, definitely worth a read:
Windows keyboard shortcut: New folder
Because Windows’ console interface is pathetic, users having Linux experience often find having to use the GUI makes even the most menial tasks a cumbersome process. Case-in-point: creating a directory. Having had enough of guiding the mouse pointer through the maze of context menus, I did some research and figured out a very easy keyboard sequence:
Shift + F10, w, f
“Shift + F10” opens the context menu, “w” takes you to the New directory, and “F” creates the directory!
Create Prettier Views with Custom Rails Helpers
While the development community loves to preach separation of logic and markup, so rarely do is this advice followed. Historically though, I don’t think the problem has been due to laziness, smugness, or anything of the sort; rather, many haven’t followed this practice as closely as possible because doing so was hard.
The Rails framework goes a long way towards eliminating this coder’s faux pas, not only by way of its MVC implementation, but also by offering numerous features which facilitate the removal of localized logic from view templates. One of the best examples of such a feature are Rails helpers, which are essentially a bunch of utilities that make it easier and cleaner to embed logic within a template by way of what you could essentially think of as macro calls.
Rails comes bundled with quite a few helpers capable of automating tasks such as pagination, creating form fields, and embedding assets such as JavaScript and CSS files. You can view a list of links to helpers found throughout the documentation here.
Yet occasionally you’ll be looking for a helper that isn’t bundled with the documentation, one capable of abstracting a task you’ll be using repeatedly in a view. I recently ran into this problem while working on a new Rails-driven website that serves as a directory for automobile dealers. Each dealer’s detailed view contains a list of key characteristics such as whether they’re open on Sunday, whether they’ll allow you to test drive a car, and whether they’re salesmen are particularly annoying. But rather than provide a simple yes/no list, I wanted to use green and red stoplights as visual indicators (get it, cars, stop lights??) for each.
While you could embed three if statement in the view to check the object attribute, a ternary statement would at least look a bit cleaner:
<b>Open Sunday</b>:
<%= @dealer.seating ?
"<img src='/images/green.png' />" :
"<img src='/images/red.png' />" %><br />
<b>Test Drive</b>:
<%= @dealer.testdrive ?
"<img src='/images/green.png' />" :
"<img src='/images/red.png' />" %><br />
<b>Annoying</b>:
<%= @dealer.annoying ?
"<img src='/images/green.png' />" :
"<img src='/images/red.png' />" %><br />
However, such code is still unpleasant to find in a view, not to mention difficult to maintain. The solution? A custom helper!
To solve this problem, in the dealer controller’s corresponding helper file (dealer_helper.rb) I created the following method:
def dealer_option_tag(asset)
asset ? image_tag("green.png") : image_tag("red.png")
end
Notice I took advantage of another helper named image_tag, which will produce the same img tag as found in the previous ternary statement, but in a much cleaner fashion in respect to the code.
<b>Open Sunday</b>:
<%= dealer_option_tag(@dealer.delivery) %><br />
<b>Test Drive</b>:
<%= dealer_option_tag(@dealer.seating) %><br />
<b>Annoying</b>:
<%= dealer_option_tag(@dealer.annoying) %><br />
As you can see, not only is this approach much easier to maintain, but also a more natural bridge for a designer!
Jason
Running Your PHP Applications on IIS
Today Microsoft announced the official release of their FastCGI extension for IIS 5.1/6.0, which greatly improves the performance and reliability of PHP on Windows’ flagship web server.
CodeMash Acceptance Window Closing Fast!
CodeMash session submissions continue to pour in ahead of the October 15 deadline, making the selection process more difficult than ever! If you’re interested in speaking at the event, be sure to submit your talk by no later than this coming Monday!
Remember, CodeMash is a conference which brings developers of all walk together, with talks on .NET, Java, PHP, Ruby, Rails, Python, Ajax, and much, much more, therefore if you’re talk is cutting-edge and cool, it’s a great candidate! See the 2007 agenda for the breadth of topics we’re looking for.
Taking place this January 9-11, in Sandusky, Ohio at the Kalahari Resort (aka the nation’s largest indoor water park), attendees will be treated to two days of sessions on some of today’s hottest technologies, including .NET, Ruby and Rails, Java, Web frameworks, Ajax development, and maybe even something on hacking robots and Wiis.
And at just $125 for the two day event, plus a special $88/night Kalahari hotel rate, you’re not going to find a better event for the price.
Hope to see you there!
Jason
CodeMash Speaker Coordinator
LINQ for Ruby
If you follow .NET, then chances are you were pretty blown away by Microsoft’s LINQ project, which extends C# and VB.NET with native syntax for querying data sources such as databases and XML document.
Chris Wanstrath is working on bringing similar support to Ruby, with his ambitious project aptly titled “Ambition”. It’s looking really sweet, learn more via this blog posting.
CodeMash Attendee Registration Now Open!!
Registration for CodeMash is now open! Taking place this January 9-11, in Sandusky, Ohio at the Kalahari Resort (aka the nation’s largest indoor water park), attendees will be treated to two days of sessions on some of today’s hottest technologies, including .NET, Ruby and Rails, Java, Web frameworks, Ajax development, and maybe even something on hacking robots and Wiis.
We’re sorting out the incredible number of speaker submissions now, and plan on having a preliminary list of sessions posted later this month.
And at just $125 for the two day event, plus a special $88/night Kalahari hotel rate, you’re not going to find a better event for the price.
Hope to see you there!
Jason
CodeMash Speaker Coordinator
MySQL Conference Call For Participation
MySQL Conference 2008 is currently in the planning stages, with the call for speaker participation now open! The submission deadline is October 30, so be sure to start thinking about those proposals now!
I’m particularly excited about this year’s event, as I have the distinct pleasure of serving on the conference’s program committee. Looking forward to looking over all of the cool submissions!
Learn more about how to submit your proposal
Jason
PS. Speaking of conferences, CodeMash’s call for participation is rapidly drawing to a close (October 15 is the deadline), so be sure to submit your proposals soon! :-)
Is It Too Late for Perl 6 and the Parrot VM?
InfoQ published a great post asking whether, after six years of developer, Perl 6 and Parrot is simply too little too late:
Manage Your MySQL Database with Rails Migrations
The first article of my new Developer.com series covering Rails’ powerful database features introduces you to Migrations, a great tool allowing developers to manage database schema changes in much the same way they manage code.
OLPC Laptops to be Made Available in US
Yesterday the The One Laptop Per Child organization announced the Give 1 Get 1 campaign, intended to help fund their efforts by allowing US citizens to get their hands on one of the ultra-cool laptops by essentially purchasing two, the other going to somebody in a developing country.
Sign me up. Not that I plan on making the laptop my work machine or anything, but it is a really neat device, and after tiring of it a few weeks after the purchase, I’ll give it to one of the local schools. And, as OLPC is a 501©(3) tax-exempt organization, your donation is tax deductible!
The purchase window will apparently be open for a short period of time starting November 12.
Ruby on Rails -vs- Django
These guys kill me, but this episode in particular is truly a riot:
