Monthly Archives

January 2014

Remote Desktop on a High-DPI Screen

By | Uncategorized | 45 Comments

Adjusting to High-DPI Scaling Scott Hanselman has a great blog post about how life on a high-DPI computer can be painful.  A couple of weeks ago, I upgraded to a high-DPI laptop (the Samsung Ativ Book 9 Plus). It has a 3200 x 1800 native resolution, which has 278% of the pixel-area of my previous full-HD screen, but in only 13 inches compared to the 15 inches of my older model. Needless to say, on my new laptop, it’s very important to turn on DPI-scaling to make things readable on this monitor. For those not familiar with DPI-scaling, it proportionally…

Read More

LINQ From Scratch

By | Uncategorized | No Comments

This is part one of a series of blog posts on LINQ.  I’m writing it because I need to remind myself how to use LINQ well, and because, while LINQ was covered extensively when it was first introduced, it has been a bit neglected lately. LinqPad Step 1 in learning LINQ is to get the right programming editor.  I can make a case for Visual Studio, for Sublime, for many editors, but for learning LINQ there really is only one good choice: LinqPad.  This brilliant tool is great for learning LINQ and for working in LINQ and is worth its…

Read More

Promise To Use jQuery AJAX Correctly?

By | JavaScript | One Comment

Callbacks are the cornerstone of JavaScript since it is single-threaded in nature. This can quickly turn into spaghetti code when handling multiple, dependent AJAX calls. Enter Promises Deferred and promise are part of jQuery since version 1.5 and they help in handling asynchronous functions like AJAX. So now instead of using callbacks like this: $.ajax({     url: ‘/data/people.json’,     dataType: ‘json’,     success: function (resp) {         console.log(resp);     },     fail: function (err) {         alert(‘error’);     } }); Now you chain the responses using “done” and “fail” like this: $.ajax({     url: ‘/data/people.json’,     dataType: ‘json’ }).done(function (resp) {     console.log(resp); }).fail(function (err) {     alert(‘error’); }); It really gets…

Read More

How to add a CSS arrow to a Kendo DropDownList popup

By | Uncategorized | No Comments

CSS arrows are very trendy right now. You’ve probably seen them around; they are really just triangles hanging around next to a bubble or other popup, pointing toward where the popup content came from. What if you wanted to duplicate that look with a Kendo DropDownList? Well, you can, and in fact you can do it with nothing but CSS, in such a way that every Kendo DropDownList will use! Let’s get started! Anatomy of a Kendo DropDownList The first important thing to understand before you can try to style a DropDownList is what happens to the DOM when you…

Read More

Getting Started with Web Components

By | Uncategorized | 4 Comments

If you’re a web developer, have I got a treat for you! What if I told you that copying & pasting large chunks of HTML to your page or mutating the DOM via jQuery plugins is a thing of the past? What if I told you that those techniques are nothing but web hacks we have been programmed to accept for all these years? I imagine that right now you’re feeling a bit like Alice. Tumbling down the rabbit hole? “You felt it your entire life. That there’s something wrong with the web. You don’t know what it is, but it’s…

Read More