- 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Frist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; ;; ; ; ;
Admin
As every programmer knows, it's quite annoying when you track down the source of some weird and incomprehensible compiler error, and it is caused by a single, missing semicolon. Clearly this individual was trying to avoid that. As such, I don't see anything wrong with this sample.
Admin
Sleep-coding, or just a really sticky ;-key.
Really.
Sticky.
Admin
Some kind of attempt at adding a delay? Auto generated code? idk, just jacked up.
Admin
I wonder if the amount of semicolons at the end of each line corresponds to the number following on separate lines.
My guess is some sort of auto-replace script or find and replace operation taking itself too seriously.
Admin
It's simple: He's payed per LOC
Admin
Spoiler Alert
Admin
Truly magnificent cornification, Remy!
Admin
I'd love to see the source control history of this file!
Admin
Isn't there a missing semicolon at the end of that function?
Admin
If you add up the time wasted by each reader to reach the end of this article, I think the result won't be less than one day. We should all sue Remi for that...
Admin
Lessons learned: always lock the screen if you're going AFK and your cat is around :)
Admin
Doubtful - each block (starting at line 5, 2358 and 4712) has 8987 extra semicolons, followed by 2352 lines of semicolons - a total of 34,017 extra (less the one that's missing at the bottom for some reason).
The fact that it's identical makes me think it's an auto-gen thing. If it's not, it wouldn't take more than a minute in NP++ to clean it up though.
Or maybe they're trying to pad the file to be a specific file size. I've heard of stupider things.
Admin
Nah, my cat wouldn't use semi-colons because he only knows Visual Basic
Admin
A really stupid method of padding the file to get to to a certain size was my first thought.
Admin
I get most of it, but can someone explain what these lines are doing? ; ; ; ; ; ; ; ; ;
I feel like you could rewrite them as ; ; ;
Admin
Can't he use PAWS, then?
Admin
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; What? Nobody did it yet...;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
Admin
I think DQ above is on the right track, sadly. Early in my career, I remember hearing anecdotes from older engineers about working at corporations that decided to count lines of code as a measure of productivity. After everyone started adding additional lines via formatting (e.g. make sure the braces in an if statement got their own lines), they decided to count real lines of code by counting semicolons. One prompt hack that resulted was a search-and-replace where every semicolon at the end of a line was replaced by two semicolons. Unfortunately, the solution turned out to be more rules in the coding standard, rather than rethinking lines of code as a productivity standard.
Admin
I guess I'm TRWTF for thinking I can get past the comment formatting.
Admin
Well, yes. If you're trying to measure something and employees are deliberately messing up that measurement, is the answer "stop subordinates meddling with measurements" or "give up and try something else"?
Admin
Auto generated by the IDE?
Admin
it wouldn't compile ignoring the extra semi-colons and the single missing one that function has two opening curly brackets and three closing ones
Admin
By "cornification", are you referring to the process by which squamous epithelial cells in vertebrate animals develop into tough protective layers or structures such as hair, hooves, and the outer layer of skin?
Or am I missing something because I'm not a hipster?
Admin
TRWTF is that this story crashes my newsreader... :D
Admin
Looks like he was trying to insert a delay before the dropdown and his Google-fu failed him. And/or perhaps his productivity was being measured in LOC or in KB downloaded by users.
The odd uniformity of the semicolon blocks makes me wonder if somewhere out there he has a conversion 'parsing X empty lines requires Y milliseconds, so I'll use Z sets of them'.
Admin
Depends on why your employees are messing with the measurements. The real answer is "Reevaluate why you are measuring the thing you are measuring." If there is a really good reason, then deal with the employees. If, upon learning more about things, you determine that you are measuring something really, really dumb, like Lines of Code, then take the hint that all of your employees seem to know what's up, and find another way.
I'm curious if this was a test to determine whether the LoC checker was just doing semicolons, or if there had to be line breaks after them. Based upon the amount that he got paid (or amount of LoC reported), he could determine exactly how to best cheat the system. Software Engineering: not just wanting to cheat the system, but wanting to find the mathematically best way to do so. Why include the line breaks if you don't have to? It doubles to quadruples (depending on newline type and whether or not it is tabbed) the size of the file.
Admin
+1!
Admin
Man. That is SCARY close to my password.
Admin
LOL, 15 years ago performance was sometimes capture in SLOC. Some simple ways to estimate SLOC include things like counting semicolons.
This guy reported 100s of SLOC per week more than he really wrote according to the standards devised by management. This guy probably got better raises than everyone else to boot.
Admin
Looks like their metric for measuring work are lines of code
Admin
So your password is ;;;h;;;u;;;n;;;t;;;e;;;r;;;2;;; ?
Admin
Best hidden cornify ever!
Admin
This is clearly the work of a rogue cat.
Admin
i remember a weird story where someone had a comment like "..,.,..,.,..,..,..,." it turned out to be a binary representation of her phone number!
Admin
My guess is that it was trying to overcome the idiotic restriction of MS-IE refusing to serve a web page smaller than 512 characters,
Admin
I wonder if he had some ASCII art using semicolons that then got standardized by a pretty-print program.
Admin
Looks like one of blakeyrat's early works, before the discovery of profanity.
Admin
s/;;/;/g
Most of them.
The single line ones take some more effort, but should be easier to eliminate as well.
Unix tools are your friend. Too many semicolons are your enemy. Of course, the problem may be that the guy didn't like semicolons, and had the editor put one in at the end of the line and squashed the text file somehow.
As mentioned before, we need to see the history one the file to get an actual handle on the "problem".
Admin
Probably just a setup for a hash collision attack.
Admin
Could be one of those old-skool methods for obfuscating your source code so other "Webmasters" don't steal it easily.
Admin
When Remy posts an article, View Source.
Admin
Well, obviously this file is "parsed" by an excel spreadsheet. And by "parse" I of course mean "read from constant offsets".
Admin
Count again.
Admin
Actually, he clearly was doing something else on his keyboard; which explains the stickiness.
Admin
Paid by the line
Admin
You mean
s/;;+/;/g; s/^\s*;\n//gsm;
First one removes the masses of semicolons on the three long lines and the second one will remove all the semicolons by themselves on a line (with optional whitespace).
Disclaimer: I've a Perl programmer.
Addendum 2017-05-05 07:50:
Admin
This certainly increases code coverage statistics. ;)
Admin
My first thought, given that the code calculates curleft and curtop, is that he's trying to show, in code, some kind of top/left diagram using the semicolons. Especially with that while obj = obj.parent loop at line ; ;;; ; ;;;
Admin
Must come from a background where you need to leave extra lines so you don't have to change your line numbers for your jumps.