Live data from Hacker News

At full speed with Python: a book for self-learners

github.com

21–30 of 53 posts

Re: At full speed with Python: a book for self-learners

#21
I've used Python sparingly in the past for tooling and helper apps and am now picking it up in a more serious way as I'm working on a Flask API app. I've been reading lots of instructional materials and the one thing that I find lacking across the board is coverage of the toolchain and it's edge cases. For starters, Macs only come with Python 2.X, tell me about installing 3.X and some of the walls I might run into in the process. Having used other package managers, pip is easy to pick up but you might get stuck if you forget you need to use pip3 instead. virtualenv is something that could use a more thorough explanation in almost everything I've read, but I'm also now seeing everyone shift to using pipenv and sorting this out yourself is not easy to newcomers (I haven't seen a text yet that discusses it other than packages using it in their install copy and paste and the pipenv site itself). The small things that seem obvious to seasoned devs are really what I'm looking for, especially in an accelerated course.

This applies almost equally to most language reference material I've come across but I'm asking politely, please spend more time on the toolchain.

Re: At full speed with Python: a book for self-learners

#22
post #2

PDF is terrible to read in a Kindle. This book would be much more valuable in a ebook format. Every time I tried to generate mobi files from Tex they were terrible formatted. O'Reilly does it fine with some open source books, but I've never managed to do it myself. Are the good publishing tools for ebooks just avaiable for specialized publishers? Which techniques do you have to convert these Tex books to mobi (the Ki…

I've had mixed results using Calibre ( https://calibre-ebook.com/ ). In all, I've converted 3 PDFs to Kindle format -- one is OK, one is a slog to read, and the third I forgot I was reading a converted version. Have never tried using it to convert a LaTeX-generated document of my own, though.

Since we already have the original TeX files, any conversion directly from PDF would be of lower quality.

Re: At full speed with Python: a book for self-learners

#23
post #19

just fixed the Makefile and created a pull-request, it should build both epub and pdf as long as you have pandoc installed. The pdf file is 18 pages in total, so it is a very short one, or am I missing something?

I've just checked your pull-request, but the resulting pdf is on article form instead of book. I'm talking about the latex document class:

    \documentclass[12pt, a4paper, oneside]{book}
It has to be ran with pdflatex..

Re: At full speed with Python: a book for self-learners

#24

I've used Python sparingly in the past for tooling and helper apps and am now picking it up in a more serious way as I'm working on a Flask API app. I've been reading lots of instructional materials and the one thing that I find lacking across the board is coverage of the toolchain and it's edge cases. For starters, Macs only come with Python 2.X, tell me about installing 3.X and some of the walls I might run into in…

> This applies almost equally to most language reference material I've come across but I'm asking politely, please spend more time on the toolchain.

I have a chapter about the python installation in this book but in the documents I usually give to my students I also explain how to use pip and virtualenv. I may add something about the basic tooling, at least enough so that people can get up to speed with python.

Edit: removed "spent an entire chapter on the python installation".

Re: At full speed with Python: a book for self-learners

#25

"become familiar with Python's syntax in two weeks and are able to implement a distributed client-server application with sockets in the third week" are there plans to extend the book to include the design of the distributed Client-Server Application?Would be super intrigued.

> are there plans to extend the book to include the design of the distributed Client-Server Application?

I do not know how I could integrate that in this book specifically, because it is not something that a regular user would need to know to be able to use Python per se, but I would like to publish something eventually. Maybe something like "up to speed with socket programming in python".. :)

Basically, I give my students two files (client.py and server.py) with a basic and very simple use of sockets, and guide them to build a basic shell client app that sends messages to be evaluated by the server and to receive the result back.

Other is a very basic http server with sockets. These are not production-ready things, I'm just interested that they learn the concepts. You can check something about this http server in this blog post of mine: http://joaoventura.net/blog/2017/python-webserver/

Re: At full speed with Python: a book for self-learners

#26
post #3
post #2

PDF is terrible to read in a Kindle. This book would be much more valuable in a ebook format. Every time I tried to generate mobi files from Tex they were terrible formatted. O'Reilly does it fine with some open source books, but I've never managed to do it myself. Are the good publishing tools for ebooks just avaiable for specialized publishers? Which techniques do you have to convert these Tex books to mobi (the Ki…

If enough people are interested, i may try to do something with pandoc to generate an ebook!

Would be interested if the focus is on Python 3.

Re: At full speed with Python: a book for self-learners

#28

I've used Python sparingly in the past for tooling and helper apps and am now picking it up in a more serious way as I'm working on a Flask API app. I've been reading lots of instructional materials and the one thing that I find lacking across the board is coverage of the toolchain and it's edge cases. For starters, Macs only come with Python 2.X, tell me about installing 3.X and some of the walls I might run into in…

> This applies almost equally to most language reference material I've come across but I'm asking politely, please spend more time on the toolchain. I have a chapter about the python installation in this book but in the documents I usually give to my students I also explain how to use pip and virtualenv. I may add something about the basic tooling, at least enough so that people can get up to speed with python. Edit:…

That’s nice but the “entire chapter” you mention is three pages, divided into three platforms, so less than a page per platform including screenshots, which means really about one or two short paragraphs per platform. I really don’t want to take away from what you’ve done, but to say there is an “entire” chapter is not really getting the point of the comment you replied to. Installation may indeed be coverable in so few words, but I think what is missing is coverage of what it takes to go back and forth between different versions (using ‘python’ versus ‘python3’ on the command line doesn’t begin to cover it), although personally I will be happy when we no longer have to do that.

I am glad to see you are basing things on Python 3.

Re: At full speed with Python: a book for self-learners

#29
post #28

Earlier quoted context omitted.

> This applies almost equally to most language reference material I've come across but I'm asking politely, please spend more time on the toolchain. I have a chapter about the python installation in this book but in the documents I usually give to my students I also explain how to use pip and virtualenv. I may add something about the basic tooling, at least enough so that people can get up to speed with python. Edit:…

That’s nice but the “entire chapter” you mention is three pages, divided into three platforms, so less than a page per platform including screenshots, which means really about one or two short paragraphs per platform. I really don’t want to take away from what you’ve done, but to say there is an “entire” chapter is not really getting the point of the comment you replied to. Installation may indeed be coverable in so…

Oh, you're right, I've edited my answer because "entire chapter" seems a very big thing considering the size of the document, and it probably makes me be seen as quite arrogant. To my defense, I'm not a native English speaker and it's 2:30 am here, so the quality of my answers are not the best at this moment.. :)

Re: At full speed with Python: a book for self-learners

#30
post #26
post #3

Earlier quoted context omitted.

If enough people are interested, i may try to do something with pandoc to generate an ebook!

Would be interested if the focus is on Python 3.

Yes, the focus is on Python 3, definitely..
Post reply on HN