

Python for Beginners - codingblues
http://www.pythonforbeginners.com/

======
riz_
From the Lists Chapter:

 _Lists are very easy to create, these are some of the ways to make lists:

emptyList = [ ]

strlist = ['one, two, three, four, five']_

I find the "strlist" example very misleading, as a beginner might think we are
creating a list of five strings, when it is actually just one string with some
commas in it.

~~~
pcote
Likely an autopilot bug. It's almost second nature for a lot of coders to do
this when making a list of strings.

strlist = 'one, two, three, four, five'.split(", ")

That habit probably just kicked in a little when putting in that example.

~~~
pstuart
Indeed, although the commas are superfluous.

~~~
bsagert
The space character argument is also superfluous as it is the default.

strlist = 'one two three four five'.split()

------
chrismorgan
This has _lots_ of incorrect (syntactically or semantically) and bad (coding-
style-wise) code. I'm afraid there's no way I am going to recommend it to
anyone.

As some examples, the first two pages that I looked at:

<http://www.pythonforbeginners.com/dictionary/>:

\- variable shadowing (e.g. naming a list instance `list` and a dict instance
`dict`)

\- Syntax errors (e.g. ``dict.items.()``)

\- Teaching bad methods of iteration (e.g. ``for key in dict: print
dict[key]`` rather than ``for value in dict.iteritems(): print value``)

\- Also disappointing: no mention of the typically-more-efficient iter* or
view* methods.

[http://www.pythonforbeginners.com/web-scraping-with-
python/s...](http://www.pythonforbeginners.com/web-scraping-with-
python/scraping-websites-with-beautifulsoup/):

\- The written word fails me utterly. Just consider the last example, which is
the worst. Just _look_ at it. (Quite apart from some of the code being
missing!) _Ugh!_

------
bpatrianakos
I just recently fell in love with Python while writing a Sublime Text plugin
but I'm still very much a beginner and I'm not sure if the format of this blog
is great for beginners.

1\. The formatting of the posts need some work. The text is often intimidating
because its in big chunks and where there are code blocks there isn't any
clear way to distiguish them from body copy. The way <http://codular.com/>
does it is real nice, maybe some of those ideas would work for this.

2\. Some of concepts need to be explained more. In some of the articles you
tend to gloss over some big things that a beginner wouldn't know.

I may be a beginner to Python but I'm not a beginner to programming so that's
where I'm coming from. I think its good but it could be a lot better though.

~~~
spilcm
You are right, and I'm working to get the formatting issues fixed. The way
codular.com does it is very nice. If you have any more ideas or feedback,
please contact me. Thank you!

------
spilcm
Hello everyone, I'm the admin of pythonforbeginners.com . What a day! Being on
the first page of Hacker News was really unexpected and I was pleasantly
surprised. Thank you for all the comments I have received. I have a lot of
work to do, which is super exciting and I'll do my best to fix the formatting
issues and to get the website more structured so that new users easier can
find out where to start.

If you have any more suggestions or feedback to give, I'd be grateful to hear
them.

~~~
codingblues
It would be nice to have a very basic starter's tutorial involving stuff like
'how to install and setup python, how to work with python shell' absolute
beginners might find it useful...

~~~
swapnilt
Isn't that stuff already very well documented in Python's own documentation?

------
danso
This is a nice layout but I'm afraid the blog structure is less than optimal.
For a beginner, the priority of lessons is not their chronology of publishing,
but of their logical place in the learning process.

Also, the taxonomy needs work...I don't think this is what I have in mind when
I see the "basics" category of a beginners reference to Python:

<http://www.pythonforbeginners.com/category/basics/>

Basics for beginners should include such things as "what is programming?",
"how do I install python?", "how do I run a script?" And so forth.

~~~
codingblues
agreed... despite of a nice interface, the site does lack organization and
some super beginner stuff, I did overlook the absence of those...

~~~
neuroguy
Super Beginner stuff is on the standard python tutorial. That normally doesn't
need to be on every website.

~~~
danso
Well, this is "Python for Beginners", so that name will attract the kind of
person who has never touched the command line. Likely they'll be using a
system in which Python is already installed, but they still won't know how to
access it.

Another thing to keep in mind: this kind of beginner will also have trouble
finding these "standard" tutorials that have up-to-date info. No, it's not
that they can't use Google, but they don't have enough technical sense to tell
what's a good source of this installation info from what's a bad source.
Hence, it's good to have this super-basic info packaged into any kind of
tutorial that purports to be for "beginners".

~~~
neuroguy
True. A search for python tutorial returns the official python tutorial. But,
I hear your point. It should be added, or a least a link to the very beginner
material should be provided.

------
swapnilt
I think Python is one of the easiest languages to pick up with a plethora of
content available to start. Yet I have seen some crunch in number python
programmers in the market lately. Companies struggling to hire python guys.
Not sure why?

~~~
companyhen
I started a job as a web designer in Dec 2011 only knowning HTML/CSS. I picked
up a little PHP and JS knowledge.. not much, but working with WordPress it
kind of just happens.

I tried Learn Python the Hard Way, but when I finished the book I didn't feel
like I had the skills to start a project, so I read the Django Book. I am more
of a designer than a developer, I really want to get over the hump and start
writing code that can do the things I envision.

I've tried codecademy, which is helpful, but I still don't feel I'm there yet.
I have started a "web app", but I got stuck on a few features I want to add,
so I'm stalling on those.

I'd really appreciate any guidance! No formal education, all self taught. I
have grown immensely as a web designer over the past year, but my programming
skills aren't growing nearly as fast...or at all anymore.

~~~
pcote
I learned Python because I wanted to make stuff fun little scripts in Blender.
Tutorials helped. So did reading source code and drawing inspiration from it.
Ultimately, it was just one project inspiring another inspiring another.

In your case, I guess the thing to do would be to google an open-source django
app. Find something you like from the templates director. Copy what you like
and build out from there.

~~~
companyhen
Thanks for the suggestion. I have ideas I just don't know if I should start
with those, or work on open-source projects beforehand. I think I'm going to
go with the ladder.

------
bcambel
Looks great, I think the website needs better code highlighting with larger
fonts for text and code. Definitely disqus comments will help a lot. Are you
looking for guest posts ?

~~~
codingblues
I was thinking if it could be made into a wiki... but guest posts would be
great for now. I just really like the site as it is the format that learn in,
so I shared it here... I have requested the site owner to join this
discussion... hopefully they'll like some suggestions here.

------
solox3
All inline comments should come with a space after the #. All dictionary
literals should have no spaces immediately within { and }. All multi-line
dictionaries should be aligned one character after the opening parenthesis.
There exists a line with "for key, value in dict.items.():", which is invalid.
Use of one-liner "for" statements is discouraged. "if not a in b" is a more
easily translatable statement than "if a not in b".

~~~
spilcm
Thanks solox3, are you referring to this line? ## .items() is the dict
expressed as (key, value) tuples print dict.items() ## [('a', 'alpha'), ('o',
'omega'), ('g', 'gamma')]

------
mixmastamyk
Pretty. Appears to be a simple document but won't show anything without
javascript enabled--should not be a requirement. Document text doesn't wrap
when font-size increased, leads to overflow. Fifth word is a typo. Carry on.
;)

Just realized that the text is in a pre tag with the font set to a
proportional font. That needs to be changed.

------
mlenhard
As someone who is learning python as their first programming language this was
very helpful.

~~~
spilcm
Thanks!

------
civilian
Please please please use a mono-space font for code!

~~~
spilcm
Will do. Thanks.

~~~
civilian
Hey, I just followed up and checked out the site. It looks rockin' with
SyntaxHigherlighter.

Another idea, which takes some more work, is that whenever I mention a
variable-name in a paragraph I have a <span class="code"></span> around it,
and I style it to look like a little piece of monospaced text.

Here's an example: <http://peterconerly.com/blog/django-loves-locals>

------
languagehacker
This looks great, but still needs more content, and maybe an actual tutorial
or interactive component.

~~~
codingblues
I seriously think such a site should go 'wiki' and allow addition/editing of
posts by public (moderated, of course). that would be a good idea to implement
for any programming language

------
TommyDANGerous
Great site for articles, definitely will be going through them.

