Slashdot Mirror


AP CS Test Takers and Pass Rates Up, Half of Kids Don't Get Sparse Arrays At All

theodp writes: Each June, the College Board tweets out teasers of the fuller breakouts of its Advanced Placement (AP) test results, which aren't made available until the fall. So, here's a roundup of this year's AP Computer Science tweetstorm: 1. "Wow — massive gains in AP Computer Science participation (25% growth) AND scores this year; big increase in % of students earning 4s & 5s!" 2. "2015 AP Computer Science scores: 5: 24.4%; 4: 24.6%; 3: 15.3%; 2: 7.1%; 1: 28.6%." [3 or above is passing] 3."Count them: a whopping 66 AP Computer Science students out of 50,000 worldwide earned all 80 pts possible on this year's exam." 4. "Remember that AP exam standards are equated from year to year, so when scores go up, it's a direct indication of increased student mastery." 5. "Many AP Computer Science students did very well on Q1 (2D array processing–diverse array); >20% earned all 9/9 pts" [2015 AP CS A Free-Response Questions] 6. "The major gap in this year's AP Computer Sci classrooms seems to be array list processing; Q3 (sparse array): 47% of students got 0/9 pts."

128 comments

  1. What a confusing summary! by Anonymous Coward · · Score: 5, Insightful

    What a confusing summary. There are meaningless links that are just numbers. The quotes following the numbers have no context and make no sense. Formatting what appears to be a list into one single paragraph makes it awkward to decipher. The linked-to graph image is missing many labels. The lack of other details doesn't help, either. What the fuck is this submission even supposed to be about?!

    1. Re:What a confusing summary! by Anonymous Coward · · Score: 1

      Ask an editor, if you can find one around here. It all seems to be about flashy front-end redesign instead of content now.

      Oh, and BTW you Slashdot 'designers' -- is it possible for you to fix your CSS so the story icons don't sit on top of the fucking headline when my browser window isn't full-screen? Kthxbye.

    2. Re:What a confusing summary! by Anonymous Coward · · Score: 2, Informative

      Kids are passing the AP CS test with higher scores, but nearly 50% of them cannot understand concepts that involve a slight amount of thinking. In other words, it's a shitty test or most taking it are stupid.

    3. Re: What a confusing summary! by jrumney · · Score: 1

      Alternatively, nearly half the students taking the test are far enough along the autism spectrum that they could not answer the questions about implementing getter methods when faced with a class containing private member variables with no methods to set them.

    4. Re:What a confusing summary! by Anonymous Coward · · Score: 0

      I recently went back to college and most of the fresh-outta-HS kids were coming in with 5.0 GPAs, aces of their AP classes and whatnot. Most of them seemed dumb as a bucket of brake drums though- many couldn't spell, use regular algebra, write cohesive papers or do anything other than brag how smart they are.

      "Group projects" was the hardest thing I ever had to do there.

    5. Re:What a confusing summary! by ceoyoyo · · Score: 4, Insightful

      The summary is summarizing a tweet. If releasing results like that in a tweet wasn't dumb enough, summarizing it is.

    6. Re:What a confusing summary! by Anonymous Coward · · Score: 0

      I saw this in college recently too. What is even worse is nowadays bad students get the same A as everyone else, so it perpetuates the cycle. I lost count of how many kids I saw who would have flunked out of my high school classes back in the 1980s, but I'm just a cranky old man, right?

      captcha: beaner

    7. Re:What a confusing summary! by JustAnotherOldGuy · · Score: 1

      ^^^^^ THIS, times about a billion. Slashdice strikes again.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    8. Re:What a confusing summary! by JustAnotherOldGuy · · Score: 3, Funny

      Oh, and BTW you Slashdot 'designers' -- is it possible for you to fix your CSS so the story icons don't sit on top of the fucking headline when my browser window isn't full-screen? Kthxbye.

      Dear User,

      No. We have a firm policy geared toward fucking shit up and we're not going to stop just because you asked us too.

      Signed,
      The SlashDice Staff

      --
      Just cruising through this digital world at 33 1/3 rpm...
    9. Re: What a confusing summary! by Anonymous Coward · · Score: 1

      I've not gone back as a student, but I have taught labs and worked as a tutor. When confronted with a particularly painful examples of allegedly intelligent students acting incredibly dumb I just try to remember how I was in first year: lazy, not stupid; suffering from sever culture shock from the high-school to uni transition; severely hungover most mornings; and still getting used to being required to think about things rather than blindly recalling trigonometric identities, recipes for solving quadratic equations and such.

      Also worth noting that group projects were just as painful at uni as they continue to be at work.

    10. Re:What a confusing summary! by Anonymous Coward · · Score: 0

      Ask an editor, if you can find one around here. It all seems to be about flashy front-end redesign instead of content now.

      Oh, and BTW you Slashdot 'designers' -- is it possible for you to fix your CSS so the story icons don't sit on top of the fucking headline when my browser window isn't full-screen? Kthxbye.

      This site has editors? Since they haven't posted any comments in weeks, nor have they talked about the layout changes, I just assumed that the accounts posting stories were taken over by bots.

    11. Re:What a confusing summary! by gsslay · · Score: 1

      It would appear that the submitter thinks all that is required to construct an article summary is to string tweets together in a single paragraph.

      It's all just words and numbers, isn't it? No suitable effort or consideration for the communication medium required. Consider yourself lucky it isn't written in emojis.

    12. Re:What a confusing summary! by Austerity+Empowers · · Score: 2

      Kids are passing the AP CS test with higher scores, but nearly 50% of them cannot understand concepts that involve a slight amount of thinking. In other words, it's a shitty test or most taking it are stupid.

      The more kids that pass the AP CS test, the more colleges that accept AP credits lose funding. It stands to reason the test is designed primarily to throw people off the boat and justify having them retake the class, setting them back between 1 and 2 semesters. In reality, in college, they will learn exactly the same stuff as in high school with probably worse teachers (or grad students).

      Now, consider that most people taking AP CS have no interest in "computer science", they have interest in computer programming, specifically the fraction of computer science that will get them the big $$$ in private industry. Very nearly no one has interest in academia (in this or any other field), for very good financial and practical reasons, yet a test is being administered to young kids with inadequate knowledge of what is important/what is not important who have been exposed to the field for, in most cases, exactly one year. The kids probably know how to write a program that will compile or otherwise execute, but have limited idea or perhaps a certain degree of animosity to academic formalism.

      Take a combination of predatorial testing, and contrasting motives and hilarity shall inevitably ensue. The best way to appreciate computer science, is similar to the best way to understanding electrical engineering: start with the useful practical things that will get them interested, show them how a bit of education improves the design & function, and get them hooked. It makes all the diffeq a whole lot easier to sit through, or in the case of CS, the algorithms and discrete math.

    13. Re: What a confusing summary! by TheRaven64 · · Score: 1

      The test says that the class with private members and no setters is intended to be immutable after creation, so that's not a problem. Having a single linked list for the entire grid (rather than a list of lists) is completely insane though. I'd expect a student who actually knew what he or she was doing to be more confused than one that would end up writing code with horrible algorithmic complexity. Looking at the rest of the test, it's not much better. If this is what AP tests look like in the USA, then I'll make sure not to weight it very highly when looking at applicants next academic year.

      --
      I am TheRaven on Soylent News
    14. Re:What a confusing summary! by HornWumpus · · Score: 1

      Artificial stupidity hasn't progressed that far.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    15. Re:What a confusing summary! by Chelloveck · · Score: 1

      What do you mean, confusing? There's a link to a jpg that has a lot of lines, and some of the lines are clearly higher than other lines so obviously that means something good.

      --
      Chelloveck
      I give up on debugging. From now on, SIGSEGV is a feature.
    16. Re:What a confusing summary! by BitterOak · · Score: 1

      Formatting what appears to be a list into one single paragraph makes it awkward to decipher.

      Maybe it's a sparse list.

      --
      If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
    17. Re:What a confusing summary! by BitterOak · · Score: 1

      Especially when the "summary" has more than 140 characters.

      --
      If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
    18. Re:What a confusing summary! by Cinnamon+Beige · · Score: 1

      Kids are passing the AP CS test with higher scores, but nearly 50% of them cannot understand concepts that involve a slight amount of thinking. In other words, it's a shitty test or most taking it are stupid.

      The more kids that pass the AP CS test, the more colleges that accept AP credits lose funding. It stands to reason the test is designed primarily to throw people off the boat and justify having them retake the class, setting them back between 1 and 2 semesters. In reality, in college, they will learn exactly the same stuff as in high school with probably worse teachers (or grad students).

      Actually, at least with the AP subject tests in the fields I'm used to dealing with, it's not predatory testing but the sheer lousiness of the AP system. My Gen Chem I class outright treated AP chemistry as a recommended prerequisite--it wasn't a replacement for anything you'd be taking for credit, and regular old high school chemistry was pretty much just as good. (I got through pretty happily without either.)

      Basically, at this point AP courses are designed to have a high number of people taking them and a decent pass rate, and the AP exams aren't much better. If what you're after is getting to start college with college credit already in the bag--CLEP exams for the subjects you already do know well enough to just plain test out of, and dual enrollment for subjects you don't know that well are your best bet. The dual enrollment scheme where I am currently actually lets you take college courses at the local community college for free, and since you can start it at 16 you can in theory get your high school diploma and your associates at the same time--and was instituted in part because 16-year-olds were dropping out, getting a GED, and attending college, causing the high schools to loose numbers and the funding those numbers brought.

  2. Thanks for linking to the test by Anonymous Coward · · Score: 0

    Thanks for linking to the test in the summary, that was a fun diversion.

  3. Kids don't understand sparse arrays by Culture20 · · Score: 3, Insightful

    Duh! I bet it matches up exactly with kids that don't understand pointers and linked lists. Wonder why that might be...

    1. Re:Kids don't understand sparse arrays by SenatorPerry · · Score: 4, Informative

      Link for the Lazy

      I had never heard of sparse array as a term, but we discussed the concept nearly two decades ago as a normal design process.

    2. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      Duh! I bet it matches up exactly with kids that don't understand pointers and linked lists. Wonder why that might be...

      This (the issue with sparse arrays) is probably happening because the kids haven't had any proper exposure to linear algebra yet. Although, they apparently did very well on the 2D array processing questions.

      I had a quick browse through the questions, and there are some interesting problems in there considering it is high school level, impressive. There was nothing like this when I did high school in The Netherlands ten years ago.
       

    3. Re:Kids don't understand sparse arrays by abies · · Score: 1

      This might be because in most places you will call them map/dictionaries (int->whatever) if they are single dimensional and sparse _matrices_ when having more dimensions.
      One in the test is sparse matrix. Calling it sparse array requires a bit of mental exercise (by having said array indexed by tuples of (x,y) instead of integers). But this probably comes from concept of 2d arrays, which are neither...

    4. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      Going by the linked sample section, they weren't required to actually deal with the linked list stuff. The storage was simply given as a List member of the SparseArray class, so it should have just been a matter of iterating over a collection.

    5. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      Exactly. All the young developers I know are good enough at gluing libraries together that they often have shallow knowledge of how anything works under the hood. Since they often have never had to deal with that layer but seem able to make passable software a lot of the problems come up as "scaling issues" when in fact they are errors caused by design flaws due to not understanding the limitations of their magical languages when using larger data sets.

      Even understanding _why_ languages could have pointers and linked lists would make a huge difference in the way they design their software (I hope). Since the big push for new programmers is coming from Silicon Valley and other tech startups I'm sure most these devs will get by just fine with hash / associative arrays and let the language perform the magic under the hood until it doesn't, then a senior dev can step in and rework it. Which works great as long as we still have sr devs that understand pointers and linked lists and all the other pieces under the hood.

    6. Re:Kids don't understand sparse arrays by LWATCDR · · Score: 1

      For a degree in computer science you need to know sparse arrays.
      As a working programer you will almost never write one. You will use STL or some other library to handle it.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    7. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 1, Informative

      Do you think they would've gotten it if the question had called it a database of values instead of a sparse array? There wasn't even a need to know what a sparse array is in advance, as the data structure is fully explained in the question. The actual task only requires a single loop over the linked list, comparing each element to the requested row and column number, returning the value if found and 0 if the element isn't in the list. The second half of question three is just a little bit more difficult, but the first half would have gotten them at least some points.

      What this tells me is that most of the other questions were answered from rote memorization, but when a new concept is presented, they're stumped, even if it is almost trivial and everything is explained in detail. Pattern recognition.

    8. Re:Kids don't understand sparse arrays by skovnymfe · · Score: 2

      In other words you don't need a CS degree to be a programmer.

    9. Re:Kids don't understand sparse arrays by LWATCDR · · Score: 4, Insightful

      No you don't but their is value in knowing how to write one when you use one.
      It usually means you know better than reinventing the wheel.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    10. Re:Kids don't understand sparse arrays by Cassini2 · · Score: 3, Informative

      Sparse arrays is a mathematical abstraction that completely ignores the implementation details. Formally, they are any matrix that has "many" zeros (or null) values. The practical problem is that most useful optimizations around sparse arrays require closely matching implementation details against the problem to be solved. With sparse arrays, implementation details are killers.

      For instance, suppose the standard solution is adopted. The sparse array will be organized as an array of linked lists representing the rows, with each row containing another linked list that contains the individual data values. What happens if you want to do a matrix multiply? A matrix multiply requires a column by row lookup and a row by column lookup. One will be an O(1) lookup, and the other will be a O(n^2) lookup. This makes a full matrix multiply an O(n^5) operation, and memory is the least of everyone's worries.

      To optimize the code, it is necessary to look closely at how the matrix will be built and used. However, as soon as that starts happening, the matrix multiply decomposes into a bunch of specialized matrix operations. At this point, the abstraction starts falling apart.

      For example:
      a) Assume the multiplication involves a diagonal matrix. Then the optimum solution is to store the diagonal matrix as a 1xn matrix, and specialize the matrix code. This was the favoured approach from numerical methods in C and Fortran.
      b) Assume the multiplication involves a tridiagonal matrix. Then the optimum solution is to store the tridiagonal matrix as a 3xn matrix, and specialize the matrix code. Again, see numerical methods in C and Fortran, or just about any good matrix library.
      c) Assume the matrix operation involves a "control-systems" style matrix. One populated row, followed by a diagonal series of rows with one or two elements. The optimum solution is to develop specialized code. For most control systems problems, this matrix never changes.
      d) Control systems often have a compact matrix representation involving a series of matrix multiplies. However, if the matrix multiplies are analysed, they become a much simpler sequence of equations that can often be executed in O(n^2) time instead of the longer O(n^3) time of the matrix multiplies. As such, develop specialized code. Both MatLab and Mathematica have functions where numerical operations can be broken down into there constituent formulas and saved as "C" code.
      e) Assume we really need to frequently multiply a truly sparse array. Then build two sets of linked lists, one organized by row/column and another organized by column/row. Then both the row and column lookups can be done as an O(1) operation. The matrix multiply is a O(n^3) operation.
      f) Just because the inputs to a matrix operation are sparse, doesn't mean the output array is sparse. I'm thinking of Singular Value Decomposition, some matrix multiplies, matrix inverses, matrix pseudo-inverses, and covariance matrices. Also, some matrices that appear in Quantum physics. In this case, matrix operations need to be further specialized to deal with creating non-sparse matrices from sparse-matrices. Additionally, some matrices may need to be rounded to sparse, even though they may be fully populated, like some covariance matrices.

      In the end, sparse matrices are simply a descriptive term for a bunch of application-specific optimizations. Sparse matrices devolve into numerical optimizations that no-one cares about unless they are looking at an application that requires the specific numerical optimization. I'm not surprised high-school CS coders don't "understand" them.

    11. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 1

      Yes, lack of knowledge does not prevent you from getting a job. But it does prevent you from doing that job well.

    12. Re:Kids don't understand sparse arrays by ceoyoyo · · Score: 1, Insightful

      "Working programmers" don't need degrees in computer science. They need diplomas or certificates in programming.

      Even so, it's not a bad idea to know something about the tools you're using. Perhaps knowing something about how those vertices are stored might help write efficient code for manipulating them?

    13. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      Time's up, hand in your work. Congratulations, you failed because you didn't bother to read the question. "Sparse Array" is merely the name of the task. The particular data structure is given and explained in detail. It is just an unordered list of row-column-value triples represented by immutable objects. The students are only expected to implement two simple methods: a) retrieving a value from that given data structure, and b) "deleting a column" from that data structure.

      Unfuckingbelievable.

    14. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      It's amazing how you actually got modded informative for that clearly uninformed rant. First, 'sparse array' is not the term to use if you want to find whether there's a standardized description of the thing or not - try 'sparse matrix' instead. You'll have even wikipedia list you the *gasp* standardized ways of storing sparse matrices, and the corresponding optimal uses. And they can be converted between one another. And they have pretty much all relevant matrix algebra algorithms implemented for them. In several programming languages.

      Another thing that went right above your head is that usually one does not know the exact locations of the non-zero elements, but the general structure of the matrix is known (which dimension is sparse, typically) so you need to allow for as much flexibility in that as possible, since operations will likely preserve the said structure (hence the csr/csc formats). So you're never going write a dedicated diagonal matrix class - heck, even a dedicated banded matrix class makes little sense.

      But by all means, go ahead and implement your own formats for each of the various types of sparse matrices you are likely to encounter. Then optimize operations for each. Then implement complex algebra (eigenvalues, svd, QR, the works). In the end, hope that your brand spanking new wheel has no corners and works for enough use cases to justify not employing a standardized wheel. A smarter person than me said something along the lines of premature optimization and evils, but I suppose it does not apply to your brand of genius.

    15. Re:Kids don't understand sparse arrays by FranTaylor · · Score: 1

      They need diplomas or certificates in programming.

      If they don't understand mathematics or computer systems design then their code will be useless

    16. Re:Kids don't understand sparse arrays by mrhippo3 · · Score: 1

      Engineer here with a lot of experience with Finite Element Analysis software. Sparse arrays are NOT some amusing construct to see how well you code an obscure problem. FEA is *THE* tool to create a design that is less likely to fail. Programs such as ANSYS are used design just about every single vehicle on the road (cars, trucks, bicycles), airplanes -- the airframe and the engines, locomotives. And FEA is also used to design bridges, buildings, cranes used to build this stuff. The use of sparse matrix algorithms enable this software to get results in a reasonable time frame. As mentioned elsewhere, sparse matrices are very useful in design optimization, which is frequently coupled with FEA.

    17. Re: Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      If there were only to be one wheel. Can you imagine that - all bikes, cars, carts with sets of one only wheel. The world would be much simpler.
      Other than that you are right about one thing - parent is an ass.

    18. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      You don't need linear algebra to check for the existence of a value in a collection. They're not looking for optimal algorithms, just can you grasp the concept. If in collection, return value, if not, return default value. I'm amazed they understood loops.

    19. Re:Kids don't understand sparse arrays by Simon+Brooke · · Score: 1

      What happens to your 'standard' linked lists solution when you have ten values scattered over an array which is 1000! (factorial 1000) in each dimension? For most genuinely sparse arrays, a hashmap is a better approximation of an efficient implementation. Of course, there will be corner cases where you want to do something different, but linked lists strike me as an extremely poor solution except in arrays where more than about 10% of cells have data.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    20. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      That wikipedia article is horrible.

      An obvious question that might be asked is why we need a linked list to represent a sparse array if we can represent it easily using a normal array. The answer to this question lies in the fact that while representing a sparse array as a normal array, a lot of space is allocated for zero or null elements. For example, consider the following array declaration:

      double arr[1000][1000]

      Language like this does not belong in a dictionary!
      There is also factually incorrect statements like

      Also, when a linked list is used, the array elements can be accessed through fewer iterations than in a normal array.

      The entire "Sparse Array as Linked List" section should just be deleted and if a comparison like that is needed a new one should be written without the old one as a reference.

    21. Re:Kids don't understand sparse arrays by Coryoth · · Score: 1

      It all depends on what you want to do with your matrices. Various operations have various costs in different sparse matrix formats. The standard ones are COO or coordinate format: a list of triples (i, j, val); DOK or dictionary of keys format: the hashmap you are thinking of; LIL or list of lists format: a list for each row and a list if pairs (j, val) in each list entry; CSR/CSC or compact sparse row/column: an array of indices where each row starts, an array of column indices and an array of values.

      COO and DOK are great for changing sparsity structure; LIL is very useful if you have a lot of row-wise (or column-wise) operations, or need to manipulate rows regularly. CSR is great for matrix operations such as multiplication, addition etc. You use what suits your usecase, or change between formats (relatively cheap) as needed.

    22. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      > In other words you don't need a CS degree to be a programmer.

      Programmers have often chosen the profession, before getting the degree, so at least you got that right.

    23. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      Not that surprising. Look at the answer people get when they ask questions.
      "Do not reinvent the wheel, use an already existing library."
      "Do not use low level languages, there are high level languages that manages the resources for you."

      Young developers aren't exactly encouraged to look under the hood to see how things work.

    24. Re:Kids don't understand sparse arrays by jc42 · · Score: 1

      They need diplomas or certificates in programming.

      If they don't understand mathematics or computer systems design then their code will be useless

      But note that the question wasn't about understand mathematics or computer systems design; it was about diplomas or certificates in programming. It's fairly well understood that those are orthogonal quantities. ;-)

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    25. Re: Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      If you check out the actual sparse matrix formats, there are several wheels, with different use cases, and changing wheels is relatively cheap. Of course, nobody is stopping anyone from adding wheels, but unlike the OP's rant, the number of use cases for those is rather limited, although indeed not zero. However, my point was that his rant was amazingly uninformed for the +5 score it had - and with such a misguided know-it-all attitude reinventing a slightly square wheel is a more likely outcome.

    26. Re:Kids don't understand sparse arrays by jandrese · · Score: 2

      No, but you will need the CS degree to be a good programmer. If you know what is going on under the hood you can avoid those O(N^5) operations that make your code inefficient. If you just blindly use whatever looks vaguely correct in the standard library you'll never know why your code is so slow.

      --

      I read the internet for the articles.
    27. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      Of course you don't. All you need it the knowledge, skill, and ability to convince an employer that you are better than whoever else wants your job.

      If, in the context of your job, "programming" really means "buying prefab components and writing a few python scripts to glue them together." Then you don't need the CS knowledge either. Same for simple web design.

      If you are going to do anything serious, the CS knowledge will quickly become a requirement for progress, but not everybody on the team needs to know it...just the team lead (or architect or whatever) usually.

    28. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      He's not saying that sparse arrays aren't useful - they're an incredibly valuable way to represent things like local PDE operators whose corresponding matrices become sparser the higher the resolution goes. He's saying that the actual *implementation* of a sparse-matrix BLAS is largely an exercise in application-specific optimizing (examples a-d) and shitty details that nobody wants to think about after they get it working.

    29. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      It only tells us that the kids naturally understand massive parallel programming using accelerators.

    30. Re:Kids don't understand sparse arrays by mbkennel · · Score: 2

      I think the poster above clearly understood the problem domain, in that the most common uses for "sparse array" is a "sparse matrix" for numerical computations.

      And moreover, as is the case, the problem domain of matrix computations is known to be deep and problem-dependent, with a wide variety of representations and solution categories.

      | But by all means, go ahead and implement your own formats for each of the various types of sparse matrices you are likely to encounter. Then optimize operations for each. Then implement complex algebra (eigenvalues, svd, QR, the works). In the end, hope that your brand spanking new wheel has no corners and works for enough use cases to justify not employing a standardized wheel. A smarter person than me said something along the lines of premature optimization and evils, but I suppose it does not apply to your brand of genius.

      I see an unjustified insult against the previous poster.

      The various cases and solvers have already been implemented in many important software packages for different domains, and given the centrality of matrix operations in high performance computing, this is not a premature optimization but rather the essential, core implementation and algorithmic optimization flowing from the proper mathematical treatment of the problem.

      And his point was not at all to re-do everything yourself, but to be aware that there are in fact many varieties of sparse matrices in various settings and that this is not just a software-abstraction problem but a key mathematical problem, and there is no simple over-arching software abstraction that works well universally. The post described well-established problem domains with high-quality solutions.

      Simply being aware of this not-always obvious fact is an example of scientific maturity.

    31. Re:Kids don't understand sparse arrays by Chelloveck · · Score: 1

      That wikipedia article is horrible.

      You know the nice thing about Wikipedia? When you find poorly written or factually incorrect articles you can actually do something about it instead of just whining about it on an unrelated website.

      --
      Chelloveck
      I give up on debugging. From now on, SIGSEGV is a feature.
    32. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      You can translate that to almost any career.
      In fact, the only careers I can think of where I would say you absolutely need the degree, are surgical careers (dentistry, veterinarian, Neurosurgeon, etc). You can learn almost anything on your own. In fact, someone with fairly mediocre knowledge but greater time and decent search methods (good software) is usually more accurate than someone with limited time but greater knowledge.

    33. Re:Kids don't understand sparse arrays by Cassini2 · · Score: 1

      Thank you.

      You put it better than I did.

    34. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      A CS degree doesn't mean you know what's going on under the hood. There's plenty of people with CS degrees that have a lot of knowledge, but no understanding. The lack of understanding limits their ability to use their knowledge. A book has a lot of knowledge, but they make horrible programmers.

    35. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      What?

      My matrix based calculation systems use sparse arrays just fine. Why? Because sparse arrays and matrix's have nothing in common. An array can possibly be a vector, but it can also certainly not be. It can be any set!

      It's about how you design it. This is just simple data structuring. It is what you do after you've done your linear algebra, and want to make it computable. Don't mix it up, you'll be unable to handle even easy calculation problems.

    36. Re:Kids don't understand sparse arrays by Gazzonyx · · Score: 1

      That wikipedia article is horrible.

      You know the nice thing about Wikipedia? When you find poorly written or factually incorrect articles you can actually do something about it instead of just whining about it on an unrelated website.

      The other nice thing about Wikipedia is that the original author can be notified via RSS/ATOM that someone has changed their factually incorrect page and they can revert it in moments. A lot of people whine about that on unrelated sites because they're done spending their own free time fighting over fiefdoms when they can say "screw it" and just not hire people that come to an interview armed with whatever they read on Wikipedia.

      What I'm saying is, while your solution absolutely makes sense in theory, many have found it unsatisfactory in practice but the flip side is that it retains a positive value as a filter; for that we thank the people that insist on misinforming whomever believes that a wiki is an authoritative source.

      --

      If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

    37. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      The students are only expected to implement two simple methods: a) retrieving a value from that given data structure, and b) "deleting a column" from that data structure.

      In real life, two weeks later you have to add some more methods when somebody finally tells you what it's for.

      And all while you're redoing everything to support the new requirements, you're also muttering, "we shouldn't be using a sparse array here anyway, and the code I'm writing today is already obsolete and is never going to get into production because I know I'm just going to replace this whole damn thing next month when we finally get around to talking about the stuff that calls this code."

    38. Re:Kids don't understand sparse arrays by Anonymous Coward · · Score: 0

      I had never heard of sparse array as a term,

      --
      then you've not spent much time with works numerical recipes, etc. The theory and management of sparse arrays has been around for a while, particularly in things like circuit simulators (ECAP, from the 1960s, in FORTRAN, later programs like SPICE) and mechanical and thermal analysis. These problems are typically described as a large 2D array giving the relationship between two parameters (e.g. node voltage and current between two nodes), with the arrays being mostly zero: A physical component typically having two or three connecting points, and any node typically having only a few components meeting at that point (think about a schematic, or a bridge truss, or the human skeleton) Consider analyzing the loads in a dodecahedron: there's 20 nodes and 30 members connected to those nodes. The matrix would be 20x20, and any given row or column would have only 3 non-zero entries.

      Since the languages in use to code such stuff (FORTRAN) didn't natively support linked lists, a variety of schemes were evolved to efficiently do math on such arrays, especially such useful things like determinants and matrix inverse (and LU decomposition, etc.). Rather than a brute force swapping of two rows (say you're doing gaussian elimination), is much easier if you have another row index array (sort of an array of pointers to a row).

      I wrote a lot of FORTRAN code in the 70s and 80s to do calculations on problems that were essentially graphs (e.g. to figure out minimum spanning tree, or least cost routing using Dykstra's A* algorithm), and there's a whole raft of ways to essentially implement hash tables and/or linked lists in FORTRAN.

      I suspect a lot of non-numerical-programming folks came up with similar schemes when spreadsheets came about. The first spreadsheets did not necessarily take advantage of the sparseness: they would evaluate each cell in turn. Nor did they detect cycles and loops, except with ad hoc methods.

    39. Re:Kids don't understand sparse arrays by ceoyoyo · · Score: 1

      Not necessarily. It doesn't take much math to be able to do probably 99% of the programming the world demands today. System design should probably be (and probably is) left to systems architects who have a better understanding of it than the rank and file code monkeys.

      If you want to be a system designer/architect/whatever, you maybe should have a degree in software engineering. If you want to be a code monkey a diploma where they ensure that you can write Java, C, add, subtract and multiply is handy. Computer science is a different thing (I realize that "computer science" in the US actually isn't a different thing).

      My computer science degree consisted of a lot of math classes and things like experimental OS design, formal proofs and complexity analysis. I was too early for all the quantum stuff they do now.

  4. classes got easier? by Anonymous Coward · · Score: 0

    That is the only thing I can find out from the retarded headline. Seriously can't /. get some first year journalism interns to write headlines? They'd be better than the poop socks that write headlines here.

  5. Jeez, sparse arrays, really? by Daniel+Hoffmann · · Score: 1, Informative

    That is like the second easiest pointer-driven data structure...

    1. Re:Jeez, sparse arrays, really? by Anonymous Coward · · Score: 0

      Really? I have been programming for 20 years and I have never heard of a "sparse array". Is that like a map, or linked list?

    2. Re:Jeez, sparse arrays, really? by Anonymous Coward · · Score: 0

      It's a map, with its keys constrained to numbers.

      JavaScript arrays are actually sparse arrays. Under the covers, they are implemented as maps.

    3. Re:Jeez, sparse arrays, really? by Shoten · · Score: 1

      It's a map, with its keys constrained to numbers.

      JavaScript arrays are actually sparse arrays. Under the covers, they are implemented as maps.

      Apparently, Wikipedia editors don't get sparse arrays either...because they define them as arrays where almost all of the values are 0 or null.

      --

      For your security, this post has been encrypted with ROT-13, twice.
    4. Re:Jeez, sparse arrays, really? by BlueMonk · · Score: 1

      From the user perspective, I think Wikipedia is correct. To any coder using a sparse array, it just looks and acts like an array where most of the elements are 0 or null. From the implementation perspective, when you know this is the case, there are some optimizations you can make to significantly reduce the memory usage of such a structure, which is why the term "implementation" was used to describe sparse arrays' relation to maps. Internally sparse arrays are implemented as maps so that space doesn't need to be allocated for all those zeros. Although a sparse array's implementation doesn't define it, it is a notable detail about how they are generally implemented. So if you want to split hairs on the definition of "is", Wikipedia probably has a better definition, but it's also not incorrect to say that they are implemented as maps.

    5. Re:Jeez, sparse arrays, really? by Anonymous Coward · · Score: 0

      > Really? I have been programming for 20 years and I have never heard of a "sparse array"

      Same here. My first thought was they meant something like a "ragged array," where the elements can be nonuniform size and only take up as much space as they need.

      I'm so glad I'm in the business environment and not the academic environment.

    6. Re:Jeez, sparse arrays, really? by Daniel+Hoffmann · · Score: 1

      Well that is the way I learned it, one way to implement them is using a linked list for each row (or column) of the array (skipping the null/0 values each element storing its index). It was a footnote on my data structures class, maybe that is why students failed the test, the professors did not bother teaching sparse arrays.

      For example
      0 0 1 0
      0 0 0 0
      3 0 4 0
      0 0 0 5

      in a sparse array implemented with linked lists would be:
      L0 -> (2: 1) -> null
      L1 -> null
      L2 -> (0: 3) -> (2: 4) -> null
      L3 -> (3: 5) -> null

  6. Yeah, well... by Psychotria · · Score: 1

    Perhaps the kids' teachers taught them the other things and not sparse arrays. It's pretty hard to program something when you have no experience and the only clue you have to program is the title of the data structure.

    1. Re:Yeah, well... by Anonymous Coward · · Score: 0

      I'm guessing they got more than just the title. I'm not familiar with the term "sparse array" either but I remember learning the concept. I doubt the kids even had to know that much - a problem might be to write an efficient algorithm for its implementation (after seeing it described)

    2. Re:Yeah, well... by Anonymous Coward · · Score: 0

      The problem is, if the linked exam is the actual question, it's not a question about sparse arrays. It's about looping through a linked list, and checking for equivalency and handling default values. They make no guarantee of the ordering of the items in the list, so it really is a brute force loop through it till you find the item and if you don't find it, return 0.

    3. Re:Yeah, well... by jeremyp · · Score: 1

      I had a look at the question. It explains exactly what a sparse array is and even tells you how it wants you to implement one (essentially as a linked list). The question involves writing the functions to access elements of the sparse array. Given the details provided, I'd be really disappointed if any programmer familiar with the concept of a linked list failed to complete the exercise satisfactorily.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    4. Re:Yeah, well... by Psychotria · · Score: 1

      I just had a look as well. The proposed solution is a linked list of linked lists isn't it? Perhaps this is the bit the kids are stumbling over.

    5. Re:Yeah, well... by Anonymous Coward · · Score: 0

      Are you fucking kidding me? This is the solution to part A of the question (not strictly Java, but I think you can manage):

      public int getValue(int row, int column){
          for (item in list){
              if (item.row==row && item.column==column){
                  return item.value;
              }
          }
          return 0;
      }

    6. Re:Yeah, well... by Anonymous Coward · · Score: 0

      Oh right, private members, so use getters. Same program, just .getRow() instead of .row, .getColumn() instead of .column and .getValue() instead of .value.

    7. Re:Yeah, well... by Psychotria · · Score: 1

      That's not a particularly efficient sparse array implementation. Although I guess the question doesn't require efficiency.

    8. Re:Yeah, well... by Anonymous Coward · · Score: 0

      The question doesn't allow efficiency. The data structure is given, and that is the best you can do with it. Does the name of question three ("Sparse Array") really throw so many people off? They could have named it "Lorem Ipsum" and it would have been the same data structure and the same solution. A test is not a good place to disagree with explicitly named givens.

  7. massive gains by Anonymous Coward · · Score: 0, Offtopic

    ....massive gains in AP Computer Science participation (25% growth)....

    I have seen this happen before - a couple of times before. Due to bi shakeups in the economy: 81-21, 90-91, 01-03, 08 - Now; people start running to what at the time is considered to be stable marketable careers and then there ends up being a glut in a few years. For example, after all those years of shortages, now there is one of the worst job markets for nurses.

    the job market for electrical engineers sucks now too.

    And then there is the trend of STEM work being offshored - one way or another. GE's CEO said that they are recruiting engineers from India on Charlie Rose a couple of weeks back. He just came out and said it.

    Find out what you are good at - even if it's art - and find a way to make yourself marketable doing that (I have seen it done by an artist.) Because if you do something "marketable" for the sake of getting a job (and that's assuming it's still marketable after getting trained), you will be unemployed.

    See, in this winner take all economy we are in now, being anywhere left of one standard deviation to the right of average (above average) doesn't cut it anymore - you have to be great/excellent. We live in a globalized economy and business is recruiting from just about everywhere on the planet and they will get the best of the best. It sucks because even though you can still do the job, they want the best so that it can be done faster and they can make their ROI numbers.

    If you're average in everything- like most of us - it's shit retail jobs, I'm afraid.

    Globalization has broken our job market.

  8. Here's your chance Slashdot by Anonymous Coward · · Score: 0

    This is the Question 4 from the test. See how you do Slashdot. Oh, and yes your answer has to been in JAVA! muwhahahaha.

    4. This question involves the design of an interface, writing a class that implements the interface, and writing
    a method that uses the interface.
    (a) A number group represents a group of integers defined in some way. It could be empty, or it could contain one or more integers.

    Write an interface named NumberGroup that represents a group of integers. The interface should have a single contains method that determines if a given integer is in the group. For example, if group1 is of type NumberGroup, and it contains only the two numbers -5 and 3, then group1.contains(-5) would return true, and group1.contains(2) would return false. Write the complete
    NumberGroup interface. It must have exactly one method.

    Link to test:
    https://secure-media.collegeboard.org/digitalServices/pdf/ap/ap15_frq_computer_science_a.pdf

    1. Re: Here's your chance Slashdot by Anonymous Coward · · Score: 1

      Yeah, the instant a test has to be in JAVA, sorry, check please.

      I can answer that question in Assembly for three processors, Python, ECMAScript (AKA Node), C (note the lack of trailing symbols), bash, awk, and FORTH, or muddle through it in LISP, F, PHP, PERL, five or six other processors in assembly, C++, C#, Go, and Modula-2/3, but seriously... The test requires answers written in JAVA, the least instinctually writable and overly verbose programming language ever invented? O.O

      - WolfWings, too lazy to log into Slashdot in years and years.

    2. Re: Here's your chance Slashdot by FranTaylor · · Score: 1

      yeah here's the C++ implementation:

      #include "my_header.h"

      int main(int argc, char *argv[]) {
          DO_IT();
      }

      My solution is best because it is the most readable and easiest to understand. There is only one line of actual code. All of the details are handled by the preprocessor.

    3. Re: Here's your chance Slashdot by Tyrannosaur · · Score: 1

      I think you've been watching a bit too much Shia LeBeouf...

    4. Re: Here's your chance Slashdot by tepples · · Score: 1

      Compilation failed: my_header.h: no such file or directory

  9. Whoa dude, that's sparse by Anonymous Coward · · Score: 0, Offtopic

    You read it hear first. Hipster lingo for (generation after Z, whatever it is).

  10. Let's go sparse on the "Tweetstorms" by xxxJonBoyxxx · · Score: 1

    This mash-up of digit-heavy tweets is a crappy SlashDot summary of a sort we haven't seen before.

    Doesn't Dice pay editors for this kind of stuff?

  11. I had to look up sparse array by EmperorOfCanada · · Score: 1

    But once I looked it up the solution was completely obvious. The wikipedia entry suggests a linked list, while I was also thinking associative array.

    Now my curiosity is demanding a sample copy of the test that I can take. Beyond not having memorized many of the terms I wonder how I would do after 20+ years of programming.

    With these sort of tests I often worry that it is just Bulimia Learning where you have to memorize esoterica while never learning to actually program. For instance for you C++ wizzards out there can you answer this one: "What is the compl keyword for? And why is is needed?" Surely as an accomplished C++ programmer you know all the keywords, there aren't that many. (I had to look it up).

    But if I look at a sample exam and find out it is all FizzBuzz then I will have a little weep for the children.

    1. Re:I had to look up sparse array by ceoyoyo · · Score: 1

      Implement it as a k-d tree and see if any of the examiners can follow your solution.

    2. Re:I had to look up sparse array by EmperorOfCanada · · Score: 0

      Just finished 10 questions from a sample test: http://manatee.cc.gt.atl.ga.us/apExam/ and I would rate it as FizzBuzz*2. FizzBuzz would be in the lower half of difficulty.

      If anything I was a bit slow taking it as I was looking for trick questions that weren't there. But I would say that someone who could pass that test would have at least the basic tools to go fourth and program.

      Plus it is in Java which I haven't touched since 2000.

    3. Re:I had to look up sparse array by Anonymous Coward · · Score: 0

      Using a k-D tree is usually preferred when dealing with sparse maps from tuples of numbers to items.

    4. Re:I had to look up sparse array by EmperorOfCanada · · Score: 1

      Seeing that when I was young and my computer (VIC-20) was crappy, I hand wrote assembly on paper and then inputted it. So in the case where they are looking for Java solutions, give them handwritten bytecode.

    5. Re:I had to look up sparse array by AuMatar · · Score: 1

      Would you really expect more? This test isn't a test for college grads- its a test for high school seniors to get them out of 1-2 semesters of bottom level CS courses, by proving they already know the basics. The point isn't to trick them or to expect them to know everything, its to see if they can save some time/money on intro level topics.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    6. Re:I had to look up sparse array by EmperorOfCanada · · Score: 1

      I was quite pleased with the level. I actually expected either something very pedantic or something so easy that I would have a little weep.

      If anything the main problem that I have is that I have met CS grads who might not do so well on that exam. I am not saying it is too hard but that the aforementioned CS grads sucked.

  12. Big deal by Anonymous Coward · · Score: 0

    I bet the only thing the students got better at is cheating in the tests.

  13. Finding old AP CS Results by Anonymous Coward · · Score: 0

    Is there any method for people who have taken the AP CS test to get a copy of the pass/fail information if they had taken the test years ago (like, early 2000s era)?

    1. Re:Finding old AP CS Results by PPH · · Score: 1

      Yes. Previous years scores are contained in a linked list. All you have to do is ...

      Sorry about that.

      --
      Have gnu, will travel.
  14. oh goodie slashdot tradition continues by Anonymous Coward · · Score: 1

    How many years has slashdot been around, and how many years spent arguing about silly little things like this?
    Yes, CS was harder when you were in college. Yes, people were smarter back then too. There are 2 orders of magnitude higher enrollment in Computer Science programs than there was 20 years ago. You're bound to get a lot of people who haven't quite figured out if this is the place for them yet.

    Also, the readability of the summary is approaching zero as well. If I wanted a recap of tweets, I would have just clicked on the links.

  15. Why Java? by RogueWarrior65 · · Score: 1

    Why is the entire test in Java? Not Javascript but actual Java. I mean, at least it's not .NET or C# (aka, platform specific).

    1. Re:Why Java? by Anonymous Coward · · Score: 0

      Why not Java?

    2. Re:Why Java? by swilver · · Score: 1

      ...because teachers need to be able to decipher the code afterwards.

    3. Re:Why Java? by Theaetetus · · Score: 1

      Why is the entire test in Java? Not Javascript but actual Java. I mean, at least it's not .NET or C# (aka, platform specific).

      Well, I tried turning in my answers in Whitespace, but I got a zero.

  16. Why Not Java? by sirwired · · Score: 2

    Why not Java? They have to pick some language, and Java has a wide array of IDE's, many of which will run just great on whatever ancient Windows boxen a school can scrape up, an extensive textbook infrastructure, a decent number of people that know it, and the ability to implement (in a straightforward manner) most of the concepts you need to teach in a high-school CS class. It has it's quirks, but I'd prefer it to C++.

    Yes, a full CS curriculum uses several languages in order to teach different concepts, but that's just not possible within the confines of a couple High School courses.

    When I did AP CS in the early 90's, it was Pascal all the way... it had a very easy to learn syntax, but didn't have enough modern language features (like OOP) that the folks in my college's CS program that had passed the AP test were really hurt when their follow-on classes assumed they both knew C++ already and that they had some familiarity with OOP. (I didn't pass the AP CS test due to my brain being fried from a brutal AP US History test that morning.)

    1. Re:Why Not Java? by Chaos+Incarnate · · Score: 1

      When I took it in 2002, it was C++ at the time. I think they switched to Java a year or two later.

      --
      Benford's Corollary to Clarke's Law: "Any technology distinguishable from magic is insufficiently advanced."
    2. Re:Why Not Java? by Anonymous Coward · · Score: 0

      Many intro to programming courses are switching to Python, but Python sucks on paper because you can't write white-space. C++ would allow students to answer questions in completely crazy ways and the core C++ API doesn't exist compared to Java. Testing in Java lets you test networking, threading, exceptions, OOP, etc... They're all done in a standard way in Java while there's multiple ways to do them in other languages. Sure pure theory is nice, but high school students what to study something tangible. I'd be against them switching to an untyped language. Students need to understand variables types, even in dynamic languages. I see far two many people in 2nd level classes that don't know types and it really screws them up.

    3. Re:Why Not Java? by Gazzonyx · · Score: 1

      When I took it in 2002, it was C++ at the time. I think they switched to Java a year or two later.

      You're close. I took the AP test the last year it was C++. I was also taking Java with the same instructor, same room, the next period, so I kind of had the best and worst of both worlds. But the instructor was top notch and is regionally well known - I'm very sure he was the primary factor in nearly all of his AP students both passing the AP test and having a job in the industry. Those two classes got me through my first two years of college and put me in a unique position for learning low/high level languages ever since.

      That was 2003 when even the standard library was not nearly as defined and the boost/twisted libraries were still in their infancy. 2004 was the first year the AP comp. sci test was in Java and, IIRC, it was Java 1.4 when it was still reasonably fresh. These days I use primary Java and stumble through a handful of dynamic languages on an every day basis, but C++ still holds a special place in my heart - it's a shame I can't realistically use it in our production code; I really miss it.

      --

      If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

  17. Craptastic Summary by JustAnotherOldGuy · · Score: 2

    No offense, but this is a shit summary.

    I'm not even going to bother to parse it out or read the article, I have all the word-salad I need at the moment.

    --
    Just cruising through this digital world at 33 1/3 rpm...
    1. Re:Craptastic Summary by Chelloveck · · Score: 1

      Read the article? There is no article. There are six tweets (numbered and linked individually), a graph with data sets helpfully labeled "1", "2", "3", "4", and "5" but no other description, and a PDF of the test questions. And some comment about students not understanding the concept of "sparse arrays", but since the term is completely defined in the test materials I can only assume the real concern is that students can't be bothered to read the "unimportant" introductory material before trying to answer the actual test questions.

      --
      Chelloveck
      I give up on debugging. From now on, SIGSEGV is a feature.
  18. An indicator of your test results possibly... by SuperKendall · · Score: 1

    Normally I agree with complaints abut summaries, but this time I found the summary somewhat terse but pretty clear. I guess you were looking for definitions of some of the terms used?

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  19. TRWTF: List is used instead of Map by tepples · · Score: 1

    I'm on the autism spectrum, and I see "private member variables with no setters" as more than likely a class representing an immutable value, such as a decimal floating point value, a big integer value, a date, a string, or whatever. An immutable class sets its fields in its constructors, and then various getters return various transformations of these fields.

    Then I read the article, and I was right: sparse array entries are immutable. But the real WTF is that sparse array entries are stored in a List, not a Map. The getValueAt method in a sparse array backed by a List are O(n), whereas it'd be O(log(n)) if it used a Map.

    1. Re:TRWTF: List is used instead of Map by Simon+Brooke · · Score: 1

      Sparse array entries, in general, are not necessarily immutable, although they may be so in this case. Most spreadsheets are implemented as sparse arrays, for example. But your point about the benefit of a map is well made.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    2. Re:TRWTF: List is used instead of Map by Simon+Brooke · · Score: 1

      I should have read the linked questions before replying...

      Stupid, stupid, STUPID! Why have numRows and numCols in a sparse array? Things with unnecessary, arbitrary bounds annoy me. My implementation of Conway's Game of Life runs on a sparse array precisely because that allows the world to stretch arbitrarily in any direction a glider goes, limited only by the capacity of the bignum library and the total store available to the program.

      And this is how we teach computer science?

      Sigh.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    3. Re:TRWTF: List is used instead of Map by Anonymous Coward · · Score: 0

      Folks, have you forgotten how tasks in school usually don't involve actual real world solutions, but are excuses to present loosely related concepts? Instead of saying "open the reference book on page 107, linked list, and start reading", teachers provide a "motivation" for learning about linked lists, which in this case is a not at all practical implementation of a sparse array. The actual topic is the linked list, not the sparse array.

    4. Re:TRWTF: List is used instead of Map by Anonymous Coward · · Score: 0

      You had to go and turn this into a np problem. LOL

    5. Re:TRWTF: List is used instead of Map by tlhIngan · · Score: 2

      Stupid, stupid, STUPID! Why have numRows and numCols in a sparse array? Things with unnecessary, arbitrary bounds annoy me. My implementation of Conway's Game of Life runs on a sparse array precisely because that allows the world to stretch arbitrarily in any direction a glider goes, limited only by the capacity of the bignum library and the total store available to the program.

      Easy. How do you test that you're handling boundaries correctly?

      I mean, yeah, your bignum goes from negative infinity to positive infinity. But what happens as you approach those numbers?

      Also, how do you test that you're not arbitrarily limiting the results? More than one program has been caught in the 32-to-64 bit transition because they cast pointers to uint32's. (Enough that there's "uintptr_t" which is an int type big enough to cast a pointer to).

      So why not have a way to arbitrarily limit the size? Even better, add in the ability to adjust the boundaries. That way you can do testing on small, easily testable and quickly reproducible array sizes and nail down the most common bugs you'll encounter (especially ones that require wrap around handling), before you run more extensive tests.

      Plus, constants can be changed. One common test would be to change numRows and numCols and rebuild/re-run the test and make sure it handles the new value successfully and that it still works. You know, to make sure values like that aren't hard coded. (You may laugh, but enough people code "C:\Windows", or "C:\Program Files", to matter. It's basically assuming a constant will stay, well, constant, instead of checking. Apple threw Square Enix for a loop because Apple renamed the documents folder for storing volatile per-app content. Square Enix hardcoded their paths (despite Apple telling people HOW to do it properly), resulting in app breakage. Even worse, Square Enix's solution was "do not upgrade your phone/tablet". Apple threatened to withdraw their apps because of complaints, and within a week, new versions were released).

      So yeah, you may use bignums, but maybe someone internally decided 32 bit ints were good enough, because well, it's a test app and no one was going to actually run it long enough to verify. (Funny, in production, how often people hit limits we think are "too big"... see IPv4. Windows' 49 day bug, etc).

    6. Re:TRWTF: List is used instead of Map by Anonymous Coward · · Score: 0

      I got burnt when I cast pointers to int. How the heck was I supposed to know that a 64 bit flat architecture (pointer range compare across arrays = flat arch) would someday come along that still set int to 32 bits?

    7. Re:TRWTF: List is used instead of Map by tepples · · Score: 1

      Sparse array entries, in general, are not necessarily immutable, although they may be so in this case.

      The interface in the PDF describes a mutable sparse array with immutable entries. To assign a new value, you'd delete the entry and then add a new one.

    8. Re:TRWTF: List is used instead of Map by dmiller1984 · · Score: 1

      I teach APCS, and Maps are not a part of the tested curriculum. Maps in college are usually covered in a data structures class, not the intro CS class that APCS is meant to represent.

    9. Re:TRWTF: List is used instead of Map by tepples · · Score: 1

      How the heck was I supposed to know that a 64 bit flat architecture (pointer range compare across arrays = flat arch) would someday come along that still set int to 32 bits?

      How the heck were you supposed to know that your code would run on a flat architecture? Pointer range comparison across unrelated C arrays has been undefined behavior as long as I can remember. Besides, even among flat architectures, the common ABI for the 65816 has 24-bit pointers and 16-bit ints, and the common ABI for the 68000 has 32-bit pointers and 16-bit ints.

    10. Re:TRWTF: List is used instead of Map by ShanghaiBill · · Score: 1

      How the heck was I supposed to know that a 64 bit flat architecture would someday come along that still set int to 32 bits?

      By reading the standard, which explicitly states that only a long is guaranteed to hold a pointer. Or by running "lint" which is designed to catch silly newbie errors like this. Or by not using casts when you don't understand how they work.

  20. HR is part of the problem by tepples · · Score: 1

    "Working programmers" don't need degrees in computer science. They need diplomas or certificates in programming.

    If there are 90 people with a certificate in programming applying to a position and 10 with a B.Sc. in computer science, which resumes will HR prefer?

    1. Re:HR is part of the problem by Rockoon · · Score: 1

      If there are 90 people with a certificate in programming applying to a position and 10 with a B.Sc. in computer science, which resumes will HR prefer?

      The resumes asking for the lowest wage.

      --
      "His name was James Damore."
    2. Re:HR is part of the problem by Anonymous Coward · · Score: 0

      Except in practice, its more like "After 3 months, one person without any certs or degree applied for the job, and has relevant experience plus a decent Github folio. They get the job after negotiating salaries up like crazy because they were qualified and no one else applied because of the 200 other companies trying to hire that have 50 open positions".

      Its an amazing time to be in software.

    3. Re:HR is part of the problem by Anonymous Coward · · Score: 0

      It's simpler to explain that filtering by a degree dramatically reduces the noise, even if no where near perfect. the number of people applying for positions can many times be impossibly large. When I got my job, I asked my manager how many people applied, he told me about 3,000. You need to make that list manageable.

    4. Re:HR is part of the problem by Anonymous Coward · · Score: 0

      Correction: The resumes asking for the lowest wage, with a B.Sc. in computer science.

    5. Re:HR is part of the problem by HornWumpus · · Score: 1

      The EE, if they have any sense.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    6. Re:HR is part of the problem by ceoyoyo · · Score: 1

      I said need. You might want one because apparently hiring is done by people who don't know anything about the requirements of the jobs they're hiring for.

  21. This is AP? by Infiniti2000 · · Score: 1

    I took my AP computer science test way back in 1986 and while I don't have the test with me, I certainly remember it being A LOT harder than this. I could've finished this test in 20 minutes or so. Did I get better with age? Am I overestimating my high school computer science abilities? Or, have the standards fallen?

    1. Re:This is AP? by Anonymous Coward · · Score: 0

      I took the very First AP CS test (1984) and Sparse Arrays were one of the free response questions. I remember it well because I had never heard of them (I was self taught). The question was something like: Create a data structure to efficiently access a sparse array where the size could be up to xxx by yyy and on average 99% of the arrays are zero.

      I grasped enough of the question to get it right (made a five) but most of the people taking the test really didn't even understand pointers. The test was in Pascal, and just to run it on our Apple II computers without Hard Drives, you need to swap about 6 floppies in and out between editing and compiling.

      Remember this just lets you skip CS 101, it doesn't mean you are ready to graduate.

  22. What counts in a GitHub folio? by tepples · · Score: 1

    But what defines a "decent GitHub folio"? Does work in other programming languages count? Does work in other subfields of software engineering, such as video games vs. accounting software, count?