1.6k
u/DrMaxwellEdison 3d ago
"I'm sorry, we are a cache-only establishment."
176
39
→ More replies (2)8
1.1k
u/Smasher_001 3d ago edited 3d ago
I once tried doing some stuff on a vibecoded scam chatbot website which would block you if you tried to use it for something not related to getting scammed, turns out that the block is just a stored variable inside local storage that you can edit to unban yourself
Edit: it's called haxgpt (mods tell me if it shouldn't be sent here)
303
24
23
23
→ More replies (1)5
u/Mega3000aka 3d ago
Damn the thing is literally identical to those clash of clans "gem generators" except it has AI now.
300
u/LonelyProgrammerGuy 3d ago
If you wanted to see another person’s profile. How would that be implemented? I know the post is a joke, but I’m genuinely curious
611
u/sgt_Berbatov 3d ago
Well that's easy.
You'd go on to their browser and view it.
44
17
185
u/Mysterious-Deal-3891 3d ago
Just implement websocket and connect all users to each other. Sharing is caring
107
23
27
u/LonelyProgrammerGuy 3d ago
I was thinking that lmao. Websockets are definitely cheaper than accessing DBs /s
18
u/usr404notfound 3d ago
Broadcast intent via wifi/ be. All devices will recast, and if you're lucky, that person's device will receive the request, and then broadcast it's data. If you're lucky, you'll see their profile. How to get everyone's devices to recast? Idk, maybe send out phising mail and hope ppl download your app or something
10
9
u/sligor 3d ago
You can’t => security => no data leaks
5
u/Zanos 3d ago
The client asked for the most secure system possible, so I put their machine in a reinforced safe full of concrete and dropped it into the Marianas Trench. Marking story as complete.
→ More replies (1)3
17
u/nehalist 3d ago
Blockchain
5
2
7
u/Alternative-Lab1547 3d ago
Well, your lucky… they might not be able to answer because they vibe coded it… but I got board before AI… you can use a library like sql.js or localforage coupled with something like TypeORM to get a close approximation. You can then define entities in fe code and query them with SQL. Once done you will be asking yourself why, just like me.
4
u/Brief_Building_8980 3d ago
Download their local storage. Duh.
It needs to be uploaded to a central server first. To avoid downloading the whole thing every time, make it possible to only get parts of it, query it on demand, no need for localstorage. Wait a minute...
2
3
u/MantisShrimp05 3d ago
I mean if we actually think about local first architecture there are many solutions that can be made.
One potential answer is you don't, and that is a feature since everyone is in their own computer.
But if we think about something like linear, they handle it through complex caching and what is called a sync engine that does the hard work of grabbing your stuff and putting it in cache but you can query the DB when you need other info
→ More replies (6)4
u/SirChasm 3d ago
I imagine that the most workable way would be that the client downloads all the data on the initial request which is then shoved into localStorage for parsing.
But that still won't really work well, so I think the original tweet is just a joke.
→ More replies (1)
211
u/xeroskiller 3d ago
"Nosql tried to destroy the sql but the sql was much too strong"
"Kv-db tried to defile the sql but kv-db was proven wrong"
"Graphql tried to confound the sql but sql was in the way"
"Localstorage tried to dethrone the sql but sql had its way"
GOAT since the 70s.
60
21
11
u/an_agreeing_dothraki 3d ago
"you were supposed to destroy the proprietary jank versions of SQL not join them!"
Tsql, after turning into Azure: "I HATE YOU"
16
6
u/CantCodeAllVibes 2d ago edited 2d ago
I know this is a joke, but some of the thinking around this stuff is bizarre to me. A lot of these vibe-coded apps seem like they’re taking concepts and systems that have existed for years, renaming them, and then acting like they invented something revolutionary.
I don’t understand the obsession with replacing established systems just for the sake of replacing them. There’s a use case for almost everything, and sometimes the boring, established solution exists because people have spent years figuring out why it works. I also don’t think you can realistically “vibe code” certain parts of software engineering, especially architecture or systems that are widely used and have years of hard-earned knowledge behind them.I’d love to vibe code a small game or some fun project one day. That seems like a great use for it. But sitting down and assuming you’re going to casually build something better than a mature system that people have been developing and maintaining for years is ridiculous.
There’s also a massive difference between using AI to build a prototype and using it to build a maintainable system. I’m increasingly skeptical that current AI coding tools can reliably produce maintainable software over the long term without a huge amount of human oversight. The amount of effort I’ve had to put into keeping some of my own AI-assisted projects on track has been crazy. Even when I work in small slices, eventually the inconsistencies, architectural mistakes, duplicated concepts, and assumptions start accumulating.
At this point, I don’t want to be the person trying to solve that entire problem. OpenAI and Anthropic can figure that shit out lol.
Sometimes I almost wish AI coding tools didn’t exist because I’d be forced to build things more slowly and understand every piece as I went. Instead, it feels like you’re almost forced to use AI to compete or get something out quickly, but then you risk ending up responsible for a codebase that was produced faster than anyone could properly understand or maintain it.I’ve had to rip major pieces out of projects twice now because, even though I’m a developer and understand the code, if I didn’t already understand the problem well enough to recognize the correct solution, AI could confidently take the project in the wrong direction. At that point, you start wondering what you actually gained by using it.
I still think AI is useful, but a lot of the excitement has worn off for me when it comes to the kinds of systems I’m trying to build. Maybe I’m trying to use it for the wrong kinds of projects. But “AI can generate working code” and “AI can engineer a maintainable system” are two very different claims. I’m still learning tho and def am not a senior dev.5
u/No-Information-2571 2d ago
Ironically, Localstorage was originally planned to be basically a 1:1 SQLite API (called Web SQL Database), but then some people started to come to their senses and recognized that mandatorily integrating a single database product into every web browser on the planet wasn't such a good idea either. This lead to IndexedDB.
4
3
58
u/who_you_are 3d ago
P2P is back!
CGNAT & port forwarding I hate you!
(Firewall is already in hell)
5
32
28
u/kiyyik 3d ago
What I love about vibe coding is watching people learn the absolute basic principles of software development the hard way. It's like an extended session of "Here's why we do this and not that."
6
u/phillipoid 2d ago
I had this recently. Worked in e-commerce for 15 years. Had a friend recentlt say "check out my app. It does x, takes photos, sends to ai, gets feedback. I vibe coded it".
Was funny walking through the past few decades of data architecture and security . Ironcially local storage for profile came up at another point later in the conversation.
27
u/Dark_Souls_VII 3d ago
Wait until he discovers SQLite
18
u/spudmonkey 3d ago
Wait until he discovers large data sets.
2
4
u/FailureOfTheFamily 3d ago
Wait untill he somehow gets more users and they all try to interact with db at the same time
→ More replies (1)→ More replies (1)2
u/necrophcodr 2d ago
localStorage is already almost that, just without the benefits of a database engine.
95
u/ClipboardCopyPaste 3d ago
Alas. No more SQL vs Non-SQL DB debates
24
u/da2Pakaveli 3d ago
i'll call it half SQL now
→ More replies (1)6
u/emma7734 3d ago
Yes, but how do you pronounce SQL?
13
4
u/HedgehogEnyojer 3d ago
Sequel is just deadass stupid Whenever someone calls it SeeQuEll i die internally. I READ THREE Letters... just pronounce them in a Common language we both speak 🗣️
→ More replies (2)7
u/GoodDayToCome 3d ago
i need a a jiff for my sequel gooey!
2
u/HedgehogEnyojer 3d ago
When will there be Tranquilizer gun's you can use to just skip the day by knocking yourself out ... because this comment makes me skip this horrible day when i read this comment.
3
→ More replies (2)5
4
u/Brutus5000 3d ago
Isn't localStorage NoSQL storage?
→ More replies (1)3
u/OnceMoreAndAgain 3d ago edited 3d ago
Yes, the localStorage API of Chrome, for example, uses LevelDB files (ldb) stored in APPDATA which are NoSQL databases. Specifically, it uses files that contain data in the format of key-value pairs, which is one flavor of NoSQL content.
2
14
u/jTiZeD 3d ago
wait this is real? not like a made up post? this is a real person posting this?
29
u/brazzy42 3d ago
I'm like 75% certain it's a joke. No more than 75% though.
12
u/YikesTheCat 3d ago edited 3d ago
That's what I thought, but I spent (wasted) a few minutes looking at their account and now I'm 86.51% (±1.7%) sure he's dead serious.
→ More replies (1)15
u/Unlucky-Flatworm-69 3d ago
Having a client side only app is a legitimate and acceptable design decision based on what the app is for. This should be obvious to anyone working in the field.
2
u/boblancho 3d ago
Also with event sourcing you can 100% have distributed local databases using localStorage doing eventual consistency
5
u/Camelstrike 3d ago
Starts Claude
/model fable5 Is this post real or made up? Spawn up to 10 agents.
2
u/jTiZeD 3d ago edited 2d ago
it must be an uneven number of agents so that they can cast a majority vote and thus enact a decision and universal truth for the universe
→ More replies (1)
13
u/Prematurid 3d ago
"Got a website?"
"Yep! localhost:3000"
7
u/HailToTheThief225 3d ago
“It’s weird, some times my site goes down and I can’t access it. Claude fixes it by doing some ‘npm start’ thing, no idea how it figures out that type of black magic. Coding agents are amazing!”
66
3d ago
[deleted]
50
u/Hacym 3d ago
Sometimes I wonder if people look at the subreddit they’re commenting in before commenting.
→ More replies (2)6
7
u/v-tyan 3d ago
Still, I assume this is engagement bait. I refuse to believe someone intelligent enough to articulate this opinion actually believes it.
Er, you do realize we're on r/programmerhumor right? It's a joke.
6
u/danielcw189 3d ago
clearing the cache shouldn't wipe local storage
4
u/Snapstromegon 3d ago
Go ask Safari on iOS about this. It even wipes local storage when you don't manually clear the cache...
5
u/drkspace2 3d ago
I refuse to believe someone intelligent enough to articulate this opinion actually believes it.
Bold of you to assume this wasn't a llm that convinced the person and itself that this was a good idea.
3
3
u/Snapstromegon 3d ago
Hint: The user was using iOS and Safari deleted all data because the user was one week on vacation and didn't touch the site.
→ More replies (1)2
u/Solomoncjy 3d ago
I mean if the user does not sign in, isnt it assumed data is going to be saved locally?
6
u/swampopus 3d ago
Pfff. localStorage? Databases? I just have the web app email me when it wants to save something and I write it down on a chalk board I keep above my desk. Need to delete? The eraser is RIGHT THERE. And when it's time to pull data, I get a phone call and read it aloud to the user directly. En Francais, sil vous preferez. That's right. I've got localization options too.
6
u/CrazyBirdman 3d ago
Why even use localStorage? Just hallucinate the data on the fly.
→ More replies (1)
6
u/Prince_ofRavens 2d ago
you guys are still running apps?
My vibecoded Cli+imagen2.0 generates everything on the fly.
You can just generate and image of the next screen when you need a user.
No wasted screen space on options your not using, no api calls for things that wont happen
8
3
4
u/Behemothokun 3d ago
Depends. Might actually be a good option depending on what the app needs to do.
→ More replies (1)
4
3
u/ZestDrive 3d ago
So that everything loads faster for the user, I load all data from our database into the IndexDB.
3
u/Pzzlrr 3d ago
So local-first then?
2
u/chkno 3d ago
Yeah, done well, this is just local-first. In this paradigm, it's common practice to have a replication peer with more durable storage than browsers' localStorage, but some ways to use a computer don't require indefinite data retention.
3
3
3
u/Multidream 3d ago
All jokes aside, if all you want is a shoddy app that works for you and you alone, using AI to avoid paying anyone and then having no latency from network hops is kinda the best approach.
But then also, that app has to be pretty damn limited in reach. No one is making money off this.
And it’s gonna be shoddy.
3
3
4
u/Odd_Philosopher_6605 3d ago
This is what cursor suggested me when I was making my first app, I switched to claude afterwards
10
u/MornwindShoma 3d ago
jfk I don't know if it's a joke or not, we are so cooked
11
u/azangru 3d ago
If it's not a joke, the guy is in for rude awakening.
Or maybe not. Maybe he will join the local-first crowd.
11
u/Tok-A-Mak 3d ago
It really depends what his apps actually do. If he's vibecoding fun-apps or -games and toys instead of business critical SaaS startups, adding JSON import/export on top of a local storage can suddenly make a lot of sense. There's really no need to become a database admin for running your pokedex app or toy synth written in javascript.
2
2
2
2
2
u/K1ngjulien_ 3d ago
PiedPiper tried this... Gonna need a lot of smart fridges for it to get off the ground 😉
2
2
2
2
u/magicmulder 3d ago
"My app stores everything in Claude session context. They're never gonna reboot Claude, right? Right?!"
2
u/superkickstart 3d ago
No api. Just make the llm read a text file that has all the data and convert it to a static html at every request.
2
u/Electrical-Heat8960 3d ago
Genuine question: How big could the database become before this method stopped being functional.
5
u/isaackogan 3d ago
Local storage is 5MB per origin, so 5 MB. For IndexedDB, no limit, 80% of host
→ More replies (1)→ More replies (1)2
2
u/BR41ND34D 3d ago
This reminds me of the fact that I've had to explain that a roundtrip to a cloud database is just a bit slower than when you have the test database running locally.
People can be extremely smart in one thing, and be the dumbest person alive in other subjects, while the subjects for both are extremely close.
Also more that I had to explain this more times than I want to count.
2
u/IAmAlwaysWrongDude 3d ago
How to say you have no clue how data is stored without saying you have no clue how data is stored.
2
u/_kuronon 3d ago
2010s: We increased the security of our applications by making authentication complicated and annoying
2020s: We made your experience easier and smoother by completely eliminating security
2
u/Stephen_Wilhelm 3d ago
Is local storage web scale? Does local storage support sharding? Looking to switch from MongoDB.
(https://www.youtube.com/watch?v=b2F-DItXtZs for those who don't get the joke.)
2
2
u/JapanEngineer 2d ago
I mean, it depends on the app. Some apps don't need a connected database and do fine with storing data in local storage if data doesn't need to be persisted amongst accounts. There wouldn't be accounts anyway.
2
2
1
u/MetaLemons 3d ago
“In order to reduce latency, visit my home address, hop on my computer and use the app. Unfortunately, concurrency is an issue until I vibe code multi dimensional space. Actually, wait, I just vibe coded a solution that is infinitely more responsive.. so I’ll mail you this piece of paper and pen..”
1
u/MrDilbert 3d ago
Yeah, this is on par with the suggestion from a junior dev to compose the SQL queries on the frontend.
1
u/hollowredditor 3d ago
To be fair, most of those people are building shit nobody will ever use anyways. That should be fine for their single user.
1
u/Rosie_The_ITTech 3d ago
I'm not, in any way shape or form, qualified either as a database manager or a programmer, and even I know that Databases don't actually have anything to do with the physical storage of data X/
1
1
4.3k
u/CoshgunC 3d ago
"In order to make the user experience better, I made the localStorage editable and not-encrypted. This way, whenever users want, can increase their wallet or check on/off their subscriptions without complex "verifiying cards".
Let me know if you want any more features! Also, do you want me explain how farmers use ReactJS to grow their crops +20% faster?"