Home avatar

Thoughts and code

Windows Live - Multiple Accounts Simultaneously

Among the features I love about Gmail is to be able to access multiple accounts w/o signing out and signing in. I’m late to learn this, but apparently you can do the same thing with Windows Live IDs. Same idea, straight forward.

image
image

The bonus is that you can control access to your account like LinkedIn, Facebook, Twitter, and Google. Very neat.

cURL to Scrape Data

I ran into a situation today when one of our microsites that was developed by a 3rd party is no longer… manageable. To be less politically correct, we don’t have access to the data anymore. Nothing significant, but annoying. The only way to see the data was through the web site. Yet data was paged, with about 40 pages. This is where curl was really helpful. Apparently, you can parameterize URLs (thanks to Sameer’s post) passed into the command, as well as the output. Here’s an example:

My Son`s First Program

This is it. Liam has built his first program (sort of) and I am glad that the reason he did it was to confirm what he learned and not as a desire to become a programmer. If you haven’t seen http://www.khanacademy.org/cs/ check it out. An outstanding resource for kids to learn basic programming and practice some math skills. Liam has started Algebra and this was his first “program” to solidify understanding of concepts such as variablealgebraic expression, formula, input, and output.

Twitter Bootstrap

If you have tried to build a web interface that would work for most of browsers and variety of devices, you’ll appreciate Twitter Bootstrap project/framework.

Personally, I liked the following:

  1. Decent documentation and examples
  2. Ease of setup and use (nuget: Install-Package twitter.Bootstrap)
  3. Intuitive rules names

Recent DNC Magazine has a starter article on how to get it going.

Automate or Not

When system is built, no one wants to baby sit after its up and running. Therefore, there is a strong desire to automate everything, including error handling. But sometimes automation is not suitable for every error, and here is a good example.

An email signup service that I have created is using a 3rd party service to discover city, region, and country from city name only.  Easy and intuitive for customers, head ache free to maintain (no need to keep data source up-to-date). All good and nice till I got an error reported by someone on the team – instead of City the system reported “junk” (see screenshot).

Cut Deployment Time and Cost on Windows Azure

I’m new to Windows Azure, and learning by making mistakes. There’s a lot to learn about Azure in general, and one of the interesting aspects is deployments and cost associated with it. Taking this moment, I’d like to thank Yves Goeleven, Azure MVP, who has helped me a lot.

The simplest deployment that can be done is either directly from Visual Studio .NET. But it’s not automated, and requires a person to trigger it. Next option is to automate it with PowerShell scripts, leveraging Windows Azure PowerShell Cmdlet. But you have to ask yourself, what am I deploying EVERY SINGLE TIME?

CSPACK.EXE - Careful with Defaults

When packaging Windows Azure solution from within Visual Studio .NET 2010, CSPACK is generating cspackproperties file behind the scenes, defaulting to .NET 3.5 Framework. I missed that part when going over the documentation and had to go through the worker role that can’t starts and no error is logged, since worker never loads. Gladly, solution is trivial and so old that is probably long time forgotten by the Azure veterans. But for newbies like myself, don’t dismiss old material, even if it’s from 2010.  Nothing New Under the Sky…

Backbone.js, NServiceBus, and Cloud Hosting

Past

In the past I have always created on premises solutions for web applications that have mostly based on the server side code responsible for front UI and backend code, with a little to none client side code (usually called “scripting” with intention that it is not really a code), predominant validation on the server side with some duplication on the client. Technology of choice was ASP.NET MVC. When choice was not mine, sometime it would be ASP.NET WebForms. Services would be created using WCF, without auto-generated proxies.

A(B+C)=AB+AC

Sometimes very basic things are so rooted in our heads that we often forget how to explain those basics to others. So was in my case when I needed to prove my son that A(B+C) is AB+AC and not just AB+C as he originally thought. To my surprise, I couldn’t think of a way to visualize it and explain. Wait a second, if you can’t explain something you supposedly know, then you don’t really know it well… Gladly, a friend of mine remind me the way to prove it. Why am I sharing this incident? Because a lot of times we assume we know something, till we actually need to explain it to others, and that’s where our knowledge is truly tested. This is something that is greatly exposed in pair-programming. And maybe that’s the reason so many avoid it with every possible excuse out there. Just saying…