Monday, October 13, 2008
Believe it or not, this code (snipped from something larger) compiles:
unsigned int c = ( o-----o
assert( c == (I-----I) * (I-------I) );
assert( ( o-------------o
| L \
| L \
| ! !
! ! !
o | !
L | !
L | !
o-------------o ).volume == ( o-------------o
o-------------o ).area * int(I-------------I) );
Not only does it compile, the asserts succeed. What's more, o is not some instance of a class, and neither is I. As you might imagine, there's some bizarro stuff behind this. Templates, operator overloads, ... it's all reasonably silly and impressive at the same time. Needless to say, the ! and -- operators do not "do as the ints do" in this case.
The files you need are at http://www.xs4all.nl/~weegen/eelis/tutorial.cpp and http://www.xs4all.nl/~weegen/eelis/analogliterals.hpp. There's an explanation of sorts at http://www.xs4all.nl/~weegen/eelis/analogliterals.xhtml but my IE7 refused to load it, so I saved it on my machine and renamed .xhtml to .html. To test the code I used VS 2008, made a Win32 console app and just pasted the body of Eelis' main into my generated main, and the body of the header into an empty header file. No strange settings required and no warnings on compile.
Try it yourself!
Sunday, October 12, 2008
I just love the Vista Bridge. I've spoken about it at Tech Ed, on Geekspeek, on DotNetRocks, and pretty much anywhere that will have me (and I have more planned.) Now the Windows SDK team is blogging about it. Yay! They include where to download it, how to make sure you get it when you install the SDK, and some workarounds for some bugs in the samples.
Stay tuned for more Vista Bridge info...
Saturday, October 11, 2008
Headed to the PDC this month? Is it your first? Or did you go once before but ended up feeling you somehow wasted the opportunity? A huge part of conferences is the face time. The really popular sessions will be blogged (so go to sessions on more obscure topics), there will be other ways to get some of the information (not all, so choose wisely), but no screencast can compare to chatting to people who know things you need to know, to making friends, and to seeing some of your heroes as actual human beings and learning what beer they prefer. Thomas Lewis has an intruiging Guide to the PDC that covers slightly different ground than the usual guides. An intruiging combination of how to learn the most and how to get free drinks as well.
Alas I am not staying at the Westin, but the Marriot. The good news is I have an invitation to a party at the Standard .
See you there!
Friday, October 10, 2008
Well, I already knew I was an outlier. And I knew that my number of open windows was part of that eccentricity. But just how much? According to the Engineering Windows 7 blog entry on the taskbar, pretty much everyone peaks at less than 15 open windows, and most people at less than 10:
Here's my taskbar at a typical moment:
It's routinely three high. I've never gone to four high, but I have had more open than that. 40 doesn't seem unusual to me (that's 42 there) and I can find my way around in them easily enough. I am a big-time Alt-tabber of course.
Curious how the taskbar, launch pane, start menu, and so on will be different in Windows 7? Want to understand why some features are the way they are (hint: customers are all different, except in the ways they are the same)? Read the blog!
Thursday, October 09, 2008
The Engineering 7 blog is really something. These guys are sharing a TON of information about how they decide what will and won't be in the next version of Windows, how it will work, how they will know they're done, and so on. I enjoyed this summary of UAC issues - what they learned from Vista and what they intend to do in Windows 7. Interesting points:
- Intuitively we all know the number of UAC prompts you see should go down over time, because once you have things installed and configured, you don't run the admin apps any more. But they also go down because you used to run old versions of apps that weren't UAC-aware (think Visual Studio 2005 and having to run it elevated most of the time, especially for ASP.NET work) but later you install a newer version that is aware and doesn't have to run elevated (Hello, Visual Studio 2008!)
- The number of different applications that cause UAC prompts "in the wild" is down to about one-fifth of what it was when Vista first released. That's a great success for persuading software vendors to get new versions UAC-aware.
- They plan to add information to the dialogs in Windows 7 so you will understand more clearly what you are being asked to approve.
Can't wait to get to the PDC and learn even more about what Windows 7 will have in store for us!
Wednesday, October 08, 2008
I know, I know, what could we possibly learn about C++ in 2008 by reading yet another interview with Bjarne? Well, as it turns out, I did learn some new things, so you can too. Like that the name was chosen to be short because some folks were calling C "old C" to distinguish it from "C with Classes" which was too long to say often. And after quite rightly disclaiming that "what would you do differently if you could do it over" is an unanswerable question, he answers among other things "I would have developed templates (key to C++ style generic programming) before multiple inheritance (not as major a feature as some people seem to consider it) and emphasized exceptions more." Wow! Or how about this quote:
If you look at some of the most successful C++ code, especially as related to general resource management, you tend to find that destructors are central to the design and indispensable. I suspect that the destructor will come to be seen as the most important individual contribution -- all else relies on combinations of language features and techniques in the support of a programming style or combinations of programming styles.
Another way of looking at C++'s legacy is that it made abstraction manageable and affordable in application areas where before people needed to program directly in machine terms, such as bits, bytes, words and addresses.
I do love destructors and deterministic destruction, can't deny it. The article is definitely worth a read!
Tuesday, October 07, 2008
Greg Low, Australian RD, has recorded a four-part webcast on Speaking at Large Events such as TechEd. These are full of good advice.
My advice to those who want to speak is pretty simple: start speaking. Your user group, code camps, heck start with your dog if you can't get invited anywhere. In fact, start with your dog for rehearsals even if you do get invited somewhere. Just hearing yourself get all tangled up and lost 5 minutes into the talk will impress upon you the need to have an outline and a plan, to rehearse, and not to try to memorize every sentence. Every time you give a talk you will get better, and every time you hear one you will get better, so go to things. A lot of things.
Greg covers some nice practical details that I won't repeat - watch his videos!
Monday, October 06, 2008
© Copyright 2021 Kate Gregory
Theme design by Bryan Bell
newtelligence dasBlog 2.3.9074.18820
| Page rendered at Tuesday, January 19, 2021 3:15:06 AM (Eastern Standard Time, UTC-05:00)
On this page....
Pluralsight Free Trial
Click Start a FREE 10-Day trial