This post originated from an RSS feed registered with .NET Buzz
by Jason Nadal.
Original Post: The Simple Things
Feed Title: Jason Nadal
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/jnadal/Rss.aspx
Feed Description: Restless C#ding
Don't you hate working on a complex problem only to stumble on something so simplistic you just feel like a dolt? Today (more like yesterday, given the early hour EST), I realized the solution to a problem I was having with a winform combobox derived class. The problem? Whenever I tried to compile in release mode, the visual representation of the control would disappear from the winform designer, and the app would not compile. As is usually the case with strange problems, the solution came while I was away from my keyboard... on the way to work.
It turns out I was referencing the exe file to get the combobox derived control in the toolbox, just to save time until I refactored it into a separate controls project. This is obviously a poor programming choice. Never put off until later what you can do today; doubly so for programming. So what was happening was as it compiled, it overwrote the exe file (or perhaps just deleted the exe file) that was referenced, the designer saw it, and removed the control from the page for me (how considerate!), which took away the ability to compile.
This is one type of post I always enjoy reading from other people. Their experiences serve to enlighten people in the art of programming, without focusing just on the “coding” aspect. For example, Julia Lerman talks about some of her experiences cold-programming WSE here.