Reviewing someone's old javascript, highlights in the first 100 linescode:
code:
To be continued...
|
|
# ¿ Feb 15, 2012 17:23 |
|
|
# ¿ May 10, 2024 16:13 |
A modern classic, c&p right from our latest 'release' buildcode:
|
|
# ¿ Oct 17, 2012 15:35 |
Hi, my name is 37F89DA9-612C-498C-AFA5-AB9DF762E55F, but my friends call me 37.
|
|
# ¿ Oct 25, 2012 15:34 |
Label your hacks 1, 2, and 4, and commit them to svn...
|
|
# ¿ Nov 8, 2012 18:16 |
Cocoa Crispies posted:What would it do and how would it grow? Kickstarter. Doesn't matter if it makes sense, the answer is always kickstarter.
|
|
# ¿ Nov 19, 2012 20:27 |
I'm starting to notice a slight trend in one of our developers' scripts.code:
|
|
# ¿ Nov 30, 2012 20:49 |
It's not even the catch(Exception) that scares me. It's the fact that the guy looked at that, thought "yeah, I could throw or something here, but I'll just let it fly " and then published. It's doing exactly the opposite of something.
|
|
# ¿ Nov 30, 2012 22:00 |
Doctor w-rw-rw- posted:YOSPOS looks pretty terrible. If I want to read stupid posts I'd rather go to reddit or hacker news. You're gonna get it now.
|
|
# ¿ Dec 5, 2012 21:10 |
YOSPOS is like that one guy in high school that was a jerk but got all the chicks That programming thread is amazing. This javascript deserves a repost. quote:゚ω゚ノ= /`m´)ノ ~┻━┻ //*´∇`*/ ['_']; o=(゚ー゚) =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (o^_^o)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_'); vv Sorry but the smilies broke it, I had no choice...you shouldn't have said anything, I browse with images turned off! Polio Vax Scene fucked around with this message at 23:16 on Dec 5, 2012 |
|
# ¿ Dec 5, 2012 23:02 |
Holy christ on a crackercode:
|
|
# ¿ Dec 11, 2012 19:21 |
Use a negative number, jump out of the stack like a train off its rails
|
|
# ¿ Dec 14, 2012 21:28 |
It's hard being a developer when you're colorblind.
|
|
# ¿ Dec 17, 2012 15:33 |
Wheany posted:Commented-out code gets deleted on sight. But what if we need that code someday
|
|
# ¿ Jan 3, 2013 23:56 |
Plorkyeran posted:That's probably a deliberate style choice rather than ignorance. There's a certain group of people that think you should do that rather than negating the conditional because they think it's too easy to miss the !. Not the same problem, but this reminded me of when I found a if (!(!(object))) once.
|
|
# ¿ Jan 15, 2013 22:19 |
No Safe Word posted:I'm going to go ahead and register freehow.com right now It's...a search engine...that removes spaces and puts in dashes instead edit: nevermind apparently it doesn't do anything. It is a php page though, so it's still apropos.
|
|
# ¿ Jan 17, 2013 03:52 |
I can see where the person was going with that if they didn't know about base().
|
|
# ¿ Jan 18, 2013 15:37 |
Coding horrors: Grabbing my grandchildren's butts and holes
|
|
# ¿ Jan 18, 2013 23:43 |
I think he is being sarcastic
|
|
# ¿ Jan 20, 2013 19:21 |
Everybody posted:Magical Future Dates Apparently I'm part of this club too this morning. Someone here must have thought the world really would end on December 21st because there was no preparation for the 2013 fiscal year.
|
|
# ¿ Feb 4, 2013 17:21 |
WHOIS John Galt posted:I have never in my life needed to choose some magical date in the future that is never reached. Why would you ever need this? YOu can't be comparing it to other dates, right? Because otherwise you could just make some object that returned the right comparators for a date that's always later than any other date? I'm not a SQL expert but I think it might be that it's faster to provide some fixed date that will 'never' qualify (or 'always' qualify) than to compute/allocate one on the fly. Either that or the more likely answer: our predecessors were idiots.
|
|
# ¿ Feb 4, 2013 17:59 |
Don't worry I'll remember to fix it when I'm cryogenically revived six thousand years from now
|
|
# ¿ Feb 4, 2013 20:26 |
Ithaqua posted:To me, a date of null means "it doesn't apply," and you can write your code to interpret that in whatever way makes sense for that particular application. Whoever is fixing your code has to figure out what the hell your special-case program is going to do when there is a null now.
|
|
# ¿ Feb 4, 2013 21:27 |
The best CAPTCHA. No algorithm would be able to decipher those "images". It's like hiding the kids' presents inside the tree. Actually maybe it sometimes does just stick plain letters out there to expose brute forcing programs or something?
|
|
# ¿ Feb 11, 2013 22:54 |
Oh hey just found thiscode:
Don Mega posted:I found a table in my company's database that stores passwords as plain text and I doubt my co-workers will care. They weren't too interested in preventing sql injections either. I have to support software that does this. Everyone's username, everyone's password, right there in a big rear end table. And I have access to them all, every single client. I could dump tens of thousands of name/pass combos with a few minutes of copy+paste. It's a Microsoft product
|
|
# ¿ Mar 15, 2013 19:37 |
oh gently caress someone found the image in this post
Polio Vax Scene fucked around with this message at 16:54 on Feb 25, 2015 |
|
# ¿ Sep 17, 2013 20:31 |
I like working with SharePoint It's like helping a mentally disabled child eat breakfast
|
|
# ¿ Sep 17, 2013 21:15 |
There are totally HR people here that are desperately searching for someone to throw money at, anyone who knows COBOL and can keep this loving ancient system running it alive because the original developer is long gone and nobody has the aptitude to learn it or make it in a better language. e: whoops it is actually FORTRAN not COBOL apparently.
|
|
# ¿ Sep 27, 2013 18:02 |
ikanreed posted:Those are certainly not as bad as the entirely real a.ToString()!="false". These are all over the place in my project. Whatever chucklefuck put these in absolutely loved them. I could tab over to visual studio right now and find one in ten seconds. And it's not just bools either, I'll see things like x.ToString()=="1". God help me I swear one time I found one that was x.ToString()=="null". THAT DOESNT EVEN WHAT
|
|
# ¿ Oct 8, 2013 20:39 |
Dessert Rose posted:Re: nullable values in C#: Heh, you wish Microsoft was smart enough to pass me nullable bools (also sometimes it's nice to know when something is null vs false) As a bonus to this discussion, here is something I literally alt tabbed and copy-pasted from code that has been live for a few years now. code:
|
|
# ¿ Oct 9, 2013 18:59 |
libcxx posted:Programmers can unionize. Why that will never happen is a giant can of worms. Because, as is now apparent, anyone can replace you - and even in a company as big as Toyota, where your job is as important as making sure cars dont loving drive off without input from their driver.
|
|
# ¿ Oct 30, 2013 02:12 |
Obviously it's getting the 30th input field on the form. So uh...don't add/remove any before that.
|
|
# ¿ Nov 7, 2013 18:25 |
I'm the coding horror today. At least, I was. I had a list of Room objects which had lists of other objects in them that I was serializing to/from a file. Saving the list, before: Loop through the Room list, loop through each Room's object list, serialize each object, write to stream, add 'seperator' bytes, encrypt, write to file (named after the Room), end up with dozens or hundreds of files. Saving the list, after: Serialize Room list, write to stream, encrypt, write to single file. Loading the list, before: Loop through each file in directory, create a room named after each file, open file stream, continue reading stream until 'seperator' bytes are detected, decrypt bytes, deserialize object from byte section, add object to room, repeat until end of stream, switch to next file. Loading the list, after: Open single file stream, decrypt, deserialize room list.
|
|
# ¿ Dec 5, 2013 22:20 |
The API service I'm trying to communicate with is sending me ampersands inside of its xml. And not &, just plain old & by itself.
|
|
# ¿ Dec 19, 2013 22:23 |
Just had to defend use of the below to someone in figuring out if a DateTime falls on a weekdaycode:
vvv oh gently caress me Polio Vax Scene fucked around with this message at 00:33 on Dec 31, 2013 |
|
# ¿ Dec 30, 2013 23:35 |
omeg posted:https://www.youtube.com/watch?v=-5wpm-gesOY Sadly I'm stuck with creating a library to manage appointments, schedules, and recurrences that are timezone compatible. And "oh gently caress me" doesn't warrant a new post. The true coding horror: the human race
|
|
# ¿ Dec 31, 2013 15:11 |
pseudorandom name posted:"gently caress it, lets just count from 1 January 1970!" But when is that?
|
|
# ¿ Jan 3, 2014 21:15 |
baquerd posted:1388782132 seconds ago from this post. Impossible - global timezone variance range is 25 hours. There is no one point in time that can be considered January 1, 1970 for every place on Earth.
|
|
# ¿ Jan 3, 2014 22:40 |
A new low has been reached. The newest API-of-the-month that I am working with has a method that requires a "location id" that represents a place somewhere in the world. This API stores all it's possible locations in a gigantic gently caress-off xml tree that goes Planet -> Continent -> Country -> County -> 'Place'. So Orlando, Florida would be Planet Earth -> North America -> USA -> Orange County -> Orlando and the location id would be something like 32805. Yes, Planet Earth is the first loving node in this tree, but that isn't even the best part. In order to actually find the location id you are searching for, instead of doing something sane like accepting county/place/etc as inputs, you provide a location id to search from, and the api returns everything on that branch to you. So Planet Earth is 1 and USA is 99. So if your location is in the USA, you provide 99 as the parent location and every location in the USA is given back in an xml, and you are expected to search through it. Not in the USA? Hope you know your location code or have twenty minutes to spare while you download the entire god drat database.
|
|
# ¿ Jan 8, 2014 23:11 |
That's what typeof() is for. I actually like that the sorting is left to the developer, because you can't blame the language for doing it wrong/inserting crap data into your sort.
|
|
# ¿ Jan 9, 2014 16:44 |
|
|
# ¿ May 10, 2024 16:13 |
Today's ibuprofen brought to you buy a javascript library that automatically grabs config files based on the user's language (ex. "en-US.js") and a web application that doesn't allow you to upload files with a hyphen in the name for an unknown reason (ex. "en-US.js"). Put em together in one room and it's a crazy wacky sitcom coming this summer on fox!
|
|
# ¿ Jan 9, 2014 23:55 |