Andrey (azangru) wrote,

An example of how old habits die hard.

Here's a screenshot from someone's tutorial, where he is copy-pasting a snippet of code for starting an Express server in Node. Note how he feels the obligation to create a class (why?), and how its method names are capitalized (oh god why?). This must be a C# developer carrying his mindset over to a Node project.

I've probably written here that I don't understand classes, at least not to the point they get used for everything in some languages or frameworks. I sort of understand that they can be handy for co-locating data with functions, and I sort of understand that they can be a convenient instrument for code reuse; but some languages or frameworks insist on them religiously, even in places where neither encapsulation nor code reuse via inheritance is taking place.

  • (no subject)

    Imagine buying a phone that snitches on you to the authorities if it spots something illegal:

  • (no subject)

    Someone's comment on Twitter reminded me how differently we interpret what we experience: My impression from that interview was that Yuri was…

  • (no subject)

    Via Twitter. From the book The Gray Lady Winked, photographed by Michael Shermer: Here's the tweet that the paragraph references (took a while…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.