If you are into python web programming, just a simple blog engine thingy would show you know a bit.
Steps (you can cut out anything that ends up being difficult - it's just a demo thingy from a student):
- hello world, using a web framework. Go for a minimal one, like flask / bottle / web.py.
- hello world, with a list of <a href="/1">Aricle 1</a> links. (hand written html mock-up). Something like:
def GET(self):
return '''
<body>
<ol>
<li><a href="/0/">Article 0</a></li>
<li><a href="/1/">Article 1</a></li>
<li><a href="/2/">Article 2</a></li>
<li><a href="/3/">Article 3</a></li>
</ol>
</body>''') # does this need a head?
- generate the html links in python, from a list ['my first article', 'my second article', '<b>Escape html injections?</b>',u'\u4f60\u597d does unicode work?']. The html should now be:
Note, don't worry about titles. Titles are a pain (you convert them to url-safe "slugs", but the slugs might clash ... you could spend hours on it and it's just not fun).
- write the "article" pages. They should look like:
<body>my first article</body>
For bonus points, make sure you can't inject html (the <b> post should not be bold), and that unicode works OK.
- Add a page where you can post. You will need a text box to post in.
- Use a sqlite3 db instead of a list.
- User authentication? Cookies? For a toy project, don't use passwords, just log anyone on with whatever name they input. Use cookies to keep them logged on. Password handling and secure HMAC cookies - (ask the interview how this should be done - give them a chance to show you how smart they are, or why they just use a solid tested framework that does it all for them)
- Finally, pimp the site a little. Eye candy always impress. Just don't waste time on it.
- Check it into github.
That's about it. It's just a toy project, but gives them something to look at.
Steps (you can cut out anything that ends up being difficult - it's just a demo thingy from a student):
- hello world, using a web framework. Go for a minimal one, like flask / bottle / web.py.
- hello world, with a list of <a href="/1">Aricle 1</a> links. (hand written html mock-up). Something like:
- generate the html links in python, from a list ['my first article', 'my second article', '<b>Escape html injections?</b>',u'\u4f60\u597d does unicode work?']. The html should now be: Note, don't worry about titles. Titles are a pain (you convert them to url-safe "slugs", but the slugs might clash ... you could spend hours on it and it's just not fun).- write the "article" pages. They should look like:
For bonus points, make sure you can't inject html (the <b> post should not be bold), and that unicode works OK.- Add a page where you can post. You will need a text box to post in.
- Use a sqlite3 db instead of a list.
- User authentication? Cookies? For a toy project, don't use passwords, just log anyone on with whatever name they input. Use cookies to keep them logged on. Password handling and secure HMAC cookies - (ask the interview how this should be done - give them a chance to show you how smart they are, or why they just use a solid tested framework that does it all for them)
- Finally, pimp the site a little. Eye candy always impress. Just don't waste time on it.
- Check it into github.
That's about it. It's just a toy project, but gives them something to look at.