|
|
|
| Non-WTF Job: 4 Senior C# Developers Needed Now! (Cincinnati, OH) |
| « Prev | Page 1 | Page 2 | Next » |
|
i'm at...a loss of words to describe this.... this is such a genious piece of work. And to think, I've used loops all these years. How could I have possibly been so wrong! |
|
Wow. It takes dedication to craft a WTF like that. Coincidentally,
there was a posting on the CORBA newsgroup today which looks like was written by the same guy. |
|
I'd hate to see the bill if the software needed to process 100 places. [6]
|
|
Wow this guy probably makes a bundle when they ask him for a 9th string. Maybe he's not so dumb. I can't imagine you could convince anyone else to maintain this code, so he's got job security too.
|
|
I'm just wondering what exactly it does. I guess comments weren't needed since its purpose is obvious...to someone anyways. I'm also wondering if they omitted the seventhplace check at the beginning on purpose or not.
|
|
Another example of a consultant getting paid by the number of lines of code. Good Christ that's a horrible piece of code....all those 'If' statements that have to be executed even if there is only one value passed. And am I crazy (I don't know that much about PL/SQL ) but is he passing in a bunch of parameters delimited by the pipe character? [:|] |
Re: Real Consultants Don't Use Loops
2005-02-09 15:09
•
by
Kermos
|
It'd be job insecurity if that guy was working for me. I'd give someone like that 2 choices: 1 - Do it right |
Re: Real Consultants Don't Use Loops
2005-02-09 15:16
•
by
LordHunter317
|
|
I dunno if this is true of PL/SQL (IANA Oracle Expert) but in some
stored procedure langauges, the speed of having fixed variable names and no loops is orders of mangitude faster than having a loop that makes the variable names and then tests on them. Why? Because the IF setup can be fully prepared and cached by the server as a single query. The FOR Loop will require running a dynamic query for each variable (i.e., an EXECUTE in Postgres), meaning the database server can't prepare nearly as much of the query (as it can't assume anyhting about the SQL it will run without a really intelligent optimizer). I wouldn't be shocked that if PostgreSQL as another example behaved better with a stored proc like this than one that came up with the variable names dynamically. If anyone's really interested, I suppose I could test. |
Give us a hint. Does this company advocate a "Redneck Lifestyle" and program in the nude? |
|
If you could name names, we would be able to avoid hiring services from that firm...
|
my guess is one of the big four accounting firms |
|
WOW...EYES HURT...CAN'T SEE...must go get shotgun and shoot pc, it has been contaminated beyond repair!!!
|
|
I don't see anything wrong with this code... Okay okay, I can't justify this one...[:$] |
|
Don't companies have a thing called "code review"? Why wasn't this caught before it went to production? You do realize that if this went to review it would get laughed at...right? (Please tell me you realize that.) |
|
At some places, all of the other developers are giant WTFs as well, so who's going to review the code? |
|
My "code review team" consists of a guy named Bob. When he's not sleeping, he's surfing the web for porn. So, you can imagine what sort of "review" he does. |
Re: Real Consultants Don't Use Loops
2005-02-09 17:42
•
by
JamesCurran
|
Well, even if we accept the idea that loops are to be avoid, the first half is needlessly complicated by also avoiding nested IFs --- something he starts using in the second half..... |
|
You've seen people who can't read if you make them hold their lips
still, right? And people who can't count up to eleven unless they're wearing open-toed sandals? I suspect this is a guy who couldn't write a program if you disabled the Copy and Paste items in his Edit menu... Why is the US government wasting money shooting Iraqis? It should be hunting these people down and electrocuting them in their cubicles. You know it makes sense. : Bat : |
Re: Real Consultants Don't Use Loops
2005-02-09 19:11
•
by
LordHunter317
|
|
Re: Real Consultants Don't Use Loops
2005-02-09 19:12
•
by
LordHunter317
|
|
Can we please get a forum that works wtih FF?
Anyway, the text of my post got b0rked: Yes, I'll agree the layout of the code is subotimal. But some unfactored IF's don't really make a WTF. Without knowing if a looping construct for this is really more efficent, I'm not sure this qualifies. |
|
I'm using FireFox 1.0 in Windows and having no trouble with the forum
software, though I agree it's needlessly overcomplicated. It would be nice to have an IP-based "re-edit my comment" feature, but that's why every programmer is writing their own blog software... |
|
I think it would be cool if every time you posted it stamped your ip address, computer name, social security info, and mother's maiden name.
|
|
Once more, repeat after me!
Loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow... unroll those loops because loops are slow........ |
|
Theres nothing to prepare - there is no actual data access happeing
here. This code should really have been done in a higher level language |
|
Loops maybe slow at times but is it better to save a few nanoseconds or
have more readable easier to maintain code? I'd fall on the side of maintainability personally. And besides.. if you're entire app is being slowed down by loops maybe there are some bigger problems at work here. I've seen code that had many nested loops that was dog slow so yea they can be bad but I refactored it into one loop and bingo, it was tons faster and still within one loop. Most loops break down to a test and a jump.. by itself that should not be that slow (depends on what happens in the loop of course but just by itself loops aren't slow enough to give up the entire class of program flow structures). In this case someone mentioned that performing a loop might be magnitudes slower, so yea that might be bad but until I see benchmarks showing that its horrible enough to give up a simple loop for a small speed increase over this WTF I'll stick with a loop.. And as an aside I hate doing loops in SQL, I do my best to keep processing out of the SP if possible. |
|
I wish more people got accounts with names, and less people bitched about the forum software. It's harder to follow all those anoymous posts than to make a decent post with the software. If you can't make a decent post, perhaps you should post EXACTLY what you did, and what went wrong. You're all supposed to be developers right? You should know that a bug report saying: 'It doesn't work.' or 'I can't make a post.' is totally useless for the developer who wants to (and I'm certain Alex wants to make his forum cool) fix any bugs. Drak |
Re: Real Consultants Don't Use Loops
2005-02-10 01:41
•
by
icelava
|
Developers are only developers for their own software. Anything else, they are users. [8-|] |
Re: Real Consultants Don't Use Loops
2005-02-10 03:58
•
by
Bellinghman
|
I hit the quote button. I went to the end of the edit box, hit enter, and typed this text. I will then hit the post button. You can see the result. |
Re: Real Consultants Don't Use Loops
2005-02-10 05:05
•
by
Bellinghman
|
The problem being, of course, that the software does not accept HTML (instead it wants BB). However, what it sends to the client browser does contain HTML markup codes. And when that's reflected back, it escapes the < and > characters and the user sees the tags. The WTF is - the software cannot accept its own output as input. The second WTF is that it does work with IE - but only by using a special control. This means that a majority of clients don't see the problem. But this is supposed to be a web site, not an IE site. I hope that Alex will get an update soon. At present, there are three things that irritate me about this site:
Point 3 is not the forum's fault, of course. On the positive side, I'd like to say:- Alex, thanks for this site. We may moan, but it's still quite usable, and the faults aren't yours. If people didn't care, you wouldn't get the wingeing. We do know it's not your paid job, but please keep it up. |
|
That Corba posting on google is cool. I have replied. [:D] |
|
For a guy who gets paid for every line of code, I think this is a real good solution... [;)]
|
|
Where can I get one of these jobs that pays me more money to write code like that?
|
|
Looks a whole lot like Andersen (err.. "Accenture" after the scandals?) code to me. The accounting dept of a company I worked for had those guys in to write some etl/like import code and they wound up with a --30-- page stored proc to do it. |
This is what I'd call a good bug report. Esp. mentioning that you use a browser other than IE to browse the forum. Does it show escaped HTML when you hit the HTML button in the editor? Drak |
|
I'm surprised nobody yet has mentioned that in the second half, two of the three "else" branches are identical aside from spacing, and I doubt this language is sensitive to spaces.
|
Re: Real Consultants Don't Use Loops
2005-02-10 11:29
•
by
Mike R
|
Yes.. But, do you want to take a wild guess as to how many people read all the way to the bottom of the code? (I know I didn't [:$] ) |
|
I don't even look at the WTF code snippets. I just read the developer comments. That's where the true humor lies. |
Re: Real Consultants Don't Use Loops
2005-02-10 11:52
•
by
Bustaz Kool
|
Your ideas intrigue me and I would like to subscribe to your newsletter. Are you holding any "getting to know you" meetings in my area? [;)] |
You know, after you read this a couple times, you get a subliminal message..."slow your roll...slow your roll..." |
Re: Real Consultants Don't Use Loops
2005-02-10 14:52
•
by
Bustaz Kool
|
I wish that the people who do the bitching (on any topic) would have the stones to sign their name to their viewpoint. |
Never! |
|
Using an alternate browser is your problem. If 90% of people do it, then it is The Standard. Its like driving around with a caravan attached to your car. Then whinging that parking spaces dont cater for your vehicle. "But it meets street legal standards!". Sick of this ZOMG USE FIREFOX ITS THE NEW WAVE MAN crap. Until more than a few million people use it, I cant imagine anyone could be fucked going out of their way to make things work with it. |
|
Heh, another IE zealot. Well, it is site of Microsoftie guy, what I can
except? Website about WTF whom has itself WTF - how a sweet irony. And BTW writing www pages whom work with all popular browsers is not hard. "If 90% of people do it, then it is The Standard." Eat shit. Trilion flys cannot be wrong! "Sick of this ZOMG USE FIREFOX ITS THE NEW WAVE MAN crap." Sick of guys with attidude "were best and f*** the rest". |
|
Call me crazy, but IMHO if a few million people are using it, even though that is a small percentage compared to IE, it seems worth considering supporting it. IE isn't the Standard. HTML is the standard. IE bastardizes that by using non-standard HTML and JavaScript constructs, as well as utilizing a plethora of whiz-bang Active-X plug-ins to try to make sure they stay "the standard", meanwhile opening up gazillions of security holes due to it. I love looking at Page Properties in Firefox when viewing sites - the IE-centric ones all require Firefox to use a rendering mode called "Quirks", which by my understanding means it has to attempt to interpret the page like IE would, since it doesn't follow standards. I could easily be wrong here, and feel free to educate me. |
|
Furthermore, a big reason for 90% usage is that it comes with the OS,
most end users are too lazy / incompetent to get a better (or at least different, depending on your viewpoint) browser, which causes people to end up designing sites that work best in it (IE), which in turn causes the vicious cycle that has brought us to where we are today. I also agree strongly with the earlier post that it isn't that hard to write multiple-browser compatible pages. |
|
Actually, Quirks mode is entered when the doc type of the page is not
declared correctly. Since almost no design applications actually declare the doc type correctly, Firefox renders most sites in Quirks mode. Not really IE's fault, but it is symptomatic of lax coding techniques that I've noticed many IE-only developers fall into...bit of a flame, I know, but 'tis true. |
|
Thanks for the clarification - as I said I'm not yet familiar with the
ins-and-outs of FireFox, but for my personal use, I strongly prefer it. Even with the quirks that it admittedly has. In particular, I really like AdBlock and the Web Developer toolbar extensions, Mouse Gesture extensions, ability to easily theme/skin the interface, and several features that I don't find as easily accessible (or in some cases present at all!) for IE. ! I can't even do tabbed browsing in IE unless I install CrazyBrowser or Avant or something similar. (IE lovers, feel free to correct me if I'm wrong.) |
Re: Real Consultants Don't Use Loops
2005-02-11 15:27
•
by
Stan Rogers
|
|
You're right about the tabbed interface -- and it was discussed in the
IE community (the folks who develop IE, not those who develop for it). I wish I still had the link to that discussion. That suggestion caused quite the furor, since it breaks with the "document" interface standard that MS has been trying to push. (Note that every Word doc or Excel sheet opens in its own window, with its own taskbar entry if you haven't selected the "stack" option.) There are some very bright people out there who firmly believe that users don't want an application open, they want a document. I don't happen to agree, but I'm not on the UI standards team at MS. Until the SDI interface standard goes away, neither IE nor its heirs and assigns are ever likely to come with tabs "out of the box". |
|
Thanks for your comment.
I note that they don't strictly conform to that in Excel - note the Workbook concept, with tabbed worksheets. So they do understand on some level that we mere humans are capable of using MDI apps. At the very least, make it optional and disabled by default!! |
|
this is just plain good ol' loop unrolling
|
| « Prev | Page 1 | Page 2 | Next » |