I'm maintaining a custom HTML5 slide framework. A little similar to the canonical slides.html5rocks.com insofar as, well, it's HTML5 and slides horizontally! But the key difference is that it's very markup-based - What You See Is What You Need (WYSIWYN) - so creating new slides is easy.
Anyway, I did something similar with TiddlySlides a little [...]
[Read more →]
Tags: offline·Ruby
I've had a Rails website which works fine for about 12-18 hours, then starts giving out intermittent 500 errors because the mongrels die.
After searching around, I ended up fixing it on two levels.
(a) Direct solution - Fix MySQL config One reason Mongrels die is MySQL connections not timing out, leading to starvation. Apparently there's a [...]
[Read more →]
Tags: Mongrel·Monit·MySQL·Rails·Ruby
<
p style="clear:both; margin-top: 2em; ">
Man, JSON has come out of nowhere! I first came across it amid the Javascript hype in early '05, now it's everywhere. Not only in your Ajax apps, but in the On-Demand Javascript APIs of the world.
Sharing an ethic of simplicity with Rails, it's not surprising these technologies have come closely [...]
[Read more →]
Tags: ActiveRecord·AjaxPatterns·JSON·Links·Rails·Ruby
Rails uses "whiny nil", which means if you call a method on an object that happens to be nil (null), you get an exception. This is good. But with strings in a web app (in any language), you often don't know if an empty string will be nil or simply zero-length (""). That's because some [...]
[Read more →]
Tags: NilClass·Rails·Ruby
Will the peripheral IT community come to view REST and Rails as equivalent? It might sound ridiculous, but consider: Unix==Linux, Wiki==Wikipedia, Ajax=Web 2.0, blogging==RSS, podcast==spoken MP3. Last but not least, every knows that
Ruby==Rails
So it only stands to reason that the REST equivalence shall come to pass, as REST hops on for a free ride on [...]
[Read more →]
Tags: Rails·REST·Ruby·Web 2.0·Web Standards
On Ajaxian, Dion points to Sun's Phobos project, an attempt to build a new platform for server-side Javascript. Phobos came out six months ago, around the time of the May Ajax Experience.
No-one has taken server-side Javascript seriously since it died a premature death in the mid-90s. But there is great potential...
Server-side Javascript would allow for [...]
[Read more →]
Tags: Ajaxian·Java·Javascript·Links·Phobos·Rails·Ruby·Server-Side Javascript
I often want to use an operator called "but", the complete equivalent to "and". It would let me say:
if guest.wants_to_see(report) but report.is_premium_content
raise PremiumContentException
end
As opposed to:
if guest.wants_to_see(report) and report.is_premium_content
raise PremiumContentException
end
The first example is easier to comprehend because it's closer to the business rule and the way we think [...]
[Read more →]
Tags: But·Perl·ProgrammingLanguages·Ruby·SelfDocumenting·Syntax
So you're coding a partial and you want to know which template has pulled it in. The magic word is "@first_render", which will give you something like "homepage/admin" for the homepage/admin.rhtml template. Trivial, I know, but I couldn't find any mention of it after much googling, so I decided to output self.inspect and was pleased [...]
[Read more →]
Tags: ERb·Partials·Rails·Ruby·Web
I didn't ever expect to get excited about how a framework handles keywords, but Rails just impressed me big-time. When I tried to create a model named "Activity", Rails told me it was reserved and then came back with a list of thesaurus terms that might be used instead!. That's not just opinionated software, it's [...]
[Read more →]
Tags: HCI·Keywords·Rails·Ruby