• Veraxus@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      7 months ago

      Any sufficiently skilled developer has a bunch of things they hate about the language they use the most, and are happy to tell you about it.

      This is a characteristic I unironically keep an eye out for when hiring.

  • themusicman@lemmy.world
    link
    fedilink
    arrow-up
    70
    ·
    edit-2
    7 months ago

    “Introductions and a bit of smalltalk” - I would shit myself if an interviewer started asking about smalltalk… /s

  • Socsa@sh.itjust.works
    link
    fedilink
    arrow-up
    40
    ·
    7 months ago

    You can tell this is fake because the code interview actually tests basic knowledge instead of giving you 13 minutes to create a templated polymorphic class which accepts arbitrary flatbuffer arguments and implements factory pattern constructors written in Haskell, with the end goal of recursively sorting nanoparticles by bond strength. Intro level position, $8/hr, must supply your own MacBook.

    • uis@lemm.ee
      link
      fedilink
      arrow-up
      6
      arrow-down
      3
      ·
      edit-2
      7 months ago

      Ewwwww, macbook. Oh, wait. It was sarcasm I guess.

  • PolarisFx@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    37
    ·
    edit-2
    7 months ago

    Oh geez, I’m one of those people who can’t code on paper. I was applying for something ages ago and I went in for a programming test and they handed me a paper test and my mind completely shut down. Put me in front a computer and I have no issues at all… It was embarrassing.

    • mipadaitu@lemmy.world
      link
      fedilink
      English
      arrow-up
      24
      ·
      7 months ago

      I would just write down the steps I would take, just some psudocode. It doesn’t have to work, it just has to make sense in the style of the language you’re talking about.

      import random library  
      import any GUI/display libraries required for the outcome desired
      
      build array of integers [1..52] (or 0..51 if you're being fancy)
      for loop 1..1000
             select random number A 1..52 (or 0..51 if you used that above)
             select random number B 1..52 (or 0..51 if you used that above)
             swap elements in the array A and B
      pop first two elements from array
      decode at display time what the two numbers represent in terms of playing cards
      

      If the test requires more than that, then they’re crazy. The syntax doesn’t matter, just that you can logic yourself through the problem.
      You can use the IDE, google, or whatever to fill in the specifics. If you wanted me to do that in literally any programming language, once the psudocode is done, you just spend an hour or so looking up the details.

      • renzev@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        7 months ago

        If you wanted me to do that in literally any programming language, once the psudocode is done, you just spend an hour or so looking up the details.

        In some cases, you can even use an AI chatbot as a “pseudocode compiler”. Just tell it to translate your pseudocode to an actual language. I’ve done it for shell scripts a couple of times, works surprisingly well. Not that I would do this at a job interview haha.

    • jkrtn@lemmy.ml
      link
      fedilink
      arrow-up
      9
      ·
      7 months ago

      Even the odd numbers stuff? I think interviewers account for nerves and being outside an IDE. You might draw a blank but would you be would be randomly adding things like these did?

      • PolarisFx@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        6
        ·
        7 months ago

        No this was just crazy, I have worked with people like that though where stackoverflow was permanently on a second monitor, and I wondered how they made it through the interview process

    • kuneho@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      7 months ago

      for some reason I still needed to know programming on paper so much so that at the university, in class prgramming we had to do the exam on paper. every time. no matter if it was Java or C++…

      I strangely enjoyed it, but it still was kinda weird.

      • uis@lemm.ee
        link
        fedilink
        arrow-up
        4
        ·
        7 months ago

        In university I written on papers programs in pure C. They did compile. They even worked. But they were school olympiad-level, so it doesn’t count I guess.

        Oh, and I was supposed to write in Python.

      • PolarisFx@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        2
        ·
        7 months ago

        I lucked out, my university was digital before that was a thing. So the amount of written exams was minor enough that I pulled through ok

  • WFH@lemm.ee
    link
    fedilink
    English
    arrow-up
    35
    ·
    edit-2
    7 months ago

    And that’s why we’re moving away from coding games where I work. Bad people try to cheat, good people can panic and shit the bed.

    When I do interviews, I’m more interested in the candidate’s relevant experience, what kind of issues they faced, how they were solved, if they think they could have done things differently, and how they think. Code itself is irrelevant unless I can review a sprint’s worth of PRs.

    When I ask more technical questions, I never ask for code but for an explanation on how they would tackle the problem. For example, I often ask about finding a simple solution to get all data relevant to a certain date in two, simple, historized tables. If you know window functions, it’s trivial. If you don’t, your solution will be slow and dirty and painful. But as most devs don’t know about window functions anyway, it lets me see how they approach the issue and if they understand what parts should have a trivial solution to make it simple.

    • Veraxus@lemmy.world
      link
      fedilink
      arrow-up
      15
      ·
      edit-2
      7 months ago

      This is why I prefer live interviews. I tell them they can use whatever tools they want, search for anything they want, there are no restrictions. All I ask is that they share their entire screen (if not in person) and try to “think out loud” as much as possible. I then time-box each step (usually 15m ea in a 1-hour interview).

      I am most interested in HOW they solve the challenges I set out for them. Whether they complete it or not is usually irrelevant.

      Edit: Lately, though - I warn against AI. I don’t ban it, but every person that has tried to use AI in an interview has gone down in flames. AI simply cannot be trusted… and if you haven’t learned that lesson, and you can’t even tell when it’s giving you bad information… yikes.

  • Naich@lemmings.world
    link
    fedilink
    arrow-up
    32
    ·
    7 months ago

    Want to print out all odd numbers from 1 to 100? Easy:

    for(_=[];_<+!![]+""+[]*[]+[]*[];_++)(_%+(!![]+!![])?console.log(_):[]);

    • Naich@lemmings.world
      link
      fedilink
      arrow-up
      13
      ·
      7 months ago

      Actually, I prefer this one: for(_=[];_<+!![]+""+[]*[]+[]*[];_++%+(!![]+!![])?[]:console.log(_));

      • Naich@lemmings.world
        link
        fedilink
        arrow-up
        13
        ·
        7 months ago

        Or this one without the “undefined” when run in a browser console:

        for(_=[];_<+!![]+""+[]*[]+[]*[]-!![]-!![];_++%+(!![]+!![])?[]:console.log(_));_+!![]

  • Tartas1995@discuss.tchncs.de
    link
    fedilink
    arrow-up
    25
    arrow-down
    1
    ·
    7 months ago

    I hope these aren’t real. I, and most people here, could probably write these codes top to bottom on paper without an eraser or strikethrough parts because we have it fully solved before the interviewer finished the sentence.

    • sntx@lemm.ee
      link
      fedilink
      arrow-up
      6
      ·
      7 months ago

      I mean, it’s a hard problem to solve if you never worked with moduli before.

      • themusicman@lemmy.world
        link
        fedilink
        arrow-up
        19
        ·
        7 months ago

        Sure, programming is hard if you’ve never worked with programming language features before… Modulus isn’t some obscure esoteric operator, it’s literally CS 101

        • drphungky@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          7 months ago

          I fell backwards into programming and did it for years before ever needing or encountering a mod operator. It never really came up in statistical programming (SAS) and since I wasn’t a CS major I don’t think I even learned about it until taking online programming classes for fun. But I know I was a pretty damn good SAS programmer. I never had any issues solving any problems in my field programmatically, but I took a few leet code tests and was completely puzzled before taking said CS classes. The algorithms and common problems just never remotely came up. I never found fizzbuzz particularly relevant in statistics and data CRUD.

          Now maybe since SAS is procedural and not OO you’d say it doesn’t have typical “programming language features”, but I could easily see that experience being common in all kinda of business side programming like R, VBA, maybe JavaScript or Python, etc.

          …but anyway obviously I’m not saying its not a good thing for a dev shop to interview on, and if they want someone classically trained then it’s probably a perfect question. My quibble is just that you might need to widen your definition of who programs.

      • hope@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        7 months ago

        Is it? I would expect someone to come up with either toggling a variable back and forth for even/odd, or counting by 2s, heck, treat it as a floating point, divide by two, and search the string representation for a period or something!

        • sntx@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          7 months ago

          I feel like the floating point suggestion would backfire quickly due to imprecisions.

      • jkrtn@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        7 months ago

        Shouldn’t people familiar with integer arithmetic should be able to struggle to something like x == 2 * (x/2) to test if it is odd or even? Or just bitwise x & 1?

      • uis@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        Meanwhile I in school practiced Diffie-Hellman on paper with classmates

    • letsgo@lemm.ee
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      7 months ago

      The previous candidate to me at a job a few years ago left the room in tears after not being able to write Fizzbuzz. On a laptop with Visual Studio installed, on their own in a an empty room with nobody looking over their shoulders. The same company said they’d had so many candidate, including university graduates, who simply couldn’t code, that they were almost giving up on it.

      • gjoel@programming.dev
        link
        fedilink
        arrow-up
        8
        ·
        7 months ago

        Same, fizzbuzz was one of our tests. Nearly everyone messed it up. The telling part was how. We had a guy with 20 years of experience who demanded ample compensation write code that not only didn’t compile, but it made little sense. A lot of people were pretty good bullshitters - then after the test they went “Yeah, well… That went bad huh?”. We had a different, more difficult test that people could choose. We had one guy who did somewhat poorly on that… But asked to take the assignment home for his own sake. He was a very god hire. Not because he worked overtime or anything but because he cared.

      • I Cast Fist@programming.dev
        link
        fedilink
        arrow-up
        4
        ·
        7 months ago

        Suddenly I feel like a fucking accomplished programmer, despite only doing some questionable stuff on Godot lately, but never messing up my loops… Not too badly anymore, anyway.

        A fizzbuzz type of question I know I would mess up on the modulo operator. I know the logic is if the division of the current_number by 3 has a remainder of zero, write fizz, but I always look up the operator

        • letsgo@lemm.ee
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          7 months ago

          Yeah it always feels like “negative logic” to me. If it’s not this and not that then don’t do the other… Does my head in. Next time I’m going to use a lookup table “x…f.bf…fb.f…” then mod15 the index. f=Fizz, b=Buzz, x=both. Nice thing about this is that it’s easier to change with the requirements. Want to shift the second fizz right one? No problem “x…f.b.f.fb.f…”. Good luck doing that with the standard approach. Add Gronk which collides with Fizz, Buzz or both at various times? Also no problem - just extend and modify the LUT accordingly and change the mod.

          I can already hear people asking why x is at the start. Arrays are indexed from 0. FizzBuzz starts at 1. 15 mod 15 is zero. Loop N from 1-100, switch on lookup[N%15], case ‘f’ print Fizz, case ‘g’ print Gronk, case ‘p’ print FizzGronk and so on. The only “nice” original feature you lose is when both %3 and %5 fire at the same time and it prints FizzBuzz without any extra code.

  • VantaBrandon@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    7 months ago

    I once knew a “developer” with 20 years of “experience” who could not write a foreach loop by hand

    Some people are really good at bullshitting their way through life

    • sunbytes@lemmy.world
      link
      fedilink
      arrow-up
      14
      arrow-down
      1
      ·
      7 months ago

      I jump between languages so much I can never remember the structure.

      for item in items? Or item of items or items as item?

      Best to just have the IDE auto complete it.

      • PsychedSy@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        Same here. I’m blue collar so I only do it at work if someone fucks up and gives me access to an interpreter. Or I suck it up and use powershell or excel then drink vodka and cut myself when I get home.

  • Sotuanduso@lemm.ee
    link
    fedilink
    English
    arrow-up
    18
    ·
    7 months ago

    “I am trying to test your programming skills, not your Google-search skills.”

  • Cano@lemm.ee
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    7 months ago

    Still in university, never did an interview. Is that seriously the avarage difficulty of interview questions?

    • themusicman@lemmy.world
      link
      fedilink
      arrow-up
      33
      ·
      7 months ago

      This is on the easier end of the scale to be sure, but as someone who’s interviewed candidates with similar questions, it eliminates a surprising number of people…

      My theory is that modern coding bootcamps stuff their students full of buzzwords instead of letting them learn the basics

        • themusicman@lemmy.world
          link
          fedilink
          arrow-up
          11
          ·
          7 months ago

          Which shouldn’t be surprising. The company I was interviewing at only feed me the top ~1% of CVs to interview… Of course half of them were stuffed with bullshit

          • KevonLooney@lemm.ee
            link
            fedilink
            arrow-up
            18
            ·
            edit-2
            7 months ago

            Yeah, this is the problem. Someone who has legitimately built a basic application or website from scratch may know everything you need, but HR will filter it out.

            They don’t really understand what they are looking for, so someone who says they are an AI Researcher with 8 years of experience in the language “Zendaya” and work experience at five moon rocket startups will be at the top of the pile.

            Companies need to beef up their training programs so they can literally take in whoever and teach them what they need to know. Forget trying to get the top people. Just take the first 20 who can make it through an interview without drooling on the floor. You will probably get at least 9 ok developers and 1 good one.

    • Red@reddthat.comOP
      link
      fedilink
      English
      arrow-up
      17
      ·
      7 months ago

      When I interview people, I don’t care how they get an answer, I want to see that they can get to the answer, ideally the correct one, but it doesn’t matter if it’s wrong. I want them to show me their problem solving skills and that they understand their own solution.

      If you can read existing code and understand complexities you are already better than 80% of these hires.

      • BlackPenguins@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        7 months ago

        This is our approach when we ask what is system, out, and println in System.out.println(). Just talk it out. Look at capitalization.

    • dracs@programming.dev
      link
      fedilink
      English
      arrow-up
      9
      ·
      7 months ago

      You might get something harder after that. But there’s a reason one of the most common code interview questions is FizzBuzz. There’s a shocking number of applicants that can’t do it.

    • BlackPenguins@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      7 months ago

      We eliminate half our candidates when they can’t even answer what is static in Java. Or what is object oriented programming. Ours is less coding tests and more explaining Java concepts.

      • PlexSheep@infosec.pub
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        Just to be sure (I haven’t done a lot of java and don’t exactly like it):

        static in OOP means that we don’t need an Object of a class to call a static Method or access a static value, right?

        • BlackPenguins@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          7 months ago

          Correct. It’s mainly used for quick helper methods where you don’t need an object context like the Math class. It’s also used for class variables like out stream in the System class.

          So. Many. People think it means it’s a constant variable.

          • PlexSheep@infosec.pub
            link
            fedilink
            arrow-up
            2
            ·
            7 months ago

            To be fair, the static keyword is overused in various languages and has various other purposes.

            IIRC: C has both static functions and variables. Static variables keep their value for the next time a function is called, no idea what static meant for function declaration.

            Rust has static variables, which are similar to constants but can be abused as global variables.

            • BlackPenguins@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              7 months ago

              That’s true, but these are also the same people who say they are a 9/10 in Java at career fairs. I’ve been working in Java for 10+ years and I’d still only consider myself an 8/10 maybe.

    • lunarul@lemmy.world
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      7 months ago

      I always feel bad when I try out a new coding problem for interviews because I feel I’m going to offend candidates with such an easy problem (I interview mostly for senior positions). And I’m always shocked by how few are able to solve them. The current problem I use requires splitting a text into words as a first step. I show them the text, it’s the entire text of a book, not just some simple sentence. I don’t think I’ve had a single candidate do that correctly yet (most just split by a single space character even though they’ve seen it’s a whole book with newlines, punctuation, quotes, parentheses, etc).

      • Feathercrown@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        7 months ago

        I am curious how you’d deal with the ambiguity of contractions vs. ending single quotes. I guess that character between letters can be assumed to be part of the word, but not if it’s between a letter and a space, for example. If you ignore contractions, hyphenated words, and accented characters, you could just match on /[a-zA-Z]+/.

        • lunarul@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          7 months ago

          I am curious how you’d deal with the ambiguity of contractions vs. ending single quotes

          That’s the thing, nobody even asks this question.

          you could just match on /[a-zA-Z]+/

          That would already put you in the top 10% of solutions I’ve seen so far on this problem.

          • Feathercrown@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            ·
            7 months ago

            My confidence in my job security and general programming abilities has skyrocketed after visiting this thread

    • Blackmist@feddit.uk
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      7 months ago

      Depends if you’re working for a good company or one trying to hire people in a third world country for a dollar a day.

    • AMDIsOurLord@lemmy.ml
      link
      fedilink
      arrow-up
      9
      ·
      7 months ago

      If your client has an HD picture button (like Boost) you need to click it to actually receive the proper image