Four years ago I was a MFC programmer for a small dev shop doing financial market applications. I needed a way to track changes to a file. This file was overwritten regularly by other process causing our app to reload portions of GUI according to the changes in that file.
Needless to say, there was no support in MFC for FindxxxChangeNotification API so I had to build my own solution. Furthermore, these (change notification) functions are blocking so I needed a separate thread for them (in order not to block the main thread). Since I already had one extra thread for similar purposes (code was mostly waiting for certain data update coming from network) I added file change related code to it. The solution worked just fine, but I had to juggle HANDLE buffers and call MsgWaitForMultipleObjects and whatnot.
Fast forward to 2004 - I am working on a hobby .NET project and have similar need. Luckily, this time I can leverage .NET base class library (BCL) and its FileSystemWatcher class:
FileSystemWatcher fsw = new FileSystemWatcher(@"C:\Temp", "*.txt");
fsw.Filter = NotifyFilters.LastWrite;
fsw.Changed +=new FileSystemEventHandler(Text_Changed);
// somewhere in your class
private void Text_Changed(Object sender, FileSystemEventArgs e) { /* ... */ }
It's amazing how simpler this code is, and I'm glad Microsoft wrote it for me. I am constantly amazed with comprehensiveness of the .NET BCL...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
This post sums it up quite nicely - I was just thinking the same thing.
I had a suggestion for Whidbey, and didn't want to post a duplicate request in case someone has submitted the same thing, so I went and checked. Sure thing, there was almost identical submission, but the suggestion was closed with "We'll add it to the Wish List for the next version".
What is "next version"? What does adding to the wish list mean? Why not put it in
now?
Looks to me there are two things going on here:
- Some people from Microsoft really want to involve the community. So they set up this feedback center and wait for the comments.
- People react immediately and post a lot. Feedback center turns to some kind of unofficial bug tracking tool. Then managers get upset about “huge“ number of open items and increase pressure to close as many as possible as fast as possible. Many bugs/suggestion get closed without proper explanation, and managers proclaim victory bragging how many items were closed in just a few days.
It's sad that a novel idea like this got ruined by poor execution.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
It's season of sales in the south of France. Most women are living in trance frantically browsing the shops for YAGP (yet another great purchase). While this may seem fun to them, for all the Real Men TM I know this is sickening. Thus in order to kill time, I decided to bring my new laptop the other day (my wife does not drive yet, so I have to go with her, at least sometimes). Finding a nice hot-spot in Nice should not be a problem - after all, a place with population of around half a million should have abundance of hot-spots.
Yeah, right. Apparently, it's still mainly for businesses - 95% of hot-spots are in hotels. I did find one situated almost perfectly close to the shopping zone (it's in the Virgin Megastore) but I was unable to buy access (shocking). Granted, my French is still poor, but I explicitly stated that I wanted to buy prepaid access to wireless Internet and not mobile phone, yet that is what sales people assumed I was looking for.
Besides, prices are a bit crazy. 10€ for 2 hours (usable inside 24h window) or 30€ for 4 hours (usable inside one month, notice how price increases faster than hours). I think I will have to repeat this small experiment in a few months...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
I just finished my first .Text skin. As should be obvious, I blatantly ripped off MSDN :) Turned out skinning was interesting, and I learned a lot about CSS.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Someone mentioned it on his/hers blog so I went to check out Codagen. I was turned off and left in less than 2 minutes - now that's what I call “great” marketing.
Some genius decided that if I want to have a look at what their product is about, I need to log in. Hello, I don't even know what your product is about and you want me to register?
It is stupid marketing practices like this that kill software development companies. If you want to do it right, at least read some introductory stuff like Eric Sink series on MSDN.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
If you like computer games - first person shooters with a twist and good graphics - I suggest you check out (not yet released) S.T.A.L.K.E.R, produced by Russian studio GSC Game World. Full name of the game is actually "S.T.A.L.K.E.R - shadow of Chernobyl", presumably because everyone knows about nuclear reactor accident in 1986. However, things get much more interesting if you are familiar with 70's SF books and movies.
In 1972, Boris and Arkady Strugatsky published excellent SF called "The Roadside Picnic", an excellent study of social implications of an alien visit, quite unlike anything you might have read from American or British science fiction. The plot revolves around a guy who is a "stalker", roaming the "zones" - places full of bizzare physics - collecting and later trading artifacts. This book is a fascinating read and highly recommended. In 1979, famous Russian director Andrei Tarkovsky made a movie "Stalker" based on this book, capturing the essence of the book in a remarkable way.
Having read the book and seen the movie, I have very high hopes for the game, and definitely recommend experiencing it all in that order - book, movie, game.
Ignore all the Chernobyl mambo-jumbo, that's just marketing speak for the masses - this game is clearly based on Strugatsky brothers' book...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5