published over 2 years ago (26.07.2009 19:38)

London and Rails Underground recap

Update: added links to conference-related stuff at the bottom of this post.

Some notes, roughly chronological, left in draft state.

  • Rails developers usually don’t seperate data access layer and domain model.
  • This can constrain how easily the domain model can be changed. If done, saving/loading and validating data is on the DAOs, and “the interesting stuff” (business logic) lives in the model objects.
  • Q: how do you develop a domain model? A: may should be explained in Analysis Patterns
  • SASS and lesscss are nice extensions to css. They require processing the CSS, however.
  • at least three German-speaking universities now have courses where they use Rails (Bremen, Potsdam, Salzburg).
  • Refactor vs. Rewrite. First, “find out the hard core of what the client actually needs”. Be brave and delete, change.
  • clients of “rescue mission” projects didn’t get what they wanted from their last dev shop. The time and money reserved for the project are usually already spent, so they are in a hurry. => as a dev team, you need to show progress as early as possible.
  • do the agile thing as well—prioritize by business need
  • Don’t change code that you don’t like but which works well. Overcome your own prejudice and deal with the client’s money responsibly. Part of being professional, imho. Resist the Not invented here syndrome. Especially if the code is well tested. You can always refactor it when continue to work in that area.
  • don’t dive into removing complexity as a first refactoring step. Look for easy targets first.
  • Watch team morale on legacy code projects. Always pair.
  • Read the Refactoring book before starting, and really apply the techniques step by step when doing non-trivial stuff. Always keep the application running while changing structure.
  • When coding normal apps, refactor as you go, don’t see it as a separate activity, don’t speciallly reserve time for it.
  • always manage your client’s expectations. Underpromise, overdeliver.
  • JRuby has the by far best compatibility of the alternative Ruby implementations. It has an extensive test suite.
  • It allows you to change between 1.8 and 1.9 with a command-line switch.
  • ActiveRecord via JDBC is slow.
  • JRuby is the only Ruby implementation with real native threads.
  • Rack allows inserting code before and after the application handles a request. And allows plugging together different frameworks and components, and access session data from one in the other via Rack::Session. “Middleware” examples: Rack::Profiler, Rack::MailExceptions, Rack::Cache.
  • Rails 3 release: “could roll it up and ship” any time. Rails development has always been like that. There’s never a “Todo” list of what will go into a release.
  • They will do so when they feel they have done enough. But at least one thing Yehuda would like to do is get ActionMailer on the rewritten ActionController code.
  • London’s monthly Rails usergroup meetings easily exceed 100 people.
  • to introduce new technologies in places reluctant to change, first do ugly or boring stuff no one wants to do anyhow. With Ruby that could be: automate manual processes, write a test tool, small internal applications, quickly build prototypes, wire together systems. Realize that Ruby is perfect for glue code. Introduce the techniques (agile), not only the technologies.
  • A couple of experienced people fear that the new JVM Scripting languages (Clojure, Scala, ...) may stop the stream from Java-resignees to Ruby.

  • CouchFoo is intended to allow smooth ActiveRecord/RDBMS => CouchDB migration. This is a good first step to get on the couch. Then you can start wrapping your head around how to persist stuff with document-oriented databases, which I find the hardest part. “Performance tuning” of CouchDB is a whole new topic to be discovered.
  • With couchDB, the cost of index updates is incurred at read, not at write as with RDBMS. Index updates at read can be suppressed with :update => false. Read CouchFoo::Base for performance info.
  • #bulk_save for performance.
  • a good use for document-oriented DBs is when the data structure changes often and future “schema” development is unpredictable.
  • CouchFoo generates views for simple AR-style finders on the fly. Nice!
  • Dr Nic once more proved to be the best Rails entertainer (_why is in his own league, of course, but wasn’t present to present).

  • the i18n gem has great new features in 0.2.0 and edge: pluggable extensions, translation procs, advanced pluralization rules (implemented with procs), translation fallbacks, backend fallbacks, etc. Using it in current Rails currently requires a hack, however. See the Unicode CLDR Project for a massive amount of localization information.
  • Globalize 1 happily overused metaprogramming, had to hack into Rails big-time, and as such is a PITA to migrate to the new Rails i18n. Any solutions?
  • Kasabian kick Oasis’ ass on stage (according to London press).
  • Rough trade in Brick Lane reminds you what’s cool about a real-world record store.
  • LBI has 400 employees, a large terrace where you can work, and friendly people doing lots of barbecues.
  • ExtJS is a useful rich client library with nice client-server data transportation, interface elements and data binding. It doesn’t have to look like Windows. It lacks a high-level architecture, though. It’s not free for commercial work (150 per developer), only for open source.
  • Food in London is better than expected; even the traditional (Lamb stew, Apple Crumble & custard). Girls are cuter than expected, as well.
  • London weather follows the same patterns as in Hamburg. Quick rains, lots of grey skies, sometimes sun. A bit warmer.
  • Kevin Davy played the trumpet for Lamb, on tracks like Merge. Today he has fun playing around with electronic effects at his Jazz gigs.
  • ””Now wash your hands””:http://www.flickr.com/photos/phil76/3759350196/in/set-72157621719325175/ was a design agency that built cool stuff in their time. Today only toilets in Indian restaurants remind of their glory.
  • Hashrocket has guest pairs regulary. You can visit them at Jacksonville, Florida, stay at their guest house, and pair with them on the regular work.
  • London is green, can be sunny and beautiful.
  • a taxi from Russell square to Denmark Hill costs less than 20 pounds. Good if you’ve already spent the same amount on beer.
  • the mapping of the British pound shapes and sizes to their value is only obvious to the British themselves. They lovingly call the coins shrapnel.
  • Conaissence can be seen as underlying principle of many OOP design rules. And it’s a word that only Jim Weirich uses, so far.

  • the Rails community is as great as ever.
  • Smaller conferences are better.

For a more throrough summary of the talks, continue reading at rubypond: day 1, day 2.

Links:

Posted in , , , ,  | Tags , ,  | no comments | no trackbacks

published over 2 years ago (24.07.2009 00:17)

Top 3 horrible Microsoft ads

No comments required.

O M G I G P Internet Explorer 8 Puke Vomit Girl
Internal Microsoft Vista SP1 Video
Songsmith

and, aside from competition:

Office 2010: The Movie

Posted in  | Tags  | no comments | no trackbacks

published over 2 years ago (12.07.2009 15:52)

Updated is-gd for Ubiquity

See this post for a description of Ubiquity.

I adapted the script for the API changes introduced with 0.5, and put the script on github.

Posted in , ,  | Tags  | no comments | no trackbacks

published over 2 years ago (11.07.2009 12:12)

Cross-browser video support with HTML 5

Embedding video is easy in HTML 5, use the native <video> tag. Firefox 3.1+, Safari 4+ and Google Chrome (Windows) already have experimental support for it.

The HTML 5 spec does not specify which video format and codec should be used, so naturally ;-) the browser vendors have picked different formats. Getting videos to play cross-browser still is no problem, since the <video> tag can contain more than one source. So give an ogg and a quicktime version of the video, and all browsers currently supporting the <video> tag will be happy.

Example

The code
<video controls width="320" height="240">

  <!-- Firefox 3.1+, Google Chrome -->
  <source src="/files/swiss.ogg" type="video/ogg">

  <!-- Safari 4+, Google Chrome -->
  <source src="/files/swiss.mov" type="video/quicktime">

  <!-- All others (including Internet Explorer and Opera) -->
  Sorry, your browser doesn't seem to support the <code>video</code> element.

</video>
How to create the video formats (OS X)

Easy. Use Quicktime Player’s export feature (File > Export). But first get the xiph Quicktime Components to add .ogg support to Quicktime.

Posted in ,  | Tags , , ,  | no comments | no trackbacks