Sunday, January 8, 2012

Configuring SMTP in Windows Server 2008

Before you read this post, if you find yourself needing to configure SMTP, there is already something wrong. There are a lot of cloud-based email providers and you should take advantage of them. Using SMTP should be only a temporary solution to your email needs. Anyway, it's really simple and it doesn't take more than 10 minutes. Just follow these instructions http://www.itsolutionskb.com/2008/11/installing-and-configuring-windows-server-2008-smtp-server/

Saturday, January 7, 2012

Duplicate POST in JQuery mobile

Last week I was looking at the requests made by a JQuery application, and I noticed that a POST was being executed twice. After doing some debugging, I thought this was a JQuery mobile issue since my code was doing only one POST. There's nothing more undesirable because we didn't want to change the JQuery mobile code, and even though JQuery mobile does frequent releases, we needed the fix right away.

Long story short, it turned out the whole problem was caused by an IMG tag with an empty src attribute. In other words, we had <img src="" alt....>. It's hard to explain why this error can cause a double POST.

Sunday, December 25, 2011

Smart software makes the difference


How smart should software be? I think it should be smart enough to fix our mistakes, but not smart enough to be intrusive. Let's compare Gmail and Hotmail. Let me start by saying I don't use Hotmail anymore. The reason is that it wouldn't let me send emails because it "detected" that the emails I was sending contained spam (I promise they didn't). This was a really frustrating experience, and very quickly Hotmail became useless to me.


With Gmail it's a completely different experience (excluding the UI changes to the interface... I'll leave that rant for another time). First of all, at least it let's me send emails. Now, when I was getting ready to send an email in which I wrote "I'm attaching", I got this message:





This is a good example of software that is smart, yet not smart enough to be intrusive. Kudos to Google.

Wednesday, December 21, 2011

Sharing files between 2 Amazon AWS instances

This is not intuitive at all, and moreover, I found only 1 post that indicated how to do this. The idea is to open the following ports between the instances:



  • Microsoft file sharing SMB: User Datagram Protocol (UDP) ports from 135 through 139 and Transmission Control Protocol (TCP) ports from 135 through 139.
  • Direct-hosted SMB traffic without a network basic input/output system (NetBIOS): port 445 (TCP and UPD).

After this, you should be good to go. I got this information from this post, or you can go to this KB article from Microsoft as well.



Wednesday, November 30, 2011

I came across this great article on the future of Silverlight. I'm guessing the same thing can be said about Flash. It's interesting to see how technologies that are widely adopted slowly end their life cycle when disruptive technologies appear. Those disruptive technologies (i.e. HTML 5 and JavaScript) usually don't appear overnight, and it takes a while before they are fully adopted. In the end, it's all about reliability, security and performance.

Tuesday, November 29, 2011

Thoughts on JQuery Mobile

I recently had the opportunity to use JQuery Mobile. I've got to say it's a great product, and even though the first release just came out, it's stable and robust. However, if you're going to use it you need to consider that it has some quirks, and you'll need to resolve those manually until they get fixed in the next release (which come out really often, maybe once a month lately). Still, the advantages outweight the disadvantages.


The most important thing you get is a cross-platform framework that leverages development over customization. Yes, you might need to spend more time in UI development than functionality, but at the same time it allows you to deliver functionality quickly and get feedback from your clients. The analogy that comes to my mind is building blocks: JQuery Mobile provides you with pieces of code that you just need to put together!

Sunday, November 20, 2011

Copy and Paste is evil

I consider copy and paste of code one of the most common sources of bugs and bad coding practices. First of all, let's talk about bugs. If you copy and paste code, it's likely you're doing it because you don't know what the code is doing; you only know that it works. You only know that it works, and copying and pasting is easier than re-typing. However, adding code without knowing what it does is a recipe for disaster. A couple of days ago I spent 5 hours troubleshooting code that another developer "copied and pasted". If you're going to copy and paste, at least make sure that you read the code you just copied and pasted.

Moving on bad coding practices. Well, this is an easy one. Duplicate code means that any change needs to happen in 2 different places, and you don't want that. You want classes with clear boundaries, otherwise your code will soon become a big ball of mud.