Experienced Points: Why Video Games Need Their Own Programming Language

By Shamus Posted Tuesday Dec 9, 2014

Filed under: Column 178 comments

Nitpick shield: Games don’t “need” a language, but such a thing would be useful. I’m not complaining about the person who titled this article. I had the same problem yesterday when I said GTA V was “Banned” instead of more correctly stating it was “un-stocked from certain retailers in one country in response to an internet petition”. It’s really hard to cram complex ideas into pithy article titles. I’m okay with a bit of conceptual slop as long as it still conveys the basic idea. The only downside is the prevalence of people who argue with article titles without reading the article. Those people make me sad.

ANYWAY.

My column this week talks about the fact that we use C++ for making AAA games, and why that’s strange and un-optimal. The conversation stems from this video:


Link (YouTube)

That’s a two-hour talk by developer Jon Blow about why he thinks game development needs a new language, why the existing languages don’t quite cut it, and a few things he thinks the new language ought to do. It’s pretty heavy-duty in terms of technical jargon, so if you’re not a coder I don’t know if you’ll get much out of it.

My column attempts to explain the mess we’re in and how we got here, and is aimed at non-technical people who can’t follow what Blow has to say.

I have a half-written post where I go over Blow’s video point-by-point, annotating it for non-coders. I’ll finish it one of these days.

And finally, I’m going to start taking reader questions in my columns. I’m looking for questions about programming. Stuff like, “Why do we have to keep updating our drivers for existing graphics cards?” or “Why do consoles still use checkpoint saves?” or “Why do Skyrim and Minecraft have thousands of mods, but most games have none?”

Note that these questions are for the Escapist audience, so try to keep questions relevant to that. Don’t ask about stuff like Good Robot, because most of them have never heard of it. Don’t ask overly technical stuff (“What do you think of how C++ handles exceptions?”) because that’s going to be too big and complex a discussion for The Escapist. You can ask about non-programming stuff, but it should probably be focused on videogames in some way. If you’ve got a question for the column, you can send it to [email protected] If you send it anywhere else I won’t know it’s for the column and I’ll probably put it in the Diecast pile. Please bear with me, this job is confusing.

 


From The Archives:
 

178 thoughts on “Experienced Points: Why Video Games Need Their Own Programming Language

  1. Hal says:

    Dear Shamus,

    How do you type with boxing gloves on?

    1. Shamus says:

      kol,gfhtcsxd n olktg frtgthbnZAfrrd hbzsaedrdsx,l medrsaqwll;thyg.

      1. ThaneofFife says:

        Trs;;u???

        P Yjpohjy oy esd ,ptr ;olr yjod…

    2. Von Krieger says:

      Poorly.

    3. krellen says:

      It’s tricky, but possible if you take your time and backspace a lot.

      It took me like two minutes to type that sentence. (I took off the gloves for the subsequent ones.)

    4. Trix2000 says:

      Oh heck, it’s really easy so long as you have the gloves!

      …Wait, do you mean type WELL?

      1. Wide And Nerdy says:

        Nice. That was worth of Zucker Abrams Zucker

  2. The Schwarz says:

    FYI, Civilization 4 was written mostly in Python.

    1. Phill says:

      The core game engine was written mostly in c++. There was however a lot of scripting exposed to the players which used python. ( And if I recall correctly they eventually released the SDK which exposed a fair amount of C++ code to players to so they could pay around with some of the game dlls.) But the main game code was absolutely not written in python.

      1. Tizzy says:

        Indeed. Python is very cool , but I doubt you could make a AAA game using only Python. Nor should one try to.

        There is nothing wrong with letting each language shine where its strengths are, and I think it’s really cool to see how nowadays you can see routinely big projects that integrate code in several languages.

        Back when I was a lad, games were written in assembly language!

        1. Max says:

          Challenge Accepted

          1. Muspel says:

            The primary issue is that Python, as an interpreted language, is very, VERY slow compared to a compiled language. Especially a relatively low-level language like C.

            And AAA games are largely defined by their high-end requirements– great graphics, large environments, et cetera. Lots of things that will put a strain on a computer’s ability to maintain solid framerates or avoid horrendous loading times.

            Python is primarily useful when you’re doing things where what matters is the amount of time it takes to produce a program, not how much time it takes to run it, because it’s a lot easier to write code in Python than it is in C or C++.

            As an example, let’s say that you need a program that can search your company’s database for something and cross-reference it with something else. If it’s a check that needs to be done once a day, it really doesn’t matter if the program takes ten seconds instead of a tenth of a second, and if your programmer can write the Python script in half the time, you’ve probably saved money.

            But if you’re writing a game engine, there are lots of things that would need to calculated every frame, which generally means somewhere between 30 and 60 times per second. At that point, speed starts to matter a LOT. Having a per-frame process that takes .5 seconds instead of .05 will cut your framerate by a factor of ten.

            1. Tizzy says:

              I could not have said it better. :-)

            2. Zak McKracken says:

              There’s one aspect missing: Python is used in scientific computing a lot, and there are entire projects using just that … and a bunch of libraries containing properly optimised code for everything that approaches heavy lifting.

              You could probably create a finite element code in python these days. As long as you took care to use the existing libraries for matrix and vector maths, you wouldn’t do half bad.

              In a game context, this means you could probably really put all the draing, screen-updating, physics-simulating stuff in proper, highly optimized C++-libraries but the organisational stuff (level layout, mission goals, event triggers, when to spawn new enemies, when to level up …) into Python. That’d make it super-easy to rearrange maps, scripted events, probably quite a few more things.

              Heck, massively parallelvisualisation software for immense datasets has been written mostly in Python, and that’s all about dealing with limited RAM and CPU/GPU cycles in the face of gigantic datasets. The trick is singling the really performance-critical bits out and move them into libraries.

          2. Zak McKracken says:

            Wait, challenge accepted for writing a game in Python or in Assembler?

            I still remember the times of tzping program listings from magayines into a hex editor, even learned the basics of assembler once but really… on today’s PCs with variable hardware, drivers, whathaveyou … you you’d probabably die trying just to figure out what the hardware is let alone adressing it.
            … then again, for a small and well-determined system like a RasPi — that might actually work, though it’d be still a lot more complicated than back in the day.

        2. Nixitur says:

          Uhhh, I really don’t like Python. I always feel like I have to know the entire implementation of a function to know whether it will accept a certain object as an input. And the enforced whitespace and lack of {} just messes with my perception of control flow.

          I suppose that’s just a matter of getting used to it, but I seriously can’t fathom how anyone can deal with duck typing. Look, I just want to know exactly what functions the object has to support to be compatible with this function, that’s all.
          In Java, I’d just look at it and say “Oh, it’s the interface XYZ. So, if I want the function to work with my class, I have to implement functions f and g and if I forget that, I’m gonna get an error at compilation time.” and I know all I need to know just from looking at the documentation of that one function instead of having to read through the entire freaking page.

          Oh yeah, that’s another thing that baffles me. Who the hell thought that just cramming all classes that are vaguely similar on one page was a good idea, easily readable or simple to understand?

          Every time I look at the Python documentation, I get slightly miffed. I don’t understand why everybody loves this language and says that it’s so easy to learn and that it’s documentation is so great.

          1. Zak McKracken says:

            Obvious XKCD reference:
            https://xkcd.com/353/

            …that’s why.

            Seriously, there are things that are just stupidly easy to do in Python that I’d have no idea how to accomplish in other languages. Removing variable declarations and brackets around code blocks just speeds up writing code, and is visually cleaner. One of the goals was to speed up programming and improve readability, so that’s accomplished.

            With great power comes great responsibility, so there are a number of hacks that are possible but very risky. I learned to code on C64 BASIC, then turbopascal, later Fortran and bits of (non-object) C. Going from there to Python was a huge step but once you’ve got the habits that allow you to breathe in this world, you never want to go back. At least I don’t.

            …then of course it’s a question of using the right tool. So me doing proper computing with a light GUI is just fine since there are loads of libraries for everything I need. It completely replaced Matlab for me, and for most other people I know. For other things there may not be the same infrastructure, though I’m still impressed any time I start looking for some Python libraries that could help me out in some way…

          2. Zak McKracken says:

            oh, and if you want to have declared data types, you can always use numpy arrays with typed fields. The types ans size of an array are immutable and you can even give them names. So you could basically replace a dictionary with an np.array. Also, vector maths is super easy (it’ll even use your CPU’s SIMD commands), and you can feed most formulas an array of numbers instead of a single number, and it’ll give you the array of results. Doing any faster in C or Java will require you to write LOADS of code, and know very well what you’re doing.

  3. Alan says:

    I love Blow’s games, especially Myst, although I’m still not clear why he changed the name for the upcoming re-release.

    (I’ll stop telling the joke when Blow proves it’s unfair. He’s failed to do so for 4 years now.)

    1. The Rocketeer says:

      Shot in the dark, but… Are you Alan Broad?

      1. Alan says:

        Nope. (I have a feeling I may be missing something here. I have no idea who Alan Board is.)

    2. Ravens Cry says:

      I admit, I don’t get the joke. Explain?

      1. Lachlan the Mad says:

        Blow’s new game, The Witness (currently seems to be in that last 10% of the work which takes up the other 90% of the time) is being billed as a spiritual successor to Myst. They look really similar.

      2. Alan says:

        Blow is hyping The Witness as innovative, but to this point everything he has described or shown looks like Myst, or at least RealMyst.

        1. Lachlan the Mad says:

          The main difference that I can see is that The Witness uses a consistent puzzle language. In Myst, the puzzles within an Age usually followed a theme, but aside from a few minor details there was never a unifying language. In The Witness, every single puzzle is interacted with by messing about with mazes, which admittedly sounds dull. Still, you know how Portal begins by teaching you the very basic rules of portals and then expands it into physics-defying glory? Best-case scenario is that The Witness begins by teaching you “start at entrance, find exit” and then will expand it into mind-puzzling beauty.

  4. Alan says:

    One of the advantages of C is that it’s the programming language just about every other programming language can (relatively) easily interface (link) with. So if you want to write a nifty new library that as many people as possible can use, C is a pretty good choice. Of course, if all of your libraries are in C, why mess around with another language when you could just stick with C or C++ and eliminate the hassle of integrating with another language?

    I think there is a lot to be said for embedding a second language for non-CPU intensive work. Lua seems to be popular, as it’s relatively small and easy to embed.

    People who find programming languages interesting might be interested in Inform 7. It’s a programming language designed to write text adventures in. It’s really well tuned to that specific problem space. I wonder what a programming language tuned to 1st and 3rd person shooters would look like.

    1. Felblood says:

      wouldn’t it just look a lot like Unrealscript?

    2. Even if you don’t have much interest in programming languages, if you liked text-adventure games, Inform 7 is worth a look. It’s a ton of fun!

  5. Phill says:

    There is one big downside to having a language designed and used for games programming: you create a barrier between games coders and everyone else. If you know C, C++ or java ( and is not that hard to be competent in all three), and you are at some kind of senior level then you’re not going to find out so easy to switch into games when you have no experience of . And vice versa, experienced games programmers will be ghettoised and harder to employ in any other jobs.

    This is bad for flexible career prospects, and I suspect particularly bad for games programmer salaries, which are already significantly below the levels of the rest of the industry.

    I imagine a lot of programmers would still want to code games in C++ if only to keep their career options open.

    1. Trix2000 says:

      On the other hand, it’s probably easier to learn than full-on programming, and it’d still likely be a stepping stone for a full programming education anyways.

  6. Piflik says:

    This might sound arrogant and might be a bit controversial, but I have to disagree with your notion that the experienced programmers would be newbies, if you switched to a new programming language. A good programmer should be able to learn a new language in a couple of weeks. Especially an experienced one.

    First of all, programming languages are fairly similar in both syntax and semantic (discounting functional languages like Haskell, or esoteric languages like Arnold C). Secondly, a programmer doesn’t so much write Code, he implements algorithms. And these algorithms are independent of language.

    Rewriting existing libraries are a real hassle, though…

    1. guy says:

      When you need to make an optimal implementation of an algorithm, that is not nearly so independent of language.

      1. Ayegill says:

        As long as the language is still imperative(So not a corner case like Haskell), and doesn’t hide a lot of complexity from the programmer(which you really don’t want if you’re that worried about performance), I’d say most of the relevant skills should still translate.

        I’m not saying people will be up to speed after messing with a new language within a weeked, but I think we’re talking weeks or months to use it proficiently in the relevant domain, rather than years and years.

        1. Ingvar M says:

          There are interesting corner cases when you switch between almost-similar languages (say C++ and Java, two languages I am somewhat familiar with) where things that are perfectly fine in one will have a high chance of performing atrociously in the other.

          If we look at C++ vs Java, the cost of heap-allocating and then rapidly deallocating data is bordering on expensive in C++, but is essentially free in Java. On the other hand, stack-allocations followed by deallocations in C++ are essentially free.

      2. Peter H. Coffin says:

        But knowing how to recognize and build an optimal implementation is language-independent. That’s design work. That’s writing. That’s not plugging together prewritten chunks and fiddling with the API to make it work. Because if the latter is what’s (and you do end up then having a language dependence) then it doesn’t matter if chunks you’re pasting are in your head, or coming from the team’s code library or being cribbed from a web page somewhere. The only reason they’re “optimal” is because someone told you they were, and maybe you tested a couple in a particular set of circumstances that may have no bearing on what’s actually fast. It’s bordering on cargo-cult programming. And frankly, it shouldn’t be in your head because you want to build the right kind of thing into the language in the first place. Because it’s a waste of time to know that “Oh, I have this kind of data so a selectsort will be faster than quicksort most of the time” and implement it instead of just calling a built-in selectsort feature.

    2. Phill says:

      Two things.

      Firstly, yes an experienced programmer who has learned more than one language in the past will likely pick up the basics of a new language pretty quickly. But to really be an expert in a language – to be a team or project lead – you have to know a language better than that. I know c++ pretty well. I managed to get stuff to compile and run in java with no prior knowledge of the language in a trivial amount of time. Which is fine for simple projects. But the hidden problem is that I am designing java code as though it were c++. Different languages have different philosophies, subtly different expectations of how to do things. Unless you understand those, you will probably find yourself fighting against the language by doing something the ‘wrong’ way at some point. (And all the C++ experience in the world isn’t going to be much use if you get the job of writing php for the web interface to the game dumped on you instead…)

      Secondly, and more practically, the first pass of filtering in the job application process often involved brain-dead comparison of bullet-point skills lists on a CV (or resume if you are American) versus the bullet-point list of job requirements by someone who has no understanding of how significant the differences are. Particularly when employment agencies get in on the business. That creates a wall of stupidity separating programmers experienced in different languages. An artificial wall to be sure, but even artifical walls reduce the movement between groups. Which would be fine if all groups were equally in demand – but games programmers are pretty poorly paid already because there is an excess of supply for them compared to other programming jobs.

    3. silver Harloe says:

      Learning a new language: 1-2 weeks

      Learning the idioms, the ins and outs of the libraries, all the little gotchas where two pieces of code that seem to do the same thing have different performance characteristics, etc: years.

      When I went from being a Perl5 programmer to a Java programmer, it was really easy to pick up the syntax and write basic code. That doesn’t mean any of it was *good* and 5 years later I wanted to hit myself for all the things I did wrong when I started using Java.

      When I started using PHP and Javascript for my latest job, same thing: the code was there and it worked, but I want to fire me-from-7-years-ago for gross incompetence. I wrote functions for things that I now know are in the libraries. I used some Java-like structures that I now know had better ways to be written in PHP. I worried about the memory or speed costs of things that were slow or hoggish in Java, and not at all about the costs of things that were efficient in Java but slow or hoggish in PHP or Javascript. I avoided callback functions because the reflection library in Java made them painful to write in 2001, but they are easy to write in Javascript. When I found a library function that did what I wanted, I was happy, even if it was annoying to use, and then later I’d find there was an even better fit library function I should’ve used instead. I used some Design Patterns that only exist in C++ and Java because they are so strongly typed, and are quickly replaced by arrays in PHP and Javascript.

      The list goes on, but basically: it was trivial to learn the languages, but experience really does make you a better programmer in a particular language.

      Plus there is what happens when you need to read someone else’s code in a new language. If their code works, it can be fairly straightforward, but if it doesn’t, and you have to figure out why… Well, what I can say is: debugging time goes down dramatically with experience in the particular language you’re using. What might take a few hours to debug when you have the “1-2 weeks of exposure” can take you a minute or two when you have years of experience with that particular language.

      1. Shamus says:

        PHP is such a strange creature. I’ve been using it for years and I still think of myself as a novice.

        I think part of the problem is that you can’t tell of well you’re doing. Is this code fast? Am I using a lot of memory? I have no idea. I can’t tell. Which means that once code gives good output I’m done working on it, because I have no way to measure further improvements.

        1. Julian says:

          PHP is such a byzantine mess of a language that I seriously doubt anybody actually knows it.

          1. Hankelhankel says:

            /r/lolphp on Reddit can provide some pretty great laughs. There’s some amazing bugs like:

            >>> 0x0 +2
            4
            >>> 0x0 +3.5
            6.5
            >>> 0x0 +2e1
            757

            or: define() has an optional third argument that specifies if the constant should be case-insensitive; it has the undocumented side-effect of allowing constants to be redefined, but only if they have at least one capital letter.

            But if you’re a little lost and want a thorough breakdown, I liked and was terrified by this article: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

            1. Erik says:

              Just tried the examples you noted above, and either youre wrong, or you are referring to an older version of PHP, because:

              php > echo 0*0+2;
              2

              php > echo 0*0 +3.5;
              3.5

              php > echo 0*0 +2e1;
              20

              1. CJ Kerr says:

                You’ve intentionally replaced the “x” characters, which are SUPPOSED to make PHP treat the number as hexadecimal, but doesn’t always. This is where the weirdness comes from.

                1. Erik says:

                  Yeah, except:

                  php > echo 0X0 +2e1;
                  20
                  php > echo 0X0 +3.5;
                  3.5
                  php > echo 0X0 +2;
                  2

                  1. silver Harloe says:

                    he mentioned in that article that the spacing matters:

                    php > echo 0x0+2;
                    4
                    php > echo 0x0+ 2;
                    2
                    php > echo 0x0 +2;
                    4
                    php > echo 0x0 + 2;
                    2

                    I would’ve never found this bug in my day to day life, because I always use the 4th form (spaces are your friend – they make reading easier). But in theory the spaces should not matter, and they do :/

                    I’m not up to date, so maybe it was fixed later, too.

                    $ php –version
                    PHP 5.3.3-1ubuntu9.10 with Suhosin-Patch (cli) (built: Feb 11 2012 06:21:15)
                    Copyright (c) 1997-2009 The PHP Group
                    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

                  2. krellen says:

                    The x has to be lower-case. The hexadecimal notation is always case-sensitive.

                    1. CJ Kerr says:

                      Yup.

                      Admittedly, this is a really niche-case example – essentially nobody ever deals with hexadecimal in PHP, and even fewer would choose to format it in a weird way.

                      But it’s a nice demonstration of PHP’s general weirdness – either these tests should resolve to an unambiguously correct answer, or PHP’s syntax should be way less permissive to prevent this nonsense ever making it to runtime.

            2. Neko says:

              Ah, good, you linked to the Fractal of Bad Design page. I was enlightened by it recently and feel it’s my solemn duty to mention it any time PHP is brought up ;)

            3. Abnaxis says:

              I learned a little PHP in my course on Database theory in college. Didn’t relly get into it beyond making SQL queries, but it didn’t seem too horrible.

              I started reading that list in the article. I quickly went from “wait, what?” on some of the issues he brings up to “oh, you have GOT to be kidding!”

              And then the list kept going…and going…. and going…

              Isn’t a large portion of the internet running on PHP? How the hell did that happen?

              1. Shamus says:

                I was thinking the same thing. It’s amazing. I never run into these issues, but then I’m always doing really simple stuff.

        2. Chris Davies says:

          PHP was someone’s compilers 101 homework that inexplicably got popular. It’s not surprising it’s almost impossible to know whether you’re doing the right thing, it’s such a bizarre and amateurish language in general. I remember right up to the end of the PHP 4 era, being constantly annoyed assignment expressions weren’t rvalues, except of course in the special case of the prefix and postfix increments. I can’t even imagine what the grammar for the language looks like at that point.

          That’s not even mentioning the half-arsed modules that come with it. I remember the OpenSSL module being some ultra-thin wrappers around a random assortment of crypto functions. No attempt had been made to make the calls more “PHP like”, and of course being anywhere near complete was out of the question. Quality control was non-existent.

          Worse, the half-arsed attitude filters down to projects written in it. Consider mediawiki, the only web application so completely broken that the managed to make it CPU bound. Every attempt they’ve ever made to fix what they laughingly describe as a parser has been abandoned and instead they rely on ever more byzantine caching architectures to mask the problem. And this thing runs one of the most popular sites on the internet. Insanity. If they just devoted some of their constant begging drive money to fixing the thing, maybe they could scrap like 80% of the CPUs they need to run the fucking thing.

      2. I catch myself all the time, I dig through some old code (sometimes posted on the net) and I see how archaic the way I did it is.

        The way I code has evolved as I do evolve.
        I’ve slanted towards always predefining things, set things up as much as possible before entering a loop, I’m not afraid to use extra memory at startup if it means I can re-use it later (instead of wasteful allocate/free calls all the time).

        When I close my program I only close handles the OS documentation state I should close the rest I do not, my programs takes less than a second to start and less than a second to quit.
        The GUI is in it’s own thread so interacting with it will not halt the program otherwise.

        Checking if a new version is available is in it’s own thread that way waiting for a slow server won’t halt the program.

        My code looks tighter and shorter, and I often find myself tweaking improving it all the time.

        Instead of relying on the OS version I now feature test, instead of just assuming libraries are available I dynamically load them which means I can actually show a useful error to the user if something is wrong.

        For example by doing few simple changes I managed to make compiling WebP library in such a way that it can be used n Windows 2000 and later possible (instead of just Windows XP SP3 and later), the upcoming v0.4.3 of WebP should have a “legacy” option available.

        I hate bloat, but I’m not afraid to use some disk space or memory if it speeds up performance.

        I’m also a huge hypocrite, I cringe all the time when I see my old code as I broke pretty much all my current “rules” when coding.

        My mantra for coding these days are “Tight, Simple, Efficient.”
        I’m sure a few years from now I’ll think the me of today sucks.

    4. If you can “read” C like syntax then you can read most languages.

      I first started with Basic on 64 and Atari XE, later AmigaE and C a sliver of ASM on Amiga and HTML then later PureBasic and C and a dash of ASM on PC and PHP, HTML/CSS/Javascript.

      ASM and variants Basic have familiarities, C/CSS/Javascript/PHP have familiarities.
      I’m usually able to do a pretty good implementation even in languages I do not understand well because I enjoy striping code/functions down to their core functionality. If code is hidden in a class somewhere I prefer to just get it and break it down into the parts I need. That’s how I learn and understand the code used.

      1. Ingvar M says:

        I’ve ended up having to cram Ruby, Erlang and Haskell to the point where I could judge if the code I was given by an interview candidate was close to or far from a correct implementation of the interview question.

        It’s not that much of a problem, as it turns out.

        And, yes, if you (generic you, here) ever end up having a coding interview with me, I’ll choose a problem guided towards showing mastery of whatever of “C”, “Python”, “Go” or “Common Lisp” that you’ve said is your prime language, but leave the actual choice of language up to you.

        1. Seems like a fair test as the person would most likely prefer or feel more comfortable with one of them in particular.
          I might however (if interviewing) ask to see the example ion both the language(s) Id’ be hiring for and the preferred language of the interviewee.
          That way I could gauge how much “catching up” they need (if any) for the language they’ll be working with.

          It would be odd though if one is hiring for a C coder and they prefer Python. But I guess you could send a memo to HR and say you got this guy that’s shitty at C but amazing at Python and hopefully a Python project is ongoing that might benefit from such a person.

          Now if the job allows some leeway in what language a project is coded. (heck it might be using dll’s (Window) or so (Linux) in which case C and other languages can be intermixed with no issues (with some care).

          1. Ingvar M says:

            I’ve written C++, Go, Python and bash for work (and some JavaScript) and all of it has been peer-reviewed before being checked in. I think I mostly wrote ksh and C during my interview process, but it’s been a while.

            We typically take the approach that with a few weeks, style guides and extensive peer reviewing, the syntax, semantics and idiosyncrasies of a language can be rapidly acquired.

            1. silver Harloe says:

              Yes, having a mentor with a ton of experience can speed up the acquisition process, but I still maintain that learning a new language, and learning it WELL are different matters and the latter takes a lot more time. Even with mentoring, it’s possible to get into traps of “good knowledge acquired badly” – where you know A is preferable to B, but can’t tell anyone why.

              If you just tell your shop, “and today we’re using Java,” they will be greatly slowed down and write terrible code – maybe if you hire an expert, provided that expert has the right personality to get along with your team dynamics, you can reduce the time and make better code…

              Overall, my point is that the sentiment that “any good programmer can write in any language” has a lot of caveats of the kind management doesn’t usually take into account.

              My other point would be that experience matters. Young me might reply “you just want to feel like the time investment was worthwhile,” but older me knows young me was a fool. Experience makes a lot of difference. Even in the mentoring example, it works because the mentors have experience.

              1. Ingvar M says:

                Yep, mentoring and guidance are the key points here.

                Normally, we tend towards being generous with “this works, but Y would be more readable/efficient/idiomatic” and as long as someone can motivate why what they wrote is better than anything else, I’m happy to let it pass (last was “this is a new file, while all functionality is trivial, I’d like to see either ‘unit tests’ or ‘a short essay on why this will never need unit tests'”, and I would genuinely had been happy with either).

                Because once you have another file, it WILL acquire more functionality, building on what’s already there, so you prob