Ctrl, Cmd and C#
A language is learnable. It is the domain and the codebase that take time – and two machines that cost more attention than the syntax.
After some twenty years with PHP as the language I thought in, I moved partly over to C#. Partly, because it depended on the project: Egon and ebillet ran on Umbraco and required .NET, while the rest of the clients stayed on my usual stack.
Syntax you can read your way into. Types, classes, inheritance, interfaces – the same concepts I have used all along, with different keywords in front of them. A week in, I could solve real tasks in C#.
What actually took time
The domain. What the business actually does, why the numbers are calculated in precisely that way, which rules are written down nowhere because everyone in the office knows them.
And the codebase. Not the language, but this system's version of it: why there are two layers that appear to do the same thing, which one is the new one, and what the old one is still used for. That is learned by reading and asking, not by looking things up.
The platform was Umbraco, not just C#
The structure was recognisable. Helpers, middleware, models, views and services all had parallels to the world I knew from Laravel. I had to learn a new implementation, not a new way of thinking about web applications. My work sat mainly in the view layer.
What I had to get used to was having to start the project in order to see it. Behind the little green play button in Visual Studio sit four things: it starts IIS Express, publishes the project to it, attaches the debugger and opens the browser. In PHP you save the file and hit refresh – the web server is already running, and there is nothing to publish.
It changes the rhythm of a working day. You stop fixing one thing and looking, and batch several changes instead, because each round costs a startup. In return you have a debugger attached from the first second, which is not nothing.
Two machines
The .NET work happened on a PC in Visual Studio Professional – not VS Code, which I use for everything else, but the full IDE. Whenever design elements were needed, or when the day brought one of the clients still on PHP, I moved back to my Mac. The tools and the workflow live there, and that is faster than rebuilding the same setup on the other machine.
Practically it was solved. The mouse and keyboard could switch between the machines at one press, and both machines used the same monitor. The hardware was not the problem. What did not switch was my hands.
The keyboard shortcuts sit in different places. Copy, paste, switch window, jump to the start of a line – after twenty years they are in the fingers, and one press of that button puts them in the wrong place. You do not rewrite anything; you just hit the wrong key and notice a second later. Each time costs nothing. A hundred times a day does.
Several times a day, for months. That is the kind of thing that appears in no account of what changing language costs.
What I took with me
After twenty years with PHP, it was interesting to discover how little of the experience was actually tied to PHP.
Reading unfamiliar code, finding the patterns in a system, asking the right questions about a requirement, and knowing when something is likely to become a problem later – that all came along.
C# had to be learned. Of course. But it turned out to be the least interesting part of the change.
The hard part was getting to know one more codebase, one more domain and one more platform.
And remembering whether copy was under Ctrl or Cmd.