Posted on May 20th, 2011
Back in the days of Web Forms, there were server controls, and they generated rather CSS-unfriendly HTML. So, Microsoft got someone (Russ Helfand) to write adapters that changed their rendering to be more CSS-friendly: the “CSS Friendly Control Adapters” were born.
A little less farther back, in 2007, I tried convincing some people at Microsoft to let the community continue development of these adapters, and they agreed. The CSSFriendly CodePlex project was born, and a bunch of bugs and some new features were added.
A lot has changed since then, but the adapters still have use today for people stuck on .Net 2.0 (they’re in the top 200 most downloaded CodePlex projects, and their forums still see activity). To facilitate those who still use CSSFriendly, I’ve added the library package to NuGet.
How to use the CSSFriendly NuGet package
In four easy steps (three if you already have NuGet).
First, you need Visual Studio 2010 and NuGet. (If you’re . . .
→ Read More: CSS Friendly Control Adapters now available on NuGet
Posted on April 25th, 2011
The following has been circulated around for a long time. It just resurfaced to me, and I wanted to share it! I wish I knew who to credit it to.
Suppose that every day, ten men go out for beer and the bill for all ten comes to $100.
If they paid their bill the way we pay our taxes, it would go something like this…
The first four men (the poorest) would pay nothing
The fifth would pay $1
The sixth would pay $3
The seventh would pay $7
The eighth would pay $12
The ninth would pay $18
The tenth man (the richest) would pay $59
So, that’s what they decided to do.
The ten men drank in the bar every day and seemed quite happy with the arrangement, until one day, the owner threw them a curve ball. “Since you are all such good customers,” he said, “I’m going to reduce the cost of your daily beer by $20″. Drinks for the ten . . .
→ Read More: Beer and Taxes
Posted on March 22nd, 2011
Today, a user reported an issue connecting to a very old CRM application. I logged in to the system myself and saw no error. Since I’m not happy with self-healing issues, I went digging into the event log on the server.
For the past five days, there have been over 15,000 entries added to the System event log with event ID 333: “An I/O operation initiated by the Registry failed unrecoverably. The Registry could not read in, or write out, or flush, one of the files that contain the system’s image of the Registry.” That doesn’t sound good.
My first stop for analyzing event log errors is eventid.net. The feedback on their site pointed me to a few possibilities.
The /3GB switch on a system with 2GB or less of memory.
Symantec AntiVirus (which is a potential culprit to every system problem, apparently).
Insufficient Non Paged Memory . . .
→ Read More: Insufficient pagefile size can cause obscure memory errors
Posted on March 6th, 2011
What’s the textbook definition of a constructor in C#? According to Microsoft (emphasis added):
Whenever a class or struct is created, its constructor is called. A class or struct may have multiple constructors that take different arguments. Constructors enable the programmer to set default values, limit instantiation, and write code that is flexible and easy to read.
That’s not a great definition, but it tells us some important things:
There can be many constructors.
Constructors may or may not have parameters.
Constructors should be used to:
set default values,
perform limited initialization, and
be simple.
In other words, constructors should do as little as possible.
Constructors should:
initialize fields and properties
check the runtime configuration and environment
fail if the object can not be set up properly
be consistent, in therms of logic (when using multiple constructors)
be thread-safe
Constructors should not:
invoke complex business logic (example)
use out parameters (example)
accept arrays, . . .
→ Read More: A practical definition of C# constructors
Posted on January 13th, 2011
I’ve been trying to find a SQL programmer/DBA to hire for nearly two months. Each qualified resume I receive gets the same technical screening email with four SQL-related questions. They are not difficult, and most mid-level candidates would be able to answer them in their own words.
“Using someone else’s words isn’t going to get you a job, or help you keep a job if you get it.”
The tip here is to always respond to a technical screening email in your own words. We all know that there are answers to every question on the internet, and we all use the internet as a resource to help solve our problems. This is fine. But when someone sends you an email with technical questions, they want to hear the responses in your own words. It’s OK to provide references to web sites, or quotes/snippets — this shows you know how to do research. But don’t pass off the whole response as your own.
In . . .
→ Read More: Tip: Don’t plagiarize when answering technical interview questions
|
|