Frontend job interview - Senior code test

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

ความคิดเห็น • 41

  • @JackWeller
    @JackWeller 6 ปีที่แล้ว +36

    I feel that the senior tasks are a million times easier than the junior ones honestly

  • @Sarahchamorro
    @Sarahchamorro 5 ปีที่แล้ว +7

    The third senior is pretty amazing, I'll have to rewatch this a couple more of times in order to get all the goodness.

  • @benfitzgerald5379
    @benfitzgerald5379 4 ปีที่แล้ว +9

    I expected a difficult test for a senior interview.

  • @erik9817
    @erik9817 4 ปีที่แล้ว +1

    Hi! Is worth learning Javascript or Typescript for front end? I'm currently learning and making a demo on the .Net Core back end and would like to be able to write full web apps.

  • @pythontutorialsdino4309
    @pythontutorialsdino4309 3 ปีที่แล้ว

    what is that bundle js package? I never learned it

  • @TheOlian04
    @TheOlian04 6 ปีที่แล้ว

    23:00 I world argue that throwing an error in that manner is kinda counterproductive. Since you are throwing a "new Error()" at the bottom of the file, the stack trace will always point to the end of the file. This could easily be solved by creating our error objects where the error occurs, but throw it at the end of the file. This way we keep the intended behavior and we get a relevant stack trace.

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว

      That is a fair point I suppose even though it would break the code below the line where you throw the error.
      Have a great day and thank you so much for watching!

  • @Limpuls
    @Limpuls 4 ปีที่แล้ว

    I really like the idea of using custom data attributes as hooks/selectors for Javascript. I've seen this in bootstrap a lot, but never implemented this in my code unless I needed it for some other reasons, not just readability. Is this a part of official Airbnb javascript style guide? Coz it should be.

    • @FredrikChristenson
      @FredrikChristenson  4 ปีที่แล้ว +1

      There are probably more people than me who figured this out but this is my own concept, it works very well when building e2e tests as well or themed applications.
      Have a great day and thank you so much for watching!

  • @WoWUndad
    @WoWUndad ปีที่แล้ว

    jesus christ software engineering was easy 5 years ago, now this isnt even intern level for the senior

  • @mika2666
    @mika2666 6 ปีที่แล้ว

    7:00 why why why would you do all this javascript when you could just change the css to listen for a class on a container tag and change the container's class?

    • @aurelianspodarec2629
      @aurelianspodarec2629 6 ปีที่แล้ว +1

      ? because he is a low senior? Senior level 3 did it righr ;D

  • @Geomaverick124
    @Geomaverick124 6 ปีที่แล้ว +1

    Do you have a git hub repo of this? It would be awesome to review

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว

      Sure m8, here it is:
      github.com/fChristenson/react-job-interview-questions
      Have a great day and thank you so much for watching!

  • @facundocorradini
    @facundocorradini 6 ปีที่แล้ว +12

    9:20 "ok, yeah"?? Dude is using !important, that should be a major red flag.

    • @aurelianspodarec2629
      @aurelianspodarec2629 6 ปีที่แล้ว +4

      Mmmm. And why is that? Any reasoning behind it? Just because someone wrote 'never use important', it doesn't mean you should never use it. Depends, usually yes, but did you hear what he had to say? Well yeah and no.

    • @facundocorradini
      @facundocorradini 6 ปีที่แล้ว +3

      It's not "just because someone wrote". It's the worst possible solution to specificity wars, and a nightmare to maintain. There are some *very* limited use cases where you could want to !important something, e.g. when you're making weird stuff with sibling selectors *and* different states.
      But in the given case he's just using it to beat the specificity of the previous #sidebar rule. He shouldn't be using ids for styling in the first place, precisely to avoid specificity issues. If he used a class to style that sidebar instead, the cascade would have took care of it without adding to specificity.

    • @aurelianspodarec2629
      @aurelianspodarec2629 6 ปีที่แล้ว

      Yeah, I know. A guy I was correcting the code from had important. Yeah, I know ^^ Ids are never good, can't think of anything good for them.
      If you're using bootstrap, you might need !important. Otherwise there's no way to overwrite the other style, as bootstrap has !important classes for some reason.
      But yes I agree with you, but context matters :D
      I had the same though tbh about it, why are they alll using important, it's not needed in this application, yeah, they are wrong of course, but then again, who knows what they are thinking : p

    • @ohme8863
      @ohme8863 5 ปีที่แล้ว

      @@facundocorradini Well, according to bem, he just had to use both element and modifier like this: .siderbar.siderbar--open {}. This solves problems with specifity

  • @jasonwitt95
    @jasonwitt95 6 ปีที่แล้ว

    I must be a senior. Pretty much everything you liked I already do. I've never tried to get a senior position though.

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว +1

      Hi Jason!
      The way you code is just an indicator of skill, when it comes to being a senior your experience with tricky problems and your ability to make good decisions weigh heavier.
      Common senior level problems range from application architecture to algorithm tests, it depends on the company.
      If you want to try your hand at being a senior build a scalable solution to one of the following:
      * Translations
      * Css framework
      * Component library
      * Themes / branding
      * Project architecture
      Then motivate to me why these are good practices and what other methods you have tried that didn't work out so well and why.
      In frontend these are among the harder things to get right and requires a few years of experience to get right.
      Have a great day and thank you so much for watching!

    • @aurelianspodarec2629
      @aurelianspodarec2629 6 ปีที่แล้ว

      HA! I could do that! I have already thinking about doing some of them etc... I will do this for 100% just to prove it to my self, and perhaps in future you could re-view it :D

  • @xiaodanli406
    @xiaodanli406 5 ปีที่แล้ว

    Looking forword to videos like this for React.

    • @FredrikChristenson
      @FredrikChristenson  5 ปีที่แล้ว

      I think I already have one of those actually, I try to avoid these videos as much as possible however since they draw the wrong people.
      Have a great day and thank you so much for watching!

  • @alexmachin1785
    @alexmachin1785 6 ปีที่แล้ว

    Damn it Fredrik making me evaluate my own after I watched this video lol.
    I'm making a full stack application and on one of the pages I have a form which is only available for medium and small devices. On click of a button the form is shown, however I do this by modifying the visibility.
    I feel this is a hacky solution, I did originally try it via a utility class but couldn't figure out the problem, so I settled for a working and hacky solution rather than spending days trying to fix the issue.
    Is this a good way to handing the form toggling or is there a better way (There is always a better way in web development :) )
    FYI I've only been doing web development for about a year so Im still fairly new to all the best practices.
    Also why did I look at senior code :( I feel my code is awful now damn it

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว +1

      One of these days I will make a video where we will walk through a few of my first projects and I will show you what the code I wrote looked like when I first started m8, everyones code sucks in the beginning and in some cases it sucks even after several years.
      Using the visibility of the form is not a bad approach but most commonly display: none; is used as far as I know.
      Before you use that however consider if you need to provide an accessible experience.
      There are a few ways around this but if you still want to hide the form using a button you should provide a descriptive button text or add a hidden span with a good descriptive text that tells a disabled person that the form will be shown if they click the button.
      Have a great day and thank you so much for watching!

  • @aurelianspodarec2629
    @aurelianspodarec2629 6 ปีที่แล้ว +2

    Good stuff. Could learn off that Senior code :)

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว +1

      It is hard to say what senior code is, good code is good and bad code is bad, what makes something senior is in my experience measured by how elegant and maintainable the solution is.
      Have a great day and thank you so much for watching!

    • @aurelianspodarec2629
      @aurelianspodarec2629 6 ปีที่แล้ว

      Yes. I agree with you 100%. I like the fact you mentioned that it's not just about the code in some video, but about how they get to the solution with experience etc... while I think you can speed experience a lot, I think there are things you need to expereince your self.
      But that's good you talk about it.
      I'm all about maintaining with elegant solution. I'm still relativelly new, so need more time with 'real' programming in JS, but this is great.
      It gives me more confidence tbh, and shows me actually how much I don't know in terms of guarding stuff etc... never knew aout that one.

  • @tjalferes
    @tjalferes 6 ปีที่แล้ว

    Very helpful, thank you.

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว

      No worries m8!
      Have a great day and thank you so much for watching!

  • @bmanq2234
    @bmanq2234 6 ปีที่แล้ว +1

    Great video! God is in the details!

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว

      Glad you liked it m8!
      When you have worked a while in the field you know what the "true issues" of working is and that is when you can find out more about someone through a few well placed questions and a simple test than recruiting companies could ever hope to achieve.
      Have a great day!

  • @rajashekhar433
    @rajashekhar433 6 ปีที่แล้ว

    Thank you for this video....

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว

      No worries m8!
      Have a great day and thank you so much for watching!

  • @justjcs
    @justjcs 6 ปีที่แล้ว +2

    so if he does not use fetch() and flexbox you would dismiss him? bleh this is SO opinionated.

    • @FredrikChristenson
      @FredrikChristenson  6 ปีที่แล้ว

      I am sorry if I made you think such small details passes of fails someone in my eyes, do you honestly believe that I would dismiss someone because they used float instead of flexbox, or a var instead of a const or let?
      The video is just trying to give you a hint to the sort of things that I consider when I look at a code test, usually a test needs to be severally bad for me or any of my coworkers to dismiss it but it does happen.
      Trust me when I say that every interview and every test is unfair and opinionated, this is not the olympics where you are judged by an objective measurement but by subjective flawed people who are hiring someone who reflects their value system.
      Being fair and objective is what we try to be but as there is no objective way to determine someones coding skills we have to do the best with what we have.
      Have a great day and thank you so much for watching!

  • @recognizeHeaven
    @recognizeHeaven 5 ปีที่แล้ว +1

    Поменять цвет кнопки для сеньера
    Лол