Navigation

Search

Twitter Updates

    follow me on Twitter

    Categories

    On this page

    Using a productivity tool like ReSharper or CodeRush
    The Big Design Conference in Dallas
    My Dot Net Developer’s tools list, and more…
    Creating MSDN like help using Sandcastle
    "We Are Microsoft Charity Challenge".Equals("Awesome Geeking weekend")
    JavaScriptSerializer - UnDeprecated with .Net 3.5 SP1
    Dallas TechDays - Developer Track
    Removing unused CSS Classes from your web application

    Archive

    Blogroll

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    RSS 2.0 | Atom 1.0 | CDF

    Send mail to the author(s) E-mail

    Total Posts: 28
    This Year: 5
    This Month: 0
    This Week: 0
    Comments: 15

    Sign In

     Saturday, June 06, 2009
    Saturday, June 06, 2009 2:07:17 PM (Mountain Standard Time, UTC-07:00) ( )

    At the C# SIG meeting in Dallas last week, David mentioned something really interesting about using a productivity add-on such as ReSharper or CodeRush. I think his exact quote was:

    “If your not using a productivity tool, you’re ripping off your customers and wasting your time”

    While I have met and worked with many ReSharper/CodeRush users in the past and talked about the value that such tools add, the sentiment has never been so strongly expressed. I have been playing around with both the tools over the last several months and am a happy ReSharper user now. I found CodeRush to have a lighter memory footprint, but the graphics and effects just got in the way of my work. ReSharper, on the other hand, was very usable and intuitive and had a minimal learning curve. Your experience might vary, but I would encourage you to take both the tools for a spin and try using one, if you are not already doing so.

    Coming back to David’s statement, I think I agree with him more or less. Not only can you save some serious time by using such a tool, these add-ons generally encourage you to write cleaner code. You also deliver more value to the client in less time, and that could possibly lead to better feedback, more projects or recommendations to other  clients.

    kick it on DotNetKicks.com
     Saturday, May 30, 2009
    Saturday, May 30, 2009 6:32:09 PM (Mountain Standard Time, UTC-07:00) ( )

    I just came back from the Big Design Conference held today in Dallas, and my brain is just flooded right now with all the information I picked up on different design and development topics. It was one of the most well organized conferences I have been to, with 4 parallel tracks (Social Media, Code Development, User Experience and Strategy) going on throughout the day. The hardest part was to pick a session out of the different choices to go to. I ended up attending Chris Koenig’s session on touch based apps, Stephen Anderson’s talk on seductive interactions, Caleb Jenkins’ Silverlight 3 talk and Todd Wilken’s session on saying No and learning. All sessions had great content and I even got to play with a Microsoft Surface Unit, which was again very impressive but is still very expensive (~$12K-15K) to own a personal unit.

    There were lots of Macbooks (designer conference, duh) and netbooks being used in the audience, and the conference twitter stream was buzzing throughout the day with reviews and feedback from the attendees. The conference organizers even had the twitter stream displayed to the public in the hallway.

    bigd[1]

    This just goes on to show the increasing importance of social media like twitter at such events. Overall, it was a great experience and I got to meet some really interesting people in the Dallas area as well as attend great presentations. A big thanks to the organizers for arranging this.

    kick it on DotNetKicks.com
     Saturday, May 23, 2009
    Saturday, May 23, 2009 4:42:33 PM (Mountain Standard Time, UTC-07:00) ( asp.net | Better Developer | utilities )

    I gave a brownbag presentation at my current client recently about the common tools (in addition to Visual Studio), that I use on a regular basis for working with .NET or web development in general. I also threw in some non-development tools that are a part of my day to day life and make things easier. Here’s the complete list:

    Note: For a completely awesome and Ultimate Developer’s tool list, be sure to check out Scott’s blog post.

     

    .NET

     

    Name

    Description

    Comments

    ClrProfiler

    The CLR Profiler includes a number of very useful views of the allocation profile, including a histogram of allocated types, allocation and call graphs, a time line showing GCs of various generations and the resulting state of the managed heap after those collections, and a call tree showing per-method allocations and assembly loads.

    Working with Cassini

    DebugDiag

    The Debug Diagnostic Tool (DebugDiag) is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or fragmentation, and crashes in any Win32 user-mode process. The tool includes additional debugging scripts focused on Internet Information Services (IIS) applications, web data access components, COM+ and related Microsoft technologies.

    Troubleshooting .Net 2.0 memory leaks.

    FxCop

    FxCop is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines.

     

    LibCheck

    This tool allows you to compare two versions of an assembly, and determine the differences. The tool reports the differences as a combination of 'removed' and 'added' APIs.

     

    NDepend

    NDepend is a tool that simplifies managing a complex .NET code base. Architects and developers can analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code.

    Has Academic, commercial versions.

    PEX

    Right from the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage. Pex performs a systematic analysis, hunting for boundary conditions, exceptions and assertion failures, which you can debug right away. Pex enables Parameterized Unit Testing, an extension of Unit Testing that reduces test maintenance costs.

    Reflector

    .NET Reflector enables you to easily view, navigate, and search through, the class hierarchies of .NET assemblies, even if you don't have the code for them. With it, you can decompile and analyze .NET assemblies in C#, Visual Basic, and IL.

    Be sure to check out the Addins

    Regulator

    The Regulator is an advanced Regular expressions testing tool, featuring syntax highlighting and web-service integration with Regexlib.com's database of online regular expressions.

     

    Resharper

    ReSharper provides solution-wide error highlighting on the fly, instant solutions for found errors, over 30 advanced code refactorings, superior unit testing tools, handy navigation and search features, single-click code formatting and cleanup, automatic code generation and templates.

    • Free 30 day trial, Full Edition: $199, C# Edition: $149.
    • CodeRush Express is a similar free alternative, but I prefer Resharper.

    SandCastle

    Enables managed class library developers to easily create accurate, informative documentation with a common look and feel.

    Simple how-to.

    ViewState Helper

    Lets you debug ViewState issues by displaying Page and viewstate details for an asp.net page.

    Alternative

    Web Development Helper

    Web Development Helper is a free browser extension for Internet Explorer that provides a set of tools and utilities for the Web developer, esp. Ajax and ASP.NET developers. The tool provides features such as a DOM inspector, an HTTP tracing tool, and script diagnostics and immediate window.

     

    WinDbg

    Microsoft Windows Debugger (WinDbg) is a powerful Windows-based debugging tool. It is capable of both user-mode and kernel-mode debugging.

    Excellent blog to learn more.

     

     

    Web Development

     

    Name

    Description

    Comments

    CssCleaner

    Detect unused css classes in your website (static analysis).

    Written by yours truly :). Need to add more features to this and maybe change the UI to WPF.

    Design

    Design is a suite of web-design and development assistive tools which can be utilised on any web-page. Encompassing utilities for grid layout, measurement and alignment, Design is a uniquely powerful JavaScript bookmarklet.

     

    Fiddler

    Fiddler logs all HTTP(S) traffic between your computer and the Internet and Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

    Firebug

    Firebug integrates with Firefox to put a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

    JSLint

    With JavaScript Lint, you can check all your JavaScript source code for common mistakes without actually running the script or opening the web page.

     

    XRAY

    XRAY is a bookmarklet for Internet Explorer 6+, and Webkit and Mozilla based browsers (including Safari, Firefox, Camino or Mozilla). Use it to see the box model for any element on any web page.

     

    Xenocode.com

    Run any browser (IE 6-8, FF 2,3, Opera, Chrome, Safari) directly from the web.

    • This is the best and easiest way I have seen to run multiple versions of IE on your box, but their service seems to be down lately.
    • Other options are to use a virtual machine or a program like Multiple IE.

     

     

    SQL Development

     

    Name

    Description

    Comments

    AnjLab SqlProfiler

    SQL Server Express Edition Profiler provides the most of functionality standard profiler does, such as choosing events to profile, setting filters, etc.

    This is good while working with Sql Server Express, which does not come with a profiler.

    SqlAssist

    Adds Sql Intellisense to Sql Server Management Studio and Visual Studio.

    • Free 30 day trial, pricing here.
    • Sql Server 2008 has inbuilt intellisense.
    • SqlAssistant is a good alternative for working with multiple database environments.

     

     

    Generic Useful Tools

     

    Name

    Description

    Comments

    AutoHotKey

    Automate sending keystrokes and mouse clicks by creating/recording macros.

     

    Bart's Preinstalled Environment (BartPE) bootable windows CD/DVD

    Bart's PE Builder helps you build a "BartPE" (Bart Preinstalled Environment) bootable Windows CD-Rom or DVD from the original Windows XP or Windows Server 2003 installation/setup CD, very suitable for PC maintenance tasks.

     

    Daemon Tools

    To use virtual drives.

     

    Instapaper bookmarklet

    Instapaper allows you to easily save urls for later, when you have time, so you don’t just forget about them or skim through them.

     

    IrfanView

    IrfanView is a very fast, small, compact graphic viewer.

     

    KDiff

    Compare, Merge files and directories.

     

    Notepad++

    Notepad++ is a free source code editor and Notepad replacement that supports several languages.

     

    Paint.Net

    Paint.NET is free image and photo editing software for computers that run Windows.

    I use this instead of MS Paint for simple tasks.

    Portable Apps

    Carry your favorite computer programs along with all of your bookmarks, settings, email and more with you. Use them on any Windows computer. All without leaving any personal data behind.

     

    ProcessExplorer

    Process Explorer shows you information about which handles and DLLs processes have opened or loaded.

    This has replaced my task manager for the last couple of years.

    SlickRun

    SlickRun is a free floating command line utility for Windows. SlickRun gives you almost instant access to any program or website.

     

    Synergy

    Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It's intended for users with multiple computers on their desk since each system uses its own monitor(s).

     

    Videora Converter

    Videora Converter is a free video converter that converts video files, YouTube videos, movies and DVD's so you can play them on your video playing device.

     

    VLC media player

    Multimedia player.

    Plays most video formats out of the box.

    Winamp music player

    Mp3 music player.

    This supports global hotkey bindings, so I can use use my keyboard to change track, volume without bringing it in focus.

    Windows Live Mesh

    Keep files and folders in sync on multiple devices.

     
    kick it on DotNetKicks.com
     Friday, April 17, 2009
    Friday, April 17, 2009 6:19:14 AM (Mountain Standard Time, UTC-07:00) ( .net | sandcastle )

    Just follow these simple steps ( I am using the Ajaxcontroltoolkit library as an example here)

     

    1. Download Sandcastle (http://www.codeplex.com/Sandcastle).

    2. Download and install Sandcastle Help File Builder (http://www.codeplex.com/Wiki/View.aspx?ProjectName=SHFB).

    3. Check http://www.ewoodruff.us/shfbdocs/Index.aspx?topic=html/8c0c97d0-c968-4c15-9fe9-e8f3a443c50a.htm for other requirements. If you have Visual Studio installed, you should probably be good.

    4. Run SandcastleBuilderGUI.exe, Create a new project and save it in the same location as your solution file. You can add it to the solution for easier version control maintenance.

    5. Add your main assemblies to be documented using the Add button. Make sure your Visual studio project for that assembly is set up to generate xml documentation file (Project->Properties->Build->XML Documentation file should be checked).

    6. In Project Properties within Sandcastle Help File Builder

    a. Under Build -> Dependencies, Add the folder containing all the referenced assemblies, or add them individually.

    b. Select the correct version under Build ->FrameworkVersion.

    c. Under Build -> HelpFileFormat, choose the output type (chm and/or website).

    d. Under Help File, you can add things like copyright, header, footer, feedback email address etc.

    e. Set visibility for different type of members under Visibility.

    7. At this point you can build project within Sandcastle Help File Builder to create help file manually. You can see an example of sample output here.

    8. To create the help file from the command prompt, use SandcastleBuilderConsole.exe and pass the path to the help project file as a parameter. E.g.

    "C:\Program Files\EWSoftware\Sandcastle Help File Builder\sandcastlebuilderconsole.exe" "C:\utils\libs\ajaxcontroltoolkit_help.shfb".

    This can be used in a post-build event to automate the generation of help files.

    kick it on DotNetKicks.com
     Saturday, January 24, 2009
    Saturday, January 24, 2009 2:38:53 PM (Mountain Standard Time, UTC-07:00) ( )

    I was one of the participants last week at the We Are Microsoft Charity Challenge Weekend here in Dallas. The event was organized very well by Toi Wright with support from MS Developer Evangelist Chris Koening . The idea was to build or enhance a charity's  Website (chosen by MS) within the weekend and give a 5 minute presentation on Sunday about the work done.
    Our team was called 4 Devs, a Designer and a non-profit. The developers were Reza,  Tuan, Tim and  myself. We were lucky to work with Hillyer, a designer whose input really improved the look and feel of our work. And finally, the charity we worked for was The Child Abuse Prevention Center. Here's a team picture minus Tuan who fell ill on the last day.

     
    (L to R) Hillyer, Chris, Reza, myself and Tim

    Our goal was to completely redo the Website to give it a Web 2.0 look and feel and add some new features such as users and membership roles as well as a calendar module on the side. The overall task seemed too big to manage within a weekend, but I think we did pretty OK. Here's our final output that we demoed at the presentation.
    We were pretty much feature complete on sunday, and had some really cool features going for us including built in multi-language support and  on the fly translation capabilities using Rick Strahl's awesome Localization Resource Provider.
    Even though we didn't grab a place in the top 3 teams (there were a total of 20), I got to meet some great people, do some networking, eat great food and load up on caffeine. I also landed a Visual Studo 2008 Pro license as a door prize, and my teammate Tim nominated me for a cool "Coding Machine" award for staying up and coding through Saturday night. We still have some improvements to do on the site, and a lot of refactoring. We are going keep on working together till our client is happy with the output and gets all his features. If you get a chance to participate in an event like this, I highly recommend it. Check out http://givecamp.org/ for more information.

    kick it on DotNetKicks.com
     Sunday, December 07, 2008
    Sunday, December 07, 2008 5:37:49 PM (Mountain Standard Time, UTC-07:00) ( .NET 3.5 )

    Just wanted to mention that JavaScriptSerializer, which was marked as obsolete in .Net 3.5, seems to be restored back to normal status with SP1. Besides checking in the object browser, the only confirmation I found for this was a comment by Scott Gu on this blog post.
    This is good news since JavaScriptSerializer does seem simpler to use and can handle anonymous types as well. Its alternative DataContractJsonSerializer is meant more for use with WCF.

    kick it on DotNetKicks.com
     Wednesday, November 19, 2008
    Wednesday, November 19, 2008 6:08:49 PM (Mountain Standard Time, UTC-07:00) ( )

    I just came back after attending the developer track at Dallas TechDays. It was a really good session. Zain Naboulsi was the main presenter, and man can this guy talk! He gave a 3 part presentation by himself that spanned to almost 4 hours. Here's a picture I clicked with my cellphone during one of the breaks when he was answering audience queries.

    Here's a brief break up of his talk today -

      • Sql Server 2008 New Features
        • Spatial Data
        • Table variables
        • MERGE clause
        • new DateTime Datatypes
        • Entity Framework (not exactly part of Sql Server 2008, but he covered this anyways)
      • VSTO
        • Improvements in VSTO for VS2008
        • Sample Addins for Office 2007 using VSTO
      • Silverlight
        • Improvements in Silverlight 2.0
        • Simple Animations using VS2008 and Blend simultaneously

    It was a great interactive session, and everybody was impressed with Zain's breadth of knowledge over the different technologies. Some people did want more coding in the Silverlight session, and he promised to follow up on his blog with that. The Dallas asp.net user group president Toi Wright also mentioned the Microsoft Charity Challenge weekend in January where you get to code for you favorite charity over a weekend (Jan16-18, 2009). I have already registered for that and looking forward to a fun filled weekend.

    Also, all attendees today walked off with a free Windows Vista Ultimate, so that's always good :).

    kick it on DotNetKicks.com
     Wednesday, October 01, 2008
    Wednesday, October 01, 2008 7:46:35 PM (Mountain Standard Time, UTC-07:00) ( asp.net | css | utilities )

    Most of you might have seen that while working on a Website project, the CSS gets harder to maintain as the site ages. This might be due to new developers coming in to the project, removal of UI elements (but not the corresponding CSS), refactoring and so on. I think it is a good idea to revisit and clean your css every few weeks before it becomes totally unmanageable. In this post, i am going to outline 2 ways to do so
    There is a great Firefox plugin called Dust-Me Selectors which can test individual web pages or spider your Website to find unused CSS selectors. As you navigate from page to page in your Website, it maintains a list of unused CSS selectors that you can remove.
    If for some reason you cannot use the plugin, or would like to be more sure, I have also created a small utility (for personal use) that can parse a CSS file to create a list of defined classes and go through the code base to determine which of those classes are actually being used. This utility usually gives me a list of unused CSS classes with an accuracy of greater than 95%. It cannot give a 100% accurate output in cases where the css classes are being assigned dynamically in JavaScript or server side code (it catches some of them, but not all). But it gives you a great starting point. I normally search my codebase for the CSS class name before commenting it out from the CSS file to be sure its not being used in the code anywhere. I delete the commented out CSS classes after a couple of releases if I do not see any issues.
    You can download the utility (named CssCleaner) from here. Please remember that this does not come with any kind of warranty, I am just sharing this so that it can be helpful to somebody in a situation similar to mine.
    CssCleaner is pretty simple to use. Download the app, unzip it to a folder on your system. You should see 2 files - CssCleaner.exe and CssCleaner.exe.config. The config file is needed by the application and is present to make a couple of things configurable. I'll talk more about it in a second.


    After you run the application, click on "Choose Application Folder" and choose the code base folder for your Website. Click on "Choose CSS File" and select the CSS file that you want to analyze. Change the File Filter if you would like to process files different from the default types. Leaving that textbox blank processes all files. Click on "Process" to run the utility. The unused classes get loaded on the right hand side. In my use, the tool has been pretty fast.
    If anybody is interested in the implementation, i use a parser/scanner to parse the CSS file similar to this. Then I go through all the files in the code base, building a list of  used CSS classes using a regular expression. The regular expression is picked up from the config file, so you can tweak it as you find suitable. The other thing picked up from the config file is the list of default file types to search for. It then compares the used CSS class list against the available CSS classes and displays the unused classes list.
    If you have any suggestions for the tool, or find any bugs, please leave a comment or email me (latish.sehgal at gmail dot com) and I'll try my best to implement it. I hope that you find this tool helpful.

    kick it on DotNetKicks.com