I got this nice pullover sweatshirt that I can wear when I'm bike riding in the chilly mornings, and it has a handy little sunglasses holder on the front, along with a big tag making sure you don't miss said holder:
What's this? A little loop of fabric is patented? Why yes, number 5,584,074[^] in fact.
So a couple inches of fabric and some stitches that do this with my sunglasses:
warrant patent protection?
I especially like claim number 1(b):
a first of said ends being attached to said shirt at said seam at a first point, and a second of said ends being attached to said shirt at said seam at a second point spaced a predetermined distance which is less than said strip length along said seam from said first point, which said predetermined distance defines substantially the widest width of said loop means.
So, whilst doing some actual work with VC 7 over the past weeks, I've come up with two new things I hate. Second is the resource editor. First is what I'll be bitching aboutcommenting on here: solutions.
"Solution"... ick. I haven't encountered solutions since my high school chemistry class. Let the marketdroids play with Windows and Office and the other stuff that has to appeal to non-techy people. They can talk about Office 20XX being "the solution" for whoever's troubles. But keep marketing-speak out of my IDE, for two reasons. 1) It's a horrible replacement for the old term "workspace", and 2) I feel like I'm a marketdroid when I say "solution" to someone else. :shiver:
But if it were just as bad as having to do a mental s/solution/workspace/g during my day, it wouldn't be hateful. The real offender is the new project system. I already stumbled over this back in my early days of using VC 7 (read about it here[^]). The way it works is:
A solution contains a number of projects
A project contains a number of configurations
A solution configuration is a list of projects and project configurations
This is, by itself, not bad, aside from the overloaded use of "configuration." However, it gets better:
At any point, there is a current solution configuration
At any point, there is a "StartUp Project"
You select the current solution configuration using the combobox in the Standard toolbar. This is the list of projects and build targets that gets built when you hit F7. The StartUp project is the project that gets run (and built, if necessary) when you hit F5.
Where it gets hateful is that while the preset solution configurations and the preset project configurations have the same names, they are not the same things. You could set the MyApp Debug solution configuration to build MyStaticLib|ReleaseMinSize and MyApp|DebugUnicode if you wanted to. And with the similar names, it's easy to misunderstand the purposes of the Project|Project Dependencies and Build|Configuration Manager dialogs.
So, assuming that you've correctly processed how the solution/project configs work, you're in for more fun if you have multiple binaries in your solution. To change which one gets debugged by F5, you have to set one as the StartUp project. How do you do this? A simple combo box like the solution config? Hah hah, of course not, foolish mortal. You have to go to the Solution Explorer pane (aka FileView from VC 6), scroll around and/or collapse tree branches until you find the node for the right project, right-click it, and pick Set as StartUp Project. Simple! And how do you know if you have the right project set as the StartUp project? Again, you have to scroll around in the Solution Explorer pane and look for the one node whose text is bold. That's the only way VC indicates what F5 will do.
Those two things, in combination, replace the simple and obvious "current project" notion in VC 6. What does F7 build? Your current project. What does F5 run? Your current project.
This is yet another concept relating to projects/solutions that is almost, but not quite, completely unlike the others. Result: much confusion.
The whole configuration/solution/project thing becomes actually useful when your projects no longer have one-to-one dependency, but are like "Debug OEM build with feature X", "Debug Retail build with library Y" etc. and you need to have precise control with which lib, option etc, the whole thing is linked.
I agree that the way MS exposed these settings is somewhat cumbersome though.
Sometimes I use "Batch build" to setup quick and dirty build sequence. It (exposed via toolbar icon or shortcut) works quite well when I need to rebuild some projects and do not want to mess with configurations.
What I am missing though is "build startup project", I presume there might be some obscure thing to do this (like writing a macro in VB ), but I never needed to venture so far.
From your s/solution/workspace/g remark I assume you are using "The Editor" , if this is the case, do you, by any chance, know, if there is some support/tool/script that allows invoking MSDN on <cword>? I found some undocumented COM interface for MSDN Help 2 engine, but using this will need to write some sort of COM out proc server wrapper, which I want to avoid.
In this post, I'll list the worst "features" VC 7 has foisted on me. If anyone knows how to fix/workaround anything I mention here, please respond. You will be making my life easier, and I will send you cookies. The IDE looks like VB
There, I've said it. Now that that's out of the way...
No way to turn off the whacky toolbars/menus
In VC 7 the toolbars are all flat (I have a distaste for flat UI elements in general, but that's for another rant...) and the colors don't obey your system settings. Hooray for following the user's preferences!
Plus, when you mouse over a toolbar or menu item, the icon hops up and down to say "hey! look at me! I'm 3-D!" I care about none of this. Fluff like that belongs in apps you sell to non-techy users like Office, or media players where a "hook" is necessary to distinguish yourself from the competition, or in Longhorn. Having weirdly-colored hopping UI elements is basically MS showing off how many graphic designers they have. I want to turn it off like I could in VC 6.
The MSDN viewer is hateful
This also has the "we're showing-off our GDI-fu" UI. But what's really hateful is the awful keyboard navigation. I do as much as I can with the keyboard. Using the new MSDN viewer with the keyboard is horribly broken and complicated.
First off, there are the hateful keyboard shorcuts - what kind of "shortcut" is Ctrl+Alt+F2?
And second, the mnemonics don't work. In the VC 6 viewer, if I'm reading a page and want to set the focus to the Index tab, I hit Alt+N and it works. In the VC 7 viewer, if I'm reading a page and I want to set focus to the Index, I can hit Ctrl+Alt+F2 (which is too hard for me to hit easily) or... well, nothing else. The Index page has a label that reads Look for: however hitting Alt+L does nothing but beep at me.
VC 7 failed miserably in converting VC 6 projects
At work we use VSS, and our code base has about 15 different VC projects, built in various ways. I took on the work of converting these to VC 7 and hit various walls along the way, including:
VC 7 didn't preserve some settings like "what kind of CRT to use"
VC 7 couldn't keep its own source control settings straight. In one dialog it would act like VSS wasn't installed, yet in the options dialog it clearly said VSS was installed.
During the project conversion, the above VSS problems resulted in a totally incomprehensible dialog, which I think was asking me to tell it where some projects were in the repository. Unfortunately, the dialog was pre-filled with the right locations so I didn't know what else I could do to make it find the projects.
Due to all those problems I gave up and rebuilt the projects manually.
F4 behavior changed for the worse
When you are moving through a list of build errors, you still hit F4/Shift+F4, however the caret now stays in the Output window. You have to hit Enter to move the caret to the text editor. This is dumb since, as far as I know, you cannot change code from the Output window.
Also, (Shift+)F4 only applies to the Output window. If you want to move thru Find in Files results with the keyboard, tough luck.
VC 7 removed the ability to bind "open this include" to a key
And I have no idea why. Ctrl+Shift+G worked perfectly fine in VC 6.
Incremental search annoys me
Incremental search, which I use all the time can be case-sensitive. In VC 6, when it was in case-sensitive mode, the status bar indicated this, and you could hit Ctrl+C to toggle case-sensitivity off.
In VC 7, it still can be case-sensitive, however there is no indication that case-sensitivity is on, and you can't toggle it with Ctrl+C.
As if that isn't bad enough, when you do a Find in Files and turn case-sensitivity on there, that also sets the case-sensitivity mode for incremental search. This one problem had me convinced that incremental search was broken (maybe it didn't wrap around a file?) until I happened to make the connection in my mind.
And what's even worse, if you hit Ctrl+F for the regular find, the case-sensitive checkbox is unchecked, which makes incremental search case-insensitive again.
The Properties window in the resource editor has this one annoying behavior
Double-clicking an item changes the value, which I find mystifying. Now I can't select, say the control ID field ("IDC_ABOUTBOX") by double-clicking the text, because that changes the ID to whatever is next alphabetically, I guess.That's all for this rant... this is just the stuff that annoys the hell out of me on a daily basis, I have more to come.
What about not being able to close a source file tab by double-clicking it or wheel-clicking it, like any decent tabbed application (Mozilla, UltraEdit, Visual C++ with WndTabs)? Or have I miss anything?
Michael Dunn wrote: The IDE looks like VB
There, I've said it. Now that that's out of the way...
It does grown on your after a while. Or maybe it just brain-washes the user
Michael Dunn wrote: The MSDN viewer is hateful
Don't get me started about Dynamic Help. You close the window, it comes back again. You try and turn it off from the options, it still comes back. I wouldn't mind but it never shows any useful help anyway.
Michael Dunn wrote: F4 behavior changed for the worse
Amen. After using VS.NET for all this time, this is the one thiing that annoys me more than anything else.
If I've been in a pissy (pissier?) mood lately, it's because I've been forced to use Microsoft Visual Studio .Net 2003 (or VC 7.1 or just VC7 for short).
Longtime readers will know that I've been pretty sour on VC7 ever since trying out a beta of 2002. I believe the "He-Man VS.Net IDE Haters Club" came up a couple of times. I was initially repulsed by the IDE (which is a pretty common reaction), and the buggyness of 2002 kept me away. And all kidding aside, VC 6 + WndTabs[^] is so bloody good of an IDE that I had zero reason to change. Didn't care about .net, didn't care about working templates, didn't want a VB-ized IDE.
So anyway, fast-forward to 2004. At work[^] we use a static lib provided by the WMP team. Prior to 2004, we had a lib built with VC 6, and all was fine. Then a couple months ago, we got a new lib from them that was built with (you guessed it) VC7. argh
So we could no longer build our stuff with VC 6. It was VC 7 or nothing, and since our company wants to stay in business, "nothing" was quickly ruled out as an option. Now that I've actually used it for production code, I can form opinions more detailed than "the IDE sucks". I have opinions, and I will be presenting them here. Not just to bitch, but to seek solutions to what I perceive as bad problems with VC 7. I guess I could use the VS.NET IDE issues[^] forum, but what I have really aren't questions, and a blog is really the better place for ranting/venting/griping/bitching anyway.
PS: I totally understand why the new WMP lib was built with VC7. Doesn't mean I have to like it.
Women reading this: NEVER CUT YOUR HAIR! I don't care how good you think you will look. Don't do it. Trimming a couple inches off the ends is fine. Chopping it off so you look like a frumpy mother is not.
Michael Dunn wrote: Women reading this: NEVER CUT YOUR HAIR!
Got to disagree. I love women with short hair. And Alyson look mighty fine in that photo. I think the new hairstyle suits her. She'd been looking a little ropey in the last few times I saw her, but now she's back to near her best.
I was driving to work this morning and in front of me was a car that had those silly spinning hubcap things. That wouldn't be noteworthy except the car was a Toyota Camry. Not a low-rider, not a tricked-out car or anything. Just a plain, stock Camry. Not lowered, no detailing, not even a license plate frame with a catchy saying on it.
After posting about my bike ride[^] this morning, some folks responded and asked where I went, so I figured I'd make a blog out of it. I don't usually post about personal stuff here, because I figure no one really cares, but since y'all asked...
I bought myself a bike a few weeks ago. I've had some bad luck with it, as the first time I went riding the back tire got f'ed up (turned out to be defective), and then the next time I went out I ended up getting sick and laid up for a week. But I've gone 2 weeks without a mishap now.
I live in Mar Vista, which is next door to Venice and Marina Del Rey. Basically it's on the border of rich neighborhoods that I could never afford to live in. The nice thing is that it's near the beach, and there's a bike path that runs along the beach for 20 miles or so.
What I've been doing is picking up the bike path in Marina Del Rey and riding south to this bridge that's over this river that's used for rowing/kayaking events by nearby colleges. It seems like a good distance for me because I can ride there, rest for a few minutes, and ride back home, all in about 1 hour.
Since I'm just starting out with regular riding, I'm doing that 2 days a week (Tuesday and Thursday). I get up at 6 (not hard to do since it's already light), eat and stretch and I'm out by 6:30.
On Saturdays I'll ride a bit farther. Today I took the path north (opposite direction from the bridge) through Venice and Santa Monica. This isn't quite as nice because there are always idiots walking on the bike path, but whatever. Once I get past the Santa Monica Pier, the path is less crowded and it's a nicer ride. This morning I was there at about 9:30 and the marine layer was still around, so the water looked really nice.
That path is really the only place I ride. I have a road bike, and I'm in no shape to tackle mountains yet, so I'll keep up that routine until I start feeling better. I rode on the path when I was in college, and I could do the whole trip down to Redondo and back in about 3.5 hours. Give me a few months and I might be doing those trips again on the weekends.
For those not familiar, the US TV season runs from roughly September to May. There are three month-long periods in there - November, February, and May - called "sweeps" periods, during which all the stations run their best shows (eg season finales in May) and basically do anything to improve their ratings. This is done because the ratings that a show/station gets during a sweeps period are used to determine advertising rates for the following months. Higher ratings == more people watching == higher ad rates.
Unfortunately, this system creates a dead zone between Thanksgiving and Feb 1, during which you might get the occasional holiday-themed new episode, but most of the time it's reruns. I can deal with this, it's the holiday season and I'm usually not concerned with watching TV anyway during that time.
Summer used to be all reruns, all the time. This was all well and good since you could catch reruns of shows you liked, but not sweat things if you missed a show. Then, networks got the rather good idea of premiering new shows in the summer to see if they would catch on. Sometimes a gem popped up like The O.C. (well, I don't watch it but it's popular, so I'll go with that one as the example since it's the most recent summer success). Other times, shows that were popular (but not popular enough to make the normal schedule) were aired, such as The Amazing Race or Dog Eat Dog.
But now, summer has turned into a wasteland of horrible "reality" shows, and not just from Fox. NBC is on the bandwagon with its Bachelor ripoffs. What's worse is that the reality TV craze has drifted into "but there's a surprise!" territory and many shows are about making the contestants look foolish. Witness WB's Superstar USA (they let the bad singers advance, kick off the good ones). It's not enough to show unscripted or semi-scripted action with non-actors, noooo now we have to humiliate them for the viewers to get their jollies.
So, what am I going to watch today? Well, if there's ever a rerun of Las Vegas I'll watch that. Not sure if Dog Eat Dog is coming back, but if it is, I'm all over it. Otherwise, I'm counting the days until The Amazing Race 5 starts, the only show I'm really looking forward to this summer.
Side note: Phil Koeghan has like the ultimate dream job. Fly to various cities around the world, narrate introductions, and greet the arriving contestants. See the sights of the world on CBS's tab!
A huge (600+ pages) and extremely well-written history of the video game industry, starting in the pre-Pong era and ending in 2000. It's a great read and literally hard to put down. If you were around for the initial 80's boom but weren't keeping up with the politics and flying lawsuits (for example, Nintendo vs. Universal over Donkey Kong being too close to King Kong) this book will be especially enlightening. If you're a youngun' who has never had a computer slower than 300 MHz, well...
Getting a little more modern, this is a long article on probably the second-biggest modern game debacle (Duke Nukem Forever being #1), documenting the beginning of Ion Storm and what the game went through during the years of development.
Or, How to Make Your Audience Feel Old in Ten Easy PowerPoint Slides.
A couple days ago at work the dev team and some management had a long meeting with some Longhorn evangelists from MS. The evangelists' job is basically to get other companies to write software for Longhorn to be ready for launch. It's the equivalent of, say, Sony going to video game companies to get them to write launch titles for the next PlayStation.
This isn't a Longhorn post though, it's a historical post. At the beginning of the presentation, the first evangelical speaker went through a "ten years ago" section. He listed the goals MS had ten years ago with Windows 95. The biggies were run on affordable hardware (meaning 386s), run Win16 and DOS programs, and the ultimate goal, "A PC on every desk".
Now, aside form thinking "damn I'm old, I remember all that", I got to thinking that was a pretty remarkable feat to get a Win32 OS, with memory protection (even if it was only for 32 bit code), device drivers, VxDs, DOS compatibility, long filenames on FAT, and so on and so on... get all that running on a 386 machine that had less RAM than your current hard drive's cache.
My first PC was a P120 with 24 MB and man did Win 95 fly on that thing.
I've been sitting on this release for quite a while because I haven't wanted to update the SearchBar article to describe the new features. I've gotten burned out on writing, as evidenced by the 8 months since my last article[^]
I just remembered that I have this blog thingy and I can put up pre-release stuff for anyone who wants to see the new features and happens to read this.
The big new feature is a signature manager. I know there are already a few of those, however AFAICT they all require you to have VC 7.x installed because they use a DLL that comes with VC. Since I don't use VC 7 (I actually installed it at home a couple weeks ago [but that's for another entry]) and since I'm a native code guy, I wanted to have a normal C++ signature tool.
The good news is that I use an XML file in the same format as the existing sig managers, so if you use another one, you can import your sigs into the SearchBar.
With the recent Ad Banner SnafuTM I thought I'd do a little historical post.
Some time ago (a couple years at least), a lot more HTML was allowed in posts, including script. Some people used this to do neat sigs, like David Wulff with the anger/humor/sincerity scales. But of course, some a-holes always have to ruin it for everyone and exploit it.
That's what happened here. Someone made an account and put some script in the signature. The script changed the properties of the ad banners to point to their own banners, which were (naturally) for some adult chat site. When you viewed one of their posts, the HTML in the sig was parsed and the script ran, which switched the banners.
After that happened, Chris tightened up the restrictions on what tags are allowed in posts.
It's 2 AM and due to this stupid cold, I can't sleep. Since I've been stuck at home the past couple of days, I've gotten some time to play one of my all-time favorite games (thanks to MAME): Block Out[^], a Tetris-style game viewed from overhead. It's intensely challenging once you get to level 15 or so. Of course, being sick has dulled my 3D spatial recognition skillz a bit...
The first was Most Recently Used List in a Combobox[^] and to give you an idea of how old it is, the screen shot shows that I had Win 98 installed into "C:\chicago". ("Chicago" was the MS codename for Windows 95 and I often installed the OS into "C:\chicago" for testing; putting the OS in a directory with a name different from the default is a good thing to do when you're in QA.)
I haven't read the article... I don't want to see how bad my writing style was back then.
It was a running joke. A while ago (on the order of years) there was a Lounge thread about The MSDN Show[^] (now The .Net Show) and Erica Wiechers, who is on the show for a couple of segments. Being guys, we naturally started talking about her good looks. (This was back when Lounge traffic was much less than it is now, so the thread hung around for a while.)
The next month, when the new show came out, I posted a screen cap of Erica, again so we could talk about her good looks. Some else did it the following month, and then I had an idea. Some people keep a "sighist", a history of their funny or witty signatures. So I made the Ericahist, a history of Erica's outfits from various shows.
As for blogs, I started with Raymond Chen's[^] (which was great at the beginning, he talked about historical stuff in OS development; still good now because he doesn't talk about much .NET stuff, which is refreshing), then gradually found other MS bloggers that were interesting. Here's an OPML file of my current reading list (not all the blogs are very active).
Other good blogs are Eric Lippert[^], Larry Osterman[^], and Sara Ford[^]
(Before you ask, Erica does not have a blog AFAIK; Robert Hess posts occasionally on the .NET Show blog[^] though.)
BTW, I use SharpReader as my aggregator. I went through a couple of others but didn't like them, finally I tried SharpReader and it fits my needs well enough. I'm too lazy to keep going and find That One Perfect Aggregator.
There are two schools of thought. The MS view is that they trust installers to never mess up someone's system so the exact correct versions of all DLLs will always be present; as a result you can always link to the CRT DLLs and get several benefits, most notably less physical memory usage due to the DLL being shared among processes, and fewer heaps in each process.
My view, as a programmer in the real world (not MS's world where they control everything) is that people's systems (especially 9x) get munged by bad installers or other accidents. If someone has a wrong/missing/corrupted DLL, it can cause my app to crash or misbehave, and guess who gets blamed for that? Me, not MS. Guess who loses sales because of it? Me, not MS.
Therefore I always use the static LIB version of the CRT in every one of my apps. If I lose any sales due to bugs, I can at least say it was my fault, not the system's.
I was listening to the news on the radio whilst driving home tonight, and the girl reading the news did a list of "this day in history" items. One of them was in 1992, the Rodney King riots started.
I almost drove off the road when I realized that was twelve years ago. I can remember it like yesterday, I was on campus at UCLA working in one of the computer labs when I first heard about the riots starting. The following days were pretty bad and the air smelled like smoke due to all the idiots setting stuff on fire.
In short, if the cursor is over something that implements the accessibility interface then you can read its name and value properties using an accessibility API, AccessibleObjectFromPoint(). Try out the sample code in the entry, it's neat.
Note: I've copied this post here from its original location[^] to give it (hopefully) better visibility.Buffer overruns are possible because on x86 there are not separate categories of "readable memory" and "executable memory". If a block of memory has one permission, it has the other. They also work because a thread's local variables and return addresses are in the same area of memory, its stack.
Here's a typical stack with the default size of 1 MB, after one function call. Note how the stack grows down from high addresses towards low addresses.
| | | 40AE |
^ top of stack
That indicates that when the current function returns, control resumes at address 0x40AE. Now after a few calls, the stack will have a few layers of that:
| | | 4E33 | | 4AD1 | | 4F10 |
^ top of stack
Now lets say the current function declares a char array as its only local variable. That array is denoted by asterisks:
| <unused>|<vars> |<retaddr>| ...
| |**********| 4E33 |
^ top of stack
If the function blindly strcpy's an input string (from say, the network) into that buffer, without checking the length of the source string, it will write past the end of the array, over the return address. The copied bytes are denoted by $:
| <unused>|<vars> |<retaddr>|
| |$$$$$$$$$$$$$$$$$$$$$$$ ...
^ top of stack
All a hacker has to do is figure out what to use as the $$$ to change the overwritten return address to be an address within the $$$ itself. Since the $$$ is the malicious data, the hacker has control over it.
0 7AE1 100000
| <unused>|<vars> |<retaddr>| |
| |$$$$$$$$$$| 7AE1 $$$$$$$$$$$$$ ... |
^ top of stack
When the function returns, the thread reads its return value, which has been changed to point to within the $$$. Now the hacker has made the thread execute memory that he planted in the stack. If that thread happens to be running in a powerful account (like Admin or Local Service), bingo, your box is 0wn3d.