5 Tips to Become a Better Programmer

8 Best Rules for Good Programming Style

ALSO READ: 5 Tips to Become a Better Programmer

Proper programming style significantly reduces maintenance
costs and increases the lifetime and functionality of software. Most software
disasters are rooted in poor style of programming. In this article I am listing
out the 8 best rules that lead to a better programming style.

Readability

Good code is written to be easily understood by colleagues.
It is properly and consistently formatted and uses clear, meaningful names for
functions and variables. Concise and accurate comments describe a natural
decomposition of the software’s functionality into simple and specific
functions. Any tricky sections are clearly noted. It should be easy to see why
the program will work and reason that it should work in all conceivable cases.

Maintainability

Code should be written so that it is straightforward for
another programmer to fix bugs or make changes to its functionality later.
Function should be general and assume as little as possible about preconditions.
All important values should be marked as constants which can be easily changed.
Code should be robust to handle any possible input and produce a reasonable
result without crashing. Clear messages should be output for input which is not
allowed.

Comments

Comments are the first step towards making computer program
human readable. Comments should explain clearly everything about a program
which is not obvious to a peer programmer. The volume of comments written is
meaningless, quality is all that counts.Block comments are written using /* comments */ style. They should go at the top of every source
file and generally include your name, the date your code was written and
overall description of the purpose of that program. Block comments should also
precede most functions with a description of the function’s purpose; these can
be omitted for very short, obvious functions only.Inline comments are written as //comments, they should go near important lines of code within
functions or with variables when they are initialized.

Naming

Names given to classes, variables, and functions should be
unambiguous and descriptive. Other guidelines for naming are:

  • Capitalization is used to separate multi-word names:
    StoneMasonKarel.
  • The first letter of a class name is always capitalized:
    GraphicsProgram
  • The first letter of a function or variable name is always in
    lowercase: setFilled().
  • The names x and y should only be used to describe
    coordinates.
  • The names i, j, and k should only be used as variables in
    for loops.
  • Other one-letter names should be avoided: area = base *
    height instead of a = b * h.
  • Names of constants are capitalized, with underscores to
    separate words: BRICK_COLOR.
  • Use abbreviations with caution. max instead of maximum is
    fine, but xprd instead of crossProduct is a problem.

Indentation

Indentation is used to clearly mark control flow in a
program. Within any bracketed block, all code is indented in one tab. This
includes the class body itself. Each additional for, while, if, or switch
structure introduces a new block which is indented, even if brackets are
omitted for one line statements. For if statements, any corresponding else
statements should line up

White Space

White space is meaningless to compilers, but should be used
consistently to improve readability. Typically three blank lines are left in
between functions. Individual blank lines are used within functions to separate
key sections. Use of spaces varies as well, but inserting one space usually
make expression more readable; next = 7 *
(prev – 1)
 is clear than next=7*(prev-1).

Function Usage

Function should be short and accomplish a clear, specific
task. As much as possible they should be considered “black boxes” which do not
depend on anything except their parameters and can be handle any possible input
gracefully. A common rule of thumb is the “Ten Line Rule”, usually function
longer than ten lines are trying to do too much and should be simplified.Another important aspect of functions is that any repeated
segments of code should be made into a separate function. This will shorten
your program and improve readability.

Output

A final, overlooked aspect of good programming style is how
our program output results and information to users. Part of writing
professional looking programs is providing clear instructions and results to
the users of our programs. This means proper English with no spelling error conditions.
One must always assume that writing programs to be used by somebody with no
understanding of computer programming whatsoever.If you liked the article then please share it!

5 Tips to Become a Better Programmer

In this article I am sharing the 5 best tips that will really help you to increase your programming skills and become a better programmer.

ALSO READ: 8 Best Rules for Good Programming Style

1. Know Basics

You should have a good understanding of basics of the programming language in which you are working or learning. If your basic concepts are strong then you can solve complex problems by breaking it into smaller problems. Your code should be neat and well structured, so that if you start working with the code after few months then you can easily know where you left off.

2. Practice a Lot

We all know the fact that “practice makes a man perfect”. For improving your skills you have to practice thousands of hours. There are plenty of ways for practicing, like you can solve problems from good programming books or find online programming contests. There are many awesome websites like codechef.comtopcoder.com, etc where you can practice.

3. Be Amenable to Change

Technology is changing very rapidly so you have to aware of such changes. You should make sure that the projects or technologies on which you are working are not outdated. For becoming a better programmer you should always engage yourself in learning new things.

4. Read a Lot

The more you read, the more you learn. Read good programming books, articles, documentations. The best way for reading and learning programming is to join various programming forums and contests.

5. Help Others

Join great forums like stackoverflow.com where you can help other programmers by answering there questions. By helping others you can find answers of your own questions. You can also ask questions in the forums and get your problems solved; this will help you to become better programmer. These were few tips that will surely help you in becoming a better programmer. If you have any other tips then please mention it in the comment section.

Image Source: https://img2.thejournal.ie/inline/4496572/original/?width=630&version=4496572

15 Most Common Bad Programming Practices

Here are some most common bad programming practices that every programmer should avoid to become a better programmer.

ALSO READ: 5 Tips to Become a Better Programmer

1. Giving up too soon

Most of the programmers give up when they are very close to solution. So never lose hope and keep trying, you will definitely find a solution.

2. Acting defensively when someone critiques your code

Be calm when someone criticizes your code. Just listen carefully to them; maybe it will help you to improve your code quality.

3. Refusing to ask for help

Don’t be ashamed of asking help from other programmers. Don’t feel that others will think you even don’t know such a small thing. Just go ahead and ask for help. There are several programming forums like stackoverflow where many experienced programmers are active who would definitely help you.

4. Passing blame to others

A good developer is one who takes ownership and responsibility for the code he/she write.

5. Ignoring the opinions of other developers

Pair programming with other experienced developer is one of the best ways to learn and grow as a developer. You can take help of other programmers and senior developers to learn efficient ways of solving a problem that you have solved yourself.

6. Not knowing how to optimize code

Finding solution of a problem should not be your only concern. You should optimize your code in terms of time and space complexity.

7. Acting like a boss, not a leader

If you are a senior developer then you should know how to manage developers in your team. You should act like a leader who can properly lead his/her team.

8. Using the wrong tool for the job

You should be aware of which tool is best for the job. Stop making decisions based on “it’s what I know”. You need to be open to using different technologies, languages, and frameworks.

9. Refusing to research coding questions

Internet is one of the most powerful tools for programmers. You should be really smart to search solution for a problem on sites like google, stackoverflow, etc.

10. Refusing to learn from mistakes

We are humans, we make mistakes. Making mistake is not a bad thing, but refusing to learn from them is bad thing. Find the ultimate cause for the mistake and keep it in mind so that you will not repeat it in future.

11. Separating yourself from the developer community

You should be really active in developers and programmers community. This will help you to have knowledge about latest technologies and trends in the market.

12. Not giving back to the community

You should be always ready for helping other programmers. You can help others by various platforms like stackoverflow, quora, etc. or by writing articles on others or your own blog.

🙂

See how I am helping other programmers by this blog. 

13. Struggling for hours to solve something, solving it, and not documenting it

You may get some strange problem whose solution is not there on internet. You spent several hours and found the solution. Now it’s your duty to share the solution on internet so that others will not struggle that much.

14. Bad naming conventions

Use meaningful name for variables, functions, classes, etc. For example, using characters like x, y, z, etc for the variable name instead of something like length, userInput.

15. Writing too many or not enough comments in code

Comments are essential notes to developers. It increases the readability of code. You should properly write comments so that it will help you as well as other programmers to understand the code in future.

If you know some other bad programming habits then please mention in comment. I will love to add them in this article.

Source: https://www.quora.com/What-are-some-bad-programming-practices-every-programmer-needs-to-be-aware-of-in-order-to-avoid-them

5 Facile Yet Incredibly Valuable Ways to Enhance ASP.NET Developer’s Efficiency

The ASP.Net Development has arguably redefined and restructured the ambit of web application development. The new age capabilities of the platform created by Microsoft has features abound of developers to let them think out of the box and create something that paves way for innovation. Creating exclusive application become a prospect rather too realistic and as more number of developers and development companies lean towards ASP.NET, we are sure to witness better and faster web apps.

The framework is also continuously changing and it is being made sure that there are regular upgrades. For an enterprise providing the ASP.NET development services to a client – locally or offshore – it is imperative to keep glued to those changes and let them not surprise them and the clients. To upgrade themselves to the changes, developers need to rise up to the occasion and raise their skill levels and optimize the way they work. There are ways to do so, and those ways are met with certain challenges as well. But they also produce favorable results for businesses. So, here is how you can proceed to hone your results as a developer:

Also Read: http://blogs.magistechnologiesinc.com/5-things-you-must-consider-before-using-asp-net-development/(opens in a new tab)

Make Handling the Requests an Asynchronous Exercise

The customary practice in ASP.Net Development is managing the incoming request synchronously. While this kind of process has its set of benefits, you cannot set priorities with this practice, which leads to mismanagement of time. As the requests are placed in a queue, there is a method to how they are handled. So far, so good, but the lack of prioritization only works the other way for you – the wrong way that is. By using asynchronous pages, you can reduce the total request handling time and let more important applications to run first. 

Use the Browser’s Tools and Extensions

The browsers like Google Chrome and Mozilla Firefox comes with their own set of tools to help developers spend less time in writing darn-out codes and plug their applications with incredible features. The oversight leaded to ignoring these tools will only lead to increased time in developing apps and probably lesser efficiency as well. Look for the tools that are relevant to the app and leverage them in the best way you can. 

Pool the connections to Free up Some Resources

The way applications are connected to the database eats up a lot of resources, which can otherwise be saved by the more optimized practice of connecting pooling. It also helps the TCP connections, though keeping an eye towards
discrepancies like connection leaks becomes more imperative. 

Do not Keep Debuggers Running at All Times

While ASP.NET works in a great way to make sure the errors do not creep in and go unnoticed through the use of various debuggers and tracers to let you know, they also have an impact over the application development speed metrics. If you keep them on, the debuggers will render the whole process slow and bring a marked difference in the way applications are being executed. This further impacts the performance – a not too desirable prospect by any stretch. As and when you need it, you can switch on the debuggers to locate and correct the errors to make sure they don’t surface at run-time. 

Make the Most of Cache Class

Developers, both beginners and experts, often undermine the importance of the cache class. In fact, they ignore the benefits that the overall caching mechanism can provide them with. This mechanism is highly important for making a backup of resources while classifying their validity. The cache class makes this process be carried out with ease. As and when an object is not allowed to cache, the callbacks are summoned. With a nod to the growing evolvement of ASP.NET, developers feel the heat to stay abreast to the latest and most resourceful practices. And if they happen to be a part of a large scale ASP.NET development company, there is an escalated urgency.

5 Things You Must Consider Before Using ASP.NET Development

Today’s contemporary web needs expect you to opt for a programming framework that comes loaded with remarkable benefits. Before choosing a particular framework, you must gauge it in terms of ease-of-use and scalability. Amongst the wide range of programming frameworks available in the web market, ASP.NET has been successful in making it to the list of leading web development frameworks used by web developers across the globe. If you too are about to leverage ASP.NET features for building remarkable web solutions then this is a post you can’t afford to miss. Here, I’ve covered five vital things that you must consider before using ASP.NET as your web development tool.

1. High-grade scalability

For being able to make the most of a web development framework, you must ensure that the same is equipped with high-end scalability options. The more scalable the framework is, the better it would be for you (as a developer) to manage the events and sessions across multiple servers used during web development.

If your web programming framework comes with top-level scalability, you can stop worrying about scaling your web application in accordance to forthcoming advancements in the field of technology. ASP.NET features such as pipeline optimization and process configuration aid you in addressing the varying requirements as your project scales from one stage to another.  

2. An efficient web server

The prime reason behind the increased use of ASP.NET is its excellent web server efficiency. Backed by a brilliant web server, ASP.NET enables you to deal with different web development scenarios in addition to offering you the flexibility of monitoring web pages, modules and specific components. To sum it up, with ASP.NET, you need not stress about the speed of the web server because the framework handles the dedicated memory which is required for building web applications and further protecting the application from a wide array of irregularities and security infringements that might occur during the development process. 

3. Commendable speed

Speed is something that can render more power and authority to the web developers. If you are going with ASP.NET, you can expect quick and prompt arrangement of controls and facilities. Equipped with tables, easy-to-handle grids and wizards, ASP.NET offer you a suite of navigation, allowing you to execute web development projects smoothly. Eliminating the need for configuring a web server, ASP.NET permits you to get started with the app coding process rightaway.

Since ASP.NET runs on its own web server, you need not worry about configuring a new server on your system. The framework automatically spins a web server for your use. This is indeed a feature unavailable in a variety of other web app programming frameworks.

4. Lesser coding

Unlike a wide collection of web app development frameworks, ASP.NET comes with brilliant functional capabilities, thereby eliminating the need for any lengthy and complex coding. Features such as:WYSIWYG editing, drag-and-drop server controls and multi-lingual support make ASP.NET a framework worth working with. These features make ASP.NET a viable option for both professionals as well as the beginners who’ve just started using the framework for developing out-of-the-box web applications.

5. Trustworthy and consistent

With authentication and data validation serving as two strong assets of ASP.NET, it won’t be wrong to call it as one of the most reliable web development systems. Rich in streamlined components, ASP.NET allows a web program to automatically detect and recover from bugs, followed by acting in the right way. Issues such as crash protection, dead locks and memory leaks are being addressed well by ASP.NET.

As a web developer, you’ll no longer have to worry about system exceptions and all the scrubbing incoming data during web app development. ASP.NET is already designed to handle all this and much more for you. All you need to do is delve into some easy coding and you’re done with building a perfect web solution.

Wrapping it all up

The aforementioned pointers are just the tip of an iceberg. There’s a lot more to explore with the ASP.NET programming framework. If you’re looking forward to develop rich and expensive web applications then ASP.NET is the platform you can choose without giving a second thought. Looking at the ever-growing demands of today’s clients, ASP.NET is the tool that will help you meeting every type of web app development requirement.

4 Free ASP.NET Hosting Websites

Here you will know about some best and free asp.net hosting websites.

Are you a student or developer? Do you have ASP.NET website? Want to test your ASP.NET project online? Want to host ASP.Net and SQL databases for free? Then this article might helpful for you. We will see some free Windows Server OS based web hosting services. Basically applications like ASP.NET, MSSQL, MS Access, etc requires windows server OS to run the websites. This is the main difference between Windows and Linux based hosting sites. So let’s start.

4 Free ASP.NET Hosting Websites

1. SOMEE.COM

Somme.com provides free windows ASP.Net hosting on Windows 2012 or Windows 2003. The registration is absolutely free and does not require credit card information to complete registration. Somee.com provides only 1 website to host free of cost. They also provides FTP to transfer your web files by using of free ftp clients.

FEATURES:

  • Storage capacity: 150MB
  • Transfer rate: 5GB/Month
  • Free Subsomain
  • IIS 8.0/7.5/6.0
  • ASP.Net 4.5/ 4.0/3.5/2.0/ 1.1
  • AJAX 3.5/1.0
  • MVC 1.0/2.0/3.0/4.0
  • Silverlight
  • Databases: MS Access 2003, 2007/MS SQL Express 2012, 2008R2
  • MS SQL databases size: 15MB
  • MS SQL log size: 20MB
  • Backup storage size: 40MB

DISADVANTAGES:

  • Some what low storage capability.
  • Forced advertising (You will see advertising on your hosted website.)
  • Low database storage size.

2. MYWINDOWSHOSTING.COM

Mywindowshosting.com web hosting service for 60 Days free trail for your ASP.Net website. After free 60 days trail period you have buy or upgrade to their paid hosting plans. Registration is free and no credit card information is needed for activation. They believes in try it before buy it. You will get free support for your trail period from mywindowshosting.com. You can use this web hosting site for your small web based project for testing.

FEATURES:

  • Storage Capacity: 1GB
  • Number of Site/IIS Entry: 1
  • Domain Names Hosted: 1
  • Bandwidth: 10GB
  • 1 FTP Account
  • Windows Sever OS: 2012/2008
  • MS Access Database
  • MS SQL Database: 2012/2008/2005
  • ASP.Net: 4.5/4.0/3.5/2.5
  • Firewall, Anti Virus and Daily Backup
  • 24X7 Technical Support
  • No Advertisements

DISADVANTAGES:

  • Only 60 Days free trail subscription

3. ASPSPIDER.COM

AspSpider.com offers web hosting for educational purpose at no cost. You can use their hosting services to create ASP.NET websites and give demonstrations to your manager or client without spending any money. The service is purely for learning and educational purpose and absolutely no commercial sites are allowed except for demo purpose.Registration is fairly simple and no credit card is required.

FEATURES:

  • ASP.NET 4.0/3.5/2.0
  • No Advertising
  • MS SQL Server 2008/ 2005 Express Edition
  • MS Access support
  • 100 MB Disk Space
  • 2 GB Monthly Data Transfer

Disadvantages:

  • Low storage space
  • No ASP.Net 4.5 Support
  • Low monthly transfer rate
  • No FTP support

4. ASPHOST4FREE.COM

AspHost4Free.com provides free web hosting service for your ASP.Net and MS Access database. Registration is free and no credit card information is needed. Let’s look at the features and disadvantages.

FEATURES:

  • 100MB Disk Space
  • No Advertising for limited time
  • FTP Support
  • Unlimited Bandwidth
  • Technical Support via E-mail
  • MS Access Database
  • Standard ASP Scripts

Disadvantages:

  • Low Disk Space
  • No MS SQL Database (You have to compromised with MS Access database)
  • Ads will displayed after limited time is over.