I’d love to see another video on this topic where you actually follow TDD to make some super simple app or maybe add a feature to an existing one since like you said writing tests is often easier said than done and I don’t see many videos actually showing the process in action
I think its good to discuss what code should have a test in the first place. For our team we only do test for complex code, if you do TDD, you wouldn't know if the implementation would be complex.
No matter if you like TDD or not but with all the GPT4, Copilot X stuff we will switch over from coding to TDD and in the end we'll only write concepts as detailed as possible and no one needs to code anymore. So imo engineers should switch to TDD because it's step 1 for autonomous coding
Yes I see what you mean, but I do not think we are close yet. Maybe in 5-10 years? Technically you should be able to write tests and AI should generate all the correct logic that meets those test criteria. Maybe using gergkin test language?
In TDD you shouldn't use mocks on stuff you own (your code), only to isolate from stuff you don't own (e.g. response from the server). E.g. in Cypress (or Playwright) you can intercept the request and mock the response you want. That's the only thing you need. The rest of the code should use Sociable Tests / Outside-in approach. Why? Otherwise your test will break every time you refactor your code, which is disastrous for TDD or unit tests.
hey do you have any videos of adding user identitys to the page, like login registration, making different viewpages for admin and a user and just overall security for the page. I find this the hardest part of making a website or im doing it wrong idk
At this point I don’t remember. For role based authorization you’d usually just have a role field set in a global state variable and you hide and show based on that. Your user session should also track the role so your api can throw errors if people try to access unauthorized endpoints
@@WebDevCody thank you ill google about that. Also the issue that i have is that my sql server (i use c# for that project) is local, is there any way to make it remote for free or its just paid service?
@@dzeus2427 you can try to find sql host that provides a free plan like planetscale or supabase, but at some point you have to pay for the hardware running your servers
I really like TDD philosophy but unfortunately I don't think it's adopted by the majority of companies simply because TDD certainly requires time and many companies don't care about unit tests although application without tests tend to have more bugs, they just want to see the product working.
Right, but that’s the risk the company would be willing to take. When users cancels their subscription because of a massive bug or too many bugs, that’s a business choice technical leads will need to answer to. There are a lot of apps that do the exact same thing, and many would rather use something that works every time they load it up. I do it personally when I run into bugs on my iPhone apps, I’ll uninstall the app and find a new one
Every company I’ve ever seen, it can basically be boiled down to being too cheap to adequately test. Which ends up being more expensive and wasteful in the long run
I’d love to see another video on this topic where you actually follow TDD to make some super simple app or maybe add a feature to an existing one since like you said writing tests is often easier said than done and I don’t see many videos actually showing the process in action
He has a whole series doing this from 2 years ago, it was really good
primeagen is coming after you now 😂 😂
😂
really interested on TDD, i hope you'll do more videos about this interesting topic!
I think its good to discuss what code should have a test in the first place. For our team we only do test for complex code, if you do TDD, you wouldn't know if the implementation would be complex.
No matter if you like TDD or not but with all the GPT4, Copilot X stuff we will switch over from coding to TDD and in the end we'll only write concepts as detailed as possible and no one needs to code anymore. So imo engineers should switch to TDD because it's step 1 for autonomous coding
Yes I see what you mean, but I do not think we are close yet. Maybe in 5-10 years? Technically you should be able to write tests and AI should generate all the correct logic that meets those test criteria. Maybe using gergkin test language?
seems to make sense
very interesting thought
In TDD you shouldn't use mocks on stuff you own (your code), only to isolate from stuff you don't own (e.g. response from the server). E.g. in Cypress (or Playwright) you can intercept the request and mock the response you want. That's the only thing you need. The rest of the code should use Sociable Tests / Outside-in approach. Why? Otherwise your test will break every time you refactor your code, which is disastrous for TDD or unit tests.
you are doing good job!!!
Good job babe!!!
hey do you have any videos of adding user identitys to the page, like login registration, making different viewpages for admin and a user and just overall security for the page. I find this the hardest part of making a website or im doing it wrong idk
At this point I don’t remember. For role based authorization you’d usually just have a role field set in a global state variable and you hide and show based on that. Your user session should also track the role so your api can throw errors if people try to access unauthorized endpoints
@@WebDevCody thank you ill google about that. Also the issue that i have is that my sql server (i use c# for that project) is local, is there any way to make it remote for free or its just paid service?
@@dzeus2427 you can try to find sql host that provides a free plan like planetscale or supabase, but at some point you have to pay for the hardware running your servers
Just started using TDD. Do you commit on Red? I only commit on Green now
Doesn’t matter imo. Just as long as it’s green before pushing to trunk
Also first!!!
I really like TDD philosophy but unfortunately I don't think it's adopted by the majority of companies simply because TDD certainly requires time and many companies don't care about unit tests although application without tests tend to have more bugs, they just want to see the product working.
Right, but that’s the risk the company would be willing to take. When users cancels their subscription because of a massive bug or too many bugs, that’s a business choice technical leads will need to answer to. There are a lot of apps that do the exact same thing, and many would rather use something that works every time they load it up. I do it personally when I run into bugs on my iPhone apps, I’ll uninstall the app and find a new one
@@WebDevCody Agreed
Every company I’ve ever seen, it can basically be boiled down to being too cheap to adequately test. Which ends up being more expensive and wasteful in the long run
Rodriguez Karen Moore Linda Rodriguez Scott
Talking 8 minutes about it isn't going to keep a lot of us entertained..