Contents tagged with English
-
IntelliTrace Causing Slow WPF Debugging in Visual Studio 2010
Just a quick note to myself (and others that may stumble across this blog entry via a web search): If a WPF application is running slow inside the debugger of Visual Studio 2010, but perfectly fine without a debugger (e.g. by hitting Ctrl-F5), then the reason may be Intellitrace.
In my case switching off Intellitrace (only available in the Ultimate Edition of Visual Studio 2010) helped gitting rid of the sluggish behavior of a DataGrid. In the “Tools” menu select “Options”, on the Options dialog click “Intellitrace” and then uncheck “Enable Intellitrace”.
Note that I do not have access to Visual Studio 2012 at the time of this writing, thus I cannot make a statement about its debugging behavior.
-
Recommended: IntelliCommand for Visual Studio 2010/2012
The Morning Brew is a great news source for developers for many years now. In a recent post it mentioned an extension for Visual Studio 2010 and 2012 called IntelliCommand that implements something that I had wanted for quite some time: A dynamic help for hotkeys.
IntelliCommand shows a popup
- when you press and hold Ctrl, Shift or Alt (or combinations thereof) for a configurable amount of time, or
- after you press the first key combination of a chord shortcut key (e.g. Ctrl-E) and wait for an (independently configurable) amount of time.
In the following screenshot I pressed and released Ctrl-E, and after a short delay the popup appeared:
The extension is available in the Visual Studio Gallery, so finding, downloading and installing it via the Extension Manager is extremely simple:
The default delays (2000 / 1600 milliseconds) are a bit long for my liking, but this can be changed in Tools – Options:
So far things are working great on my machine. Some known issues do seem to exist, though (e.g. that the extension doesn’t work on non-EN versions of Visual Studio). See the author’s comments in the announcement blog post and in the Visual Studio Gallery for more information.
-
Html Agility Pack for Reading “Real World” HTML
In an ideal world, all data you need from the web would be available via well-designed services. In the real world you sometimes have to scrape the data off a web page. Ugly, dirty – but if you really want that data, you have no choice.
Just don’t write (yet another) HTML parser.
I stumbled across the Html Agility Pack (HAP) a long time ago, but just now had the need for a robust way to read HTML.
A quote from the website:
This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT (you actually don't HAVE to understand XPATH nor XSLT to use it, don't worry...). It is a .NET code library that allows you to parse "out of the web" HTML files. The parser is very tolerant with "real world" malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams).
Using the HAP was a simple matter of getting the Nuget package, taking a look at the example and dusting off some of my XPath knowledge from years ago.
The documentation on the Codeplex site is non-existing, but if you’ve queried a DOM or used XPath or XSLT before you shouldn’t have problems finding your way around using Intellisense (ReSharper tip: Press Ctrl+Shift+F1 on class members for reading the full doc comments).
-
Visual Studio 11 Design Changes – What, Really?
The Visual Studio Team has blogged about the “broad reaching experience improvements” in Visual Studio and the comments section is exploding.
The topics that generate the most negative reactions are:
1. Reduction of colors of the “chrome” of the UI
Many people find it “depressing” while I kind of like it. I think that, together with a reduced amount of lines, this is a good step in the right direction.
Unfortunately, at some point this quest for reducing distractions went overboard, which leads me to the second point:
2. Removal of any colors from all icons
This is a major problem in my opinion, and judging from the comments I don’t seem to be the only one to have a problem with that.
When reading in the original blog post (quote) …
While we understand that opinions on this new style of iconography may vary, an icon recognition study conducted with 76 participants, 40 existing and 36 new VS users, showed no negative effect in icon recognition rates for either group due to the glyph style transition.
… I’m having a hard time believing the tests did measure the right thing in a realistic scenario.Up to Visual Studio 2010, there are two kinds of icons:
- Icons I find/recognize even in the corner of my eye, without staring directly at it. I can quickly glance at the toolbar and find “that mostly green thingy” or understand that “this one’s about creating something new, I recognize the yellow flash in the upper left corner”
- Icons that try really hard to convey some concept but fail because there are simple too few pixels.
The icons in the new UI now
- Take away one important information that really helped the icons in the first group, and
- make it even harder for the icons of the second group
I’m already using a tool with almost monochromatic icons: Expression Blend. And while there are other reasons why I haven’t used it as much in the past as I should have, one thing I notice over and over again is that I have too look much harder to find a specific icon.
3. SCREAMING CAPS FOR THE TOOL WINDOW HEADERS
This is ugly, plain ugly. In the example screenshot, the title of the Solution Explorer window at first sight looks like a dark grey rectangle. That’s what your eye does when scanning something like “SOLUTION EXPLORER”.
In addition to this, ALL CAPS texts is wider, thus taking valuable screen space.
Final thoughts
I’m really excited about the upcoming Visual Studio and it’s features, but I’m not convinced by the presentation as of now.
It’s a fact that users quickly scan UIs for interesting bits instead of carefully reading texts and deciphering complex icons. Is the idea behind the new UI to force users to slow down by removing clues (the shape of text in the tool window titles being reduced to one or more large rectangles, icons being mostly a rectangle with some “dirt” in one of the corners)? I hope not.
- Icons I find/recognize even in the corner of my eye, without staring directly at it. I can quickly glance at the toolbar and find “that mostly green thingy” or understand that “this one’s about creating something new, I recognize the yellow flash in the upper left corner”
-
Welcome 2012
Things that happened in 2011
- MIX11 was a good conference, but not as great as MIX11. I blogged about
- The BUILD conference (here’s my short recap) at first did a good job at exciting me about the things to come. But then too many “oh, wait a minute, so you’re saying …” moments hit me.
- On both conferences Microsoft didn’t do much to prevent Silverlight from being labeled as “dead”. It’s a sad fact that we’re living in a world where reality is reduced to 140 characters or less. It’s just “good vs. evil”, “win vs. fail”, “the past vs. the future”.
There was one sentence near the end of the “Standards-based web, plug-ins and Silverlight” blog post in April that did say the right thing: “HTML5 is a solution for many scenarios, but developers should make the appropriate choice based on application needs”. But the mismanaged communication by Microsoft, obviously caused by political in-fighting, puts this pragmatic “use the right tool for the right scenario” approach at risk. Why was Silverlight RC5 announced one week before BUILD? Why wasn’t the 10 year support guarantee communicated at BUILD (even if without a specific date)?
Other companies would have entered the stage with a loud and clear voice, telling everybody “Look at us, we’re the greatest development company in the world, we offer X and Y and Z.” – without showing the infamously silly architecture diagram.
- On a more positive note: The dotnet Cologne 2011, the conference organized by the .NET user group Köln and my own group Bonn-to-Code.Net became the largest .NET community conference in Germany with almost 330 attendees.
Things that I have learned/observed/noticed in 2011
- I learned that I’m not the only one to have the growing feeling of “less participation, more consumption” in the (local) .NET community.
A discussion at the .NET Open Space 2011 in Karlsruhe brought up the word “consumity”. In Bonn, despite the success of the dotnet Cologne conferences, the core audience has remained virtually unchanged over the years; the majority is “cherry picking” specific topics and finding speakers from within the group is tough.
- I (again) couldn’t decide on a new smartphone to replace my vintage XDA Neo. After comparing Android, Windows Phone and iOS, I was ready to buy an iPhone (for its available software), but the 4S kept the design of the iPhone 4 which (in my humble opinion) is cool to look at, but doesn’t feel good in my hand. So one more year of being the only guy without a “real” smartphone. On the other hand my track record of waiting for a certain point in time to buy a piece of technology hasn’t been too bad.
- I finally made the jump from Paint Shop Pro to Photoshop. Being a PSP user since 4.x, the transition – especially un-learning certain key strokes – wasn’t easy and there are still situations where I’d be faster in PSP. But of course I also gained a lot from the transition. And learning something different and trying to soak up a different philosophy from time to time isn’t a bad thing, either.
Things I’m looking forward to in 2012
- The dotnet Cologne 2012 on May 4th. We’ll be able to keep many sponsors from last year, but we’re also looking for new sponsors. Just drop me a line via the “Contact” link and we’ll send you our information on sponsorship opportunities.
- A new version of Visual Studio, which I suspect/hope to be more of a “Visual Studio 2010 R2” than something completely new.
- Using async/await in C# in an RTM, i.e. non-CTP environment.
- Continuing my personal path from being a software developer with an interest in GUIs to becoming a UI/UX expert.
-
Emaroo 1.2.1 Released
Emaroo is a free utility for browsing most recently used (MRU) file lists of
multiple applications. Quickly open files, jump to their folder in Windows Explorer, copy their path - all with just a few keystrokes or mouse clicks.This bugfix release has been sitting on my hard drive for quite some time now, but it’s only now that I’ve finally gotten around to do the “release dance” (write the ReadMe, update the website, test the downloads etc.).
The most visible fix is that right-clicking a list item will now select it before opening the context menu.
Download and more information
Please visit the Emaroo website at www.roland-weigelt.de/emaroo
-
Looking Back at BUILD
BUILD, the “everything is secret”, “no information until September” conference is over and I’m back at home. Time for a personal look back.
The Announcements
Others have already done the job of writing a full roundup (here is one of the many), so I will give you only the the short version from a developer’s perspective:
- Windows 8 offers a new kind of applications with a new UI (“Metro”), running on top of the new Windows Runtime (“WinRT”).
- WinRT was developed with an emphasis on performance, both real (it is written in native code) and perceived (all API calls taking longer than 50ms are designed to be called asynchronously).
- “Metro style apps” can be developed in C++, C# or JavaScript
- C++ and C# applications use a XAML based UI technology, similar to Silverlight, but with higher performance and built-in touch support.
- JavaScript applications use HTML5 and CSS for their UIs.
- Windows 8 still allows “classic” desktop applications, developing these is not different from developing for Windows 7.
The bottom line: A wide range of developers will feel at home writing Metro style applications. That wasn’t all that clear after the messages from the unveiling of Windows 8 at the D9 conference in June, where it was all about HTML5 and JavaScript – which made many .NET developers mad. And shutting down all channels of information until September didn’t really help making the situation any better.
Was the intended effect of unveiling of WinRT as a surprise (i.e. “pulling an Apple”) really worth yet another Microsoft PR disaster? In a world where perception often is as important as reality, Microsoft PR really should put a bit more thought into what is said publicly and how people could react to it.
What about Silverlight?
The future of Silverlight after the release of version 5 later this year remains unclear. Sure, Silverlight applications won’t magically stop working in e.g. Windows 7. And it could be that Silverlight 5 is “good enough” for years to come. But there’s already the hint of a limited life time inside the Windows 8 Metro UI with its plugin-less Internet Explorer (the desktop version will allow Silverlight to run, though).
For business applications, an area where Silverlight really shines (forgive the pun), Metro style applications are not an alternative yet. Currently all Metro style apps will have to go through Microsoft’s app store, which in many situations simply isn’t acceptable. At some point in the future Microsoft will have to offer a solution for business applications with some kind of private app store, similar to what Apple already has.
The Sessions
As I’m very interested in UI/UX, I attended the user experience sessions regarding the design principles behind the Metro UI, which I enjoyed very much. I can highly recommend this and this session.
The technical sessions on the other hand were a mixed bag. Some of the “I’ll show you how to build X” talks that I saw were rather light on content, with the title promising more depth than was actually shown. There’s nothing wrong with introductory content, but the usual labeling of sessions from “level 100” to “level 400” was sorely missing. And please refrain from the term “deep dive” if your session merely gets people’s toes wet.
Not publishing the agenda before the conference prevented people from planning their personal schedule e.g in an online application, which in turn meant that Microsoft had no data for planning the required session rooms. The result: too many sessions ended up in rooms that were way too small and many people could not see the sessions they wanted. Unlike earlier PDCs, BUILD did not offer any overflow rooms.
Sure, the sessions were available on video the next day, but an important reason for attending a session in person is to be able to discuss the topics with other people afterwards.
The Location
The Anaheim Convention Center is a very typical conference location (i.e. at some point they all look the same). And because of that, two very typical problems came up:
- The chairs are designed for skinny female super models, not laptop-wielding IT guys
- The air condition is just too much for a European like me.
The handling of many thousand people is something that “just works” at developer conferences in the US (at least at the ones I have been to in the last 13 years). Congratulations to the BUILD organizers and their staff for having done a good job at directing the masses when giving out the slates, feeding the hungry and keeping the fridges full of soft drinks at all times
.
The Slate
As mentioned above, attendees received a slate PC with a preview build of Windows 8. The machine is not actually an iPad killer, but this giveaway is not about providing people with a free toy to play around. This is a developer machine for giving attendees the opportunity to develop and test Windows 8 applications.
The slate has an Intel x86 processor and is able to run “classic” Windows apps. This makes the machine run hot (it has a fan) and, I guess, also heavy. Things will look different on an ARM CPU, but it remains to be seen whether anybody will be able to come near Apple’s iPad from a hardware point of view.
My Personal Takeaways
The following list is by no means complete:
- I’m impressed by the work on performance in Windows 8.
- WinRT is a major step forward in many ways.
- We’re in a transition period which will take many years.
- The ongoing work on C# is impressive. I really like how Anders Hejlsberg and his team approaches things, thinks about the consequences and continuously improves the language and its compiler.
- Microsoft really gets the importance of good UX. This does not necessarily translate into great UX in Metro, though, which at some points doesn’t feel quite natural yet. But they are heading in the right direction.
- I’m disappointed by the lack of communication regarding Silverlight.
- My development skills in C# and XAML will be still valuable in the future.
- My skepticism towards “HTML5 + JS + CSS” (disclaimer: I have written large amounts of JavaScript in my life) wasn’t helped by the fact that one problem during a demo was caused by a simple typo that a compiler would have caught.
- During the Ask the Experts I learned that the common Metro controls are actually not a fine example for the power of HTML5. Many calls to WinRT are necessary behind the scenes to achieve the performance or fully support touch. I don’t have a problem with that, people just shouldn’t look at the UI and think “who needs anything else besides HTML5, JS”.
- I really like the concepts for interoperability between applications e.g. via contracts.
- The pooled storage feature of Windows Server 8 (pool of storage space across multiple hard drives) looks like something that could bring back the Drive Extender feature to a future version of Windows Home Server.
The following months and years are definitely going to be interesting!
-
Sorry, Comments Have to be Closed
I’m getting hammered by spammers and the spam filter is not working well enough.
-
ClipTextify for Converting the Clipboard Content to Plain Text
When you copy and paste text from application to application via the clipboard, you'll sooner or later run into a simple yet annoying problem: Often the text is copied as rich text, i.e. including colors, different text sizes and so on.
Intended to be a feature, this can be a real pain if all you want is plain text.
If you're not pasting into an application which lets you choose the format of the pasted text (Office 2010 does a good job here), you are forced to paste the text to Notepad first, then copy it again before you can paste without formatting.ClipTextify allows you to convert the content of the clipboard to plain text by pressing a hotkey (e.g. Win+V), before you paste the text into the target application.
Download
- Visit the ClipTextify website: www.roland-weigelt.de/cliptextify
-
Live Coding in Presentations – Don’t Waste my Time!
Over the years I have grown very sceptical of the “fewer slides, more demos” kind of presentations. I simply have seen too many presentations where things went downhill from the moment the speaker opened Visual Studio.
In an internal presentation or at a user group meeting this is “unfortunate”. But if I fly halfway around the globe and then have to sit through such a talk, I might get a little upset (MIX11 WP7 boot camp, I’m looking at you).
Dear speakers, if you plan to give a talk that contains any kind of “live” usage of Visual Studio, I kindly ask you to keep a few things in mind.
First of all: Even though we developers work with Visual Studio every day, you have to be fully aware that using Visual Studio in front of an audience poses a significant risk:
- Every bit of mistyping or misclicking is a distraction on the way from what you just said to what you wanted to show.
- At some point, Visual Studio will make you and the audience wait for something to complete.
- Visual Studio or some other technology may decide to stop working at the worst possible moment. In contrast, I cannot remember a crash of PowerPoint in any talk I’ve ever seen.
- When writing code you may make mistakes that result in build errors – another distraction that disturbs the flow of your explanations.
It is your job to minimize these risks. Everything that doesn’t work as expected is wasting the audience’s time. If you manage to recover quickly from problems, good for you. But solving an unexpected problem in a demo remains a distraction unless you specifically planned to show the solution to that problem.
Also be aware that what you see differs significantly from what the audience sees. You may see the five important lines of code or the three files that were just added to the project. The audience sees an IDE with lots of panes covering the whole screen, interesting menu and toolbar items from plugins, the full project structure inside the Solution Explorer, and lots of source code besides the few lines you are currently talking about.
Note that even with all these problems, I’m not advocating “all-slides” talks for programming topics. I have seen quite a few talks with a very effective usage of Visual Studio. All these had in common that the speakers had a good idea of when to use Visual Studio and when to rely on prepared slides.
What exactly are you trying to show inside Visual Studio?
- The “discoverability” of an API by showing Intellisense on it: Great!
- The values of some object properties at specifc breakpoints in a debugging session: Great!
- How easy it is to build something within minutes: Ok, but think about choosing a staggered approach of first coding some parts manually, then using code snippets to avoid repetitions, later maybe even using prepared code files if the audience can imagine they contain “more of the same”.
Note that you start losing parts of your audience if you have to scroll a lot; some people may tune out and simply wait for you to hit F5. - Some files that were generated: If you’re already inside Visual Studio, just want to show that they were generated and will move on after a brief glance at their content (“see: here’s XML and here’s C# code”): OK.
If you have to explain their exact purpose and their relationsships, think about preparing slides. A screenshot of (a part of) the Solution Explorer not only helps to focus on the files, it also allows you to highlight them and add call-outs that support what you are saying. - Features of the Visual Studio UI like dialogs, customization options, etc.: If you have to switch to Visual Studio just for that, better use one or more screenshots. Highlight important details and/or add call-outs.
- Some code that is already complete: It depends. What part should the audience actually remember? Would it be possible to put that code on a slide? If there’s a chance, use the slides. And again: focus of attention, highlighting of important parts, call-outs for explanations.
If you have to show the code inside Visual Studio, practice finding the locations instantly. Don’t stumble through file after file on stage just to notice you’re in the wrong project.
Each of your demos can be split into the following parts; think about where and how you deal with them:
- Preparation – you have to set up the environment before (the key part of) the demo can be started.
- Establishing context – you have to give the audience enough information to understand what you will show them.
- Show – demonstrate what the audience should see happen live.
- Summary – explain what the audience just saw.
- Conclusion – explain what the main takeaways are.
In all really good presentations that I have seen, little or no preparation was visible to the audience (i.e. all required projects were loaded before the talk started), unless it was actually part of the demo. And the speakers used slides during the “context”, “summary” and “conclusion” phases (instead of having the IDE open and just talking), which kept them focussed.
But this sounds like a lot of work?!
Because it is. Good presentations are a lot of work. Regardless of whether you are using slides or Visual Studio. Just look at e.g. the live coding by Scott Hanselman during the MIX11 keynote. Don’t think for a second that he did this without lots of preparation and practice.
Whenever you enter the stage at a conference, I expect that you are highly prepared and invested a lot of time into your presentation, period. Otherwise you’re wasting my time – with or without live coding.