Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "auto-indent"
-
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.»11 -
So, first time ranting, sorry if I mess anything up.
When I first started my current job and got introduced to the system we were coding in, something seemed a little fishy to me. Didn't like the system anyway, but at least the language is a compiler language, so it runs quite quickly, right?
In theory, yeah. If the lead dev liked the IDE that came with it. But he has to REALLY fucking hate it, because rather than using it, he codes in plaintext. No syntax highlighting, no auto-indent, nothing. And he's built the entire damn system around doing that. Sadly the compiler is only integrated into the IDE, so what do we do there? Copy the code from the plaintext file to the IDE to compile it there? No no, why would you. The language has a function you can use to compile some code at runtime.
And so he does. Every. Single. Fucking. Script. There's a single main script that runs and finds the correct textfile to then runtime-compile and execute. So we effectively made a compiler language into a massively unoptimized interpreter lang.
I even mentioned that this might be a problem, but I was completely dismissed, so at that point it's not my problem anymore and I have then switched to a different system anyway.
Couple weeks later I heard the same guy complaining that the scripts were running almost the whole night so we'd probably need some better hardware or something.
Well if only there was a really obvious solution that would improve the performance by probably about a factor of 20 or so...13 -
!rant
Did you guys know that on Android studio, if you set the keymap of completing the current statement to ' ; ', every time you hit ' ; ' after you finish your line, it will auto indent it for you.
You're welcome.5 -
This moment when you pressed your "Auto-Indent" Hotkey and the whole software doesn't run anymore. Later you realize that it's because of your Auto-Indent and even worse - you realize you have to code on top of the spaghetti code...undefined wtf routines auto-indent paranormal paradox clean code why how could this happen to me common general help
-
wait..... can you auto indent console logs depending on their nesting in functions?
I just realised it can be hard to read console logs because say you do
log('here 1')
callFunction()
log ('here 2')
But callFunction does a bunch of logging, then your here1 and here2 become separated !
But if you could make console log automatically add a couple spaces for every level of nesting/scoping that would be ideal .. ? 👀12 -
*Ctrl + a*
*retarded auto-indent code shortcut key*
*Presses arrow key instinctively*
*moves cursor to end or start of code*
Am I the only one? -
I tried to figure out the key stroke combination for Auto indent in WebStorm (on a Mac).
Result: The key stroke for selecting all (CMD + A) stopped working.