Live data from Hacker News

The software development final exam: Algorithms and Data Structures

daemonology.net

161–170 of 208 posts

Re: The software development final exam: Algorithms and Data Structures

#161

If you can't answer the majority of the questions...you're lucky enough to be working within a narrow area where your deficit doesn't matter. Where by "narrow" one presumably means "narrow in theoretical scope, but extremely large in terms of number of people, number of customers, number of paid hours spent working on things, and amount of impact on the world". Most of the web was built by people who don't know what…

Most of the web was built by people who don't know what B-trees are.

By number of sites, perhaps. By revenue, I don't think so. The big names that dominated what the web is to most people certainly do know this stuff, at least insofar as the practical implications, and they try not to hire people that don't for development roles. That isn't to say that they don't also just use Postgres (or Berkeley DB, or whatever) instead of writing their own.

If the automotive industry were like computing, we'd use the phrase "auto mechanic" to refer to...

I totally agree with this - the field could use a few more job titles (and a little less grade inflation - SENIOR software engineer on 2 years experience? Really?) Software Fitter would be a much better description for the skilled assembly role that a lot of modern software boils down to. CRUD Technician is going to to need some PR work though!

Re: The software development final exam: Algorithms and Data Structures

#162
post #62

Earlier quoted context omitted.

> or you're lucky enough to be working within a narrow area where your deficit doesn't matter This implies that non-algorithmic work is a narrow area. In my experience, it's the vast majority.

I agree, non-algorithmic work is the vast majority of programming work today because most of it is related to Application Programming. The reason for this is that most Application Programming emphasizes the use and sufficient knowledge of a framework, rather than a full understanding of CS fundamentals. While those with CS have a head start in understanding frameworks quickly and utilizing them effectively, self-taug…

Just as an anecdote from a self-taught, I few years ago I started in on GoF and got about 100 pages in before I came to the conclusion that a lot of what I'd read so far and was attempting to incorporate into my knowledgebase is already a part of the languages I'm currently using.

I know there's a use for these details, I want to learn them, but I suspect that many times the direct context is built-in, which is pretty much what you say about learning frameworks, which may be possible to consider as dialects of a language. In fact, by Googling I see that people have written about language subsets in the context of Lisp, so full-circle I go.

Re: The software development final exam: Algorithms and Data Structures

#163
A lot of these questions look great if you just finished school, but not so great 10 years later. There are an almost unlimited number of things I can focus on that will actually improve my performance on the job, and none of them are memorizing the workings of B-trees just in case I need to use one someday and the internet is down.

Computer Science degrees are about laying the foundations so that you can understand things like B-trees when you need them.

Re: The software development final exam: Algorithms and Data Structures

#164
post #7

While I can answer some of these questions (and could answer them all a few years ago while attending university) this kind of knowledge is simply not something that I use on a daily basis. I also doubt that many others developers use it unless they have very specialized jobs. These kind of questions should not be the only basis of the software development final exam. In software development problem solving, communic…

I don't know these answers off the top of my head, but if I needed to know them in the real world, I could easily find them out in a couple of seconds or minutes with Google and Wikipedia.

The difference between me and someone who is unfamiliar with computer science (but is still good with Google) is that I can read the answers and their corresponding articles and understand what they mean, as opposed to the other person, who would just be able to recite the answers as trivia.

Re: The software development final exam: Algorithms and Data Structures

#165
Carl Sagan said "If you wish to make an apple pie from scratch, you must first invent the universe."

I'm a web developer. I use tools, languages, and frameworks built on many Computer Science concepts that I don't fully understand, but I would sorely hate to have to reinvent those wheels every time I need to create a new application, or to even need to understand their most intricate inner workings despite the fact that they have been abstracted away for my convenience.

Perhaps this makes me "mediocre" in the eyes of some, but I get my work done and have never had any of my managers or customers tell me that what I have delivered is "mediocre" in their eyes.

Several times I've come up against an issue that requires me to push the limits of my skills and knowledge, and I do not shy away from learning, but it would do me little good to learn many of the things that are taught in a typical CS course. I consider myself passionate about my work, and I strive to learn new things every day, but I don't consider myself to be at a disadvantage, nor do I find my lack of knowledge in those areas to be a deficiency.

I am proud of my accomplishments, and of the course I have taken in my career. Perhaps my skills would be of little use at Tarsnap, but I have no shortage of work at any number of other companies.

Re: The software development final exam: Algorithms and Data Structures

#167

I'm seeing a lot of apologists for mediocrity here. They seem to be drawn out by articles like this one as well as articles about interviewing. Despite the sentiment here, Colin is right: this is knowledge that developers ought to have. Not because they need it to do their day job, but because they can't avoid learning these topics if they truly love the field. Sure, you can earn a pretty decent paycheck hacking web…

> Call me a snob if you will, but I don't want to work with mediocre programmers > I want people with passion for our field, and those people can't avoid gaining the kind of knowledge that Colin's test asks about. Claiming to own the definition of passion is not snobbish but conceited. Perhaps I consider programmers mediocre if they lack design experience and cannot show me how to setup custom guides in illustrator.…

Your post is largely a straw man and contains snark that certainly does not raise the level of this conversation.

I'm talking about passion for programming. I'm not "claiming to own the definition of passion," I'm saying that passion for programming manifests in knowing the answers to questions like Colin's. It simply does.

Re: The software development final exam: Algorithms and Data Structures

#168

Earlier quoted context omitted.

> O(2^n) equal to O(3^n) Yep. So I looked into it and it seems they are not equal. Every f(n) in the set O(2^n) belongs to O(3^n). While this means that O(2^n) is a subset of O(3^n), we can see from the trival case f(n)=3^n that O(3^n) is not a subset O(2^n) since 3^n > 2^n for all n as n approaches infinity, or there is no k such that is exists an n0, such that all n > n0 implies 3^n Great. I still don't see how I a…

That's a great textbook summary, now for applications: You got an array of your friends, an array of people who upvoted this post and an array of people who replied to this post. Filter all your friends who upvoted and replied to this post. Now, before you write the code, how fast/slow will it run? for 1,000 friends? 1,000,000? will the runtime grow extremely fast? why? Here's a Redis command that intersects two keys…

I'll give this a shot.

The code I would write would take longer the more friends you have. Basically, it would grow linearly with the size of all the sets and the number of intersections found. Something like O(n * M) in the worst case. But I don't get why later you say that n is the size of the smallest set.

So I don't see how you can beat that. I guess you could sort the lists, but that take O(n log n) over M lists, and then lookups would take O(log n).

To me it will be fastest when the algorithm terminates the quickest - the smallest set contains nothing, the 2nd smallest set contains no intersecting keys, anything like that and will be the longest in the worst case (each set is a proper subset of the next) and progressively worse as the subsequent sets get larger.

As for that algorithm running in O(N * M), I am not sure I understood that at first, but I think I do now. If you hold all other set sizes constant, and can only vary the input of the smallest array or the number of sets and you will notice the running time follow O(N * M), but if you increase the size of the largest set by k, then the algorithm will take k times as long to run (in the worst case), but if the running time function f(N,M) belongs to O(N * M) then k * f(N,M) belongs to O(N * M) as well, so the O notation still represents the running time complexity even if you increase the size of the largest set.

So the running time will still increase with the largest set, but the O-notation of the algorithm will still belong to the same representation.

Re: The software development final exam: Algorithms and Data Structures

#169

If you can't answer the majority of the questions...you're lucky enough to be working within a narrow area where your deficit doesn't matter. Where by "narrow" one presumably means "narrow in theoretical scope, but extremely large in terms of number of people, number of customers, number of paid hours spent working on things, and amount of impact on the world". Most of the web was built by people who don't know what…

I really wish the OP had linked to the explanation for the exams: http://www.daemonology.net/blog/2012-10-08-software-developm...

The author believes this test is very basic, and to follow your auto mechanic metaphor it would be like asking anyone from a Midas Muffler employee to Kiichiro Toyoda the difference between disc and drum brakes.

(Not that I agree with the author - to me, "basic knowledge" would be "What is big O notation?")

Re: The software development final exam: Algorithms and Data Structures

#170
post #169

If you can't answer the majority of the questions...you're lucky enough to be working within a narrow area where your deficit doesn't matter. Where by "narrow" one presumably means "narrow in theoretical scope, but extremely large in terms of number of people, number of customers, number of paid hours spent working on things, and amount of impact on the world". Most of the web was built by people who don't know what…

I really wish the OP had linked to the explanation for the exams: http://www.daemonology.net/blog/2012-10-08-software-developm... The author believes this test is very basic, and to follow your auto mechanic metaphor it would be like asking anyone from a Midas Muffler employee to Kiichiro Toyoda the difference between disc and drum brakes. (Not that I agree with the author - to me, "basic knowledge" would be "What is…

I really wish the OP had linked to the explanation for the exams

I did...

Post reply on HN