Compiling legacy TypeScript

Last week I installed Visual Studio 2015. This week I was unable to use Visual Studio 2013 to rebuild a legacy app that included TypeScript 1.0 code originally developed in Visual Studio 2012. Here’s how I sorted it out.

VS2015 installed TypeScript 1.7. I won’t be using TypeScript going forward so I uninstalled the TypeScript 1.7 compiler in Programs & Features.

This is not enough though. Now I received an “unknown option: ‘noEmitOnError'” during building. TypeScript compilers (as of present) share a common MSBuild target file which contains the 1.7 options even after you uninstall. The file is at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.jsproj.targets (Adjust the v12.0 as approriate for your version of VS). I ended up overwriting the entire TypeScript folder (keep a backup!) with a copy from another developer who had not yet upgraded. However I did discover that you can copy the targets file from an older version folder as well. (The one from v11.0 worked for me too, but it is slightly different.)

If you need to compile multiple versions of TypeScript, I think you’ll have to make a copy of the TypeScript folder and edit your csproj file to point to the correct one. The relevant line is:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />

Was $30,000 a good asking price?

Yesterday the internet broke. Well at least a lot of javascript builds did. But I don’t want to focus on that part of the story.

In the published conversation, Kik asked if they could compensate Azer for transferring control of the kik project name on npm. Azer asked for $30,000. Kik walked away from the negotiation and asked npm to transfer the name since they owned the trademark to Kik.

First, I don’t believe Azer was violating Kik’s trademark. Kik’s trademark is for mobile software, instant messaging, and a website. Azer’s kik project is a software bootstrapping tool. I’m not a lawyer, but I don’t see how Azer’s use of the name is trademark infringement. There are many other companies that use the Kik name. The USPTO’s TESS system has 15 records for Kik. On this basis, it’s fair to say that Kik should compensate Azer for the name.

Now, was Azer’s asking price of $30,000 fair? Kik obviously did not think so. To an individual developer this is probably a sizable amount of money. But what is the value to Kik? While they don’t exactly say what software tool they are releasing, since it’s being released on npm it’s likely a tool for extending their service. The more extensions there are to Kik, the more reasons users will find to become engaged with it. Growing the user base has a huge return in terms of valuation potential for a VC-backed startup. Kik’s argument was that if they had to compete with an unrelated kik package, it could confuse developers (likely reducing adoption). So my question is: what is it worth to reduce that confusion? I don’t know Kik’s financials (they’ve publicly raised $120M on a $1B valuation), but I do know that software development projects aren’t cheap. At a company Kik’s size, anything worth releasing is probably costing tens, if not hundreds, of thousands in developer time, plus management, marketing, and overhead. If reducing developer confusion could lead to higher user numbers and thus lead to higher valuation, I could probably be convinced $30,000 was a fair price to pay. And if it isn’t, they could always counter.

Finally, if Kik’s goal was to get this project name for cheap, it was critical for them to set an anchor price early. By asking Azer to give the first offer they lost control of the negotiation.

Gordon Bethune on motivating your employees

I’m about to start reading From Worst to First by Gordon Bethune so I found this presentation to get an introduction. He describes how he transformed Continental from the worst performing airline to the best by focusing on how to motivate the employees to serve customers. I’d love to work for a company that shares the kind of culture he built at Continental.

Note: He has a few off-color remarks but look past those to the lesson he gives.

The Heavy Water War

If you enjoy WWII history, check out The Heavy Water War on Netflix. The Norwegian miniseries tells the true story of the Allied efforts to sabotage a factory which produced a critical ingredient for the Nazi nuclear weapons program–deuterium oxide–heavy water. A small team consisting of English and Norwegian soldiers was tasked with sneaking explosives into the basement of the guarded facility in the height of Scandinavian winter. They endured feats of unbelievable courage and made difficult decisions to carry out their orders.

Update on soldering

In order to prototype some circuits I thought it would be a good idea to build some boards which had NOR, NAND, AND, and OR gates pre built to speed things up. I bought about 300 through-hole transistors and resistors and started building the first board on a perforated board from RadioShack. It turns out this is a terribly slow way to prototype. I spent 8 hours soldering on the first board (only 13 NOR gates) and it’s not finished yet. I’m getting a lot better at soldering small connections though! I only had to break out the solder wick twice.

Instead of building these boards with perfboard, I’m going to stop and learn how to use KiCad to design a printed board using surface mount components. I’ll have to order the boards online but I’ll reflow solder them myself. I’m going to start with the same prototype board designs so I can learn how well this works.

There’s a new makerspace in town about ready to open up. They have a circuit board printer so I may look into that route eventually.

You should… A lesson from mentoring

When I started mentoring junior developers, I had a bad habit of saying things like “you should…<my opinion>”. When giving directions, it’s direct to the point, however I don’t think phrasing directions this way helps new developers learn as quickly as guiding them in a way that requires them to make decisions themselves. Today I find myself replacing those “you should” moments with phrases more like “Have you considered…?” or “In my experience…” or pointing them towards an article or specific MSDN page. Sometimes they’ll be able to explain what they want to do but don’t know the technical term for it. By supplying one it’s much easier for them to google for more resources. Once they have some good context on the problem, I’ve found that simply following a Socratic line of questioning about the details of the problem is very effective. Usually they interrupt with me with “Oh I have an idea now!”

Searching for a word in Visual Studio

I was trying to find all usages of a variable in a SQL script today, however the script contained many similarly named variables. Simply searching for @Foo would also find @FooBar and @FooCat which was cluttering up the search results. To get around this I used the regex search feature in Visual Studio. In the find usages window, check the “Use Regular Expressions” checkbox and then include the word boundary escape code (\b) in your search. I searched for @Foo\b which will only return @Foo and even find it in cases like @Foo<space>, @Foo) and @Foo=.