4 ms·
I've been programming for 15 years and had to google what NAND was. Had a sense of XOR
by brailsafe 4y ago
I've been programming for 15 years and had to google what NAND was. Had a sense of XOR
- dpz 4y ago
- anon84873628 4y agoThe truth is that you can be a successful computer software developer and not need to know much at all about how computers work. Or even how things like compilers work. Some of us never even studied in a CS program - gasp!
- SmellTheGlove 4y agoIt’s all layers of abstraction, right? While it’s good to have a basic understanding of how the whole stack works, it’s also a feature and a goal of those building the lower levels to enable others to operate at higher levels independent of that knowledge. Taking this away from software for a second, I know a hell of a lot of people skilled in their professions that have no idea exactly how their cars work but they drive them just fine.
- dpz 4y agoi also never studied CS but find it quite odd they didn't even stumble across them in 15 years
- brailsafe 4y agoI've stumbled across and used them, but it never occurred to me to actually check what NAND stood for.
- deleted 4y ago[deleted]
- groffee 4y agoThat's not something you should be so quick to tell people.
- ch4s3 4y agoOh come on! There are a lot of types of programming and most of them exist pretty far from logic gates. The previous poster probably understands the concepts from their work but doesn’t relate them to logic gates.
- brailsafe 4y agoYa that's basically what I meant. The concepts are arguably unavoidable if you've done enough.
- brailsafe 4y agoHeh, roasted. I know you're being a bit facetious, but it's not like I haven't used them, but in terms of the acronyms and maybe actually using them as bitwise operations, it's something I've rarely needed in JS programming. If you aren't being facetious, then you might need to work on humility
- thendrill 4y agoYou would be surprised how much more relevant info programmers miss... Example, most programmers I know have no idea when a variable gets allocated on the stack and when it's on the heap. Let's not talk about how many dont even know what a (stack overflow)[https://en.m.wikipedia.org/wiki/Stack_buffer_overflow https://en.m.wikipedia.org/wiki/Stack_buffer_overflow] is...
- dhosek 4y agoI remember being shocked to discover that a recent CS grad could not implement a factorial function using recursion. I can understand why you wouldn’t want to do that, but to not be able to do it?
- lumost 4y agoa lot of CS undergrads compress out recursion knowledge. They learn that most recursion is best skipped in favor of iteration/dp, and they learn that they should implement things efficiently. It’s possible the undergrad assumed you were referring to an efficient recursive algorithm or simply forgot most recursion.
- dhosek 4y agoNo, I was quite explicit, and seriously, is it really that hard to write something along the lines of if (i<=1) return i; else return factorial(i-1)*i; It wasn't meant to be a trick or trap, it was the simplest recursive function I could think of and it’s not like I was asking him to implement a stack.
- brailsafe 4y agoHeh, I just did the DS+A section of a Faang interview, and got the time and space complexity of an optimal solution more or less correct, as well as most of a recursive binary search implementation, but not quite there. I stumble with recursion because syntactically it's something you either have to use a lot or deliberately practice to have a keen sense of return values imo. Probably won't get an offer because of that. Do I feel like as a frontend engineer I really need that knowledge? Not really. I could work it out for work purposes if I needed to tho. I'd be practicing it just to pass interviews.
- wongarsu 4y agoTo be fair, AND, OR and NOT are enough to compute any function, and you can make all the other operators out of a combination of those three. For example A XOR B is just (A OR B) AND (NOT (A AND B)). Knowing things beyond AND, OR or NOT is useful, but not strictly necessary. XOR has useful properties though: with random inputs you get TRUE 50% of the time, allowing you to chain it without trending to 0 or 1; also it's the opposite of bitwise equality. The others aren't that interesting if you aren't dealing with hardware, and their function is obvious if you know the naming convention.
- dhosek 4y agoNah, all you need are nand gates. Everything else can be implemented from those.
- dan-robertson 4y agoYeah, similarly in mathematics they often like to build everything up from ‘implies’ where the rule is implies(a,b) = or(not(a), b) = nand(a,nand(b, b)).
- OJFord 4y agoYou only need one of {AND, OR} too. ((a or b) is (not ((not a) and (not b))), and vice versa.)
- deleted 4y ago[deleted]
- bergenty 4y agoAll the Ns are just the opposites.
- _whiteCaps_ 4y agoIf you want to learn more about logic gates, you might like the book "Bebop to the Boolean Boogie". It's aimed at kids but someone with a CS background could fly through it pretty quickly.