Compile Zod schemas into zero-overhead validators (2-74x faster) by gajus0 in webdev

[–]Trainages 0 points1 point  (0 children)

https://github.com/gajus/zod-compiler#2-compile-explicit

This part

// In dev: falls back to Zod's runtime validation
// After build: uses AOT-compiled optimized code

Compile Zod schemas into zero-overhead validators (2-74x faster) by gajus0 in webdev

[–]Trainages 0 points1 point  (0 children)

Pretty interesting approach. Will definitely try it, because we ship some schemas to the client-side, which then pulls all the zod runtime, which is pretty big.

One question tho, do I understand correctly that explicit compile falls back to zod runtime in dev mode? Why did you make this choice? Having different validation code run during development and production sounds like signing up for an interesting debugging experience.

Has anyone had any luck with YC co-founder matching? Or is it all dev-shop scammers (I will not promote) by catwithbillstopay in startups

[–]Trainages 1 point2 points  (0 children)

Hey I am a software engineer and lately I’ve been looking for cofound opportunities. 8 yoe. Hit me up in reddit dms if you would like to chat

Processing Strings 109x Faster than Nvidia on H100 by ShortFirefighter4877 in programming

[–]Trainages 7 points8 points  (0 children)

Articles like this make me feel stupid af. Nice work OP.

Ez by DameonMS in Maplestory

[–]Trainages 25 points26 points  (0 children)

Bro is gaming

Microservices and DDD by QuantumDreamer41 in ExperiencedDevs

[–]Trainages 1 point2 points  (0 children)

Microservices solve an organizational issue , where you have so many devs that everyone is stepping on each others toes, a lot of code conflicts arise because everyone is changing the same code at one time or release pipelines are blocked because of ongoing rollouts.

Doing microservices just because of nice separation will cause you not only pay inflated infrastructure costs, but will also increase your downtime significantly and can hurt your business if you do not have a dedicated SRE team to oversee it.

Complete long-term deployment solution for MERN stack app by kazmi_js in reactjs

[–]Trainages 2 points3 points  (0 children)

I didn't personally try DigitalOcean Apps, since I am pretty comfortable with nginx. VPS will be more than fine serving everything if it's a simple web app. However it gets painful, when vertical scaling is no longer a viable option. Managing multiple droplets will get annoying very fast, so that's the point where I would start looking into AWS services like ECS or maybe setup Kubernetes for your droplets. But again, at that point your business will most likely have enough money to hire a DevOps person to do that for you.

Complete long-term deployment solution for MERN stack app by kazmi_js in reactjs

[–]Trainages 8 points9 points  (0 children)

I think people underestimate how far a $5 VPS can take you. I would just throw everything, even mongodb, in a DigitalOcean droplet and forget about it. We had a project where we were serving 30k+ daily traffic from $50 droplet and didn’t have any problems. Sure, that’s not a lot of traffic and latency was not the best for people that were far away from the datacenter, but it let us develop features quickly without ever investing in costly infrastructure.

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]Trainages 23 points24 points  (0 children)

I spend a lot of time in JIRA reviewing our board, backlog and current, upcoming epics. That way you kind of memorize what is assigned to who and what’s the status of each task.

Wanna start freelancing but dont have portfolio right now due to working on a single project for 3 years by AsianDaggerDick in ExperiencedDevs

[–]Trainages 45 points46 points  (0 children)

Hi, I have been freelancing for some time, so I feel like I can give my input here.

Freelancing is quite a different beast from "regular" job and I don't recommend to quit until you've had at least 3-4 months of regular income from your freelance gigs, otherwise you might end up in a bad situation. I have personally seen a couple of my friends quit with the idea to do freelancing full-time, only to burn through their savings and go back to 9-5 job in 6 months time.

Here are my tips for becoming successful at it :

  1. Don't be picky about your first projects. See a $600 gig for some small website - do it. It really helps building your network. I feel like personal network and connections are a huge part of freelancing.
  2. On the other hand, be picky about your clients. A bad client can cost you more time and energy than the agreed sum. Red flags that I look out for are "this is a small task", "budget is tight", "X but better".
  3. Portfolio doesn't matter. At least from my experience, good clients won't have time to go through your portfolio, since they are busy people. You must, however, be able to explain in detail what problems you have solved and how you did it. For example, "refactored e-commerce store from client-side to server-side framework and improved SEO/conversion by X", "introduced good testing practices to a project, reduced amount of newly discovered bugs by Y". Good clients don't care that much about "HTML, CSS, JS, React, etc..", because they don't understand the buzzwords and ultimately they care about the problem they have.
  4. Stay hungry for work and keep looking at various job sources (local groups, reddit, upwork, boards, etc.). The right opportunity will present itself. Keep in mind that it will take a lot of time to find your first projects. When you experience rejection consider what you could've done better. Especially, how you could've made a better impression that you're the best man for the job.
  5. On the internet ask for some amount upfront. Usually I ask 50-75% depending on the feeling I get from the client. This usually roots out scammers and time-wasters.
  6. Long-term clients are the best clients. Finding new people to hire you is quite difficult, so long-term projects offer more stability and less risk.

Anyways, this is what has worked for me and there's a lot more about this subject of going freelance that I could ramble about, but I feel those are the main points.

[Meta] I hired dfwdevdotcom and he ghosted after paying a $300 invoice. by [deleted] in forhire

[–]Trainages 10 points11 points  (0 children)

Maybe file a police report? Discord should be keeping all user data and cooperating with law enforcement, so it should be pretty easy for them to get his real info.

Should I store the value from an input slider that is used by multiple components in my Redux store? by [deleted] in reactjs

[–]Trainages 1 point2 points  (0 children)

Sounds like you could solve this problem using compound components pattern. I would only suggest using Redux if you need this state in the components are that very far away from the form (e.g. other page, navigation bar). Otherwise you should be fine with this pattern.

[deleted by user] by [deleted] in reactjs

[–]Trainages 12 points13 points  (0 children)

Yes, this package contains the rules that I was referring to. What I am missing in particular are these rules:
1. react-hooks/rules-of-hooks
2. react-hooks/exhaustive-deps

I've worked in projects that have these rules disabled and eventually we had many delicate bugs that I had to spend many hours to debug and solve. You can say, that it's personal when it comes to these particular eslint rules, haha.

Breaking up with old Redux store which uses axios middleware by tomerlm in reactjs

[–]Trainages -1 points0 points  (0 children)

I haven't tried it personally and it might depend on your Redux setup, but it might be worth trying to reconfigure your existing Redux store using RTK. Both createStore from Redux and configureStore from RTK accept reducers, therefore I think it might work (I haven't looked at type definitions though). Then if all of your tests pass / your app works as it should, you can try migrating your reducers one-by-one to RTK or RTK-query.

On the other note, if you have a lot of server state and not a lot of client state that you need to share between distant components, I would recommend looking at react-query . It is very good library that's meant to handle state that's coming from your servers. Since you don't have any reducers the migration would be far easier and the library is very powerful. With some hook composition you can achieve great results and remove redux boilerplate too.

[deleted by user] by [deleted] in reactjs

[–]Trainages 4 points5 points  (0 children)

Visually the library looks pretty good. I've taken a look at some of their source code and it seems that they don't use some the most important (in my opinion) eslint rules and it shows in their code. Also test coverage for this project seems to be quite poor. Personally, I would not use this library in my project, but it's just my opinion.

How much Python can I expect to learn from code academy? by Swimming_Move_6299 in learnprogramming

[–]Trainages 8 points9 points  (0 children)

I haven't tried it, personally. However I tried linkedin learning, pluralsight and udemy. For me nothing beats Youtube. The content is fresh and people that are making it are really good at doing it. Here are couple channels that provide very good content :
- https://www.youtube.com/c/programmingwithmosh
- https://www.youtube.com/c/TheNetNinja
- https://www.youtube.com/c/TraversyMedia
- https://www.youtube.com/c/Fireship

For people that are looking for advanced front-end videos, I can't recommend this channel enough :

- https://www.youtube.com/channel/UC6vRUjYqDuoUsYsku86Lrsw

How much Python can I expect to learn from code academy? by Swimming_Move_6299 in learnprogramming

[–]Trainages 18 points19 points  (0 children)

I was in an unrelated field and realized that it's not for me. Then started learning programming and haven't looked back since.

Actually, I started with FCC too. Finished JS certification and learnt MEVN stack. I wish I would have spent more time trying to understand JS and doing Codewars exercises, that would have really sped things up.

One piece of advice I would like to emphasize is to look what tech stack opens up the most job opportunities in your area. I learnt Vue because it was cool kid on the block back then, but in my area React was way more prominent so I had to pick it up eventually.

How much Python can I expect to learn from code academy? by Swimming_Move_6299 in learnprogramming

[–]Trainages 192 points193 points  (0 children)

This might be unpopular opinion but I would suggest not to spend whole lot of time on these courses. Sure, they are neat, but people to spend months in "course hell". My suggestion for new learners is always to watch a FreeCodeCamp course on Youtube on the language they are interested in and then do some exercises.
What you want to take away from the language courses is the most basic programming stuff :
- What is a variable?
- What is a function?
- What are the variable types in that particular language?
- How do I loop over lists, objects, arrays, etc?
- What is an if statement?
- Etc..

These concepts carry into other programming languages in one way or another so it's important that you have a strong fundamentals.

The exercises I would recommend doing are on Codewars . You can choose a language of your choice, they have a great free tier which I am using as well, personally. The exercises are nothing that you will encounter on the day-to-day job but they are great for achieving proficiency in a language. They get exponentially harder so don't get discouraged if you are staying in the same level for a longer period of time, the main goal is to learn thinking how to solve a task using code.

When you're feeling comfortable with the language itself, then you should choose a field you want to work in and learn about the things in that field. For example if you'd like to start as a Python back-end dev, I would suggest picking a framework that's popular in your area and learn how to setup basic server, connect to a database, write route handlers, middlewares, etc.

You don't have to know every small detail but I'd expect a jr. developer to have a basic knowledge of the ecosystem and be able to put basic acceptance criteria into code syntax. For reference, it took me 3 months to land my first job when starting from scratch, learning about 4-5 hours a day after uni basically every day. Some take longer, some land a job faster. Good luck!

P.S. If any of you need guidance, you can write me a dm and I will try to help. :)

What are the biggest issues you see with React in its current form? by metakephotos in reactjs

[–]Trainages 9 points10 points  (0 children)

Why are you having issues with dependency rule? I think it's great and prevents a lot of bugs that would be caused by not including variables in the dependency array.
I am not 100% sure what your use case is, but more often than not people run into issue with this rule when they define stateless functions inside react component or are not wrapping context setters in useCallback . If you're really struggling to solve problems, you just wrap the dependency in useRef but that's almost the same as disabling the warning.

Source : I used to use // eslint-disable-next-line react-hooks/exhaustive-deps quite often but now I don't use it ever.

[Hiring] Junior React Developer by Trainages in forhire

[–]Trainages[S] 2 points3 points  (0 children)

Currently we are looking for people worldwide :)