Ranter
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
Comments
-
I have atom editor setup to remove all trailing white-space and new lines on save .. so no.
-
Always try to. Ms word spoiled me to ALWAYS leave a trailing empty line after images, tables, other objects bcz if you don't you'll have trouble inserting text below the object afterwards. I got into a habbit of leaving trailing newlines and paying xtra attention to additional whitespaces - all thanks to ms word.
-
Just to shut the f* up f*ing eslint... there is no thing that I hate more (and love more) than eslint. F*ing beautiful bastard. Pimping my code and stuff.
-
eeee31507yPOSIX definition of a file is (something like): lines of characters.
POSIX definition of a line is zero or more characters ending with a newline character.
By that definition, the empty file contains one newline character. And every file ends with one too. -
Glinkis2267yI use Prettier which automatically formats *all* my code, and since prettier inserts a newline the answer is yes.
-
no, but my IDE occasionally adds it (or it just gets there somehow via my editing), and quite the opposite: every time I notice it, i delete it. because I have some OCD tendencies, and dammit, EOF==EndOfCode==ClosingBrace!
-
@donnico I used to write a lot of texts for university and college. A LOT! So no, word isn't my ide
-
mee48951237yI used to simply not care about that final new line. I recently told VS-Code to care for me (in order for every file to be styled the same) so the situation remains unchanged. I still don't care ¯\_(ツ)_/¯
-
aritzh7537y@eeee THIS! THIS IS THE REASON! Try using any POSIX tools without a trailing line break, and you will curse yourself to death wondering why things don't work as expected. And it is not just POSIX, Python's PEP8 says the last char of a file has to be a line break. ALWAYS END YOUR FILES IN A LINE BREAK (and thank me later 😉).
-
Unixxx3657yNo, imho having that line is kind of ugly. I have a visual studio plugin for refactoring which I primarily installed to remove those lines automatically.
Weird question: Do you leave a blank line at the bottom of each file when you program?
rant