Category Archives for "Blogs"

31 bad programming habits that can make your code smell

31 Bad Programming Habits

Bad habits are tough to break and much tougher if you do not realize what you are doing is endangering your own work. If you understand but do not care that is the even worse. But you are here, are not you?

As a developer, I have seen a great deal of poor practices, not only around code, but also about teamwork abilities. I have been guilty of practicing several of those bad habits. Listed below are best 30 bad programming habits that I found and most of them I practiced, arranged into four classes: code organization, teamwork, writing code, and testing and maintenance.

Code Organization

1.    Saying, I will fix it later

The custom of postponing code fixes isn’t only an issue of priorities. Organizing your problem tracker may generate some improvement, but in addition, you must have a means of tracking smaller problems which come up as well. Doing “To do” comments at all necessary place is a fast method of earning certain that you don’t overlook anything.

2.    Insisting to a one-liner solution

Being fanatical about writing effective, elegant parts of code is a frequent characteristic of developers. It is like solving a mystery –you locate a mix of routines and regular expressions which turn 20 lines of coding into 3 or 2. Regrettably, it does not always lead to readable code, and that is generally a lot more significant consequence. Make your code readable first, then smart.

3.    Making pointless and unnecessary optimizations

Another location where we often misplace our efforts is optimizations. It seems fantastic to decrease the size of your site several bytes, but won’t gzip compensate for it anyway? And aren’t fix and features requests more important? Moving such optimizations to the end of the project when you have some free time and requirements won’t change sounds a better option

4.Making yourself believe that styling problems aren’t that Significant

If I’ve learned anything after more than years of looking at other people’s code, then it is that coping with coding style issues is what that developers are most likely to delay. Perhaps it’s hard for inexperienced developers to find out the advantages of addressing such styling issues, but over time it will become clear that once code quality goes down, soon your project will become a complete mess. Make sure to stick to best practices even if it is regarding styling of code.

5. Sweeping things under the rug

Either by catching and dismissing exceptions or utilizing libraries that don’t report errors (for instance, jQuery), there are numerous approaches to sweep things under the rug. But when these errors become a priority, the battle of mending it will be several times bigger, believing that you will not have any idea where to get started. A easy method to stop this is by simply logging those blown off errors so you can study them later.

6. Using names that don’t add Info

Naming is tough, but there is a simple method to be certain that your variable and function names are of adequate quality. Provided that the naming adds some sort of information which the remainder of the code does not communicate, other programmers are going to have an easy time going through and getting your own code. The reason why naming is so essential is that titles/names can give an overall idea about what the code does. It requires more time if you have to dig to the calculations to determine which bit of code, but a fantastic name can help you know what the code will in minutes.

Teamwork

7. Abandoning plans too early

A cent percent sure way for creating your code unreadable and cryptic would be not to commit to a strategy. You could always say, if your code is criticized, the program is not complete. But, having half-done modules can result in tightly coupled code once you attempt to create those partially done modules work with one another. This type of complication comes up when new project leader comes in and they think having their way is more important than architectural consequences.

8. Insisting on a Strategy that has little Prospect of working

Just as if giving up a strategy very quickly can cause problems, so is the case with sticking to the strategy that does not work. That is the reason you need to discuss your thoughts with your staff to get opinions and advice if things become tricky. On occasion a different approach could make all of the difference.

9. Refusing to write bad code

There is a time in each programmer’s lifetime when deadlines will make you write code that is awful, which is fine. You have attempted warning your customer or manager regarding the impacts, but they insist on adhering to this deadline, so now it is time to code. Or maybe there is an urgent bug that can not wait for one to think of a fresh solution. That is why it’s essential to be flexible as a developer and also to have the ability to write bad code quite quickly in addition to great code.

10. Blaming others

Accepting responsibility for your errors is a merit which will cause you to glow among your peers. Do not be afraid to admit that you have made a mistake. As soon as you’re alright with this, you’ll be free to concentrate on learning the reason you made that error and how to prevent it. If you do not own it up, learning becomes impossible.

11. Not sharing with your team what you have learned

Your worth as a programmer does not only depend on the code that you write, but also on what you understand when writing/developing it. Share your own experiences, write remarks about it, let’s understand why things are the way they are, and also help them understand new things about the task/project and its intricacies

12. Being Overly slow on Providing feedback to managers/clients

Being too slow on getting everyone else on the same page is an issue as well. Among the very valuable personality traits of any craftsman lies in making certain everyone is on precisely the exact same page concerning the job, as far as you can. The cause of this isn’t so that your supervisor can fill spreadsheets. It is for your personal profit too: You may have fewer insecurities and decrease uncertainty about the future and lifetime of the job.

13. Not using Google enough

Every time you face a problem, make sure you just google it. There is large communities there like Stackoverflow that can quickly help you. You can also developer next to you for help, but they might be busy. So just googling for solution will save your and others time and you will find appropriate and quick solution.

14. Overvaluing your personal style

Make sure to coordinate with your working style and environment setup with your team. Ideally, everyone on your staff should be operating under similar circumstances and observing the exact same coding style. Doing things your way might be more enjoyable, but co-workers may not be employed to your programming style, and when it is odd, it is going to be more difficult for another developer to focus on what you have wrote and built.

15.Don’t be romantic about to your own code

If someone comments about your code, do not take it personally. Your code must stand on solid earth; that’s, you need to be able to describe why you wrote it like that. In case it needs improvement, that is only a manifestation of this code’s correctness, not yourself.

Writing Code

16. Optimizing in a wrong way or Not knowing how to optimize

A fantastic optimization strategy requires some expertise to get right. It requires exploration, investigation, and understanding each system involved with a procedure. Inform yourself about such items. Learn about algorithmic sophistication, database query analysis, protocols, and also the best way to measure performance generally.

17. Using the wrong tool for the job

Always be receptive to new languages and libraries You can just understand a lot, however the reason you need to keep learning is that each new issue attracts another circumstance and demands another instrument –more relevant to the task available. Don’t make decisions based purely on what you know.

18. Not trying to master your tools and IDE

Every new shortcut or hotkey you understand while utilizing the tools that you work with each day is going to have a more favourable impact in your coding rate than you understand. It is not about saving a couple of seconds using a hotkey; it is about reducing the context switching. The longer spent on every little action, the less time you will have available to consider why you are doing it and on what comes next. Mastering shortcuts will free your brain.

19. Ignoring warnings and error messages

Don’t assume that you understand what’s wrong with your code before reading an error message, or that you’ll figure it out fast enough.  Having more information about a challenge is obviously better and taking the opportunity to gather that info will save yourself more time in the long run.

20. Ignoring configurable values and using hardcoded values

Give extra importance to configurable values. Constantly be considering what changes can come along with how to handle them. Technical debt will expand at a massive rate in the event you don’t split the moving pieces from the remainder of your work. Use constants and configurations where appropriate.

21. Trying to reinvent the wheel all the time

Never reinvent the wheel. Do not write code that you don’t need to. Perhaps someone else has invested a great deal of time in your own problem, and they may have a well-tested alternative that you may reuse. Save yourself some trouble.

22. Blindly copying and pasting code

Making sure you don’t blindly copy and paste code and you understand it before you use it. Sometimes you do not immediately detect what the code is doing. You’ll also learn more about a problem when you take a chance to navigate the code in detail.

23. Not allotting enough time to learn how things really work

Always take the chance to broaden your knowledge by contemplating how things function and studying about their inherent issues. You may save time by not bothering currently, but everything you find out on a job will be significant in the long run.

24. Being overconfident about your own code

It is not good to assume that simply because it is something that you built or coded, it has to be great. You find out more about programming since you work on new items and gain expertise, so have a peek at your previous code from time to time and reflect on how you have improved.

25. Not giving thoughts to the trade-offs of each design, solution, or library

Everything comes with pros and cons. Every product has its fine things you’ll just learn about using and assessing it. Seeing a couple of usage examples to get a library won’t make you a grasp of it nor does it imply that it is the perfect match for each situation that will appear on your undertaking. Be constantly critical of all you use.

26. Not asking help when you’re stuck somewhere

Asking for help does not mean that you’re incompetent. It is important to keep a short feedback loop. It will make thing less painful for you. The perfect people will understand your attempt as an effort to learn more, and that is a fantastic virtue to get.

Testing and maintenance

27. Writing tests to pass and not writing the ones that will not pass

Writing unit tests, you know will pass is essential. They’ll make reorganizing and refactoring a code much safer. On the reverse side, you also need to write evaluations you understand will not pass. They are important to move the project forward and keep an eye on issues.

28. Not considering performance testing important enough for critical cases

Make sure to set up an automated testing process at some time after project is started, probably at middle point of the development. It will help you know if you are having escalating performance issues.

29. Just focusing on build passing and not checking that your build works

It is not very common that every time as build passes, it getting the job done in exact way. Quickly testing and analysis every build that passes is a good habit to have.

30. Not owning code you wrote

Don’t hesitate to own your code. You are probably the only person who can better help others understand your code.  You need to aim to make your code remain readable to yourself and others many years from today.

31. Disregarding and ignoring non-functional requirements

It is very probable to happen that you sometimes forget about essential requirements like performance and security when deadlines are approaching or you are trying to deliver something really quickly. Keep a checklist for those.  You don’t want them destroying your party since you drafted your deadlines before contemplating these non-functional requirements.

Improving how you work through habits is a great way to avoid having to think a lot about each and every situation. As soon as you have assimilated a perfect method of doing something, it is going to end up effortless. If you’d like to talk about some other programming customs which you consider detrimental, or you want to criticize mine, then write a comment, and let’s talk.

Related Articles:

Best Resources For ASP.NET Developers

Best Resources for Asp.net Developers

ASP.NET is a server side web application framework developed by Microsoft to allow programmers/developers develop enterprise level dynamic web applications, web services and websites.

It was first released in 2002 with .NET version 1.0 and was launch as successor of Active Server Pages (ASP) technology. ASP.NET is currently in the market in two flavors i.e. ASP.NET web forms and AP.NET web forms. ASP.NET web forms lets you build web application by simple drag of drop of controls and supports event driven model.

Its supports Rapid Application Development(RAD) and because of its event driven model its quite easy to get started on for .NET Winforms or WPF developers. The second flavor is ASP.NET MVC. ASP.NET MVC is a light weight and highly testable presentation framework integrated with existing ASP.NET features as in case of Webforms like master pages and membership based authentication. ASP.NET is based on MVC (Model View Controller) design pattern that’s makes any application development in ASP.NET MVC highly testable and maintainable.

The successor of ASP.NET is ASP.NET Core. ASP.NET is a complete rewrite uniting the previously separate ASP.NET MVC and Web API in to a single programming model. It is free and open source next generation web framework that runs on .NET Framework, Windows and cross platform .NET Core.

This article is going to focus on resources and help only for ASP.NET Webforms. We will write in next parts for ASP.NET MVC and ASP.NET Core.

As the core of ASP.NET is .NET framework that actually is the reason of ASP.NET as successor ASP. Let’s first look into .NET framework.

What is .NET framework

.NET framework is a framework by Microsoft for development of desktop to web and mobile apps. It supports multi languages letting developers of different languages work on this platform or they can work on a single project using different languages on this platform.It is one of the most powerful frameworks available today and at back of it is Microsoft and new features and updates are continuously introduced to give more and more power to developers.You must be thinking how many PCs over the globe have .NET framework installed. Here is your answer I found from hanselman blog.

“Well over 90% of the PCs in the world have some version of the .NET Framework installed.Over 65% of Windows PCs in the world have .NET 3.5 SP1 installed.”

Here is how MSDN defines it 

“The .NET Framework is a technology that supports building and running the next generation of applications and XML Web services. The .NET Framework consists of the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote security and robustness.In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services”.

You must install .NET framework to use. If you have installed Visual Studio, .NET must have been installed with it. In case you don’t have MS Visual Studio Installed, here we explain to you how to install .NET framework in your PC

Installing .Net Framework

“The developer pack for the .NET Framework 4.5.1 or 4.5.2, the targeting pack for the .NET Framework 4.6, and the developer pack for the .NET Framework 4.6.1, 4.6.2, or 4.7 provides the .NET Framework 4.5.1 or 4.5.2 or the .NET Framework 4.6, 4.6.1, 4.6.2, or the .NET Framework 4.7 reference assemblies, language packs, and IntelliSense files for use in an integrated development environment such as Visual Studio. If you are using Visual Studio, the developer pack or targeting pack also adds the installed version of the .NET Framework to the target choices when you create a new project. Choose one of these developer packs or the targeting pack:

Microsoft .NET Framework 4.7 Dev Pack

Microsoft .NET Framework 4.6.2 Dev Pack

Microsoft .NET Framework 4.6.1 Dev Pack

Microsoft .NET Framework 4.6 Targeting Pack

.NET Framework 4.5.2 Developer Pack to install version 4.5.2 on Windows 8.1 or earlier, Visual Studio 2013, Visual Studio 2012, or other IDEs.

.NET Framework 4.5.1 Developer Pack to install version 4.5.1 on Visual Studio 2012 or other IDEs.

From the developer pack download page, choose Download. Next choose Run or Save, and follow the instructions when prompted” (MSDN).

Tutorials

So, you have now downloaded and installed .NET or you have MS Visual studio installed  you must be ready to learn amazing ASP.NET.

And if you are already known to ASP.NET, you must be here to find the resources here, right ?

Let’s go ahead.

Beginners Tutorials for ASP.NET

Microsoft tutorials

Microsoft tutorials are step by step guide for beginners to get stared with ASP.NET and develop their skills. It serves the experts in the very similar way.

Lynda.com

Lynda.com is one of the best tutoring site and is now owned by LinkedIn. You can find plenty of awesome video tutorials here for ASP.NET.

Microsoft virtual academy

ASP.NET and Microsoft Virtual Academy are both Microsoft things and you can find the best experts here teaching you best of ASP.NET.

ASP.NET Tutorials

If you are an absolute beginner, and finding it difficult to go with above mentioned tutorials, follow this site, it illustrates basic steps and is entitled for absolute beginners and dummies of ASP.NET.

Tutorials point

Tutorials point as a hub for a large set of basic and advance levels tutorials. You can also consider their ASP.NET tutorials for getting started with ASP.NET, they are pretty good.

Guru99

If you have kicked started your journey on ASP.NET and need help understanding different components and controls of ASP.NET, this is one stop shop for you.

ASP.NET Snippets

I love this site. Mudassir, the owner and major contributor of this site has done a lot of hard work to prepare for you different snippets that will solve your problems in minutes. If you are trying to get something done and stuck somewhere, go and check out the solutions here.

Advanced Tutorials For ASP.NET

ASP.NET Snippets

The ASP.Net Snippets has managed to write a snippet for almost every problem you going to face while development. Mudassir, the major contributor of site, he writes the snippet code very easy and clear , and give a link to the demo as well, that makes it easy to understand and quickly to induct.

Microsoft tutorials

Whether you are a beginner or advance level programmer, you are going love Microsoft tutorials. I bet it.

Lynda.com

Along with the developers, Lynda got best of advance level courses for ASP.NET professionals a s well. You are good at ASP.NET, want to become a pro? Lynda is a must try for you.

Microsoft virtual academy

Microsoft Virtual Academy provides free online courses by best of best industry experts to help you build your skills , boost them and advance in your career. It got courses for student, IT pros, data pros and developers. You can find best of what you love here.

Plural sight

Pluralsight is an online education website offering a variety of video trainings created by world-class experts for software developers, beginners and IT pros.                                                                                                                                                                                                                                                                                              MSDN Library

MSDN library is comprehensive and detailed reference for all of the Microsoft tools, technologies and services. Whether you’re a beginner, expert or a pro, or you are building apps, developing websites, or working with the cloud, you’ll find detailed syntax, code snippets, and best practices. MSDN is a home of all technical resources you will need as a .NET developer.

Books

Beginning ASP.NET 4: in C# and VB

This book is for anyone who wants to begin on and learn developing rick, powerful and interactive ASP.NET websites and web applications. Anyone new to web development should be able to learn and follow along because no prior knowledge of web development is required although it helps if you do have a basic understanding of HTML and the web in general.

Beginning ASP.NET 4.5: in C# and VB 1st Edition

This introductory book that is update for ASP.NET 4.5 is filled with lots of helpful examples and code snippets to help you get along and contains a user-friendly and step-by-step format. It is written by popular Microsoft MVP  Imar Spaanjaars and its really helpful.

Beginning ASP.NET 4.5.1: in C# and VB (Wrox Programmer to Programmer) 1st Edition

This book appears to be successor of Beginning ASP.NET 4.5: in C# and VB 1st EditionWritten by the same author updated for the next release of ASP.NET i.e. 4.5.1.

Professional ASP.NET 4 in C# and VB 1st Edition

This book is for making you pro if you have already begun and developed your basic skills at least in ASP.NET. It was written to introduce you to the features and capabilities that ASP.NET 4 offers and it assumes that you have a general understanding of Web technologies, such as previous versions of ASP.NET, Active Server Pages 2.0/3.0, or JavaServer Pages and you have prior basic knowledge of web programming.  

Professional ASP.NET 4.5 in C# and VB 1st Edition

This book is the successor of the Professional ASP.NET 4 in C# and VB 1st Edition and is update for ASP.NET 4.5

C# 6.0 and the .NET 4.6 Framework 7th ed. Edition

This book is meant for the pros and it targets the latest changes in C# language specification and new advances in .NET framework. It has been totally revised for C# 6.0 and .NET 4.6

MCTS Training Kit by Microsoft

Buy this book and it will make sure you learn ASP.NET and you have got confidence in it. Its my favorite by the way.

Bonus

The Principles of Beautiful Web Design: Designing Great Web Sites is Not Rocket Science! 3rd Edition

If you can already develop website and you are good at it but want to enhance their visual outlook, this book is for YOU.

Why don’t u visit this and download free e-books by Microsoft. https://mva.microsoft.com/ebooks

Here are the other best bookshttps://www.microsoftpressstore.com/store/browse/certification-training?page=10

Best ASP.NET Blogs

ASPNET Snippets

One of the finest blogs, where you can find articles, code snippets, working demos and source codes. An easy to integrate approaches will save your time and help you integrate snippet in few minutes.

https://blog.maartenballiauw.be

This is an impressive blog by Maarten Balliauw, a Microsoft pro.

http://odetocode.com/blogs/all

This blog is maintained and updated by a .NET consultancy company and it is continuously updated with latest code snippets, examples and tutorials. This is a must try for all those willing to improve their coding and .NET skills.

https://weblogs.asp.net/scottgu

This guy is the father of ASP.NET. He developed ASP.NET with Mark Anders 

And you can only image how his blog will weight in the community.

http://www.hanselman.com/blog/

Scott Hanselman is Microsoft pro and works in the web platform team. He is another scott and his blog contains a considerable weight as well. His blog contains a variety of topics and you should expect to find their latest updates, code snippets and kickstart tutorials.

Imran Baloch’s Blog

Imran Baloch is a Microsoft certified professional and have deep interest and skills in ASP.NET. His blog contains lots of help, updates and code snippets.

Development with a dot

Ricardo Peres is a Microsoft MVP (most valuable professional) who introduces himself as architect, software engineer, and web developer in coimbra district, Portugal his blog is one of the top asp.net blogs.

K. G. Sreeju Nair

K. G. Sreeju Nair blogs contains codes and updates about C#, .NET and ASP.NET. If you want to be up to date and get a working example of every update out there, follow this blog.  

.Net Blog

.Net blog is run by Microsoft engineering teams and you are going to find updates, announcements, codes and everything (related ?) there.

Microsoft blog

Another MS blog you must be following for all latest announcements, technologies and releases by Microsoft

You may find the rest here

https://weblogs.asp.net/

Best Tools for ASP.NET

Visual Studio

For .NET developer, the best and should be the only choice is Visual Studio by Microsoft. It has different versions like express, community, professional and enterprise. You can you express and community additions (FREE) if you are student or using it for non-production purposes.

Team Foundation Server

TFS is a version controlling and project management tool by Microsoft. It is shipped with Visual Studio and is separately available as well.

Visual Studio Extensions

NuGet Package Manager

NuGet is a free and open source package management system for the .NET.

Web Essentials for Visual Studio

It is a productivity enhancer plugin for VS and can help you write CSS , HTML and JS lesser and faster.

 Resharper

Resharper is one the best code refactoring plugin for Visual Studio. It helps you save time and efforts by highlighting design mistakes and bad practices followed in the code.

Related Topic:

1 4 5 6
>