Programming tip: You can just fill an entire page with global variables. Nobody can stop you from just filling an entire page with global variables.

@wallhackio Also, you're a C++ programmer, so what is your objection to this?

@vaporeon_ we software egineers are taught to avoid global variables at all costs

@wallhackio What else are you taught?

Asking so that I can annoy software eggineers even more...

Follow

@vaporeon_

  • object-oriented programming is the best solution for managing state in a complex application (admittedly a multi-paradigm approach has been gaining acceptance in the past decade due to the functional programming trends)
    • variable names should be descriptive/use plain English whenever possible
    • all functions/methods/objects should have associated comments describing their intent
    • GOTO considered harmful
    • if it is difficult to write a unit test for your function this often indicates a design flaw
    • optimization code for performance before benchmarking is usually a poor use of time

@wallhackio I actually agree with that last point

If you just optimize it without actually measuring, you risk just making it worse, because processor internals are very complicated

You will not take away my GOTOs, though :blobcatknife:

@vaporeon_ I trust the wet blue rat to use GOTO responsibly

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.