Archive for April 2007

MySQL Conference 2007 schedule is *packed*

Have you taken a look at the MySQL Conference 2007 schedule yet? With just one day to start, I’d advise you to take a gander. So many interesting things, that my only complaint (well, a suggestion) is that I hope that these talks get a video recording and they should be given to attendees via the web. Apple have done this for WWDC, and linux.conf.au did a great job in 2007 to record every session.

Why video recording? Because each block of time, have 8 sessions, in where about 3-5 sessions on average can be interesting. Last I checked, I couldn’t split myself.

Sure the slides will make it online eventually, but the talk itself is where most interest really is at, I believe.

svrc2007 links

More so that I will remember, the 2nd Annual Silicon Valley Ruby Conference 2007 have some interesting web links.

  • sv ruby conf on Tumblr – looks like Twitter for groups? They sell it as “blogs with less fuss”, but I’m definitely not signing up for yet another blogging platform.
  • Conference Meetup site for svrc2007 – this is pretty cool. People logs, make connections, upload presentations, plan gatherings. This is something conferences should definitely look at having running. Its just cool stuff.

I’m sure if you search on Flickr or Technorati for svrc2007 or something similar, that tag will be used…

Technorati Tags: , ,

ActiveRecord

ActiveRecord, by Rabble.

  • Rails ActiveRecord is mostly database agnostic.
  • Good subset of the SQL standard is supported, so you can migrate very easily (this is what OS X Leopard will do – develop using sqlite on your workstation, then migrate to mysql on the server).
  • Integer primary keys, and classname_id foreign keys. Single table inheritance is what really works well.
  • What ActiveRecord doesn’t like:
  1. views
  2. stored procedures
  3. FK constraints
  4. cascading commits
  5. split/clustered DBs
  6. enums
  • Complexity is best located in the code, not in the database, according to the Rails developers.
  • Avoid SQL injection with find. Use an array or let it do the quoting for you. By itself, it allows you to do stupid things – so avoid cross site scripting, etc.
  • Joins are very rarely used, you use ActiveRecord relationships.
  • Some associations:
  1. has_one – when the FK is in the OTHER table
  2. belongs_to – when the FK is in THIS table
  3. has_many
  4. has_and_belongs_to_many
  • DBAs like FK constraints, but the Rails way is to really just use validations.
  • ActiveRecord returns enumarable objects, which look like arrays
  • ActiveRecord also allows for output formats – like to_yaml, to_xml, to_json. So your database records can become XML pretty easily.
  • find_by_sql – use it when you’re finding ActiveRecord isn’t suitable for you, i.e. you’re doing something that is not very standard.

Rabble also gave us an anecdote from his Odeo days. They thought that grabbing feeds should be done in parallel. Which is when they used RubyThreads. And suddenly, they were getting some horrendous database problems, duplicate records and so on. Moral of the story: RubyThreads and ActiveRecord don’t mix. A member of the audience mentioned that using find_by_sql consumed about 1MB of memory in his application, however, using ActiveRecord to do the same thing was costing about 20MB per thread.

Technorati Tags: , , , , ,

Business Scripting Languages or SAP’s marketing talk + Stanford HCI mashup

The after lunch talk on Business Scripting Languages, by Asuman Suenbuel and Murray Spork was something I found very hard to stay awake in. In fact, I think so did many others, some of whom walked out of the room.

The first half of the talk was filled with SAP marketing spiel, something I think should sincerely stay away from conferences that are tech-oriented. When you hear a word like “SOA”, you already know you’re in the wrong talk. Greg the architect video (link courtesy Leslie Wu), now that was funny. Saving grace, and they do mention the movies are not from SAP. Figures. SOA is like a clothes wardrobe was the other video, with some somewhat hot looking girl – sure, again, saving grace.

Model-driven development (this is not UML – this is more like the Eclipise Modeling Framework, etc.) vs. Ruby Domain Specific Languages (DSL’s) [What is a DSL?]. SAP utilizes a modeling framework (MOIN), and supports external DSLs (unlike Ruby where you’ve got an embedded/internal DSL).

Ruby + SOA is about flexibility, is where they concluded off. I think thats an hour I’m never getting back, but thank goodness I have my laptop lying around and actually was getting other work done.

I was surprised that they never mentioned MaxDB once. They do follow MySQL naming schemes, calling things “connectors” though.

More interestingly, was the video, titled Rapidly prototyping web applications with d.mix, presented by Leslie Wu, from the Stanford HCI group on Ubicomp. Its a cool mashup, and while I haven’t investigated Yahoo! Pipes yet, it looks like it just may be something similar, except that Ubicomp also supports hardware interfaces. Of course, the other thing about Ubicomp is that I can’t actually can’t test it. The publications on their website are worth a read though (see, I told you I found a use for the one hour wasted on SAP). Relevance to Ruby? They use it – Ubicomp is built with Ruby.

Technorati Tags: , , , , ,

6-8% of folk don’t want MySQL as a default back-end

At the 2nd Annual Silicon Valley Ruby Conference, about a dozen folk have stated that they don’t want MySQL to be their default database for Rails. I do presume that there might be 150-200 folk that have rocked up, so thats a small portion of the market, I guess.

From what I gather, some people have to integrate with other applications, and having two database backends, probably don’t make so much sense. For example, if you use GRASS for GIS mapping stuff, you’d not want your default web app database to be MySQL, right?

I do sincerely hope to meet them all in the next couple of days, to see what their concerns are, failing which there’s a who’s who in where we can still get contacted with later.

Then the distribution statistics. 40% on Mac OS X, 50% on Windows (ick), and a mere 10% on Linux (lots of OS X users do use Linux).

Technorati Tags: , ,

Making & Breaking Web Services (with Ruby)

Chris Wanstrath (ex-CNET, now freelancing) worked on Chow and ChowHound, and thats Ruby and MySQL based, as opposed to PHP which is something they normally use. At last years conference, he arrived still as a PHP programmer. He transformed to a Rails programmer in only a year!

The Ruby SOAP library is really hard to debug. It however, creates methods on the fly, and the library itself is reliable. mocks is a good way to test SOAP, or Mocha.

Microformats – the website is your API. Just use semantic markup, that tell the pareses what information is important. They’re very easy to add accessibility to the stuff that you already have there. mofo (sudo gem install mofo) is a gem to parse microformats. Corkd – another rails site? mofo supports pretty much everything – hCard, hCalendar, hReview, hEntry, hResume. hEntry is what they used to get recent blog posts displayed on Chow, from ChowHound (because they’re two separate applications).

Hpricot allows you to scrape pages (and a whole lot more). Its written in C, and its really fast. Great for scripting.

Cheat.errtheblog.com – stores cheat sheets. And its a command line Ruby application that pulls information off a web service. The web site itself is some sort of wiki (diffing changes, logging everything).

Technorati Tags: , , ,


i