C# and .NET Community Recommendations

My recommendations for the top 5 .NET communities on the web (based on content) –

  1. The Code Project (the best site for sample code)
  2. 15 Seconds (very good .NET articles and source code)
  3. Developer Fusion (excellent site with a lot of content – tutotials, book reviews, and sample code)
  4. C# Corner (lots of sample code and articles)
  5. C# Help (lots of sample code and articles)

Top 10 Replies By Programmers When Their Code Doesn’t Work

(This is been around for a while, but is funny nonetheless. Credit goes to the original poster.)

Top 10 replies by programmers when their code doesn’t work…

  • 10. “That’s weird… it’s never done that before.”
  • 9. “It was working fine yesterday.”
  • 8. “There is something wrong with your machine.”
  • 7. “There is something wrong with your data.”
  • 6. “It works, but it hasn’t been tested thoroughly.”
  • 5. “Do you have the latest version?”
  • 4. “Somebody must have changed my code.”
  • 3. “Why do you want to do it that way?”
  • 2. “I thought I fixed that.”

And the classic…

  • 1. “It works on my machine.”

C# and .NET Book Recommendations

Here are some of the best books on C# and the .NET framework –

  1. Applied Microsoft .NET Framework Programming (Jeffrey Richter)
  2. Pro C# 2005 and the .NET 2.0 Platform (Andrew Troelsen)
  3. Effective C# (Bill Wagner)
  4. Essential .NET Vol 1 (Don Box)
  5. C# Cookbook (Stephen Teilhet)
  6. Programming Windows with C# (Charles Petzold)
  7. Professional C# 2005 (Christian Nagel et.al.)
  8. Programming .NET Components (Juval Lowy)
  9. Programming Microsoft .NET (Jeff Prosise)
  10. Inside C# (Tom Archer)

For more see here.

Software Management Worst Practices

Managing software is never easy, there are a number of issues that, if not dealt with properly, will quickly lead you down a path of bad software. Some issues are universal to project management, while some may be specific to your team. Identifying problem areas is the first step towards solving them. The following list captures some of the common problems that plague software management.

7. When ‘ad-hoc’ code becomes production code (or “Lets make it work for now”): We all have written ad-hoc code, code that will “make-it-work-for-now”. This is usually during crunch-time with a deadline looming, but sometimes we write ad-hoc code during a regular development cycle. You know what I’m talking about – “lets just hardcode this string for now”, or “lets just use this algorithm for now”, things like that. Of course, the solution is refactoring, but (already overworked) developers are reluctant to revisit and change old code (who wants to change working code?). Also, major refactoring may require major retesting. The tragedy is that this type of code ends up in production and can cause headaches later in the form of sluggish performance, hard to track bugs, and maintainability.

6. When legacy software limits developers (or “This is how we do it”): As developers we often need to leverage legacy software and frameworks. This isn’t bad in itself, but it impacts architectural decisions, new functionality decisions, and choice of tools and technologies. Common scenarios range from having to use a pre-existing logging framework or a custom data layer or an old database. This can define (and sometimes limit) the design and structure of the code we write. We are no longer able to code and implement what we want and the way we want, since we need to adhere to a legacy framework or a legacy policy.

5. No or insufficient code documentation (or “Its low priority”): How many of us can honestly say that we are working on well-documented software? Not many, I’m sure. Is your functional spec up-to-date? Is your detail design up-to-date? Is the code well documented? If a new developer joins the team, how easy is it for him to understand and contribute to the code? Most project managers correctly assign documentation to be lower priority than actual coding, but most developers incorrectly interpret this as optional work. Keeping the code documented doesn’t really take a lot of the developer’s time, they just don’t have the awareness of its importance.

4. Over dependence on a few people (or “That’s not my problem”): In most projects only a handful of people know the overall design and architecture. They are thus able to provide guidance and predict the impact of changes on different parts of the system. But what happens when decisions need to be made in their absence? Most other developers are only concerned with their own module or sub-part. In an ideal world, all developers would have a good understanding of the project. But since we live in a less than prefect world, we can start by rotating tasks among the developers. Every developer should get a chance to work on different tasks like keeping the documents updated, making sure the application installs right, and making sure testers get the right bits. Making more developers familiar with more parts of the system will definitely help in overall project quality.

3. Working with incorrect metrics: I’ve worked for companies that have LOC (lines of code) and bugs per LOC as the sole metric for measuring developer productivity and overall project health. While these, admittedly, do provide some indication, they are hardly enough. Incorrect (or insufficient) metrics generate faulty data which can ultimately effect team morale, the management’s trust in the team, the business’s confidence of the product, and worst of all, the individual developer’s self-confidence. Other methodologies for project management exist (XP, Agile, and others), and I’ve personally tried some of them with varying degrees of success. The best advice would be that teams work out a management method that everybody is comfortable with and then stick to it.

2. Underestimating the importance of testers (or “Our developers do all the testing”): Think that since the code passes the unit tests the developers wrote the code is bug free? Think again! Developers write unit tests so that they pass, ask any developer s/he’ll tell you. Testers, on the other hand, write tests so that they fail. Developers do provide a first line of defense against bugs, they are the infantry, they make sure that the code provides the functionality it claims and is robust in common failure scenarios. But this needs to backed up with heavy artillery – the testers. Sometimes another way of thinking, another pair of eyes, or another person using the code is all it takes to find bugs. Does this mean that finding a bug is solely a tester’s responsibility? Of course not! Developers and testers compliment each other and need to work together to find bugs.

And the number one worst practice in software management:

1. Not budgeting enough time for development (or “I need the compiler by Friday”): This is the single most common complaint among developers. Tight schedules mean more emphasis on coding than on design and also less testing time. Long hours make developers grumpy and they may make more mistakes. Even though “enough time” can never be satisfactorily defined, as a rule of thumb, development time required is usually 2 to 3 times more than what management decides it to be. This is because development time needs to incorporate changing business rules, feature addition/change requests from management/customers, integration issues that may crop up, and many other unforeseen factors that managers don’t plan for.

Intellisense for QueryAnalyzer

Check this out! Microsoft should have done this way earlier. No more fumbling with table and column names!