this post was submitted on 30 Apr 2024
608 points (97.9% liked)

Science Memes

15972 readers
1475 users here now

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Rules

  1. Don't throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.

This is a science community. We use the Dawkins definition of meme.



Research Committee

Other Mander Communities

Science and Research

Biology and Life Sciences

Physical Sciences

Humanities and Social Sciences

Practical and Applied Sciences

Memes

Miscellaneous

founded 2 years ago
MODERATORS
 

"All the little bits"

you are viewing a single comment's thread
view the rest of the comments
[–] Diplomjodler3@lemmy.world 36 points 1 year ago (13 children)

I often find that I find mathematical concepts much easier to understand if they're presented as Python code rather than math notation. Someone should write a book like that.

[–] kshade@lemmy.world 25 points 1 year ago* (last edited 1 year ago) (6 children)

Algebraic notation breaks just about every rule programmers are taught about keeping their code human readable. For example:

  • Variable and function names should be descriptive
  • Don't cram everything into one line
  • Break up large statements
  • Consistency is key
  • Don't be fancy for fancy's sake, don't over-optimize (this is for learning, remember?)
  • Add in-line comments for lines that aren't easily grasped
  • Be explicit where possible (it's a convention to omit the multiplication operator when multiplying variables because variables are only one letter anyway...)

And then we force kids to cram the whole stdlib (or rather its local bastardization) into their heads or at best give them intentionally bad (uncommented) documentation during exams while wondering why so many just don't seem to get it, even resent it.

[–] PixelProf@lemmy.ca 3 points 1 year ago

Functional programming is much more math oriented and I think works well here, as it likes to violate a lot of these rules as a rule. I think it's what makes it so challenging and so obvious for different folks.

load more comments (5 replies)
load more comments (11 replies)