- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Took a long time for someone to mention TRWTF!
Admin
At first I thought you were recommending Roman numerals, which make some sort of perverted sense.
Admin
Admin
Fits really nice with using i, j, k, l, m or similar for small looping variables, anything that gets used for more than two lines needs a meaningful name of course.
Addendum (2010-01-25 20:59): So the example given above would look something like this in my code:
Vector2::Vector2(int x, int y) : X(x), Y(y) { }
Although I agree with some others that the original example will also suffice, and just to add "this->" if really needed. I like code that's understandable without the need of being aware of certain coding conventions. It's why I don't like all the Hungarian Notation variants, as the average uninitiated outsider will have no clue what they mean.
Admin
Q Effing T = QFT = Quoted For Truth
Although it took me a minute to translate it, also.
Admin
Admin
[ Let me try this again, but not forgetting the quote this time around. - Gazzonyx]
Q Effing T = QFT = Quoted For Truth
Although it took me a minute to translate it, also.
Admin
"New math"?
reminds me of this... ;o)
http://www.youtube.com/watch?v=NfqSTfTwJE8
Admin
A spinning throbber is no guarantee that the application isn't hung. I've been in the situation where the UI thread of an application kept updating the throbber, while the worker thread was deadlocked due to violating the lock hierarchy. Good times.
Admin
Oh my, so this is the kind of coding style one learns from using MS-languages and conventions...
Of course the ONLY sensible way of qualifying a variable as a member IS using the "this"-reference (or -pointer, depending on language and semantics) - not only that the keyword is there for exactly this reason, the reference is ALWAY present implicitely, because ANY member access ALWAYS needs a reference - the compiler is just nice enough to assume "this.", if there is no name collision with a local variable. And using "this." is semantically correct, not a "wart"!
As a direct consequence of dumb conventions like prefixing members with "m_" or the like, there are in fact many people who are simply not aware of this fact...
And just in case you REALLY think it is too much hassle to type "this." (which is of course inane with modern IDEs - in fact it is often easier to type "this." and choose the member from the popping up list, which is then also guaranteed to be from the correct scope and typo-free!), at LEAST be sensible and pre- or postfix the LOCAL variables instead of ruining your sensible and alphabetically sortable names for the members!
Admin
Admin
I read it as: "Quite F`ucking True".
Captcha: facilisis - To facilitate fellatio.
Admin
An IDE with auto-completion of variable names. If you implement a systematic name scheme (doesn't matter whose in a one-man shop, despite the religious wars) then you only have to type a few keys to get the right variable.
Admin
Actually, it's a two-step progress bar. First it sends the HTTP request and then waits for a response: while waiting, the progress bar is essentially counting towards a timeout. Once a response is received, it becomes a normal download progress bar. In both states, it's indicating how long you're going to have to wait before the view state changes. Which is a perfectly acceptable usage of a progress bar. But don't facts derail your mindless "IE sucks!" rhetoric.
Admin
He may have been on to something there. Or ON something...
Admin
So what about database? after issuing "update all rows " to database what is there to measure?
Admin
What I did in my improvements:
Supplying an guesstimated time when starting the progress bar. The asymptotic function would reach 50% on half that time. Surprisingly good results for such a simple algoritm, even with crappy guesses.
Faking the percentage a little, so that it's never 0% once it has started, and never 100% until it is really finished, regardless of correct rounding. This eliminates users complaining that a large task does not start or that they can't do anything even though it's finished.
Had methods for a more normal bar, where it could be used. The 0% and 100% rules still applied.
The trick to getting the rest of the team to use progress bars is to make it dead simple, they shouldn't even have to calculate percentage, just call with a record 798 of 17903, and let the bar do the rest. If it's more than one line of code for them, it doesn't get done.
Admin
Yeah, just like some people already do with AJAX! Just show some GIF, then fail your AJAX request and the user will surely wait forever for the process to complete!
Admin
Are you fucking kidding me? I tell you about my shop, I ask you a straight question and you accuse me of trolling? Fuck off back to 4chan you pathetic little 14 year old brat.
Admin
The boundary, however, is around 80-120 milliseconds, depending on the individual, that is, not very long at all.
In the context of this, we can conclude that progress bars, whirlygigs, etc. are all just eye candy to give us something to watch, and might as well be the flying folders animations from Windows Explorer.
Admin
In my last major project, I experimented with a progress bar, but the results were less than spectacular. Instead, I settled on a status bar at the bottom, and I placed meaningful messages ('Querying Database' ...) in it. The users liked that a lot better than the progress bar, and it was helpful when the occasional bug was revealed. ("What was the last status message you saw?")
Admin
and regular expressions!
Admin
If the selected quote is not a trolling attempt, then you really are stupid--or a noob. Does your "shop" call this naming convention the "Microsoft" naming convention? Reducing line length by one character? That surely must be a joke.
Admin
I have no idea why you've chosen to attack me, I honestly just wanted to know how your company handled this particular convention, but if you want to be a prick about it that's just fine. I'm seriously starting to doubt that you're even out of college so it's not like your opinion has any credence anyway.
No disrespect but the grown-ups are trying to have a sensible conversation here so why don't you just pop off back to 4chan where you'll be around people of your own mentality (ie. other 14 year olds).
Admin
Admin
I see no attack here, just a suggestion that a post with all the hallmarks of a troll is likely to be a troll. But since you want a serious reply:
Ritualistic conventions like this have no bearing on code quality, and very little bearing on readability. Shortening the warts, thereby reducing line length by at most a handful of characters, will make no difference to readability. Removing the warts altogether might, since there will be less clutter for the brain to trip over, but the difference will be small.
If your "shop" has an established codebase that uses pointless typographical conventions, it's best to go along with them and save your energy for dealing with real problems. Wholesale dewarting of a large project, or applying conventions inconsistently, may introduce bugs and will generate friction with team members that enjoy their rituals.
If you start a new project and have the luxury of choosing your conventions, then don't introduce any warts at all. Structuring your code so that everything has a clear purpose will produce better results in the long term than scattering vague clues throughout less well structured code.
Admin
Really? Aside from the merits, or lack thereof, of what Anonymous originally posted, surely you don't think calling somebody stupid is constructive?
Admin
I dunno. How about variable names without retarded prefixes?
Admin
It seems like a reasonable response to "fuck off you pathetic brat", and a reasonable description of someone who regards replacing one set of pointless typographical warts with another as an "improvement". But that's between Anonymous and frits - I'm just here to read about amusingly bad code.
Admin
Admin
1/5 == 0.5 in base 25.
Admin
Oh, no. He's your troll now. I'm done.
Admin
Some "interesting" points by posters:
Using random values to animate a progress bar is better than using a marquee style bar when it's impossible to make a reasonable estimate.
That you can't estimate time to complete for common tasks like file copying.
That you can't do progress bars in AJAX.
If you believe any of the above are true, you are defective and your matter should be recycled into something more functional. Possibly cat food.
Admin
Technically, these are only reserved for use as identifiers with file scope (or, in C++, as identifiers in the global or std namespaces). So using them as member names is allowed, but is in poor taste.
Admin
Admin
Absolutely nothing unless you go to some extra effort and get fancy. You can count how many rows wil have to be updated and aproximate a time per row to be updated and lie to the user. Or you could spin another task up, and actually monitor how maqny rows were updated, but you cannot do this via SQL, you'd have to have a sophisticated monitoring program like comes with a grown up database.
Admin
Admin
(Post attempt: 3.)
Admin
Admin
How about a long running SQL stored procedure that takes variable amount of time to finish processing depending on the data in various tables and to even figure out which data will be processed it takes almost as much time as processing it.
The only thing that can be shown there is time elapsed and that is not enough for a progress bar (which is what users really want).
Admin
Admin
Until some compiler header defines them as a macro :-)
Admin
Nope: that's only allowed if it starts with two underscores, or an underscore and a capital letter. These are reserved for "any use" (i.e. including macros), not just "use as a name in the global namespace".
But this is irrelevant to good coding practice. If you need a language lawyer to determine whether some freaky name is legal or not, then just choose a less freaky name.
Admin
This comment is a Microsoft Standard... I am sure of it!
Admin
I wrote a download progress indicator for the OS/2 version of our product that animated after a given amount of data had been read. The faster it went, the faster your data was moving; if it stopped moving, something was wrong. Nifty, for 1994.
My Windows counterpart also thought it was nifty, but she used a Windows widget that animated on a timer. It didn't even bother to stop if the download failed.
Admin
Hah i did like him at least once in the past, just don't tell the users. It's not like they can really tell anyway.
Admin
My progess bar for server responses times the tasks, stores them in a database and performs a non-linear least squares regression on them to determine statistically likely time to complete given the number of items to process, then counts it down. Total overhead: fraction of a second. Progress bars have run times over 20 minutes in some cases. Users get realistic feedback, and the program apologies on my behalf if it guess wrong, then stores the data to do a better job next time.
This could be an operating system service in an operating system that cared about user satisfaction.
Admin
marquee scroll? is that like a posh beer tent scroll?
Admin
I don't see the WTF here. On embedded systems you don't have file system. So...
Brilliant!
Admin
Well, sort of true.
It gets a bit messy with all that powder…