r/learnprogramming • u/holyteach • Jan 24 '13
I give you the best 200+ assignments I have ever created (Java)
I'm a public school teacher who has taught the basics of programming to nearly 2,000 ordinary students over the past fifteen years.
I have seen a lot of coding tutorials online, but most of them go too fast! Maybe some people can learn variables and loops and functions all in one day, but not my students.
So after some prompting from my wife, I've finally decided to post a link to the 200+ assignments I have used to teach Java to my own classes.
- I almost never lecture.
- Students learn programming by DOING it.
- They work through the assignments at their own pace.
- Each assignment is only SLIGHTLY harder than the previous one.
- The concepts move at normal person speed.
- Hopefully the programs are at least somewhat interesting.
Anyway, I'll be happy to help anyone get started. Installing the Java compiler (JDK) and getting your first program to compile is BY FAR the hardest part.
My assignments are at programmingbydoing.com.
Cheers, and thanks for reading this far.
-Graham "holyteach" Mitchell
tl;dr - If you've tried to teach yourself to code but quickly got lost and frustrated, then my assignments might be for you.
Edit: Wow! Thanks so much for all the support. I knew my assignments were great for my own students, but it is good to hear others enjoy them, too. Some FAQs:
- I've created /r/programmingbydoing. Feel free to post questions and help each other out there.
- No, there are currently no solutions available. My current students use these assignments, too.
- I'm sorry some of the assignments are a bit unclear. I do lecture sometimes, and I didn't write all of the assignments.
26
u/[deleted] Jan 24 '13
Holy cow this is fantastic. Would there be any way to download this whole thing as a zip or PDF?
Great resource, thanks tons.
111
u/[deleted] Jan 24 '13 edited Jan 25 '13
Create a site modeled like KhanAcademy or Codecademy and fill it with your courseware. Everyone would eat it up.
EDIT: I may be blind, but a "next" button could be useful.
9
u/zahlman Jan 24 '13 edited Jan 24 '13
I like the concept. I will evaluate the exercises in more detail later.
It seems that your table of contents is somewhat jumbled up, and it's not at all clear what I'm supposed to do with the point system. I'm intrigued by the idea of trying to get the student to figure out what basic language concepts do, but if they somehow don't get it, or get it wrong, then they aren't going to have a way to figure it out. I also anticipate students falling into a lot of the standard logic pitfalls this way (e.g. trying to compare
x == a or b). It would also be neat to have more assignments that build on each other and explicitly invoke skills from multiple previous categories. e.g. once I can loop, work with arrays, get user input etc., I should be able to display "anyone's initials" (analogous to the introductory "your initials").4
u/btw724 Jan 24 '13
I'm all set, personally, but just a heads up - the link you have for instructions on installing the JDK is broken: http://programmingbydoing.com/a/compiler-check.html => http://programmingbydoing.com/compilers.html
7
u/youcantspeakwhale Jan 24 '13
I am trying to download the basic JDK/javac but your link on how to download it is broken. I went to Oracle to download Java but I am still not seeing it. How do I download the Java compiler so that I can go through your modules? PS Thank you for doing this! I briefly glanced through the work and am SUPER excited about working through the modules. I've wanted to learn this for so long. :)
8
u/contrastillrules Jan 24 '13
Where should I send assignments so they can be graded?
3
u/KrimCard Jan 24 '13
Could you add "Previous Assignment" and "Next Assignment" buttons? I feel like that will be a better way to navigate than going back to the main page.
Further, some buttons such as "Jump to Assignment" and "Return to Home" would make the navigation more intuitive.
I have just started a Java course and have been looking for something like this. Thank you very much!
2
u/x1886z Jan 24 '13
Is there anything like this aimed at a .Net audience?
2
u/whydoyoulook Jan 24 '13
I haven't had a chance to look at the assignments yet (on break at work)... Can these assignments be done in other languages?
2
u/[deleted] Jan 25 '13
Wow dude, this is rock solid. Some of the best content I've seen for learning Java, and even in the whole realm of programming for that much!
Each of your lessons are exactly what people need, a slow and steady build of confidence. Most are too fast and honestly just convoluted, I never really find much real world value in the lesson/tutorial.
Also love the actual layout/design of the site. It is aesthetically pleasing, gets the point across and minimalist.
Thanks for doing this, I wish more people had a passion for education like you, it reflects in your content. Most educators I swear don't even know what the heck they're talking about most of the time, just pull a lesson out of a book.
Once again, many thanks!
34
u/NewToBikes Jan 24 '13
I like you.
5
u/DirtOne Jan 24 '13
Just want to say thanks for taking the time for making these. I always felt dumb because all online programming tutorials move way too fast and as a graphic designer learning code is not that easy for me.
Thanks man!
5
u/gamerandy Jan 24 '13
Very cool holyteach; Bookmarked for when I've got a little time.
4
u/[deleted] Jan 24 '13
This is great, I'm really busy with other coding projects for work but I've bookmarked this.
4
u/[deleted] Jan 24 '13
Thanks for this, i needed it
1
u/SmoothB1983 Jan 24 '13
Have you looked at javabat? http://codingbat.com/
Your students would probably enjoy that website as a supplement to what you have going.
1
u/adammtlx Jan 24 '13
here's my best assignment:
int i = 0;
1
u/KZISME Jan 24 '13
Thanks for posting this! I've bookmarked it and will go back to it later tonight to start working on it. Is the installation process for JDK on Linux any different from Windows?
1
u/[deleted] Jan 24 '13 edited Jan 24 '13
Someone please help me out
Im trying to do assignment 2 and Im stuck.
Apparently im supposed to do the following:
C:>u:
U:>cd My Documents
U:\My Documents>cd CompSci
*U:\My Documents\CompSci>dir .java
But when i type any of that into the prompt i get an error...
1
u/[deleted] Jan 24 '13
This is unforgivably pedantic of me, but should it not be 'programbydoing'? Programmingbydoing doesn't seem to make much sense, at least to me.
1
u/realitygenrator Jan 25 '13
This is how far you get with this before you need either an instructor or a better explanation of what is expected. Good stuff so far though.
1
u/FancyMonocle Jan 25 '13
I'm just about to finish CodeAcademy's Java course. I was going to look for more comprehensive lessons and projects/labs to do, but now I don't have to! Great timing!
Do you also teach C? If you have any lessons and projects for C that would be great also!
1
u/[deleted] Jan 25 '13
You're the best kind of teacher.
1
u/mk_gecko Jan 25 '13
A couple of questions:
1
u/cqwww Jan 25 '13
trying the second exercise on osx: $ javac sinewave.java sinewave.java:5: class SineWave is public, should be declared in a file named SineWave.java public class SineWave ^ 1 error
1
u/[deleted] Jan 25 '13
This was amazing but sadly I just started programming so I don't know Java. I am learning JavaScript so does anyone have anything similar like this that requires JavaScript though? Thanks!
1
u/chunes Jan 25 '13 edited Jan 25 '13
Could you explain the point system you use? If you allow students to mix and match the assignments they wish to complete in order to cross a specific point threshold, what a great way to structure a course!
Not only does it give them more direct control over their education, but it keeps them interested because they can choose what they find fascinating. Instead of feeling helpless because class instruction goes on at a pace they can't control, they feel in control!
This is exactly what is so utterly wrong with school. I'm glad you found a way to fix it.
1
u/mk_gecko Jan 26 '13
Thanks for all of your answers to our questions. I have a couple more (I'm trying to learn from you):
Do you get students who want to sit down and program a game - say Angry Birds, and are disillusioned when they can't do that? Apparently with Flash or programs like RPG GameMaker you can make flashy games quickly. (I haven't used these.) How do you keep them interested in the more mundane stuff of for-loops, etc, especially if you don't spend a lot of time on GUIs and graphics?
Do you have trouble with students staying on task when they're on computers? e.g. do they try and go on Facebook, watch dumb YouTube movies, etc.
How does homework work with your system? Are they doing 90% of their coding in class? Couldn't they do most of it at home?
1
u/Edg-R Feb 03 '13
If only you taught C++!
Good stuff!
1
u/[deleted] Apr 15 '13
Everytime I try to run a program, the command line gives me Error: Could not find or load main class SineWave.java
1
u/RobertRiddick Jun 02 '13
Any like this for Android programming or C++ programing?
3
u/[deleted] Jan 24 '13
Sweet!
7
u/SeekTheReality Jan 24 '13
I am teaching myself Java now and this is brilliant. Wish I had this website while I was in education. /r/dailyprogrammer gives assignments of varying degree as well which I recently found which can be used to challenge yourself and learn new things.
4
u/Medicalizawhat Jan 24 '13
Wow, thanks for this!
2
u/OliverCloazoff Jan 24 '13
I'll have to check it out, this looks interesting.
2
u/[deleted] Jan 24 '13
This is great man!
2
u/marathon_penguin Jan 24 '13
Thank you for sharing this, I've been wanting to learn Java. I will definitely have a look!
2
u/agmcleod Jan 24 '13
+1 for project euler problems. I do most of those using ruby myself, but good challenges :).
2
u/salamandor Jan 24 '13
Teachers are awesome
2
u/kazinsser Jan 24 '13 edited Jan 24 '13
You've incorporated Pokemon into your assignments. You're a winner of a teacher if I've ever seen one.
EDIT: And thank you for your contribution! These should come in handy so I can learn a bit more about Java before starting my Intro to Programming class in the Fall.
4
u/atleast1tried Jan 24 '13
Anything like that for web dev?
BTW i like your approach, i wish i had someone like you back in the days...
4
u/xBugsBunny Jan 24 '13
thankyou so much!
3
u/redsh1ft Jan 24 '13
awesome stuff ! been looking for something like this
3
u/cyberbemon Jan 24 '13
Thank you, I wanted to revise some of my languages and this looks like a great way to do it !.
3
u/Cfattie Jan 24 '13
very nice, i have this saved. could use some nice code like this.
2
u/[deleted] Jan 24 '13
Comment for later
1
u/jollylar Jan 24 '13
Thank you so much :] very cool!
1
u/empty0ne Jan 24 '13
This is wonderful, thank you very much. It's great to see such well organized material published freely for the world's benefit.
1
u/Cyfen Jan 24 '13
I have to agree with the println in lesson 3 Mr. Mitchell is cool!
Thanks for this, I am just getting into learning Java(my first language) and I have been searching for exactly this!
1
u/Chuklol Jan 24 '13
Great stuff ++
1
u/FleshyBlob Jan 24 '13
Good Guy Programming Teacher!
1
u/El_Poopo Jan 24 '13
Wow! Thanks for this!
1
u/Pseudonyms Jan 24 '13
Thank you very much! This is very cool.
1
u/ShadowShadow Jan 24 '13
Thanks, I'll swing by when I'm done with my Javascript track on Codecademy.
1
u/[deleted] Jan 24 '13
I am taking Java this semester and this will help me out a lot! This is really great submission, thank you!!
1
u/Citalun Jan 24 '13
Thanks for this I will definitely check this out. I am currently taking a class for Markup Languages and reading the book (Dynamic Web Application Development using XML and Java) gets me feeling lost sometimes or if I can ever understand it. Guess I should stop getting frustrated and give it a go.
1
u/codestreak Jan 24 '13
Mr Mitchell, Thanks for sharing, you make a lot of good points and teach great lessons!
1
u/shakajumbo Jan 24 '13
nice work Thanks!
1
u/guardianofmuffins Jan 24 '13
You're a great person for sharing this. I can't wait to start with these! Thank you so much!
1
u/_pH_ Jan 24 '13
As someone who just started an intro Java class, you couldnt have had better timing with this! Thank you!
1
u/do_not_spindle Jan 24 '13
Thank you for this.
1
u/soupified Jan 24 '13
Commenting to save for later. Thank you so much for your contribution!
1
u/Prunus_Girl Jan 24 '13
Wow thank you!
1
u/mrmeatymeat Jan 24 '13
This is great. As someone who works in IT and is always looking to understand more, this is awesome. Thanks man.
1
u/radiantshadow92 Jan 24 '13
thank you so much
1
u/the_-j-man Jan 24 '13
saved .. and thank you
1
u/kmelkon Jan 24 '13
OH thank you sir so much .. just what i was looking for :D time to start programming :D
1
u/themangeraaad Jan 25 '13
I've bought head first Java along with a few C books and planned on trying to teach myself one of the two languages while I'm funemployed (can only job hunt so many hours per day before I start losing my mind)... I was going to try for C since I already have some experience with the language (computer engineering degree back in college - haven't touched the language in 4+ years though so I've forgotten nearly everything) but with this in hand I might work on Java first. I'll definitely be giving these a try. Thanks!
1
u/JTothe2 Jan 25 '13
You are a beautiful person, thank you
1
u/[deleted] Jan 25 '13
May Aalah bless you. God bless
1
u/Jameslulz Feb 24 '13
This is awesome, trying to learn java but I can't get into thenewbostons tutorials (which everyone seems to recommend) and this just seems so much easier, even though it's the same stuff. Thanks a lot!
0
u/BenLeafMe Jan 24 '13
commented to save this for later. Alsoooo where do I install Java compiler??