2
jestdotty
12d

autoformat is good I think

now instead of making the code "look nice" I make the logic of the code look nice and just press autoformat

and you don't have to press all the stupid space characters or decide when to newline chaining functioning or whatever else. just write it dirty and press format

as much as I love how I optimized my JavaScript syntax over the years, it was pretty distracting. it's like I was moving in and nesting or something. urgh why. bikeshedding. I mean yes, it's all nice and cozy, but you also could've done literally anything else with your time

originally I was a fan of autoformat in theory because I had some issues with co-workers fighting over syntax -- like literally one guy would write stuff so bad it was like it was put through an uglifier. he would put keywords in unexpected locations and that language in particular allowed it (interestingly rust doesn't and I frequently can't recall what order the keywords are supposed to go in lol), which if you were debugging his code now you've gotta squint for all those keywords and you're going to be slower because you can't just skim the whole thing. and over there in reddit land people are complaining when people use i and j variables instead lol. he used g and k and they weren't even for loops and that wasn't even the issue 🤣, he wrote like 12 statements per line and condensed 500 statements into 30 and you can't parse a thing and no this wasn't javascript

Comments
  • 1
    thats why i love the Black formatter. No thought spent anymore on formatting. At first I was skeptical due to the formatter probably messing with the syntax. Turns out its really good
Add Comment