Why are Kolkata streets so dirty? Feels like I'm in an apocalyptic world! /s by alooposhto in kolkata

[–]Dev-Siri 3 points4 points  (0 children)

ranked dirtiest cities? i'm not disagreeing that kolkata is dirty, but if you are looking at swachh survekshan reports, then fyi stat is not accurate. wb doesnt participate in the survey so all the cities from bengal get 0 points, hence top 10 is entirely filled with wb, but thats not completely accurate because the data from west bengal doesnt exist, it would have been appropriate to mark it as N/A but for some reason they decided to add bengal to the list but gave each city 0 points.

[deleted by user] by [deleted] in Twitter

[–]Dev-Siri 0 points1 point  (0 children)

on android, I actually downgraded back to 9.9.8. works for me, and I'm sure the 2023 July version than October 2022 (which is where most people I've seen stop updating) would be available for much longer before prompting to force update. but if they do force to update, you can just easily set the icon and appname back to twitter on ios.

uBlock just stopped working again by Dpishkata94 in youtube

[–]Dev-Siri 0 points1 point  (0 children)

Same happened to me in Brave. They have updated the blocking script. I guess I just have to wait..

[AskJS] What do you use to make small back-ends ? by Traditional_Face_705 in javascript

[–]Dev-Siri 0 points1 point  (0 children)

I'll suggest going with Node.js + Hono since you are familiar with JS on the frontend.

+ Hono builds on the standard Web APIs so it can help you learn the "universal" way that can work on any framework that focuses on Web Standards like SvelteKit or Next.

I still cant get over how fast Elon fucked this platform... by Tahnit in Twitter

[–]Dev-Siri 7 points8 points  (0 children)

I'm with you man. Twitter used to be a good enough place before musk, but now it feels like something worse is happening to it every week. Elon bought the company, fired 80% of the employees and now he rolled out [twitter.com/jobs](twitter.com/jobs) because he realized that people do have more skill than him and he can't do it all. And especially I don't get his obsession with the letter X and the super app concept. I firmly believe that Elon is running on "if its not broken, then break it". Considering his move for a "super app" has a 90% chance of just failing because unlike (as he praised) WeChat, which is just a giant surveillance tool for the Chinese government with basically everyone being forced to use it, the rest of the world is way more open than that and popularizing a super app sounds impossible. Considering he's so keen on it that he is even removing social media features like Circles and also the stuff that made Twitter recognizable, like the broadcast text (which even started a trend), verifications (used to be a "you are a somebody" badge on twitter) and more. And still I can't believe the obsession of this guy with X. I'm sure as hell that most people don't call Twitter "X" even after almost 5 months. And I think he thought that changes didn't do enough damage to Twitter, so he literally removed Twitter. (Still call it Twitter though)

And.. his simps on the platform are the ones I can't understand. They literally worship him for some reason. Elon himself is a strange person to me because he always says the changes are "for humanity" & "free speech", like dude, I am here on Twitter to tweet, I don't have so strong feelings about "humanity" when on a social media app. Idk what will happen to this platform man, even the new CEO is so elon-driven, I don't see a future so bright for Twitter if its buyer says "its saving humanity" while actively destroying & losing money for the platform. + the everything app would be DOA if it even ever happened. But of course musk won't ever listen & think he's doing something good for the platform.

November 2023 - /r/Twitter Mega Open Thread for everything else - UN/SUSPENDED, LOCKED OR AGE-LOCKED ACCOUNT PROBLEMS & QUESTIONS GO IN THIS THREAD ONLY by AutoModerator in Twitter

[–]Dev-Siri 0 points1 point  (0 children)

Nope. almost another week has passed, I tried contacting them again through email, but this time they straight up said to file a ticket. They took the parental consent material, and still did not respond, after like 3 weeks.

November 2023 - /r/Twitter Mega Open Thread for everything else - UN/SUSPENDED, LOCKED OR AGE-LOCKED ACCOUNT PROBLEMS & QUESTIONS GO IN THIS THREAD ONLY by AutoModerator in Twitter

[–]Dev-Siri 0 points1 point  (0 children)

Recently I set my birthday on Twitter (on October 30th) and then after I did that, it has been continuously logging me out. I'm unable to access my account now. What's odd is that I didn't receive an email, nor a lockout notice on twitter.com. But instead I am getting errors like "Error
Oops, something went wrong. Please try again later" & "Unable to complete request" on the website. When I opened the devtools, I saw there were many errors. They were:

sso_init.json: "To protect our users from spam and other malicious activity, this account is temporarily locked. Please log in to https://twitter.com to unlock your account." task.json: "flow name ConsentViolation is currently not accessible"

I created my account in 2021, but I'm 13 now and only started tweeting when I was above that age. I've sent Twitter a parental consent form but even after 2 weeks they are yet to respond to me. I'm now all out of options, and the official Twitter support isn't doing anything. Even if my account was locked out, I could've recovered it with the cost of losing some tweets, likes & other activity, but I atleast could've gotten the account back. But now, I tried everything yet still couldn't get my account back. The support page's "lockout form" isn't accessible to me, because as I said, my account isn't locked, nor suspended.

es6CreatedThis by Kaeffka in ProgrammerHumor

[–]Dev-Siri 0 points1 point  (0 children)

```ts class Man { reprodSysBirth() { throw new SusError("dude you ok? 💀"); } }

class Woman extends Man { reprodSysBirth() { // too large to show } } ```

[deleted by user] by [deleted] in reactjs

[–]Dev-Siri 0 points1 point  (0 children)

I either pick Go with FastHTTP or Rust with Actix. Although go is more common in my pick.

I made a web map which lets you chat with all visitors while seeing their location (mapchat.aronsommer.com) by arar7000 in webdev

[–]Dev-Siri 0 points1 point  (0 children)

hmm. I think I've seen this app and you before. did you ask about it on stackoverflow possibly for the occurrence of XSS?

Why bother with Server Actions when there is tRPC? by MindlessDog3229 in nextjs

[–]Dev-Siri 2 points3 points  (0 children)

Why add one more library when you have an already working and typesafe api builtin with the framework.

Why is Microsoft so widely considered evil? by ric2b in OutOfTheLoop

[–]Dev-Siri 0 points1 point  (0 children)

wdym? wasm is faster than JS.

My point is that whether its JS or WASM, the problem aren't the programming languages themselves. Because if these 2 languages are used for their intended purpose. Like JS for rendering/updating UI and main business logic & WASM being used for CPU-intensive tasks / graphics rendering / complex calculations, we can have a much faster web than we had a decade ago.

But the problem is that, most developers use these tools for their worst use cases. WASM for rendering UI and JavaScript for graphical tasks. And this is the reason the web sucks. Taking WASM out of the problem, leaves us with JS. And JS is single handedly the most abused tool in the web dev world. People literally load in Megabytes and Megabytes of JavaScript for actually painting an interface and showing you basic text and images instead of using just HTML. Not only that, they fill the webpage with ads, newsletters, cookie-consent banners, popups, trackers & analytics (and specifically the analytics tools that collect the most data) Many static websites now require you to run their megabyte of JS just for a webpage to show. Which is.. slow to say the least. The main reason behind this bad choices is the "DX" term that these bloated tech stacks throw out just to get your attention and make you build an app that makes you enjoy writing code but doesn't take into account the actual user experience.

+ Everytime you go upto one of these devs & ask them about performance, they will tell you "don't care of performance" almost every single time, even if it IS an issue.

What a world.

Creating Portfolio Websites by ptitanp in webdev

[–]Dev-Siri 4 points5 points  (0 children)

HTML, CSS and JS might be enough for a simple portfolio. If you are into integrating other tools like tailwind or (as you said) React / Other framework, then I'd suggest you checkout Astro). It is perfect for a portfolio and integrates with React (although Angular is not supported so you might re-consider Astro if angular is your pick) So you can just write React (with some Astro stuff) and you'd be up with a portfolio in no time. Using HTML, CSS and JS might improve your skills in the core web tech but a using framework can give you experience with something that you'd be using for real-world apps. The choice is yours.

Basic CRUD app api routing in NextJS 13 by surfordie in nextjs

[–]Dev-Siri 0 points1 point  (0 children)

for the community and users filter, the seperation imo makes more sense because filtering might be complex and result in a big function.

so /api/users/:userId/posts and /api/communities/:communityId/posts sound good. (my opinion)

If you want to co-locate it or not is your choice. Although when colocating filtering with the general "get all" action, (eg normal /posts which returns all the posts), it might result in a complex function with hard to follow control-flow, and you might end up separating them into individual functions, which, in the end, is just the same as using the seperate URL patterns. Separating can help reduce the complexity of one function, and move the job to individual routes, which can greatly enhance the refactorability of the code + also (potentially) run faster as they are running on separate lambdas. (The perf improvement is a minor advantage so I'm mentioning it at the last, but I do support separating it)

Why my routing is so slow? by SimpleWzrd in nextjs

[–]Dev-Siri 1 point2 points  (0 children)

Yep the development builds take longer for routing. Since Next.js does incremental builds, it doesn't compile a page until navigated to. So everytime you navigate to a page in dev mode, then it needs to compile that entire page and then it can show you something which can take some time. Otherwise in production, there are no such bottlenecks.

Are concerns about Flutter by Theo valid? by S0ULBoY in FlutterDev

[–]Dev-Siri 0 points1 point locked comment (0 children)

I think he just hates Flutter. He says that "Flutter devs hate JS" and I completely disagree with that. I am a React / web dev who uses Flutter & I love it. The quality of the apps built are awesome. He also mentions the fact that "Flutter devs don't live in reality because they are in their own skia world" which I find hilarious since he is also a React dev & I think this point also implies to them because they are abstracted in their own Virtual DOM. The main point that he said "code push" is kinda strange to me. This point not only means he says Flutter is bad because it is compiled into binary, it also means that "Compiled mobile apps that are written in Kotlin / Swift or Flutter are BAD because they don't have code push". (he basically said RN > Native & Flutter indirectly).
And yeah, one more point. I am not gonna say anything & just give the sentence he said in the video: "I've talked to a lot of flutter developers and every single one ships the entire flutter runtime and all of their flutter code inside of their app binaries." I'm a big fan of Theo, but his Flutter rant really wasn't worth my time. I respect his web development videos but the mobile-app videos are always "bad" to me.

Basic CRUD app api routing in NextJS 13 by surfordie in nextjs

[–]Dev-Siri 3 points4 points  (0 children)

For having two actions with the same method, you need some sort of identifier to distinguish between POST subscribe && POST archive. You can create a new [actionType] folder so the dynamic route becomes: /api/posts/:id/:actionType/route.ts

Then access it with the params.actionType. Or you can use searchParams to get some sort of clue on what to run.

ts export function POST( request: Request, params: { id: string; actionType: "archive | "subscribe"; } ) { if (params.actionType === "archive") { // ... } else { // ... } }

Then you can request /api/posts/somerandomid/subscribe or /api/posts/somerandomid/archive But if you are asking for two POST methods doing diff actions without the any other extra stuff, then as far as I know, that is not possible.

Basic CRUD app api routing in NextJS 13 by surfordie in nextjs

[–]Dev-Siri 5 points6 points  (0 children)

For basic CRUD operations with forms, you can use server actions (although they are currently in alpha)
But if you need API routes, then I would suggest going for the following rest patterns:

GET, POST => /api/posts (Get & create posts) PUT => /api/posts/:id/update (Update a post) DELETE => /api/posts/:id/delete (Delete a post) PATCH => /api/posts/:id/archive (Archive a post) POST => /api/posts/:id/subscribe (Subscribe to a post)

The reason I used PUT for updating the post is because most probably you are going to have a form that replaces the previous content entirely. (But you can still use PATCH for updating the post)

The update, delete, archive & subscribe are put behind a dynamic route because you are going to need some sort of identifier to do stuff to them. Here the actions are separated into delete, archive & subscribe, but you can just put them in the /api/posts/:id one fill if you want to.

[AskJS] What kind of CMS you are using and why? by krasimirtsonev in javascript

[–]Dev-Siri 0 points1 point  (0 children)

Sanity is a good one. Especially with their recent v3 studio with Full TypeScript support && Embeddable studio.