I once came across this awesomely weird bit of Rails code; it was a method that called itself and then redefined its body on the second call.
I've been telling the tale of the "recursive method that wasn't" ever since, but couldn't remember where in the codebase it was and was too lazy to go dig it up again. I recently came across a post about the exact same method on Brian Guthrie's blog - see for yourself. Incidentally, I agree with Brian - this kind of code is unnecessarily complex and is on the path to the meta dark side.
Tuesday, September 30, 2008
The recursive method that wasn't
Subscribe to:
Post Comments
(Atom)
Tag Cloud
- .net
- 2010
- activ
- activeresource
- agile
- ajax
- analysis
- announcement
- anti-pattern
- architecture
- bangalore
- bangpypers
- barcamp
- barcampbangalore4
- barcampbangalore5
- bcb4
- blogger
- book review verdict:read
- books
- browser
- brug
- bug
- c42
- call
- cc.rb
- ci
- conference
- content repository
- continuous integration
- cool
- css
- cycle
- darkness
- DCB1
- dcb2
- deployment
- devcampbangalore
- digg
- dining table
- django
- dragdrop
- dzone
- enterprise
- event
- evolving
- feedburner
- feedflare
- feedflareunit
- fun
- functional programming
- GI
- goldberg
- gotcha
- gwt
- hack
- hackdayindia
- hiring
- howto
- humour
- ide
- india
- innovative
- intellij
- interview
- intro
- irc
- jackrabbit
- java
- javaone
- javascript
- jcr
- jquery
- jruby
- JSNI
- junction
- leisure
- links
- literature
- lucene
- mac
- metaprogramming
- methodology
- microsoft
- mingle
- mochikit
- mongrel
- musings
- mvc
- nasscom
- news
- noob
- offshore
- OOP
- opinion
- oss
- osx
- performance
- photo
- plugin
- practices
- programming
- prototype
- python
- quality
- quirks
- rails
- rant
- rdt
- recruiting
- recruitment
- refactoring
- registry
- release
- resharper
- REST
- ruby
- rubyconf
- rubyconf2011
- scala
- search
- security
- skills
- spawn
- startup
- symlinks
- sysinternals
- tdd
- testing
- thoughtworks
- tibco
- tomcat
- tool
- training
- tw
- twb
- tweak
- unconference
- undernet
- utf8
- versioning
- video
- web
- windows
- wrest
- xp
- YUI








0 comments:
Post a Comment