
Projects the Hard Way – Coding Projects for Early Coders - pyprism
http://projectsthehardway.com/
======
danso
This is a great progression in the series by Zed...if you lurk
r/learnprogramming, or any other place full of aspiring coders, a common
complaint/desire is that students will have passed all the Khan/Codecademy
courses, but have no idea what to do with the pieces of programming
fundamentals that they've acquired. This is not just a problem with self-
learners...I've seen a few r/learnprogramming posts by CS grads from 4-year-
colleges who say they have literally no idea what an API is or why/how to work
with one.

And I don't think it's necessarily correlated to the rigor/prestige of the
program. I had a discussion with Stanford professor who is building a course
that involves hands-on work with real-world data problems...he undertook this
initiative after finding that some PhD students, while brilliant in their
research and coursework, did not know where to begin with relatively easy data
cleaning work. I don't know exactly what the disconnect was, but I'm guessing
it wasn't because data cleaning is particularly difficult as a CS problem. But
it does require the ability to "see the big picture"...not just how different
code modules and components can be designed to talk to each other, but the
context and general who-gives-a-shit in regards to a given data/computational
problem.

So yeah, thinking about small projects to code for is a great way to make
things "click". Can't wait to see what examples Zed comes up with.

~~~
lfowles
r/dailyprogrammer is a good resource too, not only for small "projects" but
also seeing how others have attempted them. It does have the issue of the top
voted answers being in Brainfuck, Haskell, Lisp, Assembly, and a slew of other
impractical(? for lack of a better word) languages though.

~~~
codygman
> Brainfuck, Haskell, Lisp, Assembly, and a slew of other impractical

My argument: Haskell and Lisp are just as practical as Python, Java, C#, or
C++ for r/dailyprogrammer problems.

Brainfuck is impractical, I can agree with that.

Haskell is used in the real world. For instance I write Haskell for my day job
right now.

Lisp is also used in the real world and was even used to create Lisp
Machines[0]. I got contacted by a recruiter for a Clojure job a couple days
ago.

I can kind of see why you'd call Assembly impractical for the projects on
r/dailyprogrammer, but would like to make sure you aren't claiming Assembly
itself is impractical.

~~~
Adlai
[0a] [http://fare.tunes.org/LispM.html](http://fare.tunes.org/LispM.html)

[0b] [http://www.loper-os.org/?p=405](http://www.loper-os.org/?p=405)

~~~
codygman
I was in a bit of a hurry, so thanks!

------
red_hare
This is awesome! When I was in school, this has always been my go to way to
getting people to get out of their "assignment programming" boxes.

One of my favorites was having people build a URL shortener using flask and
SQLite. The general requirements were something like: 1\. Server a web page in
flask with a form. 2\. Accept URL as POST from form in flask app. 3\. Hash
URL. 4\. Store hash and URL in database. 5\. Return new hash URL (ie,
myshortener.com/?hash=12345) as a new page or with ajax. 6\. Accept GET
requests with hashes. 7\. Lookup hashes in database and 301 to URL or 404.

Other fun ones were building a Secret Santa web app (accepts sign up
separately and emails everyone on a certain day so it's completely self run)
and building a simple version of Galaga (in JavaScript using just canvas,
setInterval, and keydown/keyup events).

~~~
bphogan
Those are great.

I'm about to publish a book of simple programming practice problems based on
my curriculum and experience teaching programming. Each section asks the
reader to rely on more fundamental concepts, from basic input processing on to
reading files, working with lists, and consuming third party APIS.

And at the end, there are some projects like what Zed is envisioning.

And I have the URL shortener in there, because it's really a fantastic
programming exercise.

Like you, I believe it's really important to get people thining about solving
problems with code, and I think the real key to doing that is getting them to
practice.

~~~
LostCross
Does this book have a name so I can check it out after it releases? Or are you
trying not to advertise?

~~~
bphogan
I'm trying not to hijack the thread with my own advertisement.

But also, the title isn't finalized.

------
libraryatnight
This is wonderful. I've been doing Learn Python the Hard Way and loving it,
this is a really cool addition. I recently picked up the book 'Automate the
Boring Stuff with Python,' and one of the best things about it is the
practical applications really help drive understanding - at least for me.

At work I write a lot of PowerShell scripts, and I think the reason I took to
it so quickly is because the need was there. It was never ambiguous what I was
going to build: I knew what I wanted to make easier, what tool I wanted to use
to accomplish that goal, and it set me to learning quite quickly.

~~~
chrisblackwell
I would love to see someone make "Learn Go the Hard Way"

~~~
teach
I wrote "Learn Java the Hard Way" after Zed asked/encouraged me to. I think if
someone got together 52 exercises, he'd tell them to go for it.

No pun intended, honestly.

------
rtpg
This looks like a great idea, and I imagine the execution will be great.

Personally, though, I find no excitement in building a log searching tool.
Something a bit more magical (I think something involving web scraping or
markov chains would be interesting) would probably entice people to move
forward much more.

Not that this tool wouldn't be useful, just that if I look at the end result,
it doesn't give me the want to build it.

~~~
sturadnidge
If your career starts out as a developer, there are going to be things you
have to work on that you find no excitement in (gross generalisation of
course, but true for the overwhelming majority of developers I'd say).

It wasn't until I got tasked with writing something I had no interest in as
part of a recruitment process that I realised programming would always be a
hobby for me, not a profession.

The sooner one realises that, the better I'd say!

~~~
rtpg
But if it's a hobby, why not do fun things? It's not like this is "Get a
career in programming the hard way".

------
hypertexthero
Great to see this! Another great projects-based programming tutorial in Python
is [http://newcoder.io/](http://newcoder.io/)

~~~
greyskull
I like that site, but I have a beef with tutorial-style teaching. I find the
teachings don't get internalized if all the answers are right there; I'm also
speaking from personal experience - I'm 23 and went through the "okay, I sorta
understand programming, now what?" phase not all that long ago. You could
argue that it's up to the student to make attempts before reading on, but that
rarely works.

The other extreme is the link in the OP, that is minimal in assistance. I
think the sweet spot is somewhere in between. There shouldn't be hand-holding,
but you don't want to leave the person clueless either.

~~~
hypertexthero
> I think the sweet spot is somewhere in between. There shouldn't be hand-
> holding, but you don't want to leave the person clueless either.

Yes, kinda like in well-balanced computer games where the difficulty is just
enough to be challenging yet not frustrating.

Just enough is more.[1]

[1]:
[http://www.miltonglaser.com/files/Essays-10things-8400.pdf](http://www.miltonglaser.com/files/Essays-10things-8400.pdf)

------
bigtunacan
I think this approach to teaching programming should be used more often. A
good read for someone looking for something that is already out there is
"Cloning Internet Application with Ruby". [I am in no way affiliated with this
book]

It uses Sinatra & DataMapper to take the developer through some simpler
projects (URL Shortener, Microblog, etc...)

------
bcoates
It's odd how much novice programmers are asked to work on blank-slate exercise
projects, which strike me as inherently advanced work.

Building up from "hello world" to something with interesting learning-
experience challenges involves a lot of boilerplate work. It's almost
guaranteed that you won't learn the core skills surrounding managing and
limiting complexity in medium and large projects, or even why these things are
valuable.

It's not much work to get a build environment up for a real-world program the
student might use, then have them do projects to modify it (games are great
for this). This can be really rewarding, it exposes the learner to realistic,
large-scale code, and it serves to get them a gut feeling for "none of this is
magic, it's just a bunch of code".

~~~
bphogan
It's only a problem if you choose a language that requires a large build
environment.

I have a very effective programming fundamentals class. y students perform
very well, and every project we do is done from scratch. But I teach it in
JavaScript simply because that is the absolute quickest way to introduce
programming.

JavaScript can be an unforgiving, punishing language. But an absolute beginner
who's learning to code can be steered away from the nasty bits. Because if
you've never taught an absolute beginner, who doesn't even know how to open
Notepad or unzip a file, you'd be shocked how slow and deliberate you have to
be when you teach. :)

------
dimino
If Zed can navigate the morass that is python package management in a way that
makes newbies grok the major points and understand the value of doing things
The Right Way, I'd personally buy him a beer or something.

~~~
bgilroy26
This video is a good resource for python package pedagogy:

[https://www.youtube.com/watch?v=0oTh1CXRaQ0](https://www.youtube.com/watch?v=0oTh1CXRaQ0)

~~~
penprogg
holy shit it's three hours long

