He who laughs last...
-
Boss: React contractor on the Project of Doom has completely ruined the frontend using some experimental pattern he was trying out. We now have to fork the code to support a new client. It's a disaster.
Me: Hahaha, contractors suck so much. Good luck cleaning up the mess there.
(later)
Boss: Cartman I hired Porno Guy to take over the Project Of Doom. No need for mettle, he assured me he has a lot of experience, plus he had several other offers. Had to act fast.
Me: Hahaha, sounds like a better salesman than coder, Boss. Hope you know what you're doing, haha.
(later)
Boss Porno guy is trying to merge back the frontend code. But he is also insisting on some strange pattern of his own. The frontend junior working with him is complaining nothing gets done. Also, he is not very responsive on skype.
Me: Uh-oh, sounds like more trouble in paradise. Guess we should have had that mettle after all. But, oh well. Off I go to work on my own project. Toodles, hahaha.
(later)
Boss: I've had it with Porno guy, canned his ass. We are already late with a bunch of features, clients are banging on my door. Here's a random CV. I need a replacement. Not tomorrow. Now!
Me: You might want to consider setting up a real HR process for these candidates, but whatever. It's gonna make for a fun thread at least, hahaha.
(today)
Boss: S07E01 guy is not working out. He can code, but I can't work with him. He's another idiot like Porno Guy.
Me: Hahaha, guess you can't grab a random person off street and have him save your project of doom.
Boss: That's it, you are taking over. Reverse engineer the config files and setup the project. I'll then tell you what we need fixed by end of week.
Me: Yeah, hahah, such a disaster of a project, hahaha.... wait, what?
-
-
@cartman82 said in He who laughs last...:
Me: You might want to consider setting up a real HR process for these candidates, but whatever. It's gonna make for a fun thread at least, hahaha.
Access denied. Why?
-
@mrl said in He who laughs last...:
Me: You might want to consider setting up a real HR process for these candidates, but whatever. It's gonna make for a fun thread at least, hahaha.
Access denied. Why?
Secret club.
You have to prove you're not a narc.
-
@mrl said in He who laughs last...:
@cartman82 said in He who laughs last...:
Me: You might want to consider setting up a real HR process for these candidates, but whatever. It's gonna make for a fun thread at least, hahaha.
Access denied. Why?
You’re not special enough.
Seriously though, ask @boomzilla, make him do some work.
-
@mrl If you haven't joined https://what.thedailywtf.com/groups/trust_level_3 you won't be able to see it as it's in the lounge.
while you're on the groups page, try joining https://what.thedailywtf.com/groups/by-joining-this-group-you-agree-to-be-mentioned-randomly-for-no-reason-is-that-okay-yes-no
-
@jaloopa said in He who laughs last...:
@mrl If you haven't joined https://what.thedailywtf.com/groups/trust_level_3 you won't be able to see it as it's in the lounge.
while you're on the groups page, try
joining https://what.thedailywtf.com/groups/by-joining-this-group-you-agree-to-be-mentioned-randomly-for-no-reason-is-that-okay-yes-nojumping off a bridge
-
@boomzilla what do you have against @by-joining-this-group-you-agree-to-be-mentioned-randomly-for-no-reason-is-that-okay-yes-no?
-
@cartman82 said in He who laughs last...:
Boss: S07E01 guy is not working out. He can code, but I can't work with him. He's another idiot like Porno Guy.
Spoke with Boss again.
Slight correction of the quoted paragraph: the guy saw the code, saw the deadline and noped the fuck out.
-
@jaloopa said in He who laughs last...:
while you're on the groups page, try joining @by-joining-this-group-you-agree-to-be-mentioned-randomly-for-no-reason-is-that-okay-yes-no
FTFY.
-
Porno Guy's code that reconnects to a specific database based on url pattern matching.
His idea of serving multiple versions for different clients.
-
@cartman82 said in He who laughs last...:
the guy saw the code, saw the deadline and noped the fuck out.
A perfectly reasonable response, at a guess.
-
@cartman82 said in He who laughs last...:
Porno
Guy'scode
-
@jaloopa you young'ums with your secret clubs and stuff... Who needs them, I will make a better one, with blackjack and hookers.
-
@cartman82 said in He who laughs last...:
@cartman82 said in He who laughs last...:
Boss: S07E01 guy is not working out. He can code, but I can't work with him. He's another idiot like Porno Guy.
Spoke with Boss again.
Slight correction of the quoted paragraph: the guy saw the code, saw the deadline and noped the fuck out.
Hire him! He sounds smart!
-
-
I feel this kind of anecdote deserves its own "Peter Principle" / "Brooks Law" type of aphorism.
"Any sufficiently talented developer will eventually get transferred to a doomed project, in a last-ditch attempt to save it. This will fail."
-
Turns out PornoGuy had stealth-added both redis AND node, so he can serve sockets. Just copied the code to the server, no git or anything. No one even knew the node app existed.
No code snippet better illustrates PornoGuy's sense of organization and code quality than this:
-
@serguey123 said in He who laughs last...:
@jaloopa you young'ums with your secret clubs and stuff... Who needs them, I will make a better one, with blackjack and hookers.
In fact forget the secret club.
-
@dangeruss said in He who laughs last...:
@serguey123 said in He who laughs last...:
@jaloopa you young'ums with your secret clubs and stuff... Who needs them, I will make a better one, with blackjack and hookers.
In fact forget the secret club.
What secret club?
:wink_wink.jpg:
-
@karla said in He who laughs last...:
@dangeruss said in He who laughs last...:
@serguey123 said in He who laughs last...:
@jaloopa you young'ums with your secret clubs and stuff... Who needs them, I will make a better one, with blackjack and hookers.
In fact forget the secret club.
What secret club?
:wink_wink.jpg:
Exactly... First rule of @secretClub is you don't talk about @SecretClub.
-
@dangeruss said in He who laughs last...:
@karla said in He who laughs last...:
@dangeruss said in He who laughs last...:
@serguey123 said in He who laughs last...:
@jaloopa you young'ums with your secret clubs and stuff... Who needs them, I will make a better one, with blackjack and hookers.
In fact forget the secret club.
What secret club?
:wink_wink.jpg:
Exactly... First rule of @secretClub is you don't talk about @SecretClub.
But is that one club (case-insensitive) or two?
-
@dangeruss said in He who laughs last...:
Exactly... First rule of @secretClub is you don't talk about @SecretClub.
Of course, since it's secret
-
@dangeruss said in He who laughs last...:
@karla said in He who laughs last...:
@dangeruss said in He who laughs last...:
@serguey123 said in He who laughs last...:
@jaloopa you young'ums with your secret clubs and stuff... Who needs them, I will make a better one, with blackjack and hookers.
In fact forget the secret club.
What secret club?
:wink_wink.jpg:
Exactly... First rule of @secretClub is you don't talk about @SecretClub.
ITYM @by-joining-this-group-you-agree-to-be-mentioned-randomly-for-no-reason-is-that-okay-yes-no
:P
-
@djls45 I was summoned, and so I appear.
-
@cartman82 said in He who laughs last...:
No code snippet better illustrates PornoGuy's sense of organization and code quality than this:
This is great. It puts into perspective the idiotic stuff I'm dealing with, and makes me feel better about my life.
-
@gwowen said in He who laughs last...:
I feel this kind of anecdote deserves its own "Peter Principle" / "Brooks Law" type of aphorism.
"Any sufficiently talented developer will eventually get transferred to a doomed project, in a last-ditch attempt to save it. This will fail."
Well, not always, and it turns out in my experience that that's the worst case scenario. If you get transferred to a doomed project and somehow manage to save it, burning your candle at both ends to do so, you will be expected to pull off similar miracles for the rest of your career.
-
@timebandit said in He who laughs last...:
@dangeruss said in He who laughs last...:
Exactly... First rule of @secretClub is you don't talk about @SecretClub.
Of course, since it's secret
I can't help pointing out lack of a sign pointing left.
-
@gąska amazing. Almost as if the sign was at some place where there's only a right turn...
-
Another one of PornoGuy's "delightful" patterns.
He takes an entire entity object and packs it into a JSON, then sets it as value of a button.
All these buttons trigger the same onClick method, where he rehydrates their particular JSON string and then has a huge if/then block, where he acts accordingly based on the object.
Innovative!
-
@cartman82 Oh and his re-hydration code is a buggy copy-pasta.
-
Are all porn sites that badly coded? Because that's disgusting.
-
@cartman82 said in He who laughs last...:
@cartman82 Oh and his re-hydration code is a buggy copy-pasta.
How "safe" is JSON.parse()? Or is the JSON sanitised somewhere along the way? Or is that more or less the point?
-
@cartman82 said in He who laughs last...:
re-hydration
So that's how the cool kids call deserializing from JSON :P
-
@steve_the_cynic said in He who laughs last...:
How "safe" is JSON.parse()? Or is the JSON sanitised somewhere along the way? Or is that more or less the point?
It's not a safety concern, it's more that this huge string now lives inside DOM, at a completely wrong place for it.
And there isn't even need for it. He could have just:
<Button onClick={() => this.onClick(value)}>Approve</Button> //... onClick(value) { console.log(value); }
PornoGuy is the master of inventing a strange janky pattern that sort of works, but.... whyyy!?
-
@cartman82 said in He who laughs last...:
@cartman82 Oh and his re-hydration code is a buggy copy-pasta.
Other warts in the snippet are left as an exercise to the reader :D
@mrl said in He who laughs last...:
Are all porn sites that badly coded? Because that's disgusting.
No, not all of them.
Some of them are stuck in the good old days of 1999, with manually edited
<table>
s nestedfivetwenty levels deep.The more daring ones implement fancier bits like AJAX-based pagination/filtering. It helps when most of those sites are owned by the same few companies (megacorp 1, SFW link, megacorp 2, NSFW link) - a single change can be applied to many sites at once.
I was mildly amused earlier this year when megacorp 2 fixed this sorting glitch on their many sites:
old:new:
@steve_the_cynic said in He who laughs last...:
How "safe" is JSON.parse()? Or is the JSON sanitised somewhere along the way? Or is that more or less the point?
Security is not the prime concern here, as @cartman82 said. But just for completeness:
JSON.parse
is safe in the sense that browsers have native implementations for it, with decent safeguards regarding memory usage, execution time, and arbitrary code execution. But it wasn't always so – JSON became popular beforeJSON.parse
was widespread, so early code simply usedeval(...)
and never considered security. Polyfills were also introduced, but without native implementations they all had problems.
Semi-related: Why does Google prepend while(1); to their JSON responses?
@adynathos said in He who laughs last...:
@cartman82 said in He who laughs last...:
re-hydration
So that's how the cool kids call deserializing from JSON :P
That term is also quite popular in ORMs to mean "populating an entity object with data from an outside source".
-
@dcoder said in He who laughs last...:
No, not all of them.
Some of them are stuck in the good old days of 1999, with manually edited <table>s nested fivetwenty levels deep.
The more daring ones implement fancier bits like AJAX-based pagination/filtering. It helps when most of those sites are owned by the same few companies (megacorp 1, SFW link, megacorp 2, NSFW link) - a single change can be applied to many sites at once.I was mildly amused earlier this year when megacorp 2 fixed this sorting glitch on their many sites
Hank Hill and his porn – 00:16
— Alfonso Crespo-Yapur
-
@jaloopa said in He who laughs last...:
@gąska amazing. Almost as if the sign was at some place where there's only a right turn...
-
@gąska if there's some point or joke there then I did whoosh. Care to explain?
-
@jaloopa I don't think I can talk about a secret club within a secret club.
-
@dkf said in He who laughs last...:
@cartman82 said in He who laughs last...:
No code snippet better illustrates PornoGuy's sense of organization and code quality than this:
This is great. It puts into perspective the idiotic stuff I'm dealing with, and makes me feel better about my life.
I got that one beat with
"Error: Success!"
-
@cartman82 said in He who laughs last...:
Innovative!
ok so there's going to be an image
ok
now let's look at the button's value
ok
make sure the value isn't the word undefined
ok
also make sure the value is the only type the value can be
???
also make sure the value isn't null
??????
ok now parse the value into JSON and put it in the data variable
-
@ben_lubar Type check before null check… Oh well, it's an optimisation opportunity I guess.
-
@dkf said in He who laughs last...:
@ben_lubar Type check before null check… Oh well, it's an optimisation opportunity I guess.
The value property of an HTML form input is always a non-null string.
-
@ben_lubar said in He who laughs last...:
The value property of an HTML form input is always a non-null string.
Does the JIT engine know that that must be true? If not, that can't be optimised out. OTOH, when
typeof x === 'string'
, it's definitely the case thatx !== null
as nulls are absolutely not strings. Though it'd also need to prove that readingevent.target.value
twice (or more) in a row gives the same thing, which is yet another example on the list of stuff that looks to most programmers like it ought to be simple and actually really isn't in general…
-
@cartman82 said in He who laughs last...:
Porno Guy's code that reconnects to a specific database based on url pattern matching.
His idea of serving multiple versions for different clients.
What IDE fills in the parameter names like that?
-
@dreikin said in He who laughs last...:
What IDE fills in the parameter names like that?
PHP Storm.
That's a new thing. I am not sure I like it. I am still giving it a chance to win me over, but I am constantly hovering on the edge of turning it off.
-
@cartman82 IntelliJ IDEA from the same company does the same thing. Sometimes it's helpful; other times all you get is a one or two character thing that tells you nothing. :/
-
@erufael said in He who laughs last...:
@cartman82 IntelliJ IDEA from the same company does the same thing. Sometimes it's helpful; other times all you get is a one or two character thing that tells you nothing. :/
Yeah, it's better when the parameter names are meaningful....
-
@cartman82 said in He who laughs last...:
@dreikin said in He who laughs last...:
What IDE fills in the parameter names like that?
PHP Storm.
That's a new thing. I am not sure I like it. I am still giving it a chance to win me over, but I am constantly hovering on the edge of turning it off.
I'd turn it off IFF there is some other way to quickly (<1 second) look up argument names.