ProgrammerHumor

thatsNotEvenAWord

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

Discussion

jzrobot

toPromise() ?

1 week ago
Informal_Branch1065

toShreds()?

1 week ago
sammy-taylor
:js::elixir-vertical_4::cp:

.toShredsYouSay()?

1 week ago
TeachEngineering

wife.holding_up()

1 week ago
ChrdeMcDnnis

false

1 week ago
OzorMox

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

print("tut")

}

1 week ago
MoveInteresting4334
:rust::j::ts::py::hsk:

four tuts? Damn.

1 week 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

6 days ago
BoonkeyDS

print("Max Verstappen")

5 days ago
keepinitcool

But true

1 week ago
Tyfyter2002
:cs::j::js:

state.toShreds

1 week ago
skuzylbutt

-> impl Shreddable

1 week ago
just_jedwards

.hardlyEvenKnowHer()

1 week ago
ComprehensiveWord201

1 week ago
otter5

Resolve(“I_Say”)

1 week ago
ConcernUseful2899

.shredify()

6 days ago
ToastTemdex

That’s the correct answer.

1 week 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()

1 week ago
Turbo_Megahertz

This guy promises.

1 week ago
iismitch55

Unfortunately I don’t always resolve them :/

1 week ago
postmaster-newman

This guy docs so good it’s on Reddit

1 week ago
AdorableRandomness

this guy OOPs so hard

1 week ago
mysiker

Will remember. I promise.

6 days ago
private_final_static

This

Also .promise()

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

1 week ago
FOSSandCakes
:rust::g:

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

1 week ago
darkfire0123
:asm::c::cp::rust::kt::ts:

Found the rust user

1 week ago
FOSSandCakes
:rust::g:

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

1 week ago
keepinitcool

You do be looking abit rusty over there

1 week ago
Emergency_3808

Stringify, integerify, floatify, JSONify

1 week ago
Geoclasm

Hey! I came to say that!

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

1 week ago
Top-Permit6835

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

1 week ago
Negitive545

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

1 week 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)

1 week ago
satansprinter

Just add a then method on it

1 week ago
captainMaluco

iPromise("trust me", "bro")

1 week ago
hondacivic1996

.orNotToPromise()?

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

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

1 week ago
AppropriateStudio153

.byTheHonorOfHouseMogh() : KlingonPromise

1 week ago
hethcox

byTheHammerOfThor()

1 week ago
mentix02
:py::c:

.onTheRiverStyx()

6 days ago
jryser

.byGrabtharsHammer()

5 days 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

1 week ago
AllTheSith

Help. There are vines all over my pc.

1 week ago
kvt-dev

Have you tried defoliating the hard drive?

6 days ago
Negitive545

I do really like .bloodOath() => Promise

1 week ago
torsten_dev
:rust::c::cp:

.solemnlySwear()

1 week ago
godonkeymeasures

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

1 week ago
HSX610

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

Borrowing it, thanks!

1 week ago
not_good_for_much

~BloodOath() { if (!resolved) Crash(); }

3 days ago
lces91468

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

1 week 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.

1 week ago
TheBB
:cp::c::py::ts:

Why does this sound like a Douglas Adams bit?

1 week 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.

1 week ago
YetiHafen
:j:

How much concrete does your concrete factory produce?

1 week 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.

1 week ago
rosuav

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

1 week 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.

1 week 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.

1 week ago
Noch_ein_Kamel
:perl:

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

1 week 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.

1 week 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.

1 week 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.

1 week 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?

1 week 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.

1 week ago
hicklc01

getPromise<UP>();

1 week ago
willfulwizard

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

1 week ago
ford1man

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

1 week ago
RichCorinthian

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

1 week ago
Hubble-Doe

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

1 week ago
LowB0b

we already have \@Async though

1 week 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.

1 week 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.

1 week ago
CryptoTipToe71

.youPromise?👉🏻👈🏻🥺🫣()

1 week ago
Top_Refrigerator1656

you're hired

1 week ago
Mockington6

.promiseInator3000()

1 week 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.

1 week ago
Emergency_3808

Dr. Doofenshmirtz's source code aah

1 week 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.

1 week 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().

1 week 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.

1 week ago
[deleted]

[deleted]

1 week ago
[deleted]

[deleted]

1 week ago
Eva-Rosalene
:ts::c::bash::powershell:

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

1 week ago
mot_hmry

.swear()

1 week ago
MasK_6EQUJ5

pinky.swear();

1 week ago
Noch_ein_Kamel
:perl:

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

1 week 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̷̨̡̞͕͎͉̯̦͓̞̙̱̥̞̺̤͗͂͆̀̄͂̾̏͌̈̀͘͠ȩ̵͕̳̪̳̹̖̠̩̫̦͉͇̌̚͠ͅş̵͚̟̦̬̠̥̤̤̩̠̯̇ͅ

1 week ago
EatingSolidBricks
:cs:

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

1 week ago
Antlool
:cp::c::rust::asm:

*(promise*)

1 week ago
JoWiBro

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

1 week ago
akmcclel
:rust:

Yup. Language evolves

1 week ago
WazWaz
:cp: :cs:

Didn't Webster recently add empromisification?

1 week ago
Zotoaster
:ts::cp::cs:

I love the evolviosity of language

1 week ago
Mayion

1 week ago
Esjs
:cp:

Exactly how I read the title in my head

1 week ago
MagicalPizza21

promisize()

1 week ago
rover_G
:c::rust::ts::py::r::spring:

Should be toPromise() or asPromise()

1 week 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("...");
1 week 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()

1 week 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.

1 week ago
stipulus

return new Promise(resolve);

1 week ago
ROldford
:py:

I’ll nounify any noun I damn well please!

1 week ago
appeiroon
:j:

.promiseMe()

1 week ago
LowB0b

java dev forced to do frontend spotted

1 week ago
BlueCannonBall
:cp: :c: :asm: :py:

.prophesize()

1 week ago
Either_Letterhead_77

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

1 week 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).

1 week ago
messierCobalt_

1 week ago
chaotic_thought
promisize_t
1 week ago
JazzyMcJazz

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

5 days ago
Thelatestart

In my project i have a concept of strucured data read from a file and i called my file structurizer because it was funny.

3 days ago
Will_Will_i_am

🤔

1 week ago
Bobrexal

promisize_me_captain()?

1 week ago
Caraes_Naur

Noun v Verb: Dawn of Gibberish.

Release the Gerund Cut!

1 week ago
jmorais00

But it can be a startup

1 week ago
Alternative_Pack_328

makePromisifier

1 week ago
EspacioBlanq

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

1 week ago
DarkCloud1990
:js::cs::fsharp::ts::j:

firstValueFrom to all my rxjs homies.

1 week ago
newontheblock99

One better,

.notDeceit()

1 week ago
pumpkin_seed_oil
:snoo_scream::j:

Nah, thats a perfectly cromulent word

1 week 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.

1 week ago
chat-lu
:rust: :elixir-vertical_4: :re: :clj: :py: :kt: :j: :bash: :js:

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

1 week ago
difool

.asPromise()

1 week ago
Comically_Online

im low key using that

1 week ago
drdrero
:ts:

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

1 week ago
Correl

Shortest is best

1 week 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!)

1 week ago
Silly_Guidance_8871

Promisize? Promisate?

I can probably come up with worse, if need be

1 week ago
Aneizi

all hail the og: jsonify()

1 week ago
joedotphp
:cp::rust:

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

1 week 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 week ago
goldPotatoGun

.yolo .bet

1 week ago
Illustrious_Tax_9769

promize()

6 days ago
Individual-Praline20

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

6 days 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)

5 days ago
jwr410
:c::cs::py:

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

5 days ago
uwo-wow

ctp()

1 week ago