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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 170k
  • Answers 170k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can lay out a visual-representation pretty easily with yUML.… May 12, 2026 at 2:02 pm
  • Editorial Team
    Editorial Team added an answer The video part may be possible at very low framerates,… May 12, 2026 at 2:02 pm
  • Editorial Team
    Editorial Team added an answer Because C# doesn't support multiple inheritance (which is a good… May 12, 2026 at 2:02 pm

Related Questions

Lately I've been using XPathDocument and XNavigator to parse an XML file for a
I a modeling a system to evaluate expressions. Now the operands in these expressions
I have a warehouse. Sometimes I want to lookup a box location by a
If I'm making a simple grid based game, for example, I might have a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.