Presentation: Operational Manageability lessons learned from eBay

Posted about 1 year back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

You're confident that your software will handle horizontal scale to thousands of servers. But how about your operational team? Have you also architected for managing that large collection of servers? Dan Pritchett will present lessons learned at eBay and lead a discussion on how to ensure your transactional scalability doesn't ignore your architecture's manageability.

Rails Security

Posted about 1 year back at Moves On Rails



After a security presentation at RailsConfEurope 2007, I found a lot was missing, so I made this. I didn’t finish it in time for reject conf, so I posted it here.

Kent Beck, Martin Fowler, speaking at QCon SF Nov 7-9

Posted about 1 year back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Kent Beck & Martin Fowler will be keynoting & delivering tutorials at the QCon San Francisco Nov 7-9th conference. Also, the schedule has been finalized with a new complete track covering security from a development perspective, and also a panel on the future of Java development including Joshua Bloch, JRuby's Charles Nutter, Spring's Rod Johnson, and .NET's Erik Meijer.

script/generate undo

Posted about 1 year back at Beyond The Type - Home

Here is small idea I've had for sometime that I quickly knocked up yesterday.

Generators are great but we have all had those "Oops!" moments where you realised that what you created was not quite what you wanted to do. Enter script/generate undo....

script/generate model WrongName
      exists  app/models/
      exists  test/unit/
      exists  test/fixtures/
      create  app/models/wrong_name.rb
      create  test/unit/wrong_name_test.rb
      create  test/fixtures/wrong_names.yml
      exists  db/migrate
      create  db/migrate/001_create_wrong_names.rb

.. ....

oops.. didn't want to do that.

script/generate undo
Undo'ing: model WrongName
    notempty  db/migrate
    notempty  db
          rm  db/migrate/001_create_wrong_names.rb
          rm  test/fixtures/wrong_names.yml
          rm  test/unit/wrong_name_test.rb
          rm  app/models/wrong_name.rb
    notempty  test/fixtures
    notempty  test
    notempty  test/unit
    notempty  test
    notempty  app/models
    notempty  app

Under the hood all it is doing is keeping a log of your generator history (see /log/generator.log). When undo is called it looks at the last log entry and passes it onto script/destroy. Pretty simple stuff but it saves you having to remember what it was that you typed previously.

The patch as it stands is pretty rough and ready. I'm posting this here to get some feedback to gauge whether it's worth pursuing further.

UPDATE Plugin on the way. I've created a new project on Rubyforge for any plugins I make - it should be setup soon. (just waiting for approval)

UPDATE 2: Plugin now released. See this post

script/generate undo

Posted about 1 year back at Beyond The Type - Home

Here is small idea I've had for sometime that I quickly knocked up yesterday.

Generators are great but we have all had those "Oops!" moments where you realised that what you created was not quite what you wanted to do. Enter script/generate undo....

script/generate model WrongName
      exists  app/models/
      exists  test/unit/
      exists  test/fixtures/
      create  app/models/wrong_name.rb
      create  test/unit/wrong_name_test.rb
      create  test/fixtures/wrong_names.yml
      exists  db/migrate
      create  db/migrate/001_create_wrong_names.rb

.. ....

oops.. didn't want to do that.

script/generate undo
Undo'ing: model WrongName
    notempty  db/migrate
    notempty  db
          rm  db/migrate/001_create_wrong_names.rb
          rm  test/fixtures/wrong_names.yml
          rm  test/unit/wrong_name_test.rb
          rm  app/models/wrong_name.rb
    notempty  test/fixtures
    notempty  test
    notempty  test/unit
    notempty  test
    notempty  app/models
    notempty  app

Under the hood all it is doing is keeping a log of your generator history (see /log/generator.log). When undo is called it looks at the last log entry and passes it onto script/destroy. Pretty simple stuff but it saves you having to remember what it was that you typed previously.

The patch as it stands is pretty rough and ready. I'm posting this here to get some feedback to gauge whether it's worth pursuing further.

UPDATE Plugin on the way. I've created a new project on Rubyforge for any plugins I make - it should be setup soon. (just waiting for approval)

UPDATE 2: Plugin now released. See this post

script/generate undo

Posted about 1 year back at Beyond The Type - Home

Here is small idea I've had for sometime that I quickly knocked up yesterday.

Generators are great but we have all had those "Oops!" moments where you realised that what you created was not quite what you wanted to do. Enter script/generate undo....

script/generate model WrongName
      exists  app/models/
      exists  test/unit/
      exists  test/fixtures/
      create  app/models/wrong_name.rb
      create  test/unit/wrong_name_test.rb
      create  test/fixtures/wrong_names.yml
      exists  db/migrate
      create  db/migrate/001_create_wrong_names.rb

.. ....

oops.. didn't want to do that.

script/generate undo
Undo'ing: model WrongName
    notempty  db/migrate
    notempty  db
          rm  db/migrate/001_create_wrong_names.rb
          rm  test/fixtures/wrong_names.yml
          rm  test/unit/wrong_name_test.rb
          rm  app/models/wrong_name.rb
    notempty  test/fixtures
    notempty  test
    notempty  test/unit
    notempty  test
    notempty  app/models
    notempty  app

Under the hood all it is doing is keeping a log of your generator history (see /log/generator.log). When undo is called it looks at the last log entry and passes it onto script/destroy. Pretty simple stuff but it saves you having to remember what it was that you typed previously.

The patch as it stands is pretty rough and ready. I'm posting this here to get some feedback to gauge whether it's worth pursuing further.

script/generate undo

Posted about 1 year back at Beyond The Type - Home

Here is small idea I’ve had for sometime that I quickly knocked up yesterday.

Generators are great but we have all had those “Oops!” moments where you realised that what you created was not quite what you wanted to do. Enter script/generate undo….

script/generate model WrongName
      exists  app/models/
      exists  test/unit/
      exists  test/fixtures/
      create  app/models/wrong_name.rb
      create  test/unit/wrong_name_test.rb
      create  test/fixtures/wrong_names.yml
      exists  db/migrate
      create  db/migrate/001_create_wrong_names.rb

.. ….

oops.. didn’t want to do that.

script/generate undo
Undo'ing: model WrongName
    notempty  db/migrate
    notempty  db
          rm  db/migrate/001_create_wrong_names.rb
          rm  test/fixtures/wrong_names.yml
          rm  test/unit/wrong_name_test.rb
          rm  app/models/wrong_name.rb
    notempty  test/fixtures
    notempty  test
    notempty  test/unit
    notempty  test
    notempty  app/models
    notempty  app

Under the hood all it is doing is keeping a log of your generator history (see /log/generator.log). When undo is called it looks at the last log entry and passes it onto script/destroy. Pretty simple stuff but it saves you having to remember what it was that you typed previously.

The patch as it stands is pretty rough and ready. I’m posting this here to get some feedback to gauge whether it’s worth pursuing further.

UPDATE Plugin on the way. I’ve created a new project on Rubyforge for any plugins I make - it should be setup soon. (just waiting for approval)

UPDATE 2: Plugin now released. See this post

Graphics, genomics and ruby

Posted about 1 year back at Saaien Tist


Having known and used the Generic Genome Browser (aka gbrowse, see here) for years now, it occured to me a while ago that it should be o so simple to create the same functionality with a much easier setup if we could use ruby instead of perl.

At the moment, both gbrowse and the Ensembl browser depend on bioperl's Bio::Graphics module. Although gbrowse has been instrumental for many people's research, it does take a bit of work to get it installed. Apart from bioperl, it depends on Apache for showing the results in a browser. Compare that to any Rails application, where you basically just need ruby and a "gem install rails". I've created rails applications in the past that contain exactly the kind of data that would typically be visualized by something like gbrowse. Takes no time at all to set up and you can even get away by virtually writing no code. And no Apache to be installed, or configuration files that you can't access because you're not root.

Such a rails application makes it possible to browse, edit and delete the data. The problem comes with the visualization bit. There's no bioruby graphics library (yet?) that automatically parses features on a reference and creates a nice picture of where your genes are on that chromosome. Of course, the genes should be clickable so you can link through to NCBI or Ensembl.

I've spend some time in the last year creating such a Bio::Graphics thing for ruby. I wanted it to behave the same as the one from bioperl: there one panel that has one or more tracks, and each track has features on it.

Book Excerpt and Review: Smart (Enough) Systems

Posted about 1 year back at InfoQ Personalized Feed for unregistered user - Register to upgrade!

Smart (enough) Systems is a book about Enterprise Decision Management. To make your systems smart enough, your core problem is knowing what's the right decision to make and how to make it when required. EDM is becoming a strategic area in IT as many organizations have found a gap between gaining insights from business intelligence and taking action to exploit that insight in operational decisions.

Top 10 microformats Resources for Web 2.0 Developers

Posted about 1 year back at Web 2.0 with Ruby on Rails

Shave your Semantic (or semantic?) Web

microformats has been only two years old, yet it has brought significant changes in a relatively short time.

What is it, actually? According to microformats.org, “[microformats is] designed for humans first and machines second, [they] are a set of simple, open data formats built upon existing and widely adopted standards.”

Enough with the fluff, let’s see how it actually works, microformats in action:

Arie Kusuma Atmaja nampang gitu lhoh
Flickr picture source

The above picture is me browsing to the LinkedIn profile of one of Indonesia’s renowned Ruby on Rails experts, Arie Kusuma Atmaja. The overlay window that contains these semantic information is not a LinkedIn feature. Rather, it is the easily usable, cross-browser Microformats Bookmarklet by LeftLogic. Go on… try it if you haven’t!

As you can see, the mere act of clicking the bookmarklet shows you some important facts about Arie (or any microformats-enabled you’re currently at). In case of a microformats-enabled resume page like in LinkedIn, it shows you where he works, when, education information, and related stuff. For fun comparison purposes only, my LinkedIn profile has more detailed information than his, hehe ;-)

The best part is not only that the information is human-readable, but it can also be extracted and processed automatically by machines or software. The primary distinguishing trait of a microformats-enabled HTML page is that it has semantic meaning. A microformats processor can know the difference between a name, an e-mail address, a street address, a job, a university, and so on; while in plain HTML, all you can infer are things dealing with paragraphs, tables, lists, and so on.

Making microformats-enabled pages aren’t hard at all, actually it is very easy! It’s even much easier than CSS.

To see how simple it is, let’s see a snippet of a real-world microformats, still courtesy of Arie:

<div id="masthead" class="vcard contact">
  <div id="nameplate">
    <h1 id="name"><span class="fn n"> <span class="given-name">Arie</span> <span class="family-name">Kusuma Atmaja</span> </span></h1>
      <p class="headline title"><strong>Senior Ruby Developer at IMT</strong></p>
    <div class="adr">
      <p class="locality">Indonesia</p>
    </div>
  </div>
</div>

Most of the above snippet is just HTML. The microformats part is simply the class=”something convention. Simple, and it gets the job done. :-)

Some more commonly used microformats specifications include:

Despite all these specifications, “who uses it?” is a good question. It turns out, there has been many, and more and more sites are adopting it. LinkedIn with hResume is one example, along with Google Maps, Yahoo, Flickr, and all these cool guys have been using them. Why shouldn’t you?

Interested? Here are some stuff to get you started:

  1. Online Tools
    1. Microformats Bookmarklet by LeftLogic
      A handy microformats explorer bookmarklet. Useful also if you’re on the go and you want to check out some microformats. No need to install anything fancy on the computer.
    2. Operator Firefox Extension
      Microformats explorer extension for Firefox. Whether you’re a web developer or simply want to check out this latest technology, this is a very useful tool.
    3. Tails Firefox extension is another microformats Firefox extension
    4. Almost Universal Microformats Parser is a useful web-based tool to parse microformats.
  2. Tutorials and Resources
    1. Microformats, what they are and how to use them, by Smashing Magazine
    2. Microformats Tutorial by XFront
      This is a very extensive tutorial. The complete tutorial package including the example files is a 13 MB download! :-)
    3. How to Use Microformats by Vitamin Features
    4. Introduction to Microformats by WhyMicroformats.com
    5. The Big Picture on Microformats by Digital Web Magazine
    6. Another by Digital Web Magazine: Microformats Primer
    7. Back to the future: Mozilla Firefox 3.0 Does Microformats
      Read/WriteWeb’s articles also touched microformats-related stuff quite often.
  3. Microformat Parsers
    1. Mofo Ruby Gem and Rails Plugin
      Of course, this is Ruby on Rails blog! Mofo is a microformats parser for Ruby and it also doubles as a Rails plugin. Check out Chris Wanstrath’s post for more information.
      There are also microformat parsers for other languages:
    2. Sumo is a microformats parser for JavaScript
    3. hKit is a microformats parser for PHP
    4. Microformats Parser is another parser for PHP
    5. Microformats Parser for Python
    6. Hpricot Ruby Gem
      Found a bizarre microformat or inventing your own? No problem, Hpricot comes to the rescue. Parse any HTML-ish document as you see fit… More info available from this RedHanded post.
    7. scrAPI is another Ruby library for parsing HTML that can be useful for processing microformats.
  4. References
    1. Microformats.org
      “Official” web site of Microformats. You can read everything about microformats, current specifications and newly proposed specs.
    2. “Microformats: Empowering Your Markup for Web 2.0″ Book by John Allsopp

      This is the first book dedicated to, and is a comprehensive guide to, microformats. It explores why, in Bill Gates’s words, “We need microformats”; how microformats work; and the kinds of problems microformats help solve. the book covers every current microformat, with complete details of the syntax, semantics, and uses of each, along with real-world examples and a comprehensive survey of the tools available for working with them. the book also features case studies detailing how major web content publishers such as yahoo put microformats to work in their web applications.
    3. Brian Suda’s microformats cheatsheet
      For people who likes it quick and done, this is perfect. It lists microformats properties by format and also lists each format and the hierarchy. This includes elemental microformats, compound microformats and some of the standard design patterns used.
    4. Dave Child’s microformats cheatsheet is another good reference
    5. And more cheatsheets on microformats.org wiki
    6. Gleaning Resource Descriptions from Dialects of Languages (GRDDL) is a recently approved W3C Recommendation that can be used, among others, for extracting semantic information (including microformats) from HTML pages.

Feel free to add more resources as you see fit, in the comments! :-)

RubyGems Tests Pass on 1.9

Posted about 1 year back at Segment7

455 tests, 1600 assertions, 0 failures, 0 errors

Wooo!

Here’s some of the changes and notes I made for you:

  • Removed some privates, because life is better without privates.
  • Added Object#send! stub on 1.8.
  • lambda cares about number of arguments now, so add |*a|.
  • ENV['FOO'] = nil becomes ENV.delete 'FOO'. This is the most annoying change, since restoring defaults is a pain.
  • WEBrick’s response object’s #code alias is gone, use #status
  • (i = 0; 5.times do |i| end; i == 4) is false, so use a separate variable like count, and add count = i
  • Kernel#require stores the full path to the require’d file now.
  • There’s something going on with class variable sharing between a module and its singleton class. See [ruby-core:12200].
  • Strings aren’t Array-like anymore, so use things like Kernel#Array instead of String#to_a
  • #methods and #instance_variables return arrays of symbols instead of strings now.

Also, the tests run 20-25% faster on 1.9 than 1.8. Look for a beta of RubyGems coming next week!

Predictions regarding Thermo

Posted about 1 year back at Eribium

So, as Ryan Stewart aptly put it: “WTF is Thermo?”. All we have so far is a job description (below) and a few cryptic posts from Adobe employees under NDAs.

“enable designers and creatively inclined developers to easily build rich internet applications and interactive content. “Thermo” will streamline the process of adding interactivity, behavior and motion to creative assets and will work seamlessly with both Adobe’s Creative Suite tools, such as Photoshop, Illustrator, Fireworks and Flash, and with developer oriented tools such as Flex Builder.”

So, just to add fuel to the fire I’m posting the predictions of Juan and myself about what Thermo really is. So here goes:

  • We know it’s for designers so made the following assumptions
    • Full ide without a command line interface or sdk.
    • wysiwyg interface, like the Flash ide, without access to the code (unlike Flex).
    • timeline. Differs from flash though in that each ‘key’ is a state.
  • Integrates into Photoshop/Fireworks etc so importing images comes down to a click (no css etc).
  • An abstraction upon Flex, using Flex components.
  • More effects and transitions between states - extending the basic Flex ones.
  • A orange/brown icon (see below) - largely because they’ve run out other colors.

We’re probably barking up the wrong tree, I guess we’ll just have to wait till MAX.

Thermo

Predictions regarding Thermo

Posted about 1 year back at Eribium

So, as Ryan Stewart aptly put it: “WTF is Thermo?”. All we have so far is a job description (below) and a few cryptic posts from Adobe employees under NDAs.

“enable designers and creatively inclined developers to easily build rich internet applications and interactive content. “Thermoâ€� will streamline the process of adding interactivity, behavior and motion to creative assets and will work seamlessly with both Adobe’s Creative Suite tools, such as Photoshop, Illustrator, Fireworks and Flash, and with developer oriented tools such as Flex Builder.”

So, just to add fuel to the fire I’m posting the predictions of Juan and myself about what Thermo really is. So here goes:

  • We know it’s for designers so made the following assumptions
    • Full ide without a command line interface or sdk.
    • wysiwyg interface, like the Flash ide, without access to the code (unlike Flex).
    • timeline. Differs from flash though in that each ‘key’ is a state.
  • Integrates into Photoshop/Fireworks etc so importing images comes down to a click (no css etc).
  • An abstraction upon Flex, using Flex components.
  • More effects and transitions between states - extending the basic Flex ones.
  • A orange/brown icon (see below) - largely because they’ve run out other colors.

We’re probably barking up the wrong tree, I guess we’ll just have to wait till MAX.

Thermo

ParseTree version 2.0.2 has been released!

Posted about 1 year back at Polishing Ruby

ParseTree is a C extension (using RubyInline) that extracts the parse tree for an entire class or a specific method and returns it as a s-expression (aka sexp) using ruby's arrays, strings, symbols, and integers.

As an example:

def conditional1(arg1) if arg1 == 0 then return 1 end return 0 end

becomes:

[:defn, :conditional1, [:scope, [:block, [:args, :arg1], [:if, [:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]], [:return, [:lit, 1]], nil], [:return, [:lit, 0]]]]]

  • Uses RubyInline, so it just drops in.
  • Includes SexpProcessor and CompositeSexpProcessor.
    • Allows you to write very clean filters.
  • Includes UnifiedRuby, allowing you to automatically rewrite ruby quirks.
  • ParseTree#parsetreefor_string lets you parse arbitrary strings of ruby.
  • Includes parsetreeshow, which lets you quickly snoop code.
    • echo "1+1" | parsetreeshow -f for quick snippet output.
  • Includes parsetreeabc, which lets you get abc metrics on code.
    • abc metrics = numbers of assignments, branches, and calls.
    • whitespace independent metric for method complexity.
  • Includes parsetreedeps, which shows you basic class level dependencies.
  • Does not work on the core classes, as they are not ruby (yet).

Changes:

  • 2 minor enhancements:

    • Deactivated gcc-specific compiler flags unless ENV['ANAL'] or on my domain.
    • Minor code cleanup - happier with -pedantic and the like.
  • 1 bug fix:

    • FINALLY conquered the splat args bug on certain platforms/versions. Special Thanks to Jonas Pfenniger for debugging this and providing a patch.
  • http://www.zenspider.com/ZSS/Products/ParseTree/

Good times at RailsConf Europe

Posted about 1 year back at Loud Thinking

It's hard to fathom that we've just finished our fourth RailsConf in just 15 months. The first one already seems so long ago, which just underlines how fast things have been moving in the Rails world.

It's even more impressive to think of all the people we've had go through the conferences. More than three thousands attendees combined and some of the most interesting speakers in technology.

This year I was especially pleased to hear Roy Fielding speak and to have the opportunity to chat with him afterwards. The past year and a half been about trying to understand and implement the ideas and the specifications that Roy has been involved with for more than a decade. It was very pleasing to hear him talk so warmly of our progress so far.

Sun continued to surprise positively (and still slightly puzzling), but I had so much to say about that, I went ahead and wrote it up separately in Sun surprises at RailsConf Europe 2007.

As I process all the inputs from the conference, I'm sure I'll have more to say. But for now I want to make sure to thank everyone involved. Ruby Central and O'Reilly did a spectacular job organizing everything. And I had a great time speaking to so many different users of Rails. The most amazing things are being done with this framework we're building.

P.S.: My keynote slides were few and almost entirely without meaning out of context, but Casper Fabricius did a good job with his summary.


1 ... 469 470 471 472 473 ... 575