Friday, February 27, 2015

You should (not) upgrade!

Please note that this post is mostly focused on the Services Industry rather than the products industry.

When someone approaches me and says "We should upgrade from X 2.0 to X 4.0, the word "WHY" instantly comes out of my mouth. Studying Computer Science in my early twenties I had the privilidge to have amazing teachers and to learn using the latest technologies available at that time. After graduating, I thought "now I'll be able to use all this new tech and it's going to be so awesome!". And then the chip dropped: most customers in the banking, insurance, telco & media, etc, don't use recent technologies. They have legacy systems that are working and doing their job brilliantly for years. They don't give a damn about what's new in the Microsoft tech stack: they want technology to help improve their business, which most of the times is not technology. And that's good: Technology is just a means to an end.

Coupled to this mindset, working "one step behind" the wave of new releases has huge advantages: the big "problems" are solved, the framework or whatever you're using is now stable and most of the "strange" issues and behaviors you encounter have already been discussed. Google becomes a really fast helper. You're able to really focus on solving a customer's problem instead of trying to figure out why "Microsoft, Apple, whatever, did it this way and how can we do some workaround".

Now, on the flip side, working with recent technologies is much more fun and will allow you to be on the edge of technology, always quickly renewing your knowledge. And this doesn't mean that the above quote is no longer valid. It still is: Technology is just a means to an end. It just adds the uncertainty of working with products that might not be as good as you expect them to be. And when doing project management, this has to be taken in consideration.

And that's the bad side. When working "on the wave", you're constantly facing problems that cut your productivity. Yes, Microsoft, Oracle, IBM, Apple, whatever, are all companies that are operated by humans that make mistakes and sometimes make design and implementation decisions that are questionable. And trying to decipher some of these decisions is sometimes exhausting.


So, is working on the latest technology good? YES YES!
Challenging? God, YES! I LOVE IT!
Always the best for your customer? It depends.

Saturday, February 21, 2015

WBS Modeler add-in for Visio

MS Project is essential in my life. Although I think it's one of the most confusing and "buggy" products from the Office Suite, I've learned to love it. After you're passed the tricks and the "small breaking changes" from versions (2003, 2007, 2010, 2013...), it's as easy to use as MS Word. Another sometimes misunderstood product is MS Visio. It's so useful that I can't believe why it's not a must have for everyone. This is another life essential for me. So, combine these two with the amazing work Microsoft did in allowing extensibility through Add-ins and Magic happens.

MSProject MSVisio Addins

One of my Favorite Add-ins "links" MS Visio and MS Project. It allows you to draw a WBS in Visio and Export it to MSProject with one click. And it also allows you to do the opposite (from Project to Visio). When it comes to MSProject, I have templates for everything nowadays, but I still love this little Add-in.


The Visio 2010 Addin actually works in Visio 2013 (the 32 bit version, at least. Read the answers from this post). Also, if you're using Visio 2007 with other version of MS Project (e.g.: 2013) it also works (the Export and Import work really well).


Some more info:

Monday, February 16, 2015

WebAPI with CORS – IIS Intercepts OPTIONS Verb

Note: In this post, I'll ignore JSONP since it's a "workaround" to the topic. Also, CORS doesn't have anything to do with an Irish band.

When exposing a REST API, you have to consider whether you want to allow CORS or not. If you don't allow CORS (as of today, Twitter doesn't), then your API will have a "broken leg" since browsers, by default, will block the use of it:

IIS WebAPI OptionsVerb

(click to enlarge)


Browsers will issue a preflight request (OPTIONS) whenever you have an HTTP method that's not GET, POST or HEAD. Even when it is one of these, the browser will still issue the preflight request if you use specific/custom headers. You can read the specification here and you can see this request in the browsers developer tools.

Now, when using Web API to expose a REST API, enabling CORS is quite simple. There's a quick guide here: Enabling Cross-Origin Requests in ASP.NET Web API 2.
However, the guide isn't complete. If you're using IIS as your WebServer, this just won't be enough. That's because IIS, by default, has an Options handler that will intercept the HTTP request before it gets to your "WebAPI":

IIS WebAPI OptionsVerb

(click to enlarge)


So, you have to do a little workaround. In the web.config of your Application, just remove this Handler and add the Options processing to the ISAPI handler:

IIS WebAPI OptionsVerb

(click to enlarge)


Important note: By removing the Options handler and allowing the HTTPRequest to be processed by WebAPI, you also removed the handler when someone issues an OPTIONS request for any handler (e.g.: an ASP.NET Page). Other option is to change the priority of the OptionsVerb relative to the WebAPI handler. However, this WILL fill your web.config with all the handlers (at least in IIS7, 7.5 and 8).


Here's more info:
And here's a POST I created in the IIS forum for the ordering issue:


Tuesday, February 3, 2015

A good motivational book

I don't usually take time just to read, I usually read when I have free time (e.g.: waiting in the car for someone, at the beach, etc). From time to time, I open Amazon and see what books come up as suggestions. A few weeks ago, Amazon suggested this book:


Well, I was ordering two other books and I thought: "What the hell. I like the preview, let's go for it". Great decision. Although I'm not a fan of the author, I have to admit that the book is really good. It's motivational, every single time I read a couple a pages I just want to close it immediately and start working! I know it sounds weird, but it's a huge compliment! It really tickles my brain to "go do something"! Here goes a quote:

"Lets face it: like it or not, the results are all that matter. If you "attempt" to take out the trash but only make it to your front hall, garbage will continue to accumulate in your home – and you'll have a problem. Quit patting yourself on the back for trying and save your rewards for actual accomplishment. Be hard on yourself and never let yourself off the hook until you get real results, not efforts!"

Added with a 4.5 star rating to my bookshelf!