Live data from Hacker News

Offer HN: I'll help you learn Python

news.ycombinator.com

11–20 of 51 posts

Re: Offer HN: I'll help you learn Python

#11
post #2

I've been wanting to learn python for a long time. I have even bought a big arse book and have been to those sites and have read them. I come from a web application background and the biggest challenge I have with learning python is that I never seem to have a reason to use it. So what type of application would you recommend python for? What do you normally use python for?

google appengine is fun to play with.

i made my first python/appengine app over the past couple of days:

http://www.iwrotethisforyou.me/ the blog isn't mine, but see that "Random Post" button on the right? that goes to my app :D

I showed it to the author via twitter and he loved it so he linked to it.

source here: http://bitbucket.org/makeramen/irandomlywrotethisforyou

moral of the story? find random stuff to do and just dick around.

Re: Offer HN: I'll help you learn Python

#12

I know you only have a limited amount of time to help others learn, so you can't take on any more pupils. Would you be willing to document your instruction and work it in to a syllabus of some sort for the rest of us? I'm gonna start with the reading you recommended. Thanks!

While I applaud the author's effort to help, I can assure you that you are capable of this on your own without any tutoring. If you know how to program then skim through Dive Into Python and think up a fun little project for you to do, then finish it.

I recommend a web application project because it forces you to learn a lot of different moving parts - pick a framework and study their code. Try to build your own basic wsgi framework.

Just to show and tell so you know I'm not coming from a Mr. Superior stance: http://bitbucket.org/ixmatus/rubedo/src/tip/rubedo/

Use it if you want - it was my attempt at building a (somewhat) Py3k compatible wsgi framework. MVC with really minimal routing and super simple configs. The request class I spent a lot of time on and had been studying the WebOB sources a lot (hence the resemblance). Doing that actually made wsgi apps and the "pythonic" way of building web applications click for me (coming from a PHP background).

Re: Offer HN: I'll help you learn Python

#14
post #6
post #5

Earlier quoted context omitted.

Pretty much anything - Python's a multi-paradigm language. Web development, system admin, desktop apps, games, console programs - it doesn't really matter. Some of your workflow or setup might be a little different, eg. Django vs. PHP, but not so much that you'll be completely lost.

Eh, no tool is great for everything. I think python applies broadly, but it isn't great for building an OS. :)

We'll see - in another 12 months or so PyPy might be a lot faster...

Re: Offer HN: I'll help you learn Python

#17
Plug: I'm just in the final stages of finishing an introductory Python book, Hello! Python: http://manning.com/briggs/. It's a bit different, in that I'm using real world projects (Hunt the Wumpus, Django, web scraping, writing games) to demonstrate how to program, rather than just having a laundry list of features and stepping through them one by one.

Think of it as Land of Lisp, but in Python rather than CL.

Re: Offer HN: I'll help you learn Python

#18
post #16

I've been trying to get an answer to my Python question: http://news.ycombinator.com/item?id=1841536 Maybe you can take a look at that?

Looks to me like you're trying to shoehorn everything into the one list, which is going to make your code hard to write. Something to note is that you're adding blank strings ('') to your list to pad it out, which is a bit of a warning sign that your data structure is wrong.

Rather than do that, I'd use a dictionary keyed off either an id or the original text, store the user input as a list after that, then sort out how to display this in the display part of your code. Something like:

    typing = {
        'Hello World': ['Hello World', 'Hello World', 'Hello World']
        'Hello Universe': ['Hello Universe', 'Hello Universe', 'Hello Universe', ...]
    }
Bear in mind that dictionaries are unordered though, so you might need to either use a list to order them, or use sorteddict from the collections library.
Post reply on HN