Decaying Code

Where code comes to die

#SideWaffle – Or why people are cheering every time it’s mentioned

So I discovered SideWaffle at the MVP Summit this year. Every time someone mentioned “SideWaffle” there was a lot of cheering at the simple mention of the name.

I was curious. Or rather, intrigued. Why would someone cheer for a product that much? I haven’t seen anyone cheering for jQuery or StructureMap or Ninject or whatever. It might have been guys working on the tool but I was too curious to just drop the ball. So… Googled it (sorry Microsoft) and ended up on their website.

So what is SideWaffle?

It’s a Visual Studio Extension that contains templates for technology that you might use.

So you want to make an AngularJS project but you don’t know where to start? It’s there. Nancy? It’s there too. Google Chrome Extension? Yep. Knockout Binding? Also.

It’s insane. You absolutely need to download this thing. It will save you time.

Here’s an example.

New NancyFX project.

So I do File –> New Project and I click on C# and look for Nancy:

new_nancy_project

Then, I click OK, press F5, hit the page with Chrome (Sorry Microsoft) and I get this:

nancy_running

That’s it. Now Nancy is up and running and self-hosted on my machine.

List of supported tech (as of March 27th 2014)

AngularJS, Durandal, Robots.txt, Human.txt, RequireJS, Nancy, Offline Application Cache Manifest (HTML5), KnockoutJS, Jasmine, jQuery Plugin, GruntJS configuration file, and a whole lot more.

Hit SideWaffle.com for the complete list.

Conclusion

Download. Contribute. And don’t forget to cheer every time you hear SideWaffle.

Community Update 2014-03-26 – Google #oauth #openid endpoints, #sublime, #tdd with Google Spreadsheet, and more

So first of all, Google is retiring some of its OAuth/OpenID endpoints. You NEED to read the first article. It will let you know what is going obsolete and when.

Then we have a video worth watching. Doing TDD with Google Spreadsheet. It’s crazy, it’s insane and obviously… I love it!

Beside that, enjoy the read!

Web Development

Migrating to Google+ Sign-In - Google+ Platform — Google Developers (developers.google.com) – Google is shutting down some OAuth/OpenID endpoints. You should update your apps. Some as soon s April 30th.

Sublime is Sublime 10 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Minified.js – A Tiny Alternative To jQuery (www.webresourcesdepot.com)

WebAIM: Accessibility Lipstick on a Usability Pig (webaim.org)

5 Truly Effective CSS Boilerplates and Frameworks (blog.smartbear.com)

ASP.NET

Avoiding problems with relative and absolute URLs in ASP.NET - Fabrice's weblog (weblogs.asp.net)

ASP.NET Web Optimization Framework - CodeProject (www.codeproject.com)

Architecture and Methodology

Using Google Spreadsheet as a simple TDD/BDD environment on Vimeo (vimeo.com) – this is a must watch.

2 Lessons Learned, And 3 Resources For For Learning RabbitMQ On NodeJS (derickbailey.com)

Windows Azure

Caching on Windows Azure - Azure AppFabric Cache, Azure Cache Service, Managed Cache, Dedicated Cache, In-Role Cache, Co-located Cache, Shared Cache, Azure Role-based Cache - Clarifying the naming confusion (blogs.msdn.com)

Storage (SQL, NoSQL, etc.)

Differences in Map/Reduce between RavenDB & MongoDB - Ayende @ Rahien (ayende.com)

Search Engine (Solr, ElasticSearch, etc.)

How we use Elasticsearch to enhance our web products | Browser (www.browserlondon.com)

Elasticsearch.org This Week In Elasticsearch | Blog | Elasticsearch (www.elasticsearch.org)

Community Update 2014-03-25 – #webdev, #aspnet, #windowsazure, #nuget packages of the week

Here are the links for now.

I couldn’t get everything today since I had a medical emergency.

I’ll keep you all posted tomorrow.

Cheers,

Web Development

New Breeze Angular Service | John Papa (www.johnpapa.net)

ASP.NET

Five Reasons ASP.NET Developers Shouldn’t Worry About Node | Wintellect (www.wintellect.com)

Page Instrumentation in ASP.NET 4.5 - Imran Baloch's Blog (weblogs.asp.net)

Using Google Authenticator with ASP.NET Identity - Be A Big Rockstar (blog.beabigrockstar.com)

Introducing ASP.NET Web API Throttling handler - Stefan's Tech Notes - Blog (www.stefanprodan.eu)

Windows Azure

Getting Started with Azure Storage (channel9.msdn.com)

Windows Azure Multi-Factor Authentication Overview (channel9.msdn.com)

Miscellaneous

NuGet Package of the Week: Canopy Web Testing Framework with F# - Scott Hanselman (www.hanselman.com)

Community Update 2014-03-24–Follow-up on #sublime, #nodejs articles, #angularjs, #dotnet, #aspnet and package management

As with every Monday, the flood gates are open. Greg Young submitted another blog post on Sublime, we have a few NodeJS/AngularJS posts and of course… a truckload of ASP.NET links.

I hope you enjoyed your weekend, enjoy the read and see you next time!

Cheers,

Greg Young Sublime’s series

Sublime is Sublime 8 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net) – Yep. one more!

Web Development

Creating a REST API using Node.js, Express, and MongoDB | Christophe Coenraets (coenraets.org)

Jonathan Channon Blog - Using NodeJS and FTP with Promises (blog.jonathanchannon.com)

Responsive-Design Intranets with Apt Content Prioritization (www.nngroup.com)

Dynamic Routes with AngularJS (odetocode.com)

Architecture

Package Management And Dependencies: Still A Human Problem (derickbailey.com)

.NET

Discovering System.Threading namespace, the Thread class - Tymoteusz Kęstowicz .NET developer blog (tymoteuszkestowicz.com)

ASP.NET

The Web API v2 OAuth2 Authorization Server Middleware–Is it worth it? | leastprivilege.com on WordPress.com (leastprivilege.com)

Investigating ASP.Net Memory Dumps for Idiots (like Me) - Diary Of A Ninja (www.diaryofaninja.com)

Troy Hunt: Understanding (and testing for) view state MAC in ASP.NET web forms (www.troyhunt.com)

Getting a MIME type from a file extension in ASP.NET 4.5 (blogs.msdn.com)

Secure ASP.NET Web API with Windows Azure AD - IBlog<Johan> (weblogs.asp.net)

jQuery DataTables With ASP.NET Web API 2 OData Service | TechBrij (techbrij.com)

The ASP.NET Web API 2.2 for OData release and the OData Client Code Generator release (blogs.msdn.com)

Solved: Getting 401 Unauthorized while calling an ASMX service using windows authentication | jgauffin's coding den (blog.gauffin.org)

Podcasts & Books & Videos

Guy Barrette | Visual Studio Talk Show: Mathieu Richard - Web moderne (blog.guybarrette.com) – This one is in French

Personal Branding book - How to Be a Rock Star Developer (book.outofcomfortzone.net)

Search Engines (Solr, ElasticSearch, etc.)

Realtime Search: Solr vs Elasticsearch (blog.socialcast.com)

My talk from Comminity Stack Exchange day – Introduction to ElasticSearch » Steven Chapman (stevenjchapman.com)

Community Update 2014-03-22 – #WebAPI and #WCF

As with every weekend, things are sparse.

Enjoy!

ASP.NET

What is New in ASP.Net Web API 2 IHttpActionResult and CORS - Part 2 (bitoftech.net)

Difference between WCF and ASP.NET Web Service (www.dotnet-tricks.com)

Measure twice, cut once – or profile before optimizing your code

Too often we see smart code. I’m not talking about a trademarked product or something science fiction here. I’m talking about code that was written with the goal of making it faster or asynchronous. By smarter I mean, too smart for its own needs. The code should be as simple as it is required to maintain it efficiently and so that other developer can maintain it.

But as the application is being developed, at some point, we realize that it’s slow. So we run the debugger a few times, identify the module from which it’s coming from, assume it’s a certain piece of code and… we optimize.

What did we just optimize? Was it the real problem? Of course since it’s gone now! But right now, the code is unreadable. You’ve added caching, async loading, static dictionary and what not. It’s 20 times faster than it was before! Of course it’s better!

What we don’t realize however is that, we patched the problem. We put a Band-Aid on an open profusely bleeding wound. It will work for now but then you’ll have other problems related to the way you resolved your problem. Caching? Your cache doesn’t invalidate properly… Async? Partial data or 100% CPU every time the task is executed… Dictionary? Thread locking and exception for already existing keys… etc.. etc.. All those problems will gnaw at your time and for what? For some performance issue that you patched by dropping quick hacks on them.

What should we do?

Measure.

Your application was slow. You saw it in your browser. It took forever to load. Each page load were slow as hell. Is it coming from your application startup code? From which layer?

Most of the developer I’ve worked with will normally comment out code and try to reproduce the speed issue. Did it work? No? Comment out some more. Rinse and repeat until the performance issue is resolved. Once they found the source of the problem, they “optimize” or fix this block of code.  Most of the time, it might be a “WHERE” on a SQL query that is missing. Sometimes however, I see train wrecks.

The best way to know if your code is slow and what part of your code is slow is to use a profiler. There’s many kind of profiler but I’m going to talk about 2 kinds. Performance profiler and Database profiler.

Measuring performance

Here are some tools that most .NET Developers use: dotTrace ($), ANTS Performance Profiler ($), slimtune (open source)

Those tools will measure the time spent on each methods in your code. They will allow you to home in on code that is invoked too often or few times but that takes an eternity to answer (we’re talking seconds here). This will allow you to find the hotspots in your code. It will tell you where your time should be spent rather than modifying your code to find problems. Maybe your loading huge amount of items in memory and it’s slowing down your app. Maybe an external resource is slow…. whatever it is… those tools will find it.

But what if your code is working fast but its your ORM that is slow?

Measuring database

Here are some tools that most .NET Developers use: Hibernating Rhinos profilers for Entity Framework, NHibernate and more ($), MiniProfiler (open source)

When you realise that your problem is part of your database requests, it’s where you start using database profilers to find your problems. Maybe a badly configured ORM sends SELECT * requests to a table with millions of row while you only need one of them? What is the scenario… knowing what is slow when accessing the database could increase the performance of your application exponentially.

Optimizing

Once you are at that step, you know exactly what is slow and what to do to fix it. This is actually the easiest step since you already spent a lot of time understanding the problem. Okay, maybe I’m exaggerating a little but we get the point. Once you know what is the problem, it becomes a lot easier to fix it.

Conclusion

Measure first. Optimize. Measure again. If what you did didn’t improve the running time of your application, you only peddled code around. If you gained 2% gain in speed while making the code unreadable to anyone but yourself, you’ve only muddled the water for little to no gain.

Measuring is pretty much the main recommendation of this article. You don’t measure before optimizing, somewhere in the world a kitten dies.

Stop killing kittens.


Related articles

http://alexandrebrisebois.wordpress.com/2013/08/29/friends-dont-let-friends-use-lazy-loading-on-windows-azure/

Community Update 2014-03-21–Follow up on Greg Young series on #Sublime, #webdev, #aspnet, #fsharp, #resharper release and more

So last post before the slow weekend. I hope that you enjoy yours as I will spend mine coding. As always.

Don’t miss out on the follow-up on Sublime by Greg young, Identity 2.0 released to RTM, ReSharper 8.2 releases and more.

Enjoy!

Follow-up on the Sublime series by Greg Young

Sublime is Sublime 5 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Sublime is Sublime 6 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Sublime is Sublime 7 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Web development (HTML5, JavaScript, etc.)

Important Developer Resources for a JavaScript Newbie - Evangelism - Infragistics.com Blog (www.infragistics.com)

.NET/ASP.NET

Announcing RTM of ASP.NET Identity 2.0.0 (blogs.msdn.com)

Social Login in ASP.NET MVC (www.simple-talk.com)

C# Fundamentals for Absolute Beginners: (01) Series Introduction (channel9.msdn.com)

Genetic Algorithms with F# - my tech blog (stefanalfbo.github.io)

Visual Studio

Open Source and Microsoft Developer Tools (blogs.msdn.com)

ReSharper 8.2 is Released Along with dotTrace, dotCover Updates | JetBrains .NET Tools Blog (blog.jetbrains.com)

Methodology / Agility

The Corruption of Agile | Dr Dobb's (www.drdobbs.com)

Architecture / CQRS

EventStore - from streams to read models (mirkobonadei.com)

Windows Azure

Rockin’ Windows Azure with Visual Studio (blogs.msdn.com)

ElasticSearch

Elasticsearch: When giving it more memory causes more OutOfMemory errrors — Makina Corpus (makina-corpus.com)

New article: Elasticsearch as a NoSQL Database (beta version) | Hadoop Magazine (blog.hadoopmag.com)

Community Update 2014-03-20 – #sublime series by Greg Young, #tdd in #javascript, #donet, #aspnet and #WindowsAzure

Guy Barrette is looking for people who want to submit video content for a website focusing on Azure. You can check it out here: Azure Rocks

Hello everyone!

So Greg Young was on fire last night/this morning. He wrote 4 blog posts on Sublime Text. A must read! I have a few links in web development, including OAuth, but most importantly, TDD in Javascript.

So with the usual .NET, ASP.NET,etc. I wish you all an happy reading.

Also, if you are not aware yet, the MVP Program is changing its guideline for admission. You can view here on YouTube. So if you are part of an Open Source project involving .NET, you might be eligible for becoming an MVP on that alone.

Enjoy!

Sublime Series by Greg Young

Sublime is Sublime Part 1 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Sublime is Sublime 2 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Sublime is Sublime 3 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Sublime is Sublime 4 | Greg Young's Blog on WordPress.com (goodenoughsoftware.net)

Web development (HTML5, JavaScript, etc.)

Test-driven development in Javascript | dotnet thoughts (www.dotnetthoughts.net)

webdesignrepo - a compact list of helpful webdesign links (www.webdesignrepo.com)

10 Things You Should Know about Tokens (blog.auth0.com) – We’re talking OAuth over there.

.NET

Using AutoMapper to Map Abstract Classes | Patrick Desjardins' Blog (patrickdesjardins.com)

Successful IoC container usage | Jimmy Bogard's Blog (lostechies.com)

C# performance tips & tricks | Raygun Blog (raygun.io)

ASP.NET / WebAPI

Kris' blog - Designing Evolvable Web APIs with ASP.NET now as a free ebook (blog.krisvandermast.com)

LIDNUG — Katana Authentication Middleware | brockallen on WordPress.com (brockallen.com)

Stopping ASP.net concurrent logins | teknohippy.net (teknohippy.net)

CORS support in WebAPI, MVC and IIS with Thinktecture.IdentityModel | brockallen on WordPress.com (brockallen.com)

DarksideCookie | What is OWIN, and what is it doing in my new ASP.NET MVC project? (chris.59north.com)

ASP.NET Web API exception logging with Raygun.io - StrathWeb (www.strathweb.com)

More HTTP Flushing in ASP.NET MVC | nik codes on WordPress.com (nikcodes.com)

Storage (NoSQL, SQL, or Event Stores)

Event Store 3.0.0 Release Candidate available – Event Store (geteventstore.com)

Windows Azure

Windows Azure = Security + Privacy + Compliance (blogs.msdn.com)

Azure Rocks! (azurerocks.com)

Search Engines (ElasticSearch, Solr, etc…)

Legume for Logstash (www.legume.md)

Elasticsearch.org Logstash 1.4.0 GA Has Been Unleashed | Blog | Elasticsearch (www.elasticsearch.org)

Elasticsearch.org Elasticsearch - The Definitive Guide | Blog | Elasticsearch (www.elasticsearch.org)

Community Update 2014-03-19 – #webdev, #dotnet, #aspnet, #cqrs and some more #elasticsearch

First of all, I would like to mention that there is less than 19 days left until Windows XP support goes out. It’s been a nice 12 years and a half going. That means that if your child was born on the day of the release, he would now be in 7th grade. It’s been a nice and long run but it’s time to pull the plug. If your enterprise is still running Windows XP (other than in a VM to show rookies what it looked like back in the days), then it’s time to change.

That being said, here are today’s link!

Enjoy!

Web Development

JavaScript Promises: There and back again - HTML5 Rocks (www.html5rocks.com)

nodeschool.io (nodeschool.io) – NodeJS tutorial videos

A DOM Manipulation Class in 100 Lines of JavaScript | Flippin' Awesome (flippinawesome.org)

jsDelivr – The advanced open source public CDN ✩ Mozilla Hacks – the Web developer blog (hacks.mozilla.org)

JavaScript MVC Style Guide (blog.sourcing.io)

.NET / ASP.NET / Web API

Asp.net Web Api 101 | codeCloudy on WordPress.com (codecloudy.wordpress.com)

Being Cellfish: Tail Recursion and C# (blog.cellfish.se)

ASP.NET MVC – URL routing (blogs.msdn.com)

Obtaining Twitter Access Tokens with ASP.NET Identity Geeks With Blogs (geekswithblogs.net)

Using the ASP.NET Bundling Pipeline with OWIN - Michael Sarchet (msarchet.com)

Jeff Byboth: Machine Key when load balancing asp.net web applications (www.byboth.org)

How to automatically notify the user that it's time to upgrade a Windows App - Scott Hanselman (www.hanselman.com)

NuGet packages

NuGet Gallery | AspNet.Identity.RavenDB 2.0.0-beta1-01 (www.nuget.org)

Architecture and CQRS

Busting some CQRS myths | Jimmy Bogard's Blog (lostechies.com)

Open Source

Showcasing interesting projects in Explore · GitHub (github.com)

ElasticSearch

Elasticsearch Image Demo (demo.elasticsearch-image.com)

Deploying Elasticsearch with OpsWorks - Application Management Blog (blogs.aws.amazon.com)

Indexing Project Gutenberg with MongoDB and Elasticsearch » anystacker (anystacker.com)

Getting Started with elasticsearch and AngularJS: Part1 - Searching (www.fullscale.co)

Getting Started with elasticsearch and AngularJS: Part2 - Faceting (www.fullscale.co)

Elasticsearch.org This Week In Elasticsearch | Blog | Elasticsearch (www.elasticsearch.org)

Community Update 2014-03-18 – #webdevelopment, #javascript, #dotnet, #aspnet, #testing and #opensource

Here’s a lot of new content about Javascript, CSS, .NET and ASP.NET.

I’ve included some nice article about ElasticSearch as always. Since I’m not in a chatty mood, I’ll leave you, dear reader, the time to read.

Enjoy!

Web Development

Reassign JavaScript Function Parameters In Reverse Order, Or Lose Your Params | ThoughtStream.new :derick_bailey (lostechies.com)

(cs)spinner | pure CSS loading animations with minimal effort. (jh3y.github.io)

Welcome - Polymer (www.polymer-project.org)

gremlins.js/README.md at master · marmelab/gremlins.js · GitHub (github.com) – Simulate huge amount of click everywhere on your screen.

jQuery Mambo Plugin (www.valeriobarrila.com)

.NET / ASP.NET

How to create a FileStreamResult from a string | andrewlocatelliwoodcock on WordPress.com (andrewlocatelliwoodcock.com)

EF6.1.0 RTM Available (blogs.msdn.com)

ASP.NET WEB API Validation (A One More Better Approach) | TypeCasted on WordPress.com (brettedotnet.wordpress.com)

Compiling your MVC views without IIS errors | Codes from the field on WordPress.com (gyorgybalassy.wordpress.com)

Important: Setting the Client Principal in ASP.NET Web API | leastprivilege.com on WordPress.com (leastprivilege.com)

Using jQuery-UI Tabs With ASP.NET WebForm Validators (blog.codesigned.com)

WebAPI: Getting Headers, QueryString and Cookie Values - Rick Strahl's Web Log (weblog.west-wind.com)

Testing

8 Tips For Writing a Good Bug Report (blog.bughuntress.com)

Open Source

OSS Perks (ossperks.com)

Up For Grabs (up-for-grabs.net)

Search Engines

Ecrypting Logs on Their Way to Elasticsearch | Sematext Blog on WordPress.com (blog.sematext.com)

Elasticsearch.org Kibana 3.0.0 GA Is Now Available! | Blog | Elasticsearch (www.elasticsearch.org)