Junior Vs Senior Code - How To Write Better Code - Part 2

Поделиться
HTML-код
  • Опубликовано: 3 янв 2025

Комментарии • 199

  • @WebDevSimplified
    @WebDevSimplified  4 года назад +37

    Here is part one in case you missed it. ruclips.net/video/g2nMKzhkvxw/видео.html

    • @yt-sh
      @yt-sh 4 года назад

      was waiting for this, I used part 1 lessons well, kindly make more video like this!

    • @kevmac9967
      @kevmac9967 4 года назад

      Thanking you

    • @agentstona
      @agentstona 4 года назад

      Mate there is no one correct way to write code .. the fact that you think that there is means you are a novice noob your self ......
      Also there is no good way or not so goodway , It's all about OPTIMIZATION MATE , Debugging and Transpiliing your code .
      There is a difference , you wrote the code in this crappy way to just prove a point , but at the end of the day NO ONE and I MEAN noone who codes day in day out writes all the code that way ....CHRIST

    • @SeamusMcMichael
      @SeamusMcMichael 4 года назад +1

      Are you doing any more of these?

  • @bedrockcoder5169
    @bedrockcoder5169 4 года назад +64

    I love these noob vs pro code videos, they're really good, thanks!

  • @abdellatiflabreche9518
    @abdellatiflabreche9518 4 года назад +6

    Please make noob vs pro code a weekly show, your demos are AWESOME

  • @ayushpaharia5452
    @ayushpaharia5452 4 года назад +1

    This is my favourite web dev channel. I don't usually comment but I want to show much I appreciate you content. Thank you.

  • @dominicnzl
    @dominicnzl 4 года назад +56

    how convenient, I just finished watching part 1 when this showed up. Thanks for your videos mister

  • @aerialaspects
    @aerialaspects 4 года назад

    Thank you Kyle. One things i like about your video is that you are very specific about things. I love it. Keep making awesome video.

  • @TheRealBigYang
    @TheRealBigYang 2 года назад

    I've been trying to understand the SOLID principles to make my code better and more readable, and this video really helped with the SRP. Thank you for making these videos!

  • @TheSawAndTheCarnage
    @TheSawAndTheCarnage Год назад

    Thanks

  • @Kawasakifanboy
    @Kawasakifanboy 3 года назад

    This is the best topic you cover in your videos bro. Im a FS javascript dev who makes sure to write the "advanced" but doesn't bother to make it "pro". Nonetheless, It's super helpful and satisfying to watch these videos. Keep up the good work :)

  • @hiteshgupta7591
    @hiteshgupta7591 2 года назад

    Hey Kyle, thanks for your effort please make this kind of video "How To Write Better Code", because this helped me so much. Thanks again

  • @KomentatorBre
    @KomentatorBre 4 года назад +1

    I don't even need to watch the full video to know that it's gonna be a great one. Thanks for the great work!

  • @zm690
    @zm690 4 года назад

    This is so helpful , when the companies give me interview assignments, later they help me to review the code, they always point out my unclean codes. I wish I could knew this vedio earlier ...

  • @Shmeeps_phd
    @Shmeeps_phd 4 года назад +10

    I finished my second week in a coding bootcamp today, currently on JS branching. the fat-function section hit realllllllllllly close to home looking at my project submission for the week. haha

  • @SethWilson
    @SethWilson 4 года назад +11

    Great content! This is really helpful. One suggestion I’d make is that the user validation even in the pro version still requires understanding the implementation details ftrue/false, error array, etc.). To make it cleaner and less dependent on implementation, I would have the user validation throw an error, and then wrap it in a try/catch block. Either that, or I’d rename the function to “isValidUser” so it’s clearer that it’s returning a Boolean.

    • @ShawnRitch
      @ShawnRitch 3 года назад +1

      It works that way in PHP also using PDO.

  • @-Jason-L
    @-Jason-L 3 года назад +1

    I watched this series, thinking I was going to be able pick it totally apart. But I was wrong :) Good job. I'm a director of engineering - want a job? :)
    99% of experienced devs write your "advanced" examples from series 1, and stop there. Without guard clauses. I almost always need to guide them to refactor to the "pro" level code. even devs with 20 years experience (who typically refuse to change).

  • @kauanmocelin
    @kauanmocelin 4 года назад

    Good example of use SRP on fat function refactoring, go ahead and publish more videos about this subject. Very good!

  • @rajendra222php
    @rajendra222php 2 года назад

    we need more videos like this.

  • @abdellatiflabreche9518
    @abdellatiflabreche9518 4 года назад +1

    The bad thing about the pro code is that you open a new interface & close it on every auestion, i suggest using an array of question than return an array of answers in order, to get responses variables names use array destruction.

  • @ruchira.bandara
    @ruchira.bandara 3 года назад

    It would have been really cool if in the noob version you say you are 25, and in the advanced version 26 and the pro version 28 or something because that's how it really happens. Uber cool video, learnt a lot. Thanks.

  • @MarshallSC1
    @MarshallSC1 4 года назад +2

    GOLD! This is pure GOLD!
    Moooore... Moooore, please.

  • @oskar42314
    @oskar42314 4 года назад

    These are really useful. Thanks. Please make more examples of how to improve the quality of one's code.

  • @pahvalrehljkov
    @pahvalrehljkov 4 года назад

    ok, i went from jun vs dev 1 video, to second one, but i needed async video, for that i needed promise video, for that i needed arrow function video... i learned today how to code javascript in half hour... tnx mate!

  • @perkin524
    @perkin524 4 года назад +1

    Intensely interesting. I code mainly in PHP but the principles seem equally applicable to most/all programming languages so I learnt a lot. I am now a subscriber. But how great it would be Kyle if you could do similar videos for PHP, which after all is still very much the main language of the web.

  • @capriccz
    @capriccz 3 года назад

    Keep these kinds of videos coming!

  • @Aaronmoreno
    @Aaronmoreno 4 года назад

    this series is so so so good!

  • @AJax2012
    @AJax2012 4 года назад +10

    I think the keyword missed in the pro version in the async example, even though you explained it very well, is "Separation of Concerns." Each file, function, and if you're an OOP developer, class, has a very limited, preferably single, responsibility and dependency, which makes your code flexible. Your code for the async example is very clean/good btw :)
    I have a single major issue with the save or update user implementation. You should *never* be able to save something to a database without validating it. This means you should not be able to call the saveUser function without having validation checks inside the save function. I'm not saying that validate user is done incorrectly, but no senior server-side dev I know would create an API endpoint that saves data to the database that doesn't have a call to a validation method. Yes, I know the point is that you don't expect a "save" function to return errors, but think about this.. if I were a hacker and I find your function name and parameters in your JS in your client code (which is generally super simple to do using chrome debugging tools), I will just open up Postman and put in whatever I want. You have no checks in place to stop me, so the data will just get entered into your database without validation. If you have retrieve user information without validation that I should be able to access it... well, you could probably guess how much damage I could cause there.
    Consider this instead: Return an object "result" from your saveUser function. Many languages have a very easy way to do this, including JS (I'm a C# developer, which calls it an IActionResult). Call validate user from your save user function. then save your user if valid. If you don't like how it's named, consider renaming it to "registerUser", because I would fully expect error results if I attempt to register a user incorrectly.
    This is fairly common practice. So much so, that the library MediatR in C# has the process of validating upon saving/updating an object built into their pipeline without even having to write "validate object" in the storage method; you create a class that implements a generic Interface to save the data, then create a class that extends another generic interface to validate the data. The pipeline validates the data, then saves the data without calling it based on (I believe) reflection.

  • @scriptydude
    @scriptydude 4 года назад +5

    Great content! This could help enhance developers skills. I'd like to see more stuff like that.

  • @iancuvlad7368
    @iancuvlad7368 4 года назад

    Tried to follow along and do it myself:
    In the first example i have replaced the nesting with a recursive function.
    The program works with 14 lines of code in file total (without blank lines).

  • @alamin_firdows
    @alamin_firdows 4 года назад +1

    Waiting for part 3!

  • @deepakkaithwas8281
    @deepakkaithwas8281 4 года назад +1

    Great information again, loving this series, this is giving me a lot of new ideas. I have been reading book on “Clean code” but the way you demonstrated it, I must say you are genius.

  • @kishoreandra
    @kishoreandra 4 года назад

    Thanks for this part 2 Kyle .....Keep Going Bloke

  • @abhayganti8662
    @abhayganti8662 4 года назад +2

    THis is soooo good Web deb Simplified

  • @soulehshaikh8799
    @soulehshaikh8799 4 года назад

    You can use top level await in Node. Update your node version to latest. Use command "node --harmony-top-level-await filename.js". No need to put await statements inside async functions.

  • @erniejeashvillahermosa5699
    @erniejeashvillahermosa5699 4 года назад +1

    I really like the validation part. Thank you!

  • @DuraanAli
    @DuraanAli 4 года назад

    You guys should really read "Clean Code" book, it covers this and a lot more ways to have professional clean code. Thanks Kyle.

    • @agentstona
      @agentstona 4 года назад

      You should really stop reading a book and actually READ THE RFC Guidelines and API documentation of the CODE in itstelf which has in detail on how to actually properly use the code and all of it is available for FREE .
      You should also make sure you use a Debugger that its self will show you if you are coding properly or not .
      You should also use a Transpiler to compile and optimize your code .
      With that said STOP reading books by idiots who call themselves experts and teach you only one way to CODE .....When in fact the original developers of the coding language have given you a API reference that clearly explains how to use the code and clearly shows that it can be used in NUMEROUS ways and that their is no one good way over the other ...
      ITS ALL ABOUT OPTIMIZATION .....ps stop reading trashy books and start reading the API !!!!!!!

    • @DuraanAli
      @DuraanAli 4 года назад +1

      @@agentstona Your whole comment shows that you didn't read the book, so It's hard to take your advice. How about doing both, reading proven books and reading docs.

    • @agentstona
      @agentstona 4 года назад

      @@DuraanAli the only book any one has to read is the book that is created by the developers of the code and are to be followed as guidelines hence the coding documentation api .docs by the original authors .... anything else thats written by anyone else that did not invent , write or contribute to the code creation is pure opinion aka good as FUD ... because an opinion is an opinion and not a real world guideline . thats the bottom line ..... if the guy didnt create the code he has no right to go around preaching on whats right or wrong about the coding language hes word is simple as fiction and not a real world guidline..

  • @adamthedev
    @adamthedev 4 года назад +1

    Another great video, man! Thanks

  • @no-one6790
    @no-one6790 3 года назад

    Though I code python, ti's helps a lot, because the logic is basically the same. Thank you for this video!

  • @the_bitcoin_guy
    @the_bitcoin_guy 4 года назад

    these kind of videos are so helpful ! Thank you very much.

  • @RyanKHawkins
    @RyanKHawkins 4 года назад

    Awesome. I would love to see more examples.

  • @markadeniran301
    @markadeniran301 4 года назад

    I do enjoy this video series and wish to see more of this kind of stuff. Though I have some comments, I would only speak up on the unnecessary else I see both on this and the previous video. Most time inside a function an else does not always need to follow an if statement. Somehow similar to like guard clauses but not exactly the same a return inside the if statement should be satisfactory enough. It helps reduce nesting in my opinion.

  • @TechDecryptor
    @TechDecryptor Год назад

    need more videos like this

  • @SusonS
    @SusonS 4 года назад

    Great video, used this to prove a point to a fellow developer! :D

  • @andyd5235
    @andyd5235 4 года назад

    The thing is now you need to:
    1. code like a pro,
    2. solve 2 medium-level leetcode questions in 45 min
    3. explain what you think and your solutions as clear as Kyle's video.
    then you have 80% chance to go to the onsite round

  • @leandrolobo
    @leandrolobo 3 года назад

    Really usefull info, I'm a noob, and this helpme a lot

  • @yonatan_song
    @yonatan_song 4 года назад

    Love your video series about this topic. Until now i have never maintain my own code because its hard to read 😂
    Hope to see your next video soon

  • @RegiiPad
    @RegiiPad 2 года назад +2

    Awesome content!! Just a recommendation from a pro: Even if the javascript standard for tab/indentation spaces is 2, I strongly recommend using 4 since indentation is about enhance clarity by introducing a visual break and for the current modern line length which is a lot more than the old times 40/80 bytes, 2 bytes doesn't produce the necessary visual contrast between lines. You might say this is standard, I will say change this idiotic standard. In fact the indentation spaces should be proportional to the line length to be more visually accurate. On youtube videos also, the more tab spaces improves clarity.

  • @engespress
    @engespress 3 года назад

    I prefer callbacks because they require a lesser degree of abstraction to write, and if they work, who cares if it looks messy? They make more intuitive sense to compose. I really don't like Promises as I don't understand it, and async and await is the same, but easier to write. I just copy async and await scripts and use it without understanding it, but if I am writing code de novo that involves multiple functions in a row that depend on each other, and I don't have any templates to work off, I use callbacks. The flow makes more sense to me, and it's straightforward feeding the result of one function as a parameter to another.

  • @christophercheok4814
    @christophercheok4814 4 года назад

    Keep up the good work mate :D ! you help different it out the great point on noob vs pro, thanks

  • @thingsiplay
    @thingsiplay 3 года назад +1

    To make the code even more readable, I would chose naming schemes like "is_valid_username()". This makes it more natural to read and forces the code to be boolean where the answer is yes or no anyway without side effects. And the name of the function reflects that. "validate_user()" to me implies the possibility that something else would be done, including printing error messages. And is something else than the username validated too? If so, then the function name is okay. But if it returns just yes or no, then the "is_" naming structure is more appropiate to me.
    Btw I am between noob and advanced I believe. Maybe.

  • @modo4211
    @modo4211 4 года назад +1

    I love these videos

  • @huyphan377
    @huyphan377 4 года назад +3

    i hope you have many part with this topic

  • @vashupandey2212
    @vashupandey2212 4 года назад +2

    you are greate sir!!!

  • @bartkl
    @bartkl 4 года назад +17

    First of all: nice job! I do have a one remark though. Near the end of the video, in the validateMessages() function, you use reduce() in a way that (although it works) I would think is somewhat inappropriate. You are using side-effects (object mutation, to update the errors object) in the reducer function to ultimately build the errors object, which suggests to me that iteration is more suitable. I would choose reduce() only if you intend to use it purely, i.e. to declare it such that it 'builds out' the desired result recursively, without mutation. When you mutate the result object the way you did, iteration seems more straight-forward to me.
    Feel free to disagree with me of course or point out to me where I might miss some advantage of your using reduce over a loop :).

    • @DieterPrivate
      @DieterPrivate 4 года назад +1

      Using reduce is point free, and thus more fp. Though using forEach like you suggest is eventually the same thing, and I see it preferred by peeps that like imperative code. Also, because immutability is often the best way, that doesn't mean mutation is bad. In this case it's actually good and even preferred for performance reasons. If the one that mutates the object created it, then you will not have the cons off mutation.

    • @bartkl
      @bartkl 4 года назад

      @@DieterPrivate I think we mainly agree. But the core point I was making is that in pure FP you can't even use reduce the way Kyle did here since he uses mutation. So it's a bit more than a difference in taste I'd say. Still a minor point though :).

    • @DieterPrivate
      @DieterPrivate 4 года назад

      @@bartkl following everything by the book is not always good. In this case It would hurt performance while none of the reasons this rule exist are present at this point in code. So in essence, FP doesn't state this.

    • @rafaelpernil
      @rafaelpernil 4 года назад +3

      I agree with you. When I see reduce() used in these kind of situations, makes the code more complex than needed.

    • @jollyjoker6340
      @jollyjoker6340 2 года назад

      @barktl Disagree since using an object or array as the initialValue is very common in javascript reduce(). _But_ since it returns an object for each input it should logically be map() instead. And with validations as an array, it becomes validations.map({property, required, length} => [required && validateRequiredMessage(object[property]), ... .flat().filter(Boolean)

  • @hassaneoutouaya
    @hassaneoutouaya 2 года назад

    THANK YOU SO MUCH!

  • @adrianfletcher8963
    @adrianfletcher8963 4 года назад

    Another reason to do a more intermediate to master video 👍

  • @onefilm2709
    @onefilm2709 4 года назад

    Good lessons, i will like to see "How To Write Better Code" for PHP

  • @truongpm2144
    @truongpm2144 3 года назад

    Thanks you so much, great videos

  • @shutterradio
    @shutterradio 4 года назад

    Thank you for this very useful video!

  • @BelajarPemrogramanPemula
    @BelajarPemrogramanPemula 4 года назад +1

    notif, listening .. start to meet this channel when I look for face recognition

  • @cg8939
    @cg8939 4 года назад

    More of this please

  • @alekdemj
    @alekdemj Год назад

    Kyle, this is very good video! My Kudo to your karma :)

  • @markgyverguardiana8928
    @markgyverguardiana8928 4 года назад

    10:54 , it relates to SOLID principles- S as in Single Responsibility as you said, its doing 3 different things and has unintended side effects

  • @hagergamal2856
    @hagergamal2856 3 года назад

    Amazing video ♥️
    U need to make more of these ♥️♥️

  • @LavotiJoelVinayKumar
    @LavotiJoelVinayKumar 4 года назад

    Hey dude, I want to raise 2 issues.
    1. Use of try-catch block when using async-await is missing
    2. You should also reject the promise upon edge cases like undefined/null/wrong answers

  • @franco-cespi
    @franco-cespi 4 года назад

    Another grate video!

  • @akshay__sood
    @akshay__sood 4 года назад +10

    Can you tell me how much time does it take for you to write pro code when you start coding something?
    I am asking this because I was cleaning up my code today and it took me decent amount of time as I ran into errors too.

  • @vojtechsebo4119
    @vojtechsebo4119 4 года назад +1

    Thx for video 🙏🏼 Please do something similar where you will work with DOM 😉

  • @ItsGosho
    @ItsGosho 4 года назад +19

    Im not sure that a pro developer will create every time a instance of the readline, instend he will use it as singleton

    • @boring-username
      @boring-username 4 года назад +4

      Agree, but I'm not a pro, so I have a probing question. How would you know the singleton is done being used so that you know when to close it?

    • @peterheijstek5288
      @peterheijstek5288 4 года назад +2

      Singleton is probably the most controversial design pattern, therefore many developers tend to avoid it if possible. Especially when performance is not an issue

    • @brandonj5557
      @brandonj5557 4 года назад +2

      @@peterheijstek5288 You are right, I'm an iOS developer and using a singleton in your applications is like a sin to most devs. I don't think singletons are that bad when you need an object that needs to be alive during the whole application, for example a current user session.

    • @peterheijstek5288
      @peterheijstek5288 4 года назад

      @@brandonj5557 Yep, singletons make testing harder to do, because of the dependencies/tight coupling

    • @germangamboa3421
      @germangamboa3421 4 года назад +1

      I would actually create a function that takes in the questions as an async callback so when all the questions are asked the callback returns and my outer function can perform any clean up it needs.

  • @shivetay
    @shivetay 2 года назад

    do you plan maybe explore some advance useReff usage?

  • @swapnilkuwar7040
    @swapnilkuwar7040 4 года назад

    Please create video on functional programming

  • @carlosjuarez8152
    @carlosjuarez8152 4 года назад +2

    Hey... Good video! The pro version looks cool.. noob question here.. In the printErrors () function, u end up with a O(n2) time complexity... I know it is not a big deal here... But thinking on a larger project... Isn't that a bad thing?

  • @pestrinmarco
    @pestrinmarco 4 года назад

    thank you... good video

  • @nmanikiran
    @nmanikiran 4 года назад +9

    Do we need to create *readlineInterface* multiple times (one for each askQuestion)?

    • @kamiladamczyk9369
      @kamiladamczyk9369 4 года назад

      If i understand it good, createInterface gives or "opens" the possibility to print to console and read input, but it needs to be closed eventually. In the noob version, it was opened at the beginning of the code and being closed as the last thing in the function. In advanced part every askQuestion call uses the close function, so every call has to open it before it starts doing its job. That's how I see it

  • @rafaelpernil
    @rafaelpernil 4 года назад

    I don't agree with your implementation of the last example of pro code, I would change the following on validationMessages:
    Use forEach instead of reduce. In this case reduce does not provide an advantage, you are mutating an object.
    Destructure requirements as { required, length }. Simplifies the code
    Give proper names to your functions: There is no verb , so the action is not clear. I would name it: getValidationMessages
    Use spread syntax and optional chaining instead of double-nested ifs:
    errors[property] = [...validateRequiredMessage(object?.[property]), ...validateLengthMessage(object?.[property], length)]. Safer and simpler
    P.S. If this were Typescript, I would have implemented an interface for validations. It would make the code much more readable.

  • @davison0976
    @davison0976 Год назад

    So, to understand a noob code one has to look at a half of a screen. To understand a pro code one has to follow different calls made to different functions segregated in separate files, scrolling a few pages up and down in the process. And that's for a functionality that is unlikely to be extended in the future. I guess the next series of videos can be about when it does and when it does not make sense to over engineer, hahaha.

  • @awekeningbro1207
    @awekeningbro1207 4 года назад +2

    19:46, ok i am a little bit confused here, the if block of `validateRequiredMessage` and `validateLengthMessage` will only run when their conditions returns truthy value, so if the `required` is set to false or if the `length` is set to 0, the validations function won't run anyway...what's that about am i missing something here?

  • @NorteXGame
    @NorteXGame 4 года назад +2

    Great vid, however, I think the 3rd (pro) version of fat functions was a bit of an overkill. You didn't save a ton and if you were sharing the code with someone else, the other developer would be more confused about how everything is happening than in the 2nd (advanced) version. I pretty much lost track when you showed the external file.

    • @Timooooooooooooooo
      @Timooooooooooooooo 4 года назад +2

      If this was the entire application, I would agree with you. However, a real world application will usually have dozens of models with dozens of properties, many of which need validation. In that case, the advanced solution would have loads of code duplication.

    • @NorteXGame
      @NorteXGame 4 года назад

      @@Timooooooooooooooo Fair

  • @Fachuro
    @Fachuro 4 года назад +1

    Wouldn't it be better to do the error handling with a try ... catch? Call youe validate(user) function and instead of returning either 'valid' or and errors array, just await its completion an throw the errors from within the function if validation doesnt pass, that way you can contain your printError logic to the catch statement and you dont have to evaluate as many expressions for code completion if the code passes validation, also then by containing your saveUser function within the same try block you can be certain that code cant be reached if an error is thrown...

  • @apmcd47
    @apmcd47 Год назад

    At approx 6:14 you say that the interface has to be passed to the function askQuestion(). This is not true as the readlineInterface is defined external to both askQuestion() and main(). To make that statement true you could place the definition of readlineInterface in main(), which actually makes sense to do so as that is where you have to close it.

  • @clydegrey5060
    @clydegrey5060 4 года назад +1

    Great video. Quick question: in the advanced version of the save & validate example, you have a return statement in the errors.length > 0 if statement. I presume the return statement is what is preventing the saveUser() from executing, which makes sense, if you have errors you don't want to save the user. The question I have is how is the return statement preventing this as you are not inside a function block?

  • @srinathsathyanath7435
    @srinathsathyanath7435 4 года назад

    Hey, do you use a mechanical keyboard? Sounds nice!

  • @TheKseon
    @TheKseon 4 года назад

    Thanks for great video. I don't think about that nested code like noob version in first example can by clean up using Promises. I try to remember about this concept. But in last example in pro version, I think than code could be improved using open-closed principles in validation for more reusable function than validationMessage.

  • @bubbagee4853
    @bubbagee4853 4 года назад +2

    Nice

  • @rdoetjes
    @rdoetjes 3 года назад

    Just like the previous video response here too, example 1 isn’t pro level!!! It’s flat out bad!
    You would want a dedicated function that has the arguments (or class) past. That way you can use that function also for anything else than keyboard import. As it makes it independent and TESTABLE!
    Aren’t millenials taught this in school anymore? We even were taught assembler and had to meet those standard of reliability and testablity back in 1990 studying electronic engineering!
    As a freelance developer and now more like a designer and liaison, I will perform the code reviews and I have to teach everyone under 40 this! And funny enough the often say: “but this is the only way its used”! I explain that their unit tests are beyond complex! Because they have to check the output in a logfile or a rest message. When if its abstract single functions you just need to test that and the log or rest filling test with only that basic functionality and it’s simpler! And more robust and this is a bank, I bet ya that they wanna log or email or have it formatted differently. MVC, abstraction and single function functions is the core of good development.
    The 2nd example passes my QA standards :)

  • @jimmyj.6792
    @jimmyj.6792 3 года назад +1

    I really love this format video. So interesting Kyle, thanks you so much for this.
    A little improvement for pro version could be to do :
    async function main() {
    Promise.all([
    await askQuestion('What is your name ? '),
    await askQuestion('What is your job ? '),
    await askQuestion('How old are you ? '),
    ])
    .then(([ name, job, age ]) => {
    console.log(`Hello ${name}. You are ${age} year old ${job}.`)
    })
    }
    Interested by your feedback about it 🙏
    Impatient for the next session 😀

    • @rjlacanlaled9419
      @rjlacanlaled9419 2 года назад +2

      i think you totally missed the point of using async, if you're using async await, you shouldn't even be using callback functions like then

  • @erzengaming
    @erzengaming 4 года назад +3

    You forgot Hacker
    var name = prompt("Whats your name");
    var job = prompt("Whats your name");
    var age = prompt("Whats your name");
    console.log("Hello " + name + "You are " + age + "year old" + job);
    lol this is 100% better xd

  • @rajabhishek4973
    @rajabhishek4973 4 года назад +1

    Awosem please part 3

  • @grzegorzzimnoch4463
    @grzegorzzimnoch4463 4 года назад

    great video but same as in part 1 i am confused why dont you use arrow syntax for functions ? asking as a begginer

  • @reactivicky
    @reactivicky 4 года назад

    Video starts at 1:08

  • @mming_my
    @mming_my 4 года назад

    Part 3 - typescript

  • @pavlemarinkovic4937
    @pavlemarinkovic4937 3 года назад

    Not great, not terrible...
    I think improvement would be: if(value != null) would become if(value) or if(!!value)...
    Because:
    1) On first look: Why is he not checking for undefined, but he is because he is using != and not !== aaand
    2) U should always want to use triple equals operator (strict comparison) because it will prevent some sneaky bugs.
    3) It is more elegant
    But u have to be careful if your value is valid when it is 0 or "" because those are falsy values.

  • @Allsjr
    @Allsjr 4 года назад

    Is there a repo that holds this code? Would like to take a closer look.

  • @enricoferaldokalengkongang6905
    @enricoferaldokalengkongang6905 4 года назад

    I know a lot of basic or fundamentals but i didn't know how to implement in making a real world project

  • @vadym7023
    @vadym7023 4 года назад

    LIKE)
    Kyle, how have you changed PS1 (hide home folder, username of PC) from VSCode's terminal?

    • @chrsian
      @chrsian 4 года назад +1

      Just google how to configure PS1, when you see '.bashrc' or 'bash_profile', you're on the right track.

  • @Al_Gonzo
    @Al_Gonzo 4 года назад

    Hey Kyle, will you make a game for your next course?

  • @smsibasish
    @smsibasish 4 года назад

    What's your take on refactoring? Everyone of us at some point in our career must have contributed to a huge codebase by such noob codes. They should have been handled in the review process but say your codebase is suffering from plenty of noob codes here and there and test coverage is not that great. How should we approach refactoring such a codebase since it's not the priority of the management because at the end of the day "it works"?

    • @WebDevSimplified
      @WebDevSimplified  4 года назад +2

      I generally would refactor that code as I needed to make changes to it. I wouldn't go out of my way to refactor it.

  • @reymarkandog1441
    @reymarkandog1441 4 года назад

    You don't use semicolumn anymore?

  • @FunIsGoingOn
    @FunIsGoingOn 4 года назад

    Few seconds in: already gave it a like for the Pink Floyd Shirt (and the other content).

  • @lucianosantillan164
    @lucianosantillan164 4 года назад

    Hi bro! I have a question.I think your method called AskQuestion is doing two thinks: asking, waiting for the response, and returning it.

  • @davidkoleckar4337
    @davidkoleckar4337 2 года назад

    Nice vid :)