Andrey (azangru) wrote,
Andrey
azangru

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.
Subscribe

  • (no subject)

    (retweeted by a developer) How does she interpret what she has highlighted — "unlawful blocking of a public street" — as "pedestrians whose…

  • (no subject)

    Google has finally become ready to promote its Lit ecosystem properly. I thought they were going make their announcements at the coming Google IO;…

  • (no subject)

    Is it ... Bill Maher? Is he, in the penetrating eyes of this insightful lady, the emblem of white supremacy now? The comments to the tweet say it…

  • Post a new comment

    Error

    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.
  • 2 comments