Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From experience I recommend finding a task that you do repetitively and turning it into a program. I also recommend, seriously, re-invent the wheel in order to get practice with programming. Don't let people tell you to not do something just because it exists already. If you don't know how it works, try to write it yourself. </p> <p>I don't exactly know what programming level you are on, but don't try to do anything too crazy off the bat, that is just a demotivator (such as trying to write a game for the PS3).</p> <p>If you already can navigate your way around with IO, then you should try to really learn how to use Collections effectively. I think one of the best practice assignments I have ever done was rewriting the Java TreeMap Class. It was a huge challenge and I learned a lot by doing it.</p> <hr> <p>Here are some suggestions for practice assignments:</p> <p>Take a text file that has a fair amount of information in it, grab anything, you can get something from here if you'd like: <a href="http://www.gutenberg.org/" rel="noreferrer">http://www.gutenberg.org/</a> and make a program that will do the following:</p> <ol> <li>Read in the file</li> <li>Create a collection of words and their occurrences</li> <li>Create a collection of anagrams</li> <li>Create a collection of words and the positions in which they occur (line#, word position)</li> <li>Develop statistics on the words in the file - meaning - treating each word as an individual - which words occur before it and after it.</li> <li>Remove all of the white space from the file</li> <li>Write all of the above data to their own files</li> </ol> <hr> <p>One of my favorite things to do is mess with web data, go to a polling website, find a page that has poll data in a tabular form and do the following:</p> <ol> <li>Download the data</li> <li>Parse through the data and turn the tabular data into a CSV file</li> <li>Open it in excel without error</li> </ol> <p>Or just look for any site and extract data from it, just make sure the site is robot friendly <a href="http://www.robotstxt.org/" rel="noreferrer">http://www.robotstxt.org/</a>, you don't want any one site to feel like it is under attack. Most of the time though this isn't normally a problem because if you read the site's terms of use it clearly states you are allowed to download 1 copy of whatever it is you are viewing so long as you don't intend to sell it. Of course this changes for every site.</p> <hr> <p>Go to a website and get all of the links off of the page programmatically.</p> <hr> <p>Here is a fun one, the Susan Program (I don't remember why it is named Susan) which I initially wrote using a C program and two Bourne shell scripts in a Unix environment. The idea in this program is to fork 4 child processes and give them each a task like so:</p> <p>Child 1: Reads in a file, creates a dictionary of each word and its position in the file, this is outputted to a file.</p> <p>Child 2: Takes Child 1's output and reconstructs the document, this is outputted to a file.</p> <p>Child 3: Takes Child 2's output and does what child 1 did again</p> <p>Child 4: Takes Child 3's output and does what child 2 did again</p> <p>The goal here is to have an exact replica of the original file once Child 4 outputs it. This is challenging and somewhat pointless, but the point of this exercise is to get the practice.</p> <p>In your case, don't feel that you need to use different threads for this, you can just use a single program with two different functions and just call them in order.</p> <hr> <p>Again, not sure if you are at this level yet, but try to replace any "for" or "foreach" loop you have in your program with recursion, just as practice. Recursion is a pain in the butt, but it is valuable to know and understand.</p> <p>These are some suggestions which I think will really help you sharpen your skills.</p> <p>Enjoy</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload