4 ms·
The software development final exam: Mathematics
- cperciva 14y agoApologies to people still waiting for me to grade their part 1 and part 2 answers -- it's a slower process than I hoped for; and I have a big stack (1065 pages, in fact) of scholarship applications which I need to review tonight, so I won't get any more marking done until tomorrow.
- _pius 14y agoMeh. These questions are indeed trivial, but obviously biased towards security — your area of expertise. What makes these questions anywhere close to a compelling measure of a developer's mathematical knowledge? Seems pretty presumptuous to me.
- cperciva 14y agoThese questions are indeed trivial Software development doesn't need a huge amount of mathematics -- but some basic calculus, probability, and statistics, are pretty essential. I debated whether to include the cryptography questions in this section, but I wanted to include them somewhere and this was the most natural arrangement. (I started out by writing about 25 questions, then threw 5 of them out to get a more balanced set, then tried to figure out how to organize them.)
- _pius 14y agoI debated whether to include the cryptography questions in this section, but I wanted to include them somewhere and this was the most natural arrangement. Fair enough, but you made some pretty bold statements about what this exam is supposed to measure and I don't think this lives up to it. For instance, I happened to have taken an intro security course taught by Ron Rivest; thus, I know the difference between a MAC and a hash function. But I wouldn't claim that another developer who didn't have exposure to the material was deficient in basic knowledge, anymore than I would make that claim about a security researcher who didn't know the basics of how a support vector machine works. These things are pretty specialized, even if they're not particularly difficult to learn.
- cperciva 14y agoyou made some pretty bold statements about what this exam is supposed to measure and I don't think this lives up to it. I believe I said most developers should be able to answer a majority of the questions -- not necessarily every single one. But I do feel that all developers should have some basic knowledge of security, and the difference between hash and MAC is a pretty important thing to know there... as all the people who have been caught using them wrong can testify to.
- _pius 14y agoBut I do feel that all developers should have some basic knowledge of security, and the difference between hash and MAC is a pretty important thing to know there... as all the people who have been caught using them wrong can testify to. Touché. :)
- Silhouette 14y agoSoftware development doesn't need a huge amount of mathematics -- but some basic calculus, probability, and statistics, are pretty essential. Sorry, but that's just nonsense. The vast majority of professional software developers could go through an entire career quite happily without any of the above, and no-one would suffer for it. Moreover, those who do programming work in mathematical or security-related domains probably need a much deeper understanding than the kinds of basic information you're testing for here.
- tzs 14y agoYou receive a call at 3 AM from someone in the marketing department, asking if there is a problem with the web site because they haven't seen an order in 20 minutes. How do you know if you should get up and investigate or tell them a 20 minute gap at 3 AM is nothing to worry about but call back if it reaches 45 minutes, if you do not know anything about probability and statistics? You are thinking of including 30 days of toll free phone support with your next product, and have calculated that for this to work out financially you will need less than 1% of your customers to call support. How do you figure out from the record of bug discovery and severity in your testing group's bug tracker if your testing program the probability that your product as it stands is good enough to meet that requirement, and how do you determine how confident you should be of that result, if you do not know anything about probability and statistics?
- Silhouette 14y agoYou receive a call at 3 AM from someone in the marketing department, asking if there is a problem with the web site because they haven't seen an order in 20 minutes. If you could plausibly go 20 minutes without receiving an order, this isn't a question about statistics, it's a question about PR. Moreover, the kind of place that doesn't take an order more than every few minutes probably doesn't pay someone to be on call at 3am. And what does the marketing department have to do with this? How is that I am running a web site that is important enough to wake me at 3am because someone isn't sure if there's a problem, yet we don't have any operations people who know the normal working of the system well enough to make the call on when something is broken? Like most contrived examples of how "important" statistics is in software development, IME, yours makes no sense when considered in a realistic context. You are thinking of including 30 days of toll free phone support with your next product, and have calculated that for this to work out financially you will need less than 1% of your customers to call support. Again, in any realistic scenario, that little "to work out financially" probably involves far more complicated considerations than some basic probability distribution, and if this choice is being made by a random programmer based on a simplistic model then you're doing it wrong.
- mstepniowski 14y agoDont't know whether it's good or bad but these questions closely resemble the ones I've been asked during my final exam (Faculty of Mathemathics, Informatics and Mechanics at University of Warsaw). Of course there were a few nontrivial questions too, like the one abou fixed point theorems.
- alexkus 14y agoSent my answers in, reminds me how much I've actively avoided stats (I much prefer pure Maths).
- delinka 14y agoWhat I'm not getting about these is the "don't cheat" bit. First, let's be clear: he's decided the 'rules' for this exam include not researching online or getting other assistance and just answering from memory. "Cheating" is "breaking the rules." I work in the Real World, where I don't write academic data structures every day, so I don't have this stuff memorized (there's a joke in there that start "I've forgotten more than...") I use APIs to get work done. When I need to be more academic, I search online. The only place anyone's ever required to be so 'academic' about algorithms, data structures, math, etc is in academia. Step out into a job and you have an internet of active developers and useful forums are your disposal. Even if a company hired me to write an 'academic' code library, I'd do the research, write the implementation, and (after sufficient testing, profiling, etc) forget about it.
- cperciva 14y agoWhat I'm not getting about these is the "don't cheat" bit If I said "go ahead and use google, wikipedia, textbooks, and talk to your friends", I would have needed to make the questions harder and lengthier to compensate. I thought asking people to spend 15 minutes telling me what they know would be more feasible than asking people to spent 15 hours showing me what they can find out.
- delinka 14y agoI understand. To gather data, you need manageable data. What will this data show you? What are you hoping to learn from this experiment? Perhaps I'm being a little cynical, but it seems to me that this information will tell you little about the craft outside of academia. P.S. I've refrained from answering the exam precisely because I'd have to refresh my memory from online resources.
- scott_s 14y agoWhich is reasonable, since it's your time. But consider that I have three degrees in CS (BS, MS and PhD). I am employed doing CS research, primarily in systems and high performance computing. And for at least one question on each subject, I would not feel comfortable answering unless I referred to some reference. (Yes, even the architecture and systems questions, despite that being my "expertise": I can recall very little about coherence algorithms.) The primary value of a formal education is, I think, not that you know a lot of stuff. Rather, it's knowing what you don't know. Knowing just enough to recognize "Oh, this is related to that other thing, I should go and read about that." I'm constantly doing that, as are the people I work with.
- chuppo 14y agoI do not see how a web developer or DBA will feel better about themselves and more confident in what they do if they knew the answer to these questions. It isnt even related to the work a Java EE architect does.
- cperciva 14y agoSince you say web developer... don't you think it's useful for web developers to have some idea how much traffic is needed for A/B testing to produce meaningful results?
- mattdeboard 14y agoHear hear. I think you've done a good job crafting some questions that debunk this hokum. Also,if you don't think it's applicable to your life, ok. But when you gripe about the questions or take umbrage with the notion that maybe, just maybe, you've forgotten (or never learned) some information that might have some practical application in the real world, you just sound defensive. I mean, in the first thread there was a guy who was proud of not knowing what big O notation was. C'mon.
- pgsandstrom 14y agoOnce you decide to do A/B-testing you only need to know enough about probability to know that it is very hard to guess the amount of traffic needed. That's when you google to remind yourself how to do the actual calculations.
- pja 14y agoKnowing that you don't know how to correctly calculate the traffic required to reach a specific confidence for an A/B test makes you better than all those people who don't even know that they don't know, and just wing it. (edit: remove multiple calculates!)
- kamaal 14y agoI have immense respect for Dr Collin Percival, and his work. But isn't this getting overboard? Seriously, calculus? I understand Collin is a computer scientist who is also programmer by co incidence. But this is almost like 'I know it, so you must too'. Most developers are likely to never ever deal with these things at all. Programming today is so much productivity, discovery and building things. If you face these thing along the way, very well learn them. But to spend the next two years of your life learning calculus which you are likely to never use ever in your career and then only to find you are likely to forget it 2 years down the lane anyway, is a wrong way to be spending your time. As a programmer what excites me most is a new challenge I've never faced before, And the journey of hard work, discovery, failure and success that follow from such a attempt. I don't mind failing while doing something even if I don't know much about it. I'm likely to learn them by discovering and reading new things, than spending straight 1 years learning all from a book without knowing where they will be ever used up. The only thing that excites me besides money is the joy of discovering new things, and realizing that I might have solved a real world problem that might be helping someone. Trivia stuff doesn't excite me anymore, I don't see what and how have I changed things around me by merely just knowing more. Life is really short, I know I have little time to make all the money I want so that I can see the other parts of life. I know coding and math are exciting, but they are among the many things that are exciting in life. Think of it this way, you might have a favorite Ice cream flavor, but unless you taste other flavors how would you ever know if others are better? Or after trying the other flavors you might just discover you have a new favorite flavor!
- irahul 14y ago> But isn't this getting overboard? Naive bayes, with a relevant dataset, does a very fine job of data classification(sentiment analysis, spam detection...). Also, almost everyone who isn't a liberal arts major would have come across Bayes theorem in high school or college. The question about A/B testing is solving simple linear equations. I believe anyone in 10th grade or above should be able to solve it. Hashing and MAC are pretty much application level security - they don't require intrinsic knowledge of how; what and why is something an application developer should know. That leaves us with that harmonic progression thingy and padding. Padding, I think, is to avoid cryptanalysis(extrapolating from what you know is a part of knowing things:)). Overall, I won't say he is going overboard with his questions. If anything, to anyone familiar with the topics, his questions are pretty trivial. The only thing under contention is if the topics he considers relevant are actually relevant.
- jheriko 14y agoI see very few questions relevant to being able to ship software... interesting for precisely that reason though.
- raverbashing 14y agoWell Some think crypto is essential. Some think it's merely a tool and even though having guidance in using these tools is important, no need to go to a lot of details. I could point out a lot of mathematics that are important as well and 99% of devs there are oblivious to it. - Newton-Raphson method - Gaussian elimination - Simplex method - Z transform - Bezier curves - Linear algebra in general - Galois fields
- nitrogen 14y agoI'm surprised by how many comments on cpercival's exam series boil down to "I'll never use this!" Especially since this is Hacker News, almost ground zero for intellectual self improvement. I can't claim to remember (or have even learned, in some cases) much of this stuff, but decisions made without any knowledge of e.g. calculus, probability, etc. will be very sub-optimal.
- jasim 14y agoI'd love to know a few of those decisions that you've to take on a day-to-day basis (even once every month) as a software developer, which needs calculus and probability.
- irahul 14y ago> I'd love to know a few of those decisions that you've to take on a day-to-day basis (even once every month) as a software developer, which needs calculus and probability. Machine learning needs an understanding of basic statistics and probability.
- dccoolgai 14y agoI struggled mightily with calulus reuirements when I was getting my CS. I've never really used "pure" calculus more than a handful of times. I'm still glad I took it, though, because the process of learning how to solve complex probelms has been, I believe, very valuable.
- nitrogen 14y agoSince much of my work involves audio and video, practically everything I do can be thought of in mathematical terms. I'm not explicitly writing a function that says "integrate this" or "differentiate that" (except for the Accumulator and Differentiator plugins in my automation logic system[0]). I do write things, both for fun and profit, that have patterns similar to integration and differentiation. Related to what I said in another comment[1], there's rarely a binary influence from my (admittedly very limited) mathematical and theoretical background, where a decision would go one way with it and another without. Rather, my understanding of calculus and probability shapes the way I think about and approach problems. For example, when I see a problem that looks like one of gathering data and accumulating a result, I can recognize that it looks similar to a numeric integral, and apply what I know about integration to solving the problem. Integrals and derivatives are also constantly in my mind when I think about the physics of the world around me. Probability, especially Bayesian reasoning, also influence the way I perceive and approach problems, both in software and in reality. Consciously thinking about prior expectation combined with prior confidence, even if I'm not thinking in numeric terms, helps me to understand how my mind works, know how to communicate new, unintuitive ideas to others, and form more concrete thoughts about my environment. In summary, a very rudimentary understanding of calculus and probability theory are necessary to understand and reason about (i.e. predict) the physical world. Moreover, I have a general desire to learn all that I can and integrate it into a web of concepts, which I reason about as a combination of directed and undirected graphs, where concepts are vertices, relations between concepts are undirected edges, and influencing concepts and prerequisite knowledge are directed edges. [0] http://www.nitrogenlogic.com/docs/palace/ http://www.nitrogenlogic.com/docs/palace/ [1] https://news.ycombinator.com/item?id=4630006 https://news.ycombinator.com/item?id=4630006
- jaimzob 14y ago:) This is surely just degenerating into parody now. I can't wait for part 4: "Build a Turing Machine from scratch using paper-clips and sticky tape and send it to me for grading. Remember to show your working and no looking it up on Google."
- irahul 14y agoMost of the questions are pretty trivial and relevant(may be not to you but that doesn't make it irrelevant or a parody). http://news.ycombinator.com/item?id=4635946 http://news.ycombinator.com/item?id=4635946
- orangethirty 14y agoIt is irrelevant because the real world is composed of CRUD apps in [Java, C#, PHP], and you don't need to know most of the subjects the OP talks in his "tests." It is a parody, because the OP seems to not have worked a common software position, where most time is spent building new UIs for marketing or management, making complex and awkward joins, and making sure changes don't break the spaghetti. It all sounds like academia talk, which is fine (and valuable), but not a real sign of real world programming. I will say that the tests have been fun to complete, and have helped me fill in the gaps here and there. But as someone who is hiring programmers at this very moment, I would not hire someone with such an approach to programming. This person would (I assume from experience) write complex code all day to show off his/her knowledge of advanced CS topics. Then not document it because the code is just obvious to read. And finally quit after a month because the job is not up to his/her standards or challenging. They would then write a blog post ranting about how programming has turned into a circus or produce a series of "tests" to show off their superior knowledge.
- irahul 14y ago> It is irrelevant because the real world is composed of CRUD apps > but not a real sign of real world programming. http://en.wikipedia.org/wiki/No_true_Scotsman http://en.wikipedia.org/wiki/No_true_Scotsman Real world? As opposed to the OP's world which would be called what? The Matrix? > It is a parody, because the OP seems to not have worked a common software position, And for some reason, only the people who have worked for common software positions can have opinions about software? A good majority is making CRUD apps, yes, but the spam classification for GMail needs to be written, the binary data packing has to be done for Dropbox, Facebook has to detect faces, that small startup doing a storage engine for MySql has to understand B-tree, automated translation has to understand n-gram modelling, tarsnap has to make sure the data is secure, and so on and on. > But as someone who is hiring programmers at this very moment, I would not hire someone with such an approach to programming. Well, if all you are doing is writing CRUD apps, I don't see how someone like OP is going to be even remotely a good fit. You need a mechanic, you hire a mechanic; you don't go looking for someone who can design a V engine.
- pja 14y agoThis fun. I'd forgotten how much of this stuff I used to know. (ps, for Q3: if you know the formula for the Harmonic series then you can answer this one very easily. If you don't, you're probably going to be a bit stuck.)
- tptacek 14y agoWeirdly, I do better on these questions than I did on "Operating Systems", despite having ~15 years of systems programming (including some kernel work) and having barely high school math. I have never needed to know the specifics of MESI cache coherence (I've benefited from knowing about cache coherence, but not in fine detail), and the problems I've worked on professionally have lent themselves better to commit protocols than to pthreads synchronization. On the other hand, I do a lot of crypto pentesting, so hashes versus MACs, RSA padding, and basic stat are straightforward. I don't have Colin's academic background but if I was him I'd be disquieted by the fact that someone like me comes out OK on his math and less well on his arch/OS stuff.
- cperciva 14y agoI'm not particularly surprised. The mathematics here is generally pretty basic material which other things build on top of -- and as you say, your crypto background helps with those questions. I don't remember seeing any emails from you... did you submit your answers?