Well, "fun" might be stretching it, but it's interesting, at least. As I've mentioned before
, I'm doing a lot of work with code analysis problems. Because a lot of these things are so repetitive, I've started thinking about how regular expressions might be able to help speed up my work. I've been fairly happy with the results, but the real answer is that there needs to be more refactoring support around code analysis. I'm interested in this, but doubt that I'll have enough time to dedicate to pulling a complete add-in together. If anyone else is interested in it, let me know. For the time being, I've decided to keep track of the regex for fixing code analysis warnings
I'm coming up with. In part because it might be useful if/when I decide to create an add-in, but mostly because I just want to keep track of it. As usual, I welcome any comments or suggestions for these. Anything that might make a developer's life easier.
If you haven't seen it yet, check out the domain-specific language (DSL) tools video
on Channel 9
. I admit, the video isn't all that exciting, but the capability is. The simple fact that we can now build designers so easily is astounding to me. I've never been one to care enough to learn some of the advanced graphics stuff you can do in .NET, but I've always wanted a complete model-driven architecture (MDA)
environment. This is a means to that end. I'm excited about it. I can't wait to dig in and create my own! Then again, there's always that pesky time thing...
I've been interested in solar power for quite some time. I think the idea of such a clean, seemingly limitless power source could be hugely beneficial. The fact that Google is planning on powering an entire campus
is very exciting. This is one trend I hope Microsoft and other corporations will follow.
Here's an interesting tidbit . I guess Microsoft is looking to get into the chip-making business for the Xbox. I have to admit that I don't think it's a smart idea. I can understand why Microsoft is thinking about it -- by controlling the core hardware Xbox will depend on, Microsoft will be able to focus the future of the product-line in whatever direction it sees fit. For anyone who sees this as an old school Microsoft move to use it's wide software usage to drive into hardware, I don't think you have anything to worry about. When it comes to creating the next generation gaming experience, Microsoft will need to play all the cards it can, which includes the hardware it's built on. Of course, this is assuming Microsoft can pull it off. Don't get me wrong, if anyone is capable of doing it, Microsoft is. We have some brilliant people here. My real concern is that, as a company, we haven't done the best job in the hardware arena. I admit that I don't know a lot about the financials; however, if my intel is correct, the Xbox has been a loss since it started. Granted, this has nothing to do with the product's consumer value. Xbox is and will remain to be a major contender in the gaming market. Microsoft's position is that it would rather be competing in the market and be losing than not competing at all. Besides, Microsoft has a lot of staying power, which is why it's become such a good competitor in so many areas. We'll have to see how it turns out; but I don't think we'll really hear anything for sure for another few years.
I just started working on a project that needs a lot of clean-up work done. It's one of those systems that's grown over the years and nobody has ever really gone thru and cleaned out the closets. To give you an idea, running the latest standalone copy of FxCop on the assemblies in the web app produce 12,020 messages.
When I first loaded the project in Visual Studio 2005, I tried to run the built-in code analysis feature, but didn't know where to find it. Eventually, I found out that code analysis is only available on a project-by-project basis. This means I'd have to run it on each project independantly. There's no way I was going to do that! Eventually, I found out about a macro created by Daniel Fisher that would enable code analysis for all projects (I am hoping to release this as a VS add-in in the future). Executing this and re-running code analysis is what I needed. That gave me 9320 warning messages. Of these, I noticed 50 were not code analysis messages (i.e. updated libraries, deprecated methods, and several other typical compilation warnings). Having this list was just what I wanted... well, almost. I ultimately plan on getting these items imported into Team Foundation Server as development tasks, so I needed to save this list to a file. Of course, when you run code analysis on a project, an XML file is created. Great, right? Not quite. Each project created its own XML file, so I had to dig thru the unorganized directory structure to find all of the files (actually, I just seached for all XML files with "codeanalysis" in the name). After looking at these files, tho, I noticed that they only accounted for 6932 messages -- assuming I was reading them correctly -- which, as far as I'm concerned, is a far cry from the original list.
I dug around trying to find a way to save the error list to a file to no avail. The best I could find was to simply select all of the items, copy them, and paste them in some editor to manipulate. If I have time, I will see about creating the ability to export this list to XML in that VS add-in I mentioned. For the meantime, tho, I needed another way to get the list.
I ultimately resigned myself to the standalone version of FxCop, Visual Studio's code analysis predecessor. The latest version , 1.35, was released in June 2006, 8 months after Visual Studio. This, of course, led me to see if there was a way to update Visual Studio's built-in code analysis capabilities. Unfortunately, there isn't . So, I decided to just keep it simple and stick with FxCop 1.35.
I plan on keeping my eyes open for a resolution to this issue. The best I can see for now, tho, is that we'll have to wait for the next release of Visual Studio, which I'm hoping will be available in very early 2007.
By Michael Flanakin
@ 7:40 AM
:: 1581 Views
:: Digg it!
When running code analysis from Visual Studio 2005, you receive the following error as the last item in the error list:
Additional code analysis warnings or errors cannot be displayed
By default, only 200 code analysis warnings and errors are displayed. This is done for performance reasons.
NOTE: Rumor has it that VS 2005 SP1 will fix this error; however, I have not tried that, yet.
There are two options to get around this. First, if it iyou can fix the first 200 and re-run code analysis. Obviously, if you want to see the true impact of code analysis to determine where to focus your efforts, this won't really help. So, the best option is to apply a quick and simple registry change to specify how many warnings/errors you'd like to see.
- Start > Run...
- Type regedit, click OK
- Traverse the tree and select the following item: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\EDev
- In the right pane, double click the CodeAnalysisErrorListViolationLimit and change the value to the desired number of warnings/errors to display
I'm sure everyone's heard the "if Microsoft made cars" joke, but a recent photo contest submission by Josephus to Woot definitely tops it -- ok, maybe I'm biased. Despite the third place ranking, I think it was the best out of these finalists.
For anyone who doesn't get it, Apple uses a one-button mouse for Macs. This has been widely disputed over the years, but Apple never changed anything. Actually, I heard that there was going to be a change, but I'm not sure if that has happened, yet. Either way, this is great.
And now for something completely different... I just notice two articles on Slashdot
that I thought were quite interesting. First, remnants of a "gigantic monster
were found near Norway. The 150-year old fish-like reptile find is supposed to be the most important in the past few decades. I can't speak for that, but I can say that the story is interesting. I only wish I had some pictures. If that wasn't enough, it seems as tho scientists have discovered a way to turn air into water
. Now this is very interesting. I can only start to imagine some of the ways this can be used. Better yet, where this research might lead to is even more interesting.
Here we go again... Google is doing what it does best: reaching developers. This time, by providing a code search . This is one thing that Microsoft doesn't seem to understand, which is odd when you take into consideration the fact that a developer focus is how Microsoft won the desktop OS wars. Well, maybe it wasn't a war, but more of a gradual push into a new market. Google, on the other hand, has rooted itself in the concept that, if you gain a strong-hold in the developer mindset, they will proliferate their tool usage throughout their contact list like a virus. And, it truly is like a virus (in terms of spreading, at least).
Think about how you heard about the Google search engine. I first started using it on a daily basis in 2000. I'd seen it before then, but never really thought about how much I really searched for content online. When I was re-introduced in early 2000, tho, the benefits finally sunk in. A developer showed me and what did I do? I told all of my developer buddies. Not only did I stop there, I told my friends and family. I would slowly start to convert girlfriend after girlfriend to Google. I did pretty good as a mindless bot, if you ask me
Google takes this and exploits it to the fullest. I can't say whether Google realized this in the beginning -- or even now, for that matter -- but Microsoft is still playing catch-up and just hasn't done a lot to surpass Google. Live Search is good. I admit that it isn't quite as good as Google Search sometimes, but my life after Google has been pretty satisfactory. I can honestly say that I haven't had the urge to look back once... in the text search realm, anyway. Microsoft did introduce the idea of macros to online searching, which was an attempt to reach the tech-savvy, but I don't think that capability has really reached everyone. Part of that might be due to the fact that the concepts behind search macros aren't widely known. I, for one, looked into it and lost interest fairly quickly due to a lack of documentation. I didn't know where to start and since I clicked a link out of sheer curiosity, I didn't care enough to figure it out more. Perhaps one day I'll go back and check it out, but from what I saw, it was merely a way to perform scoped searches slightly easier. Not really something I'm all that interested in, but the idea is nice. Microsoft needs more, tho. Microsoft needs a wiz-bang feature that no search engine has. I don't know that this will happen anytime soon. I have one idea, but it's so specialized, it might not be worth the efforts. I've passed it along, but don't expect to see much out of it.
We'll see where Google's new code search goes, tho. The concept isn't new, but this is the first major search engine to pick it up. I used a couple of the previous code search providers, like Krugle and Koders , but it was never something I could get into. I would only need something like that once in a blue moon. My problem with them is that you have to know the code you want to look for. If there was more documentation that would lead you to the code you wanted, then that'd be a different story. Until that day, I just don't see this being an industry-changing capability. Well, unless there was an integration into the development environment that could alert a developer that they're typing code that's been created before. Sort of a context-sensitive, auto search capability that would display similar code. That could be useful, but would require a drastic change to how development is currently done. I almost think that any such effort would be doomed from the start.
I remember seeing a bunch of sidewalk paintings a while back that were realistic. This one is even better, given the context. I wish I had a floor mat like this to lay out in any elevator. That would be the perfect prank. Imagine, you're walking to work, not paying attention to the floor of the elevator, you start to step in, look down, and grab for dear life... well, that's probably what you'd be thinking, anyway. Honestly, I don't think most people would see it until after they're in, but even those reactions would be good. I can only imagine...
Elevator with no floor?