On Monday, I started working on a new product (well, the product is not new, I only joined) and it’s neither Java nor Grails, but .NET. Which means working with a new (also not new, but I haven’t used in in ten years) OS, a new IDE, new team, new code, …
Luckily, there’s ReSharper, a great tool for visual studio, that let’s me use all the shortcuts I know from IntelliJ IDEA.
But as all the rest is so new and exciting, be prepared for a lot of beginner’s posts about C#, Team Foundation Server, working off-site and alike.
In general it’s a good thing, when your IDE is able to surprise you from time to time. However I was a little scared, when IntelliJ IDEA informed me that vertex(maxX, maxX, 0); was probably wrong. Of course I knew that I was gonna replace the second maxX with maxY as soon as I would give up symmetry and calculate the second dimension, but IDEA – how could it know? It’s easy – the vertex methods parameter names are (x, y, z) – that’s why IDEA infered that “max” was probably a prefix. Clever. By the way this confirms the need to choose meaningful and consistent names, even though your IDE is the only one who will ever read and comment on your code
Today we had to learn the hard way, that things in your favorite IDE aren’t always what they seem to be.
We created a new file in Intellij IDEA, typed in some cyrillic text which was correctly shown on the screen and relied on the editor to save the file the same way as we saw it. But unfortunately it only saved a series of question marks.
As we found out, the file encoding (shown at the lower left corner of the window) was set to ASCII. And so, eventually, all non-ASCII characters were replaced by question marks. What remains is deep frustration, 500 lines of question marks and the big question: Why the hell didn’t the editor show us, that he couldn’t interpret the typed-in characters?