[Nitro] Road To Perdition, or: Fixme status

Jonathan Buch john at oxyliquit.de
Fri Aug 18 14:33:18 EDT 2006


Hi,

after my brother spend like an hour tracing a non-existant bug (RMagick  
wasn't installed, but it showed some weird 'missing method foo' error  
which had nothing to do with it) I created a FIXME/TODO list.  That bug  
hunt was only because of those `rescue Object => ex` statements..

I added a patch which adds a "don't use Object to rescue!" after every  
statement.  Some are trivial, other require more thought to fix.

attributeutils.rb (14): don't use Object to rescue!
outgoing.rb (27): don't use Object to rescue!
sweeper.rb (45): don't use Object to rescue!
mongrel.rb (108): don't use Object to rescue!
vcr.rb (63): don't use Object to rescue!
webrick.rb (129): don't use Object to rescue!
output.rb (86): don't use Object to rescue!
errors.rb (66): don't use Object to rescue!
script.rb (53): don't use Object to rescue!
scgi_service (31): don't use Object to rescue!
mysql.rb (3): don't use Object to rescue!
mysql.rb (9): don't use Object to rescue!
mysql.rb (74): don't use Object to rescue!
postgresql.rb (3): don't use Object to rescue!
postgresql.rb (42): don't use Object to rescue!
sqlite.rb (3): don't use Object to rescue!
sql.rb (382): don't use Object to rescue!
sql.rb (401): don't use Object to rescue!
sql.rb (433): don't use Object to rescue!
sql.rb (454): don't use Object to rescue!
store.rb (180): don't use Object to rescue!
scgi_service (25): don't use Object to rescue!

Other fixmes/todos:

Quite an impressive list, some of them are probably in the wrong category  
and should be rewritten or

this is from manverus repo (0.40+2):

FIXME || TODO
==============================

FIXME
==============================

apache.conf (20): if you have installed the distribution the -I is not  
needed.
apache.conf.new (22): if you have installed the gems
controller.rb (111): will be improved.
view.xhtml (8): at #{@obj.create_time.strftime('%I %M %p')}
apache.conf (20): if you have installed the distribution the -I is not  
needed.
setup.rb (1365): should not remove current config files
attribute.rb (22): this is a hack, rethink!
attributeutils.rb (14): don't use Object to rescue!
attributeutils.rb (100): FIXME: this is a hack, will be replaced with  
proper
configuration.rb (179): this does not work as expected.
mail.rb (133): From is typically NOT an array.
outgoing.rb (27): don't use Object to rescue!
outgoing.rb (28): rescue needed here at all?
outgoing.rb (49): FIXME: for some STUPID reason, delivery_method
template.rb (39): must be xformed before the <?r pi.
template.rb (58): FIXME: NOT TESTED! test and add caching.
template.rb (197): there is a problem with using OpenObject here!!!
uri.rb (19): TODO: deprecate this.
uri.rb (27): hmm is this needed?
uri.rb (84): FIXME: only numeric and strings are passed to
uri.rb (117): INVESTIGATE ruby's URI seems to differently handle
validation.rb (241): how to get the Regexp options?
glue.rb (62): is this really needed?
setup.rb (1365): should not remove current config files
tc_configuration.rb (31): A hack to make compatible with rake. All code in  
this
tc_property.rb (101): Temporarily dissabled.
tc_property_mixins.rb (79): THINK!
tc_property_type_checking.rb (10): temporarily dissabled.
tc_property_type_checking.rb (30): does not work when run in the full test  
suite.
nitro (32): better error mesage and/or show default app!
sweeper.rb (11): find a better name.
sweeper.rb (28): replace with 'extend Nitro::Caching::Output' ?
sweeper.rb (45): don't use Object to rescue!
sweeper.rb (46): gmosx: is this the right thing to do?
webfile.rb (63): FIXME: this is a hack!! better implementation
webfile.rb (104): FIXME: this is a hack!!
mongrel.rb (108): don't use Object to rescue!
scgi.rb (164): this is uggly, something better?
vcr.rb (63): don't use Object to rescue!
webrick.rb (129): don't use Object to rescue!
webrick.rb (151): make compatible with fastcgi.
actions.rb (55): not very good implementation?
fragments.rb (70): If you modify the code here, don't forget to modify
output.rb (24): FIXME: Don't create excessive directories, use better
output.rb (86): don't use Object to rescue!
output.rb (87): gmosx: is this the right thing to do?
cookie.rb (16): KEEP this!
http.rb (44): VERIFY THIS
http.rb (46): VERIFY THIS
request.rb (85): FIXME: handles some fcgi problems.
request.rb (233): better name and implementation.
cgi.rb (46): only handle nitro requests.
cgi.rb (48): QUERY_STRING is sometimes not populated.
cgi.rb (99): THINK: better return nil here?
cgi.rb (124): dont precreate?
cgi.rb (152): return the correct protocol from env.
cgi.rb (299): this hides the performance hit!!
elements.rb (152): FIXME: optimize this, how?
elements.rb (153): FIXME: this is a hack fix, improve.
errors.rb (9): Don't change the Exception class, use NitroException
errors.rb (66): don't use Object to rescue!
include.rb (16): must be xformed before the <?r pi.
morphing.rb (38): leave the leading space.
morphing.rb (55): leave the trailing space.
script.rb (53): don't use Object to rescue!
script.rb (92): injection happens at the end, so that the DOM
compiler.rb (120): This method is also called from the scaffolding
compiler.rb (209): parent_action_name does not work as expected,
compiler.rb (238): This needs a better implementation. Better means
context.rb (104): still something more elegant/efficient.
context.rb (133): improve this! BUGGY
relation.rb (8): this is a temp hack.
dispatcher.rb (77): TODO: path should include trailing '/'
dispatcher.rb (78): TODO: should actually create an instance, thus
dispatcher.rb (160): this is a critical method that should be optimized
dispatcher.rb (171): FIXME/OPTIMIZE: no annotation for mount point!!
dispatcher.rb (187): HACKFIX!
dispatcher.rb (217): no raise to make testable.
flash.rb (120): crap, not really needed!
feed.rb (128): not sure
form.rb (108): Fix the mismatch with the attributes.
javascript.rb (100): this code is kinda old, will be deprecated soon.
javascript.rb (381): refactor this!
pager.rb (178): perhaps this is optimized ? naaaaaah...
table.rb (40): Remove crappy, bloatware additions.
table.rb (237): Arrgh!! dangerous method, who added this?
xhtml.rb (10): this duplicates R functionality, merge!
xhtml.rb (178): keep the leading / to be IE friendly.
xml.rb (6): INVESTIGATE: is this used or deprecated?
helper.rb (24): dont name constant to avoid loop.
helper.rb (43): FIXME: temp solution, will fix!
helper.rb (48): dont interpolate (RDoc fix).
helper.rb (61): check xxxHelper before xxx.
publishable.rb (69): FIXME: better implementation needed.
publishable.rb (70): FIXME: copy all annotations.
publishable.rb (96): add the default action (leave this?)
publishable.rb (233): better implementation? optimize this?
render.rb (206): THINK: this may be unnecessary!
render.rb (250): dont use yet, you have to encode the branch to
render.rb (261): don't use yet.
render.rb (278): Hmm perhaps this should not be logged
router.rb (35): TODO: use a hash only instead of [rule, options]
scaffolding.rb (189): investigate save, improve.
scaffolding.rb (307): Rethink the options, make :ROOT the default.
scaffolding.rb (355): I do NOT lke this, will remove this in a future
drb.rb (29): should probably move to another directory (scripts?)
runner.rb (25): Trim this class, most functionality goes to bin/nitro.
runner.rb (141): handle logging.
runner.rb (325): refactor !
session.rb (74): RDoc friendly.
nitro.rb (35): leave them here.
apache.conf (21): if you have installed the gems
scgi_service (22): this is uggly, something better?
scgi_service (31): don't use Object to rescue!
setup.rb (1365): should not remove current config files
tc_cgi.rb (80): passwd'
tc_controller.rb (85): the next 5 should be 3!!
tc_dispatcher.rb (40): this is a hack!
cacheable.rb (11): WARNING: If the file lib/og/entity.rb is changed
revisable.rb (47): FIXME: test against primary key, not oid.
revisable.rb (56): FIXME: test against primary key, not oid.
taggable.rb (11): use index and char() instead of String.
taggable.rb (32): this does not work as expected :( it alters
taggable.rb (235): Og should handle this automatically.
mysql.rb (3): don't use Object to rescue!
mysql.rb (9): don't use Object to rescue!
mysql.rb (74): don't use Object to rescue!
mysql.rb (92): system is used to avoid shell expansion.
mysql.rb (145): InnoDB supports transactions.
mysql.rb (152): InnoDB supports transactions.
mysql.rb (159): InnoDB supports transactions.
postgresql.rb (3): don't use Object to rescue!
postgresql.rb (42): don't use Object to rescue!
postgresql.rb (57): system is used to avoid shell expansion.
override.rb (28): any idea how to better test this?
sqlite.rb (3): don't use Object to rescue!
sqlite.rb (92): any idea how to better test this?
collection.rb (90): NOOO: this was a bug! it corrupts the default options.
collection.rb (208): IS this needed?
clone.rb (5): I haven't tested this extensively,
entity.rb (12): WARNING: If you change the methods here, don't
entity.rb (170): leave the checks in this order (optimized)
entity.rb (549): move to sql store?
entity.rb (573): investigate this.
entity.rb (663): investigate this patch!
clause.rb (1): Work in progress.
condition.rb (1): Work in progress.
manager.rb (169): this is used though, dont remove without recoding
manager.rb (182): move somewhere else.
has_many.rb (35): DON'T set self[:foreign_field]
joins_many.rb (25): better enchant polymorphic parents and then add
many_to_many.rb (16): better enchant polymorphic parents and then add
relation.rb (199): FIXME: more elegant test here
join.rb (118): not that useful?
utils.rb (110): keep the '' for nil symbols.
sql.rb (143): This means you can't do any find-type
sql.rb (187): THINK: condition is not really useful here :(
sql.rb (242): THINK: should not set this by default.
sql.rb (317): TODO: don't convert to float by default, perhaps
sql.rb (382): don't use Object to rescue!
sql.rb (401): don't use Object to rescue!
sql.rb (433): don't use Object to rescue!
sql.rb (454): don't use Object to rescue!
sql.rb (477): should return :error or something.
sql.rb (515): cleanup/refactor, this is an IMPORTANT method.
sql.rb (685): move to serializable attributes.
sql.rb (733): add extra handling for float.
store.rb (180): don't use Object to rescue!
testcase.rb (17): this method should probably be moved to glue.
og.rb (192): leave this here.
setup.rb (1365): should not remove current config files
tc_taggable.rb (28): sexy')
tc_taggable.rb (32): rain')
scgi_service (25): don't use Object to rescue!


TODO
==============================

gen.rb (27): add support for facets command.
attributeutils.rb (2): find a better name!
attributeutils.rb (9): Add preprocessing.
xml.rb (7): move to nitro or move mixins here.
memcached.rb (9): socket disconnection handling
memcached.rb (10): error handling
memcached.rb (11): multiple servers connections
configuration.rb (18): implement with annotations.
configuration.rb (26): find a better name.
localization.rb (9): initialize translation map from a yaml file.
template.rb (44): strip xhtml comments.
uri.rb (19): deprecate this.
uri.rb (170): find a better name.
validation.rb (61): all validation methods should imply validate_value.
tc_template.rb (15): items:
tc_template.rb (32): add test for static inclusion.
magick.rb (7): pass generalized RMagick command.
webfile.rb (20): webfile_path customization sucks, should be improved!
webfile.rb (137): implement me!
mongrel.rb (42): add logging.
mongrel.rb (100): handle If-Modified-Since and add Last-Modified headers
mongrel.rb (103): check whether path circumvents public_root directory?
scgi.rb (159): remove sync, Nitro *is* thread safe!
output.rb (11): use Server.public_root as default.
caching.rb (16): add per controller caching_enabled.
utils.rb (8): add testing for mac IE (an other platforms)
cgi.rb (153): Perhaps I can optimize status calc.
cgi.rb (207): optimize and rationalize this.
elements.rb (154): farms why is cleanup called this many times?!?!? ...  
waste of gsubs
errors.rb (7): Cache source code? Memory vs Speed - Is it worth
morphing.rb (148): add support for morphing comments, text, etc.
compiler.rb (119): make Template stage pluggable.
compiler.rb (196): cleanup this method.
datetime.rb (7): implement me!
attribute.rb (8): find a better name.
relation.rb (9): Fix mismatches with attributes.
control.rb (9): add support for the singleton pattern to avoid excessive
dispatcher.rb (77): path should include trailing '/'
dispatcher.rb (78): should actually create an instance, thus
dispatcher.rb (162): add caching.
buffer.rb (12): use better names but keep the ob_xxx php style methods
css.rb (5): Add support for synthesizing compound CSS files from
debug.rb (12): make safe html.
feed.rb (162): think about whether markup should always be done
feed.rb (346): think about whether 256 chars should be a fixed limit
feed.rb (356): think about whether markup should always be done
form.rb (23): allow multiple objects per form.
form.rb (24): use more generalized controls.
form.rb (148): give better form id!
prototype.rb (12): resolve html.
javascript.rb (12): Add support for synthesizing compound Javascript files  
from
pager.rb (185): better markup.
table.rb (39): legend, verbose... ?
table.rb (40): gmosx: Remove crappy, bloatware additions.
publishable.rb (190): move elsewhere, probably to a default helper.
publishable.rb (234): move elsewhere.
render.rb (40): Implement a FAST string (maybe in C)
render.rb (50): handle template_root here instead of the
render.rb (337): find a less confusing name.
router.rb (35): use a hash only instead of [rule, options]
scaffolding.rb (14): add search, add base, add to_title, validate/error
scaffolding.rb (373): maybe make this with a inhertitor?
drb.rb (30): Add some debuging support (overload synchash).
drb.rb (31): Implement MemcacheServer.
drb.rb (32): Better start/stop functionality.
session.rb (34): rehash of the session cookie
session.rb (35): store -> cache, reimplement helpers.
scgi_service (18): remove sync, Nitro *is* thread safe!
tc_feed.rb (12): add more (all)
tc_feed.rb (52): there should be some more
hierarchical.rb (9): use active collections.
taggable.rb (57): implement me.
timestamped.rb (8): add an initialize method that inits times
collection.rb (148): add remove by oid!
collection.rb (167): add delete by oid!
clone.rb (24): Convert to enchantments on objects
entity.rb (355): add cascade option.
entity.rb (520): refactor this method.
joins_many.rb (113): optimize this!! use count.
utils.rb (16): Optimize this.
utils.rb (26): Optimize this.
utils.rb (35): implement me!
utils.rb (58): Optimize this.
utils.rb (68): Optimize this.
utils.rb (86): implement me!!
sql.rb (110): use annotation :superclass)
sql.rb (317): don't convert to float by default, perhaps
validation.rb (31): unique should implicitly generate
og.rb (74): move this to the sql store.


Jo

-- 
Feel the love
http://pinkjuice.com/pics/ruby.png


More information about the Nitro-general mailing list