Monthly Archives: January 2011

Why ReSharper is evil

From time to time, I install a trial of ReSharper. Because colleagues and fellow developers all over the world praise this tool as if it is pure magic. Now, in my case ReSharper's magic was always to slow my Visual Studio down to a nearly unusable speed and to crash it very regularly. Also, it flooded my IDE with wrong error messages that you could only get rid off by restarting Visual Studio. To me it seems that with ReSharper, you spent most of your time waiting, restarting your IDE and praising this tool for some sadomasochistic reason.

Agreed, with new Dual- and Quardcore machines spreading through our dev dungeons and surely some optimizations by JetBrains Resharper got to a more usable speed level during the last years. It is also more stable than ever, what does not mean much, though. That's why I try to install it again from time to time, just to check if things got better.

Now, while it indeed got speedier and more stable, ReShaprer is more evil than ever: it's more intrusive, it's scareware like many of the "security suites" out there that frequently bombard you with warnings and "informations" that should show you how important it is that you have this software installed and how screwed you are if you don't use it.

Even worse, it very often makes catastrophic refactoring recommendations that, unfortunately, many of the ReSharper users out there gladly adopt without thinking about consequences because they trust in a tool they really shouldn't trust in.

Of course I have examples for you. Because just after installing ReShaprer, it flooded my project with hundreds of warnings like every scareware would do to make itself important. "Gosh! I'm such a bad programmer!" you might think when looking at the mess and you will be glad that this tool will at least camouflage this by fixing your bad code. No, trust me, you're a good programmer. ReSharper just want you to believe you are bad and only ReShaprer can help you out.

Now … why ReSharper is evil:

ReSharper is evil because it urges you to remove used code

image

Here you see a standard XAML file on a Windows Phone project. ReSharper urges me to remove the ApplicationBar's from the XAML because they aren't used. If I would do this now, my project will build fine, but will crash like a flying penguin at runtime because this XAML markup IS used. Not in the XAML, but in code behind:

image

ReSharper doesn't check this, but nevertheless urges you to remove code. This is marked as a Warning by ReSharper, so it's clear a developer coming by this will remove it in good belief. That's catastrophic because this, in worst case, is an error that might come up no earlier than in customer's hands as it won't break your Build and it might be hidden deep inside your application.

You really want to trust a tool that comes up with such horrible, bad checked recommendations?

ReSharper is evil because it will tell you that your perfectly fine code is wrong

image

ReSharper thinks here is somewhere a redundant check. No there isn't. It will just cost you time to think about an error where there isn't any.

ReSharper is evil because it enforces inconsistent formatting guidelines

Just as ReSharper is evil, underscores in modern C# code are evil. Or at least a relict, to be fair. So it's fine that ReSharper wants you to remove underscores from event handler methods:

image

But then, ReShaprer wants you to use the saved underscores for instance fields:

image

No, C# coding guidelines suggest to just use camelCase and no Hungarian-like notations.

ReSharper is evil because it forces you to castrate your fine self-describing code

ReSharper thinks that the "var" keyword should be used instead of a complete type name left-side of the declaration:

image

JetBrains sais that the use of the var-keyword is well-argued here but: the left side is where you would normally look for the type in this declaration. It makes your code more readable than to have to search for the type on the initializer side. I understand that you have to write a lot of extra-chars for this benefit and using var on the left side would be easier. And that's understandable … but there's no reason that you have to refactor it later on if you have this already written like that. Don't make code less readable than it was just because ReSharper makes you believe that's better coding.

That's one of many examples where ReShaprer bombards you with unnecessary recommendations just to make itself more important. It would be OK if this recommendations were more subtle, but with all those curly underlining of such unimportant "errors", ReSharper is much too intrusive and distracts developers from really important things.

This is called advertising.

ReSharper is evil because it thinks it knows better what you want to do than you

image

If you assign a value to your variable only in the constructor of a class, ReSharper wants you to make this field read only. Seriously, wtf? I know when I want a field to be readonly. I have good reasons when I do that. And even if I don't use this field currently anywhere else than in the constructor, I or someone else might in the future. If it's not ok to write to this field I will make it readonly.

It's just another example of the flood of self-advertising of ReSharper. Same functionality more hidden or just on demand - ok, why not. But offensive like that including curly underlining? Oh my.

So, finally …

… these are just the things that came to my eye in the first 15 minutes after I installed ReSharper. There will be a lot more and I might add more examples in this post in the future. From destructive code refactorings that kill your app to all those unnecessary and over-prominent suggestions to change your code - ReSharper remains a very problematic tool.

If you want to use all the (many) good features of ReSharper, you will have to spend a lot of time in fine-tuning it and turning off all the crap it does to advertise itself. Very often you also have to disable good functionality to "fix" bad things ReSharper does, like the suggested XAML removal above - it's useful that ReSharper shows you code that is deprecated / unused - but you have to turn it of because you can't trust it.

If you use ReSharper anyhow, use it wisely and don't put ReSharper over your own coding skills. While it is very helpful, not to say essential,  in many on-demand refactoring scenarios, most of the "live" checks should be used with extreme caution or even turned off. For coding and styling guidelines better go with tools like FXCop.

Update 1: Even more examples

image

ReSharper tells me about a possible null reference exception where I just checked just for that one line earlier. Unnecessary curly lines everywhere distracting me from more important things. Don't like.

Also, the only way to get rid of this curly underlining in this case is to make the LINQ query more complicated and unreadable or to disable null reference checks in general.

feed7 2.3 update

Another bugfix update was released for feed7 a couple of days ago. Version is now 2.3 and it fixes issues with app crashes when sending articles to Instapaper or ReadItLater. There are no new features or other fixes in this release, but the next feature update is already in the making and we will have some very nice improvements and great new features for that.

New Google Reader UI and feed7

Google has launched a new UI for Google Reader that also affects some of Readers features. The good news is: it won't affect feed7 - unless you are using the "share" feature as this has been removed from Google Reader.

If you are still using this feature within the app, feed7 won't crash and it won't do any harm. But it will be useless now as Google Reader doesn't support this feature anymore.

We will remove the possibility to share items over Google Reader with our next (bigger) update that most likely will see the light of day in December.

Google promotes to use Google+ and it's +1 feature to share articles with friends now but it's rather unlikely we will support this in feed7, at least in the near future. It of course also depends on your feedback if you need this feature integrated in feed7, so let us know what you think.

Besides that, we will have another small bugfix update on Marketplace this week that fixes issues with sharing items over Instapaper and Read It Later. No new features will be introduced with this update and it is not related to the changes in Google Reader.

feed7 updated: details on update 2.1 and 2.2

Since feed7 2.0 has launched I have already published two updates to Marketplace. There are no new features in these updates but a couple of important bugfixes. The complete release notes can be found below, but the most important changes are that settings won't get lost during data migration anymore when upgrading from version 1.x to version 2.0 and that Live Tiles should start working again now for all of you that had issues since upgrading to version 2.

Version 2.1.0.225 Release Notes:

Fix: Migration from v1.x to v2.0 can cause drop of 1.x settings
Fix: Wrong description for feed multiselect view star button

Version 2.2.0.227 Release Notes:

Fix: When resuming from tombstoned state, UriMappings were not initialized which results in crash
Fix: Resuming the app from a tombstoned state does not show contents of folders list
Fix: Sync client changes were not saved for background agent settings
Fix: Article duplicates can appear when syncing multiple times in the same session
Fix: Due to DNS problems after a DNS server change, live tiles for web sync stopped working
Fix: Race condition during update of live tiles in web sync mode
New: Support for YouTube short URI format youtu.be

Updated assemblies:
TileUpdateAgent.dll v1.1.0.2 -> v1.2.0.3

Update 2.2 is just going live on Marketplace and should appear on your devices in the next couple of hours.

feed7 2.0 is available on Marketplace!

feed7 2.0 was in development since early this year and a lot of work and time went into this release. I'm very happy that this project is finally done and now available as a free update on Marketplace.

Here's the direct link to feed7 on Marketplace:

http://www.windowsphone.com/en-US/apps/99aa9113-47f4-df11-9264-00237de2db9e

The main target of the 2.0 release was to replace the existing, XML-file based local caching engine by something faster and more flexible that scales good for users that want to cache several thousand articles offline on their device. The development started when Mango was far in the future and I tried to replace the caching engine by some technology that already existed at this time - for example SQLite for Windows Phone 7 or some of the object-based databases that were available at this time.

A lot of work went into it and the result was unfortunately nothing. The database solutions available early this year performed so bad that each and everyone was a lot more worse than my own custom-developed solution. Finally, when SQL Server CE support was confirmed for the "Mango" release, I stopped development on version 2.0 and decided to delay feed7 2.0 until Mango is out.

It was the right decision. SQL Server CE outperforms any other solution by far. It is  not as fast at runtime as my implementation was , but it greatly improves startup performance and also scales well with larger local caches and also makes sync faster. It required a nearly complete rewrite of the whole app as I wanted to behave feed7 just like in the 1.x version, just like as "nothing's happened" … but because the approach with a database is so different to what I have done, everything's changed under the hood now while the UI should feel just the same for you as always. Just faster. And packed with Mango features.

So here's what's new beside the new caching engine:

New feature: Image caching

Also something I had to delay in favor of overall application performance: you can now enable image caching in settings and feed7 will download all images it finds within feed articles. So now you can read your articles offline, but this time also with all images displayed. Of course this feature will slow down sync as analyzing articles for images takes some time, and of course image downloading will also cost time and bandwidth at least on the initial sync - and yes it also will take some serious amount of space on your device - but it's worth it if you're often reading your articles while out of coverage, for example on a plane. You'll see, after the initial sync and download is done, image sync works pretty well and fast. And as it's completely disconnected from your reading or sync experience, it also won't come into your way.

unreadcheckNew feature: Multiselect

It's always helpful if you can perform bulk operations on your articles. Just want to mark some of them starred for later reference? Until now, you had to open each article and add a star in article view.

Now, you can multiselect items (see image on the left)  just like in the official mail client of Windows Phone 7: Tap on the left side of an item to open Checkbox mode, check all items you want to change and select your operation from the AppBar - like mark read, star and unstar. The options change depending on the view you are in.

It's a great feature and we will improve it even more in future release.

Performance, performance, performance

feed7 improves performance in many areas:

It starts in just 1/3 of the time while not slowing down as your local cache grows. It's memory usage is just about 50 % of version 1.x or even less. Google Reader sync performance is also greatly improved and also uses a lot less bandwidth during sync.

We also optimized some workflows like when adding feeds.

Full "Mango" support

feed7 2.0 supports everything that's great about Windows Phone 7.5 "Mango":

  • Multitasking (fast app switching)
  • Greatly improved scrolling performance in lists
  • Pinnable feeds & folders - pin your favorite feeds or even folders to your homescreen - with full Live Tile support that shows the count of new items within those folders!

New article view

Article view was completely overhauled and displays your articles now in a more readable way. Images use as much space as possible on screen so you won't have to resize them to better see their contents. The font is a bit larger. We added some structuring to the text so important parts stand out more. It's a great improvement over version 1.x!

And many more …

As always when an app is nearly completely rewritten, there's so much more in it than you can ever write down. Fixes, improvements, optimizations, … you'll find plenty of them.

One word on Live Tiles

They also work completely different now. If you are using Google Reader, your unread counts on your live tiles are now queried from Google Reader directly over a new Background Agent that is executed by Windows Phone every 30 minutes. You don't need help from my server anymore for this.

For all users that don't use Google Reader but web (direct) sync with feeds, my server is still required. But it also works differently: until now, my server sent push messages to your device with the unread count for your live tile. Now also the Background Agent is pulling this data every 30 minutes from my server.

Go download now!

It's already live for a couple of days - if you don't have it yet, get it … and let me know how you like it!

Have fun!

feed7 2.0 for “Mango” update preparations

It took longer than expected, but the feed7 2.0 update now is finally just around the corner. While it is not a rewrite from scratch, it's close - feed7 comes with a complete new, database-based caching engine that required rewriting or at least reviewing every single line of code - but fear not, on the surface it will look & behave just like version 1 - but is now faster, supports more content to be cached without loosing performance and requires just about 1/3 of the memory earlier versions did.

Besides supporting Mango goodness like fast app switching aka multitasking there are also some other new features: image caching, search, pinnable feeds and folders on your home screen and more. So - this is more than just an update for Mango. It's a real big update and it requires some preparation:

  • Beginning in the next 24 hours, we are rolling out a public beta to Marketplace. feed7 2.0 was in a friendly user test for a while now but now everyone can try it out. If you want to participate, let us know your Live Id (send it to support@feed7app.com) - we will send you a direct download link. You don't have to be a Developer to participate - everyone with a Mango-enabled device can!
  • feed7 will be in public beta for 1 to 3 weeks - depending on your feedback.
  • During this time, we will be disabling the current Live Tile service. Live Tiles will stop working for V1.0 users! Live Tiles will behave completely differently in V2.0 and there is no easy migration scenario. Please mind that this Live Tile service was in Beta until now anyhow, so we ask for your understanding we won't have a soft migration this time. For users that won't have the ability to upgrade to Mango anytime soon, this will mean that they won't have a Live Tile for a longer time. But we're looking into this to find a solution for those users.
  • feed7 2.0 final will launch some time in October, depending on Beta feedback.

That's it for now - please take your chance to join the beta and give feedback!

feed7 1.8 August 2011 feature update

As promised, the latest update for feed7 is now available on Marketplace. Current plans are that this is the last update for Windows Phone 7.0 devices as I am already working day and night on the coming update for Windows Phone 7.1 also known as "Mango". Each and every device out there today will get the update to Mango, so don't worry - every current customer will receive an update to version 2.0 as soon as Mango is out.

Now back to this update. Here are the most important new features and fixes you will find in this release:

Application Bar color now changeable

imageSome people loved the orange color of feed7's AppBar … but also some didn't. And most of them were using AMOLED devices with very colorful screens. On such devices, the orange was a too strong contrast to the else very color-reduced and dark interface when using the dark Windows Phone 7 theme.

Anyhow, in a very theme-aware application like feed7, it was time to make also the AppBar respect the user-selected theme. But for everybody who loved the orange - or just wants another color for the AppBar - you can change this color now in settings. The theme color will be default (and is recommended - if you change your theme, of course feed7 will also change its AppBar color).

Auto-Sync on startup

imageA very frequent and legitimate wish: why do I always have to press "sync" manually on every app startup? The long answer is: because a sync impacts performance and also limits your options until it is finished. You won't be able to add new feeds or change settings, for example. So having auto-sync on every startup can also be annoying.

But of course there is no reason to not offer a setting for that. feed7 1.8 has just that. But by default, it's deactivated.

Unstar all

Already noticed that since the last update (version 1.7) feed7 changes the AppBar buttons while swiping through the different lists (folders, unread items, …)? You got an "unstar all" on top level that way, but only if you are in the unread items list.

This has been extended in this version and you now also have an option for "unstar all" when you are in any starred items list. Useful if you are using starring heavily for temporarily marking interesting articles (for later reading for example).

It looks like this:

image

A fix for Mango users

Many of you are already using the Mango Beta on your devices. Due to some breaking changes, feed7 wasn't able to authenticate if you changed your password since your Mango update (or freshly installed feed7 and had to enter the password for the first time). This is fixed in this release … kind of a mini Mango update.

Release notes

For all other changes, please read the following release notes for this update:

feed7 1.8 Release Notes:

Fix: Due to incorrect handling of some article unique IDs, some feed's articles could not be opened
Fix: When using web sync mode, some older/special feed formats weren't supported
Fix: Users that already used WP7 7.1 (Mango) Beta couldn't store the password correctly anymore
Fix: Last sync info gets persisted earlier now so sync skipping is now more effective when enabled
Fix: Backward out animations are now always working
Fix: Opening a context menu always caused erroneously a navigation afterwards
Added: Unstar all in starred lists
Added: Custom color settings for AppBar
Added: Setting to automatically start a sync on app startup
Changed: Updated 3rd party components and changed parts of the app to benefit from their new features
Changed: Some preparations for Mango/feed7 2.0 update later this year

Catching up – feed7 1.7, 1.8 and 2.0 (Mango)

It was very busy here over the last couple of months and besides some delayed updates for feed7, also the update details for the April 2011 update are missing here.

But feed7 is gearing up and over the next couple of weeks there will be a lot of new stuff coming out that will include all the work that has been done since the last update, and that was mainly targeted on the upcoming Windows Phone 7 Mango release.

But step by step, let's start with the missing release information for feed7 1.7:

feed7 1.7 April 2011 feature update

I'm sure everyone already uses this version in the meantime. While not obviously visible, this was a rather large update containing a complete redone UI for (much) better scrolling performance, (much) better performing and Metro-like animations/page transitions, landscape support, a complete localizable UI (with one additional language, German, included) and much more. Here are the details:

feed7 1.7 Release Notes:

Added: Full localization support for complete UI implemented
Added: Localization to German added. More languages will be added depending on customer demand
Added: Links in articles can now be opened directly in WP7 browser, can be limited to YouTube video links only
Added: Mark all read on top level
Added: Full landscape support added
Enhanced: Improved scroll performance in feed lists to offer native-like WP7 experience
Enhanced: New page transitions that offer native-like WP7 experience and faster, less diversionary animations
Enhanced: Optimized startup time by reducing amount of cached data
Fix: Due to some Google Reader API bugs, duplicate articles were returned occasionally. feed7 handles them now.
Fix: Opening articles from "all" lists caused sometimes automatic re-opening of those items later
Fix: Some small UI glitches fixed that were not compliant to WP7 design guidelines
Fix: Exception on startup when push notification server is temporary unavailable
Fix: Under some circumstances saving tombstoning data could cause a null reference exception

feed7 1.8 update for NoDo coming

While Mango is just around the corner, there will be one more update for NoDo devices coming in the next couple of days. It will add some requested features and some bug fixes that were reported since the last update in April. Included are customizable Application Bar colors, auto-sync on startup and some more UI enhancements.

It was a long time since the last update - the reason is that we needed to move some of the planned features to the feed7 2.0 release as we need the new Mango features for them.

There is also one bugfix in this release that already targets Mango (for everyone that already uses feed7 on a Mango beta device): when changing your password, it is currently stored incorrectly on Mango devices. This update will fix this problem. You won't have noticed this problem if you haven't changed your password since your update to Mango on your device.

feed7 2.0, the update for "Mango" - join the Beta!

feed7 2.0 is in the making for months now and had been delayed again and again because the planned new features weren't realizable with the current-generation WP7 OS. It was impossible to work around the limitations without having serious performance impacts. But with the new Mango update everything is on track now, mainly the "heart of the update", a new caching engine.

Shortly after the 1.8 update there will be a Beta for 2.0 available to everyone who already has the Mango Beta running on a real device. Everyone who is interested in joining the Beta, please contact feed7 support. While the first Beta release won't be feature complete and you might not even notice huge differences, there will be some key features of Mango implemented, like support for fast app switching ("Multitasking").

HTTP Error 403 (Forbidden) when using ASP.NET MVC 3 on IIS 6

If you are trying to get an ASP.NET MVC 3 page running on IIS 6 - in my case I tried it with the great MVC 3 based CMS Orchard - and hit this 403 error when trying to open the web site the first time, here's a possible solution:

ASP.NET 4 comes with a new feature that makes extensionless URLs work out of the box in Internet Information Services 6. This feature can be enabled in the registry. It should be enabled by default, but in my case, it was not for some reason.

So, make sure that in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0

the EnableExtensionlessUrls key is set to 1.

feed7 1.6 March 2011 Maintenance Update

During the next couple of days, an update for feed7 will be rolled out to your devices. Unlike the previous two updates, this is purely a maintenance update and brings no new features - but some improvements.

For instance, feed7 handles text input now better and sets actions if you press enter during some text input in forms (like setting the focus on the next relevant input element or closing the SIP (keyboard) automatically.

The biggest part of the update was support for the new Live Tile Push Service 2.0 that will improve accuracy of your notifications and also has a much nicer and upgrade-friendlier architecture. While you won't notice much difference, a lot of work has gone into that and it will be a lot easier and faster in the future to add new features or changes to the service without loosing to much time on backwards compatibility issues.

Speaking of backwards compatibility, the Live Tile Push Service 1.x for feed7 1.5 will be running side-by-side with the new version until end of March so you don't have to upgrade to feed7 1.6 immediately to keep your live tile notifications working.

This client & push service update is also a preparation for feed7 2.0 that will arrive soon. Most of the changes in feed7 1.6 are actual changes in feed7 2.0 that were integrated into the 1.6 release.

Another important part of this update are changes that will allow you to report app crashes directly to support. This will help to react faster to issues that appear "in the wild". If an unexpected error happens, you will be asked if you want so open a ready to send E-Mail-message. Although I hope you will never see this message, please make use of it. Another part is that feed7 now integrates PreEmptive's Runtime Intelligence service that will also help monitor the application in the wild.

So you see - this update focuses on improvements now and in the future. While it brings no new features, it is a very important update that caused a lot of work. Thus, the time since the last update was longer than expected, but rest assured that work on feed7 2.0 has run parallel to this release - so you should see the new major release in mid-April.

As always, find the complete release notes below.

Release notes feed7 1.6

Fix: Some fixes and enhancements to web sync parsers for Atom, RSS and RDF feeds
Fix: In some scenarios, feed7 stopped syncing unstarred items with Google Reader
Fix: More pessimistic unread/starred management to prevent duplicates in unread or starred lists
Fix: Problems during opening a push notification channel could crash the app
Changed: Integrated new February 2011 Silverlight Toolkit and replaced some custom code by toolkit functionality
Changed: General code maintenance, mainly removing deprecated code/functionality
Changed: Subtle indentation for Google Reader credentials on settings screen removed as this confused some users
Changed: Better text input (SIP) handling
Changed: Integrated new push service features for more accurate notifications
Enhanced: Trial mode is now less restrictive, app can be used without restrictions besides a trial info on main page.
Changed: In trial mode, push notifications are now limited to a 5 day trial license starting from the first time of use.
Added: Global error handler for unexpected exceptions that allows sending the error details to support by mail
Added: Added PreEmptive runtime intelligence to report and analyze app usage