Ideas for first program

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Ideas for first program

Post by R_I_P1337 on Fri Jul 25, 2008 11:05 am
([msg=8249]see Ideas for first program[/msg])

Hi,
I was just wondering if anyone can give me any ideas I can do for my first program in Python. I decided that I learn best when I actually do things, so I'm going to write a program, but I don't no what to do. Can anyone give me ideas for one, please?
R_I_P1337
New User
New User
 
Posts: 17
Joined: Thu Jun 19, 2008 2:21 pm
Blog: View Blog (0)


Re: Ideas for first program

Post by nathandelane on Fri Jul 25, 2008 11:24 am
([msg=8252]see Re: Ideas for first program[/msg])

Here are some ideas.

  • Web crawler - program a program that makes HTTP GET requests and crawls the web
  • Text file analysis program - program a program that searches text files in a directory for a certain text or pattern, and that can tell you how many of each letter, word, etc. is in a specific file (like the grep command on Linux, you can google that if you don't know what it is)
  • Small language parser - program a simple language (could simply use op-codes like $ means println) and parser for the language, then test it using your own little scripts

These are a few projects that I myself have done and have found useful in learning how to program. They are pretty simple and small projects. If you need help, I can be your guide at no cost to you.
Me, Nathandelane, Highly influential to Hackerdom, Premature Optimization=http://c2.com/cgi/wiki?PrematureOptimization
User avatar
nathandelane
Poster
Poster
 
Posts: 204
Joined: Thu Jun 26, 2008 11:26 am
Location: Utah
Blog: View Blog (0)


Re: Ideas for first program

Post by R_I_P1337 on Fri Jul 25, 2008 12:09 pm
([msg=8257]see Re: Ideas for first program[/msg])

Thanks again
R_I_P1337
New User
New User
 
Posts: 17
Joined: Thu Jun 19, 2008 2:21 pm
Blog: View Blog (0)


Re: Ideas for first program

Post by sync350 on Mon Aug 11, 2008 1:24 am
([msg=9351]see Re: Ideas for first program[/msg])

nathandelane, What language would be best for the Web crawler program? I've been using perl, but trying to ease my way back into C++. I'm thinking that perl would be easier to make that with, but could it be done in C++?
sync350
New User
New User
 
Posts: 20
Joined: Sat Aug 02, 2008 9:48 am
Location: Atlanta
Blog: View Blog (0)


Re: Ideas for first program

Post by mutants_r_us_guild on Mon Aug 11, 2008 6:28 am
([msg=9355]see Re: Ideas for first program[/msg])

Here's a fun project:

Build a bot for an online website... and I dont mean like Runescape.. that's been done before. I was gonna make a bot for a site called pokemoncrater a while back.. but the site closed before I could. Making a bot for an online pokemon game, or something else like that wouldn't be too hard (depending on the language) and would be a great start. :P
Image
Image
Image
User avatar
mutants_r_us_guild
Poster
Poster
 
Posts: 246
Joined: Fri May 30, 2008 7:56 pm
Blog: View Blog (0)


Re: Ideas for first program

Post by nathandelane on Mon Aug 11, 2008 4:33 pm
([msg=9401]see Re: Ideas for first program[/msg])

sync350 wrote:nathandelane, What language would be best for the Web crawler program? I've been using perl, but trying to ease my way back into C++. I'm thinking that perl would be easier to make that with, but could it be done in C++?


I've programmed web crawlers in Ruby, C#, VBScript, and Java. The best language in my opinion would be one the implements a Http Request class of some kind, unless you can program your own from the Socket level classes. .NET implements this very well in System.Net.HttpWebRequest. Java, Ruby, and VBScript do something similar. Perl probably does this in some way, but I don't know Perl very well. Basically look for a Net namespace, package or library. In that look for an Http object or a WebRequest object, or something similar. Besides that you have to parse HTML somehow. Regular expressions work well but are relatively slow. In C# I use a framework named HtmlAgilityPack, which parses it for you and allows you to look for specific XML-based tags by using XPath.

I hope that helps you know where I'm coming from.

You could also easily program a web crawler in web-languages, like JavaScript, PHP, and ASP or ASP.Net (which is either VB.NET or C#.NET based depending on your personal preference).
Me, Nathandelane, Highly influential to Hackerdom, Premature Optimization=http://c2.com/cgi/wiki?PrematureOptimization
User avatar
nathandelane
Poster
Poster
 
Posts: 204
Joined: Thu Jun 26, 2008 11:26 am
Location: Utah
Blog: View Blog (0)


Re: Ideas for first program

Post by nathandelane on Mon Aug 11, 2008 4:34 pm
([msg=9402]see Re: Ideas for first program[/msg])

mutants_r_us_guild wrote:Here's a fun project:

Build a bot for an online website... and I dont mean like Runescape.. that's been done before...


No matter if something has been done before or not, if it benefits you in learning how to do something, then redo it. You might make it better somehow even.
Me, Nathandelane, Highly influential to Hackerdom, Premature Optimization=http://c2.com/cgi/wiki?PrematureOptimization
User avatar
nathandelane
Poster
Poster
 
Posts: 204
Joined: Thu Jun 26, 2008 11:26 am
Location: Utah
Blog: View Blog (0)


Re: Ideas for first program

Post by beagle on Wed Aug 13, 2008 10:58 am
([msg=9562]see Re: Ideas for first program[/msg])

You could make a port scanner.
011000100110010101100001011001110110110001100101
beagle
Poster
Poster
 
Posts: 244
Joined: Wed Jul 02, 2008 2:37 pm
Location: Chico, CA
Blog: View Blog (0)


Re: Ideas for first program

Post by lolbolt on Tue Sep 02, 2008 12:45 pm
([msg=10800]see Re: Ideas for first program[/msg])

BUMP.
I want to hear some more excellent ideas.
lolbolt
New User
New User
 
Posts: 1
Joined: Tue Sep 02, 2008 12:41 pm
Blog: View Blog (0)


Re: Ideas for first program

Post by XP105 on Sat Sep 20, 2008 3:34 pm
([msg=12117]see Re: Ideas for first program[/msg])

First program should always be 'hello world' :P
XP105
New User
New User
 
Posts: 3
Joined: Sat Sep 20, 2008 3:16 pm
Blog: View Blog (0)


Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests