...ideas generally have no economic value whatsoever, except in rare cases such as when a patent is issued. And even in those cases it's the patent law that creates the value, not the ideas.
"
- Scott Adams, Dilbert blog.
everything under the Sun (pun definitely not intended)
...ideas generally have no economic value whatsoever, except in rare cases such as when a patent is issued. And even in those cases it's the patent law that creates the value, not the ideas.
module Rails
#rails stub
def Rails::logger
return Rails::Logger.new
end
class Rails::Logger
def debug string
log "DEBUG:\t"+string
end
def info string
log "INFO:\t"+string
end
private
def log string
# adding a prefix
print "RAILS_LOG:"+string
end
end
end
in the test case, just require rails.rb and you are set to go., running the test case from the command line will dump the logs onto the terminal.
exercise for the future- get this stub logger to be a littl emore fancy- supress by level etc.
and to test the private method blah of a class Foo
class Class
def publicize_methods
saved_private_instance_methods = self.private_instance_methods
self.class_eval { public *saved_private_instance_methods }
yield
self.class_eval { private *saved_private_instance_methods }
end
end
class TestFoo &Test::Unit::TestCase
def test_blah
Foo.publicize_methods do
assert_not_nil Foo.blah
end
end
end
A few days back I stumbled across a world of what i call 'keyboard GUIs' though which is much better terminologized and explained in the article The Graphical Keyboard User Interface. In short this encompasses those UIs that try to marry the intuitiveness of the GUI with the speed of the keyboard based command-line style. And since then I have been discovering them all over the place...
1. Launchy (windows) - Somewhere between the linux Alt-F2 run dialog and the windows UI.
Once you start using it, you start wondering what life was before it and contemplating those other poor windows users still stuck to point and click...
2. Google Reader Keyboard Shortcuts- especially 'jump to subscription' ('g'+'u') I think the Google Reader UI was starting to get really cluttered (or maybe its because I have 250+ subscriptions) when they gave the keyboard shortcuts and saved me from having to search all over the place for the next thing to read.
** Wish those guys would add some wildcards into that search thoug, given that there are a whole load of feeds that start with the
3. And lastly we come to our friendly Eclipse which has this superman-shortcut (accessible via Cntrl+3) that gives you search over a whole bunch of thingamajigs.
*I am not sure which version this shortcut and UI was available from. I tried it on Ganymede (3.4) and am quite sure it doesn't work on 2.12 which I use in office.
UPDATE: FireFox already has a prototype plugin Cntrl-Tab by Dao which in which on hitting F4 you get a cool multi-window tab grid with a filter input box 
