Oxidizing the Technical Interview

(blog.mgattozzi.dev)

212 points | by fanf2 1425 days ago

20 comments

  • saagarjha 1425 days ago
    I can see the influence of Aphyr's classic posts on this one, but a bit of constructive feedback:

    * If you're going to emulate a writing style, you need to go all in. Study the word selection, cadence, choice of punctuation…go back regularly to ensure you're consistent with it. Once you set up a reader's expectations, anything that doesn't match will stick out and break their immersion. Read it yourself, and then if possible get others to read it too and do the same thing: hopefully they'll see the problems you may have missed.

    * Each of the original blog posts had one specific "technical flex" in mind, and they stayed on topic. The one here is not quite clear: it seems like it's "programming on the bare metal", but it does too many things for a result that isn't all that surprising. Ok, you ditch Rust's standard library, and core features of the language…but then you copy paste it back anyways, and after that you link against libc and call printf. The point is to show that you can do better with all your work, not the same.

    * At the very end: you are an expert Rust developer, better than your interviewer. You know you're not going to get an offer, but you didn't want one from them anyways. You're certainly not desperate to impress them.

    Now that I've read the whole thing, a couple of technical comments:

    * You can use -lc on macOS, libSystem will handle it for you.

    * The existence of a "frame pointer" is a myth spread by bad programmers. There's no point in touching that register and certainly no need to waste two bytes stashing it on the stack, for goodness sake!

    • fasterthanlime 1425 days ago
      It seems you're trying to emulate one of Linus's classic rants with that comment, but if you wouldn't mind a bit of constructive feedback:

      * The word selection in your comment isn't quite right. Linus has been known to use expletives others deem inappropriate when reviewing another human being's work - but since that's what you seem to be going for, you might as well commit to the bit.

      * The big difference between your comment and Linus's rants is that he's doing it when giving feedback that other people actually requested, rather than going off at some random person on the internet.

      * It seems your Linus impression is also a bit out-of-date, as he has publicly apologized for being a jerk in 2018. Maybe you were going for "vintage Linus", but it just didn't cut it for me.

      Although you've nailed the attitude there, I fear the real problem in your comment writing is that it's not backed by a solid knowledge of what you're writing about. For example, it seems you wrote 80% of your comment before reading the entire article? This may be a throwback to other classic comments I'm missing - but if I missed it, then others will too, so it seems the onus is on you there.

      Now that I'm done reading your whole comment, I must say I wasn't very surprised, but also not very impressed. I've read better comments than this one before, and I couldn't really tell what you were trying to achieve with it.

      Next time try adding a table of contents, maybe some primary sources, or consider not attempting that kind of comment at all, if you're not confident you can pull it off? Just my two cents!

      • saagarjha 1425 days ago
        > It seems you're trying to emulate one of Linus's classic rants with that comment

        If I were, I'd probably be courteous enough to link to it as the original author did.

        > Linus has been known to use expletives others deem inappropriate when reviewing another human being's work - but since that's what you seem to be going for, you might as well commit to the bit.

        I don't swear online :)

        > The big difference between your comment and Linus's rants is that he's doing it when giving feedback that other people actually requested, rather than going off at some random person on the internet.

        Sadly, I tend to do this far too often, and my goal is that it is not characterized as "going off at" people. I'm working on it.

        > It seems your Linus impression is also a bit out-of-date, as he has publicly apologized for being a jerk in 2018.

        See above. My audience is much smaller than Linus's, so it's likely that you may not have seen my apology for being a jerk in 2018.

        > Although you've nailed the attitude there, I fear the real problem in your comment writing is that it's not backed by a solid knowledge of what you're writing about.

        Actually, I happen to have already read the linked material, so I think I have a fairly decent background in Aphyr's writing.

        > For example, it seems you wrote 80% of your comment before reading the entire article?

        That is correct. You'll notice that I commented on the article's style early for reasons I explained in the comment itself: I didn't need to finish it to provide that feedback, and the thing I referenced itself gave me reason to pause reading. I withheld technical feedback until I finished.

        > I've read better comments than this one before

        I should hope so!

        > I couldn't really tell what you were trying to achieve with it.

        Provide constructive feedback to the author.

        > consider not attempting that kind of comment at all, if you're not confident you can pull it off

        Thanks, but I personally prefer to not shut down people who are trying to improve their writing.

        • calcifer 1425 days ago
          > I tend to do this far too often, and my goal is that it is not characterized as "going off at" people.

          So your goal is not to change your own behaviour, which by your own admission has been found annoying by others before, but to change people's perception of it.

          > I'm working on it.

          Well if you are, your comments on this thread are certainly no evidence of it.

          • saagarjha 1425 days ago
            > So your goal is not to change your own behaviour, which by your own admission has been found annoying by others before, but to change people's perception of it.

            Currently, yes. The problem that was brought up was that some people viewed this as a rant/criticism, so if I can make it not appear to be that (and thus no longer annoying) I feel like that would address the issue?

            • calcifer 1425 days ago
              > some people viewed this as a rant/criticism

              What makes you so sure that those people are wrong and you are right? There is this saying, I don't remember by who, that goes something like "If someone is an asshole, they're an asshole, if everyone is an asshole, you're the asshole".

              To be clear, I'm not accusing you of anything. I just think maybe some introspection is warranted?

              • saagarjha 1425 days ago
                I'm not saying they're wrong, hence the use of "currently". I'm figuring it out in the other subthread.
      • puzzledobserver 1425 days ago
        I don't follow this criticism. GP came across as respectful but critical. I have read Aphyr's original blogs, and felt similarly when I read this blog. I even felt that the comment was phrased more eloquently than I could have. There is also no swearing or personal attacks, which are typical of a rant.

        Isn't honest, critical, constructive feedback par for the course on HN?

      • ori_b 1425 days ago
        It seems like you're trying to be snarky, but you just come off as both passive aggressive and incorrect.
        • fasterthanlime 1425 days ago
          I'm confused - people usually love it when I give them unsolicited and lengthy reviews of their work, framed in a way they didn't intend it to be, but that lets me roleplay as someone who has authority on the matter and is talking down to them?
          • uryga 1425 days ago
            > framed in a way they didn't intend it to be

            what part of @saagarjha's comment are you referring to here? TFA is clearly meant to be a riff on Aphyr's posts (they're linked on the first line) so i'm guessing you mean something else?

            > give them unsolicited reviews of their work

            i mean, a significant portion of HN comments are "i liked/didn't like the article because XYZ", none of which are "solicited" in any way. what's different about this one?

            as a writer i'd probably prefer sth like @saagarjha's comment to e.g. "i was hoping it'd be more like Aphyr's stuff, didn't really hit the mark for me"

            --- edit ---

            and i don't mean this as a gotcha, but what's different about e.g. [this comment](https://news.ycombinator.com/item?id=22450007) about your own article, saying

            > this guy needs to learn to edit things down

            your response in that thread was very different despite the comment's harsher tone.

          • saagarjha 1425 days ago
            I think the author made it very clear what they were aiming for, so I fail to see the issue in providing multiple, actionable pieces of feedback that I had when reading it on how they could meet their goal better and consider for next time. Unless your specific complaint is that I didn't include anything specifically positive, to which I can only point to the many other comments that said they enjoyed Aphyr's style and were glad that there was more work being done to emulate it which I didn't care to rehash in my response.

            Personally, if someone consumed something I worked on, actively felt that there was something they felt could be improved, and didn't mention it to me, I would have felt as if they had done me a great disservice. I don't have to agree or even take their input into account, but I would very much like it to exist.

            • fasterthanlime 1425 days ago
              > Personally, if someone consumed something I worked on, actively felt that there was something they felt could be improved, and didn't mention it to me, I would have felt as if they had done me a great disservice. I don't have to agree or even take their input into account, but I would very much like it to exist.

              And that's a perfectly fine personal preference - but it's not the default.

              My issue with your comment is not that you didn't include anything positive. It's that you're directly addressing the author, giving them feedback they never asked for! Just like you didn't ask for my parody of your comment.

              HN is not an open issue tracker for "every blog ever". Comments like the top of this thread keep happening, and are part of the reason some people disable comments, or end up blocking some referrers altogether.

              Asking if someone is open to feedback on something before offering criticism is really not that hard, and does wonders for everyone's mental health.

          • 6gvONxR4sf7o 1425 days ago
            Clearly you think it's shitty to do. I agree. Doing it yourself to prove that point isn't helping.
          • ori_b 1425 days ago
            Do you think this is helping your argument, or merely making you look bad? Because to me, it just looks like you're off the mark and digging a deeper hole.
  • umaar 1425 days ago
    I like this style of writing, feels like storytelling, rather than something purely instructional. As someone who doesn't do Rust, the code lost me a little, however it has been one of the most loved technologies on the Stack Overflow Developer Survey [1] and that has me intrigued.

    On the subject of technical interviews, I recently collected, cleaned up and published [2] the code exercises I submitted to Monzo, Geckoboard, SitePen & Masabi (and a Google one which I didn't actually submit).

    All code solutions, except one, let me proceed to the next stage of the application process, and I hope this can help others, or at least offer an interesting insight.

    [1]: https://insights.stackoverflow.com/survey/2020#most-loved-dr...

    [2]: https://umaar.com/blog/my-code-exercise-submissions-part-1/

  • ZeroCool2u 1425 days ago
    I personally enjoy this writing style a great deal. I believe it's likely inspired by the very popular series by Kyle Kingsbury (Aphyr)[1]

    [1]: https://aphyr.com/posts/340-reversing-the-technical-intervie...

    • d3nj4l 1425 days ago
      The best of aphyr's series is Hexing the technical interview (https://aphyr.com/posts/341-hexing-the-technical-interview), which includes one of my favourite lines from any post ever:

      > “Og én,” you recite, sing-song, “Til javanissen!”

      • deathgrips 1425 days ago
        This is the Sistine chapel of shitposts. It's miraculous.
      • johnc1231 1425 days ago
        Can you explain that line? I think I am missing something obvious.
        • saagarjha 1425 days ago
          It's Danish for "One more for the javanissen", which is explained later to be a little gnome that represents an anthropomorphized version of the JVM who needs an extra byte in addition to the buffer allocation lest it creates segfaults.
        • Saser 1425 days ago
          It looks like it supposed to be a Scandinavian language, most likely Norwegian or Danish. It could be interpreted as Swedish as well, in which case the correct corresponding Swedish sentence would be "och en till javanissen". A "nisse" is in Swedish something like a gnome, so "javanissen" would be "the Java gnome". The full translation would then be something like "and one for the Java gnome".

          I'm not sure if there's any deeper meaning to the joke. I didn't think much of it until I read the subsequent paragraph of the text and figured out what was meant by "og én til javanissen".

        • alblue 1424 days ago
          Specifically in this case, he is creating a set of constant pool entries in the class, which are indexed from 1..n rather than 0..n-1, so if you have a constant pool that needs to hold 10 items, you have to declare 11 in the count of the constant pool.

          One possible reason for this is because most of the constant pool entries work by indexing in to itself recursively (so you can do pool[pool[thing].value]) there’s no way of using a null or missing value.

          So when you have java.lang.Object, the super class field contains 0 to indicate that there is no superclass, and if 0 were a valid index into this pool structure then this approach wouldn’t work.

          Of course whatever the reason, we have been stuck with this implementational quirk since the first Java release, and it would be a backwards incompatible change if it were different, just like the fact that double and long occupy two slots on the stack - because that was a quick way of allowing 64 bit values on a 32 bit stack, and even though most JVMs now have a 64 bit stack we still “waste” a slot entry each time.

          So the toast “one more for the Java gnome” is the extra space you have to allocate for the 0th entry of the constant pool in Java class files.

      • mkohlmyr 1425 days ago
        You've made my afternoon with that. Brilliant read.
    • iamrecursion 1425 days ago
      It says this at the top!
      • ZeroCool2u 1425 days ago
        You're right! I didn't realize until you pointed it out.
    • throwaway_pdp09 1425 days ago
      To each their own, but it's offputting for me. I like it short and pointed.
      • kixiQu 1425 days ago
        Luckily, there's a lot of that kind of content out there already.
  • riazrizvi 1425 days ago
    This is how I imagine it feels to code on bootleg Adderall. It gives you the power to deliver a comically useless end product, wrapped in such a fantastically prolific technical show that most people fall for it.
    • mjburgess 1425 days ago
      It reminds me of the interviews I used to do at c. 18 -- at first, the framework must be defined, and then the solution to the problem.

      The framework comes ab initio, because i'd spend my teenage years hysterically refining versions upon versions of them.

      I might well do the same thing now. It's a seductive display of sheer hubris.

    • flmlta 1425 days ago
      >bootleg Adderall

      You mean meth?

      • vertex-four 1425 days ago
        No, amphetamine is significantly different from methamphetamine.
        • riazrizvi 1425 days ago
          Methamphetamine, was developed by the Nazis after seeing how effective the amphetamine Benzedrine was for the American team in the '36 Olympics. Under the name Pervitin, the Nazis used the drug throughout WWII, it enabled them to keep fighting for days on end. Blitzkrieg was partly a byproduct of meth. This is also part of the reason why German troops found it so easy to murder large numbers of unarmed people during Barbarossa in the name of heartless Nazi ideology - meth-heads lack empathy.

          See Killer High by Peter Andreas for more fun military history about drugs.

          • vertex-four 1425 days ago
            I don't know much about that, but I do know that methamphetamine is a significantly more grim drug, being neurotoxic in moderate doses - I've used a few stimulants but I wouldn't touch that.
  • 2OEH8eoCRo0 1424 days ago
    >You look back upon those years fondly as it's turned you into the programmer you are today. An unparalleled Abyss Gazer, an Eldritch One, one who makes mortal men fear and worship the code you've wrought upon this world that holds the very foundations of it together.

    Why do people always talk about coding like this? I don't hear architects or electrical engineers talking like this.

    • karatestomp 1423 days ago
      I think it's the nearness of thought to end product. If architects could actually cause buildings to appear in real life as they drafted, they might do the same thing. That plus the association with math, probably, and everyone who's into that seemingly harboring semi-mystical ideas about it ever since humanity invented abstract mathematics.
      • 2OEH8eoCRo0 1423 days ago
        I was talking about the arrogance of software engineers when they describe what they do. Look at me the smartest smart guy doing things that scare "mere mortals". Give me a break and get over yourself.
        • karatestomp 1423 days ago
          Ah, I misunderstood. Yeah, that's silly and I think it's usually a bit tongue-in-cheek or playful. When it's not it's very, very lame. In the Lisp world I associate it with SICP, which I read as falling in the former category. Lispers (and associates) who write after that style are doing so in imitation of that, I suppose, or of some prior work that it also cribbed from that I'm not aware of.
  • gerbilly 1424 days ago
    Ooh, this article lost me at the first sentence. (young'in, really?)

    Sadly for me, whatever wisdom it may have contained will have to remain a mystery.

    • yellowapple 1422 days ago
      Sure is amazin' that y'all would write off a whole doggone article on one teensy weensy colloquialism of the 'merican workin' class, I reckon.
      • gerbilly 1422 days ago
        I said the article lost me at the first sentence. It doesn't mean I stopped reading there. I still gave it a chance and read the next few paragraphs before finally giving up on it.

        I don't mind colloquialisms where they add to the depth of the content.

        The article in question, however, is written in a circumlocutory style that suggests more effort was put into the style than the substance.

        I admit that it's possible that the signal to noise ratio in the article is better than I assumed, but I don't have to subject myself to tedious writing when there is so much good stuff I could be reading instead.

        • yellowapple 1421 days ago
          It's telling a (what I assume to be) fictional story. It doesn't need to be some dry technical article just because it happens to have some Rust code in it. Like, if that ain't your thing, then so be it, but I think you're assigning values to it that simply don't apply.

          That is: if you were reading a novel or short story, would you have the same complaint?

          • gerbilly 1414 days ago
            Yes I would have the same complaint about the writing style.
            • yellowapple 1410 days ago
              How boring and bland. I mean, whatever floats your boat, but that complaint would apply to a significant majority (if not entirety) of well-renowned English literature. I have enough trouble sitting through a book as-is (I'm a slow reader, since I like to "hear" the narration and dialogue in my head); can't imagine how soul-sucking it'd be to sit through a book that just told everything matter-of-factly with no narration personality whatsoever.

              Like, the style's kinda the whole point. It's a key part of the artistic value of literature, and what makes literature entertaining (or at least moreso than reading a dictionary front to back).

  • pmcollins 1425 days ago
    Is this the same author that wrote this legendary StackOverflow response?

    https://stackoverflow.com/a/1732454

    Same style, methinks.

    • mgattozzi 1425 days ago
      No I'm not, but I did reference it.
  • peter_d_sherman 1424 days ago
    >"You look back upon those years fondly as it's turned you into the programmer you are today. An unparalleled Abyss Gazer, an Eldritch One, one who makes mortal men fear and worship the code you've wrought upon this world that holds the very foundations of it together..."

    That is some great writing; some great prose!

    Perhaps in another life, one where they didn't have computers -- you would have considered becoming a Writer?

    Like if you wrote a SciFi novel... I (and probably a lot of other people!) would read it!

  • boromi 1425 days ago
    I really like the blog style. Any tips on how I could setup something with a smilar theme.
    • saagarjha 1425 days ago
      It's the default Ghost theme, I think.
  • gumby 1425 days ago
    Even back in 90s people circulated jocular constant time factorization programs in C++...nowadays they'd be even easier to write.
  • kkcorps 1425 days ago
    This article just gets better with every line.
  • nice_byte 1425 days ago
    using system printf instead of programming with ioctls? weak.
  • m3kw9 1425 days ago
    Reads like a novel of compilers and optimizations
  • zozbot234 1425 days ago
    This whole blog post should just be added as an appendix to the Rustonomicon, in order to provide official documentation for the RUSTC_BOOTSTRAP=1 flag.
    • pietroalbini 1425 days ago
      That flag shouldn't be documented: it's completly unsupported and meant to be used only by the compiler. Please don't rely on it :)
      • estebank 1425 days ago
        To expand on it, there's no assurances of that flag working, and crates relying on it to work on stable are breaking all compatibility guarantees the language restricts itself to. Updating stable compilers can break your crate, and nightly features in stable and beta do not receive backports and them being broken won't stop a stable release, so it's pretty much like running on nightly unless you know what you're doing and take on the responsibility of maintaining the stability assurances yourself.

        That being said, it can be useful in closed source repos for specific circumstances.

        It would be nice if we changed what the flag is named every stable release as a way to "discourage" its use. I wonder if I should write an RFC.

      • mgattozzi 1425 days ago
        Yeah I included it only as part of a joke and no one should actually use it because it completely subverts stability and if someone put this in a build script to set that env var it would be very very bad
      • yellowapple 1422 days ago
        If it exists, then it should be documented.

        If it shouldn't be documented, then it shouldn't exist.

  • dvtrn 1425 days ago
    if Upton Sinclair was a SWE who also wrote short stories I like to think many of them would read a lot like this.

    Beautiful. Bravo. More please, I enjoyed this too much

    • mgattozzi 1425 days ago
      I'm glad it brought a smile to your Friday :D
  • lucasgonze 1425 days ago
    This article is clearly invalid because attempting to email Z̴̧̡̢̨̛A̷̡̡̢̢̡L̶̢̧̢̪̬Ģ̵̡̢̢̧̛Ơ̵̡̡̬͇̬ ̵̡̧̢̛̳Ċ̷̢̨̢̼̰Ǫ̷̨̧̢̛͎M̵̡̨̖̹̣E̴̢̧̨̨̛S̸̱̠̹̮̣@gmail.com using Gmail produces this error:

    Error The address "Z̴̧̡̢̨̛A̷̡̡̢̢̡L̶̢̧̢̪̬Ģ̵̡̢̢̧̛Ơ̵̡̡̬͇̬ ̵̡̧̢̛̳Ċ̷̢̨̢̼̰Ǫ̷̨̧̢̛͎M̵̡̨̖̹̣E̴̢̧̨̨̛S̸̱̠̹̮̣@gmail.com" in the "To" field was not recognized. Please make sure that all addresses are properly formed.

    • sp332 1425 days ago
      I haven't found a punycode encoder that can gracefully handle an input this long, but it should be possible to make an equivalent gmail address with about 124 ACSII characters.
      • sp332 1425 days ago
        I guess the problem was that the local part has a space. Let's replace it with an underscore and we get:

        zal_mes-55a8ss0clxz2ivbded0gccaaccafieacacagabf9af3jlfjijxcffa5e8eja5kzd9c8fxb5agq5a0d1af8fvcm5pm4a6p@gmail.com

        Which is 111 chars. If it allowed spaces in quotes, which is RFC-compliant:

        "zal mes"-4eb6x27ct1aw3j5bdccd5hecaaccabfkeacacagcabf4bf0llfggil1acffa3fyfja1m8dtd5e4a4c7agfq7a8d7af6g1cm9rm6anr@gmail.com

        122 chars.

  • troughway 1425 days ago
    Alternative title: Rust for C++ Template Lords.
  • steve76 1421 days ago
    Someone with a lot more going on asked you a question, and you took 20 minutes to write "InstallGentoo!" Under that metric, the position went to someone who submitted a fabrication design for a MOSFET. Want different input? Just put in another work order at the plant.

    Sure you're smart. No one wants to work with you, just like mules are the toughest animal but no one wants them around because they foam sweat all over you. I'm just thinking what it would be like working next to someone like this for the next 20 years. Day one, you're already a problem. High nail gets the hammer.

  • draw_down 1425 days ago
    > They're a younger engineer and you are being tested for a Principal Engineering position

    Found your problem!

  • rvz 1425 days ago
    Nice jokes and great hacks aside however, unless you're interviewing for a compiler engineer position, That is absolutely overkill for this type of question to the point of unreadability. One can argue that the 'question' is too generic for this systems/compiler developer position. I would just ask you about basic LLVM internals instead.

    To those 'serious' interviewers with 10x developer syndrome looking at this as an 'optimal solution', just don't tell candidates to do this on a whiteboard in >20 mins. You might as well ask for a candidate to do it in LLVM IR.

    EDIT: Even though the whole post is a great hack and a joke as I already outlined earlier, it still looks like some HNers still can't take/see jokes! %:O)

    • ChristianBundy 1425 days ago
      That's the joke. :~)
      • rvz 1425 days ago
        I think my comment has already acknowledged that.
        • xapata 1425 days ago
          No, despite using the word "joke" it appeared that you'd missed it.
    • ascendantlogic 1425 days ago
      You did the super double meta joke and everyone missed it.
    • empath75 1425 days ago
      I think that’s obvious no? It clearly says at the end that he didn’t get the (imaginary) job.
      • rvz 1425 days ago
        That's why I said it was a nice joke and a good hack in the first place. Unfortunately, there are those few who still 'take it literally'.
        • dvtrn 1425 days ago
          There but for the grace of Linus goes my compiler.
    • flak48 1425 days ago