September 2010 Archives

minitest/unit is a small and fast replacement for ruby's huge and slow test/unit. This is meant to be clean and easy to use both as a regular test writer and for language implementors that need a minimal set of methods to bootstrap a working unit test suite.

mini/spec is a functionally complete spec engine.

mini/mock, by Steven Baker, is a beautifully tiny mock object framework.

(This package was called miniunit once upon a time)

Changes:

1.7.2 / 2010-09-23

  • 3 bug fixes:

    • Fixed doco for expectations and Spec.
    • Fixed testcaptureio on 1.9.3+ (sora_h)
    • assert_raises now lets MiniTest::Skip through. (shyouhei)
  • http://rubyforge.org/projects/bfts

Workflow Slides

| | Comments (0)

Here are my slides for the Workflow talk I gave on Saturday at GoGaRuCo 2010.

My Workflow

As keywords (in no particular order):

  • TDD
  • emacs
  • ctags
  • full-screen
  • incremental-search
  • OSX/BSD
  • hoe
  • minitest
  • rubygems
  • autotest
  • rake
  • unified-environment
  • autotest.el
  • toggle.el

What are yours?

Send to: ryand-ruby@zenspider.com
Plain text email.
Subject: gogaruco keywords.
Please separate all keywords by line.
Email addresses will NOT be used for any reason. (Except maybe to ask you a question).

Please send me your workflow! I'm going to see what we can do to visualize the data in neat and informative ways. I'll blog that later and/or present it at a future ruby conference.

GoGaRuCo 2010: Workflow

| | Comments (0)

I decided upon a talk for GoGaRuCo:

Workflow

How do you develop software? Is it effective? Could you do better? Where could you put the least amount of effort to improve the most? When do you do that? What would your teammates answer? What can you learn from them?

I shall give you my answers. You shall give me yours.


(Suggestions are still welcome)

I just got pulled into filling a slot that opened up. What should I talk about? Suggestions welcome...

Inline allows you to write foreign code within your ruby code. It automatically determines if the code in question has changed and builds it only when necessary. The extensions are then automatically loaded into the class/module that defines it.

You can even write extra builders that will allow you to write inlined code in any language. Use Inline::C as a template and look at Module#inline for the required API.

Changes:

3.8.6 / 2010-09-03

zenprofiler helps answer WHAT is being called the most. spyon helps answer WHERE those calls are being made. ZenProfiler provides a faster version of the standard library ruby profiler. It is otherwise pretty much the same as before. spyon provides a clean way to redefine a bottleneck method so you can account for and aggregate all the calls to it.

% ruby -Ilib bin/zenprofile misc/factorial.rb 50000
Total time = 3.056884
Total time = 2.390000

          total     self              self    total
% time  seconds  seconds    calls  ms/call  ms/call  name
 50.70     1.64     1.64    50000     0.03     0.05 Integer#downto
 19.63     2.27     0.63   200000     0.00     0.00 Fixnum#*
 14.19     2.73     0.46    50000     0.01     0.05 Factorial#factorial
  9.93     3.05     0.32        1   320.36  3047.10 Range#each
  5.54     3.23     0.18        2    89.40   178.79 ZenProfiler#start_hook

Once you know that Integer#downto takes 50% of the entire run, you can use spy_on to find it. (See misc/factorial.rb for the actual code):

% SPY=1 ruby -Ilib misc/factorial.rb 50000
Spying on Integer#downto

Integer.downto

50000: total
50000: ./misc/factorial.rb:6:in `factorial' via 
       ./misc/factorial.rb:6:in `factorial'

Changes:

1.3.0 / 2010-09-02

Wraps rbaddeventhook so you can write fast ruby event hook processors w/o the speed penalty that comes with settrace_func (sooo sloooow!). Calls back into ruby so you don't have to write C.

% ruby demo.rb 
# of iterations = 1000000
                          user     system      total        real
null_time             0.120000   0.000000   0.120000 (  0.125279)
ruby time             0.560000   0.000000   0.560000 (  0.562834)
event hook            3.160000   0.010000   3.170000 (  3.175361)
set_trace_func       34.530000   0.100000  34.630000 ( 34.942785)

Changes:

1.1.0 / 2010-09-02

  • 2 minor enhancements:

    • Allow eventhookklass to work with class and metaclass.
    • Force ~/.ruby_inline cleanup in tests
  • 1 bug fix:

    • event_hook won't work on any 1.9 w/o major rework :(
  • http://rubyforge.org/projects/seattlerb

Vlad the Deployer's sexy brainchild is rake-remote_task, extending Rake with remote task goodness.

Changes:

2.0.2 / 2010-09-02

Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.

Changes:

1.4.1 / 2010-09-01

  • 2 minor enhancements:

    • Added extra error handling for ERB flay to deal with tons of bad ERB
    • Skip plugin if another version already loaded (eg local vs gem).
  • 1 bug fix:

    • Fixed all tests that were having problems on 1.9 due to unstable hashes
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.5.0 / 2010-09-01

  • 1 major enhancement:

    • Added plugin system. Define a module under Flog to extend it.
  • 3 minor enhancements:

    • Added special case penalty for wtf to_proc: blah(&b = proc {...}) (benjaminb)
    • Improved tests and test coverage.
    • Unfactored & refactored report code. Much cleaner and more maintainable now.
  • 2 bug fixes:

    • Fixed API change for FlogTask (andreacampi)
    • Fixed bad edgecase handler for block_pass (benjaminb)
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

ruby2ruby provides a means of generating pure ruby code easily from RubyParser compatible Sexps. This makes making dynamic language processors in ruby easier than ever!

Changes:

1.2.5 / 2010-09-01

  • 4 minor enhancements:

    • Added braces to hash args surrounded if in a binary method call.
    • Added rewrite_resbody to double check structure and freak if necessary.
    • Added stress task
    • rewrite_rescue now detects rescue with multiple arguments.
  • 2 bug fixes:

    • Fixed dstr/dregex/d* roundtripping problem
    • Fixed up call arg processing to be more correct and to work with the new sexp form
  • http://seattlerb.rubyforge.org/

  • http://rubyforge.org/projects/seattlerb

ruby_parser (RP) is a ruby parser written in pure ruby (utilizing racc--which does by default use a C extension). RP's output is the same as ParseTree's output: s-expressions using ruby's arrays and base types.

As an example:

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

becomes:

s(:defn, :conditional1, s(:args, :arg1), s(:scope, s(:block, s(:if, s(:call, s(:lvar, :arg1), :==, s(:arglist, s(:lit, 0))), s(:return, s(:lit, 1)), nil), s(:return, s(:lit, 0)))))

Changes:

2.0.5 / 2010-09-01

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]]]]]

Changes:

3.0.6 / 2010-09-01

sexp_processor branches from ParseTree bringing all the generic sexp processing tools with it. Sexp, SexpProcessor, Environment, etc... all for your language processing pleasure.

Changes:

3.0.5 / 2010-09-01

Inline allows you to write foreign code within your ruby code. It automatically determines if the code in question has changed and builds it only when necessary. The extensions are then automatically loaded into the class/module that defines it.

You can even write extra builders that will allow you to write inlined code in any language. Use Inline::C as a template and look at Module#inline for the required API.

Changes:

3.8.5 / 2010-09-01

minitest/unit is a small and fast replacement for ruby's huge and slow test/unit. This is meant to be clean and easy to use both as a regular test writer and for language implementors that need a minimal set of methods to bootstrap a working unit test suite.

mini/spec is a functionally complete spec engine.

mini/mock, by Steven Baker, is a beautifully tiny mock object framework.

(This package was called miniunit once upon a time)

Changes:

1.7.1 / 2010-09-01

ZenTest provides 4 different tools: zentest, unit_diff, autotest, and multiruby.

ZenTest scans your target and unit-test code and writes your missing code based on simple naming rules, enabling XP at a much quicker pace. ZenTest only works with Ruby and Test::Unit. Nobody uses this tool anymore but it is the package namesake, so it stays.

unit_diff is a command-line filter to diff expected results from actual results and allow you to quickly see exactly what is wrong.

autotest is a continous testing facility meant to be used during development. As soon as you save a file, autotest will run the corresponding dependent tests.

multiruby runs anything you want on multiple versions of ruby. Great for compatibility checking! Use multiruby_setup to manage your installed versions.

Changes:

4.4.0 / 2010-09-01

Hoe is a rake/rubygems helper for project Rakefiles. It helps you manage and maintain, and release your project and includes a dynamic plug-in system allowing for easy extensibility. Hoe ships with plug-ins for all your usual project tasks including rdoc generation, testing, packaging, and deployment.

See class rdoc for help. Hint: ri Hoe or any of the plugins listed below.

For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf

Changes:

2.6.2 / 2010-08-31

About this Archive

This page is an archive of entries from September 2010 listed from newest to oldest.

August 2010 is the previous archive.

October 2010 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.32-en