Room of a pleinolijf

Ask yourself this: how do I want to be remembered ?


Leave a comment

Williams unveils its 2014 F1 car

pleinolijf:

It’s the dreaded anteaters ! Runaway !!

Originally posted on Motorsport:

WilliamsSo – now we get a real look at 2014 F1 car and more specifically that nose and, like Cyrano turning to face Roxanne for the first time, it’s hard not to be shocked. That is one hell of a conk. Don’t blame the design team at Williams, they are only responding to the rule changes and it’s expected that by next Tuesday — by which time we will have seen all but one of the new cars — the F1 paddock will resemble a colony of proboscis monkeys.

View original 426 more words


Leave a comment

Be wary of closures when using delegates

Just recently, I got caught out by a closure.  A closure is a piece of code that can be ‘executed later’, while still retaining the environment in which it was created.  A lot of developers mistakenly think anonymous delegates, like lambda expressions, are by definition closures.  They can be, but don’t have to (and usually aren’t).

I’ll illustrate with the actual code snippet that caught me out.  Unfortunately, at my current client, I can’t make use of the excellent Visual Studio add-in ReSharper, which would have alerted me on this with a “Access to modified closure” warning.

foreach (string keyword in keywords)
{
   ToolStripMenuItem keywordTsmi = new ToolStripMenuItem(text: keyword, image: null,
      onClick: (sender, e) => Clipboard.SetText(keyword));
   keywordsTsmi.DropDownItems.Add(keywordTsmi);
}

In this bit, I am filling up a context menu with new sub menu items, containing keywords that are copied to the clipboard when clicked on.

Obviously, this compiles just fine, and the submenu is correctly filled with all the distinct keywords.  However, no matter which keyword you click, it would always copy the last keyword in the list.  With this functionality being not-very-much-in-your-face, it slipped through (user) testing.  I’ll be the first to admit we need more unit tests ;)

The solution is dead-simple:

foreach (string keyword in keywords)
{
   var keyw = keyword;
   ToolStripMenuItem keywordTsmi = new ToolStripMenuItem(text: keyw, image: null,
      onClick: (sender, e) => Clipboard.SetText(keyw));
   keywordsTsmi.DropDownItems.Add(keywordTsmi);
}

By assigning the value to a local-scope variable, the compiler will save a separate reference for each keyword, instead of only one that gets modified with each loop (hence the ReSharper warning).  Because the latter is simply the standard behaviour when you use a delegate with a variable like that.


Leave a comment

Suppress Compiler Warnings in Visual Studio

Just a quick post to put this out there.  Chances are you already know of this, but I can imagine far from everybody does.

 

When building a project or solution, Visual Studio will report on what’s happening in the Output window.  (By the way, you can control the verbosity of said window in the Tools – Options… – Projects and Solutions – Build and Run screen.  And the first thing I do on a new system configuration, is enable the ‘Show Output window when build starts’ option in the screen before that.)  It will print informational lines of text, but also, and more importantly, warnings and errors while compiling.

Obviously, your attention should be focused on the errors, as they will likely prevent you from running your application.  Call it neurotical behaviour, but I always aim to have an as clear Output window as I can, so the warnings receive equal attention from me (although not as diligently of course).

But sometimes warnings will keep being generated by Visual Studio, even though you intentionally wrote the code the way you did.  An example can be fields that are declared and assigned, but only used in a

#if (!DEBUG)

statement, like a bunch of license key registrations meant for production.

 

 

To keep the warnings from always popping up in the Output window when building, use the #pragma preprocessor directive.

#pragma warning disable 414, 3021

You can get the warning numbers by building  your code. If you can’t or won’t, you can also wrap the code in question in a

#pragma warning disable

and

#pragma warning restore

‘block’. This will disable all warnings in between, so use with caution !

 

PS: VSCommands by Squared Infinity is a great extension for VS that will color-code the lines in the output window to increase readability.  You can even define your own custom formatting.


6 Comments

Switching webmail from Google’s Gmail to Microsoft’s Outlook.com

Update:

Over at the Microsoft blog was announced a new tool that makes all of the above obsolete.  You can now make use of this built-in Outlook.com feature to import all your e-mail, contacts, folder structure and read/unread mail status.  Easy peasy !

outlook_cover_640x360

As the (probably) final post in the series about switching online services from Google to Microsoft, this post describes what for many will be the most difficult migration / switch-over.  It sure was for me, as I have a very big e-mail archive that is meticulously organised with labels.

But I now had switched over my other services, so consistency demanded I did the same for my webmail.  Besides, I truly loved the minimal, modern UI of Outlook.com so much, I was even prepared to take some of the cons with it.

Personal cons of Outlook.com:

  • Message filtering.  It is by far one of my biggest gripes with MS’s webmail.  It’s just too limited, as you cannot specify multiple filters per filter field.  In Gmail, you can put ‘OR’ between e-mail addresses to filter a whole list of senders for example.  Also, you are unable to assign more than one action to a filter, like applying a category (which is Gmail’s label, btw) AND moving the message to a different folder.
  • Advanced searching.  There’s no search criterium available to search within categories.  Since I don’t organise on folders, but on categories (allowing to tag a message more than once, instead of making a copy), this annoys me a lot.

Well, that’s it really, for me :)  Nothing that can’t be fixed in a humble update.
YMMV (Your Mileage May Vary).

So how would you go about switching webmail accounts ?

To begin with, or even if you just want to try out Outlook.com, without giving up any part of Gmail, you can configure Gmail to forward any incoming message to your new Outlook.com account.  There’s an option to keep forwarded messages, which effectively gives you a mirrored inbox; one on Google’s interpretation of webmail, one on Microsoft’s vision.  This is an excellent way to compare the two services side-by-side, should you be in doubt.  As a word of advice, it might be a good idea to run this forwarded mode for a couple of days or weeks, in order for you to really get to grips with the new webmail interface.  It will take time to notice certain stuff (like message filtering, contact integration, etc.).  Another bonus is that you now have a free backup of any new e-mail :)

forwarding

Next, the big move.  I assume you want to migrate your old e-mail messages, and rightly so.  There is more than one way to accomplish this, or at least, there used to be.  You might have heard of a service called TrueSwitch, which promises to move all of your e-mails, contacts and agenda entries from Gmail to Outlook.com.  I actually used this, because it provided the only way to retain any labelling: it created a folder for each label, so I could then place all messages in a folder under a category, and next archive those messages in a big ‘Archive’ folder.  Only drawback was that it apparently took only the first label (alphabetically?).  Oh, and it had troubles with foreign characters, like ‘è’.

But that option is now gone since a couple of weeks, as the service has shut down.

That leaves you with the other option: manual import/export.  It’s not as bad as it sounds, though, and as you will find loads of tutorials online for this, I won’t go into details.  The bottom line is: for the moment, Outlook.com does not support the IMAP protocol, so you can’t use just any desktop e-mail client (like Thunderbird) to set this up.  The best option is to use the Outlook desktop software which does support EAS (Exchange Active Sync).  There, you configure both your Gmail (using IMAP) and your Outlook.com (using EAS) inboxes.  Sync them completely (remember to check all folders, also ‘sent’).  Once your e-mail is downloaded, you can simply drag & drop your Gmail messages in the desired Outlook folders, and the e-mail client will sync everything on the go.  Once it’s done, you don’t have to use the client anymore if you don’t want to.

There is actually a third option, but that is only worth considering if either you don’t want to put in a lot of effort in the migration, or you only need a dump of your Gmail messages, without organisation.  Outlook.com, like the other webmail services, offers you the ability to download messages from another account via POP.  You could configure your Gmail account here, and Outlook.com would start downloading Gmail e-mails to your inbox.  Best is to set up a filter for these messages as to not flood your inbox (when I tried this, I let the downloaded messages land in a separate ‘@gmail’ folder).  Take note that this will take a very long time (possibly several weeks, depending on the size of your Gmail inbox), and you don’t really have any control or progress indication available, so the risk is there that you miss out on some messages.  Like I said, only an option if you don’t care that much about your e-mail archive.

pop

It’s clear that the biggest hurdle – at least for me it was – is the organisation of your messages, as Gmail uses the label system only (no folders).  You should think through how important this is for you with regards to finding ancient mail.  Keyword search obviously will still work, but I have noticed that Outlook.com uses a ‘wider’ search.  You will find more, but it’s also more difficult if your keywords are generic.  So it actually might go either way for you in deciding you need your historical Gmail labels.

Finally, if you decide you like what Microsoft has cooked up, you can either delete your Google account (which is very straightforward), or play on the safe side, and simply put it in sleep mode.  That is, don’t use it anymore, and activate a permanent auto-reply (aka OutOfOffice).  Make sure to check the option ‘send reply only to people in your address book’; you don’t want to acknowledge spambots of your valid e-mail address.  This way, you inform your contacts that you now use an “[at] outlook.com” address, without having to send out a huge spam mail yourself.

OoO

I already talked about migrating your contacts, and for now I still use Google’s Calendar.  Microsoft’s Calendar just simply isn’t up to Google’s level at the moment, and together with personal limitations (sharing of my wife’s personal and work calendar), this prevents me from switching just yet.  However, I’m sure Microsoft will address this, and once they do I am able to wave goodbye to that as well, truly unifying my online services once more…

Read my other posts about my online services switch from Google to Microsoft:

Moving address book from Google Contacts to Microsoft People
Moving photo albums from Picasaweb / Google+ Photos to SkyDrive
Switching personal cloud service from Google Drive to SkyDrive
Moving file hosting service from Dropbox to SkyDrive
How Google is slowly losing me as a client to Microsoft
Switching search engines from Google to DuckDuckGo


6 Comments

Moving address book from Google Contacts to Microsoft People

Moving your Google contacts to Outlook.com promises to be one of the easiest aspects of the whole Google to Microsoft migration.  Because when you link your Google account in your (Microsoft account) settings, you get a very decent view on all your Google contacts.

There is a caveat in this,  however.  Like the majority of switching users, one of the first things I did in my new (old) Microsoft account, was link my Google account.  This would ‘sync’ my contacts and calendar automatically, and without error might I add. BUT this also means you no longer have the option to physically import Google contacts, which in turn means that you must keep your Google account alive and kicking.  Furthermore, you won’t be able to edit/delete contact details unless you create an Outlook version for the contact in question (this part is handled very well in the People UI, fortunately).  This latter fact is logical because there is no 2-way synchronization between the two, but it is annoying that you can’t remove a contact that was ‘linked in’ by Google.  Some users report that even after deleting the contact over at Google, the contact still remains in your address book…

I created an Outlook version of most, if not all, of my combined contacts (beautifully merged from Google, Facebook, LinkedIn, Skype and Twitter), thinking that Outlook would sync the information on first creation.  This apparently happens partially, from what I can tell.  It would take over someone’s personal e-mail address, for example, but not his/hers work e-mail.  So very inconsistent behaviour here, making it impossible to determine what information I have at Outlook, and what information will be removed once I cut the Google link…

An option would be to temporarily remove your Google account link, and then manually import Google’s CSV file of contacts.  Microsoft’s People has a good merging tool, so any duplicates won’t be much work to resolve.  Still, I feel like ‘People’ could use a lot more polishing.  E.g. there is no way you can manually choose a contact’s picture, it will always be the picture of the (most popular?) social network you have linked.
As a matter of test, I imported three contacts from a Google CSV file (formatted for Outlook).  Two contacts were imported as expected, and merged perfectly, but the last contact was screwed up, creating a duplicate, but with a scrambled name (containing part of the CSV record), making me fear to bluntly import all of my contacts, as the merge tool won’t be able to detect this kind of duplicate.

So if you, like me, should wish to sever the connection between the two contact management systems, there is a risk that you lose some (or all, depending on your manual additions) information.  This leads me to hang on to my Google Contacts list for now, although I do my updates in MS’s People application.

In hindsight, I recommend not to link your Google account when you switch, but first use the option to import Google contacts.
I can see myself trying the option I suggested rather soon though: temporarily decoupling my Google account, hopefully then getting the “Import Google contacts” option and import them through the People interface.

Btw: that’s another thing that’s unclear to me.  Decoupling your Google account; will it have a big impact ?  Does this decouple only Google contacts (unlikely) ?

In any case, I don’t like having two address books, so one will have to go.  I just wish Microsoft would provide an option to ‘reset’ your address book, and import Google contacts, also after you already linked you accounts.

Update: I know myself all too well, it seems :)  Even before publishing this post, I just had to know, so I have tried to just bluntly import Google Contacts’ CSV file into my already filled up address book of People.  As expected, I got all duplicates, but that’s for the merge tool to worry about.  I can now confirm that the imported Outlook contact does have all fields filled out that you had in the Google version of the contact (well, at least the important ones, not sure about the more exotic Google-specific fields like ‘Relationship’).  So after merging, you can be sure to have a complete contact, and if you so desire, you can delete (or archive, to be on the safe side) all of your Google contacts.

One word of caution though: make sure you go over the duplicates confirmation screen, as some contacts might be mistakenly proposed for merger.  Especially when you don’t have an e-mail address of a contact, and his/her name resembles another contact strongly.  Also a certain false positive: two different people using the same e-mail address.  This happens more than you want, but keep an eye out for them.  Luckily, they are very visible in the list, as you normally would have two boxes (the imported Google contact created as a new Outlook contact, and your existing Outlook contact), whereas the false positives will have three, so they stand out very cleary if you scroll through the list quickly.

 

Read my other posts about my online services switch from Google to Microsoft:

Moving webmail from Gmail to Outlook.com
Moving photo albums from Picasaweb / Google+ Photos to SkyDrive
Switching personal cloud service from Google Drive to SkyDrive
Moving file hosting service from Dropbox to SkyDrive
How Google is slowly losing me as a client to Microsoft
Switching search engines from Google to DuckDuckGo


4 Comments

Moving photo albums from Picasaweb / Google+ Photos to SkyDrive

This is probably the first thing that sparked my decision to leave Google for some (or all) of my online services, which are webmail, contacts, calendar, online photos, personal cloud, file hosting, and to a lesser extent, my search engine of choice.  Click on any of the links at the bottom of this post to read about my transition of each of them.

 

I used to be a convinced Picasaweb user.  This was mostly due to -at the time- the very large amount of free storage, low costs for additional storage, and an online interface that was better than the competition.  I remember being impressed by the speed at which full-screen photos were loaded when you flicked through an album.  I also loved the integration of EXIF data and geographical location information (effectively creating a map of where you’ve been).

This was then coupled to the (still) excellent Picasa desktop software, originally developed by Idealab’s Lifescape, from where you could upload your photos.  However, the way you could decide which albums and photos to sync was confusing to me.  I couldn’t get it to work just how I wanted.  Either I synced all and only starred photos, or I could activate a ‘web sync’ feature which wasn’t very transparant.  Then there was the option to explicitly create an album in Picasa, which you could then sync to the cloud.  Anyway, it all wasn’t very intuitive, and I didn’t like it.  It always felt like something that was slapped together and added on top of it.  But apart from that, the Picasaweb service and Picasa software was excellent, while none of the competition came close.  Of course, it helped that I was living in the Google ecosystem.

But with the arrival of Google+, slowly but surely Picasaweb was being eaten alive by it.  Google first decided to use Picasaweb as the storage hub for photos in Google+.  Next, it mirrored all albums in it’s social network, leaving you with two places where your photos were.  Then, when Google upgraded it’s Contacts pictures to high resolution, each time I updated a contact’s picture, a separate album was created in my Picasaweb photo album collection !  I couldn’t for the life of me figure out what this was about, at one point thinking to blame my switch from an Android to a Windows Phone smartphone.  So I asked the Internet, but the Internet didn’t know, leaving me to come up with an explanation of my own.
Before finally axing Picasaweb as it existed, Google redirected everyone to Google+ Photos, with an option to return to classic Picasaweb.  This option is now gone, and the picasaweb subdomain sends you to Google+ Photos.  R.I.P.  Apparently, you can still access the Picasaweb interface by using the following URL: https://picasaweb.google.com/lh/myphotos?noredirect=1

 

So there you are.  If you want to host your pictures with your favourite service provider, Google, you have no choice but to host them in Google’s social network.  In effect, Google now no longer has an online photo album service.  “Sure it does”, I hear you say, “it’s just called Google+ Photos”.  Fair enough, but I want a decoupled photo storage service.  If I wanted that to exist inside a social network, I’d use Facebook.  But I don’t, so Google cannot help me with that any longer.

Funny thing is, or to put salt in the wound, around the same time, the pricing plans for extra storage were changed as well.  From $5/year to $10/month for exactly the same product.  I’ll leave the math to you, but I can tell you that it’s more expensive.

Since in the meantime, I had switched from an Android phone to a Windows Phone one, and there was the prospect of moving my personal cloud and my file hosting/sharing service to SkyDrive, what better candidate than the latter ?  SkyDrive now offered decent performance at an attractive price point ($10/year).  It integrated three services into one (file hosting/sharing, personal document cloud (with office online editor!), and online photo albums), and has a straightforward synchronization.  It just feels right.

 

TL;DR: Going about this migration or transfer is actually pretty easy thanks to the Dropbox-style functionality of SkyDrive.  You share a photo album online, by simply copying the pictures in a separate folder under your Skydrive\Pictures folder.  It’s obviously a bit more work, as you have to manually select files (unless you upload all your snaps unfiltered, then it’s easy).
The good thing is, if you had web sync enabled for your photo albums in Picasa, your local files will have synched any descriptions you might have put with the online photos.  Very helpful (thank you, Google) if you have a lot of travel photos for example, which you annotated with all the places etc. which you undoubtedly have forgotten by now.  Unfortunately, you do lose all comments of course, as this was a feature of Picasaweb, and can’t be saved in the image’s EXIF data.  For me personally that wasn’t an issue with only a handful of comments.

 

Read my other posts about my online services switch from Google to Microsoft:

Moving webmail from Gmail to Outlook.com
Moving address book from Google Contacts to Microsoft People
Switching personal cloud service from Google Drive to SkyDrive
Moving file hosting service from Dropbox to SkyDrive
How Google is slowly losing me as a client to Microsoft
Switching search engines from Google to DuckDuckGo

Follow

Get every new post delivered to your Inbox.

Join 631 other followers