That’s such a way to dismiss the theory and academia
history | grep -E '(sed|grep|awk|perl)' | wc -l107Dang. That’s out of 1000. I need to up my game. Also three of those
seds are part of something with a-basedirand don’t count.So yeah, about 10% of my commands are iterating shell pipe things for poops and giggles, I guess.
… and this got me going down the rabbit hole of writing a filter for my history to pull out the first command on the line. This is non-trivial because of potential preceding variable assignments. Most used commands are currently
aptandmanandls. I thinkaptis a Spiders Georg situation because the system is fairly fresh and I keep finding things that I haven’t installed yet. Also I went through a patch of trying to parse its output.… oh, er… unga bunga.
$ history | grep -E '(sed|grep|awk|perl)' | wc -l 50 $ history | wc -l 500Checks out perfectly.
Oh, I guess I’m a stoneager then.
Though I will admit OOP is valid for involved data modelling, everything else should be functional though.
I’ve also trained myself out of most short variable names for maintainability reasons
Yeah, it’s wild people “don’t like OOP” 100%, it’s like most good things, don’t put it where it shouldn’t be.
If you’re really going down that route, you need to also remember that even the C programmed Linux Kernel is highly OOP
Outside of the for loop counters i and j, short variable names are awful. Coming back to old code written with abr var nams is like talking to someone in the military who just constantly throws out jargon and acronyms that they know you don’t know.
But so are Java style ObserverFactoryManagerTemplateMachinist Templater.
There’s a sweet middle ground of short, but actually descriptive name. Sometimes it’s not possible but that’s usually a code organization / language / framework smell.
The length of variable and function names should be proportional to the size of the code that can potentially call them. And preferably segmented in namespaces, explicit modules, or something like that.
Outside of the for loop counters i and j, short variable names are awful.
I’ve started to prefer writing it out as ”index” or ”iteration” even in for loop counters. It’s easier to read, and not much harder to type.
I think even idx is better than just i. I feel like just i can visually get lost
Keeping things that can be on one line to one line is a good reason to use short variable names where it won’t be confusing. Writing “iteration” sounds absolutely perverse!
The thing is, everyone understands i and j. The reason calling variables hcv or iid is dumb is because noone knows what that means - quite a different situation.
Writing “iteration” sounds absolutely perverse!
I like it to make it clear when the for loop is about iterating lists and when it’s not. For example, the iterations in Monte Carlo algorithms doesn’t correspond to items in a list.
idxis the ideal name for an index, change my mindYh, y cn sv a lt f spc wtht ths unncssr vwls
I is a vowel too but you sure can!
I had to leave most of first letters, and sometimes if all vowels are removed there’s nothing left
But yeah, we need a committee and come up with a standard for that
t’s prbbl t kp wrds rcgnzbl. Hw ls wld knw wht h s sppsd t b?
I typically do too, or
userIndexor something for nested loops, but I will accept i and j for the first two levels of nesting when reviewing a PR because they’re such a convention. I wouldn’t accept variable names like that anywhere else though and try and avoid them myself.
“Writes code on paper to avoid side effects” - ROFL
Programming would be great, if it wasn’t for computers (and users, too, but those would stay away without the damn computers).
(Don’t get me wrong, I love computers, they’re great, as long as they stay turned off.)
The OOP boilerplater is the only one with a job.
Imperative stonager works there too. You’ve just never seen him because he hasen’t accepted a meeting invite is 14 years.
You’ve just never seen him because he hasen’t accepted a meeting invite is 14 years.
And counting!
I think I’m a little bit of everyone except him. I work as a web dev, love functional programming and/with TypeScript. 😅
I like the functional parts of C♯, though.
This. I’ve been writing some game mods in it recently and LINQ is… pretty nice.
switchexpressions, too.This is coming from a dude formerly from the “OOP Boilerplater” camp, though, so maybe I just have low standards.
LINQ is… pretty nice.
Seriously. Want monads? LINQ is monads!
“Wanna see me turn a dozen lines of imperative code into a single expression?”
“Wanna see me do it again?”
Love that you put a real musical sharp and not that ugly #
What‽ It was not C-hash?
I was triggered at every panel, it’s unacceptable!
I hope no one got left unoffended
Yeah, that Mac offended me.
My imperative programming journey was a few months on a handed down P2 followed by 3 years of pen and paper.The imperative stoneager feels like the most favored one, there are no real negatives listed there. All that’s listed are things they usually pride themselves on.
I feel like the author is a MacBook user.
Imperative stoneagers getting an old MacBook from somewhere and going “huh, I guess its UNIX” is probably true though
Hear me out:
Mixing OOP and functional code to abstract the shit out of everything making 5k loc in around 500 loc in java. You can do magic using this trick.
I’m gonna wait for backup on this one.
Functional programming in Java is kind of an afterthought and it shows. That’s one of the reasons why Scala was created!
Yeah, Scala is the GOAT, but while I can’t use, why not final everything, use 300 streams and pass Suppliers around?
(I’m building a lot of libraries at work)
Do people still use vavr? When I wasn’t allowed to use scala that made up for a fair few shortcomings but it’s probably less relevant than it used to be
I didn’t know about vavr, I think a lot of things from it were added since Java 17, but this Try<T> seems cool.
Edit: Either would be nice too. I’m going to test some of those things, thanks for the recommendation!
Very pleased to have been of help! I love scala but Java really isn’t too bad (streams API is fine except that you need to explicitly move in and out, rather than getting to do the cool scala thing of just using methods in the phenomenal collections library) and I don’t like dunking on it, but it really does need a few helper libs. Tuples, either and try I think vavr has. Java seems to have covered most other stuff now. But been a half decade since I’ve written more than 10 lines at a time so hasn’t come up for a while. Sorry. Reminiscing. Sunday night blues.
The FP in Java is still leagues better than whatever the C++ committee cooked up.
Just let C++ die already, and stop pretending it’s a reasonable thing to compare other languages with.
If you can’t do it in C, you are better in Java, Python, Haskell, whatever.
I mean Yeah it is an afterthought in the Sense of that Java was Originally an oop Language but fp in Java was added on very sensibly imo. I use functional Programming in Java a Lot and try to make Everything immutable where I can and honestly coding like that feels clean and very practical.
Yes, you can make money and electricity magically disappear !
Proud imperative stoneager here 🦍
Cavepeople together strong!
Watches Computerphile, thinks it’s actual programming
What is this even supposed to imply
Personally, I love that series. I guess whoever made this meme thinks people who watch the show are trying to implement their code examples in production.
Yeah, I’m kinda confused by that one too—Computerphile is CS theory, not software engineering.
I think, the point is Haskell is more CS theoretical than practical language and anyone who uses it (or any other FP) has never written a single line of production code (the last statement is even in the meme)
book bad
I don’t belong to any of the above. Am I even a programmer at this point?
I belong to all of them. Same question.
You’ve transcended programming
More like mix and match your path lmao.
I’ve been shifting around, but never to the OOP boilerplater. I despise Java.
Vim is life. And use good variable names.










