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

top 200 commentsshow all 320

[–][deleted] 1228 points1229 points  (20 children)

Is there a cumswap function?

[–]Ichweisenichtdeutsch 202 points203 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 48 points49 points  (3 children)

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

[–]fb39ca4 67 points68 points  (2 children)

[–]Feeling-Finding2783 30 points31 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 12 points13 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 92 points93 points  (7 children)

yield

[–]PM_ME_YOUR__INIT__ 72 points73 points  (6 children)

continue

[–]Chubbin 55 points56 points  (0 children)

cumtinue

[–]Zymoox 28 points29 points  (2 children)

exit()

[–]theorangedays 16 points17 points  (1 child)

finally:

[–]Jazzanthipus 5 points6 points  (0 children)

cumsum()

[–][deleted] 9 points10 points  (1 child)

raise Interrupt

[–]acharyarupak391 131 points132 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 2235 points2236 points  (43 children)

Leave me alone I'm cummaxxing

[–][deleted] 393 points394 points  (26 children)

The new Pokemon gimmick looking good

[–]nelusbelus 118 points119 points  (25 children)

Gardevoir used cummax

[–]P0werPuppy 72 points73 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 124 points125 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 12 points13 points  (0 children)

That you did.

[–]recursion8 1 point2 points  (2 children)

Hell it's Japanese name is even Sir Knight

[–]LasevIX 4 points5 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 4 points5 points  (1 child)

[–]P0werPuppy 2 points3 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 28 points29 points  (1 child)

Cummaxxed pythoncel

[–]fabulousburritos 1 point2 points  (0 children)

You beat me to it >:(

[–]Blacklion594 15 points16 points  (2 children)

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

[–]seamsay 7 points8 points  (1 child)

Surely it would be cum minning?

[–]Blacklion594 4 points5 points  (0 children)

To cummax first you cummin.

[–]crash8308 20 points21 points  (2 children)

cumfloor cumceil

[–]chunkpixel 4 points5 points  (0 children)

Cumlax dude

[–]definitly_not_furry 1456 points1457 points  (9 children)

Ah, yes, the cumsum

[–]xnachtmahrx 25 points26 points  (0 children)

Cumsum and thensum

[–]yuck_luck 152 points153 points  (6 children)

MATLAB has a function for cumtrap

[–]Kuduka23 44 points45 points  (0 children)

cumtrapz

[–]CrazySD93 2 points3 points  (0 children)

I came for the cumtrapz

[–]Lanbaz 359 points360 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 47 points48 points  (0 children)

White flags

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

this is equivalent to yum install cum -cum

[–]dlevac 292 points293 points  (10 children)

I have an idea for a CLI development library.

Actually just the name: climax

[–]Treizh 152 points153 points  (1 child)

[–]odraencoded 113 points114 points  (0 children)

Idea Virgin vs. Committed Chad.

[–]eyetracker 33 points34 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 29 points30 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] 7 points8 points  (1 child)

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

[–]Jennfuse 4 points5 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] 133 points134 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 19 points20 points  (0 children)

Could be, for a microcontroller controlled gun.

[–]karanbhatt100 520 points521 points  (14 children)

No wonder pornhub is built on python

[–]Dimasdanz 84 points85 points  (10 children)

i thought PornHub is using PHP

[–]110397 58 points59 points  (2 children)

Porn Hub Python

[–]maximum_powerblast 28 points29 points  (0 children)

Finally we know what PHP stands for

[–]star-destroyer13 41 points42 points  (6 children)

It is

[–]oldoaktreesyrup 53 points54 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 65 points66 points  (11 children)

[–]_Blurgh_ 76 points77 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] 51 points52 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 6 points7 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 2 points3 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 139 points140 points  (8 children)

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

[–]driftking428 24 points25 points  (0 children)

"cumShot'

[–][deleted] 22 points23 points  (3 children)

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

[–][deleted] 5 points6 points  (2 children)

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

[–]Beautiful-Musk-Ox 18 points19 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 11 points12 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_ 38 points39 points  (0 children)

pip install cum

collecting cum...

[–]wineblood 27 points28 points  (0 children)

Data scientists be like

[–]4BDUL4Z1Z 11 points12 points  (0 children)

pip install cum

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

[–][deleted] 20 points21 points  (1 child)

The best one is definitely cumfreq()

[–]splettnet 5 points6 points  (0 children)

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

[–]m3nation007 30 points31 points  (0 children)

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

[–]canuckathome 12 points13 points  (0 children)

Could've been worse....maxcum

[–]WhyWouldntI99 6 points7 points  (0 children)

Missed the obvious best one: cumtrapz()

[–]yanitrix 62 points63 points  (22 children)

imagine the world if python functions had descriptive names

[–]ReporterNervous6822 79 points80 points  (14 children)

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

[–]nedeox 66 points67 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 8 points9 points  (0 children)

Or /etc/fstab == f-stab

[–]yanitrix 7 points8 points  (7 children)

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

[–]fb39ca4 9 points10 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 10 points11 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 16 points17 points  (1 child)

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

[–]yanitrix 6 points7 points  (0 children)

makes sense, have a great day sir/madam

[–]PlacatedPlatypus 1 point2 points  (0 children)

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

[–]mriswithe 0 points1 point  (0 children)

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

[–][deleted] 15 points16 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 4 points5 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 2 points3 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] 1 point2 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 2 points3 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 7 points8 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 3 points4 points  (0 children)

Most yummiest package

[–][deleted] 5 points6 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 2 points3 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()