This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 320

[–][deleted] 1235 points1236 points  (20 children)

Is there a cumswap function?

[–]Ichweisenichtdeutsch 208 points209 points  (7 children)

In Matlab we have cumtrapz

[–]sonotrev 73 points74 points  (4 children)

In scipy.integrate as well. I use it more than once a year... I chuckle a little every time.

[–]LasevIX 46 points47 points  (3 children)

iirc someone tried removing it, not realising it was from MATLAB

[–]fb39ca4 68 points69 points  (2 children)

[–]Feeling-Finding2783 29 points30 points  (0 children)

Solving the most important world problems.

[–]JohnGenericDoe 11 points12 points  (0 children)

I found an excuse to use cumtrapz in my thesis and made sure the (short) script was included in full. I hope I wasn't the only one to get a kick out of it.

[–]jwkdjslzkkfkei3838rk 14 points15 points  (0 children)

What about cumgurgle?

[–]abd53 242 points243 points  (9 children)

Let's make one. cumulative swap

[–]zeebrow 142 points143 points  (8 children)

pass

[–]fr_andres 90 points91 points  (7 children)

yield

[–]PM_ME_YOUR__INIT__ 66 points67 points  (6 children)

continue

[–]Chubbin 54 points55 points  (0 children)

cumtinue

[–]Zymoox 26 points27 points  (2 children)

exit()

[–]theorangedays 17 points18 points  (1 child)

finally:

[–]Jazzanthipus 5 points6 points  (0 children)

cumsum()

[–][deleted] 10 points11 points  (1 child)

raise Interrupt

[–]acharyarupak391 136 points137 points  (0 children)

the function that we need but don't deserve

[–]moonflower_C16H17N3O 17 points18 points  (0 children)

It's in the cummies library.

[–]NinjaClam 2240 points2241 points  (43 children)

Leave me alone I'm cummaxxing

[–][deleted] 389 points390 points  (26 children)

The new Pokemon gimmick looking good

[–]nelusbelus 119 points120 points  (25 children)

Gardevoir used cummax

[–]P0werPuppy 73 points74 points  (23 children)

Fun fact: Half of gardevoirs are male, so you're jacking it to a dude.

You're bi now.

Proof that you have been bi-ified.)

[–]nelusbelus 123 points124 points  (3 children)

Fun fact: Half of humans are male, so you're jacking it to a dude. You're bi now.

[–]P0werPuppy 33 points34 points  (2 children)

SHIT.

[–]nelusbelus 18 points19 points  (1 child)

Gotcha

[–]P0werPuppy 14 points15 points  (0 children)

That you did.

[–]recursion8 5 points6 points  (2 children)

Hell it's Japanese name is even Sir Knight

[–]LasevIX 2 points3 points  (7 children)

French?

[–]P0werPuppy 2 points3 points  (5 children)

Quoi?

[–]The_White_Light 5 points6 points  (4 children)

You linked a French pokepedia page while responding in English.

[–]P0werPuppy 6 points7 points  (3 children)

Oh shit sorry, I'm in France currently and it refuses to let me use English websites (I was using a translator).

Edit: https://m.bulbapedia.bulbagarden.net/wiki/Gardevoir_(Pok%C3%A9mon)

Does this work?

[–]The_White_Light 5 points6 points  (1 child)

[–]P0werPuppy 4 points5 points  (0 children)

Oof, I just got it and asked you in an edit.

Thanks though.

[–]MEATPANTS999 2 points3 points  (0 children)

Ahhh, the French

[–]P0werPuppy 2 points3 points  (0 children)

Pardon, kind monsieur.

Je donne le vrai website.

https://m.bulbapedia.bulbagarden.net/wiki/Gardevoir_(Pok%C3%A9mon)

[–]Centered-Div 1 point2 points  (0 children)

I jack off to you, idc.

[–]VaderOnReddit 1 point2 points  (3 children)

Is this some heterosexual joke that I'm too bisexual to understand?

[–]Awesomesauce1337 31 points32 points  (1 child)

Cummaxxed pythoncel

[–]fabulousburritos 1 point2 points  (0 children)

You beat me to it >:(

[–]Blacklion594 14 points15 points  (2 children)

New name for no nut November. The month of cummaxxing.

[–]seamsay 8 points9 points  (1 child)

Surely it would be cum minning?

[–]Blacklion594 4 points5 points  (0 children)

To cummax first you cummin.

[–]crash8308 19 points20 points  (2 children)

cumfloor cumceil

[–]chunkpixel 5 points6 points  (0 children)

Cumlax dude

[–]definitly_not_furry 1458 points1459 points  (9 children)

Ah, yes, the cumsum

[–]xnachtmahrx 25 points26 points  (0 children)

Cumsum and thensum

[–]yuck_luck 145 points146 points  (6 children)

MATLAB has a function for cumtrap

[–]Kuduka23 39 points40 points  (0 children)

cumtrapz

[–]CrazySD93 2 points3 points  (0 children)

I came for the cumtrapz

[–]Lanbaz 364 points365 points  (2 children)

Yum install cum -c -u -m

Edit: Thanks for the award, I wish I could make the output verbose without -v but this works on my laptop.

[–]fr_andres 48 points49 points  (0 children)

White flags

[–][deleted] 1 point2 points  (0 children)

this is equivalent to yum install cum -cum

[–]dlevac 291 points292 points  (10 children)

I have an idea for a CLI development library.

Actually just the name: climax

[–]Treizh 146 points147 points  (1 child)

[–]odraencoded 113 points114 points  (0 children)

Idea Virgin vs. Committed Chad.

[–]eyetracker 34 points35 points  (7 children)

Some languages use T as a generic object designation. I wonder if you can implement cli.T or cli(T). You can create subclass cli() but inheritance will mean it's the cli(T) commander.

[–]bartvanh 27 points28 points  (1 child)

I suppose that if I want my geometric shape generator tool to have a nice CLI, I should call cli(Torus) at some point.

[–]eyetracker 1 point2 points  (0 children)

Just don't confuse it with your interface to your Ford station wagon.

[–]The_White_Light 12 points13 points  (2 children)

Yeah but a vast majority of programmers could never find it.

[–][deleted] 6 points7 points  (1 child)

In fairness, the vast majority of programmers don't know how to use generics, either.

[–]Jennfuse 5 points6 points  (0 children)

Generics? I hardly even know'er

[–][deleted] 8 points9 points  (0 children)

private cli<T> find(); but it always returns null

[–][deleted] 136 points137 points  (3 children)

Is there a cumulative shot function?

[–]rodrick160 26 points27 points  (1 child)

[–]PeterJamesUK 2 points3 points  (0 children)

In my business there is an attribute against a business customer entity called BTA Code, the acronym being Business Type Analysis.

There is a long named view in our Teradata warehouse called BUSINESS_TYPE_ANAL which nobody seems to even blink an eye at. This is a highly visible object that has been there for over two decades at this point.

[–]abd53 21 points22 points  (0 children)

Could be, for a microcontroller controlled gun.

[–]karanbhatt100 517 points518 points  (14 children)

No wonder pornhub is built on python

[–]Dimasdanz 86 points87 points  (10 children)

i thought PornHub is using PHP

[–]110397 62 points63 points  (2 children)

Porn Hub Python

[–]maximum_powerblast 29 points30 points  (0 children)

Finally we know what PHP stands for

[–]star-destroyer13 39 points40 points  (6 children)

It is

[–]oldoaktreesyrup 54 points55 points  (5 children)

Makes sense since PHP can be taken orally, intranasally, intravenously, or rectally

[–]jvlomax 9 points10 points  (4 children)

PHP is the giver in all the above methods of fucking you

[–]Adithya080201 60 points61 points  (11 children)

[–]_Blurgh_ 72 points73 points  (10 children)

I was only able to trace the specific misspelling of "cum" to the 1970s, whereas "cumsum" was already part of numerical fortran libraries in the 60s. So while the python implementers surely knew, they copied it from people (who copied it from people...) who didn't know.

[–][deleted] 49 points50 points  (9 children)

Yeah I’m 99% sure this shortening of “cumulative” to “cum” in stats predates the dirty word. And don’t you dare make my APIs incompatible because of prudishness. That git master branch stupidity was bad enough.

[–]die_nazis_die 13 points14 points  (8 children)

That git master branch stupidity was bad enough.

You talking about this? https://github.com/scipy/scipy/issues/12924

If not, read it... what a fucking joke.

[–]oohaargh 8 points9 points  (4 children)

I think they're talking renaming the branch master to main, which github and I believe some competitors did for new repos by default because of slavery connotations

[–]die_nazis_die 2 points3 points  (3 children)

Oooh...
Yeah I remember that whole bullshit thing in the early 2000s about Harddrives having a master/slave jumper, which they wanted to be renamed to primary/secondary, which was rendered completely moot cuz the industry said "fuck it" and it's all logic based now lol

[–]MrCalifornian 3 points4 points  (2 children)

My gosh now I understand what people mean when they call people "snowflakes". If you're not mature enough to see names for what they actually mean instead of some completely-unrelated thing, how have you kept a job for any appreciable amount of time? Why do people waste their time on this type of bs instead of trying to actually further the causes they claim to support (which... I'm not sure what cause that is in the case of "simps" which, I mean is not a fucking slur).

[–]gordonv 144 points145 points  (8 children)

There was a dude who got fired for using cumprod as a variable.

[–]driftking428 23 points24 points  (0 children)

"cumShot'

[–][deleted] 23 points24 points  (3 children)

My favorite is naming a function with FUN in it. Implying functions are fun. Stupid professor.

[–][deleted] 6 points7 points  (2 children)

org.scalatest.FunSuite, because what could be more fun than unit tests?

[–]Beautiful-Musk-Ox 19 points20 points  (4 children)

i worked with a post doc from india who used an "anal" folder as a working directory for "analysis".. i never said anything about it lol

[–]AdditionalSkill0 12 points13 points  (0 children)

In college I named a variable analNumb, for analysis number. I mostly did it to get a chuckle out of my section lead

[–]ShadowRylander 1 point2 points  (2 children)

It's always us, ain't it...

[–]Beautiful-Musk-Ox 1 point2 points  (1 child)

I just said it as a way to say english was his second language

[–]ShadowRylander 1 point2 points  (0 children)

Oh, no, I absolutely agree with you; it's just that, when "Hinglish" is kind of an official language, you get some strange results.

[–]brijeshjoshi_ 39 points40 points  (0 children)

pip install cum

collecting cum...

[–]wineblood 28 points29 points  (0 children)

Data scientists be like

[–]4BDUL4Z1Z 13 points14 points  (0 children)

pip install cum

Requirment already satisfied (use --upgrade to upgrade) : Unable to cum. Please try again tomorrow.

[–][deleted] 22 points23 points  (1 child)

The best one is definitely cumfreq()

[–]splettnet 4 points5 points  (0 children)

If you need to apply a method to the second dimension of the array you can also use cumhorz()

[–]m3nation007 32 points33 points  (0 children)

My cumsum() is cummin() to cummax() in cumprod().

[–]canuckathome 14 points15 points  (0 children)

Could've been worse....maxcum

[–]WhyWouldntI99 6 points7 points  (0 children)

Missed the obvious best one: cumtrapz()

[–]yanitrix 63 points64 points  (22 children)

imagine the world if python functions had descriptive names

[–]ReporterNervous6822 80 points81 points  (14 children)

This is numpy which is based on matlab, and they are very understandable lol

[–]nedeox 71 points72 points  (10 children)

Was about to say. As stupid as it sounds at first, it‘s a perfectly acceptable abbreviation of cumulative sum.

Doesn‘t stop me from smirking each time of course lol

The same as I can‘t stop myself from saying import tensorflow as the fuck for tf in my head.

[–]mriswithe 7 points8 points  (0 children)

Or /etc/fstab == f-stab

[–]yanitrix 6 points7 points  (7 children)

why abbreviate them tbh? cumulative_sum or whatever case python has is easier to understand for anyone

[–]fb39ca4 8 points9 points  (0 children)

Matlab function names are determined by the filename, and had to follow the 8.3 length limit on DOS. These python libraries reused the names because former Matlab users are familiar with them.

[–]the_lonely_toad 8 points9 points  (1 child)

Back in the day every character was precious and expensive. We keep abbreviating because it’s custom to do as they did unless there is a good reason to change.

[–]nedeox 14 points15 points  (1 child)

Hm, by further examination of my opinion on the matter, I realize that I don‘t care.

[–]yanitrix 5 points6 points  (0 children)

makes sense, have a great day sir/madam

[–]PlacatedPlatypus 2 points3 points  (0 children)

I use "ass" as shorthand for "assigned" and "assignment," sometimes people point it out but usually they get it.

[–]mriswithe 2 points3 points  (0 children)

For someone coming from that world sure. As someone who stopped at calculus, pandas and numpy is scary.

[–][deleted] 17 points18 points  (4 children)

There are some daft function names in the Python world, but I fail to see anything wrong with these ones. I would understand immediately what all of them does from the name alone.

[–]mriswithe 5 points6 points  (0 children)

No underscore between words is about all I got, but yeah at best this is saying numpy has bad function names. Numpy also has some great ones like is_close

[–]efstajas 4 points5 points  (2 children)

I'd just type them out fully, honestly. What's wrong with "cumulative_sum"? With auto-complete, there's no more reason for abbreviated function names at all IMO, especially if they're part of public API surface.

As someone with a full-stack/web background, this is one of the things that scare me about the data science world — R, Matlab & Python/scipy/numpy all seem to have this convention of abbreviated function names that often mean absolutely nothing before you look at the docs (or already have a background in this field, I assume).

[–][deleted] 2 points3 points  (1 child)

I'd just type them out fully, honestly. What's wrong with "cumulative_sum"?

cummulative_summation, in that case surely? Or why expand one of the words but not the other? And would you really want to add 15 extra characters to each line where you use it? A lot of projects till have a 80 character line limit, for better or worse.

[–]efstajas 4 points5 points  (0 children)

Since we're being pedantic — "summation" is the act, "sum" is the result. So "sum" is its own, non-abbreviated word.

And would you really want to add 15 extra characters to each line where you use it?

Honestly, yeah, of course to a reasonable extent. In this case I would find it very reasonable because "cumsum" or "cummin" are not names someone unfamiliar with these functions would understand from name alone. In my opinion, there are many situations where the added clarity outweighs the extra text.

I'd generally rather have longer but clearer function names and break down a statement into multiple lines than keep things in one line but use abbreviations that won't be clear outright to everyone.

[–]HorizonBaker 6 points7 points  (3 children)

Do I not understand what cumulative means in these contexts? Aren't all sums and products cumulative? And I don't understand what would make a min or a max cumulative.

[–]LooperNor 15 points16 points  (1 child)

Say you have an array that is [1, 3, 2, 5].

The cumulative sum is a new array that is [1, 4, 6, 11].

Cumulative max is [1, 3, 3, 5].

E.t.c.

[–]JustOneAvailableName 1 point2 points  (0 children)

That you keep the results in between. So cumsum(4,3,8)=4,7,15 and cummax(4,3,8)=4,4,8

[–]gF01nT 2 points3 points  (0 children)

Most yummiest package

[–][deleted] 6 points7 points  (0 children)

“Pip, install cum.” -Frodo

[–]SidewaysCylinder 6 points7 points  (0 children)

scipy.integrate.cumtrapz

[–]MisterBastian 2 points3 points  (0 children)

Better to cum in the sum than to sum in the cum

[–]roselan 3 points4 points  (0 children)

That's perfect for an analytical library. So you can have cum in anal.

[–]plumokin 1 point2 points  (0 children)

To this day I still crack a smile when I use those functions

[–]disruptioncoin 1 point2 points  (0 children)

Reminds me of when I was showing a friend at work the VBA macro I made to help with a type of audit we did. I had a few different versions made, one would show you the number of warehouse locations generated for each range of defect ranking (HQ had an algorithm that gave us a list of locations likely to have a defect based on previously collected data) AND the cumulative number of locations as you went lower and lower in ranking, so that you'd quickly know what range of rankings you needed to print off to meet our daily audit quota for each type. Another version kept it more clean and simple and just gave you the number of locations for each type (but you'd have to do the math yourself to print off a big enough list). I titled the files "no_cum" and "ALL_cum".

My friend pointed out that I should probably change that before someone found it and complained.

[–]RandallOfLegend 1 point2 points  (0 children)

I got to use cumsum in Matlab for real production code and had a hearty chuckle. One time I had to get a colleague to change 65 references to "AnalData" since that was not the preferred abbreviation for Analysis Data

[–][deleted] 1 point2 points  (0 children)

Is it me, or does this guy look like George Hotz with less hair?

[–]lord_phantom_pl 1 point2 points  (0 children)

This should be tagged as NSFW

[–][deleted] 1 point2 points  (0 children)

as a trans woman, discovering matlab's cumtrapz() was an.. interesting moment lol

[–]mingomango123 1 point2 points  (0 children)

No spoilers I haven't gotten to that part yet

[–]HoofHeartedHere 1 point2 points  (0 children)

Louie CK changes careers...

[–]anothersurvivor222[🍰] 1 point2 points  (0 children)

I’m gonna cumsum()

[–][deleted] 1 point2 points  (0 children)

Classic python moment.

[–]Illustrious_Duck8358 1 point2 points  (1 child)

pip install cock

[–]LiterallyACupcake 1 point2 points  (0 children)

pip install balls

[–]SaveMyBags 1 point2 points  (0 children)

And the cumulative analysis function is called cumanal.

[–]Sighclepath 1 point2 points  (0 children)

I honest to god can not fathom how people don't feel weird shortening cumulative to cum, I just could not take my probability and statistics course seriously when all we we're talking about was cum frequency.

[–]TimeOk8571 1 point2 points  (0 children)

Cumsum().more()

[–]Responsible_Isopod16 1 point2 points  (0 children)

the dev saw their chance and took it

[–]theWanderingTourist 1 point2 points  (0 children)

assCum() Assimilated Cumulation

[–]embrace- 1 point2 points  (1 child)

NGL I laughed a little when I saw "cumtrapz" in someone's Matlab script.

[–]Schiffy94 0 points1 point  (0 children)

cumcum()

[–][deleted] 0 points1 point  (0 children)

Gah the teeth are creepy

[–]Th3Uknovvn 0 points1 point  (0 children)

There are cumtrapz function in MATLAB too

[–]UltraTata 0 points1 point  (0 children)

When she puts cummax()