4 ms·
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 favori
by red_hare 11y ago
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 11y agoThose 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.