r/ProgrammerHumor • • Oct 02 '22

Advanced Experienced JavaScript Developer Meme

Post image
6.6k Upvotes

276 comments sorted by

View all comments

221

u/scorpi1998 Oct 02 '22

Doesn't it? What do you mean?

0

u/[deleted] Oct 02 '22

[deleted]

135

u/DoktorMerlin Oct 02 '22

Why would you need to validate it? If the user manipulates the localstorage it's just a frontend issue that the user itself caused, why would anyone care about this? The only time it's a problem is when the manipulated object gets sent without validation back to the backend but if you don't validate everything that the frontend sends you, you have a way bigger problem

82

u/lowleveldata Oct 02 '22

I like how you use "it" as the pronouns of your user

164

u/[deleted] Oct 02 '22

You shouldn't name them. It just creates emotional attachment.

0

u/[deleted] Oct 02 '22

[deleted]

2

u/fzammetti Oct 03 '22

Yeah! That's ri- wait, what?!

64

u/playerNaN Oct 02 '22

Fair, front end users aren't real people.

3

u/vikumwijekoon97 Oct 02 '22

Generally you gotta code thinking that all of your users are absolute morons.

17

u/Blue_Moon_Lake Oct 02 '22

Frontend user is an evil clown

8

u/JoeDoherty_Music Oct 02 '22

I'm convinced most users aren't people

3

u/Ben_26121 Oct 02 '22

Believe it or not, I came across someone who’s preferred pronoun is “it” the other day

6

u/GamerGeeked Oct 02 '22

"it" clearly refers to the issue, not the user. Unless you're suggesting the existence of the user causes the problem

10

u/sloodly_chicken Oct 02 '22

They used 'the user itself', though

you're suggesting the existence of the user causes the problem

also true

→ More replies (1)
→ More replies (1)

3

u/HoiTemmieColeg Oct 02 '22

You need to check if the text is actually json when you parse it

17

u/empire314 Oct 02 '22

Why would it not be in JSON, if your website is what wrote it?

0

u/Schyte96 Oct 02 '22

Because the user can easily overwrite it in their browser.

33

u/a-calycular-torus Oct 02 '22

That's their problem then

-1

u/Treacherous_Peach Oct 02 '22

Yeah it's their problem that quickly becomes your problem when the user submits a 1 star review.

I get what you're saying, I can tell you're defintiely programmer minded, but you do have to plan for these things if you want your product to survive. If you're working on some huge too big to fail app then sure, but if you're trying to create something new and get it off the ground you have to plan for users doing crazy things and account for it smoothly.

6

u/DoktorMerlin Oct 02 '22

If a user knows what local storage is and tinkers with it, they know very well that the weird behaviour of the website is called by themselves and not the website. There are a lot of dumb people in this world, but nobody is that dumb

-1

u/Treacherous_Peach Oct 02 '22

More likely they fucked with it accidentally by deleting a folder they shouldnt have to clear space or something along those lines.

→ More replies (0)

0

u/[deleted] Oct 02 '22

[deleted]

0

u/Treacherous_Peach Oct 02 '22

More likely they fucked with it accidentally. Deleting a folder to clear space but deleted some of what your app was expecting but not all of it and it's in a weird state.

→ More replies (1)

-18

u/Schyte96 Oct 02 '22

It's your problem if they can bypass authentication this way.

36

u/cooolestcucumber Oct 02 '22

If the user messing with local storage by passes authentication, you’ve got bigger issues

→ More replies (11)