Archive for April 21st, 2007

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

Saturday, April 21st, 2007

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

Saturday, April 21st, 2007

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)

Saturday, April 21st, 2007

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: , , ,

Selenium for your web application testing

Saturday, April 21st, 2007

Selenium looks cool. Sure, its slower than unit tests, but its much faster than a human. It uses the web browser itself, to get your tests going, and will test it just like how a human tests. In a continious build farm, you can have good browser compatibility testing (run it against IE on Windows, even), and it also does functional testing.

It’s not only for Ruby, it works with Perl, Python, PHP and so forth. Its good for regression testing, and uses JavaScript. This means its very cross-platform, and cross-browser compatible.

How does it work with Flash? The new version of Flash apparently has JavaScript support according to Alex Chaffee, and you can actually use Selenium if need be. A member of the audience did mention that he had tried it, and its a little icky.

When testing web apps, getting titles are important, to see what the title of the page says - do it frequently in testing, because sometimes with web apps, you don’t get a 404 error, but a 200 OK (even though the page itself says it has failed). Write your tests early. Selenium can become slow - consider refactoring, or maybe move it to unit testing. It also has a slow mode, and it might be useful for a demo of your application even (well, you can see the login, and so forth). Polling architecture, web apps will time out - a somewhat sensible timeout is about 20 seconds, even if you’re on a very slow connection - any longer, and you’re probably not generating the page and its a (timing) failure.

Selenium doesn’t work well with testing file downloads. And on Firefox, you might need to use the Chrome extension. Cookies stay on between tests, so this can leads to tests passing when run alone, but failing when run together - solution is to eval JavaScript to clear cookies between tests. In Firefox, you can specify the name of a profile and launch it in a clean browser - Selenium by default, makes a new profile by itself - this really helps as some Extensions might affect your tests. On Linux, this is firefox -ProfileManager.

Peer To Patent, a community patent review site (and it will be open source!). Its tested with Selenium, sponsored by the USPTO, and looks like something that can definitely be useful in making sure silly patents aren’t passed (when the patent officer doesn’t know there’s prior art). When asked at the SDForum Ruby on Rails gathering, how many held patents, I’d say about 15-20% of the crowd raised their hands! Impressive number, but then again, I’m sitting in the Silicon Valley, what did I expect, right?

Continious testing architecture? Mac Mini, Parallels (Ubuntu, Windows), they use coherence mode of Parallels and IE sits and looks like a “native” application. All tests run, and the Ubuntu virtual instance is what launches everything. Testing thus happens on everything - OS X, Linux and Windows.

Technorati Tags: , , , ,

Distributed environment quirks; arrived at the MySQL Conf

Saturday, April 21st, 2007

I arrived earlier in the afternoon (on my second Friday now), and was waiting in the shuttle, for apparently another colleague. Twiddling thumbs, getting bored, and just when half an hour passes by, I think of the advice Stewart gave me, saying that the shuttle service was a little dodgy. Suddenly, I see a “familiar” face - its Lenz Grimmer, my colleague that I’ve been working with for ages. I say familiar, because all I’ve seen are photos, and made contact regularly via conference calls, IRC, and email. We met face to face, for the first time, just today.

Amazing, working in a distributed environment, no?

All that aside, Jay, Lenz and I couldn’t resist catching up by the poolside. Dinner ensued at Nicolino’s Italian restaurant in Sunnyvale, located a sweet walking distance from the Hyatt. No side-paths for walking, which I find to be surprising (you can cross streets with pedestrian crossing buttons, but parts of the streets just lose a sidewalk!)

Trying to sleep, and get some rest now for an early morning, but the 1,500 kids that are staying at the Hyatt are ruining my efforts. Knocking on doors, ringing my phone, screaming, running about, and apparently I have a view of the pool, and both the hot tub and pool are swarming with kids. Our future leaders are having a good time, it seems.