tag:blogger.com,1999:blog-6555947.post2638819802707411307..comments2024-03-14T01:32:43.610-06:00Comments on The Geomblog: programming assignmentsSuresh Venkatasubramanianhttp://www.blogger.com/profile/15898357513326041822noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-6555947.post-45667189421826553692008-12-04T12:13:00.000-07:002008-12-04T12:13:00.000-07:00During my undergrads, my learned a lot about algor...During my undergrads, my learned a lot about algorithms by participating in the ACM online judge. The problems there really provide good understanding of an algorithm. But as a past participant as well as a contributor to the problemset archive, I warn you about one problem of using the system for course assignments: there are many active "code-exchangers" out there, who check the online status to locate people who want to exchange source codes.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-13968042322736922102008-12-04T00:28:00.000-07:002008-12-04T00:28:00.000-07:00Is it really the case that DS&A classes in the...Is it really the case that DS&A classes in the U.S. do not have compulsory programming exercises to implement some of the more fundamental data structures and algorithms?! WTF? No wonder a majority of the programmer applicants I see are totally unfit for anything but flipping burgers!Christer Ericsonhttps://www.blogger.com/profile/12641617282440449995noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-4860856528731357572008-12-03T23:36:00.000-07:002008-12-03T23:36:00.000-07:00You can consider using an online judge other than ...You can consider using an online judge other than that one (UVa's); I can tell you from experience that <A HREF="http://www.spoj.pl/" REL="nofollow">Sphere Online Judge</A> is far more reliable and less flaky, and has clearer problem statements and I/O specifications. It also has lots of computational geometry problems, like <A HREF="https://www.spoj.pl/problems/BSHEEP/" REL="nofollow">BSHEEP</A> and <A HREF="https://www.spoj.pl/problems/FSHEEP/" REL="nofollow">FSHEEP</A>, but they're somewhat hard to find...<BR/><BR/>Some other online judges let you organise your own "contests", though, where you can upload your own problems and test data, and have looser time limits. That might help with the Java problem, and even to simplify grading.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-43250183223406332582008-12-03T22:50:00.000-07:002008-12-03T22:50:00.000-07:00Yay~Yay~Michael Mitzenmacherhttps://www.blogger.com/profile/02161161032642563814noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-87347015766717730672008-12-03T19:49:00.000-07:002008-12-03T19:49:00.000-07:00From a grading point of view, it's very painful to...<I>From a grading point of view, it's very painful to evaluate each person's submission. There's no easy way except to do it manually.</I><BR/><BR/>Obviously it's easy to test for correctness and performance...so what else are you evaluating? Or do you mean the lack of a batch operation is what's painful?Jonathanhttps://www.blogger.com/profile/18281967177874276204noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-11439079692768760462008-12-03T19:39:00.000-07:002008-12-03T19:39:00.000-07:00Take a look at the algorithm competitions at http:...Take a look at the algorithm competitions at http://www.topcoder.com/tc. They have well designed problems, and a very nice server side compilation/editing environment. I don't think they keep stats on execution time, but instead have a hard execution time limit for problems. Getting under the limit often requires some pretty deep thinking about algorithms.<BR/><BR/>One downside, from an instructor's viewpoint, is that solutions are available for all old problems.<BR/><BR/>The focus of the site is on live competitions, where everyone has the same 90 minutes (or so) to complete 3 problems. But all old problems can be worked on anytime using the same software, as long as there is no live competition going on.Jonathanhttps://www.blogger.com/profile/18281967177874276204noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-15474915879916901672008-12-03T17:13:00.000-07:002008-12-03T17:13:00.000-07:00What algorithms in a computational geometry course...What algorithms in a computational geometry course would you turn into programming assignments? <BR/><BR/>The kind of basic functionalities that need to be available to students depend on the answer to this question. I wonder if this is the main bottleneck in actually doing this.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-91869224379173782762008-12-03T13:03:00.000-07:002008-12-03T13:03:00.000-07:00There's stuff like the Sphere Online Judge, Projec...There's stuff like the Sphere Online Judge, Project Euler, and of course TopCoder...Rohan Sharmahttps://www.blogger.com/profile/11014201732055198675noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-29859280522617874542008-12-03T12:57:00.000-07:002008-12-03T12:57:00.000-07:00ACM competitions are lots of fun. Your requiremen...ACM competitions are lots of fun. Your requirement might get some of your students interested in programming contests, which will have the side benefit of making students much better prepared for interviews with tech companies.rrenaudhttps://www.blogger.com/profile/00268587839942674447noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-7544642495617484232008-12-03T10:40:00.000-07:002008-12-03T10:40:00.000-07:00"You think you know when you can learn, are more s..."You think you know when you can learn, are more sure when you can write, even more when you can teach, but certain when you can program. " Alan J. Perlis<BR/><BR/>Encourage your students to visit www.topcoder.com, where programming contests are organized on a platform similar to the one you use. There is an "algorithm" category, and people who shine there are hired by G**gle and other companies.Anonymoushttps://www.blogger.com/profile/07335339937383840943noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-88481773113197193372008-12-03T08:54:00.000-07:002008-12-03T08:54:00.000-07:00Hi Suresh,I'm not sure if you're aware, but I just...Hi Suresh,<BR/><BR/>I'm not sure if you're aware, but I just wanted to let you know there are several other online judges that are nice: http://www.spoj.pl/, http://acm.uva.es/problemset/, http://acm.sgu.ru/, and http://acm.zju.edu.cn/onlinejudge/. I personally prefer SPOJ. You said you might consider designing problems from scratch in the future. If so, you might want to try contacting the SPOJ development team (contact@spoj.pl) to be granted permissions to upload your own problems. You can then log in SPOJ as a judge and view all code submissions to your problems, and students both in your class and around the world can learn from the problems you create. SPOJ also lets you put problems into a timed contest, if you have use to do so.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-8869031838997607852008-12-03T08:14:00.000-07:002008-12-03T08:14:00.000-07:00Suresh,I also think a change like this would benef...Suresh,<BR/><BR/>I also think a change like this would benefit Penn State students (more generally, theory should be incorporated into the intro programming sequence and programming should be a part of the theory courses). <BR/><BR/>But, a question:<BR/><BR/>Did you change the wording of the problems at all? I've found that resourceful but lazy students often go looking for solutions online. (I've found that for theoretical problems; I imagine it would be worse with short-answer programming questions).<BR/><BR/>That entails a lot of effort rewording (or inventing) problems so they still sound natural but don't match the original too closely. <BR/><BR/>(How) did you handle this? <BR/><BR/>-adamAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6555947.post-17792403492413379122008-12-03T05:32:00.000-07:002008-12-03T05:32:00.000-07:00This comment has been removed by the author.rgrighttps://www.blogger.com/profile/02991214367108471744noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-23145884482345725572008-12-03T05:03:00.000-07:002008-12-03T05:03:00.000-07:001. The reason you don't get details for a run-...1. The reason you don't get details for a run-time error, time-limit exceeded, and wrong answer is that almost any further detail can be exploited to reverse engineer the test input and it's supposed to be your job to design your own tests and make sure your program works. In fact, even the fact that there are three possible failures gives you lg(3) bits of information about the input :) and can be exploited. But it's a bit too painful.<BR/><BR/>2. The test data is not always great. For example, I "solved" an SCC problem on that online judge (best time&space usage, even) before embarrassing myself by "proving" a wrong algorithm on my blog.<BR/><BR/>3. On http://spoj.pl you can setup your own problems (if you send an email and ask for the right to do it) and you can write custom validators. This sounds like the easiest way to go for your randomized algo assignments.<BR/><BR/>4. The most common Java "slowness" is the I/O. In fact, it's not really slow: If you use C-style functions (e.g., get one char at a time) then you get similar performance. You are penalized only when you use higher level abstractions like Scanner. So if you give the students one Java function that reads integers quickly you get rid of 90% Java performance problems.rgrighttps://www.blogger.com/profile/02991214367108471744noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-44043658503832083802008-12-03T01:49:00.000-07:002008-12-03T01:49:00.000-07:00So do it.Think through, reasonably systematically,...So do it.<BR/><BR/>Think through, reasonably systematically, what the major algorithmic questions in computational geometry are. Then think through how to construct examples that would fail with a naïve implementation and work with a good implementation.<BR/><BR/>I imagine things like<BR/>"Given a points sequence defining a polygon and a point, write a function to determine whether the point is inside or outside the polygon" and then have "official" test cases with the more obvious things to feed into the algorithm, and a "grading" test case with, say, very many edges... Or "Given a sequence of points defining a polygon determine whether it is convex", with similar choices.<BR/><BR/>It seems like it would be a bit of work to do the ground work, as it were, but a reasonable amount for a geometer who knows the field, and one that might well generate a LOT of interest once it exists.<BR/><BR/>Things like the grading server already exist, and it probably is rather easy to configure it to deal with new problems, so it's really about the problems more than the technology.michiexilehttps://www.blogger.com/profile/00008302080954798496noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-81598549360616846292008-12-03T01:47:00.000-07:002008-12-03T01:47:00.000-07:00I also just did something similar in a course base...I also just did something similar in a course based on the Kleinberg–Tardos book, but avoided the on-line judge. I gave the students lots of files with matched input-output pairs for each assignment, to they basically evaluated their own code. This makes the task a lot easier for <I>them</I> (because they can do aggressive and constructive debugging, instead of reacting to the one-bit responses from the online judge) and burdens me with minimal technical problems. Students were also allowed to use any programming language they wanted, which would not be possible with the online system.<BR/><BR/>Another problem with the programming contest exercises is that you can find crisp solutions online using google. So I felt I had to cook up my own programming exercises anyway.Thore Husfeldthttps://www.blogger.com/profile/14937584058954877153noreply@blogger.comtag:blogger.com,1999:blog-6555947.post-23827378106262238952008-12-02T23:19:00.000-07:002008-12-02T23:19:00.000-07:00If you're not already aware of it, you might be in...If you're not already aware of it, you might be interested in Project Euler. Theory/math problems where the answer is reduced to a single integer. The harder ones are very cleverly chosen.Jay Kominekhttps://www.blogger.com/profile/10329111965764211579noreply@blogger.com