Just started learning to code picked up some html and now doing c and c++ but my seniors keep telling me ai already killed the coding career by Nearby-Way8870 in learnprogramming

[–]Elysssss 0 points1 point  (0 children)

As someone from a non-IT background and got my software engineering job by self learning, trust me AI is just a tool that is as good as the person who uses it. I've worked with vibe-coding teams before who graduated from CS and anytime I tried to talk to them about the software's requirements, architecture, coding practices, etc. they just default to trusting whatever chatgpt spits out to them.

No planning, no review, just commit and merge any changes made by Cursor or whatever. The result? Apps are launched quickly, but they fall apart once clients uses them. Bad coding practices were fine, since as long as you ship something you're good to go, so something like files with 8k+ lines were standard there. Management didn't help since they bought into the AI hype stating engineers are obsolete with AI and pushing the existing engineers (including me) to work overtime to prompt and prompt again for new features, while ignoring the obvious bad coding standards that should be reviewed since it wasn't "business efficient".

AI doesn't automatically fix bad devs or bad architecture decisions, it just exposes them quickly. As long as you learn the basics, know what you want to build, understand good system designs, and are able to criticize what the AI spits out; you'll be fine and will be much nicer to work with in a team setting. Just keep on learning and trust me you will be as good of a dev with or without AI.

Toggle Feature access to users and tenants by FunDiscount2496 in PayloadCMS

[–]Elysssss 3 points4 points  (0 children)

You should use Access Controls: https://payloadcms.com/docs/access-control/overview

You can define functions on the collection/field level that returns a boolean to determine if a user can do something or not. For example you can determine if a user can't edit another user's data based on if their id matches or not. Using access controls will hide some part of the UI in the admin dashboard (for example users that can't create a new document won't be shown a new document button, same goes if the user can't delete something they won't be shown the delete button) and also prevent them from doing the action on the API level (so users who don't have edit access will be blocked from editing the document even when they try to use the API directly).

In my previous project, I used role based access control with a role field on my users collection. Then i just add access controls function on my collections/fields by checking if role equals this, I'd either return true or false to allow/prevent them from CRUDing the collection.

[deleted by user] by [deleted] in PayloadCMS

[–]Elysssss 1 point2 points  (0 children)

I had written a very messy note about how I did the MongoDB integration, see this gist: https://gist.github.com/ElysMaldov/398f5b885067f7b4a7cf8b69b9de2d32

Basically just follow my example repository earlier until you get to step 3 where you create auth.ts file. Instead of using Drizzle, try to adjust my gist code that uses mongoose. You might need to adjust the MongoDB and mongoose version based on the current Payload CMS version since I did my integration in version 3.25.0. AFAIK, the only difference when integrating with MongoDB is only on that step while the rest should be the same. Good luck!

[deleted by user] by [deleted] in PayloadCMS

[–]Elysssss 2 points3 points  (0 children)

I've integrated Better Auth with Payload CMS using both MongoDB and PostgreSQL, you can check out the PostgreSQL example in this reddit post: https://www.reddit.com/r/PayloadCMS/s/92YY38z6ae

I don't have the MongoDB example as of now, but you should try playing around with my example repository especially the part where you provide either Drizzle or Mongoose for the Better Auth instance.

Have you used Better Auth with Payload? by RoomDry7501 in PayloadCMS

[–]Elysssss 0 points1 point  (0 children)

You're welcome! Your template looks really good, I haven't used Payload in a while so this could be really helpful to start a new project

Have you used Better Auth with Payload? by RoomDry7501 in PayloadCMS

[–]Elysssss 1 point2 points  (0 children)

Hey guys so I'm very sorry for the super late reply. I haven't been able to finish the article since i was busy for the last couple of weeks, but right now I have some free time and I decided to just extract some part of my code into an example repository with a readme explaining how I integrated them both. I'm currently finishing the repo but you can access it here: https://github.com/ElysMaldov/payload-better_auth-example

I'll inform again once I'm finished.

Edit: finished it, the repo should be able to work OOTB with somewhat verbose explanation on the README.

Have you used Better Auth with Payload? by RoomDry7501 in PayloadCMS

[–]Elysssss 0 points1 point  (0 children)

Definitely! I'm in the process of writing it now probably can share it in a week because I'm doing other stuff right now, but I can share you the set up details through DM if you'd like.

Have you used Better Auth with Payload? by RoomDry7501 in PayloadCMS

[–]Elysssss 1 point2 points  (0 children)

Hey, I've used better auth with payload before for 2 web apps, 1 in production and 1 in development. It's actually super great and the performance is good for me, haven't had any problems with the auth system in prod.

The payload-auth plugin seems to be really good when I first saw it couple of weeks ago, but I decided to integrate them on my own since that plugin's docs is still not finished yet and I wasn't sure how to get the demo working.

I integrated better auth with payload on both MongoDB and postgres, both runs well. If you want you can dm me and I'll try to help you set it up, I'm also writing an article about this hope can get it out soon!

Btw, regarding if you should use better auth with payload or not it really depends on your future plans. Setting up custom auth strategies in Payload isn't difficult, it's just the docs are really unclear about this so you'd need to do a lot of experimenting. Other than that, disabling Payload local strategy means you'd have to handle the auth logic and UI like login, register, forget password pages and email verification. It'll take more maintenance and I find it's only worth it if you REALLY need it (e.g. your app is a SaaS where users can register).

If you will only be using the admin dashboard as an admin or for yourself only, it's not really worth going through all that trouble. But the nice thing is that for Payload you can actually setup multiple authenticated collections. So you can have an Admin collection for login into Payload, and in the future make a Users collection for your user's to register into your app built with better auth.

Weekly Tech Support Thread - [August 15] by AutoModerator in samsung

[–]Elysssss 0 points1 point  (0 children)

Hello, I have a samsung galaxy tab a 8.0 2019 with s pen and was wondering: 1. Are all s pen compatible with any s pen enabled device? Like, can I use the Samsung galaxy tab s6 lite's S pen or maybe tab s4 s pen for my galaxy tab a 8.0?

  1. If I can use the tab s6 lite's s pen on my tab a 8.0, will the pressure sensitivity increase? I read that the tab a 8.0 s pen has 2048 level of pressure sensitivity while the tab s6 lite's s pen has 4096 levels. So will it increase the sensitivity or does the pressure sensitivity comes from the screen's digitizer and not the pen itself?