I just hacked out a java version of autotest plugin for eclipse (of course inspired by the ZenTest).
No more running JUnit tests manually, this plugin will detect code changes and run JUnit tests of that Java project. You can download and install this plugin from http://code.google.com/p/autotest4j/
Current version of plugin only runs with eclipse 3.3 and I need to do some clean up and fixes before I can checkin my source code. Watch out for some changes I am planning for next version.
Enjoy...
Stuff about software development, agile and testing
Tuesday, March 11, 2008
Wednesday, March 5, 2008
Monday, January 14, 2008
Scala: Surprise Part oNe
Ruby is a language of least surprises but I am not sure whether I can say that for Scala yet. I have already encountered some of them, here is one example
You can define method without '()'
def height: Int = 0 //This is a valid method
def width(): Int = 0 //This is valid too
Now you can invoke 'width' method with and without parenthesis but you cannot do that for height method.
SURPRISED
Update: The Scala convention is, use '()' for parameter less method if it has side effects otherwise don't
You can define method without '()'
def height: Int = 0 //This is a valid method
def width(): Int = 0 //This is valid too
Now you can invoke 'width' method with and without parenthesis but you cannot do that for height method.
SURPRISED
Update: The Scala convention is, use '()' for parameter less method if it has side effects otherwise don't
Thursday, December 13, 2007
scala book is out
Its now an open secret that Scala doesn't have good documentation/reference to help any developer to try their programming skills. But finally Scala book is out (pre-print edition) and I got my copy.
Thursday, November 29, 2007
jruby closure decompiled
Its quite interesting to look into the compiled class file generated by JRuby. Following is the sample java code generated for a closure (1.times { puts 'in closure' }) .
private static ByteList __18 = ByteList.create("in closure");
.....
.....
public IRubyObject closure0(ThreadContext threadcontext, IRubyObject irubyobject, IRubyObject airubyobject[])
{
Ruby ruby;
IRubyObject irubyobject1 = (ruby = threadcontext.getRuntime()).getNil();
DynamicScope dynamicscope = threadcontext.getCurrentScope();
IRubyObject _tmp = irubyobject1;
do
{
try
{
threadcontext.setPosition(__15);
return _17.call(threadcontext, irubyobject, RuntimeHelpers.constructObjectArray(ruby.newStringShared(__18)));
}
catch(org.jruby.exceptions.JumpException.RedoJump _ex) { }
} while(true);
}
RedoJump exception is used to simulate ruby redo
private static ByteList __18 = ByteList.create("in closure");
.....
.....
public IRubyObject closure0(ThreadContext threadcontext, IRubyObject irubyobject, IRubyObject airubyobject[])
{
Ruby ruby;
IRubyObject irubyobject1 = (ruby = threadcontext.getRuntime()).getNil();
DynamicScope dynamicscope = threadcontext.getCurrentScope();
IRubyObject _tmp = irubyobject1;
do
{
try
{
threadcontext.setPosition(__15);
return _17.call(threadcontext, irubyobject, RuntimeHelpers.constructObjectArray(ruby.newStringShared(__18)));
}
catch(org.jruby.exceptions.JumpException.RedoJump _ex) { }
} while(true);
}
RedoJump exception is used to simulate ruby redo
Tuesday, November 27, 2007
inpsect gem file
Playing around with RubyGems source code. So first thing I wanted to know is the gemspec.
Here is a small script to inspect any gem file
require 'yaml'
require 'rubygems/source_info_cache'
Gem::SourceInfoCache.cache
spec = Gem::SourceInfoCache.search('#{gem}')
p spec.to_yaml
You could also use Gem::SourceIndex to spec out locally installed gems
Here is a small script to inspect any gem file
require 'yaml'
require 'rubygems/source_info_cache'
Gem::SourceInfoCache.cache
spec = Gem::SourceInfoCache.search('#{gem}')
p spec.to_yaml
You could also use Gem::SourceIndex to spec out locally installed gems
Sunday, November 11, 2007
Subscribe to:
Posts (Atom)
Labels
- agile (4)
- agile testing (1)
- build tool (1)
- design (1)
- DSL (1)
- duck typing (1)
- eclipse (1)
- ejb3 (1)
- Fluent Interface (1)
- grails groovy (1)
- groovy (1)
- gwt (1)
- hacking (1)
- haskell (1)
- java (1)
- javascript (1)
- jvm (1)
- languages (1)
- mac (1)
- pipes (1)
- programming (1)
- qa (1)
- rant (2)
- ruby (6)
- sas (1)
- scala (3)
- scripting (2)
- software rewrite (1)
- statically typed (1)
- testing (4)
- two phase commit (1)