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)

    This was a good talk. Interesting to see that SvelteKit is taking the same direction as, by using html forms to submit data without the…

  • (no subject)

    A talk about building large-scale (React) apps. These days, the questions that concern me are: - how can a project be scaled up without…

  • (no subject)

    Watched the second episode of The Problem with Jon Stewart. I thought of Jon as an intellectual comedian. Someone who transcends the limitations of…

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