ProgrammerHumor

thatsNotEvenAWord

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

Discussion

jzrobot

toPromise() ?

7 hours ago
Informal_Branch1065

toShreds()?

6 hours ago
sammy-taylor
:js::elixir-vertical_4::cp:

.toShredsYouSay()?

5 hours ago
TeachEngineering

wife.holding_up()

5 hours ago
ChrdeMcDnnis

false

3 hours ago
OzorMox

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

print("tut")

}

3 hours ago
MoveInteresting4334
:rust::j::ts::py::hsk:

four tuts? Damn.

3 hours ago
keepinitcool

But true

3 hours ago
Tyfyter2002
:cs::j::js:

state.toShreds

3 hours ago
skuzylbutt

-> impl Shreddable

2 hours ago
ComprehensiveWord201

3 hours ago
otter5

Resolve(“I_Say”)

4 hours ago
ToastTemdex

That’s the correct answer.

7 hours ago
Emergency_3808

Stringify, integerify, floatify, JSONify

5 hours ago
private_final_static

This

Also .promise()

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

6 hours ago
Geoclasm

Hey! I came to say that!

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

6 hours ago
Top-Permit6835

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

6 hours ago
FOSSandCakes
:rust::g:

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

5 hours ago
darkfire0123
:asm::c::cp::rust::kt::ts:

Found the rust user

3 hours ago
FOSSandCakes
:rust::g:

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

3 hours ago
keepinitcool

You do be looking abit rusty over there

3 hours ago
Negitive545

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

3 hours 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 you want the method send a promise from one object to another with the object receiving the promise as an argument, 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 hour ago
look
:rust::ts::c::asm::ru::py:

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

6 hours ago
AppropriateStudio153

.byTheHonorOfHouseMogh() : KlingonPromise

5 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

4 hours ago
AllTheSith

Help. There are vines all over my pc.

3 hours ago
Negitive545

I do really like .bloodOath() => Promise

3 hours ago
godonkeymeasures

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

3 hours ago
lces91468

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

7 hours 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.

6 hours ago
TheBB
:cp::c::py::ts:

Why does this sound like a Douglas Adams bit?

6 hours 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.

36 minutes ago
YetiHafen
:j:

How much concrete does your concrete factory produce?

6 hours 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.

5 hours ago
rosuav

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

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

4 hours 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.

4 hours ago
Noch_ein_Kamel
:perl:

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

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

16 minutes 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?

3 hours ago
hicklc01

getPromise<UP>();

6 hours ago
Hubble-Doe

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

1 hour ago
ford1man

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

45 minutes ago
RichCorinthian

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

15 minutes ago
LowB0b

we already have \@Async though

3 hours 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.

7 hours ago
CryptoTipToe71

.youPromise?👉🏻👈🏻🥺🫣()

5 hours ago
Mockington6

.promiseInator3000()

6 hours ago
Emergency_3808

Dr. Doofenshmirtz's source code aah

5 hours 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.

4 hours 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.

6 hours 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().

5 hours 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.

40 minutes ago
[deleted]

[deleted]

39 minutes ago
[deleted]

[deleted]

33 minutes ago
Eva-Rosalene
:ts::c::bash::powershell:

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

32 minutes ago
mot_hmry

.swear()

5 hours ago
Noch_ein_Kamel
:perl:

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

1 hour ago
MasK_6EQUJ5

pinky.swear();

1 hour ago
Antlool
:c::rust::asm:

*(promise*)

7 hours ago
EatingSolidBricks
:cs:

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

6 hours ago
JoWiBro

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

6 hours ago
akmcclel
:rust:

Yup. Language evolves

5 hours ago
WazWaz
:cp: :cs:

Didn't Webster recently add empromisification?

2 hours ago
Zotoaster
:ts::cp::cs:

I love the evolviosity of language

1 hour ago
MagicalPizza21

promisize()

4 hours ago
rover_G
:c::rust::ts::py::r::spring:

Should be toPromise() or asPromise()

5 hours 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("...");
4 hours 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()

4 hours 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.

3 hours ago
Mayion

6 hours ago
Esjs
:cp:

Exactly how I read the title in my head

3 hours ago
stipulus

return new Promise(resolve);

5 hours ago
ROldford
:py:

I’ll nounify any noun I damn well please!

5 hours 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).

47 minutes ago
Will_Will_i_am

🤔

7 hours ago
Bobrexal

promisize_me_captain()?

6 hours ago
Caraes_Naur

Noun v Verb: Dawn of Gibberish.

Release the Gerund Cut!

6 hours ago
jmorais00

But it can be a startup

5 hours ago
Alternative_Pack_328

makePromisifier

5 hours ago
EspacioBlanq

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

4 hours ago
uwo-wow

ctp()

4 hours ago
appeiroon
:j:

.promiseMe()

3 hours ago
DarkCloud1990
:js::cs::fsharp::ts::j:

firstValueFrom to all my rxjs homies.

3 hours ago
LowB0b

java dev forced to do frontend spotted

3 hours ago
newontheblock99

One better,

.notDeceit()

3 hours ago
BlueCannonBall
:cp: :c: :asm: :py:

.prophesize()

3 hours ago
pumpkin_seed_oil
:snoo_scream::j:

Nah, thats a perfectly cromulent word

2 hours 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 hours 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 hours ago
difool

.asPromise()

1 hour ago
Either_Letterhead_77

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

1 hour ago
Comically_Online

im low key using that

51 minutes ago
drdrero
:ts:

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

50 minutes ago
Correl

Shortest is best

21 minutes ago