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 162413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:23:11+00:00 2026-05-11T11:23:11+00:00

As I do my coding I sometimes wonder if I’m doing things the best

  • 0

As I do my coding I sometimes wonder if I’m doing things the best way or just the way it’s always been done. Does what I’m doing make sense anymore?

For example, declaring all your variables at the top of the function. If I try to declare it twice or below where I start using it my IDE will bark at me at design time – so what’s the big deal? It seems like it would make more sense to declare the variables right above the block where they’d be used.

Another one would be hungarian notation. I hate that all my variables related to a particular object are scattered throughout my intellisense.

With modern advancements in frameworks and IDE’s, are there some coding practices that don’t really apply anymore and others that may be just plain wrong now?

  • 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-11T11:23:12+00:00Added an answer on May 11, 2026 at 11:23 am

    Don’t declare variables above the block where they’ll be used – declare them in the narrowest scope available, at the point of first use, assuming that’s feasible in your language.

    Hungarian notation will depend on the conventions for your language/platform. It also depends on which variety of Hungarian you’re using – the sensible one (which I’m still not fond of) or the version which only restates the type information already available.

    One thing to watch out for: when you take up a new language, make sure you take up the idioms for it at the same time, particularly the naming conventions. This will help your code fit in with the new language, rather than with your old (probably unrelated) code. I find it also helps me to think in tune with the new language as well, rather than fighting against it.

    But yes, it’s certainly worth revisiting coding practices periodically. If you can’t decide why something’s a good idea, try doing without it for a while…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes when coding in Objective C for the iPhone I wonder if I should
I use Emacs primarily for coding Python but sometimes I use IDLE. Is there
I've been coding in Ruby for sometime now, but I don't understand when to
In coding a traditional MVC application, what is the best practice for coding server-side
The coding is done using VS2008 There are two divs in my page namely
I have been working on coming up with the best wy to put the
Sometimes, while coding in PHP we get parse or syntax errors like those: Parse
Sometimes, when coding in RAD Studio 2009 (Delphi), suddently the behaviour of the code
In my coding environment I've got a dev, test and production machine. Sometimes I
Iam coding a solution for web automation, I have been using the default web

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.