Latish Sehgal

Dot Net Stuff from the DotNetSurfer
Moving Blog to www.DotNetSurfers.com
I am now blogging only at www.DotNetSurfers.com, since cross-posting at 2 different locations was kind of a pain. You can continue reading my posts there.
-Latish Sehgal
CodeMash 2010: Review

I am sitting at the Cleveland airport right now, waiting for my flight back to Dallas. I spent the last 3 days at the CodeMash conference held at the Kalahari resorts in Sandusky, Ohio. This was the biggest (and longest) conference that I have been to. It was exhilarating to be surrounded by and talk to such passionate developers. You could feel the high energy levels throughout the conference. Some of the highlights for me were:

  • Bootstrapping your business session with Nate Kohari and James Avery: I have great respect for entrepreneurs, and more so for those with a coding background. Nate and James shared things that worked for them in their ventures, and a lot of things that didn’t. The session was very interactive, and a great start to the conference for me.
  • Ruby/IronRuby: One of my goals for going to CodeMash was to decide if I am going to spend any significant amount of time trying to learn Ruby/IronRuby this year. The passion that a lot of the developers (especially the EdgeCase folks)  had for Ruby was definitely contagious and hard to ignore. I ended up attending a couple of Ruby sessions and I hope to spend more time with it in the next couple of months. The best Ruby session for me was “Ruby and Rails for the .Net developer” by Matt Yoho.
  • Meeting more geeks: I got to meet a bunch of great people I knew from twitter, and some more.
  • Amazon Ninja puzzles: Amazon had the best vendor booth IMO. They had programming related puzzles for you to solve, and I found myself in front of the question board every few hours (even missed some sessions because of this :). This is me hacking away in the halls with the Amazon Ninjas next to my laptop.ninja_[1]
  • Enter the Haggis concert: There was a live concert by Enter the Haggis on Thursday night, and they played some great fusion music. This was an awesome way to unwind. enter the haggis

There was plenty of food and caffeine at the conference, though the Wifi could have been better. Thanks to all the organizers for doing such a great job. I hope to be there again next year.

Posted: Jan 15 2010, 08:31 PM by latish
Filed under: ,
Working with Visual Studio on a Mac

When I recently purchased a Macbook Pro, I had a couple of options to set up my .Net development environment on there. I could use a Virtual Machine based solution such as Parallels or VMware Fusion, or run Windows natively using BootCamp. My first preference was to stay inside the Mac OS if possible. I spent some time researching which product other developers are having more success with and Fusion seemed to be  more stable and responsive for the majority of them. I downloaded the trial version from their website and took it for a spin, and have been really happy with it.

I have used both XP and Windows 7 in a VM with Fusion, and the performance has been pretty flawless. I allocate both processors, 40 GB of hard disk space and 2 GB of RAM to a VM. Some of my peers have long been advocating the advantages of developing using VMs, and now I totally get how cool this way of working is. I can create and restore snapshots at any point of time, create a new VM to try out any beta software, and keep my development environment isolated from softwares/utilities that it does not need (avoiding software bloat). I am using a Windows 7 VM right now for the most part and playing around with Visual Studio 2010 on it. I intially found the Unity feature in Fusion (it gives the illusion of running Windows apps natively on the Mac OS)  to be really cool, but I don't really use it much. I have dedicated a Space to my VMs, and tend to work in full screen mode.

If you end up going the same way as me, I would recommend looking at multiple vendors before purchasing Fusion. I bought if off Amazon, and it cost me $23.49 (including a $10 mail-in rebate). Other sites,including VMware, offer it for upto $80.

Posted: Aug 15 2009, 04:56 PM by latish | with 14 comment(s) |
Filed under: ,
Using a productivity tool like ReSharper or CodeRush

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.

Posted: Jun 06 2009, 03:05 PM by latish
Filed under: ,
The Big Design Conference in Dallas

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

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.

Posted: May 30 2009, 07:26 PM by latish | with 1 comment(s)
Filed under: ,
My Dot Net Developer’s tools list, and more…

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.

 
Creating MSDN like help using 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.

Posted: Apr 17 2009, 07:21 AM by latish | with 2 comment(s)
Filed under: ,
"We Are Microsoft Charity Challenge".Equals("Awesome Geeking weekend")

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.


Posted: Jan 26 2009, 07:07 PM by latish
Filed under: ,
JavaScriptSerializer - UnDeprecated with .Net 3.5 SP1

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.

Dallas TechDays - Developer Track

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 :).

Posted: Nov 19 2008, 06:08 PM by latish
Filed under: ,
More Posts Next page »