Visual Studio 2014: A Taste of Things to Come…

While I’m not ready to jump ship from VS2012 just yet, the just-released VS2014 CTP3 has some pretty cool features (Expand the DetailsgTechnology Improvements items on that page). Some highlights*:

· Custom Layouts to make it easy for you to save custom layouts. In CTP 3, these Custom Layouts roam: any custom layouts you create will synchronize across machines that have the CTP 3 installed when you sign into the IDE with the same account.

· “PerfTips” – now see how long code took to execute directly in the editor when code execution exceeds a threshold. (More details here).

· “Lightbulbs” – If you have an issue in your code, placing your editor caret on the line where the issue is shown or hovering over the issue will present a light bulb that shows helpful actions you can take to resolve the problem together with a preview of the results of each action.

· C# refactoring support has been completely revamped. There are two new core refactorings: Inline Temporary Variable and Introduce Explaining Variable. Additionally, refactoring support for Visual Basic has been added for the first time.

* Note: Some of these features are from earlier releases of VS2014 (i.e., CTP1 & CTP2).

Posted in Uncategorized | Leave a comment

Forecasting for IEEE


IEEE Spectrum invited me to contribute to their “Survey of the Future”, prognosticating what I expect the future will look like technologically over the next two decades. For the record, here are my predictions:

In 10 years:

Ubiquitous computing: internet of Things + cloud + wearables = SMOG. (“sensory manipulation overload grief”)

In 20 years:

Implantables: digital tatoos; optic-/aural-nerve interfaces; natural language interfaces


Over the next 10-20 years:

  1. Desktop workstations will be disappear, along with:
  2. The “internet” (as we now know it). It will no longer refer to a collection of websites; websites will no longer be monolithic, static “destinations”; the data (images, text, media) currently housed in individual websites will coalesce into an amorphous “Sea” of information (navigated, perhaps, by semi-intelligent virtual-guides). We will access this Sea via:
  3. Wearables: glasses/contacts will provide hi-def 3D VR screens; nano-sized wireless ear-buds will be “tatooed” in the ear canal. We will interact with these interfaces via:
  4. Natural language (i.e., conversational interfaces; including inaudible voice recognition through direct vocal muscle detection). People won’t be talking to “the computer”; they will be conversing directly with the Sea. Early adopters will be experimenting with:
  5. Implantables: digital tattoos and neural implants allowing thought-driven interfaces (primitive at first), and direct-sensory stimulators (“sharable emotions”). All of these innovations will give rise to:
  6. Virtual Presence: the ability to interact with anybody instantaneously, in 3D VR environments.

Other changes to expect by 2040:

  1. Drones will be as ubiquitous as cars.
  2. Passwords will be obsolete, along with email, Facebook, and Google.
  3. Shopping centers will vanish, replaced by holographic VR-shopping, automated drone delivery, and nano-scale 3D printers.
  4. Offices and school buildings will empty out, deemed unnecessary with the rise of “virtual presence”.
  5. Clubs, gyms, churches, and bars will increase in popularity, satisfying people’s continuing need to connect, exercise and fellowship.
Posted in Uncategorized | Leave a comment

Hidden Brain Stuff

In a recent Vanderbilt study, researchers determined that we might not know what we think we know. Or perhaps we know what we don’t really know. Or something like that. Anyways, here’s the case in point: even though you may be a skilled typist, you probably can’t label more than about 17 keys on a blank keyboard in under 80 seconds. Here’s a blank keyboard to test yourself with. Print it out and give it a try:

(Personally, I got 19 correct, and my bottom row was basically all off by one letter. BUT, I could only do it by actually fake-typing on the page; I’m not sure if that’s cheating.)

Try it and tell me how you did!

Posted in Uncategorized | Leave a comment

Just A Little Visual Studio Time Saver

If you use the Visual Studio wizard for the UnitTest framework, you’ll find your test code littered with these helpful reminders:

// TODO: Initialize to an appropriate value

And by “littered” I mean there are hundreds, if not thousands, of these comments cluttering your code – several on every test method. I quickly tired of manually removing them one by one, but they are useful reminders so I don’t want to do a global search-and-delete. Instead, I wrote a macro to to make it a one-click job. Unfortunately, this will only work on VS2010 or earlier, since the Microsoft boys decided to remove macros from 2012 & 2013. 😦

Here’s the script:

Sub Delete_TODO_Text()
  'save the current location, to return here if text not found
  Dim objActive As VirtualPoint = DTE.ActiveDocument.Selection.ActivePoint
  Dim iCol As Integer = objActive.DisplayColumn
  Dim iLine As Integer = objActive.Line

  'search for text on current line only
  DTE.Find.FindWhat = "// TODO: Initialize to an appropriate value"
  DTE.Find.Action = vsFindAction.vsFindActionFind
  DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocumentSelection
  If (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound) Then
    DTE.ActiveDocument.Selection.MoveTo(iLine, iCol, False) 'return to original position
  End If
End Sub

After adding the script to a module in MyMacros, I assigned it to a keyboard shortcut. Now all I have to do is navigate to each line on which the comment appears, initialize the corresponding object appropriately, then click my keyboard shortcut to activate the macro, deleting the comment from the end of the line. (The macro has some additional logic to avoid any side-effects if I accidentally activate it while on a line that doesn’t contain the comment. I had to do some selection trickery to search for the comment text only on the current line.)

Posted in Uncategorized | Leave a comment

Runnable: The next Library of Alexandria, or just another Lycos?

Styling themselves as the “YouTube of Code”, the new kid on the code-block has some lofty aspirations. Runnable is the latest in a long line of public code repositories. Their stated aim: “to become the central repository for developers to find code”… “to become the default place for developer-oriented projects to store and share code examples.” Clearly, this grand ambition, if achieved, might produce a resource as renowned as the Library of Alexandria (the Stack Overflow of the 2nd century BC). But the road to that pinnacle is littered with the debris from dozens of other websites with similar dreams. How will this site flourish where so many before have floundered? Well, judging by a cursory look at their freshly launched website, I think they’ve got a steep climb ahead of them.

I don’t intend to provide a full review of their site here. Check out TechCrunch or Forbes Tech for that. Instead, I just want to point out a few critiques regarding as-yet missing features that I consider to be critical shortcomings. (I will refrain from mentioning all the little UI quirks and glitches that I encountered; such flaws are to be expected on such a green site…. And big props for launching a full-featured support site to be able to report such bugs.) I understand that this is just their second day live, and many more features may be rolled out soon, but I think it was a mistake to launch without some of these fundamental pieces already in place. IMO, the boys on the dev team better fill these holes quickly if Runnable is ever going to be Viable.

1. Votes/Ratings

There needs to be a way for the community to bring the best gems to the top. This is probably the most glaring omission, in my opinion. They only have 1000 snippets in their repository so far, but if they actually realize their goal of increasing that number 10x in the first few months, there simply must be a way to distinguish the jewels from the cruft. What social site doesn’t provide a way for users to voice their Likes or Dislikes with a simple ThumbsUp/Down?

2. Comments/Discussions

One of the main things that the Agile movement has taught us in the last decade is that Peer Review is one of the key essentials to quality code. Currently the Runnable code pages don’t provide any mechanism for peers to add their comments (critiques, suggestions, etc), or for the community to weigh in on issues such as efficiency, readability, elegance, and maintainability. These discussion streams should emulate those at Stack Exchange (or SlashDot before them): allow each comment to be ranked by the community so the best ones rise to the top.

3. Edits (with version control)

I understand that in-page edits are supposed to be available. That functionality didn’t seem to work for me (on Firefox or IE9). But even more important than the ability to edit and run the code on the page itself is the ability for the community to change/refine the code permanently. These code snippets should evolve over time (incorporating new language features or industry-standard design patterns). But of course, in order for such incremental refactoring to be viable, each snippet must be version controlled! Each snippet should be protected with such common safeguards such as version-history, diffing, rollback, and perhaps even merge with conflict resolution. In short, there needs to be a safe way for the community to shape and refine these gems.

4. Reputation

If we have learned anything about successful community sites: gamification is critical. Why are people motivated to go out of their way to accumulate meaningless points on a random website? I have no idea. But they are. Give people credit for their code and comments and the upvotes they receive. It would be particularly useful (albeit somewhat cumbersome) to differentiate contributors’ reputation based on language (or at least User Profile pages that clearly display what realm(s) a user’s points were derived in).

5. FAQ

I was quite surprised to not find more information about the goals and objectives of the site. This seems to be a glaring omission. The site needs to provide a page clearly stating the rules and standards governing the functionality described above. There ought to be clearly-thought-out policies regarding moderation, edits, etc. I would also like to see a discussion of coding standards (or at least a justification of the lack there-of).


This project is a good idea, and I think it could really go a long ways for providing the interchangable building blocks of the next industrial revolution. But without implementing some of these fundamental changes, I don’t think Runnable will ever differentiate itself from its undistinguished competitors.

Posted in Uncategorized | 2 Comments

Youtube and Vimeo: Adjust Video Playback Speed


I like to watch a number of educational and informational videos (Programming tutorials, TED Talks, etc), but I am impatient. The average person speaks at 125-150 words per minute, but we can comprehend speech up to approximately 500 words per minute. So I can learn much faster than you can talk! I’ve been listening to podcasts at 2x speed for years and really appreciate the efficiency. So I’d like to be able to do the same with videos online. Thankfully there are now some ways to do just that, using technologies that avoid the “chipmunk” effect that previously characterized high-speed recordings.


Youtube has recently introduced their HTML5 viewer which is compatible with most modern browsers and allows viewers to adjust playback speed. Here’s how:

1. Visit this link:, and look for this button:

2. Once you have clicked the “Join” button, return to any Youtube page and click the cog-shaped Settings icon at the bottom of the video:

This will pop up a menu that includes playback speed selections. Experiment with the 1.5x and 2x. These settings don’t always work well on videos with poor audio quality, but on any well-produced video the ease with which you can comprehend the speakers at 2x may well surprise you.

[Note: Once you “Join the HTML5 Trial”, the setting should be permanent on that browser. However, if you have Antivirus software on your computer that automatically deletes cookies, you may need to add the html5 link to your Favorites and return to that page and re-join whenever the Speed options don’t appear on the video Settings menu.]


Unfortunately, Vimeo does not provide this functionality, and have recently announced that they don’t intend to add it. This is a short-sighted decision in my opinion, but in any case there is a (somewhat clunky) work-around: Download the video to your machine and use the playback settings available in your default video player. This is, in fact, what the Vimeo staff in the above-linked forum suggest. Unfortunately, they do not explain how to do that, so I will.

Step One: Download the video

There are actually two options for downloading videos from Vimeo:

1. Built-in Vimeo download support

Some Vimeo videos support downloads natively. On the Vimeo video page look for a button or link like one of these:

Unfortunately, not all Vimeo videos support this option, so you will have to resort to option #2…

2. Third-party download support.

There are a number of websites out there that claim to download Vimeo videos for you, but the sites are sketchy and require installation of unknown software – something I am unwilling to do. However, if you have the Firefox web browser on your machine you can obtain a safe and well-tested plugin that can download videos for you. Here’s how:

a. Get Firefox, if you don’t already have it.

b. Obtain the “Download Helper” plugin. Once installed, you should see the DownloadHelper icon near the top of your toolbar:

c. Visit the Vimeo video page, and click “Play”. Once the video starts playing, the DownloadHelper icon should become colored and animated (this may take a moment):

d. Once the icon is animated, click on the down-arrow next to the icon, then click on the video link that appears and choose “Download”:

This will enable you to save the video to your machine. Store it in a place you can easily find it after the download is complete. A small status icon on the Firefox toolbar will tell you how many minutes remain in the download process.

Step Two: Adjust the speed on your video player

Once you have downloaded the video, you can play it back in your default video playback program. I use Windows Media Player, which comes installed with all Windows machines. This player contains a little-known feature that I use all the time.

1. Start playing the video.

2. Right-click anywhere on the video and click “Enhancements” and then “Play speed settings”

3. The Play speed settings dialog will open in a separate window:

Adjust the speed to your liking, and there you go: Start learning stuff faster!

Posted in Uncategorized | 4 Comments

A word of advice…


In a recent Stack Exchange post titled “Is there any way to get faster at solving bugs? I’ve just had a warning from my boss”, a guy who’s been a programmer for 10 years shared his concern about being labelled “slow” by his boss and colleagues. Perhaps because I have found myself in similar circumstances, I was able to compose an answer that the poster thought was helpful. Here was my advice:


Many answers have questioned your boss’ methods/tactics/metrics/etc. But that is beside the point. Maybe you ARE slow. Every room of developpers has to have ONE that’s slower than the rest, right? (That’s just straight set-theory.) So let’s assume that’s you. The answer is, WHY are you slow? (Clearly that is the question you have to answer before you can solve your stated question of how to get faster.)

There could be all sorts of reasons, but here are some possible explanations to consider:

  1. You are less intelligent than they are. It’s possible, right? (Studies have shown that we ALL are less-popular, less-interesting, and (it would follow) less intelligent than our friends.) So maybe you are just slow-brained. Then again, in your case I think this is unlikely. A quick glance of your StackOverflow profile shows that you have a history of asking intelligent questions on a wide range of topics. So you’re obviously a thinker and probably a good one at that.
  2. You’re spread too thin. That same SO profile of yours shows that your questions cover a very wide gamut of technologies over these past 2 years (graphics, web, python, c++, c, linux, embedded, threads, sockets etc). Personally, I know that when I have been put in the situation of having (or wanting) to delve into a multitude of different streams, I find myself swimming up-current really fast (or, rather, really slow). Perhaps what you really need here is FOCUS. And maybe a healthy dose of prioritization. Is there anyway you can relegate the less-important pots to the back burner and turn up the heat on the main dish?
  3. You’re not having fun. When the fire dies down, the steam engine is destined to decelerate. You admitted in your post that your morale has taken a severe hit lately. Unfortunately you’ve been swallowed into the sucking vortex of self-reinforcing negative harmonics — a force that can destroy bridges. It’s an all-too-familiar spiral: difficult task -> stress -> missed deadline -> more stress -> poor coping mechanism -> more stress -> procrastination -> more missed deadlines -> criticism/gossip (real or imagined) -> yet more stress. You get the picture. This rarely leads anywhere useful. Take a lesson from my days in white-water rafting: When you get sucked under-water by a circulating current on the back-side of a class-4 rapid, your life-jacket will NOT buoy you back to the surface. The best strategy (though non-intuitive) is to find the bottom of the river, and walk out of the riptide. So my advice to you is: find some ground, dude, (friends, church, healthy new habits, etc) and make use of it to ambulate yourself out of the whirlpool.
  4. You’re not in your zone. Michael Jordan made a pretty lame baseball player. (OK, he was still better than me, but definitely a minor-leaguer.) Maybe “multithreading embedded linux” just isn’t your gig. But Software Development is an exceedingly wide field (as you well know; cf #2 above). Is your company broad enough that your can find another niche? In my last job I was hired as an embedded SW dev. (I had no experience in that realm, but I told them I was a “quick learner.”) I quickly sank like a stone. But I kept working hard and kept looking for problems that I did know how to solve for them. As it turned out, I was gradually able to migrate into new responsibilities at which I could shine, and for which I eventually recieved considerable commendation. So maybe you need to re-brand yourself.

The point is: if you’re slow, there’s a reason. But, hey — you’re a software engineer, dude! Debug yourself!

Posted in Uncategorized | Tagged , | Leave a comment