|
Back to crummy code.code:
|
# ¿ Apr 1, 2008 18:11 |
|
|
# ¿ Apr 29, 2024 12:01 |
|
Victor posted:Clearly, return is a function. I should mention, just for the sake of mentioning, that this was written by a coworker of a friend of mine. I changed the method and variable names, but, it's real live code somewhere.
|
# ¿ Apr 2, 2008 01:16 |
|
brae posted:Just a note, blank? is an extension provided by one of the Active* libraries that rails uses. There isn't a blank? in vanilla ruby. For strings and standard containers you can use nil? and empty? in conjunction. I think this is what blank? does behind the scenes, anyway. http://dev.rubyonrails.org/browser/trunk/activesupport/lib/active_support/core_ext/blank.rb It's simple enough to just toss into whatever project you need to use it in.
|
# ¿ Apr 8, 2008 20:22 |
|
Victor posted:Gotta protect against FILE_NOT_FOUND!
|
# ¿ Apr 10, 2008 23:23 |
|
I'm not sure what you can do to make that code a lot better. I mean, putting all the JButtons into a hashtable to cut down on variables and allowing you to loop over them to do the repetitive stuff, but if this is a lower level class I'd have second thoughts about even that. It's sort of crummy code, but it's not a horror or anything.
|
# ¿ Apr 14, 2008 19:25 |
|
Decimals are for Chris Busch's CALCULATOR 2.0!!!!!!!!, obviously.
|
# ¿ Apr 14, 2008 20:05 |
|
The !false looks like it comes from debugging the loop (or maybe code right after it). Like, instead of commenting out the loop, he initially just put the false in there to short-circuit it, and then at the end he !ed it? I don't know - !false is just too weird to not have a little backstory that does make some modicum of sense.
|
# ¿ May 4, 2008 13:51 |
|
ZorbaTHut posted:I'm having a hard time coming up with any design that involves 1000 columns, unless you're doing something retarded like altering the table to add more columns whenever you need a new relation. quote:My database stores the behaviors of visitors to develop predicative modeling applications for a mid-sized online retailer. The data collection process is automated, and responses can fill up the tables very fast. I've found that takes a lot of data to accurately run a regression, as the behaviors of Internet users is pretty much random. In my system, each participant is a row, and each response is a column. Many people tend to revisit the site on a regular basis, and it is not uncommon at all for the click-throughs of certain users to exceed the 1000 column limit over a period of time. I tend not to get angry at people over the internet, but, man I really want to yell at this guy.
|
# ¿ Jun 6, 2008 22:50 |
|
|
# ¿ Apr 29, 2024 12:01 |
|
index.length() should be value.length() ?
|
# ¿ Jun 10, 2008 03:00 |