8

PLEASE do not format your code like this!

Comments
  • 1
    It looks clean. I have seen worse.
  • 0
    Variable 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.
  • 0
    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.
  • 2
    and also... Auto formatters will destroy this completely
  • 0
    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!
  • 1
    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.
Add Comment