If I take my car to get an oil change because it’s making a weird noise … A good mechanic will work out that the head gasket is stuffed, and explain that it’s not worth changing the oil. A mediocre mechanic will say “yes sir” and change the oil. The good mechanic takes too long on every job, and is bad for business, he is turning away too many customers The mediocre mechanic is great, he always gets the job done on time. Best of all, the customers keep coming back - every week ! This is what we have allowed “software engineering” to become. It’s just a rapid ticket stamping machine. It’s “Engineering” in name only
Only true if you are the only mechanic in town. As soon as you go to the good mechanic you ditch the mediocre and tell your friends to go to the good mechanic. Software is replaceable by another software from a competitor which offer the same or even better service for a cheaper price.
@@jaypii3222 true. Problem is that none of the big garages want to hire the good mechanic .. so he has to setup his own garage and spend a fortune on marketing, rent, tools, power bills, etc
@@jaypii3222 That's true if you are competing on the quality of the product and not something outside of it. You don't use Netflix, Disney, Prime etc because they have the best software, but because they have the most movies and series
This is my thought. This question is aligned with the realities of what most businesses want - ram new functionality into a code base. Please don't refactor, that will be handled *later*. And I think that's actually the correct business choice so long as there's an actual understanding/tracking how much technical debt is building up and some sort of a plan to address it (either through retiring the code or refactoring) before the project becomes crippled/defined by its technical quirks.
@@GregMcNamer That's the thing, there is never a proper understanding/tracking how much technical debt is building up. The engineers that built it are so fragmented through the Jira tickets assigned to them they hardly understand the true level of tech debt. Every level higher than them just falls off exponentially harder regarding knowledge of the code base.
this does not apply in all cases. First assume the minimum number of characters in a palindrome is two then removing the first and last character makes it no longer a palindrome. If we allow empty string to be palindromic, then simply try removing the first and last character of that and we get an error. 😅
@@omerdvir1709 i read “leave off the first and last characters” as characters of the palindrome as opposed to characters of the selection. Not a very charitable reading on my part. I stand corrected 😂
@@BaptistPiano It's a fair assumption, since the selection itself was a palindrome. -If you use the definition that a "palindrome" is a string that compares equal to its own reverse, then the empty string is also a palindrome! (But now if you allow that the empty string is a palindrome, what happens when you "remove" the first and last characters from the empty string? That opens a whole new can of worms….)- And if I read your whole comment past the fold I would've seen you said that already XD
Ooh, this _is_ a good one. Anyone with literally any level of experience will always be able to go off for 30 minutes on why they hate this specific thing you may have never even heard of. I'm going to start asking that question in normal conversation, it's so good.
@@mage3690 Exactly, as a bonus, you can gouge on what level of deepness someone tends to solve problems by the sort of things and reasoning that someone start describing after this question.
Yeah, that one weeded out a lot of bad devs for me (that also tended to do very badly in coding parts, and in other questions) But what it doesn’t do as much as I want is distinguishing a good from a great dev
memcache-d as in memcache-daemon at least that's how I always heard it pronounced. BTW I haven't gone past 8 minutes in yet, and it took me about 15 minutes to figure out all the changes I'd need to make to add this multiply command. Pretty good stuff though imo. Tests how people browse code bases and how we map the concepts to the reality we want to achieve. Love it. The only way I would use it as an interview question though would be to have them do this live in front of me and ask them to sort of walk me through their thought process. It's all about trying to observe how a person interacts with code and their ability to explain code to another person.
It never ceases to amaze how every sufficiently mid to large C codebase has an implementation of printf somewhere. Either it's done as a macro or implemented as an entire library, directly within the codebase.
software engineer just means a developer with an academic degree in my country.. and I'm not saying that this is a sign of skill. probably an HR invention.
25:37 "I'm not sure this is technical debt?!"... Yes, yes it is. Adding enums that are not used that will have to be removed later is definitely technical debt.
I did it too. It's on the Operating Systems: Three Easy Pieces warm up projects and it's actually really easy, at least it was for me. I did it under 2 hours like Tsoding, but it took some minutes more for me. The only thing that it would be hard for someone is that you have to really know C, but I guess it's fair since you're about to start a book about operating systems.
1:30 Maybe I'm wrong but your keyboard layout wouldn't matter because connecting to remote machines isn't reading your USB serial data it's reading the keycodes after your machine has read whatever keyboard layout you want
"Fast work by copying" without understanding is a real problem, but in my experience, it's what some "Startups" want.They just don't want the technical debt that comes with it. In a small firm, if the interviewer is a tech illiterate morron, working fast is all that counts. So, do you want to take it slow, analytical and clean, or fast and sloppy? Either way you will get yelled at. Either immediately for taking too much time or later for creating a mess down the line.
Depends on the startup and it’s priorities. If it’s a SaaS being a little messy is fine but if it’s a database you have to write perfect code. For example TigerBeatle
If the code/software is the product (data processing, a database system, rendering engine, etc) then fast, sloppy work is terrible. If the product is a service that simply relies on a lot of glue code/services, then whatever move fast and break things.
If you want a good employee then just talk with them, try to recognize their work ethic, enthusiasm, experience, how they solve problems, are they able to clearly verbalise thoughts etc. If you ask garbage task like that then it's a dice roll.
practical exams like this are much better ways to understand how someone does their job than plunking them down in coderpad and asking for some algorithm. another similar thing i've enjoyed as an interview round is to review a mock PR. you can learn a lot about how people interact with their coworkers, as well as how they approach the code from that.
A good part of the interview would be to understand if a candidate can apply the Chesterton's fence principle when needed, or is just indifferent to the state of the code base. For example, if you see something fishy in a legacy code, that nobody has touched in five years, it's good to mimic it and follow the example. If a developer sees something that seems strange is code written the last month, and instead of asking around and trying to fix it he works around, so that he can to close his ticket, then he's just creating more technical debt on top of a probable bug.
Yes, but I also need an engineer that can follow directions and slam something together quickly but reliably. They should then report their opinions on the amount of technical debt once the job is done... It could be that the codebase will be retired in a year and there's absolutely no return on investment to refactor.
As an electrical engineer I think there is a difference between a programmer and a software engineer. And I think Prime had the right idea: The difference is responsibility. And for as long as your programs come with a license that includes some version of the phrase "no warranty" you are not a software engineer, just a programmer. So actually there might be no software engineers on planet Earth ;)
In Canada, CS and Software Engineer are different degrees, but they share a lot of courses. One is run by the engineering department, and the other by CS, so there also some differences in degree requirements as well (engineering curriculum is more fixed with less filler and less options, vs CS you can load heavily with unrelated garbage electives and still get a CS degree) Software Engineers take some courses on systems design, and modeling with UML [ugh], sort of more on the project management side vs CS people take more advanced core CS courses like compiler design, or graphics processing. They both should have strong fundamentals in data structures and algorithms, but in reality most in both aren't very good at either. I did COMPE which is more half EE half CS - I think it's the most useful overall as you get both sides, software and hardware. EE vs COMPE was basically replace power and motors courses with core CS courses instead.
Software engineers do not exist. It is a lie that we tell in this industry that we have software engineers. There's like a half dozen in the entire world that can actually claim the title of software engineer. And in many regions of the world legally they aren't allowed to because engineer is a protected term. Until software engineers carry the same responsibilities as civil engineers electrical engineers and so on it's a nothing Burger typo
At ETH Zurich, due to historical reasons, most Software Engineers do not come from CS but EE department. Early on CS decided that it wants to limit itself to abstract problems, like algorithms and datastructures. So everything with a touch of reality was handled by EE instead. embedded, networking, even machine learning were not part of CS but EE instead. Makes it difficult to explain to international companies that ETH EE is what CS is in other unis.
Actually, after thinking about it for just a few minutes, I immediately had a question: This system has commutativity. mult can be abused by racing both incr and mult operations at the same time and result will differ depending on order of execution - allowing for breaks in commutativity. ...well that sounds incredibly silly and outlandish but users are silly and the question is: what do you do about silly users - let them be silly in ignorance and potential despair, warn/inform them or prevent it altogether? It's usually the first option but I think it's worth considering and I'm honestly surprised this wasn't addressed.
It kinda doesn't already. If two threads both do incr, they get different values back if the order is swapped. We assume the client is okay with this. Bonus interview points for calling it out though!
i think the thing that this question tests more than any other is how candidates are able to work within a codebase that they don't understand. the asyncQueue might be more complex technically, but it is testing a different skill, that is how good are you at writing independent code. I have done some interviews that tested something similiar, like "look at this piece of code, tell me what you think the person that wrote it wanted it to do and tell me what it actually does, then fix the bug"
In Canada there is a difference between programmer and software engineer. Engineer has passed the entrance exam to be in the engineers union to complete their engineering bachelors degree. Its a legally protected title, not that it actually means all that much when it comes to actual coding but there is a difference... in theory
Titles don't mean anything in our field. Just take a look at the amount of new positions created in the past 10 years that don't really mean anything. As long as you are happy, improving your craft and well paid, you should be fine.
@31:15 that "weird hill" actually exists in bigger companies, where there's a clear delineation between who "programs the functionality" and who "comes up with how the functionality should work, what it will impact (scope), and when it should be done by" that then tells the group of previously-mentioned guys to program the functionality in. ;P In small teams and solo work, you're doing _both_ - making the executive decisions on how the program will flow and what the change will impact, _and_ implementing said change - so I understand why it might feel weird to separate the two jobs. But it does make sense.
Agreed. Current job title: computer programmer. That's it. I encounter a problem, think about a solution in software, implement it using code in a language suitable to the working context. Done (a ton of bugs and improvements, but done)
In my humble opinion horrible way to test someone: 1) The whole solution hinges on guessing (rather randomly) some convenient fact about the code and then just going with it. Could have gone down some rabbit hole just as easily as anywhere else. 2) Software engineering is decidedly not about copy-pasting your way to a solution. If anything, that's the hallmark of a junior dev. 3) This is the kind of question that would yield disproportionate results from people already familiar with the codebase. 4) In the real world you wouldn't give someone 3 hours to fully implement something like that (not even in the same ballpark)... even if he knew the codebase well ... and especially not in some arcane legacy codebase. 5) Database tech is exactly the kind of company where you don't need or want devs to take shortcuts / cut corners. Seems like a take from someone obsessed with speed & makes one wonder if its even real story.
The software "engineer" term is really old, and back during it's origins, it was actually an accurate term. There are references of the term being used by NASA engineers during the Apollo missions (late 60s - early 70s). There are references in magazines like "Computers and Automation" (~1965) where having electrical engineering knowledge was useful, or sometimes actually required. Nowadays, there are still areas where software engineer is an accurate term. And the majority of them are in embedded software development, where electrical engineering and/or even mechanical engineering is needed. However, I do agree that the term got perverted and every Jack and Jill is calling themselves an "engineer" nowadays, even though all most of them do is write code... and they have zero knowledge of CPU architectures, what a datasheet is, how registers work, how to use a soldering iron, or what a PCB schematic or PCB layout is. At least in my opinion, the people that DO know all that, get the right to call themselves engineers.
@24:52; In particular, do you want someone who only knows how to multiply your existing technical debt? Having someone look at that, and instead of Chesterton's Fence'ing it, going "Wait - *why* is it doing this? Maybe I will do it this way this time, but I think we should have a ticket to refactor this stuff to make it more clearer, because it's clear as mud to me."
I feel like I'm a type 1 candidate when it comes to testing but a type 2 candidate when it comes to my actual job. In the real world I just copy paste until we've repeated enough times for an actual refactor but that feels wrong on a test.
not viewed the video yet nor read part 2 of the article. did some very basic implementation in one hour due to my poor skill in C what is nice with C is there are so many footguns that you always discover new ones ; here, it silently cast a union in bool. patch is +33/-16 lines of code, due to replacing a if/else with a switch/case ; lacking tests and docs
I don't know if this exists in North America, but in Europe there are "programmers", that get their title in a trade school, and "software engineers", that get their title in a university. This isn't a minor difference when you consider there are programming and SWE jobs, and as a programmer you can't do the other kind ob jobs unless you have plenty of time of experience, you can prove you can do that kind of job, and the recruiter likes you
Lets check my solution works here without watching the part 2: Enumeration of the program: 1. starts from cli parser which may have arithmetic func/constructor 2. That Arithmetic func/constructor takes the command(incr/mult) which key name and val to incr/multi/decr by from the key-val. 3. switch case here to again nav to which command here it is mult which takes as mentioned above args 4. the same func will check for the key exists or not and it also maintains atomic hashmap which to track of atomic opr of mult/incr/decr. 5. And set the result in atomic hashmap and responses in cli.
The very first thing I would do is read the incr and decr functions and probably just copy/paste the parts I need and change all the operators to the * operator.
I think there should be accountability, but various levels, depending of the ability to foresee problems and negligence. Writing software and releasing it knowing there are serious bugs is negligent. Writing software without realising a particular path will cause an issue due to how obscure it is, is not.
it's things like this that give me imposter syndrome. my first thought was to solve the problem inside of memcached, instead of modifying the source, by parsing the inputs. because nothing says "i'm a h4x0r" like h4x0ring the tool from within the tool.
If they didn't need statistics for each command I would've just calculated value *= delta; and then use existing setvalue to set the new value in one go atomically instead of spamming addition n times.
"programmer" Someone who should not be allowed to write code for cars, machines, planes, jets, or any other device that could kill someone because the code they copied from stackoverflow had a bug in it.
@11:20 "Copy and paste..." the fuck? The code already has isolated incr/decr into multipurpose functions whose behavior depends on an argument that says whether it's incr or decr. By far the most elegant and easiest way to do this is to just change "bool incr" to "int mode" (or better, make an enum, but I was going for speed so I didn't wanna figure out where to put the definition so that it'd be visible everywhere necessary) and do "0" for "decr", "1" for "incr" and an arbitrary integer of your choice (I did 2) for multiplication. (0 and 1 for decr/incr are required to ensure that you don't accidentally break some existing code you forgot to change. No reason to break backward compatibility if you don't have to.). While I did not study the code base in detail to know with confidence this is the most elegant change, given that my solution required a total of 50 lines added and 25 removed, I'm pretty confident you can't do that much better. (And those line changes included stuff like rewriting what were previously binary if statements into switches instead of just writing another if branch.)
I'm not some lowly, pathetic, disgusting, unskilled, common, shitty, monkey programmer. I am a sophisticated godlike, perfect, chosen, square-jawed, higher level of being software developer!
My professor once told me and teach us. One of the best way to test a candidate is to use. Hotcake and Pancake challenge. The good thing about that challenge is. It is adaptable to what you are looking for in a candidate.
imo Engineering is based on the application of Physics and to be an Engineer your degree needed to require Physics with a lab. I have Mechanical Engineering and Aerospace Engineering. I currently work as a programmer/coder/developer. "oh but Engineers solve problems so do we" yeah so did my drop out Mom, she's a good Mom but she's not an Engineer. I never liked the title, but whatever some people are very passionate about it I guess.
@@ash1794 he specifically mentioned redesigning the app vs copy and pasting code. For a three hour interview I just want them to produce the expected results
Okay, I am paused after revealing the type[0,1,2] description. Really shocked that type2 was the desired outcome for adding mult to memcached scenario. I'd really want to know why mult didn't exist already, before working on it. Hard not to be insulted a little, if all you needed to do was dup some lines and change the operations (even though, the code was a little funky). Why wasn't mult already there? Is there some philosophical reason mult wasn't one of the arithmetic operators? Does it do something heinous to the server, once implemented? Or was it because divide does something heinous and they couldn't implement mult without divide. This is driving me insane. There has to be a reason that the competent team didn't do it right out of the gate. 😬😱 I'd probably have skipped mult and gone for divide to appease that curiosity, unless I really needed the job. No honor in letting curiosity kill me but get a job on the mystery machine.
the practical solution to storing multiplication with memcached is (in python): num = memcached.get("num") memcached.set("num", int(num)*3) But that's not the point of the interview.
"Why are you still a software engineer?"
Because I hate myself and I like other people even less.
Because if you want something done right do it yourself
Im not anymore. Cya later cunts.
If I take my car to get an oil change because it’s making a weird noise …
A good mechanic will work out that the head gasket is stuffed, and explain that it’s not worth changing the oil.
A mediocre mechanic will say “yes sir” and change the oil.
The good mechanic takes too long on every job, and is bad for business, he is turning away too many customers
The mediocre mechanic is great, he always gets the job done on time. Best of all, the customers keep coming back - every week !
This is what we have allowed “software engineering” to become. It’s just a rapid ticket stamping machine. It’s “Engineering” in name only
Only true if you are the only mechanic in town. As soon as you go to the good mechanic you ditch the mediocre and tell your friends to go to the good mechanic.
Software is replaceable by another software from a competitor which offer the same or even better service for a cheaper price.
@@jaypii3222 true. Problem is that none of the big garages want to hire the good mechanic .. so he has to setup his own garage and spend a fortune on marketing, rent, tools, power bills, etc
@@jaypii3222 That's true if you are competing on the quality of the product and not something outside of it. You don't use Netflix, Disney, Prime etc because they have the best software, but because they have the most movies and series
This is my thought. This question is aligned with the realities of what most businesses want - ram new functionality into a code base.
Please don't refactor, that will be handled *later*.
And I think that's actually the correct business choice so long as there's an actual understanding/tracking how much technical debt is building up and some sort of a plan to address it (either through retiring the code or refactoring) before the project becomes crippled/defined by its technical quirks.
@@GregMcNamer That's the thing, there is never a proper understanding/tracking how much technical debt is building up.
The engineers that built it are so fragmented through the Jira tickets assigned to them they hardly understand the true level of tech debt. Every level higher than them just falls off exponentially harder regarding knowledge of the code base.
Loves palindromes so much he highlighted the whole thing.
But since it's a palindrome, you could leave off the first and last characters, and _still have a palindrome._
this does not apply in all cases. First assume the minimum number of characters in a palindrome is two then removing the first and last character makes it no longer a palindrome. If we allow empty string to be palindromic, then simply try removing the first and last character of that and we get an error. 😅
@@BaptistPiano That's irrelevant he always highlights longer than 2.
@@omerdvir1709 i read “leave off the first and last characters” as characters of the palindrome as opposed to characters of the selection. Not a very charitable reading on my part. I stand corrected 😂
@@BaptistPiano It's a fair assumption, since the selection itself was a palindrome. -If you use the definition that a "palindrome" is a string that compares equal to its own reverse, then the empty string is also a palindrome! (But now if you allow that the empty string is a palindrome, what happens when you "remove" the first and last characters from the empty string? That opens a whole new can of worms….)- And if I read your whole comment past the fold I would've seen you said that already XD
Mr Tsoding did this challenge and made it look easy
remember watching this
yea loved that stream
do you have a vod?
@@urisinger3412 ua-cam.com/video/ey68sKSFJAU/v-deo.html
@@urisinger3412 ua-cam.com/video/ey68sKSFJAU/v-deo.html
I still like my "What was something that you hated about any technology?" :)
Vue 2's aggressive reactivity
Fuck I hate vue 2
Ooh, this _is_ a good one. Anyone with literally any level of experience will always be able to go off for 30 minutes on why they hate this specific thing you may have never even heard of. I'm going to start asking that question in normal conversation, it's so good.
@@mage3690 Exactly, as a bonus, you can gouge on what level of deepness someone tends to solve problems by the sort of things and reasoning that someone start describing after this question.
Yeah, that one weeded out a lot of bad devs for me (that also tended to do very badly in coding parts, and in other questions)
But what it doesn’t do as much as I want is distinguishing a good from a great dev
memcache-d as in memcache-daemon
at least that's how I always heard it pronounced. BTW I haven't gone past 8 minutes in yet, and it took me about 15 minutes to figure out all the changes I'd need to make to add this multiply command. Pretty good stuff though imo. Tests how people browse code bases and how we map the concepts to the reality we want to achieve. Love it. The only way I would use it as an interview question though would be to have them do this live in front of me and ask them to sort of walk me through their thought process. It's all about trying to observe how a person interacts with code and their ability to explain code to another person.
It never ceases to amaze how every sufficiently mid to large C codebase has an implementation of printf somewhere. Either it's done as a macro or implemented as an entire library, directly within the codebase.
Chesterton's fence is not "don't care what it's for", it's "don't try to change it unless you know what it's for"
software engineer just means a developer with an academic degree in my country.. and I'm not saying that this is a sign of skill. probably an HR invention.
25:37 "I'm not sure this is technical debt?!"... Yes, yes it is. Adding enums that are not used that will have to be removed later is definitely technical debt.
I did it too. It's on the Operating Systems: Three Easy Pieces warm up projects and it's actually really easy, at least it was for me. I did it under 2 hours like Tsoding, but it took some minutes more for me. The only thing that it would be hard for someone is that you have to really know C, but I guess it's fair since you're about to start a book about operating systems.
1:30 Maybe I'm wrong but your keyboard layout wouldn't matter because connecting to remote machines isn't reading your USB serial data it's reading the keycodes after your machine has read whatever keyboard layout you want
Depends on if they meant remote access to the box, or physical access.
"Fast work by copying" without understanding is a real problem, but in my experience, it's what some "Startups" want.They just don't want the technical debt that comes with it.
In a small firm, if the interviewer is a tech illiterate morron, working fast is all that counts.
So, do you want to take it slow, analytical and clean, or fast and sloppy? Either way you will get yelled at.
Either immediately for taking too much time or later for creating a mess down the line.
Depends on the startup and it’s priorities. If it’s a SaaS being a little messy is fine but if it’s a database you have to write perfect code. For example TigerBeatle
If the code/software is the product (data processing, a database system, rendering engine, etc) then fast, sloppy work is terrible. If the product is a service that simply relies on a lot of glue code/services, then whatever move fast and break things.
My thoughts exactly, I wouldn't want to work there then
If you want a good employee then just talk with them, try to recognize their work ethic, enthusiasm, experience, how they solve problems, are they able to clearly verbalise thoughts etc. If you ask garbage task like that then it's a dice roll.
Problem is that people can bullshit their way in, so you need to check somehow
Yeah, I'd solve the problem in an interview but then slack off at work and be argumentative.
practical exams like this are much better ways to understand how someone does their job than plunking them down in coderpad and asking for some algorithm. another similar thing i've enjoyed as an interview round is to review a mock PR. you can learn a lot about how people interact with their coworkers, as well as how they approach the code from that.
I always interviewed others with a discussion about tech and a mock PR. I found it to be the best, and candidates weren't stressed at all either.
A good part of the interview would be to understand if a candidate can apply the Chesterton's fence principle when needed, or is just indifferent to the state of the code base. For example, if you see something fishy in a legacy code, that nobody has touched in five years, it's good to mimic it and follow the example. If a developer sees something that seems strange is code written the last month, and instead of asking around and trying to fix it he works around, so that he can to close his ticket, then he's just creating more technical debt on top of a probable bug.
So you’ve hired a copy paster who doesn’t understand the code. Awesome.
"Cyber janitor" hoodie wen?
"do you want an employee who is smart enough not to re-invent the wheel every single time" - god yes
Yes, but I also need an engineer that can follow directions and slam something together quickly but reliably. They should then report their opinions on the amount of technical debt once the job is done... It could be that the codebase will be retired in a year and there's absolutely no return on investment to refactor.
dumb enough.
As an electrical engineer I think there is a difference between a programmer and a software engineer.
And I think Prime had the right idea: The difference is responsibility.
And for as long as your programs come with a license that includes some version of the phrase "no warranty" you are not a software engineer, just a programmer. So actually there might be no software engineers on planet Earth ;)
In Canada, CS and Software Engineer are different degrees, but they share a lot of courses. One is run by the engineering department, and the other by CS, so there also some differences in degree requirements as well (engineering curriculum is more fixed with less filler and less options, vs CS you can load heavily with unrelated garbage electives and still get a CS degree) Software Engineers take some courses on systems design, and modeling with UML [ugh], sort of more on the project management side vs CS people take more advanced core CS courses like compiler design, or graphics processing. They both should have strong fundamentals in data structures and algorithms, but in reality most in both aren't very good at either. I did COMPE which is more half EE half CS - I think it's the most useful overall as you get both sides, software and hardware. EE vs COMPE was basically replace power and motors courses with core CS courses instead.
Software engineers do not exist. It is a lie that we tell in this industry that we have software engineers. There's like a half dozen in the entire world that can actually claim the title of software engineer. And in many regions of the world legally they aren't allowed to because engineer is a protected term. Until software engineers carry the same responsibilities as civil engineers electrical engineers and so on it's a nothing Burger typo
At ETH Zurich, due to historical reasons, most Software Engineers do not come from CS but EE department. Early on CS decided that it wants to limit itself to abstract problems, like algorithms and datastructures. So everything with a touch of reality was handled by EE instead. embedded, networking, even machine learning were not part of CS but EE instead. Makes it difficult to explain to international companies that ETH EE is what CS is in other unis.
That's just lawyer stuff for open source. When you give it away for free you don't have lawyers and insurance.
Bro the difference is one is an honorific title and the other one is not. I'm gona call myself a programmer no matter how many years i code.
Actually, after thinking about it for just a few minutes, I immediately had a question:
This system has commutativity.
mult can be abused by racing both incr and mult operations at the same time and result will differ depending on order of execution - allowing for breaks in commutativity.
...well that sounds incredibly silly and outlandish but users are silly and the question is: what do you do about silly users - let them be silly in ignorance and potential despair, warn/inform them or prevent it altogether? It's usually the first option but I think it's worth considering and I'm honestly surprised this wasn't addressed.
It kinda doesn't already. If two threads both do incr, they get different values back if the order is swapped. We assume the client is okay with this. Bonus interview points for calling it out though!
"Are you assuming my keyboard layout??" lmao
i think the thing that this question tests more than any other is how candidates are able to work within a codebase that they don't understand. the asyncQueue might be more complex technically, but it is testing a different skill, that is how good are you at writing independent code.
I have done some interviews that tested something similiar, like "look at this piece of code, tell me what you think the person that wrote it wanted it to do and tell me what it actually does, then fix the bug"
In Canada there is a difference between programmer and software engineer. Engineer has passed the entrance exam to be in the engineers union to complete their engineering bachelors degree. Its a legally protected title, not that it actually means all that much when it comes to actual coding but there is a difference... in theory
Titles don't mean anything in our field. Just take a look at the amount of new positions created in the past 10 years that don't really mean anything. As long as you are happy, improving your craft and well paid, you should be fine.
Im a principal prompt engineer. Just got outa the bootcamp, AMA.
Last time I was this early, people were huntin' Mammoths.
Man moth?
"Have you heard about Rust, the language of the gods?" ⚙️
@31:15 that "weird hill" actually exists in bigger companies, where there's a clear delineation between who "programs the functionality" and who "comes up with how the functionality should work, what it will impact (scope), and when it should be done by" that then tells the group of previously-mentioned guys to program the functionality in. ;P In small teams and solo work, you're doing _both_ - making the executive decisions on how the program will flow and what the change will impact, _and_ implementing said change - so I understand why it might feel weird to separate the two jobs. But it does make sense.
the async queue thing is definitely simple. I've just done it on my own for minor things. iterators make it really nice.
Agreed. Current job title: computer programmer. That's it. I encounter a problem, think about a solution in software, implement it using code in a language suitable to the working context. Done (a ton of bugs and improvements, but done)
In my humble opinion horrible way to test someone:
1) The whole solution hinges on guessing (rather randomly) some convenient fact about the code and then just going with it. Could have gone down some rabbit hole just as easily as anywhere else.
2) Software engineering is decidedly not about copy-pasting your way to a solution. If anything, that's the hallmark of a junior dev.
3) This is the kind of question that would yield disproportionate results from people already familiar with the codebase.
4) In the real world you wouldn't give someone 3 hours to fully implement something like that (not even in the same ballpark)... even if he knew the codebase well ... and especially not in some arcane legacy codebase.
5) Database tech is exactly the kind of company where you don't need or want devs to take shortcuts / cut corners.
Seems like a take from someone obsessed with speed & makes one wonder if its even real story.
I don't know why but you're just COOL man
Best question: "would you code " yourself, or do you use a library/find a script on github for it?
for FE, just throw a snippet with an error caused by hoisting and watch the world burn....
The software "engineer" term is really old, and back during it's origins, it was actually an accurate term.
There are references of the term being used by NASA engineers during the Apollo missions (late 60s - early 70s).
There are references in magazines like "Computers and Automation" (~1965) where having electrical engineering knowledge was useful, or sometimes actually required.
Nowadays, there are still areas where software engineer is an accurate term. And the majority of them are in embedded software development, where electrical engineering and/or even mechanical engineering is needed.
However, I do agree that the term got perverted and every Jack and Jill is calling themselves an "engineer" nowadays, even though all most of them do is write code... and they have zero knowledge of CPU architectures, what a datasheet is, how registers work, how to use a soldering iron, or what a PCB schematic or PCB layout is.
At least in my opinion, the people that DO know all that, get the right to call themselves engineers.
prime you gotta do it! i finished it in 53 minutes, it doesnt need to take 3 hours
what an absolutely garbage interview question jesus
Agreed - I'm glad that Prime pointed out the problems with it.
I believe the 0 after the key in the VALUE line is the flags
"read a file in js"
That poor lost chatter... So in over his head he doesn't even know which way is up anymore...
@24:52; In particular, do you want someone who only knows how to multiply your existing technical debt? Having someone look at that, and instead of Chesterton's Fence'ing it, going "Wait - *why* is it doing this? Maybe I will do it this way this time, but I think we should have a ticket to refactor this stuff to make it more clearer, because it's clear as mud to me."
What is your opinion about traditional plumbing and how - do you think - does this question relate to your work?
I feel like I'm a type 1 candidate when it comes to testing but a type 2 candidate when it comes to my actual job. In the real world I just copy paste until we've repeated enough times for an actual refactor but that feels wrong on a test.
not viewed the video yet nor read part 2 of the article.
did some very basic implementation in one hour due to my poor skill in C
what is nice with C is there are so many footguns that you always discover new ones ; here, it silently cast a union in bool.
patch is +33/-16 lines of code, due to replacing a if/else with a switch/case ; lacking tests and docs
I don't know if this exists in North America, but in Europe there are "programmers", that get their title in a trade school, and "software engineers", that get their title in a university. This isn't a minor difference when you consider there are programming and SWE jobs, and as a programmer you can't do the other kind ob jobs unless you have plenty of time of experience, you can prove you can do that kind of job, and the recruiter likes you
Programming should be a trade and not a fancy career, at least not 100% of the time
i did it in about 30 minutes, i might not be cooked(no units tests, but it does work)
Lets check my solution works here without watching the part 2:
Enumeration of the program:
1. starts from cli parser which may have arithmetic func/constructor
2. That Arithmetic func/constructor takes the command(incr/mult) which key name and val to incr/multi/decr by from the key-val.
3. switch case here to again nav to which command here it is mult which takes as mentioned above args
4. the same func will check for the key exists or not and it also maintains atomic hashmap which to track of atomic opr of mult/incr/decr.
5. And set the result in atomic hashmap and responses in cli.
That would be a fun one
The very first thing I would do is read the incr and decr functions and probably just copy/paste the parts I need and change all the operators to the * operator.
Same. I am surprised that type 1 exists!
I think there should be accountability, but various levels, depending of the ability to foresee problems and negligence.
Writing software and releasing it knowing there are serious bugs is negligent.
Writing software without realising a particular path will cause an issue due to how obscure it is, is not.
it's things like this that give me imposter syndrome.
my first thought was to solve the problem inside of memcached, instead of modifying the source, by parsing the inputs.
because nothing says "i'm a h4x0r" like h4x0ring the tool from within the tool.
16:50 this is hilarious haha
just leaving a upvote, already saw that one live
Weird... I swear I've listened to a podcast about this memcached thing before from Prime himself.
If they didn't need statistics for each command I would've just calculated value *= delta; and then use existing setvalue to set the new value in one go atomically instead of spamming addition n times.
A balance at the end. Do get it done, but clean it up.
This is not a code-ocracy. This is a code-tatorship
I remember Tsoding did this blind pretty easily
do we still need the incr command? lets just change it to multiply instead. no added functions, just change the existing to do what we need.
Are you assuming my keyboard layout? 😂
13:21: hash, lock, operation, unlock, return
hash = key, key-value; its paired value is in under operation, wow
"programmer" Someone who should not be allowed to write code for cars, machines, planes, jets, or any other device that could kill someone because the code they copied from stackoverflow had a bug in it.
This image is so IT crowd 😂
Be careful Prime, one guy was making simarions and invented C++...😅
memcached? More like boomer-redis
@11:20 "Copy and paste..." the fuck? The code already has isolated incr/decr into multipurpose functions whose behavior depends on an argument that says whether it's incr or decr. By far the most elegant and easiest way to do this is to just change "bool incr" to "int mode" (or better, make an enum, but I was going for speed so I didn't wanna figure out where to put the definition so that it'd be visible everywhere necessary) and do "0" for "decr", "1" for "incr" and an arbitrary integer of your choice (I did 2) for multiplication. (0 and 1 for decr/incr are required to ensure that you don't accidentally break some existing code you forgot to change. No reason to break backward compatibility if you don't have to.).
While I did not study the code base in detail to know with confidence this is the most elegant change, given that my solution required a total of 50 lines added and 25 removed, I'm pretty confident you can't do that much better. (And those line changes included stuff like rewriting what were previously binary if statements into switches instead of just writing another if branch.)
They other 6 hours are to appease sonarqubes bs errors
holy shit.
Would designing flight control software make you an engineer? A lot of responsibility in that?
I'm also non-binary. I'm actually plain-text.
Certainly this bad joke has occured to someone already.
Using incr and maths
x = get key
Incr key x*(k-1)
Clever but not atomic
Maybe using CAS
I'm not some lowly, pathetic, disgusting, unskilled, common, shitty, monkey programmer. I am a sophisticated godlike, perfect, chosen, square-jawed, higher level of being software developer!
This is exactly why in Ontario (and probably the rest of Canada) you CAN'T call yourself a software engineer, unless you have the ring...
Are you a yacc lex dude...
what if you store END ?
Android Studio requires telnet for debugging.
netcat can do udp
My professor once told me and teach us.
One of the best way to test a candidate is to use.
Hotcake and Pancake challenge.
The good thing about that challenge is.
It is adaptable to what you are looking for in a candidate.
C macros just make sense. rust macros are trash. and thats coming from somebody that likes rust. I don't want to learn yet another language.
imo Engineering is based on the application of Physics and to be an Engineer your degree needed to require Physics with a lab. I have Mechanical Engineering and Aerospace Engineering. I currently work as a programmer/coder/developer. "oh but Engineers solve problems so do we" yeah so did my drop out Mom, she's a good Mom but she's not an Engineer. I never liked the title, but whatever some people are very passionate about it I guess.
Oooh rizz bozz
quantum programmer
I don't want somebody to redesign a system after only looking at it for 3 hours, without any knowledge of other systems.
unfortunately we don't have the budget to do 6 month long interviews
You're not redesigning. You are evaluating the candidate
@@ash1794 he specifically mentioned redesigning the app vs copy and pasting code. For a three hour interview I just want them to produce the expected results
xoxoxo
computer programmer? are you overseeing people who compute within an organization? are you just giving them problems to work on?
software engineer? you drive a steam powered ice cream van?
That part thwoo is racist 😂
Okay, I am paused after revealing the type[0,1,2] description. Really shocked that type2 was the desired outcome for adding mult to memcached scenario. I'd really want to know why mult didn't exist already, before working on it. Hard not to be insulted a little, if all you needed to do was dup some lines and change the operations (even though, the code was a little funky). Why wasn't mult already there? Is there some philosophical reason mult wasn't one of the arithmetic operators? Does it do something heinous to the server, once implemented? Or was it because divide does something heinous and they couldn't implement mult without divide. This is driving me insane. There has to be a reason that the competent team didn't do it right out of the gate. 😬😱 I'd probably have skipped mult and gone for divide to appease that curiosity, unless I really needed the job. No honor in letting curiosity kill me but get a job on the mystery machine.
you’re joking right? they could have just… not had a use for it.
the practical solution to storing multiplication with memcached is (in python):
num = memcached.get("num")
memcached.set("num", int(num)*3)
But that's not the point of the interview.
Embedded firmware and other low-level stuff down near the hardware IS engineering. Calling front-end web developers engineers? Yeah no.
Why not just incr by v*k - v? Am I being stupid?
26:15 this interview question is one line in Elixir 😑
I guess the author of this question is very well speaker at cppcon
RizzBussGyatt
Has anyone tried the OnlyFans keyboard layout yet? It supposed to be hot. SQUERTY