Terrence Dorsey

Writer. Editor. Nerd.

Toolbox: Microsoft Open Source Contributions

In the last year, Microsoft released a remarkable number of open-source projects under the .NET Foundation banner. Interested in using this code in your own projects? Maybe you want to contribute fixes, features, sample code, or documentation?

There's no magic to it. In January I wrote 5 Tips for Contributing to Microsoft Open Source Projects for Visual Studio Magazine, providing some background on these projects and advice from the project coordinators about how to become part of the community development effort.


Vim Setup Links

I've been trying to work a little vim practice into my editing. It's not to replace my trusty Sublime Text 3 setup, but rather to develop some muscle memory for those times when vim is the most robust editor at hand. And it's always good to have a backup.

This is just a quick dumping ground for some useful posts I've found while setting up a local vim environment.

Configuring Vim on Mac OS X by Tim Reynolds, including sample .vimrc setup.

Vim and iTerm2 color-schemes by Chris Hunt.

How to control vim colors by Alvin Alexander.

10 vim color schemes you need to own

My favorite ST3 color scheme, Plastic Code Wrap, ported to vim by JoeDF at PlasticCodeWrap/GVIM. JoeDF has ported Plastic Code Wrap to over 20 other editors as well.

Here's another vim port of Plastic Code Wrap by Chris Hoffman.

Vim Commands Cheat Sheet and a concise over view of the most common VIM Editor Commands.

And now to practice...


Toolbox: 2014 Top Dev Tools Roundup

My second Visual Studio Magazine columns in December is an end-of-year wrapup of sorts, covering the Top 7 2014 Dev Tool Releases You Should Know About, but might have missed.

A couple obvious ones were the Xamarin 3, Designer, and Insights releases, but did you know Mark Russinovich put out a new Sysinternals tool? It's true! Check it out.


Toolbox: Visual Studio Data Access

I had two Visual Studio Magazine columns in December. The first covers 11 Visual Studio Tools to Simplify Data Access. Whether you're using SQL Server, SQLite, or SQL Compact, LINQ, Entity Framework, MongoDB or even Visual FoxPro, there are Visual Studio extensions to help. I've got eleven of them here. Enjoy!


Sublime Text 3 Setup

I recently had to setup up Sublime Text 3 all over from scratch due to reasons of not planning ahead. It seemed prudent to write the steps all down for future reference and put the whole thing where I wouldn't loose it. Like on my blog.

Nothing fancy, but it works for my purposes.

Start out by installing Package Control, the package manager for ST2 and ST3.

Open the command palette with CMD+Shift+P (Ctrl+Shift+P on Windows) and run Package Control: Install Package to find and install packages. See the Package Control Usage page for instructions on the process. Generally I like to search for packages on the Package Control site first so I can check for version compatibility, dependency gotchas and evidence of abandonware.

Markdown Extended is my preferred Markdown implementation. I actually set up ST3 to ignore the default Markdown package as you can see in the preferences below.

I'm using Monokai Extended as the theme just for Markdown Extended. Again, see the preferences JSON below. There was some monkey business involved in getting this set up, unfortunately: I had to use PackageResourceViewer to extract Monokai Extended into my /Packages folder, then point to that .tmTheme file (again, see below). This works better on my work machine, so I'll have to double-check that setup and report back any further information. For now it's good enough to get working.

I'm also using Colorcoder for semantic code coloring. It looks like Ruby support is installed by default now. Previously I had to use a workaround discussed in this issue on GitHub.

When installed you can now just go to View > Syntax > Colorcoder > Ruby (Colorcode). Colorcoder also has built-in support for C++, Coffeescript, Go, Lua and Python.

Pretty JSON is a good package for formatting and minifying JSON. I find it helpful, along with JSON Formatter for Chrome.

I don't need to do diffs often, but when I do, Sublimerge: The professional diff and merge tool for Sublime Text 2 and 3 is the way to go. Buy it and support a developer who makes a really nice, useful tool.

As mentioned earlier, I'm using Monokai Extended as my Markdown-specific theme. Colorcoder applies semantic coloring, but it does so in conjunction with your existing theme setting. For general coding, I'm using PlasticCodeWrap, which I grabbed from the terrific tmTheme Editor by Allen Bargi.

And that's pretty much it for my ST3 setup. My work setup has SublimeLinter 3 installed, but I don't end up using it much.


I also don't do much in the way of fancy keybindings. However, here are two that I've found useful.

[ { "keys": ["super+k", "super+t"], "command": "title_case" }, { "keys": ["ctrl+alt+super+m"], "command": "set_file_type", "args":{ "syntax" : "Packages/Markdown Extended/Syntaxes/Markdown Extended.tmLanguage" } }, { "keys": ["ctrl+alt+super+t"], "command": "set_file_type", "args":{ "syntax" : "Packages/Text/Plain Text.tmLanguage" } } ]

The first keybinding creates a shortcut for Title Case, which doesn't have a default keybinding. The shortcut is CMD+K, then CMD+T, which follows the same pattern as the Upper Case and Lower Case bindings.

The second keybinding toggles between text and Markdown syntaxes for the current file. Mostly this is handy for .txt files that contain Markdown. I noticed, however, that this must be a keybinding I originally created for ST2. Package locations have moved around a bit since then. I had to unpack the Markdown Extended package with PackageResourceViewer and point the keybinding to the unpacked tmLanguage file. There must be a better way.


Here's my current Markdown Extended.sublime-settings. This is where I set the a default theme for the syntax that's different from the general theme.

{ "color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme", "margin": 100, "wrap_width": 80 }

And here are my general user preferences. I use Inconsolata at a sane size for mature eyes on large or Retina displays. Tabs are two spaces as the goddess intended. You can also see here that I ignore the default Markdown package.

{ "color_scheme": "Packages/Colorcoder/PlasticCodeWrap (Colorcoded).tmTheme", "font_face": "Inconsolata", "font_size": 17, "tab_size": 2, "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, "ignored_packages": [ "Vintage", "Markdown" ], "original_color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme" }

I'm not obsessive about fixed-width fonts. Check out Dan Benjamin's Top 10 Programming Fonts and follow-up posts for some excellent suggestions. Adobe's Source Code Pro is nice if you don't mind having Adobe software on your system.

That's about it for setup. The magic is in the writing and the coding.


Toolbox: Web Development Tools

My October column at Visual Studio Magazine follows on last month with 14 Tools and Extensions for Web App Development, with a focus on extensions for Visual Studio 2013 (and 14, when available).

There's some cool stuff here, from WebEssentials to CSS wrangling tools Node.js and a number of useful testing tools. I hope you find them useful.


Toolbox: Documenting Web APIs

My September column at Visual Studio Magazine covers Web API Documentation Tools — some tools and frameworks that make getting from your web service codebase to useful API documentation relatively painless.

I know documentation is not a favorite task for many developers, but it's really crucial for acceptance and ease of use for your customers. You don't have to write the Great American Novel, and these tools do most of the heavy lifting for you.


Toolbox: Semantic Highlighting

My August column at Visual Studio Magazine covers a recent obsession: Semantic Code Highlighting. You'll get a brief history of syntax highlighting, along with some examples of various kinds of code coloring, then I dive into some new tools that let you employ semantic highlighting in your own coding environment. I highly recommend it.


My Web Perf Book For O'Reilly

Head over to HTTP Archive and check out their trends graphs. Notice anything? That's right, web pages keep getting bigger and more complicated. The problem here is that — particularly in e-commmerce — consumers of your site expect it to load and become interactive quickly.

Turns out, the problems involved and solutions needed to fix them depend, mostly, on straightforward, Web Dev 101-level knowledge and technology. I recently wrote a short e-book on the subject for O'Reilly, Web Page Size, Speed, and Performance (free, registration required). There's also an accompanying blog post on O'Reilly Radar, It's time for a web page diet.

Slimming down web sites is not necessarily a matter of learning new and sophisticated programming techniques. Rather, getting back to basics and focusing on correct implementation of web development essentials — HTML, CSS and JavaScript — may be all it takes to make sure your own web sites are slim, speedy and responsive.

Interesting side note: mobile web users (and probably app users as well) expect faster interaction than on the desktop and are more likely to ditch an action if it's slow. Think about the implications of that complication on your app development plans.


Toolbox: HTTP Debugging Tools

In my July column for Visual Studio Magazine, HTTP Debugging Tools: Buy, Borrow or Build Your Own Tools?, I take a look at some of the popular current offerings: Wireshark, Fiddler, Charles and HttpWatch. Each represents a slightly different set of features at various price points, from free to enterprise subscription.

I also had a chance to talk with Eric Lawrence and Karl von Randow, developers of Fiddler and Charles, respectively, about the experience of building these apps.


More articles...