89

In my freelancing job, I got this as a source code ? Really? Are you guys serious? Is this a joke?

Comments
  • 59
    I like the attention to detail.

    They're retrieving 'your dick' and inserting it into 'yomama', in a fuck object.

    Hilarious.
  • 12
    @codecrow I really dont know how and what to feel now...
  • 24
    I agree, this is truly disgusting code:

    - no strict-mode
    - class in global-namespace
    - class not final
    - class name not in camel-case
    - no autoloading
    - public properties
    - direct accessing global-variables
    - echo-statement (instead of return)
    - ugly string concat

    :(
  • 13
    Now that is a highly professional way of leaving the company.

    Please tell me they have git so all it took to fix this was a quick revert?
  • 12
    @ilPinguino Unfortunately, they don't use git(The f*** up moment). They just send me the zip file.
  • 8
    @johnmelodyme Oh shit...

    I sure hope your IDE has a good refactoring function because you'll need it.
  • 5
    @ilPinguino I'm using Visual Studio Code so no I have no worries on refactoring , I concern on I have to understand the code...
  • 4
    @johnmelodyme phew, good luck with that.
  • 5
    @ilPinguino thanks .... I hope I can understand it.... Otherwise I have to drop the bid.
  • 12
    @johnmelodyme hm... I'm just thinking, if you have to drop the bid because of that former employees actions, that person may be liable (of course, depending on your jurisdiction) for the damages caused to both you and the client.

    But that's just my 2 Cents.
  • 4
    @ilPinguino Thanks for the advice man.
  • 6
    @johnmelodyme Yeah, but consult your lawyer first please. I don't know the situation you're in.

    But I'd definitely show the client what that code looked like when you started. Maybe they'll throw in a bonus, or are little more understanding when there are delays.
  • 3
  • 9
    @johnmelodyme Yeah. If it comes down to you having to drop that bid due to this person's actions, and you're thinking of suing them, please consult a lawyer first.

    I'm just a random penguin on some social media platform. Although judges and such occasionally dress up like penguins that doesn't mean I, as a penguin, know the law well enough to give advice on it.
  • 3
  • 3
    This looks kinda cool! for the some people who will have easy time to understand the code!
  • 4
    @ilPinguino Should I ever choose to quit like this, I'd delete every old commit just so this version is the last remaining.
  • 3
    @pipe The client could argue that unjustifiable deletion of commits is intentional damage to the code which is their property. It's much harder to argue that based on this.
  • 4
    I would definitely tell the client, if for nothing else then so that they know what I'm spending their time on.
  • 4
    Doesn't compile. `MotherFuckers` is not defined.
  • 5
    @cprn It's php, it's not compiled.
  • 2
    @johnmelodyme
    You might want to keep that code for when you leave that project for the very same reason that made the author write it.

    Always keep in mind, that the overwhelming majority of people aren't destructive by nature.
    There probably is a very disturbing reason for that code to exist...
  • 3
    @cprn You're absolutely right. My bad, my memory failed me on this one.
  • 2
    @pipe Absolutely not true. Neither compilation nor interpretation are attributes of the programming language. Saying some code is written in a compiled programming language or in an interpreted programming language is a non-sense. These are properties of the implementation. The most common implementation of PHP is Zend Engine, a.k.a. `php` binary, which *compiles* sources down to an intermediate bytecode before interpreting. Google HHVM for a popular example of an alternative implementation. And guess what, it also *compiles* sources to bytecode. There are more.
  • 2
    @cprn I knew that kind of subtlety, but it was quite clear in my mind that you and I were talking about the most common implementation. I'll however look into HHVM out of curiosity, as I don't know it since I don't have a lot of interest in php at first :).
  • 3
    @pipe I like how your answer to my comment appears before I posted... my... comment. 🤔 Time travel confirmed! 🤷‍♂️
  • 2
    @cprn The one where I said "my bad" was posted in reply to when you said that php was indeed compiled. Then you seemingly deleted that comment and actually said that compilation wasn't a property of the language, to which I answered I knew. Everything is in the right order to me! It's not time travel, it's comment manipulation!
  • 2
    @pipe Deleted a comment, you say... Might be, I'm tipsy, it's Friday 👍
  • 3
    @cprn I may be become tipsy in a little while too... It's Friday after all, you're right again !
  • 1
    Watch out for booby traps 😱
  • 1
    @cprn If you call converting to bytecode compilation then every language that isn't a complete joke is compiled. Toy languages and very early PoCs interpret from source, everything else uses a bytecode even if you can't access it, because it's more cache friendly.
  • 1
    @homo-lorens Also because you don't want to redo anything except the instructions themselves when you execute a path the second time.
  • 2
    I am offended. PHP is the devil's work and in this house something something religion pun. I just hate PHP.
  • 1
    @homo-lorens It's true, though, isn't it? Nowadays it's a rarity to find a language that doesn't have compilation step in any of its implementations. Maybe shell script. Everything else, if it hangs around long enough, sooner or later gets a compiler. Saying "a programming language is interpreted" is kind of like saying "this text in English can be read and understood perfectly well but it's impossible to translate it to Dutch".
  • 2
    @cprn To be honest, Dutch is a pain in the ass to work with.
  • 3
    @cprn Which is why we call something compiled if it is converted to machine code and no mediator is required for its execution, and bytecode-based languages are interpreted or maybe transpiled. How we classify JIT compilation is an interesting question.
  • 2
    @homo-lorens PHP doesn't require interpreter at least since PHP 7.4 - I'm actually using an ahead of time compiler that does produce machine code in an obscure project at work once every 90 days or so. I'm not sure compilation is defined as process of converting source into machine code per se (and converting to byte code doesn't qualify, I honestly thought it does) but that's not really a point. What I was trying to say is "compiled" or "interpreted" aren't words that can be used to characterize a programming language because language is an abstract set of rules. A language that doesn't have an AOT compiler today can have one tomorrow. There's enough crazy people around to make sure of that. Root.cern people made Cint. Does that make C++ an interpreted language? I don't think it does. 🤷‍♂️
  • 2
    @cprn I totally missed your point then.
  • 2
    @cprn Imma write a HTML compiler.
  • 3
    @pipe Arguably a html to bitmap renderer is a html compiler because you can pass the result as-is to the GPU and it will be able to use it.
  • 2
  • 2
    That's not even valid PHP isn't it?
  • 2
  • 2
    His code style is the reason why he lost hos job.
  • 1
  • 2
    That guy was awesome, they should have kept him.
  • 1
    @johnmelodyme valid, yet badly written
  • 1
    @evici
    Hey, i see you are a connoisseur of the well aged bones already cleaned from all the flesh by the passing of time - but would you also like to try a more aromatic thread featuring slight residues of bad jokes rot:

    https://devrant.com/rants/2126149/...
  • 0
    @evici I didn't wrote them
Add Comment