Porno guy's code



  • Remember Porno Guy from the status thread? A node/PHP dev that worked on a bunch of porn sites, some of which kind of well known.

    After solving a few easy-ish features, Boss has decided to skip the mettle and basically hand him the lead role over a much maligned project that had recently undergone a half-failed rewrite.

    He had some strange ideas about the project's direction. Eg, he insisted on using "pods" layout for frontend and hacking require() calls to work without relative paths. Stuff like that. But he seemed competent and confident enough in his plans, so we gave him some leeway.

    And then he was given a moderately difficult task on the project I am in charge of (basically, clone a db record and all its attached records).

    This feature isn't going so well.

    After delaying and missing deadlines and being hard to find, he finally submitted a pull request with supposedly finished feature.

    There's total 100 lines of code. Here's a representative sample.

    0_1505474472693_1bde33cc-5471-4415-935a-3c8c83970dec-image.png

    Note that getSprocketVersions() and cloneVersion() are typical node.js function that take a callback with error and result (no promises).

    If you know anything about node, it's pretty clear this guy has no understanding of how callbacks and concurrency work in javascript.

    This is from a supposed node.js senior who somehow finagled Boss into the lead role on his passion project.

    Next time Boss wants to skip a mettle, I'll remind him of this guy.



  • @cartman82 said in Porno guy's code:

    a callback with error and result

    In that particular order.

    Btw, is callback defined anywhere?



  • @zecc said in Porno guy's code:

    In that particular order.
    Btw, is callback defined anywhere?

    Yes, that's the main callback for this function. He should call that once after he is done with the entire thing, either with error or result. With this code, he'll call it for every error, and swallow it for success.



  • Boss is currently passive-aggressive trying to make Porno Guy admit he can't handle this task and someone else should take it. Probably to be followed with a 1-1 talk where they discuss the guy's attendance record and salary expectations.



  • @cartman82 said in Porno guy's code:

    Boss is currently passive-aggressive trying to make Porno Guy admit he can't handle this task and someone else should take it. Probably to be followed with a 1-1 talk where they discuss the guy's attendance record and salary expectations.

    Porno Guy is again away from skype. No reply for the last half an hour.

    It doesn't bode well for his prospects with the company.


  • Winner of the 2016 Presidential Election

    @cartman82 said in Porno guy's code:

    getSprocketVersions()

    I have no idea what a Sprocket is but since this is Porno guy my brain insists that it stands for: :leo: :rocket:

    Filed Under: :giggity:
    Also Filed Under: The emoji titles are overwriting my own title #SAD


  • kills Dumbledore

    @kuro said in Porno guy's code:

    Also Filed Under: The emoji titles are overwriting my own title #SAD

    sperm:rocket:

    FTFY



  • @cartman82 said in Porno guy's code:

    so we gave him some leeway.

    And now he's just spraying his code everywhere. It's all over everything. You were hoping to keep his code internal, but he got it all over the front-facing side.

    At least he didn't get any backdoor code action going. It's always a painful, shocking surprise when someone inserts backdoor code without asking first. Despite what you see in the movies, there's actually a lot of careful preparation and planning that goes into inserting backdoor code.

    If he's using sprokets, does that mean he's expecting you to share his code with other parties? Because your company, understandably, might be under the default assumption that the code would just be between you and him. It's not that there's anything bad with sharing code with other parties, but it's something that needs to be discussed beforehand. Just having an open code-base isn't for everyone. It seems like it would be easy and fun, until you run into sharing issues. Not to mention having to always test other people's code for viruses before getting it in you.

    The tardiness is especially troubling, because it displays an underlying lack of respect for you, and undermines any trust you may have in him. And when it comes to accepting his code-- getting it all mixed up in you and on you-- you have to be able to absolutely trust that his code is clean. If his intentions aren't genuine-- well, there's no telling where else that code has been.






  • Winner of the 2016 Presidential Election

    @lorne-kates can I get the Version of that sprocket (video, all_versions)?

    Filed Under: I accept callbacks that include results and errors



  • @cartman82 said in Porno guy's code:

    Porno Guy is again away from skype. No reply for the last half an hour.
    It doesn't bode well for his prospects with the company.

    Porno Guy showed up. He offered to work over weekend to get this done.

    Boss: Since Cartman probably won't be available over weekend to do code reviews, better call him now and have him explain everything about callbacks, so there are no more mistakes.

    Sure Boss, let me just give him a quick node.js lecture, and everything will be fine. No need to face the fact you made a bad hiring decision, let's cover our ears and nananananana.

    Sigh.


  • Impossible Mission Players - A

    @cartman82 said in Porno guy's code:

    let's cover our ears and nananananana.

    Does that make you Batman? :thinking:



  • @lorne-kates said in Porno guy's code:

    The tardiness is especially troubling

    Don't forget that he also must not take too long to finish his tasks. Any goodwill from his coworkers would dry up, leading to too much friction within the company.



  • @cartman82 said in Porno guy's code:

    let's cover our ears and nananananana.

    Gettin jiggy wit it



  • Will Smith don't have to swear in his raps to make money.
    Well I do.
    So fuck him and fuck all you, too.




  • :belt_onion:

    You really need to check that he's using source control. If you're not careful he could deploy something without it, getting you into trouble months later.



  • @greybeard yeah, he's fully in git. Also can't deploy on his own. At least not on this project.


  • :belt_onion:

    @cartman82 Well, if he says "I'll just deploy the HEAD" don't believe him.



  • @cartman82 said in Porno guy's code:

    better call him now and have him explain everything about callbacks

    "Dr. Cartman won't be available in the lab over the weekend, so can you call him up and give him a quick explanation of chemical reactions?"



  • @greybeard said in Porno guy's code:

    @cartman82 Well, if he says "I'll just deploy the HEAD" don't believe him.

    :giggity:



  • @izzion said in Porno guy's code:

    @cartman82 said in Porno guy's code:

    let's cover our ears and nananananana.

    Does that make you Batman? :thinking:

    Well, we know who the Joker is...


  • :belt_onion:

    @lorne-kates :thatsthejoke:



  • @kuro said in Porno guy's code:

    I have no idea what a Sprocket



  • @dcon said in Porno guy's code:

    Well, we know who the Joker is...

    Steve Miller!!!!!!!



  • Porno guy had one last chance to fix things over the weekend (he didn't avail himself of my teachings about async code).

    Here's the result.

    0_1505736134415_a792585f-0ae4-4609-8ff3-4ffd8e80ae25-image.png

    Better, but he still fails to call async.each callback, so this will hang. Which shows he didn't even try to get the code running. Just wrote and pushed.

    Hey, genius. You are supposed to be senior. How about you get the fucking code working before you submit the pull request!?

    Anyway, he's off my project and his position is shaky on the other project as well.

    Boss: Maybe we should test him...?
    Me: Well, did you hire him permanently?
    Boss: .... yes. He already had an offer from a different company, had to grab him quickly.
    Me: Then it's late now. At least he seems to be a good salesman.



  • @cartman82 said in Porno guy's code:

    Me: Then it's late now. At least he seems to be a good salesman.

    Sounds like he'd be perfect in that department.



  • @cartman82 said in Porno guy's code:

    Boss: Maybe we should test him...?

    Test what? His proneness to gravity from extreme heights? His flammability? His organ's resistance to lye?

    There's lots of tests you can do on him.


  • Dupa

    @greybeard said in Porno guy's code:

    @cartman82 Well, if he says "I'll just deploy the HEAD" don't believe him.

    Yeah, @cartman82, you should first request that he gives you the HEAD, so you can double-check. Should be easy for him, given his employment history.



  • @kt_ said in Porno guy's code:

    @greybeard said in Porno guy's code:

    @cartman82 Well, if he says "I'll just deploy the HEAD" don't believe him.

    Yeah, @cartman82, you should first request that he gives you the HEAD, so you can double-check. Should be easy for him, given his employment history.

    :takei:


  • Impossible Mission Players - A

    @perverted_vixen said in Porno guy's code:

    @kt_ said in Porno guy's code:

    @greybeard said in Porno guy's code:

    @cartman82 Well, if he says "I'll just deploy the HEAD" don't believe him.

    Yeah, @cartman82, you should first request that he gives you the HEAD, so you can double-check. Should be easy for him, given his employment history.

    :takei:

    He'd certainly be more useful than present! :D



  • @cartman82 said in Porno guy's code:

    Well, did you hire him permanently?

    I don't know how it works on your side of the pond, but on ours the first three months of a permanent contract are probationary period where either side can simply say it ain't working and terminate the contract immediately. Afterwards it becomes really difficult from the employer side, but usually you know when somebody is completely useless in three months.



  • @bulb said in Porno guy's code:

    I don't know how it works on your side of the pond, but on ours the first three months of a permanent contract are probationary period where either side can simply say it ain't working and terminate the contract immediately. Afterwards it becomes really difficult from the employer side, but usually you know when somebody is completely useless in three months.

    Some companies are doing that here, but it's much more common to use the agency model.

    You open an "agency" - a special type of one-person company with minimal bureaucracy overhead and a few other benefits. Then your employer hires your "agency" as a subcontractor. You get your paycheck as a gross sum transferred to your business account, then you pay the mandatory government benefits for yourself as your own employee.

    Benefits for employer - since it's a B2B arrangement, they don't have to worry about any employee protection laws, benefits etc.

    Benefits for you - you can set the size of your pension, it's not tied to your paycheck. And of course, you set the minimum, and keep more money for yourself (and pay a private pension somewhere, if you want). Basically, this is a good setup for high paying high demand jobs, like IT.

    I presume Porno Guy is hired as an agency, so it should be pretty easy to get rid of him if (when) the time comes.



  • @cartman82 said in Porno guy's code:

    agency model

    Something similar is often used here, but it is illegal. People get to pay lower taxes that way and the government does not want to lose them (arguing with worker protection is obviously just PR).



  • @bulb said in Porno guy's code:

    Something similar is often used here, but it is illegal. People get to pay lower taxes that way and the government does not want to lose them (arguing with worker protection is obviously just PR).

    Government here is still oblivious about the lost taxes, but it seems they are slowly waking up. I think a crackdown of this practice is coming.

    That's why I've been sticking with the normal paycheck for now.



  • @kuro said in Porno guy's code:

    I have no idea what a Sprocket is



  • @cartman82 said in Porno guy's code:

    You open an "agency" - a special type of one-person company with minimal bureaucracy overhead and a few other benefits. Then your employer hires your "agency" as a subcontractor. You get your paycheck as a gross sum transferred to your business account, then you pay the mandatory government benefits for yourself as your own employee.

    That sort of thing is heavily frowned upon by Her Majesty's Revenue and Customs under most circumstances as blatant tax evasion.

    As an employee, after the first £11.5K, you pay 20% income tax and 12% employee national insurance (until you hit £45K, then it's 40% and 2%,) and your employer an extra 13.8% employer national insurance, so the government gets £45.80 (£56.80) for every £100 you earn.

    As a 'company director' you can (theoretically, of course) cut that down by taking dividends instead of wages - with the first £5K free, 7.5% below £45K and 32.5% above (unless already covered by the 19% corporation tax your 'company' has paid on profits.)

    IR35 was brought in to stop that sort of fiddling. Basically if you're only getting paid long term by one company, and you have little leeway with what you do, how you do it, when you do it and where you do it, you're basically an employee in the eyes of HMRC, and should be paying tax as such.


  • kills Dumbledore

    @pjh I used to work with contractors who spent more time discussing the ins and outs of IR35 and the best way to minimise their tax burden than actually doing any work



  • @cartman82 said in Porno guy's code:

    Some companies are doing that here, but it's much more common to use the agency model.

    Mind you, the model isn't as common in 'right to firework' states, where employment is 'protected' by letting companies fire without cause, reject candidates without explanation, and basically act like dicks, on the premise that... it makes it easier for people to get jobs?

    OK, that's a pretty strawman description of it (for one thing, it ignores the fact that the move to pass these laws originated in part as an over-reaction to genuinely excessive "workers' bill of rights" laws passed in other states during the 1960s and 1970s) but basically, the term 'right to work' is the sort of thing George Orwell might have put into NewSpeak. It means almost exactly the opposite of how it sounds, and is sold entirely on the idea that the main thing holding companies back from hiring people by the bus load is fear of hiring someone who will turn out to be a flake and then being unable to dismiss them. In other words, if companies can fire or refuse to hire anyone they feel like, whenever they feel like, we'll get full employment in no time.

    Sure, that makes sense... :trolleybus:

    Getting back on topic (well, the topic of this aside, anyway), the agency model is mainly used as an end run around the same "worker rights" laws that inspire "right to work" laws. It did spread to the "right to work" states, but mainly because it made it easier for companies to work in different parts of the country without having to change practices too much to fit the laws of the individual states. Indeed, I would say that from the perspective of the clients who are actually the real employers of the 'contractors', one of the biggest advantages of using agencies is that it makes it easier to regularize and homogenize their HR practices - that part is all outsourced to the agencies, so they don't need to pay as much detailed attention to local laws. So, the agency model is, in practice, a case of people hiring specialists to do something that they would otherwise have to spend a lot more money to do less effectively themselves - in this case, dealing with both employments laws, and those pesky actual human beings who are applying for jobs.

    The agencies also act as a buffer and filter, meaning that out of a thousand applicants, the company only needs to actually interview maybe five. This combined with agencies paying recruiters partially on a commission basis has made the recruiting process cutthroat.

    The recruiters usually have scripts which run keyword searches applied to databases of resumes and applications (without consideration of how old the entry is, what the resume actually says, etc.), and automatically fire off template-based emails to everyone whose resume mentions anything even remotely connected to the job they are trying to fill. Once they have a huge pile of reply emails from that - which usually only takes a few hours - they then apply another set of scripts to whomever responds to the email to narrow the set down - that auto-email usually will have tens or even hundreds of thousands of replies, ranging from automated 'vacation' messages, to irate "I don't do that work anymore, why the fuck do you still keep contacting me after twenty years?" replies, to people who are obviously crazier than Swampy based just on their response to the email.

    This usually will leave them with a pool of several hundred to cherry-pick from, which is then narrowed further by filtering for people who would need to relocate, people who ask for more than the contract scopes for, etc. By the time the client gets the list of candidates, it is down to less than a dozen in most cases.

    Mind you, companies will often still sit on that list, or dither while waiting for Prince Charming to come along, and there are dozens of things unrelated to hiring that can sink or delay a project either before or after the interview process starts. All in all, it is something of a clusterfuck, and it is a miracle that anyone gets hired for anything at all - but it is still, overall, better for everyone than if the companies tried to do it themselves.

    This nightmare is actually an improvement over how things were when companies did their own hiring! Not just for the companies, but for the employees! That says a lot about what a 'broken, busted machine' (to use Jim Sterling's description of AAA gaming) hiring processes - and corpse-rat management in general - really is in the US.

    Now we can get back on the original topic of Porno Guy's :wtf: coding and source management practices, right? :trollface:


  • Notification Spam Recipient

    @cartman82 said in Porno guy's code:

    @bulb said in Porno guy's code:

    I don't know how it works on your side of the pond, but on ours the first three months of a permanent contract are probationary period where either side can simply say it ain't working and terminate the contract immediately. Afterwards it becomes really difficult from the employer side, but usually you know when somebody is completely useless in three months.

    Some companies are doing that here, but it's much more common to use the agency model.

    You open an "agency" - a special type of one-person company with minimal bureaucracy overhead and a few other benefits. Then your employer hires your "agency" as a subcontractor. You get your paycheck as a gross sum transferred to your business account, then you pay the mandatory government benefits for yourself as your own employee.

    Benefits for employer - since it's a B2B arrangement, they don't have to worry about any employee protection laws, benefits etc.

    Benefits for you - you can set the size of your pension, it's not tied to your paycheck. And of course, you set the minimum, and keep more money for yourself (and pay a private pension somewhere, if you want). Basically, this is a good setup for high paying high demand jobs, like IT.

    I presume Porno Guy is hired as an agency, so it should be pretty easy to get rid of him if (when) the time comes.

    That is Hollywood-style bullshit.



  • @scholrlea said in Porno guy's code:

    'right to firework'

    I prefer the term "privilege to work."



  • @pie_flavor said in Porno guy's code:

    That is Hollywood-style bullshit.

    Naah, not really. For example, it almost never involves giving the recruiter a blowjob on his casting couch.

    I mean, it is bullshit, just not quite the same bullshit as in Hollywood.

    Filed Under: Not that this never happens, mind you, it just isn't SOP the way it is in Hollywood.



  • @scholrlea said in Porno guy's code:

    OK, that's a pretty strawman description of it (for one thing, it ignores the fact that the move to pass these laws originated in part as an over-reaction to genuinely excessive "workers' bill of rights" laws passed in other states during the 1960s and 1970s) but basically, the term 'right to work' is the sort of thing George Orwell might have put into NewSpeak.

    "Right to work" came about as a rebuff of forced unionization. Allowing the employee to have the decision if they wish to join the union or go it alone and negotiate for themselves.

    You are confusing this with "at will employment" which is the ability for either side (employer/employee) to walk away from an employment contract at any time without cause.



  • @scholrlea said in Porno guy's code:

    Mind you, the model isn't as common in 'right to firework' states, where employment is 'protected' by letting companies fire without cause, reject candidates without explanation, and basically act like dicks, on the premise that... it makes it easier for people to get jobs?

    Right-to-Work States are States that don't allow employers to require employees to join a Union. (A.k.a. "open shop" laws.)

    You're talking about At-Will States.



  • OK, you're right, I did get them confused. However, most Right-To-Work states are also At-Will states, and I am hardly the only one to mix the two up.

    Filed Under: And Gee, for some reason the ones who do it most often are candidates who are making speeches in favor of At-Will laws... I wonder why that is...


  • Notification Spam Recipient

    @scholrlea said in Porno guy's code:

    @pie_flavor said in Porno guy's code:

    That is Hollywood-style bullshit.

    Naah, not really. For example, it almost never involves giving the recruiter a blowjob on his casting couch.

    I mean, it is bullshit, just not quite the same bullshit as in Hollywood.

    Filed Under: Not that this never happens, mind you, it just isn't SOP the way it is in Hollywood.

    Not sure if the rest of the post was serious, or if it was still talking about blowjobs.
    If the latter, then I'm talking about how they'll usually make a new company for every movie, and have the parent studio rake in the profits while the sub-company has a giant 'production cost' that they pay to the studio. Lets them report a loss on literally every movie; useful for things like biopics where ordinarily they'd have to pay the person they're making the movie about a cut of the profits.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.