|
TRex EaterofCars posted:Yes but you'd run out of matter eventually. I feel dirty for how pedantic this is getting Heh. That's clearly a limitation on a practical Turing machine, too — in fact, I seem to remember one of the fundamental papers addressing exactly this problem for Turing machines, although I can't find that section now. There are models of computations requiring infinite simultaneous space, but I don't know much about them. Lenore Blum's work on real-number computability uses abstract operations on abstractly-represented numbers.
|
# ? Apr 13, 2009 18:36 |
|
|
# ? May 14, 2024 21:47 |
|
http://www.codeproject.com/KB/dotnet/OptLocking_PrefixTable.aspxcode:
|
# ? Apr 14, 2009 10:14 |
|
Fib posted:
code:
|
# ? Apr 14, 2009 10:44 |
|
Fib posted:http://www.codeproject.com/KB/dotnet/OptLocking_PrefixTable.aspx I seriously just came into this thread to post exactly this. A particularly in-your-face-cocky contractor we are hiring right now had about 8 or 9 catches that would just throw the exception right back up to the function that would handle it anyways. I deleted roughly 75 lines of code washing through the file I discovered it in.
|
# ? Apr 14, 2009 22:12 |
|
a night or two ago at 2am when i was extremely tired, i wrote this:code:
|
# ? Apr 15, 2009 13:39 |
|
Triple Tech posted:These things, as Perl programmer, piss me off: Forgive me, some of my code may belong in here because I'm having trouble figuring out what is wrong with this code. There's an array of raw elements, they need to be post-processed (whatever do_something_to is) and then put into a new array. Is it that the elements could have been taken care of (do_something_to) within the original array? Or am I on the wrong path?
|
# ? Apr 15, 2009 16:23 |
|
mister_gosh posted:Forgive me, some of my code may belong in here because I'm having trouble figuring out what is wrong with this code. There's an array of raw elements, they need to be post-processed (whatever do_something_to is) and then put into a new array. for instance, the above could have been rewritten as : my @stack = map do_something_to, @elements;
|
# ? Apr 15, 2009 16:40 |
|
code:
|
# ? Apr 15, 2009 16:42 |
|
Triple Tech posted:
You really like the word frobnicate, don't you? Also I liked your old avatar better.
|
# ? Apr 15, 2009 19:32 |
|
Ugg boots posted:You really like the word frobnicate, don't you? Also I liked your old avatar better. Frobnicate is some old geezer word I got used to. What other word would you use in examples? I liked it better also...
|
# ? Apr 15, 2009 20:10 |
|
Ugg boots posted:You really like the word frobnicate, don't you? At least it's something other than foo(bar).
|
# ? Apr 15, 2009 20:42 |
|
I just watched someone put hungarian notation on a public member of a class.
|
# ? Apr 15, 2009 22:15 |
|
I found this in some of my legacy code and couldn't help but laugh.code:
|
# ? Apr 18, 2009 07:18 |
|
Mick posted:I just watched someone put hungarian notation on a public member of a class. ... I don't really see how that makes it any more or less bad than any other case of using hungarian notation?
|
# ? Apr 18, 2009 13:57 |
|
PrBacterio posted:... I don't really see how that makes it any more or less bad than any other case of using hungarian notation? If you use it privately, you're only hurting yourself, I guess.
|
# ? Apr 18, 2009 14:30 |
|
PrBacterio posted:... I don't really see how that makes it any more or less bad than any other case of using hungarian notation? DataBinding DataBound Disposed evtMyFooEvent Init Load PageIndexChanged PageIndexChanging [etc.]
|
# ? Apr 18, 2009 15:02 |
|
Mick posted:Maybe it's just me. In any case, the intellisense over the events on that component looks like this now: Breaking with the existing code standard of the class is bad form, sure, but a coding horror?
|
# ? Apr 19, 2009 22:46 |
|
I'm working with a variant of the Xerces XML library. After some analysis, I found that the program was spending 70% of its time getting the length of a list. Finally, I dug up the source code.code:
Maybe I should have expected something like that. But the only way I know of to get a NodeList is to call a function that returns it and, hey, getLength, that means they must store the length somewhere. PrBacterio posted:... I don't really see how that makes it any more or less bad than any other case of using hungarian notation? half joke, don't fight Captain Cool fucked around with this message at 20:51 on Apr 24, 2009 |
# ? Apr 24, 2009 20:43 |
|
Captain Cool posted:Well, it means you're using public class members Not necessarily a coding horror. Full encapsulation doesn't always make sense in the context of the problem. I once had a friend who returned non-const references in getters argue against public class members.
|
# ? Apr 24, 2009 20:51 |
|
mr_jim posted:If you use it privately, you're only hurting yourself, I guess. It's one of those coding practices so stupid that we keep shooting its inventor into space.
|
# ? Apr 24, 2009 21:09 |
|
This speaks for itself: http://stackoverflow.com/questions/791808/determining-whether-a-number-is-a-prime-number
|
# ? Apr 27, 2009 14:05 |
Interviewed at a place, wanted to get a grip on the current website code. Found this in java script:code:
|
|
# ? Apr 27, 2009 14:09 |
|
dancavallaro posted:This speaks for itself: It's like he just kept adding constructs until he couldn't figure it out.
|
# ? Apr 27, 2009 14:22 |
|
dancavallaro posted:This speaks for itself: A question so bad, even StackOverflow shits on it.
|
# ? Apr 27, 2009 17:00 |
|
λf. (λx. f (x x)) (λx. f (x x))
|
# ? Apr 27, 2009 20:47 |
|
j4cbo posted:λf. (λx. f (x x)) (λx. f (x x)) What's the problem here?
|
# ? Apr 27, 2009 21:11 |
|
Janin posted:What's the problem here? Lambda calculus is a horror in itself.
|
# ? Apr 27, 2009 21:18 |
|
Vinterstum posted:Lambda calculus is a horror in itself. If you think lambda calculus is bad, try adding continuations. code:
|
# ? Apr 27, 2009 21:28 |
|
Vinterstum posted:Lambda calculus is a horror in itself. Math
|
# ? Apr 27, 2009 21:33 |
|
j4cb0 posted:λf. (λx. f (x x)) (λx. f (x x)) After five minutes of trying to remember lambda calculus . . . can you explain this?
|
# ? Apr 27, 2009 21:56 |
|
TheSpook posted:After five minutes of trying to remember lambda calculus . . . can you explain this? It's the fixed point function, also called the Y-Combinator.
|
# ? Apr 27, 2009 22:04 |
|
TheSpook posted:After five minutes of trying to remember lambda calculus . . . can you explain this? It's the Y combinator, it can be used to declare anonymous recursive functions.
|
# ? Apr 27, 2009 22:18 |
|
shrughes posted:If you think lambda calculus is bad, try adding continuations. A cool thing is that call/cc is its own fixpoint. Gory details here
|
# ? Apr 27, 2009 23:05 |
|
Avenging Dentist posted:A question so bad, even StackOverflow shits on it. Idea: Post code to Stack Overflow that was pulled from highly rated answers previously found on Stack Overflow, pretending it's yours. Ask for feedback. "Is it possible for a turd to eat itself?"
|
# ? Apr 27, 2009 23:08 |
|
dancavallaro posted:This speaks for itself: "I've set up a massive switch statement that consists of all the prime numbers up to 271" He hard-coded a LUT for primes. Mother of god. Somewhere in my deep dark past, I recall reading an optimization suggestion that checking prime-ness is so easy computationally that making a table is a complete waste of memory, even ROM. What made him stop at 271, anyway?
|
# ? Apr 28, 2009 10:02 |
|
Everybody needs to vote that up.
|
# ? Apr 28, 2009 11:01 |
|
Advertisers, as we are all aware, are the abolute scum of the earth. I have to write code to talk to their web affiliate synergy leveraging networks. Basically this means sending users of our site to "URL"s like this:code:
code:
code:
And each network is different, each with it's own lovely idea of what a URL is. Every time you have to guess what they intend you to do with this poo poo, and try to guess what they'll send use next week so the whole thing doesn't fall over when they send it. Zombywuf fucked around with this message at 17:28 on Apr 28, 2009 |
# ? Apr 28, 2009 17:26 |
|
The Evan posted:"I've set up a massive switch statement that consists of all the prime numbers up to 271" Whoooosh
|
# ? Apr 28, 2009 17:58 |
|
Saw a comment like this today:code:
|
# ? Apr 29, 2009 02:52 |
|
|
# ? May 14, 2024 21:47 |
|
oldkike posted:Saw a comment like this today: I feel for that guy. I found this in our c++ coding standards the other day quote:Class Data members are prefixed by \ ie (\foobarsStringDataMember) just shows the attention and care that's been lavished upon that document.
|
# ? Apr 29, 2009 03:17 |