C# Generic Method Resolution Gotcha

August 19, 2014

Yesterday, I broke some unit tests after removing an unused type parameter from a method, which seemed like a small and harmless code modification. Well, it turns out that it isn’t. If you want to know why, keep reading. Consider the following code snippet: 1: 2: public class Tests 3: { 4: 5: public void Test() 6: { 7: Assert.AreEqual("Int", DoSomething(1));...
tags: , ,
no comments

JavaScript Gotchas – Part 1 – Automatic Semicolon Insertion

January 16, 2014

As I mentioned in previous posts, I spent the recent year getting closer to front end development. During that time period, I wrote more and more JavaScript code. I love JavaScript and I think that it's one of the most powerful and expressive languages that I have ever used. But, like any other language, JavaScript has its problems and occasional WTF moments. In this series, I'll highlight some of JavaScript's most notorious gotchas. The first one I want to tackle is a feature called Automatic Semicolon Insertion (ASI). ASI is actually a feature that is meant to make the...
no comments

Slides and Demos From My SDP Dec 13 Sessions

January 10, 2014

Sela Developer Practice, the biggest developer conference in Israel, took place in 15-19.12.13, and had more than 1000 attendees. I had the pleasure to deliver two breakout sessions. The first was an introductory session about AngularJS, in which I gave a quick overview of the framework, and dived into its various building blocks. The second was about NodeJS and Express, in which I've shown how to create full stack JavaScript web applications. I also had the pleasure to deliver the second session again, two weeks ago, in the Front-End.IL meetup. You can find both slide decks below: Getting...
no comments

Learn HTML5 with Me – WebSocket from Scratch

August 24, 2013

WebSocket is one of the technologies under the HTML5 umbrella that allows full-duplex communication channels over TCP between clients and servers. Prior to WebSocket, web developers had to do some whacky things in order to overcome the request-response nature of HTTP and achieve the same behavior. Having full-duplex communication channels in web applications can open a door to a world of interactive web applications such as live chats and collaborative games, and can benefit various other fields in which real time communication is crucial, such as finance, sports, and analytics - All of it, in a simple, standard...
no comments

Learn HTML5 with Me – Introduction

August 23, 2013

In the past month or so, I started shifting into the Front End Development world. I think that by now it's obvious in which way the wind blows. The FED world is the new buzz with tons of new and interesting technologies. The fact that WPF has probably reached the end of its roadmap (done, not dead) and that XAML and Windows Store apps are not as popular as I wanted them to be, brought me to the decision to change direction. In my day job I'm still a hardcore rich client developer, that is what I'm good at,...
tags: ,
no comments

WPF Memory Dump Analyzer

June 15, 2013

After I published my post on debugging dependency properties with WinDbg, I figured out that the process that I described can be easily automated, which in turn, can be a great opportunity to take the new ClrMD library for a test drive. Thanks to ClrMD, I managed to come up pretty quick with a fairly reasonable POC. In this post, I want to introduce you to the result of that test drive: WPF Memory Dump Analyzer. WPF Memory Dump Analyzer is a tool that scans a memory dump of a WPF application for all the dependency objects on...
one comment

Debugging Dependency Properties with WinDbg

June 1, 2013

Dependency properties are one of the corner stones of the WPF framework. They were designed to support various features like change notification, multiple value providers, validation, value inheritance and more. On the other hand, their implementation makes them less intuitive to debug with WinDbg. Unlike regular CLR properties, getting their value is more than just dumping the object in which they are declared. In this post I would like to explain and demonstrate how WinDbg can play nicely with dependency properties. Overview Before we launch WinDbg, I want to explain how dependency properties are implemented under the...
no comments

Windows and Phone 8 User Group – May Meetup

May 18, 2013

The next meeting of the Windows and Phone 8 User group, which I'm managing together with Pavel Yosifovich, will take place on 28.05.13 at Microsoft Ra'anana. In the meeting, Eyal Ellenbogen will talk about Windows Azure Mobile Services, showing how to leverage it when building Windows 8 and Windows Phone 8 applications. And Kobi Hikri will show us how to write cross platform mobile applications with PhoneGap. This meeting will be the first without Elad Shaham, who did a wonderful job managing the group for the past year. I would like to thank Elad on behalf of...
no comments

CLR Memory Diagnostics Released

May 11, 2013

Last week, Microsoft released the new CLR Memory Diagnostics (ClrMD) library, which is a set of APIs for programmatically inspecting a crash dump of a .NET program. To start playing with it, you first need to add the Microsoft.Diagnostics.Runtime package from NuGet (be sure to select Include Prerelease, because it is a prerelease version): You can use ClrMD to analyze a crash dump from disk, or to attach to a live process. In both scenarios, you will need to use one of the static factory methods declared in the DataTarget class. To analyze a...
no comments

My SDP13 Sessions

May 7, 2013

In the past couple of days I delivered two sessions at the SELA Developer Practice. The first session, which I delivered yesterday together with my friend and colleague Amit Raz, was based on the excellent book by Robert C. Martin, called Clean Code. The session was dense with tips on how to write cleaner code, for the sake of ourselves and our team members. The slide deck is available here. The second session, which I delivered today, is called A Lap around Inversion of Control Containers with Castle Windsor. In the hour I had, I explained why...
no comments