65
xonya
6y

I had a coworker used to write PHP pages in this way:

<?php
echo "<html>";
echo "<head>";
// 2000+ lines of un-indented nightmares

I tried suggesting him to keep the HTML outside php tags as much as possible and I stressed out that adding some indentation to the code would have improved readability. I also sent him an example of my code created using an IDE with auto-indent functionality.

His creepy answer was: «Readability is subjective. Anyway I'll try to get used to the sinusoidal trend of your code.»

Comments
  • 5
    You can also
    print<<<STUFF
    HTML tags with any character (ps don't indent the STUFF)
    STUFF;

    stuff can be any word you like then you can {$var}there
  • 12
    How can you not acknowledge the superior readability of html outside this echo-nightmare that can be syntax-highlighted?
    I don't like people
  • 6
    @YouAreAPIRate He was really old and edited files using vi without syntax highlighting, so for him there was no difference. It was terrible working with him.
  • 4
    @xonya even vim has syntax highlighting and everytime i open the non-highlighting windows notepad i'm murdering microsoft devs in my mind
  • 2
    @YouAreAPIRate I saw he working on his laptop without syntax highlighting, so probably he had disabled it. I even thought he could have had some sight issue and so he was not able to see colors.
  • 4
    I really dislike people that don't put the effort to get better or obtain a better workflow. Glad you don't work with that asshole anymore.

    Welcome btw!!
  • 1
    @xonya i'm pretty sure some programs (and os'es) have colorblind-modes to counter colorblindness or color seeing problems. So if he is colorblind i'm sure you would've seen it. But even if he is, how can you read unintended code? You can't grasp the structure of the code at all. But maybe that code doesn't have structure to begin with ^^"
  • 2
    I’ve had entire sites done like this in JS before, I just deleted them and wrote it again.

    Nothing worse then:

    Var html = “ <html>”;
    html+= “<head>”;

    Complex diva
    Only to come out somewhere later with

    Document.write(html);
  • 2
    @YouAreAPIRate Yes, I think you are right, he should have used software for color-blind people. I can't imagine programming without indenting the code, too.
  • 2
    @xonya the only thing worse than missing indentation is bad indentation. I once worked on a react application that looked like someone started with a whitespace program as a base. Yes, spaces and tabs are mixed thanks to eclipse (eclipse doesn't work as you want to because JSX confuses it), atom, copy-pasting and IDE's repeating the incestous pattern of whitespace of the previous line.
  • 1
    Haha 😀
Add Comment