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
-
ymas4717yVariable names are good. That class is doing too many things though. I never understood why people like things to be aligned like that but to each their own.
-
I consider this bad pratice for the following reasons:
When a line needs to be edited or added in a way that breaks the alignment, the previously pretty looking code will get inconsisntent and ugly. More often it prompts the coder (perhaps you) to adjust whitespace on nearby lines as well, possibly triggering a cascading series of reformattings.
When other developers start poking around in the code and they choose to use a more conventional standard, the code will get inconsistent and ugly. You might say that developers should use whatever formatting is already used is the code they are editing but developers will be more productive if they don't have to change their formatting style whenever they need to edit someone elses code. The most important thing is ofcourse that all developers, working on a project agree on a standard but I will still argue that it is best to stay as conventional as possible since the people writing the code might not be the people who end up maintaining it. -
I agree that this isn't the worst thing you can do but I still cringe when I have to edit and maintain unconventionally formatted code. Just follow the best practices and formatting guidelines of whatever language you're writing.
This might be a good way to format assembly code but this is Java! -
id software code use to look something like this. Was all over the DOOM and Quake engines. It wasn't bad, honestly. The brain can jump directly to the name or to the type without having to parse everything.
Related Rants
PLEASE do not format your code like this!
undefined
coding standards
no no no