Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 74135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:18:39+00:00 2026-05-10T20:18:39+00:00

I might be one anal programmer, but I like code that looks good from

  • 0

I might be one anal programmer, but I like code that looks good from a distance. I just found myself lining up a CSS style so that instead of this:

#divPreview {     text-align: center;     vertical-align: middle;     border: #779 1px solid;     overflow: auto;     width: 210px;     height: 128px;     background-color: #fff' } 

it now looks like:

#divPreview {     width: 210px;     height: 128px;     overflow: auto;     text-align: center;     vertical-align: middle;     border: #779 1px solid;     background-color: #fff'; } 

I will almost always write numerical comparisons in order of size like

if (0 < n && n < 10) 

instead of

if (0 < n && 10 > n) 

and finally I will tend to arrange if-then-else code so that the THEN part is smaller than the ELSE part (cause the heavier stuff goes to the bottom, right?)

if (afflicted == true) {   GetSome();   HelpRight(); } else {   NowPlease(); } 

ugh!

if (afflicted == false) {   HowMuchTrouble(); } else {   IsItToDo();   ThisReally(); } 

aahhh

I could go on and on with more examples, but you get the idea…

Question: Am I alone in my neurosis here? What’s your coding kink?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:18:39+00:00Added an answer on May 10, 2026 at 8:18 pm

    Any code style that makes you reorder things when code changes is bad.

    It would screw up diffs. You are using a version control system right?

    There’s a few other things that would make your code prettier, but screw up diffs.

    Imagine this code:

    int foo = 42; int fooBar = 1024; 

    Now let’s make it prettier by lining up the = signs:

    int foo    = 42; int fooBar = 1024; 

    But then we add another variable:

    int foo              = 42; int fooBar           = 1024; String nowLetsBeEvil = 6400; 

    Now if you did a diff, all 3 lines have changed, when only the last one did.

    And there’s more, lining up params between methods is bad

    sqrt(x + y, x - z); sqrt(x    , x    ); 

    The comma and semi-colon are nicely lined up, but if you ever change the code, you’ll have to manually reformat all the sqrt lines that are together and screw up the diffs again.

    Basically, never do manual formatting. Always enforce code styles using an IDE or pretty printer. But also never choose a code style where the format will change when your code did not

    EDIT:

    As stated in the comments, some diff tools can ignore whitespaces within lines. This is great, but not all diff tools can do this. If you are aligning fields or params, make sure you are:

    1. Not doing it manually
    2. Your diff tool can ignore the whitespace changes
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might seem like a stupid question I admit. But I'm in a small
This might be on the discussy side, but I would really like to hear
After understanding (quote), I'm curious as to how one might cause the statement to
Let's say I have two models, Classes and People. A Class might have one
Might be subjective and/or discussion.. but here goes. I've been asked to estimate a
This might be a bit on the silly side of things but I need
You might have a set of properties that is used on the developer machine,
This might seem obvious but I've had this error when trying to use LINQ
I might be missing something really obvious. I'm trying to write a custom Panel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.