Programming 1

Put your programming skills to the test in these challenges.

Programming 1

Post by Gentarou on Tue Aug 18, 2015 7:34 am
([msg=89398]see Programming 1[/msg])

Hi everyone. I decided to try with the programming missions, but I'm fighting against those countdowns.
I already did Programming 12 by copy-pasting as fast as I could, but that way I probably missed the most important (and useful to learn) part - how to input the answer directly.
I actually need this for other problems of mine that require this kind of "automatic" way of communicating with the web. I'd like to use these mission to practice. So, does anyone know where can I learn how to do this? (Already googled, I don't really no what to search for :/)
Gentarou
New User
New User
 
Posts: 9
Joined: Tue Feb 25, 2014 2:12 pm
Blog: View Blog (0)


Re: Programming 1

Post by x509 on Tue Aug 18, 2015 7:44 am
([msg=89399]see Re: Programming 1[/msg])

One of the easiest ways would be to use JavaScript since it's already able to communicate with the browser easily. So you could get something like greasemonkey, create your solution in that, and then change the form input with it, and submit the solution that way. This could be achieved by creating an object of the specific form (such as document.forms[0]) and then modifying the attributes to what you need (document.forms[0].solution = "blah" for example) and then submitting it.
However, if you do not want to use JavaScript, there are frameworks in many languages that will allow you communicate with websites like a browser (For example, Mechanize, Selenium, BeautifulSoup, etc)
User avatar
x509
New User
New User
 
Posts: 16
Joined: Sun Aug 09, 2015 1:47 am
Blog: View Blog (0)


Re: Programming 1

Post by Gentarou on Tue Aug 18, 2015 8:04 am
([msg=89400]see Re: Programming 1[/msg])

You think i could write the entire algorithm in JavaScript? Isn't it too slow?
Anyway I'd rather not use other applications, but find how to solve the whole problem with my own code (unless it gets too long and hard). The purpose is learning and practicing, more than completing missions :D
Thanks for your help!
Gentarou
New User
New User
 
Posts: 9
Joined: Tue Feb 25, 2014 2:12 pm
Blog: View Blog (0)


Re: Programming 1

Post by x509 on Tue Aug 18, 2015 8:14 am
([msg=89401]see Re: Programming 1[/msg])

Gentarou wrote:You think i could write the entire algorithm in JavaScript? Isn't it too slow?
Anyway I'd rather not use other applications, but find how to solve the whole problem with my own code (unless it gets too long and hard). The purpose is learning and practicing, more than completing missions :D
Thanks for your help!


JavaScript might be too slow for some of the challenges, but for Programming challenge 1 it's definitely capable of doing this. I don't know what you mean by "Not using other application" as that's all you really do anyways. Using Ruby, Python, C++, that's all just languages someone else developed. I'm sure anyone else in here will back me up by saying that you will have a horrid time trying to manually write your own web browsing framework in the language you are using. It's like saying you don't want to use GDB to debug applications because someone else wrote GDB, although just using it does nothing for you. You have to learn the module/framework and make it do what you need it to do in order to get anywhere with it.
Good luck!
User avatar
x509
New User
New User
 
Posts: 16
Joined: Sun Aug 09, 2015 1:47 am
Blog: View Blog (0)


Re: Programming 1

Post by Gentarou on Tue Aug 18, 2015 8:24 am
([msg=89402]see Re: Programming 1[/msg])

Hmmm, maybe you're right.
Thanks a lot! :)
Gentarou
New User
New User
 
Posts: 9
Joined: Tue Feb 25, 2014 2:12 pm
Blog: View Blog (0)


Re: Programming 1

Post by patanon on Mon Dec 21, 2015 3:38 pm
([msg=91009]see Re: Programming 1[/msg])

i hope im gonna be clear...
im not sure what i have to do.
do i need to find the algorithm to unscramble the words ? or i can output the answer before the words get scrambled?
where the words get scrambled: client or server side ?
patanon
New User
New User
 
Posts: 1
Joined: Mon Nov 02, 2015 11:03 pm
Blog: View Blog (0)


Re: Programming 1

Post by cyberdrain on Wed Dec 23, 2015 10:19 am
([msg=91029]see Re: Programming 1[/msg])

The words are scrambled server side, so there is no weakness in that system. You probably can't find out the algorithm to unscramble the words so you need to find another way to do it. At least you have a list of unscrambled words you can take advantage of.
Free your mind / Think clearly
User avatar
cyberdrain
Expert
Expert
 
Posts: 2160
Joined: Sun Nov 27, 2011 1:58 pm
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests