nerd_skywalker at April 1st, 2011 15:54 — #1
I'm bored so here's another pointless thread
Do any of you guys have any really tall curly bracket pyramids in your code? I have a 14 high one as my record :lol:
Any of you have similar ones?
thenut at April 1st, 2011 17:58 — #2
Tsk tsk tsk... You chose to post a 49,162 byte image, in JPG format... not even PNG, which would have compressed better and look better, but ALSO when the equivalent tag would have consumed far less. This is unbelievable... I.. I.. no, I can't say it.. It's to much. I need to unplug now.. 6A757374 206B696464696E67 [code] tag would have consumed far less. This is unbelievable... I.. I.. no, I can't say it.. It's to much. I need to unplug now..
nerd_skywalker at April 1st, 2011 18:10 — #3
I thought it looked better as a picture
But you are also correct about me posting a jpg as opposed to a png. I am ashamed of myself. Allow me to fix it.
fireside at April 1st, 2011 23:00 — #4
Those are curly brackets also known as braces.
I've never kept count or anything, but I know it's at least 2.
thenut at April 2nd, 2011 00:04 — #5
I am ashamed of myself. Allow me to fix it.
You know I was kidding right? :lol:
As for myself, I think the longest I ever went was a triple loop, so 3. More than that and I'm doing something wrong :blink:
alphadog at April 2nd, 2011 15:36 — #6
Nesting more than three levels is definitely a potential "code smell".
It could be a combination of how you approach your tests (test for the exceptional, not the normal) and/or a method that can be refactored into more focused code.
nerd_skywalker at April 2nd, 2011 17:31 — #7
@TheNut: Dang it! Well the quality was pretty low ha. I am known as "Sheldon" by some of my friends
@alphadog: I probably should fix it, but it seems to be working right now and I just need it for a little while.
geon at April 4th, 2011 05:15 — #8
> Nesting more than three levels is definitely a potential "code smell".
I have 5 levels of nested if:s right now. I don't like it, but it's at least pretty clean. Error handling in php... I'll not discuss code smell and elegance any further, or I'll depress myself.
geon at April 4th, 2011 07:21 — #9
I found out just now that php actually has exceptions since version 5.0. Now I feel stupid.
alphadog at April 4th, 2011 07:27 — #10
Well, it's not like more than 3 deep cannot happen evar... But, it shouldn't be the norm, and 14 is very suspicious...
nerd_skywalker at April 4th, 2011 16:07 — #11