this post was submitted on 14 Apr 2024
328 points (94.1% liked)

linuxmemes

19747 readers
1896 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] sntx@lemm.ee 7 points 2 months ago (4 children)

I mean, it's a hard problem to solve if you never worked with moduli before.

[–] themusicman@lemmy.world 24 points 2 months ago (1 children)

Sure, programming is hard if you've never worked with programming language features before... Modulus isn't some obscure esoteric operator, it's literally CS 101

[–] drphungky@lemmy.world 4 points 2 months ago* (last edited 2 months ago)

I fell backwards into programming and did it for years before ever needing or encountering a mod operator. It never really came up in statistical programming (SAS) and since I wasn't a CS major I don't think I even learned about it until taking online programming classes for fun. But I know I was a pretty damn good SAS programmer. I never had any issues solving any problems in my field programmatically, but I took a few leet code tests and was completely puzzled before taking said CS classes. The algorithms and common problems just never remotely came up. I never found fizzbuzz particularly relevant in statistics and data CRUD.

Now maybe since SAS is procedural and not OO you'd say it doesn't have typical "programming language features", but I could easily see that experience being common in all kinda of business side programming like R, VBA, maybe JavaScript or Python, etc.

...but anyway obviously I'm not saying its not a good thing for a dev shop to interview on, and if they want someone classically trained then it's probably a perfect question. My quibble is just that you might need to widen your definition of who programs.

[–] Hope@lemmy.world 9 points 2 months ago (1 children)

Is it? I would expect someone to come up with either toggling a variable back and forth for even/odd, or counting by 2s, heck, treat it as a floating point, divide by two, and search the string representation for a period or something!

[–] sntx@lemm.ee 1 points 2 months ago

I feel like the floating point suggestion would backfire quickly due to imprecisions.

[–] jkrtn@lemmy.ml 8 points 2 months ago (1 children)

Shouldn't people familiar with integer arithmetic should be able to struggle to something like x == 2 * (x/2) to test if it is odd or even? Or just bitwise x & 1?

[–] Hagdos@lemmy.world 1 points 2 months ago

If round(x/2) != x/2

[–] uis@lemm.ee 3 points 2 months ago

Meanwhile I in school practiced Diffie-Hellman on paper with classmates