June 2004 - Posts
Gretchen wrote about art in the workplace. I agree with her about taking that particular painting out of the recruiter's building. I want to be one of the people interviewing at Microsoft, and I'm sure I'll already be intimidated enough by it's reputation of the rigorous interview process, and the great deal of respect I have for the company in general. That painting would only add to my my intimidation.
By way of comparison, here are some works that I do and would find inspiring:
I agree with one of gretchen's commenters that meaningless blobs of color do not create a pleasant work environment. The thing I love about programming is that every day when I sit down at the computer, I feel like I can do anything at all. The world is open to me. My work is as much an artistic creation as it is a solution to a list of requirements. I am not afraid of things I don't know how to do: I greet these things with the easy confidence of someone that has no doubt about his ability to find and implement a simple and elegant solution. I chose the above images because each of them expresses that same feeling, in whole or in part.
Thanks Gretchen for the great post!
I'll place this here for the benefit of others:
I just installed Visual Studio Tools for Office, and everything seemed fine. However, when I created the first Word Template project, it couldn't find the reference to hte Microsoft.Office.Core namespace. Half an hour of searching the web and I came across a fix that worked for me: insert the Office 2003 CD into the disc drive, and select the Repair installation option. Re-open the project, and Visual Studio should be able to find the reference.
I've always wondered about this--
Why is the DoEvents() function in the System.Windows.Forms.Application namespace?
I only ask because I do a lot of console apps for testing, and I always have to add the System.Windows.Forms dll to the project so I can get the DoEvents() functionality. Not using it in my long-running loops causes great system slow-down, so I definitely need it.
Joe, in my comments section, writes:
“DoEvents should not be used in a console app. If you have a CPU-bound console app like the example you gave, you can improve responsiveness of other apps by calling System.Threading.Thread.Sleep() in your loop. A short timeout is probably enough: just to relinquish your timeslice and let other processes in.”
So, I checked out the System.Threading.Thread.Sleep() function and the intellisense gives this little blurb about it:
“Specify Zero to indicate that this thread should be suspened to allow other waiting threads to execute.”
As Joe theorized, DoEvents() is probably just a wrapper around System.Threading.Thread.Sleep().
Mystery solved. Thanks to all that replied.
Okay, that was a cheap attempt at flattery to entice you to read this post and (possibly) help ejimuk8 me. :)
I have an interesting situation which is about to turn into a huge research project for me, and I thought I'd try to gain the benefit of the combined genius of this group of bloggers.
I'm about to have to write a Windows Service to act as an interpreter between an old (30 years or so) suite of programs and a new .NET data-driven web application. This service will basically impersonate the Server component of this old system, passing messages back and forth between the old sytem and the new system.
Apparently, the old system does some crazy magic where it can be simultaneously connected to multiple applications on the same port. While I've done some socket programming, I'm not really an expert, so this sounds strange to me. I always thought, once you connect via a port, that port gets “closed” to other connections. Am I wrong here? If not, how would you set up connections in .NET so that you can have multiple connections on the same port?
This is easy, but 3 times over the last 2 years I've had to search for it, and it has taken me much longer to find it than is really appropriate. I'm blogging it so I won't forget, and so others may be informed.
That is one of the sweetest functions in the .NET framework. Not only does it return a string array with the arguments preloaded, but it intelligently splits the command string based on spaces and double-quoted characters.
app.exe test “This is a test” still testing
is returned as
“This is a test”
Sweet! What could be simpler?
(Sometimes it the smallest things that make us happy.)