inicio mail me! sindicaci;ón

Gmail feature that everyone should know about…

Just about when I thought I got everything out of Gmail, I discovered my top favorite feature. We have published over 30 tools in Gmail RoundUp 1 and almost 80 tools and tips in Gmail RoundUp 2 but never mentioned anything similar to this one. Tribute for this one goes to my ‘I am not into computers‘ type girlfriend.

Let’s say that your email address is ‘GeorgeBush@gmail.com’, basically everything sent to any of the following email addresses will be forwarded to your primary email.

    * GeorgeBush@gmail.com
    * G.eorgeBush@gmail.com
    * Ge.orgeBush@gmail.com

      …
      …
    * GeorgeBus.h@gmail.com

    * GeorgeBush@googlemail.com
    * G.eorgeBush@googlemail.com
    * Ge.orgeBush@googlemail.com

      …
      …
    * GeorgeBus.h@googlemail.com

And that’s not all, you can place as many dots as you want, it can be even something like ‘G.e.o.r.g.e.B.u.s.h@gmail.com’ and you’ll still get it on ‘GeorgeBush@gmail.com’

Additionally, I just also found out that you can embed random text to your email ID using ‘+’ sign. That is to say ‘GeorgeBush+anythingyouwant@gmail.com’ can be used as your email address, as well.

Ok I got it. Now what ?

1. One email for every purpose

Instead of using different email addresses for various purposes (work, school, friends, etc.) you can use different variations of your Gmail and filter incoming mails by ’sent to’ address. For instance, all incoming mail sent to ‘Name.Surname@gmail.com’ can be put to folder ‘work’, messages sent to ‘NameSurname@gmail.com’ can be put to ‘friends’, ‘N.ameSurname@gmail.com’ can be used for newsletters, and so on.

2. Track/Block spammers

When signing up for some website, say thatwebsite.com, you can add thatwebsite to your Gmail user ID (eg. GeorgeBush+thatwebsite@gmail.com). This way you can block your subscription whenever you want and even identify those websites that distribute your email address to spammers.

Source: http://www.makeuseof.com/tag/1-awesome-gmail-tip-you-dont-know-about-seriously/

MBTA.com a multi-award winner!

After months of exhaustive days, nights and weekends spent re-designing and re-developing the updated MBTA.com website, the work put in by myself and the rest of the team at RDVO has seen the ultimate fruition. The site was named the 2007 Webby Award Winner for best Government website and the 2007 MITX award winner for government sites.

This is huge news for everyone who was involved in this project. This was a daunting undertaking that had it’s ups and and downs, exhaustion and frustration, but ultimately the satisfaction in achieving the ambitious goal we set out to achieve - building the best damn transport out there!

Congratulations to the RDVO team that worked on the MBTA project:

Dana Giuliana, Project Director
Kai N. Sounthala, Technical Lead
Charles Crawford/Marcos Elugardo, Development Team
George Kalos/Ari Kalogeropoulos/Brian Fleming, Production Team
Michael Demopoulos, Creative Director
Sabih Mir/Corey Machanic, Graphic/UI Designers
Jared Kelleher, Writer

NDOC for .NET 2.0 Documentation

If you’re looking for clean MSDN-like documentation tool for .NET, NDOC is way to go. Unfortunately development for the tool stopped in Feb 2005. There are a few commercial products as well, but I really was not impressed after playing with a few trials.

The latest release of NDOC version 1.3.1 is only compatible up to .NET 1.1. Microsoft appears to have a new tool for .NET documentation called Sandcastle but after spending an hour of trying to get it setup, time to move on.

I finally found someone who wrote a version compatible with .NET 2.0, NDOC 2.0 Alpha. Despite being an Alpha version, the tool works great, was very familiar and did the job, all for less then 1MB of download.

Screenshot of the application.

Screenshot of output MSDN Chm Help file.

PHP Detect Mobile Browser script

Below is a useful script I used for detecting mobile browsers.

// Detects if browser is mobile or not
$mobile_browser = '0';
if(preg_match('/(up.browser|up.link|windows   ce|iemobile|mmp|symbian|smartphone|midp|wap|phone|vodafone|o2|pocket|mobile|pda|psp)/i',strtolower($_SERVER['HTTP_USER_AGENT']))){
 $mobile_browser++;
}
if(((strpos(strtolower($_SERVER['HTTP_ACCEPT']),'text/vnd.wap.wml')>0) or (strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml')>0)) or ((((isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or isset($_SERVER['X-OperaMini-Features']) or isset($_SERVER['UA-pixels'])))))){
 $mobile_browser++;
}
$mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4));
$mobile_agents = array('acs-','alav','alca','amoi','audi','aste','avan','benq','bird','blac','blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno','ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-','maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-','newt','noki','opwv','palm','pana','pant','pdxg','phil','play','pluc','port','prox','qtek','qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar','sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-','tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp','wapr','webc','winw','winw','xda','xda-');
if(in_array($mobile_ua,$mobile_agents)){
 $mobile_browser++;
}
if($mobile_browser>0){
 //mobile site
}else{
 //not mobile site
 header( 'Location: http://www.web_address.com/' ) ;
}

Useful Javascript/DOM Tools

DOMTool v1.1 | Muffin Research Labs

Here’s a great tool that will generate the necessary DOM scripts to create whatever HTML you want

http://muffinresearch.co.uk/code/javascript/DOMTool/

.NET Custom HTTP Handlers

ASP.NET provides a nice way to avoid it’s full web control lifecycle. Why would you want to do this? Well, I found it most useful for doing AJAX work. For example, I have a javascript function I need to have ansynchronously call ASP.NET and return some data to update a HTML elements. In ASP Classic, PHP, Coldfusion, whatever, this is straightforward, the page gets called and some data is outputed. Using Prototypes Ajax.Request I would write the following,

function getSomeData(parameter1) {
  var url = '/file_path/file_name.php';
  var pars = 'param='+parameter1;
  var myAjax = new Ajax.Request(
     url, {
       method: 'get',
       parameters: pars,
       onComplete: doSomethingWithData
       }
     );
}

With ASP.NET I could do the same with an ASPX page, but the request would go through the web control model, which adds overhead. So writing a custom HTTP Handler is one solution. Now there are a few ways to get this setup, but I will use the way I think is most straight-forward.

The first thing you’ll do is create a new class and place that class in the App_Code folder. Below is an example of a very simple class that returns data that will be consumed by the javascript function above. Within Visual Studio add a new class to your App_Code directory and call it, myhttphandler.cs.

using System;
using System.Web;

namespace MyHttpExtensions
{
  public class HandlerExample : IHttpHandler
  {
    public void ProcessRequest(System.Web.HttpContext context)
    {
      HttpResponse response = context.Response;
      response.write("Data to be use by javascript..data...data..");
    }
    public bool IsReusable
    {
      get {return true;}
    }
  }
}

After you have the class created, within Visual Studio you can create a file called a Generic Handler (file extension .ASHX), which you can put in your application directory. This file looks like,

  < %@ WebHandler Language = "C#"
           Class="MyHttpExtensions.HandlerExample" %>

The class name corresponds to the class you created in your App_Code folder. And there it is, you can now request a ASP.NET page which is very light-weight and avoids normal web control processing.

Web/Application Development on a dime

Gone are the days of spending big $$$ on expensive software to manage, develop and deploy web sites, web apps and software. There are so many inexpensive and open-source solutions for source-control, bug-tracking and project management, that there is no excuse, whether you are a three-person or 50-person shop, to be without these invaluable tools.

The list below is be no means complete, but does include the tools I use.

  1. Source Control

    First and foremost for any development task is source control for every piece of code, documentation and proposal that you write. There are many solutions out there and I’ve used a number of them including, CVS, SourceSafe, Perforce and Subversion. But taking into consideration cost, ease-of-use and setup, Subversion is by far my favorite. Subversion is an open source versioning control system released under an Apache/BSD-style license.

    There are tons of great clients for the system, including,

    • SmartSVN
      Client runs on OS
    • TortoiseSVN
      Software integrates with Windows Explorer, exposes all functionality via the explorer tree
    • VisualSVN
      Integrates with Visual Studio 2003 and 2005.

    I’ve used all of these but my personal preference is SmartSVN. Subversion is currently only available on Linux and Mac, but this really doesn’t matter. Hosting companies like Dreamhost, along with other includes features has one-click installation of Subversion. So for $10/month you can setup your own source-control, with the added benefit of hosting in 24 hours.

  2. Project Management

    Both a developers worse nightmare and savior, project management software is a piece of development with the bottom-line of, “get your shit done and preferably on-time”. In my experience, I have used my $.30 notebook, MS Excel, my own custom built tool and even the monster of an application MS Project but they all just seemed to be more a hassle than help. So unless you’ve been on a big rock for the last year, you’ve probably heard of BaseCamp put out by 37Signals. BaseCamp is simple, straight-forward, easy to use, is built using Ruby-on-Rails, is cheap, etc etc… This tool is really everything that I need and doesn’t include anything that I don’t need. The cost ranges from FREE to $149/month, depending on how much storage and many features you need.

  3. Bug Tracking

    When cost is an issue and your development team is made up of three people, open-source applications as Bugzilla and inexpensive web 2.0 applications as 16bugs become invaluable. Both of these applications are really quite adequete but very specific in their target audience. 16bugs is “web 2.0-ish”, very usable, as simple as can be and takes all of 3 minutes to setup. I’ve had a few email exchanges with “the” developer/creator of the application and he/she is very receptive of feedback. You create a company, create projects, create custom fields, categories and your off to many more years of carpal tunnel. Overall it’s perfect for the small development team, but my only gripe, why in the world can’t I create a custom drop-down menu field? Only text boxes? Oh well, maybe in a future release. So if your bug tracking needs are simple, simple 16bugs is perfect. Bugzilla on the complete opposite end if free, packed with features, security and privileges/roles, so I won’t say any more than that. If you want a fairly complete bug-tracking application, you can’t go wrong with Bugzilla.

Prototype library examples

The Prototype library, including script.aculo.us and a few others are a critical part of my development toolbox. These Javascript frameworks provide the foundation for creating interactive, usuable, fast and light-weight web-applications. Below are just a few examples of functions I use all the time.

  1. Ajax.Request
    Take a look at the two functions below. Using the Ajax.Request method you can call a processing file, all that processing file needs to do is output some text who response is passed to the onComplete function, displayProcessIt() and from there, you can generate a complete page of data, hide/show lists elements, divs, whatever you need.

    function processIt(){
      var url = '/path/processing_file.aspx';
      var pars = 'param1='+param1Val;
      var myAjax = new Ajax.Request( url, { method: 'get', parameters: pars, onComplete: displayProcessIt });
    }
    function displayProcessIt(strData){
      var strResponse = strData.responseText
      // Do whatever you want with this data on the client
    }
    

    All I know is after I learned how to use this one piece of functionality, my development become that much easier. That’s not to say this technique is ground-breaking or new, I know I’ve written enough “kind-of-does-this” code over the years.

  2. Element.show(), Element.hide(), Element.toggle()

    Yes, I know these are very self-explanatory, but these are three sweet gems. All you do is create a pointer to an element by it’s ID and there you go, hide, show, toggle, beautiful…

    function doSomething(e1){
      Element.toggle($(e1));
    }
    

    Using $ creates a reference to that object by id and toggle…well, it toggles the display of the referenced element.

JSON, GDownloadUrl & Windows 2003 Server

I found out the hard way that JSON files are not a recognized mime type by Windows 2003 Server (IIS 6.0), where references to those same files on XP Pro (IIS 5.1) renders just fine. I came across this bug when doing customizations to the Google Map API, rendering area maps using the GDowloadUrl (Using XML and Asynchronous HTTP with Maps) and the light-weight JSON files. Anytime I parsed through the JSON file and called GDowloadUrl, I would get a file not found error. Sure enough, pasting the complete URL to the JSON file into FF, resulted in File not found…error…error….

The solution was straight-forward enough. Open IIS Manager and under the HTTP Headers tab > MIME Types, add the custom .json and restart IIS.
Adding a new mime type

The JSON format, if you haven’t used it, is a light-weight technology indepenedant data-interchange format that uses conventions found in languages including C, C++, C#, Java, JavaScript, Perl, Python, and many others. If you’re familiar with XML, JSON is just as structured and human-readable, well as readable as it can be. Check out the JSON website for documentation and examples.

An area where you’ll see more and more people using the JSON format is AJAX, specifically to speed-up calls back and forth from the server. A good article to get you started is Speeding Up AJAX with JSON.

Return XML from database query

By appending FOR XML auto to the end of your sql statement you can have your sql recordset returned as XML. A very useful utility.

SELECT * FROM [Table Name] FOR XML auto

Depending whether you pull from one or multiple tables, your output is structured XML based on the database schema. In situations we you are joining two tables there are two ways to have data returned in a clean way, (1) User a View or (2) User sub-queries.

· Next entries »