Posts

Showing posts from May, 2013

NDepend - a powerful .NET code analysis tool

Nearly a decade ago, I was amazed when a not-so-technical project manager gave detailed feedback on my C# code in a project I was working on. It turned out he had used FxCop to analyze the code and he was parroting the results that came out after the tool analyzed it. That was my first brush with code analysis tools. This nifty class of tools is especially indispensable for architects, technical leads and solo programmers who are concerned about code quality and need to have code critically reviewed in order to avoid paying a technical debt . For architects and technical leads, having an automated tool can help them save time and cover a greater breadth of code to review for quality and any architecture flaws. For solo programmers who don't have the luxury of a peer to review their code (there is the StackExchange CodeReview  forum but reviews may not be low-level or very comprehensive), these code analysis tools are a tremendous help to improve their craft. NDepend (currently

TWIL - Week #8

This Week I Learned: Yahoo will pay $1.1 billion for Tumblr, a six-year-old company founded by David Karp  (aged 26) with more than 100 million users, 500 Mn pageviews a day, peak rate of ~40k requests per second, ~3TB of new data to store a day, all running on 1000+ servers but very little revenue.  Teenager, Eesha Khare won the Intel Foundation Young Scientist Award and a $50,000 runner-up prize for her invention - to fully charge a cell phone in 30 seconds or less. GeoGuessr is an interesting online geography game that uses the Google Maps API and found a mention in XKCD. I wonder which came first GeoGuessr or Where in the World? According two economists at the University of California, Santa Cruz, having a computer at home won't raise a school student's grades . It doesn't help - or hurt. Is there any proof that computers that Indian populist politicians give away to students in India have a positive impact? CBSE , Directorate of School Education, Tamil Nadu off

ASP.NET MVC 4 Questions and Answers

Q)  What is the name of the unit testing Framework that is available with a ASP.NET MVC 4 Project in Visual Studio? MSTest Q)  Which code will execute before any of the Controllers are run? The code within Application_Start() in global.asax will start executing before any of the Controllers run Q)  Which HTTP status code does a RedirectPermanent ActionResult return? RedirectPermanent returns a 301 status code Q)  How does ASP.NET know how to deliver a request like http://localhost/home/about? Routing engine (not tied to ASP.NET MVC Framework) directs requests to Controllers. The route map is defined in global.asax Q)  What is NuGet? It is a Package Manager for .NET applications. NuGet can be used to install, update and configure software (DLLs) in the form of Packages, for use in a Visual Studio project. This way you don't have to download it or track dependencies. NuGet understands package dependencies & will fetch dependent packages as well. Q)  Where do

Book Review: Instant jQuery 2.0 Table Manipulation How-to

Instant jQuery 2.0 Table Manipulation How-to by Charlie Griefer is an excellent book that explains practical web development scenarios that are possible with the use of tables and jQuery, like the following: Table row striping  Sum columns  Show/hide rows  Highlighting cells  Pagination Column sorting  Filtering  Table-related jQuery Plugins (DataTables & Tablesorter) While you'll be able to find several code samples for the above scenarios online, what really sets this book apart is the detailed explanation of the code samples. The ideas from the book can be adapted to newer scenarios. Although it has jQuery 2.0 in the title, there is nothing specifically meant for jQuery 2.0. The book is suitable for a beginner to intermediate level web developer audience. Some basic prior knowledge of HTML, CSS & jQuery is required to follow the content in the book. This can be a good reference to keep handy. It is a slim book with just 56 pages and I wonder if it qual

TWIL - Week #7

This Week I Learned: Azure is also a business success with annual revenue topping $1 billion . That’s $1 billion with only a 20% share of a $6 billion dollar market. 42% of the world’s top 1 million sites are hosted in the U.S.  97% of websites (in the Alexa top million) with a .kr ccTLD are hosted in South Korea.  Google, Facebook, Amazon have millions of users in india, but no data centers in India .  A typeface is the specific letter-form design of an alphabet. A font is a collection of all the characters of a typeface, including capital letters and lowercase letters, numerals and punctuation marks. The words font and typeface are often interchanged . Times New Roman was Microsoft's first font and the default in most MS programs till Calibiri replaced it. Matthew Carter created the Georgia and Verdana fonts for Microsoft. Like the  United States Computer Emergency Readiness Team (US-CERT) , India has a Computer Emergency Response Team ( CERT-In , part of the Department of

Learn about Chrome DevTools at Code School

Image
Code School  teaches web technologies via online video tutorials. While most of their courses are paid, some like the course on Chrome DevTools are free. The Chrome DevTools course is well-produced and impressive. In my opinion, learning about DevTools within at least one browser is crucial to do a good job at web development. Some of the tricks you learn in the Code School Discover Chrome DevTools tutorial can easily be re-used with the Developer tools of other browsers (like IE, Firefox Firebug) Like Pluralsight , Code School provides some of its courses for free: Try jQuery   Try Git   Try Ruby   Try R   Shaping up with Angular.js   Discover Drive   JavaScript Road Trip Part 1   Try Objective-C   Discover DevTools   Rails for Zombies Redux  

Book Review: Instant jQuery Drag-and-Drop Grids How-to

Instant jQuery Drag-and-Drop Grids How-to is a beginner level book by Marcos Placona on getting started with the Gridster jQuery plugin. Gridster is a MIT licensed jQuery plugin that allows building intuitive draggable layouts from elements spanning multiple columns. You can even dynamically add and remove elements from the grid. It has an active following on GitHub . The minified version (jquery.gridster.min.js) of this powerful plugin  measures just 33KB. Gridster supports Internet Explorer 9+, Firefox, Chrome, Safari and Opera. jQuery plugins like these make building compelling website user experiences a simple task. The plugin does come with online documentation but if you need some hand-holding and have to get up to speed quickly, this book can guide you through. The book should be read while you're trying out the six download-able code samples that come along. It is just 48 pages long and is more like a long article. This book could have been longer and clubbed as

Glossary of keywords used in Microsoft Technologies

I like keeping definitions of  keywords used in Microsoft technologies handy. This is a placeholder for links to online resources that have definitions. SharePoint 2010 Glossary - MSDN SharePoint 2013 Glossary - MSDN Azure Glossary (including SQL Database) - MSDN , Technet WCF Glossary - MSDN C# Reference - MSDN work in progress...

TWIL - Week #6

This Week I Learned: Programming: IE10 for the phone and the PC are built on the same engine and use the same renderer which means that what you see on your desktop (or tablet) is what you'll see on your phone. Additionally, the web browser control in Windows Phone apps is a full instance of IE10, with the same speed and power as the native phone browser. An analysis of the world’s top 1000 URLs reveals that page weight increased 28% from March 2012 (822 K) to March 2013 (1053 KB). The median page load time on desktops got ~3.5% faster, and on mobile was ~18% ~30% faster . General: To quickly watch YouTube screencasts: open video in HTML5 mode > cog > set speed to 1.5 Standalone SWF, PDF files can be viewed with Chrome Samsung's cost of materials and manufacturing to produce the U.S. version of the S 4 is slightly above $237 a unit. This is higher than Apple's $217 production cost for a 32-gigabyte iPhone 5, which has a smaller and less-costly display scr

HOW TO view a .NET DLL's dependencies

Image
The simplest though not the most convenient way to view a .NET DLL's dependencies is to use the ildasm.exe tool Click on the Manifest node to view names of dependent assemblies The manifest lists the names and versions of all other assemblies that the current assembly depends upon . If you're adding a reference via NuGet, you can find the dependencies from the information provided for each Package in the Package listing -

TWIL - Week #5

Image
This Week I Learned: Programming-related Windows Azure SDK for .NET v2.0 has some nice updates . Windows Azure SDK for .NET is a fully open source project (Apache 2 license) hosted on GitHub. ProgrammableWeb maintains a directory of  programmable Web APIs. As per their recent count, there are 9,000 APIs! I like tracking the weather these days. When I'm not connected to the Internet, I use Google's SMS feature to get weather info. Send a text message with the command weather {your-city-name}  to 9773300000 and you'll get a response with the weather conditions in seconds . This week, I learnt about SkyMetWeather which focuses on weather in India pretty comprehensively. They currently don't appear to provide an API to extend their service for developers. The graphics & presentation of weather data by Forecast , the new global weather service, is impressive. The Forecast API looks easy to use. There are a bunch of alternatives for .NET Reflector - that brilli

HOW TO easily autofit or scale wide images so that they fit within a Word document

Image
With the AutoFit option in Word, you can get a wide table copied from elsewhere scale neatly within your document. However, if you copy some wide images from an external source, there is no convenient AutoFit option as for a table. You have to select an image, right click on it and select the Size and Position... option. In the dialog box that opens up, specify desired scaling width and height. For best results, you can choose to lock the aspect ratio If you have several images, you can use F4 or Ctrl-Y on each image to repeat the same effect  rather than use the Scale image setting for each one. The nifty F4 keyboard shortcut can be used to repeat any last action .