The mind-boggling universe of JavaScript Module strategies

The mind-boggling universe of JavaScript Module strategies


New Hotness in .NET

The .NET world is not evolving at the breakneck speed you find in the browser/Javascript world, but in the last year, we’ve seen a lot of the rust blown off the ecosystem and community. .NET is starting to be an exciting place once again, and with some love, courage, and effort we can bring the excitement of the Ruby/Go/Node/JVM worlds back to .NET and be technology leaders rather than simply Microsoft fanbois. Newness itself is not necessarily a virtue (this is the weakness of the Old and Tired/New Hotness format), but everything here has something interesting to learn even if it is only to improve your use of the Old and Tired frameworks and tools you have. New Hotness isn’t about throwing out your old work, it’s about creating a change in you that creates excitement and freshness in the work you do.

Old and Tired: .NET Framework
New Hotness: Core CLR
The good old .Net framework. So solid and fast and useful. Unfortunately it is wired into the core of Windows, which makes it more of a challenge than it should be to change and update. And try and run it on a non-windows operating system. Not too long ago, serious people were starting to suggest that .Net’s days were numbered because of its closed source slow evolution. Today, we have a fresh shiny implementation that has been cut completely free from Windows and can be evolved with a github pull request. CoreCLR can be deployed in your application folder and runs great on Linux and MacOS. I’m sure we will start seeing it integrated into things like the Unity game engine. Exciting times!

Old and Tired: Visual Studio 2013
New Hotness: Omnisharp
Visual Studio is an incredible IDE, seriously. Try the other ones 🙁 they aren’t even close. It is, however, very heavy when compared to a text editor. Slow to load. Complicated. These things warp your development. Not always in bad ways. But still it’s warping. By adding itellisense to Vim, Emacs, and Sublime Text, Omnisharp overcomes the biggest hurdle to using a lightweight text editor in your .Net workflow.

Old and Tired: SOAP WSDL
New Hotness: Swagger
Interoperability using restful or HTTP/JSON web services is so much lighter and more flexible than the agony of SOAP proxies and cross component dependencies. Unfortunately, documenting those services, or generating the boilerplate clients can be a pain. Swagger is a standard for documenting a service api using JSON and is a big part of the new Azure API Apps service.

Old and Tired: log4net
New Hotness: Serilog
Log4net and nLog allow you to print out log lines to instrument your application. Serilog behaves much the same way, but incorporates an understanding of the structure of the data your are logging allowing you to store your log in a richer data store and perform rich analysis of the logged data in a way that has always been just too painful to parse out of an old-and-tired-log.txt file. Serilog does this without adding programmer complexity when adding logging to your classes. You can also link it up to Seq for centralized log storage and analysis.

Old and Tired: WCF/IIS/Windows Services/COM Servers/Scheduled Tasks
New Hotness: AKKA.NET
Only small applications are written without a separation of backend duties these days. There are notifications to send, APIs to call, reports to collect. The classic .Net programming model only gives us the barest guidance as to how to structure and code these kind of applications. Akka.Net is a port of the Java Akka framework, which is in turn inspired by the Erlang runtime which is known for providing a highly reliable development model for backend services in telephony and message processing. While nothing on .Net or Java can guarantee the robustness of the Erlang runtime, Akka provides a lot of infrastructure and guidance for making your backend code into manageable components with comprehensible life cycles. The creators have also created a training bootcamp for learning the tech.

Old and Tired: nUnit
New Hotness: Fixie
nUnit has a standard lifecycle for a test and a class full of tests. However, it is one-size-fits-all, which means you have to cram your broad shoulders into a too-tight jacket. Fixie is a configurable, convention-based testing framework that allows you to structure your test classes in a way that aligns with the code you are testing. Need data-driven tests? Structure them that way. Need a new database instance for each test? Can do. Need to run code before and after parts of your test cycle? Do it! The correct structure for your test classes can make the difference between useful, flexible tests and brittle fragile ones that break every time there is a change. Learn more from the Pluralsight course. Fixie also allows for a choice of assertion frameworks rather than including a default one, allowing the test grammar to be more expressive.

Old and Tired: Msbuild, Rake
New Hotness: Fake
Build scripts? F#? Let’s do this!

Old and Tired: WebApi
New Hotness: Angular with SignalR
‘REST’-ful endpoints are great for supplying data and services to your front-end app, but there are a lot of timing issues, serialization issues, and boilerplate code to work with. What if you could just pass data and method calls back and forth with the server with a real-time connection between the web server and the Angular application? With SignalR you can.

Old and Tired: Stylecop
New Hotness: Roslyn Code Formatter
Automatically format code to follow coding standards before checking it in.

Old and Tired: Nuget
New Hotness: Paket
Nuget is great, but it doesn’t model transitive dependencies well, it doesn’t support semantic versioning, has assembly binding redirect problems, and doesn’t provide a lot of control when you have multiple versions of a sub-dependency required by your libraries. Paket provides a nuget-compatible solution for greater control of your dependency chain, and allows additional hotnesses, such as referencing single files of a GitHub repository (dapper, anyone?) instead of requiring a package wrapping a dll.

Old and Tired: SQL Server
New Hotness: OrigoDB
Ok. I’m not sure if this one is ready for the ‘hotness’ label. It’s edge still has a little too much blood on it. The idea is, however, really sexy. Imagine storing all of your database data in RAM, and interacting with it using clear CQRS semantics. Add in replication, pluggable disk persistence and serialization, and the flexibility to model graph, relational, document, and key-value data, and you have the start of something hot.

The .Net ecosystem is getting better and richer, and in a couple of weeks, people from around the world will be getting together here in Portland to celebrate this, and share what they are doing. Why not join them at .NET Fringe?

Experiment with and share your C#, VB, and F# code with .NET Fiddle


A better interview, a better employee

Did you hear about the company that got amazing, industry-leading efficiency and results from their engineering team, by having them spend 45 minutes meditating, twice every work day, before starting to code? If you haven’t read this one, go do it now! Robert Glass, in Facts and Falicies of Software Engineering, writes “The most important factor in software is not the tools and techniques used by the programmers, but rather the quality of the programmers themselves. … Tools matter. Techniques also matter. Process, yet again matters. But head and shoulders above all those other things that matter are people.” I think most of us know that the 10x developer exists. Some people are simply more productive and capable than others.5743450139_e920e959b8 10x developers are responsible for the success of new techniques, new tools, new practices. 10x developers make their managers look awesome, and their companies immensely profitable. I like to think that most people can become 10x (or at least 8x or 6x) developers given the right management, mentoring, environment, and motivations. That is not, however, my current point. The point here is that there are very good developers available to hire. People who code are not reproducable, replaceable parts. People who code are not identical or even roughly equivalent. If you can accept this fact, then it follows pretty clearly that a hiring process that is focused on filtering out the lowest-quality candidates, and passing whoever is left is aiming for a very low level of success. A disqualification process can only give you low-average results. What if we had a process that focused on detecting the very best developers and capturing them?

We thought [we needed to have a disqualification process]. But the (nearly) resume-blind process we settled on quickly converged on a nearly all sleeper candidate pipeline; in several years, we hired I think just 2 people that had our field on their resume. … Recruiting is two problems: outreach and qualification. … the changes we made to qualification were critical, instrumental, fundamental to our success. Most of our best hires could not have happened had we qualified candidates the way we did in 2009, and the way most firms do today.

Thomas Ptacek

Recruiting is ‘two problems’. The first one is outreach. Almost all of us completely ignore this side. We put up the ‘help wanted’ sign, and wait for people to show up. A very few companies will play host to local developer user groups, and show off their cafeteria space. Those companies are the stand-outs. They could do even more, but they don’t.

Just a little bit of marketing and differentiation can go a million miles in filling up the candidate pipeline with high-quality people. You can give your employees 20% time, make everyone a manager, give every developer a private office, let everyone work from anywhere, or make each team directly responsible for their software’s operation. It doesn’t take a lot to stand out of the crowd of employers for software engineers, and most of the “concessions” you have to make are, unlike pinball machines and free beer, going to make your team more productive, creative, and profitable. Why are you not doing this?

The important thing is that this is not, and should not be, a gimmick or a useless perk. It just needs to be some concrete, tangible, lasting indication that your company values the people and the work over the safety of status quo ‘best practice’ nobody-ever-got-fired-for-buying- type management. Shout out that your people are important, and you’ll be very different from the others that just write ‘people’ in their mission statement and proceed to mine their human resources. My next post will be on culture, and have a lot more ideas along these lines, but the barrier to entry for being a better place to work is pretty low, and it can have a big impact.

I work at a just fine company. I work with great people. I have absolutely no problem recommending my company to anyone I know who is unemployed, getting abused at their current job, or just needs a stable place to be for a while. What I cannot say is “dude! you have to quit your job and come work with me, because this place is DIFFERENT!” Um. Because it’s not. The good developers that I know get job offers for companies that are ‘fine’ so fast that we probably can’t schedule a phone screen before they sign an offer letter somewhere else.

One last note on the subject of outreach: factor in the Dunning-Kruger effect. The people who are least likely to be qualified for your needs are the ones who are going to confidently knock on your door. The people with a depth of understanding or a flowering genius on a technical aspect are more likely to underestimate their skill and believe themselves to be un- or under-qualified to work with you. Compassionate ourtreach is a tool for getting people to talk to you and creating relationships with those people who have the capacity to be your next tribe of super-performers.

Thomas Ptacek implemented a better hiring process at Matasano and his new firm. I don’t think I can write a more powerful description of his point than he did, so we’ll just do the long quote:

The software developer job interview doesn’t work. Companies should stop relying on them. The savviest teams will outcompete their peers by devising alternative hiring schemes. Years from now, we’ll look back at the 2015 developer interview as an anachronism, akin to hiring an orchestra cellist with a personality test and a quiz about music theory rather than a blind audition. Being good at navigating hiring processes requires a basket of skills that isn’t correlated with job performance. The world is full of people who can speak expertly about programming, but can’t effectively code. The majority of people who can code can’t do it well in an interview. Our hiring process therefore systematically misprices candidates. It’s a moral problem and a market failure. Profit from its correction.

As an aside, Ptacek talks in his second section about unexpected world-class genius. If this interests you, definitely go spend an hour listening to This American Life: Batman.

The first thing that we need to eliminate from our hiring process is the hostility. Hostile judgement of the candidate, their personality, their intelligence, their life work, and explicitly telling them that on the basis of a 30-minute phone screen or a 5 hour line interview, that they don’t measure up is…evil.

Also, we need to work to have the process not feel so hostile within ourselves. As interviewers and hiring folk, what do we have to fear? Let’s address those fears and mitigate them. If we are afraid that we will be slowed down by hiring a new person, we should avoid hiring when it’s a bad time for the team. If we are afraid that we cannot escape a bad hire, if things sour, then we need to be explicit and quick about trial periods. Even if the boss-men won’t let you fix your organization and force you to hire unneeded people, that doesn’t mean you should torture your candidates. They don’t deserve it.

Next we need some formal standards that define a good hire. Even when we run interviews with seemingly objective topics, we tend to have a rather subjective and arbitrary judging criteria. For the most time, however, our interviews are entirely subjective.

Random employees conducting random interviews based in part on subjective psychological assessments, each producing not data but a “hire/no-hire” recommendation, reassembled by a hiring manager into a decision that would be made only marginally less rigorous if it also involved a goat sacrifice.

Thomas Ptacek

Prepare the candidates. Make the process clear. Give them confidence. Train them to take your interview. Let them interview on their own ground. Let them know if they aren’t quite ready, then prepare them to come back. I think it’s very possible to design a recruitment workflow that is clear and transparent, and lets people who have any interest in working with you learn more, and gradually learn from you, teach you about them, and develop a commitment to joining your team. I think this can contain an interview, but should be much more.

It should also generate some data that is measurable about the person. Hiring shouldn’t be the last step in a series of gut-checks and emotional judgements. It should be the result of of some collected measurements that can be objectively evaluated for the hiring decision, as well as subsequently evaluated to find out if what is measured correlates to the results of the hire.

If you are hiring people to develop software, and testing them on their ability to do so, does it make sense that you should develop some code for them to be evaluated within? Unless your jobs involve starting new projects from scratch constantly, don’t ask your candidates to prove themselves in a new project. Give them a existing pile of legacy code (or a mockup of it) and have them show some work within that. Give them a set of virtual machines to work within that can build and run the test code. Give them a working environment for builds and debugging. Do as much work setting up the test as they have to put in in oder to take the test.

Then use the same test for all your candidates. Get the same facts and learn the same things about each of them, so you can experiment, measure, and improve upon your qualification tools and processes. Check your job interview into source control, and keep track of how it changes.

Make sure your candidates are prepared to take your test. Give them tech support while they are working on it. Make sure someone in the interview process is responsible, not for disqualifying the candidate, but instead for showing them in the best light and advocating for them. If things don’t work out, give the candidate some help and ask them to go away and improve. You could buy them some books, or some online training. You could give them some mentoring and support in finding a position somewhere else.

The people we are interview are people. They are our future co-workers, or the friends of other people we will work with in the future. Their contributions at our company, or another company, are part of the ecology of technology and either enable or limit what we as an industry will be capable of and allowed to do in the future. Every serious candidate should be invested in and treated with dignity.

The results will come back seven fold.

photo credit: Hiring Nerds! via photopin (license)


Interviews, Irritated

I’ve been seeing a lot of great discussion on the topic of hiring in software engineering lately, and it’s had my mind spinning and my gut churning. The whole thing is a mess. Some of that mess is just human. Sigh. Humans disappoint me. On the other hand, we can learn, and in so doing make things better a little bit at a time.

One of the reasons that hiring is so frustrating is the cycle of abuse. We are used to companies treating their applicants as adversaries. The company wants you to supplicate yourself to them, begging for their approval to work on their yet-another-enterprise-ball-of-mud-legacy-dig-pit project and prove your passion and commitment to their mission of making quarterly sales goals and not getting middle-managers fired.

In return, they entice you with, um…well, they don’t want to tell you what you will get paid (even though they should) (to be fair, salary isn’t a useful lever for getting better performance either). They don’t have much going on in culture, so they don’t have much to tell you about.

Heck! Why are you applying for this thing anyway? Oh yeah, because you’re desperate. You need ‘a job’ andthis is where you get them. No choice. You’re going to go through this whole painful process, and half the time they will slam the door on your face, never telling you anything useful about what went wrong and crushing the little part of you that was starting to like these people and wanting to see them every day more than your family for years.

If they do let you in, you’ll bear that trial as a mark of pride, and make sure that you don’t allow ‘unworthy’ people join your new ranks. The next applicant better prove herself to you, because you wouldn’t want any rif-raf in here. And the cycle continues.

Taking this pain from the other side, however, I see that TechCrunch recently wrote about ‘Secretly Terrible Engineers‘, mocking the job interview process which requires candidates to prove their basic level of competence. Yet, as someone who has been involved in the interview process, I know that the applicants are there which simply don’t know how to code. At all. They are terrible, horrible, negative contributors which make working at a company bad. They are also concentrated (distilled?) in the stream of candidates spurting through the tech recruitment firms, while the quiet, competent majority sits, shell-shocked from their last trial of new employment, at their desk doing a job they are minimally satisfied by since that is easier than finding you.

An fun anecdote from Hacker News:

I remember, rather vividly, the first time I figured out that an engineer couldn’t program. I was attempting to tell him where a value was being assigned in a program. After failing to do so over email, I went over to his desk and asked him to navigate to the file at issue. He was unable to do so. I told him I would do it, assuming that he was unfamiliar with the directory structure in that part of the program, and opened the file. I then said “So you see, the assignment is made in the fooBar subroutine.” He couldn’t find the fooBar subroutine. I said “It is the third method on your screen.” He couldn’t find it. I said “It is this one, here, which I am pointing to with my finger.” He said “OK, that one. Where is the assignment?”
The fooBar subroutine was one statement long.
A coworker, having overheard the conversation, stopped at my desk later, and explained to me that, if I had pressing engineering issues, coworkers X and Y would be excellent senior systems engineers to address them to, but that Z should be allowed to “continue to devote his full attention to work which he is well-suited for.”
The industry has many destructively untrue beliefs about hiring practices. That there exist at least some people who are not presently capable of doing productive engineering work is not one of these beliefs.

Screening out truly useless people is a requirement of a process, but it’s a step that is made a lot easier by not having a situation where it is the most important or most used part of the process. Better applicants means you can afford a less punative process, and once you are in that place, you can make your screening system less than a interrogation using brain teasers.

Technical interviews often are that bad, too. The argument against coding interviews is a valid one, since not every engineer can succeed at a challenge like that under the pressure of a hostile interview with their livelihood on the line. Good people are valuable and somewhat rare, and we shouldn’t be screening them out by having a hostile interview.

Thomas Ptacek:

I’ve seen it happen repeatedly over my career; people who’d pass interviews and then, over 15-20 minutes of face-to-face discussion a couple weeks on the job, not be able to comprehend the idea that a C pointer needs to point to valid memory.
That’s what’s so mind-blowing to me about our terrible process today. It aggressively tries to find and dispatch unqualified candidates, so much so that it forcefully repels talented people. And it fails miserably at screening out people who can’t code! It is the worst case scenario of processes.
It’s also really important to remember that the problem is People Who Can’t Code, not “People Not Smart Enough To Code”. Time and again I’ve “worked” with people who could very effectively critique my own code, who could participate in design meetings down to the bits-and-bytes layer, and, having taken responsibility for actually implementing some portion of those designs, could not commit usable code to save their life. I don’t know what the deal with these people is, but they are out there: plenty smart, totally fluent, and completely ineffective.
I was talking to Erin this weekend about the phenomenon and realized that these people not only exist, but are actually favored by the way the market works. A smart person can last many months in a dev role before anyone realizes they’re ineffective. Then, it takes many, many more months to manage them out of the team. By the time the story plays itself out, the bad team member has more than a year on the job, and when they parlay that resume line item to another prominent job elsewhere, their previous teammates aren’t outraged but instead relieved. They end up with gold-plated resumes and tons of credibility.

Add into your consideration this: software developers are very poor interviewers. They have a background in the cycle of abuse, so they are likely to perpetuate it. They have interviewed relatively few people in their lives (a shift supervisor at Arby’s probably does more interviewing), so they have a poor baseline to compare from. They have no specific professional training in the management and hiring process. They are likely to base their decision entirely on emotion and hire based on ego or just hire pretty people (beware the pretty people). Worst of all, your developers are expensive, rare resources in your company that should have something better to do than run interviews (and probably would much prefer doing it).

Using software engineers in a context where they are mainly trying to negatively filter a stream of candidates is an expensive, unproductive waste.

Can we make interviews better? I hope to share some thoughts on that in my next post or two. It certainly needs doing, whether you’re the one interviewing or the one being interviewed. Something better is badly needed.


Some Workplace Reads

Mike English wrote a post on Remote-First Communication that a friend shared with me, so I’m pulling together my little backlog of workplace-related articles.

Mike’s thoughts on the benefits of using written communication first in your team processes echo things I’ve said over the last years. The attendance-obsessed, lets-schedule-a-meeting, memory-hole incompetents that populate a lot of middle management love in-person communication, because they aren’t accountable, can change what they say from context to context, and whatever their small value add to the organization is, you can only get it from them in real time, face-to-face, so they get to bill you for it on each use. On the other hand, if you have actual work to do and value to provide the company, doing it in text allows you to clearly communicate one time and allow that information or decision to keep being used for every subsequent need. What a relief! That it also completely enables time- and place-shifting is aa super bonus.

Why is that a bonus? Rob Reynolds discusses a number of the advantages to a business of allowing remote work. For myself, I don’t love remote work because I hate going to work (although I hate the office space I currently work in–trying to code with the sales guys shouting jokes at each other next to your cube is AWESOME!!!). I am a big fan of remote work because of the people I get to work with that way. Successful remote workers are often the really competent collaborators. I like working with them. Also, the number of possible smart and driven people in the world is larger than the number of smart and driven people willing to put up with the commute time from their home to my office. Let’s hire better talent! Sucky employees cost way too much!

Rob says “The bottom line is that you keep your workers happy, and they are much less likely to leave your organization. Turnover costs are huge to a company. If you are not making your employees happy, they are talking to others about not working for you. They have their ears open to new opportunities. They are likely looking for other jobs as you read this…Your best people outperform your middle of the line folks by ten times.” I think of the failures of middle management to optimize developer happiness as fraud against the company. Millions of dollars spent for nothing. It’s a crime.

How do you keep those developers happy? How about having a way of rewarding them and promoting them at work without forcing them to change careers? Lizthedeveloper writes how to reward developers based on her work for Simple Financial in creating a talent path for senior developers.

On a lighter note, Eric Farr writes up a simple description of his team’s move from Scrum to Kanban. Really not painful, and it solves some of the pain points of a too-heavy process that was simpler than Waterfall in it’s time, but is handcuffs today.


Command Line and Utility Finds Roundup

Every once and a while I need to clean out my Instapaper of some cool utility stuff I’ve collected. This is that while.

  • I’ve been doing some clojure, and Ultra is a neet-looking Leiningen plugin for improving the look and feel.
  • Mosh (mobile shell) is ssh++ with reconnection.
  • moreutils is a growing collection of the unix tools that nobody thought to write long ago when unix was young. Simple stuff you weren’t allowed to imagine you needed!
  • is a linux webapp hosting platform that makes it really easy/turnkey to deploy things like MediaWiki or GitLab or LibreBoard. It’s also an interesting place to host newly developed apps, as it provides some infrastructure services that you won’t need to develop for yourself. (It needs a Phabricator module!)
  • Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
  • Create context menu items for Windows in C#.
  • MagicPrefs lets you wire up some cool shortcuts with your MacBook trackpad and MagicMouse.
  • Asciinema and Showterm are utilities for recording a console session for later embedding in a web page as an interactive ‘video’.
  • I love me my Chocolatey, but it’s nice to have options, and Scoop looks like a good one with a bit of focus on the unix-y tools.
  • Just found out that you can specify specific domains and tlds in files in /etc/resolver to use different DNS resolution sets. This can be a way to use dnsmasq to provide specially resolved address sets for development or CDN purposes. Also useful to my split-horizon VPNs.

Bonus: “Things—presences or voices of some sort—could be drawn down from unknown places as well as to standard out.” –The DOOM That Came to Puppet


Fog Creek Code Review Checklist

Definitely a worthwhile read, although a more actionable checklist would be shorter, I think. I think there are also pretty significant differences in what a ‘review’ might mean depending on the size and frequency of check-ins. This list really assumes some specific workflows and team behaviors in terms of what gets reviewed.


Angular Resources

As I’ve been working up a new angular application, I’m getting a lot of value out of the write-ups at Specifically, the articles on unit testing Controllers and Services have been quite high-quality.


How I Start

I really like the concept of this site. “How I Start” gives some expert demonstration of how to use cool new languages and frameworks. How do you create a project and how do you lay out your code and tools? Valuable advice.


Escaping JSON for use in unit tests

I whipped this together to answer a Stack Overflow question, but I keep looking for the url, so I’ll leave it here.