Wrapping Up DevWeek 2014

April 6, 2014

I have landed from London six hours ago after a wonderful week at DevWeek. Three talks and a workshop made for a pretty busy schedule, but I still had time to enjoy London, with its unusually sunny weather. What's New in C++ 11 My first talk, at 9:30am in the morning, attracted a small audience of C++ developers. C++ 11 is a very extensive new standard, and if you read code developed in the modern C++ style, you might think it has nothing to do with your favorite language of the 1990's. Indeed, I tried to illustrate the major...

iOS Gesture Recognition and Animation with Xamarin

March 28, 2014

In the previous post, we looked at Android gesture recognition and animations. This post completes the picture by looking at the same features in iOS. Touch gestures and animations are really cool experiences for users, and iOS ships them out of the box because it is both touch-first and touch-centric, and touch naturally leads to rich, immersive animations. As with Android, Xamarin.iOS very closely mirrors the native Objective C API, so it should be very easy to port the example code below to a native iOS application, should the need arise. Gesture Recognition Every view (UIResponder subclass) on iOS has built-in support...
tags: , ,
no comments

Android Gesture Recognition and Animation with Xamarin

March 20, 2014

In this post we'll take a look at how to recognize simple and complex touch gestures in an Android application and apply animations to views on screen. Touch gestures are a fundamental way for users to interact with mobile applications, and animations are key to designing a pleasant user experience. As with all other Xamarin APIs, the native (Java) versions are very similar, so it should be easy to port the examples below to Java if you need to. Let's get started with recognizing gestures. Gesture Recognition Android's support for touch begins with the onTouchEvent method that every View-derived class can override....
one comment

“Attacking Web Applications” at O’Reilly Fluent

March 12, 2014

I've just finished my presentation "Attacking Web Applications" at O'Reilly Fluent, a web developers' conference in San Francisco. I've really enjoyed the conference atmosphere and had some great conversations. If you were at my talk, thanks a lot for coming! (I'd also really appreciate it if you rate the session and provide any feedback in the comments.) Here are the slides: Attacking Web Applications from Sasha Goldshtein The basic premise of this talk is that web developers need to be aware of the way attackers think and operate. It isn't enough to be familiar with common attacks on the theoretical...
tags: ,
no comments

Back to Basics: Regular Expressions and Formal Languages

March 6, 2014

Regular expressions are a very powerful tool to have on your toolbelt. They have an arcane syntax and often end up looking like a random stream of characters, but they can save you a lot of time parsing and interpreting text. Here are some problems that you can solve with regular expressions: Find a list of phone numbers in a large text file Check that a user-provided email address is valid Verify that a password meets custom strength requirements Locate all outgoing links in an HTML document Modify all <img src="..."> tags to refer to an HTTPS address In this post I'd like to take...

Canada Tour 2014: Toronto User Groups and ConFoo

February 28, 2014

I spent a great week in Canada despite the super-cold weather for my taste. After all, in Israel, sub-freezing temperatures are enough of a reason to cancel school and bring public transportation to a halt. So for me, stepping outside in -15 degree weather was pretty much of a shock. The week started with three days in Toronto, visiting the Sela Canada branch and delivering two talks at user groups - an introduction to Android development with Eclipse and Xamarin, and an introduction to Node.js on Windows Azure. Then, I flew in to ConFoo, a conference for web developers in Montreal....
no comments

Diagnosing a Non-Paged Pool Leak with Asynchronous I/O

February 20, 2014

I spent a few hours last week chasing a non-paged pool leak caused by a simple Win32 application. After some divide-and-conquer work, we were able to pinpoint the line of code causing the leak -- a seemingly innocent WSARecv call that performs an asynchronous socket receive. How can a user-mode application cause a non-paged pool leak that quickly accumulates to dozens of megabytes of kernel memory? Read on for the details. If you'd like to replicate this problem yourself and experiment with the diagnostic process described below, use the following gist. It's 54 lines of code including error handling and #includes. Capturing...
no comments

Productivity, Exploration, Diagnostics, and Collaboration: Visual Studio 2013

February 14, 2014

On Thursday I had the pleasure of delivering a session at the High-Tech Mizpe Ha-Yamim event for decision makers (VP R&Ds, CTOs, and CIOs) in the beautiful and tranquil Safed/Rosh-Pina area. My talk focused on Visual Studio 2013 and how it can make developers' lives better by improving productivity and collaboration, making it easier to diagnose difficult problems in development and production environments, and helping explore large amounts of existing code. I built the talk around four core areas: productivity, exploration, diagnostics, and collaboration. The demos included using IntelliTrace with Windows Azure Cloud Services, using Visual Studio's .gcdump support with...
no comments

Sela Open House: Android Development 101 with Eclipse and Xamarin

February 6, 2014

Last week I had the pleasure of delivering a free half-day introduction to Android development at our Haifa branch. The day focused on both native application development on Android (with Eclipse and ADT) and C# development with Xamarin. We developed a simple "todo list" application that displays pending tasks, tracks the user location, and stores tasks in persistent storage on the device. Here are some useful links I promised to post during the session, which you might find useful when replicating this application's functionality: Download the Android SDK Bundle (get started with Android development in Eclipse) Xamarin.Android (get started with Android development...
no comments

“Add Service Reference”: When WCF Metadata Goes Wrong

January 20, 2014

I was helping a student debug a WCF service the other day and stumbled upon a very annoying problem. Visual Studio refused to add a service reference to his service, no matter what we tried. After spending a few minutes copy-pasting configuration snippets from Stack Overflow, I decided to proceed more methodically and see what we're doing wrong. Here's the error we were getting, courtesy of the Visual Studio "Add Service Reference" dialog: At first, I was under the impression that something is wrong with the metadata endpoint itself. Perhaps I used the wrong spelling of IMetadataExchange? Or maybe I don't...
tags: ,
no comments