Programming 1

Put your programming skills to the test in these challenges.

Re: Programming 1

Post by thefeedinghand on Fri Feb 26, 2010 6:01 pm
([msg=35822]see Re: Programming 1[/msg])

I'm trying to do this with C, and it's pretty challenging, at least for me, it's definitely not a program with just a few lines of code.
thefeedinghand
New User
New User
 
Posts: 7
Joined: Wed Aug 05, 2009 6:14 pm
Blog: View Blog (0)


Re: Programming 1

Post by faazshift on Fri Feb 26, 2010 6:26 pm
([msg=35825]see Re: Programming 1[/msg])

thefeedinghand wrote:I'm trying to do this with C, and it's pretty challenging, at least for me, it's definitely not a program with just a few lines of code.

Well, I did this in python. After I got all the words, I used my own anagram solver to unscramble the words. I thought it was pretty simple. If you can make a C anagram solver and get the words, then it should be pretty quick and simple from there.
faazshift
Contributor
Contributor
 
Posts: 516
Joined: Wed Jun 03, 2009 3:55 pm
Location: Riverton, Utah
Blog: View Blog (0)


Re: Programming 1

Post by Valparaiso on Sat Feb 27, 2010 5:56 pm
([msg=35876]see Re: Programming 1[/msg])

Good challenge, enjoyed it.

Used Python, didn't go as far as to automate the full thing :)

I haven't been able to check the entire forum out yet, but is there a solution area where we can all post solutions? I would imagine this is particularly handy for these programming assignments. In this case, it would be interesting to see which solution is the fastest and/or most efficient. I'm sure the people on here who seem to get close or go over the 30 seconds limit would be able to pick up a lot of good ideas/learn something when they can see alternative solutions.
Valparaiso
New User
New User
 
Posts: 4
Joined: Sat Feb 27, 2010 5:51 pm
Blog: View Blog (0)


Re: Programming 1

Post by eljonto on Sat Feb 27, 2010 6:42 pm
([msg=35877]see Re: Programming 1[/msg])

Valparaiso wrote:Good challenge, enjoyed it.

Used Python, didn't go as far as to automate the full thing :)

I haven't been able to check the entire forum out yet, but is there a solution area where we can all post solutions? I would imagine this is particularly handy for these programming assignments. In this case, it would be interesting to see which solution is the fastest and/or most efficient. I'm sure the people on here who seem to get close or go over the 30 seconds limit would be able to pick up a lot of good ideas/learn something when they can see alternative solutions.


Nah there can't be a section like that, all the noobs would go there and get the answers. A section like that could only exist if you could only view it once you had completed the said mission- and that wouldn't benefit the people still trying to complete it.
-Quis custodiet ipsos custodes?, Juvenal
_________________________________________________________________
User avatar
eljonto
Poster
Poster
 
Posts: 373
Joined: Thu Apr 17, 2008 1:16 am
Location: Australia
Blog: View Blog (0)


Re: Programming 1

Post by Valparaiso on Sun Feb 28, 2010 3:35 am
([msg=35898]see Re: Programming 1[/msg])

eljonto wrote:Nah there can't be a section like that, all the noobs would go there and get the answers.


I disagree. So what if the "noobs" go there and get the solution? Why is this some sort of unspeakable evil? Isn't learning something the whole point?

I can understand you're trying to force people to find a solution by themselves (which is a noble cause), but in my opinion there's a large group of people who are going to give up on certain challenges simply because they're too hard. You tell those people to go and "RTFM", which may be true but rather harsh. The pro here is that you're excluding the unmotivated, the con (again; imo) is that you're depriving everyone from a better solution because of "the noobs".

eljonto wrote:A section like that could only exist if you could only view it once you had completed the said mission- and that wouldn't benefit the people still trying to complete it.


I disagree again. What you say is true, but it would also benefit the people who have already completed it, but (in this instance) had a hard time doing so. The people who have solved this, but had a hard time completing it in under 30 seconds have "solved" it, but they have done so in an inefficient and slow way. By providing them with other solutions, they'll at least get a chance to really learn something. Something that you can't find in manuals, tutorials and reference guides. The very nature of these programming challenges means that there's a sizeable grey area where you can solve something but not do so very well.

(Not trying to start an argument here, just a civil discussion on the pro's and con's of solutions)
Valparaiso
New User
New User
 
Posts: 4
Joined: Sat Feb 27, 2010 5:51 pm
Blog: View Blog (0)


Re: Programming 1

Post by faazshift on Sun Feb 28, 2010 12:50 pm
([msg=35904]see Re: Programming 1[/msg])

Valparaiso wrote:I disagree. So what if the "noobs" go there and get the solution? Why is this some sort of unspeakable evil? Isn't learning something the whole point?

I can understand you're trying to force people to find a solution by themselves (which is a noble cause), but in my opinion there's a large group of people who are going to give up on certain challenges simply because they're too hard. You tell those people to go and "RTFM", which may be true but rather harsh. The pro here is that you're excluding the unmotivated, the con (again; imo) is that you're depriving everyone from a better solution because of "the noobs".

Well, if someone doesn't really have to work for the answer (ie. spoon-fed), they wont learn that trait which is so necessary in this field. One must learn to think through things themselves, be creative, and learn things that will stick with them beyond maybe a few weeks or months. If you are always expecting something to be given to you, there isn't much room for growth and self-sufficiency.

Valparaiso wrote:I disagree again. What you say is true, but it would also benefit the people who have already completed it, but (in this instance) had a hard time doing so. The people who have solved this, but had a hard time completing it in under 30 seconds have "solved" it, but they have done so in an inefficient and slow way. By providing them with other solutions, they'll at least get a chance to really learn something. Something that you can't find in manuals, tutorials and reference guides. The very nature of these programming challenges means that there's a sizeable grey area where you can solve something but not do so very well.

I know there are missions that I can't complete yet. I haven't yet thought through a good OCR algorithm, so I can't complete certain missions. Still, I don't even want to have it handed to me. I have enjoyed the process of thinking through things on my own. Of course there will be a considerable "grey area", but this just means theres more than one correct answer. If the algorithm is slow or poorly written, you can re-think it. If you want to write it in another language, go ahead. But to have a dependence on someone elses solution is completely contrary to the whole idea of a "hacker". These missions weren't intended to be easy, they were intended to help you learn what "hacking" really is.
faazshift
Contributor
Contributor
 
Posts: 516
Joined: Wed Jun 03, 2009 3:55 pm
Location: Riverton, Utah
Blog: View Blog (0)


Re: Programming 1

Post by sanddbox on Sun Feb 28, 2010 1:01 pm
([msg=35905]see Re: Programming 1[/msg])

The truth is that the people that can't complete the missions by themselves don't have what it takes.

Sorry.
Image

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat
User avatar
sanddbox
Expert
Expert
 
Posts: 2331
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)


Re: Programming 1

Post by Valparaiso on Sun Feb 28, 2010 1:03 pm
([msg=35906]see Re: Programming 1[/msg])

faazshift wrote:I know there are missions that I can't complete yet. I haven't yet thought through a good OCR algorithm, so I can't complete certain missions. Still, I don't even want to have it handed to me. I have enjoyed the process of thinking through things on my own. Of course there will be a considerable "grey area", but this just means theres more than one correct answer. If the algorithm is slow or poorly written, you can re-think it. If you want to write it in another language, go ahead. But to have a dependence on someone elses solution is completely contrary to the whole idea of a "hacker". These missions weren't intended to be easy, they were intended to help you learn what "hacking" really is.

Why does the potential availability of a better solution necessarily mean that there is a "dependency" on it? No one is forcing you to adopt or even look at anyone else's solution(s). If you're determined to do it yourself then that's fine, good on you.

IMO, it's a real waste to not share knowledge and information, especially amongst like-minded people. We can't all invent the same thing 100 times over. I'm not a particularly bad programmer, but I recognise I'm not gifted either, so I jump on any opportunity to learn something from other people's code. I find this "do it all yourself" mentality rather idealistic and nonsensical.

By the way: is it OK to post articles with code samples for a particular challenge, or is that disallowed as well?
Valparaiso
New User
New User
 
Posts: 4
Joined: Sat Feb 27, 2010 5:51 pm
Blog: View Blog (0)


Re: Programming 1

Post by sanddbox on Sun Feb 28, 2010 1:09 pm
([msg=35907]see Re: Programming 1[/msg])

Valparaiso wrote:
faazshift wrote:I know there are missions that I can't complete yet. I haven't yet thought through a good OCR algorithm, so I can't complete certain missions. Still, I don't even want to have it handed to me. I have enjoyed the process of thinking through things on my own. Of course there will be a considerable "grey area", but this just means theres more than one correct answer. If the algorithm is slow or poorly written, you can re-think it. If you want to write it in another language, go ahead. But to have a dependence on someone elses solution is completely contrary to the whole idea of a "hacker". These missions weren't intended to be easy, they were intended to help you learn what "hacking" really is.

Why does the potential availability of a better solution necessarily mean that there is a "dependency" on it? No one is forcing you to adopt or even look at anyone else's solution(s). If you're determined to do it yourself then that's fine, good on you.

IMO, it's a real waste to not share knowledge and information, especially amongst like-minded people. We can't all invent the same thing 100 times over. I'm not a particularly bad programmer, but I recognise I'm not gifted either, so I jump on any opportunity to learn something from other people's code. I find this "do it all yourself" mentality rather idealistic and nonsensical.

By the way: is it OK to post articles with code samples for a particular challenge, or is that disallowed as well?


I disagree. There's a lot of value in reinventing the wheel (speaking of which, I think faaz blogged about that).
Image

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat
User avatar
sanddbox
Expert
Expert
 
Posts: 2331
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)


Re: Programming 1

Post by faazshift on Sun Feb 28, 2010 1:32 pm
([msg=35908]see Re: Programming 1[/msg])

Valparaiso wrote:Why does the potential availability of a better solution necessarily mean that there is a "dependency" on it? No one is forcing you to adopt or even look at anyone else's solution(s). If you're determined to do it yourself then that's fine, good on you.

IMO, it's a real waste to not share knowledge and information, especially amongst like-minded people. We can't all invent the same thing 100 times over. I'm not a particularly bad programmer, but I recognise I'm not gifted either, so I jump on any opportunity to learn something from other people's code. I find this "do it all yourself" mentality rather idealistic and nonsensical.

This community is about showing you your resources and sharing knowledge. Its not about giving the answers, but helping you to figure out the answer (or an answer) on your own. Basically community-assisted self-help.

Valparaiso wrote:By the way: is it OK to post articles with code samples for a particular challenge, or is that disallowed as well?

As long as you don't post full solutions, but rather small parts, I think you are ok. As you may or may not have noticed, this particular sub-forum doesn't have the warning not to post spoilers. As such, I think you are just not supposed to post full answers. You can even explain how you did what you did (as I have) without giving up the answer and preventing others the opportunity of learning.

-- Sun Feb 28, 2010 11:33 am --

sanddbox wrote:I disagree. There's a lot of value in reinventing the wheel (speaking of which, I think faaz blogged about that).

http://faazshift.blogspot.com/2009/12/why-re-invent-wheel.html
faazshift
Contributor
Contributor
 
Posts: 516
Joined: Wed Jun 03, 2009 3:55 pm
Location: Riverton, Utah
Blog: View Blog (0)


PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests