submitted 3 years ago* (last edited 3 years ago) by to c/programmer_humor@programming.dev
 

all 18 comments

sorted by: hot top controversial new old
[–] 3 points 3 years ago
[–] 1 point 2 years ago
[–] 1 point 3 years ago*

MYYYYY EEEEEEEYYYYYYYYEEEEEEEESSSSSS

  • source
  • [–] 1 point 3 years ago

    What happens when you give a python programmer java

  • source
  • [–] 1 point 3 years ago (2 children)

    Honestly, I kinda like it.

  • source
  • hideshow 4 child comments
  • [+] 1 point 2 years ago
    [removed by mod]
  • source
  • [–] 1 point 3 years ago

    If anything, it's a good way to enforce line length.

  • source
  • [–] 1 point 3 years ago (2 children)

    I strongly believe that code formatting does not hold any information and that because of it, compilers should reject non-normalized code, saying "run a formatter first". We have the tooling for most of the languages to make this absolutely painless, remove all head scratching of "what the hell is up with this code style" and just focus of the semantics. I believe that you should be allowed to produce code abominations like this code sample and have it auto-formatted into the code style that everyone can easily interpret.

  • source
  • hideshow 4 child comments
  • [–] 1 point 3 years ago* (2 children)

    The auto-formatting story is half baked I think. As far as I know most language have a formatter that goes only one way, which is an improvement over having no formatter at all.

    What we're missing is good tools to go from the standard format to a personalized format. For example, I was working on JavaScript recently and the team was using prettier with 2 space indentation. I found that somewhat hard to work with because of some minor vision issues, it was becoming a bit of an accessibility issue for me, but I was already viewed as a bit of a troublemaker at the company and pushing everyone to change their style wasn't going to help me any.

    I tried to find a tool that would reformat the code for me without altering the repository but couldn't find an easy solution.

    So we have formatters that go from "everyone's personal style" to a standard style. But our tools for going the other direction, from standard style to "my personal style" are lacking. (Hoping to be proved wrong on this point.)

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 3 years ago*

    You could just have your own local prettier rules which will format things how you want while you work on them, then use something like lint-staged to run the standard prettier rules for your org on commit. That way you work how you wish, and the project gets the files how they wish.

  • source
  • parent
  • [–] 1 point 3 years ago

    Alright, time to update my team's linters and formatters...

  • source
  • [–] 0 points 3 years ago (1 child)

    ok cool do whatever you want. Imma put in a pre-commit hook to auto format everything.

  • source
  • hideshow 2 child comments