Kache

joined 2 years ago
[–] Kache@lemm.ee 3 points 3 months ago* (last edited 3 months ago) (1 children)

inheritance to avoid code duplication

What no, inheritance is not for code sharing

Sound bite aside, inheritance is a higher level concept. That it "shares code" is one of several effects.

The simple, plain, decoupled way to share code is the humble function call, i.e. static method in certain langs.

[–] Kache@lemm.ee 23 points 3 months ago (3 children)

If you used good objects, you'll only have to make the change in one place

IMO that's generally a retroactive statement because in practice have to be lucky for that to be true. An abstraction along one dimension -- even a good one, will limit flexibility in some other dimension.

Occasionally, everything comes into alignment and an opportunity appears to reliably-ish predict the correct abstraction the future will need.

Most every other time, you're better off avoiding the possibility of the really costly bad abstraction by resisting the urge to abstract preemptively.

[–] Kache@lemm.ee 3 points 3 months ago* (last edited 3 months ago)

I've never seen these "express code/tests in natural language" ever work well. Your non-coders need lawyer-like skills to wield English very precisely, or it falls to coders that would be better off using code directly.

[–] Kache@lemm.ee 8 points 3 months ago* (last edited 3 months ago) (1 children)

problems only have one answer and often one strategy to get to the answer

Totally disagree

You're thinking of equations, which only have one answer. There are often many possible ways to solve and tackle problems.

If you'll permit an analogy, even though there's "only one way" to use a hammer and nail, the overall problem of joining wood can be solved in a variety of ways.

[–] Kache@lemm.ee 4 points 3 months ago* (last edited 3 months ago)

I think this is common in scientists and researchers. They operate at the edge of knowledge with one foot in the unverifiable and their eyes peering further still into the murky unknown. There is no map nor direction where they're going, and that extension out into the darkness is often much like superstitious belief.

What makes them different from followers of the occult that remain lost in the fog is that science returns from explorations with verifiable proof. Research extends it's own foundations with new findings in order to venture yet another step further outwards.

[–] Kache@lemm.ee 7 points 3 months ago* (last edited 3 months ago)

IMO mathematical/logical/abstract thinking is critical for programming well, but IMO that's different from "math degree" math.

Software as a means to an end can be used in almost every domain, so proficiency within that applicable domain is often either useful or necessary. That is to say, "math degree" math is likely needed for 3d rendering (certain games), scientific computation (incl machine learning), etc, but maybe not, otherwise. It depends on what software you're trying to build.

To be more specific, general programming is definitely and specifically different from trig and calc. However, because math is also broad, "mathy" concepts like type theory, relational algebra, set theory are considered important for programming, even if only informally or indirectly so.

[–] Kache@lemm.ee 2 points 3 months ago* (last edited 3 months ago) (1 children)

How does playing the game bring revenue? Ads?

Also, I would think that the business would be in a tougher situation if game popularity increased while tech workers weren't around to maintain it

[–] Kache@lemm.ee 3 points 3 months ago* (last edited 3 months ago)

It's the difference between knowing you'll grow and graduate together with your classmates vs knowing you're only going to see them for that one month before you move away.

[–] Kache@lemm.ee 9 points 3 months ago* (last edited 3 months ago) (7 children)

I don't understand, if you've got easy to delete copy-pasted code, then delete it. It'll be a nice and cathartic exercise.

But sounds like what you're really talking about is code that isn't easy to delete.

[–] Kache@lemm.ee 1 points 3 months ago

Distributing power across a group of communities over the same topic (e.g. like seats in a congress/parliament) is a nice thought.

However, my second thought was how vulnerable that is in a fediverse. To continue the analogy, an adversary could create new states (server/communities) of arbitrary population (accounts) at will.

[–] Kache@lemm.ee 63 points 3 months ago (1 children)
[–] Kache@lemm.ee 3 points 4 months ago* (last edited 4 months ago)

IMO folding to hide is about equivalent to moving all contents to another file/private function:

def bad_function(args):
    return _hide_elsewhere(args)

i.e. does nothing. Real solution to pyramids of doom is to fix the code.

view more: ‹ prev next ›