ProgrammerHumor

thatsNotEvenAWord

thatsNotEvenAWord
https://i.redd.it/zkl8s42qovbf1.png
Reddit

Discussion

jzrobot

toPromise() ?

2 days ago
Informal_Branch1065

toShreds()?

2 days ago
sammy-taylor
:js::elixir-vertical_4::cp:

.toShredsYouSay()?

2 days ago
TeachEngineering

wife.holding_up()

2 days ago
ChrdeMcDnnis

false

2 days ago
OzorMox

for(int i = 0; i < 4; i++) {

print("tut")

}

2 days ago
MoveInteresting4334
:rust::j::ts::py::hsk:

four tuts? Damn.

2 days ago
rokinaxtreme
:gd::s::p::py::cp::js:

Forgot the space so it's just tuttuttuttut lol

wait no it's python

tut

tut

tut

tut

Wait it's not python

tuttuttuttut

1 day ago
keepinitcool

But true

2 days ago
Tyfyter2002
:cs::j::js:

state.toShreds

2 days ago
skuzylbutt

-> impl Shreddable

2 days ago
just_jedwards

.hardlyEvenKnowHer()

2 days ago
ComprehensiveWord201

2 days ago
otter5

Resolve(“I_Say”)

2 days ago
ConcernUseful2899

.shredify()

22 hours ago
ToastTemdex

That’s the correct answer.

2 days ago
iismitch55

If it is a static method that takes an input and returns a promise, then toPromise()

If it’s an instance method that takes no arguments and translates the object into a promise, then asPromise()

If it’s an instance method that takes no arguments and returns the value of a property, then getPromise()

If it’s an instance method that takes an object and sends a promise to that object, then promise()

If for some reason you’ve created a promise factory, then makePromise() or createPromise()

If for some reason you’ve created a promise builder, then buildPromise()

If you’re creating a utility method designed to handle a wide variety of input types and turn that input into a promise, then promisify()

If you’re a self documenting clean coder who posts this meme on Reddit, then convertToPromise()

2 days ago
Turbo_Megahertz

This guy promises.

2 days ago
iismitch55

Unfortunately I don’t always resolve them :/

1 day ago
postmaster-newman

This guy docs so good it’s on Reddit

2 days ago
AdorableRandomness

this guy OOPs so hard

1 day ago
mysiker

Will remember. I promise.

1 day ago
private_final_static

This

Also .promise()

Although .promisify() is the best of the three in the pic

2 days ago
FOSSandCakes
:rust::g:

Or intoPromise(), if the initial object is consumed as a result of the conversion.

2 days ago
darkfire0123
:asm::c::cp::rust::kt::ts:

Found the rust user

2 days ago
FOSSandCakes
:rust::g:

That's right! I am the rust user. And it takes one to know one, fellow rust guy.

2 days ago
keepinitcool

You do be looking abit rusty over there

2 days ago
Emergency_3808

Stringify, integerify, floatify, JSONify

2 days ago
Geoclasm

Hey! I came to say that!

... fuck, I forgot to await makeComment(); >:-(

2 days ago
Top-Permit6835

You need to await makeComment().toPromise();

2 days ago
Negitive545

100% this, I opened the comments to say this lol

2 days ago
AndrewGreenh

What you are missing is that promisify isn’t used to turn an object into a promise, but to turn a function using the callback style for async work into a function that returns a promise.

Callback style being: the last argument of the function is a callback called with two arguments, an error and the data.

So you’d do: const readFileAsync = promisify(fs.readFile)

2 days ago
captainMaluco

iPromise("trust me", "bro")

2 days ago
satansprinter

Just add a then method on it

2 days ago
hondacivic1996

.orNotToPromise()?

1 day ago
look
:rust::ts::c::asm::ru::py:

Hmm. How about .vow() to return a Promise? Or maybe .bloodOath() with stronger type constraints…

2 days ago
AppropriateStudio153

.byTheHonorOfHouseMogh() : KlingonPromise

2 days ago
hethcox

byTheHammerOfThor()

2 days ago
mentix02
:py::c:

.onTheRiverStyx()

1 day ago
jryser

.byGrabtharsHammer()

18 hours ago
King_Joffreys_Tits
:py:

.oathOfTheAncients()

Edit: for type specificity and scalability, this method is deprecated. Please use .oath(Paladin.OATHS.Ancients) as an example

2 days ago
AllTheSith

Help. There are vines all over my pc.

2 days ago
kvt-dev

Have you tried defoliating the hard drive?

1 day ago
Negitive545

I do really like .bloodOath() => Promise

2 days ago
torsten_dev
:rust::c::cp:

.solemnlySwear()

2 days ago
godonkeymeasures

There is no rejected thunk...instead...death() 😆

2 days ago
HSX610

.vow() returning a Promise is just chef's kiss.

Borrowing it, thanks!

1 day ago
lces91468

PromiseFactory.builder().strategy(PromiseStrtegyEnum.LET_U_DOWN).build().getPromise();

2 days ago
TheMaleGazer

Wrong. You used a concrete PromiseFactory when you should have passed the "PromiseFactory" key to an abstract factory builder.

Software engineering is not about writing code that does something useful. It's about writing code that describes what the act of programming would look like, broadly, if one were to consider doing it.

2 days ago
TheBB
:cp::c::py::ts:

Why does this sound like a Douglas Adams bit?

2 days ago
marquoth_

In the beginning programming was created. This has made a lot of people very angry and been widely regarded as a bad move.

2 days ago
YetiHafen
:j:

How much concrete does your concrete factory produce?

2 days ago
TheMaleGazer

Our cement is 100% abstract. It's on the customers to put in their own fine and coarse aggregates, water, binding, and admixtures. We just provide them the framework and interface.

2 days ago
rosuav

160/minute on two refineries, dedicated to the production of molded steel pipe. Yours?

2 days ago
TigreDeLosLlanos
:c: :p: :js: :hsk:

And why would anyone create an instance using new or a singleton instead of calling the DI container to get the correctly configured object?

Of course you can't get the container with a global function or static method, you should inject the container instance into the class you are using.

2 days ago
TheMaleGazer

Touching of the container is no longer allowed. Only constructor injection should be used, with no code ever having knowledge that there is a thing called a container. We'll need to provide the correct abstract factory builder by constructing a composite builder that follows the composite design pattern. We will then register this in our composition root, so that the correct abstract factory is injected into the right factory, which in turn injects the correct instance.

But we won't register it directly. We will hide it in middleware so that no engineer will ever know where the factory came from which produced any object they will ever work with. The greatest benefit of abstraction is not knowing what is going on.

2 days ago
Noch_ein_Kamel
:perl:

That's the point where you create a testing mock and use it in production code, right?

2 days ago
TheMaleGazer

No. Mocking of any kind is prohibited, now. Now you must write integration tests that start containers that contain a microcosm of your organization's infrastructure.

2 days ago
RichCorinthian

Sadly true. Why write a unit test when you can write an integration test that takes anywhere from 10 to 100 times longer?

One previous org, our test suite was 90 minutes running on a CI build, and that’s after I spent days tweaking maven and jenkins to get it down from 3+ hours. I tried to push for more unit tests, but it’s hard when your fellow devs are afraid of mocking. It really is a whole other code skill set, though.

2 days ago
TheMaleGazer

Sadly true.

Being sad is prohibited because it does not add shareholder value.

I tried to push for more unit tests, but it’s hard when your fellow devs are afraid of mocking. 

Martin Fowler said that we should not mock every dependency, which we all know is his way of saying that absolutely nothing should be mocked, ever.

2 days ago
psaux_grep

Didn’t we all get into programming to spend years of our lives trying to put the right syntax into xml files so our running code receives the right version?

2 days ago
Ok-Kaleidoscope5627

It's 2025. We've moved onto the next even higher level of abstraction. Now it's about the act of describing how we'd feel if we were to describe the act of describing the act of what programming would look like if someone else were to consider doing it for us. Factories no longer create objects they summon them. Dependency injection is more like divination. Testing our code is disrespecting the process. We need to trust the code instead and not worry whether it can invoke some service but whether or not it can invoke the right vibes.

2 days ago
hicklc01

getPromise<UP>();

2 days ago
willfulwizard

That method always throws a NotSupportedException. It will never give you Up.

2 days ago
ford1man

That promise better fail, as should .GIVE_U_UP, .RUN_AROUND, and .HURT_U.

2 days ago
RichCorinthian

Sadly, according to the spec, those situations never gonna happen, so the case statement falls through and you get a ThisShouldNeverHappenException.

2 days ago
Hubble-Doe

https://web.archive.org/web/20250107040940/https://factoryfactoryfactory.net/

2 days ago
LowB0b

we already have \@Async though

2 days ago
sebbdk

Skill issue, real programmers don't make any promises, that way it's not our fault when the project is 420% over the deadline.

2 days ago
CrossScarMC

The only time I use promises is when a framework won't let me use an async function so I just end up nesting like 10 .thens in a row.

2 days ago
CryptoTipToe71

.youPromise?👉🏻👈🏻🥺🫣()

2 days ago
Top_Refrigerator1656

you're hired

2 days ago
Mockington6

.promiseInator3000()

2 days ago
FerricDonkey

No, that's a noun. That can be the name of the class that has .promiseify though, which takes something out other and converts it to a promise.

2 days ago
Emergency_3808

Dr. Doofenshmirtz's source code aah

2 days ago
Eva-Rosalene
:ts::c::bash::powershell:

Well, promisify doesn't make any Promise objects by itself, it converts callback-style function into modern one that returns Promise. It's the least misleading option.

2 days ago
Bronzdragon
:rust:

If OP wanted a reasonable name in the vein that they provided, it'd be .convertReturnValueToPromise() and .makeReturnPromise(). Given those options, I think it's clear why they went with .promisify().

2 days ago
ford1man

Exactly. The node:util promisify function converts a function with a standard final callback argument to - not a promise - an async function, or promisor.

asPromisor(fn) or asAsync(fn) would've been a better name for it. But whatevs. Documentation exists to need read.

2 days ago
[deleted]

[deleted]

2 days ago
[deleted]

[deleted]

2 days ago
Eva-Rosalene
:ts::c::bash::powershell:

Ah okay. My comment is fully redundant then. Have a great day!

2 days ago
mot_hmry

.swear()

2 days ago
MasK_6EQUJ5

pinky.swear();

2 days ago
Noch_ein_Kamel
:perl:

Do you also get the curse words when the promise is rejected?

2 days ago
mot_hmry

There's a number of new methods for handling promises:

  • damnToHell() which immediately sets the computer running it on fire and is considered equivalent to finally().
  • fuckMyShitUp() which returns a random memory chunk cast to the expected object and is called on rejection.
  • yourFatherSmellsOfElderberries() which abandons the promise as soon as it is resolved.
  • snail() which attaches a process to the returned value that if it ever runs causes the death of the programmer.

And we can't forget H̶͇͈̞͔̺̗͙̰̻̽̈̓́̆͆͋͋̍͗͋̀̓͆͝e̸̦͆̃̄̄̔̍͂C̵̢̝͕͖͙̦̤͎̊̅͊̂̈̌̈́͒̂̇̅̄͝͝ǫ̵̠͍͓̤͓̦͕͇̪͂̋́̑̊͋̊̀̂͛͋͠m̷̨̡̞͕͎͉̯̦͓̞̙̱̥̞̺̤͗͂͆̀̄͂̾̏͌̈̀͘͠ȩ̵͕̳̪̳̹̖̠̩̫̦͉͇̌̚͠ͅş̵͚̟̦̬̠̥̤̤̩̠̯̇ͅ

2 days ago
EatingSolidBricks
:cs:

abstractPromisseFactoryBuilder.Build().Create(abstractPromisseOptionsFactoryBuilder Build().Create())

2 days ago
Antlool
:cp::c::rust::asm:

*(promise*)

2 days ago
JoWiBro

If we understand the meaning is it not now a word?

2 days ago
akmcclel
:rust:

Yup. Language evolves

2 days ago
WazWaz
:cp: :cs:

Didn't Webster recently add empromisification?

2 days ago
Zotoaster
:ts::cp::cs:

I love the evolviosity of language

2 days ago
Mayion

2 days ago
Esjs
:cp:

Exactly how I read the title in my head

2 days ago
MagicalPizza21

promisize()

2 days ago
rover_G
:c::rust::ts::py::r::spring:

Should be toPromise() or asPromise()

2 days ago
Bronzdragon
:rust:

It would, except that this function (from util) takes in a non-promise async function and converts it so it returns a promise instead, so those options are misleading, since they imply it takes a value and uses it as a promise.

const fs = require('fs');
const util = require('util');

const readFile = util.promisify(fs.readFile);

const fileContents = await readFile("...");
2 days ago
rover_G
:c::rust::ts::py::r::spring:

Thanks I didn’t know that’s what it’s for. In that case I think it should be asAsync()

2 days ago
Bronzdragon
:rust:

Better for sure, but the original function has to already be an asynchronous function (using a callback instead of a promise), so I can see why the Node.js people didn't go with it.

2 days ago
stipulus

return new Promise(resolve);

2 days ago
ROldford
:py:

I’ll nounify any noun I damn well please!

2 days ago
appeiroon
:j:

.promiseMe()

2 days ago
LowB0b

java dev forced to do frontend spotted

2 days ago
BlueCannonBall
:cp: :c: :asm: :py:

.prophesize()

2 days ago
Either_Letterhead_77

If I can't make up words while programming then what has this all even been about.

2 days ago
ford1man

It's a verb. .promise()

That won't confuse anyone ever. Since it's also a noun, make it a getter too, and make the result callable, such that .promise(andThen, orElse) and .promise.then(andThen, orElse) are equivalent.

That's not a bunch of excess code for the sake of magic, no siree.

Unless you're talking about util.promisify(fn) which just has an objectively incorrect name. It does not turn the passed function into a promise at all; it turns it into an async function. It should be util.asAsync(fn).

2 days ago
messierCobalt_

2 days ago
chaotic_thought
promisize_t
1 day ago
JazzyMcJazz

Someone at work wrote a function SSEfy which wraps a string with data: and \n\n 😐

18 hours ago
Will_Will_i_am

🤔

2 days ago
Bobrexal

promisize_me_captain()?

2 days ago
Caraes_Naur

Noun v Verb: Dawn of Gibberish.

Release the Gerund Cut!

2 days ago
jmorais00

But it can be a startup

2 days ago
Alternative_Pack_328

makePromisifier

2 days ago
EspacioBlanq

"promise" already is a verb that means "make a promise"

2 days ago
DarkCloud1990
:js::cs::fsharp::ts::j:

firstValueFrom to all my rxjs homies.

2 days ago
newontheblock99

One better,

.notDeceit()

2 days ago
pumpkin_seed_oil
:snoo_scream::j:

Nah, thats a perfectly cromulent word

2 days ago
TheCreamyBeige
:g:

Wait am I a bad programmer I'd totally call it ".Promise()" because I feel it implies already that it converts it to a promise.

2 days ago
chat-lu
:rust: :elixir-vertical_4: :re: :clj: :py: :kt: :j: :bash: :js:

.makePromise() is the dumbest since promise is already a verb.

2 days ago
difool

.asPromise()

2 days ago
Comically_Online

im low key using that

2 days ago
drdrero
:ts:

Let’s halt for a second, why do we call it a promise, like it’s getting broken anyways

2 days ago
Correl

Shortest is best

2 days ago
Inside_Jolly

Haven't you heard? Language is a living organism. It evolves.

(Never mind that the last two sentences directly contradict each other. A single organism *can not* evolve. But that's what they say!)

2 days ago
Silly_Guidance_8871

Promisize? Promisate?

I can probably come up with worse, if need be

2 days ago
Aneizi

all hail the og: jsonify()

1 day ago
joedotphp
:cp::rust:

Hey. It's my code. It's a word if I say it is!

1 day ago
thisisnotchicken OP
:py::j::js::cp:

this is about the util module from node.js btw (i couldn't fit the full method call without making the text too small)

1 day ago
goldPotatoGun

.yolo .bet

1 day ago
Illustrious_Tax_9769

promize()

1 day ago
Individual-Praline20

Oh man, I need to add that in my current work! prePromisifing() and postPromisifing()

1 day ago
MajorTechnology8827
:hsk:

Given that I assume you wrap an existing value into a pre-computated promise that is already value-ready

Why not Promise.resolve(foo)

I would even say this function could flatten a promise

Promise.resolve(Promise.resolve(foo)) == Promise.resolve(foo)

13 hours ago
jwr410
:c::cs::py:

I accidentally called .makePromiscuous() and it didn't end well.

12 hours ago
TimbitsAreDonutPoos

.promisificamus()

8 hours ago
uwo-wow

ctp()

2 days ago