Oct312008

Better regular expression for URLs

Published by guillermo at 4:00 PM under Development | Process & Methodology

Via Jeff Attwood's post, in summary (because his posts tend to be very, hmm, thorough):

  • The primary improvement here is that we're only accepting a whitelist of known good URL characters. Allowing arbitrary random characters in URLs is setting yourself up for XSS exploits, and I can tell you that from personal experience. Don't do it!
  • We only allow certain characters to "end" the URL. Ending a URL in common punctuation marks like period, exclamation point, semicolon, etc means those characters will be considered end-of-hyperlink characters and not included in the URL.
  • Parens, if present, are allowed in the URL -- and we absorb the leading paren, if it is there, too.
  • The regular expression is:

    \(?\bhttp://[-A-Za-z0-9+&@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#/%=~_()|]



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Oct302008

    The perfect code comment

    Published by guillermo at 10:00 PM under Development

    Via a dear friend of mine, this gem was made available for my enjoyment in all coincidence written the day of my birthday, and since being selfish is not in my nature I decided to share it with the five of you (literally).

    codeComments



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Oct262008

    Framework 3.5 Enhancements (SP1) Training Kit

    Published by guillermo at 10:18 PM under Technology | Development | Process & Methodology

    I love these as a quick, hands on way (my favorite) to get up to speed with skills and technology you may otherwise miss or take longer to catch up to.

    Here is the training kit from the horse’s mouth:

    The .NET Framework 3.5 Enhancements Training Kit includes presentations, hands-on labs, demos, and event materials. This content is designed to help you learn how to utilize the .NET 3.5 Enhancement features including: ASP.NET MVC, ASP.NET Dynamic Data, ASP.NET AJAX History, ASP.NET Routing, ADO.NET Data Services, ADO.NET Entity Framework, WCF 3.5 SP1, and the .NET Framework Client Profile.

    Download the kit from here.



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: , , , , , ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Sep232008

    Free Source Code Analysis from Microsoft.

    Published by guillermo at 9:14 PM under Development | Tools

    I recently came across Microsoft StyleCop, that analyzes the code, within the IDE for style.  This includes things like naming conventions, formatting and other matters of visual appeal.  It differs from FxCop in that it doesn’t check for use patterns, it simply checks style. 

    I’ve been looking at this tool in order to implement it at work, where we have a pretty consistent and adhered to coding standard, who’s style enforcement could be done by a tool and save some people some time.

    In any case, I am sure most of you are familiar with it but I deemed it worth noting, writing about and referencing.

    The team’s blog is a great resource for help, release announcements, and general information about the tool.

    The tool itself is available here in its latest 4.3 release



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: , , , ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Sep182008

    Introducing SQL Server 2008 Free eBook

    Published by guillermo at 10:00 PM under Development | Technology

    Me and my addiction to books, especially FREE books.  Sorry.

    Go to the Microsoft SQL Server 2008 Learning Portal, click on Special offers (or scroll down a bit), and follow the link.

    Via the author's blog post.



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Sep032008

    Free Data Structures and Algorithms Book

    Published by guillermo at 12:15 PM under Development

    Draft version, PDF delivered, Free.  I don't need to "sell it" to you do I?

    DSA Book



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Aug222008

    Surface Application Demo

    Published by guillermo at 6:00 PM under Development | Technology

    I'll never tire of watching and being blown away by the technology available on the Microsoft Surface platform.  The application demoed is a WPF (official WPF site) application for the healthcare industry.

    This is a quick 5 minute video worth every second.



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: , , ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Aug212008

    .NET Framework 3.5 Enhancements Training Kit

    Published by Guillermo at 6:00 PM under Architecture | Development | SOA, WCF | Technology | Tools

    Quick note to link to the training kit released with the advent of .NET 3.5 SP1.

    Complete kit with presentation & events materials, hands on labs and demos on:

    • ASP.NET MVC
    • ASP.NET Dynamic Data
    • ASP.NET AJAX History
    • ASP.NET Routing
    • ADO.NET Data Services
    • ADO.NET Entity Framework
    • WCF 3.5 SP1
    • .NET Framework Client Profile


    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: , , , , ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Aug202008

    Go Deep With One Click or Two

    Published by guillermo at 6:00 PM under Development | Tools

    One feature in Visual Studio 2008 I found myself using frequently is this:

    Right Click on the project in your project explorer, and the next to last option in the context menu is...

    OpenFolderInWindowsExplorer

    When building systems made up of many components that need to be "shuffled" around, from and to many solutions, across different locations for different reasons, it becomes a handy tool.



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses

    Jun102008

    blogengine.net socialbookmarks extension

    Published by Guillermo at 9:00 PM under Blogging | Development

    Just now, about an hour ago or so, I noticed my blog was down... i.e. ugly nasty ASP.NET yellow screen.  So I set out to quickly investigate and determine the root cause of the problem, and that I did.

    Suddenly, for now reason at all.. literally.. I was getting a "Input string was not in a correct format." error

    Nothing changed, nothing, nothing... unless my system was somewhat compromised... so WTF??

    inputSringWasNotInACorrectFormat

    My temporary solution was to disable that extension (by moving the .cs file out of the extensions folder in the App_code directory, out to another folder).

    I will need to further dig into this, unless it is something so evident that I am missing and that my currently fried brain is not processing correctly.

    kick it on DotNetKicks.com  



    [KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

    Tags: , ,

    E-mail | Permalink | Trackback | Post RSSRSS comment feed 0 Responses