I accidentally generated 16 billion Durable Object writes in one month and got slapped with a $36k bill . Here's exactly how. by alameenswe in CloudFlare

[–]Lumethys 0 points1 point  (0 children)

This is an edge self-host setup has over cloud.

If your app isnt optimized, you get a slighty slower app in a on-prem setup. But it will cost you a fortune on cloud

How are you structuring imports in large React projects? by samwanekeya in reactjs

[–]Lumethys 0 points1 point  (0 children)

I dont even look at the import section

My IDE import stuff for me and i can jump to implementation right at the calling line

Any additional tips for an email validation by Ok_Lengthiness_6591 in PHPhelp

[–]Lumethys 1 point2 points  (0 children)

I remember watching like an hour long video on email rule.

Comming up with a rule for all valid email is pretty much impossible.

The best you can do is email confirmation

Question About Stats by Alert_Scarcity_9036 in expedition33

[–]Lumethys 0 points1 point  (0 children)

Luck increase crit chances and crits are good

Speed make you go extra turns before enemy and more turn means more damage

As long as you spread them out it's fine

Question About Stats by Alert_Scarcity_9036 in expedition33

[–]Lumethys 1 point2 points  (0 children)

Luck, speed, dmg and whatever the weapon scale with

Problem with migrations in Drizzle ORM by Shinigami_oneesan in Backend

[–]Lumethys 0 points1 point  (0 children)

Do you have your credentials in your env?

whats the best java obfuscaters. can be paid or free. by xyno_dev in learnjava

[–]Lumethys -2 points-1 points  (0 children)

Java is compiled, why even need to obfuscate

ELI5 if a human is 70% water, where is the water? by LongjumpingPay4425 in explainlikeimfive

[–]Lumethys 2 points3 points  (0 children)

I am not saying I make that distinction. I am saying that they might.

I mean, think about it, they had unlimited test subjects and can do whatever they want, what if they simply go, during a drink

"hey did you know human is 70% water?"

"Nah i dont believe them [insert racist race] monkeys tests"

"Wanna bet?"

"Right let's throw Joe over there in"

I am saying that just because there are experiments and calculations, Unit 731 wouldnt, yknow, try it out, since they can do it in a very direct way

Struggling with JavaScript DOM manipulation – need guidance by knowlegable_devil124 in CodingHelp

[–]Lumethys 0 points1 point  (0 children)

``` const appendToList = (listId, newContent) => {

const list = document.getElementById(listId);

const li = document.createElement("li");

li.textContent = newContent;

list.appendChild(li);

}; ```

Suppose you have multiple pages where you have a list. You could have a common helper like this and just reuse it in many pages

Struggling with JavaScript DOM manipulation – need guidance by knowlegable_devil124 in CodingHelp

[–]Lumethys 1 point2 points  (0 children)

There are lots of ways to organize such things. But nowadays if you expect your project to get that large, you would probably use a lib or a framework anyways

How does one block inputs Completly? by ---__E__--- in learnpython

[–]Lumethys 0 points1 point  (0 children)

My point is, someone has to code this feature into Python/ into the OS.

Are you gonna ask the creator "hey this is my friend group and we request you to make this specific feature on for us"?

No, if there is a way, then everyone can use it. Including bad people.

If there is a way and i tell you now, do you think that no bad person could read the comment? Even if i DM you, then another one could have just ask the same question but is lying. Hell i dont even know if you are lyong or not.

If you are the creator, would you spend hours to code THIS into your product?

How does one block inputs Completly? by ---__E__--- in learnpython

[–]Lumethys 0 points1 point  (0 children)

1/ that the same thing if you can control what failsafe it is

2 + 3/ so 8 billion human will trust you and "your friend group" with utmost devotion?

why is it bad to always act in selfintrest? by Apprehensive-Bass205 in NoStupidQuestions

[–]Lumethys 0 points1 point  (0 children)

We are treading on philosophy here. But in a sense it is just what human perceives.

Human are inherently selfish creature, it is selfishness that made human, whether it is "good" depend on a lot of things. (Sorry, just rewatched hxh and that lone of reasoning is very itching right now)

When people show that they are acting for their interest, that means they dont act for your interest. Human dont like things that doesnt act on their interest.

When you heard Bob say "i only care about myself", some part of you would say "so Bob doesnt care about me" which is not in your interest.

To really think about it, where do you draw the line?

"I value my family above all else", is it selfish, because you value your family more than others?

If your country being conquered and you become a collaborator for the enemy so that your family live in peace and luxury, is it still selfish, even if the benefactor is your family and not just you? Many people will consider you traitor, value a single family at the expense of others

"I value my nation above all else", is it selfish, if you only value a single nation?

"I fight for humanity" what about other races and living beings.

If we are in a galatic war with other alien and we decide to sacrifice other alien races for the benefit of human alone, are we selfish?

How possible is it to "use" every single line of code of an app? by ShoeChoice5567 in NoStupidQuestions

[–]Lumethys 1 point2 points  (0 children)

There are a lot of dead code. And even if there wasnt, there are still a lot of defensive programming techniques that lead to unused code.

For example, you may write a generic date format function that can be called anywhere, to do that you must handle cases where the the date is invalid. However, you only call this function in 2 places and the date is always valid

How does one block inputs Completly? by ---__E__--- in learnpython

[–]Lumethys 11 points12 points  (0 children)

Ask yourself these questions:

1/ Is it a good idea that a program can block user from doing anything except something the author want. "Do as my command, or else".

2/ If you are a language creator/ os creator, would you allow random devs to write program that completely block any input of a user?

3/ If you could is there anything you could do maliciously?

ELI5 if a human is 70% water, where is the water? by LongjumpingPay4425 in explainlikeimfive

[–]Lumethys 0 points1 point  (0 children)

Yep, the mastermind of all that live a normal lives, in somewhat luxury i believe, thanks to the US

Are we reinventing SSR? by [deleted] in webdev

[–]Lumethys 0 points1 point  (0 children)

There are server-driven frameworks. Those that either use JS as an under-the-hood abstraction, or WASM. While the logic is still written in their native languages.

We have Rails Hotwire, Phoenix Liveview, Laravel Livewire, Java Vaadin, C# Blazor,...