levik
2003-04-23 08:34:35 |
Computer/Programming puzzles
I myself am a programmer by trade, though I focus more on web-related stuff than hard-core optimization/design/algorithms. I know that a number of other users on this site have at least some knoweledge of computer programming as well.
I was thinking recently of having a computer programming category on this site (potentially this could turn into a whole sub-tree if we get a lot of such puzzles). Such problems could involve such things as clever tricks, semi-obscure algorithms, or perhaps even original or real-life problems.
I'm just wondering what others would think about this before I add a new category, or look for puzzles. |
Ravi Raja
2003-04-23 08:52:03 |
Re: Computer/Programming puzzles
That's a good idea Levik. Tow or three of my problems too have been solved using Programming and I am sure there are many problems which can be solved in that manner. So what are you waiting for Levik. You can go ahead with your work.
I believe others agree with me. Let's see. ;) |
Gamer
2003-04-23 11:08:41 |
Re: Computer/Programming puzzles
I don't know what you'd put in here that wouldn't go into other slots? I would worry that problems you'd need programs for might exclude anyone who wasn't a programmer... |
levik
2003-04-23 11:25:34 |
Re: Computer/Programming puzzles
No, you guys misunderstood me. I wasn't talking about problems that you would need to write a program to solve. What I meant was problems about programming.
For example: what's a good way to sort an array of 10 numbers? N numbers? Does the answer change depending on N?
I believe such puzzles can be of a lot of interest to people who are into math and know even a little about programming and algorithms. And I would also have to think of a good way to not have these problems intimidate others.
For example, perhaps an option (on by default) that would prevent these problems showing up on the front page (you would have to click on the category to see them). I once considered doing this for Calculus problems, but there were never enough of them on the site to bother. |
friedlinguini
2003-04-23 12:27:23 |
Re: Computer/Programming puzzles
I'm a little skeptical. Problems like this would be very domain dependent. The answer to your sorting question would look very different depending on whether you're using assembly, C++, SQL, Prolog, or something else. I'd say take a page from the Extreme Programming camp and wait until you have some problems before you worry about the category. |
levik
2003-04-23 12:56:34 |
Re: Computer/Programming puzzles
Hmmm... Perhaps sorting is a bad example. Here's another one, which I think is really interesting: (I read this on the forums of the TechInterview.Org website.)
Suppose you have some function that is able to generate a random number between 1 and 5. Using this, how would you generate a truly random number between 1 and 7?
I would have liked to submit it to the queue if we had a computer section, but am willing to sacrifice it to illustrate my point. :) |
Cory Taylor
2003-04-23 13:54:25 |
Re: Computer/Programming puzzles
I think that more categories are fine - each user is going to chose on their own which categories etc. they bother with, but I don't think that programming problems would "scare" away very many people here, though there might be a number who aren't interested in them. For example, I rarely give more than a few seconds to a riddle, but I log in about 50,000 times a day anyways.
If you're adverse to creating a group for this, remember that a problem can often fit into more than one category. As a point in fact, I've come up with a preliminary thought about your 1-7 problem that could place it in probabilities" (assuming that my idea works).
I guess that the bottom line is that we shouldn't be losing problems for a lack of a category to house them. (Lateral thinking puzzles anyone?) |
Charlie
2003-04-23 18:28:27 |
Re: Computer/Programming puzzles
I am certainly in favor of a computer programming category. I've certainly used computer programs to help solve other puzzles, and puzzles specifically geared for programming would definitely be interesting. |
Gamer
2003-04-24 01:52:13 |
Re: Computer/Programming puzzles
Oh... It sounds like a fun idea... I agree with what Cory said. |
Brian Smith
2003-04-24 06:23:21 |
Re: Computer/Programming puzzles
Im interested in a computer/programming category too. But caution needs to be excersized so that the problems do not become like computer programming assignments. |
levik
2003-04-24 18:48:43 |
Re: Computer/Programming puzzles
Dang!
I was actually looking for a sneaky way to offload the task of programming new features onto my visitors :) |
Charlie
2003-04-28 09:16:26 |
Re: Computer/Programming puzzles
So, is the Algorithms category that Tim is asking about in the main Chatterbox the new puzzle category for Computer/Programming puzzles? Since it's there, I assume it's open for submissions. Are solutions to be provided in a sort of pseudo-code and perhaps exemplified by a reasonable programming language? |
Gamer
2003-04-28 12:35:38 |
Re: Computer/Programming puzzles
I wondered about giving a solution too. I wanted to show a solution like I did with my other submissions, but I thought would that put too much emphasis on one way to do it? |
Brian Smith
2003-04-29 09:25:34 |
Re: Computer/Programming puzzles
When should we expect the first computer/programming type puzzles to appear? |
friedlinguini
2003-04-29 11:22:01 |
Re: Computer/Programming puzzles
Dunno. Have you written one yet? |
levik
2003-04-30 02:28:17 |
Re: Computer/Programming puzzles
I have submitted a couple that are in the queue now, and everyone who wants to should feel free. Perhaps I may even push one out of order so that the category at least has one problem in it.
As far as solutions go, as with many existing problems on the site, some things can be done in different ways, but there is sometimes a best known way to do them. Excersise judgement (as always). When asked how to swap two integers without a third variable, you may find it more useful to explain the process than to provide the code (which will not be immediately obvious).
Perhaps it may be time to come back to the attachment idea after all. |
Ravi Raja
2003-04-30 04:53:51 |
Re: Computer/Programming puzzles
Levik, you can submit a problem without even bringing it in the queue. So why don't you post two Model Problems of these type in the corresponding category so that others get a clear idea of it. A maximum of two (ONLY FROM YOU) will do and then the rest will follow the proper rules and will then be submitted. That is, from the list to the queue and then from the queue to the site. What do you and others have to say for this? Please comment. Just an idea from my part. Thank You. |
Jon
2003-04-30 07:28:49 |
Re: Computer/Programming puzzles
I agree with ravi. It will be a while before any make it through the queue system. I don't think any one has a problem with posting up one or two of these types of problems to get them going. I would like to see this kind so I can try them out. Anyone else? |
levik
2003-04-30 07:52:15 |
Re: Computer/Programming puzzles
I don't think that would be fair. Here's what we'll do:
There's already a submission from Gamer that is for that category, and it's pretty good.
I will wait a couple of days, and then pick one that I think is the best illustration of the type of puzzle that should be in the category, and push it out of turn (It will be one of the two problems pushed on that day - the other will go through regular voting)
So submit away! |