<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Geek Book &#187; Python</title>
	<atom:link href="http://geekbook.org/archives/category/programming/python/feed" rel="self" type="application/rss+xml" />
	<link>http://geekbook.org</link>
	<description>Books for Geeks</description>
	<lastBuildDate>Wed, 23 Dec 2009 20:23:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Python Essential Reference 4th Ed.</title>
		<link>http://geekbook.org/archives/205</link>
		<comments>http://geekbook.org/archives/205#comments</comments>
		<pubDate>Wed, 23 Dec 2009 17:05:43 +0000</pubDate>
		<dc:creator>bookGeek</dc:creator>
				<category><![CDATA[NonFiction]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://geekbook.org/?p=205</guid>
		<description><![CDATA[It has been ten years since David Beazley wrote the first edition of Python Essential Reference. The book has proven itself as a valuable resource to Python developers and has been kept current over those ten years, with the fourth edition coming at an interesting time for Python. Python 3 was a major release that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.informit.com/store/product.aspx?isbn=0672329786"><img src="http://www.informit.com/ShowCover.aspx?isbn=0672329786&#038;type=f"></a></p>
<p>It has been ten years since <a href="http://www.dabeaz.com/">David Beazley</a> wrote the first edition of <cite>Python Essential Reference.</cite>  The book has proven itself as a valuable resource to Python developers and has been kept current over those ten years, with the fourth edition coming at an interesting time for Python.  Python 3 was a major release that broke backwards compatibility.  Python 3 has been around for a year now.  That said, the current download page at the official Python site states, &#8220;If you don&#8217;t know which version to use, start with Python 2.6.4; more existing third party software is compatible with Python 2 than Python 3 right now.&#8221;  Beazley in keeping with the pragmatic roots of a reference that sticks to what is &#8216;essential&#8217; has removed the coverage on features from 2 that were removed from 3.  At the same time, the primary focus for new features that came with 3 is limited to those that have been back-ported to 2.  This approach, born out of a desire to keep the reference relevant, provides a blended approach that is above all else practical.</p>
<p><span id="more-205"></span>
<p>The end result of that choice is a reference document consisting of those parts of Python that are shared between versions 2 and 3.  This is a significant portion of the language and I think this approach is really what will give this reference more traction than many of the other guides that focus purely on 3.  I think that those are valuable and over time the balance will shift but as of right now, for a little while to come, this book takes the most realistic approach.  That feels very fuzzy, but I have no idea how long it will be until Python 3 truly is the dominant version and Python 2 is truly put to bed.</p>
<p>If I had to guess how Beazley&#8217;s <cite>Python Essential Reference</cite> has held in there over the years, the key would be that there is a lot of what a developer needs and very little of what she doesn&#8217;t need.  There is a twenty-four page tutorial introduction, but this is not a guide on how to program or how to use Python for beginners.  An experienced programmer could probably use this reference to shift to Python as a new language, but someone completely new to writing code would probably not want to start here.  A quick look at the table of contents shows that an explanation of the language itself is covered in under 200 pages.  Extending and embedding Python also get their own section, but close to 400 pages is given to the Python library.</p>
<p>An inevitable question is what one will gain with this reference over the <a href="http://docs.python.org/index.html">online documentation</a>.  A good example to see how things vary is to look at chapter nineteen, <cite>Operating System Services</cite> and the online documentation for <a href="http://docs.python.org/library/allos.html">Generic Operating System Services.</a>  The online documentation is very thorough, and covers each piece of the library starting with os and io, building from there.  While every facet is documented much of it is rather brief.  For example section <a href="http://docs.python.org/library/io.html#raw-file-i-o">16.2.3. Raw File I/O</a> is a very straightforward listing of the very low level functionality available via io.FileIO.  In contrast, looking at the <a href="http://docs.python.org/3.1/library/io.html#raw-file-i-o">3.1.1 Docs</a> for Raw IO shows that parameters for FileIO changed with that version.  Looking to the documentation for <a href="http://docs.python.org/dev/library/io.html#raw-file-i-o">2.7a1 Raw File I/O</a> shows that these changes are being back-ported to Python 2.</p>
<p>In <cite>Python Essential Reference</cite> none of this hunting down changes and checking to see if they are coming to 2 are necessary.  Beazley shows them in his documentation.  This is the strength of his choice on how to handle these types of situations.  On top of that, Beazley provides more than the online documents by including four paragraphs of additional information on Raw I/O and when its use is appropriate.  This added content is probably available googling around for it, but then I have to take the time to check dates on posts to see if things are still current and in general just hope that things are accurate.  I have never read a technical book that was completely error free, and there are probably at the very least some typos in <cite>Python Essential Reference</cite>, though I haven&#8217;t caught any of them on my read through or use of the book yet.  But the important thing is that I don&#8217;t expect the book to be perfect, rather I value it for being a known quantity.  I am aware of just when the material was compiled, who put it together and I have it all in one place.</p>
<pA last example from our chapter on operating system services would be how Beazley has handled the errno module.  The errno module deals with error codes returned by the operating system.  The online documentation for <a href="http://docs.python.org/library/errno.html">errno symbols</a> is not exhaustive and oddly enough is not ordered alphabetically.  Beazley provides two lists for errno symbols.  They are provided in alphabetical order, have a description and are grouped as POSIX error codes and Windows error codes.  A quick glance at these tables in a skimming of the book might lead one to believe that this is just a simple quick grab from already available sources, but that isn&#8217;t the case.  There is real value added even here.</p>
<p>The index is solid.  It would seem that one should be able to take this for granted with a technical reference but I&#8217;ve seen some sad exceptions.  Between the thorough index and the detailed table of contents I&#8217;ve never had to spend more than a few seconds looking for what I need.  This is the result of those tools as well as the fact that this is not an exhaustive reference.  After initially reading through the book for this review, I&#8217;ve taken some time just to use it day to day, as I doubt many will be reading it from front to back.  I don&#8217;t use Python professionally.  I&#8217;m purely a hobbyist when it comes to programming, but I&#8217;ve found that if I want to get the most out of the time I do have to play with personal projects, I want this book close.  I&#8217;m not cranking out code that fast to begin with and so I need all the help I can get.  I&#8217;ve found that Beazley seems to have hit that sweet spot where he gives enough information to get me where I need to be without bogging down in too many details or the things that I just don&#8217;t need to know.  I imagine this proper balance of information is due to Beazley&#8217;s extensive experience with Python and that of Noah Gift the technical editor for the book.</p>
<p>I&#8217;ve mentioned repeatedly that I approve of how the shift between Python 2 and 3 has been handled.  Beazley hasn&#8217;t completely integrated everything and left some of the unique new features of 3 out in the cold.  There is an appendix that deals specifically with Python 3.  It is short but does have some value.  New features, common pitfalls for those making the move from 2 to 3 and how to run both at the same time in a single environment are covered.  This is helpful and keeps my desk a little neater, though I think if I were going to be spending extensive time working with Python 3 then I would probably want to have another reference on hand.</p>
<p>If you are a week-end hacker like me, or someone that is writing Python on the clock, I think that this compact reference is very useful.  I don&#8217;t have any trouble running across huge technical books that do come in handy for any project that requires something heavy.  I also see a lot of little books that seem to be quickly produced summaries of what is already out there, spending most of their short content on fluff.  Every so often though, someone hits that sweet spot of concise usefulness.  Beazley did this with <cite>Python Essential Reference</cite> and this new edition continues that history in strong fashion.</p>
<p>Title: Python Essential Reference 4th ed.<BR>Author: David M. Beazley<BR>Publisher:  Addison-Wesley Professional<BR>Pages: 738<BR>ISBN: 978-0-672-32978-4<BR>Rating: 9/10</p>
]]></content:encoded>
			<wfw:commentRss>http://geekbook.org/archives/205/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Invent Your Own Computer Games with Python</title>
		<link>http://geekbook.org/archives/196</link>
		<comments>http://geekbook.org/archives/196#comments</comments>
		<pubDate>Tue, 27 Oct 2009 13:23:18 +0000</pubDate>
		<dc:creator>bookGeek</dc:creator>
				<category><![CDATA[NonFiction]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[e-book]]></category>
		<category><![CDATA[free ebook]]></category>

		<guid isPermaLink="false">http://geekbook.org/?p=196</guid>
		<description><![CDATA[The Second Edition of Invent Your Own Computer Games with Python is available to read on-line or as a free download. This is a book that aims to teach children to use Python. The author says that it is appropriate for kids from 10 years old, on up.I haven&#8217;t read through it all. I gave [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://inventwithpython.com/"><img src="http://inventwithpython.com/images/cover_thumb.png"></a><BR><BR>The Second Edition of <a href="http://inventwithpython.com/">Invent Your Own Computer Games with Python</a> is available to read on-line or as a free download.  This is a book that aims to teach children to use Python.  The author says that it is appropriate for kids from 10 years old, on up.<BR><BR>I haven&#8217;t read through it all.  I gave the PDF version a cursory glance and it looks good.  The table of contents doesn&#8217;t give page numbers and there are some other rough edges, but at no cost, this is acceptable in my mind.<BR><BR>I do intend to read it and see how it compares to <a href="http://geekbook.org/archives/157">&#8220;Hello World!&#8221;</a>.<BR><BR>Edit: It looks like there have been some changes over at the site and so I&#8217;ve updated the post to reflect the title and show the cover of the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekbook.org/archives/196/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World!</title>
		<link>http://geekbook.org/archives/157</link>
		<comments>http://geekbook.org/archives/157#comments</comments>
		<pubDate>Thu, 02 Jul 2009 18:19:43 +0000</pubDate>
		<dc:creator>bookGeek</dc:creator>
				<category><![CDATA[NonFiction]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Education]]></category>

		<guid isPermaLink="false">http://geekbook.org/?p=157</guid>
		<description><![CDATA[Hitting middle age has been an interesting time. I catch myself thinking about how well kids have it today and sounding a lot like my father. One difference is while my dad was happy to teach me about sports or cars, we never spent any time knocking out code together. I think he did realize [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.manning.com/sande/"><img src="http://www.manning.com/sande/sande_cover150.jpg"></a><BR>
<p>Hitting middle age has been an interesting time.  I catch myself thinking about how well kids have it today and sounding a lot like my father.  One difference is while my dad was happy to teach me about sports or cars, we never spent any time knocking out code together.  I think he did realize that home computers were important and I will always be grateful for the Commodore Vic-20 be brought home one day.  It was a substantial purchase for our household.  I spent many days copying lines of basic from magazines and saving the results to cassette tapes.  In my home today we have a considerably better situation, computing wise.  There are usually a couple laptops running as well as the desktop machine upstairs.  My kids take for granted what I found to be amazing and new.  Still, that&#8217;s all pretty normal and I&#8217;d like to give them an opportunity to go deeper if they are so inclined, just like we give them opportunities to explore other skills and pursuits.  With that in mind I brought a copy of <cite>Hello World!</cite> home a few weeks ago, and the response from my oldest has been surprisingly enthusiastic.</p>
<p><span id="more-157"></span>
<p>Warren Sande wanted to teach his son Carter about programming but had difficulty finding what he thought was a suitable book to guide the process.  At the encouragement of Warren&#8217;s wife, he and Carter decided to write their own while Carter learned to code.  Warren chose Python as the language they would work in and then the two together outlined the book and created the sample applications.  As the book moves into more complex territory the sample applications are the kind kids like best.  They are games.  As soon as my daughter saw that she would get to make her own computer games she immediately asked me if we could start working through the book together.  When it has been a while since we&#8217;ve had a chance to crack it open, she reminds me by asking when we will get back to it.  I would say that on her end it has been a complete success.  It has been a great time for us as father and daughter and educational for us both.</p>
<p>Language choice can be quite a hot topic amongst us geeks.  In the preface Warren defends his choice of Python with a bullet list I&#8217;ll summarize here.
<ul>
<li>Python was created from the start to be easy to learn.</li>
<li>Python is free.</li>
<li>Python is open source software.</li>
<li>Python is not just a &#8216;toy&#8217; language.</li>
<li>Python is multi-platform.</li>
<li>Warren likes Python and thinks others will like it too.</li>
</ul>
<p>I think the list is pretty solid.  The only one I think may not be directly applicable to the case it hand is the FOSS angle.  Warren explains that being open means that more can be done with the software and that there is a large set of corresponding code out there freely available.  A case could be made that this is also true of more closed languages.  The one thing I think that could make this important is if the teacher of the material is interested in not just teaching the technical side of programming but is also interested in communicating the philosophical values of freedom.  In light of the amount of closed source software and ignorance in regards to FOSS options I&#8217;ve seen in the public school system where I live, I think this may be more important than some think.</p>
<p>The rest of the reasons though I think make Python an incredibly solid choice, and above all else is the simplicity.  My daughter has been able to have fun typing code into <a href="http://docs.python.org/library/idle.html">IDLE</a> without having to get hung up with a complicated environment.  The syntax is clean and simple, there is no compiling, it&#8217;s very easy to just jump in and start making things happen. I think this is important, the younger the student.  I was concerned that nine might be just a touch too young for this undertaking.  The book itself does not make any recommendations concerning age.  The more I&#8217;ve thought about it, the more I agree with that choice.  Children vary so greatly and any number chosen would be rather arbitrary.  My nine your old has done well so far, but she is already quite a book worm and leans towards more academic pursuits.  An older child may struggle and there may be some that are even younger that would be fine with the material in <cite>Hello World!</cite>  So rather than focus on age I think a parent needs to come at this from a perspective of ability, proclivity and experience.</p>
<p>In the ability area, a child is going to know how to read, work with a mouse, and type things via the keyboard.  Of course the mouse is optional strictly speaking but most will probably want to use it.  Some math skill would be good as well as the ability to understand the use of variables.  The book tackles the necessary material in a kid friendly way but it is not dumbed down.  In fact the learning potential here is huge, as one may imagine.  The book is formatted with lots of visuals and fly-outs that give information on how computers operate and how programming languages deal with information processing.  My daughter and I have already had interesting discussions on subjects like integers and floats.  An example that draws a sine wave lead to a great teachable moment about amplitude and wave length.  Then there is the constant need for approaching problem solving in a structured manner using logic.  I think that taking on programming brings a wide number of benefits.</p>
<p>One of the features, is a little caricature of Carter that is placed throughout the book with observations that the real Carter made as he learned with his dad.  These are things that a real kid noticed, and so they are likely to stand out to a child working through this book.  For instance in the chapter on &#8220;Print Formatting and Strings&#8221; Carter says, &#8220;I thought the % sign was used for the modulus operator!&#8221;  The book explains that Python uses context to choose how the % sign is used.  There are other little cartoon characters that appear throughout the book drawing attention to important points that need to be remembered.  Learning is reinforced through quizzes at the end of the chapters.  The chapters are not too long but I&#8217;ve found that my daughter and I have to break them into sections because of her typing speed.  I&#8217;ve been tempted at times to move things along by typing for her but I know that she will not get the same benefit from the exercise if we do it that way.  I will also let errors slide by at times to allow her the opportunity to look at error messages and find the problems.</p>
<p>As I mentioned the book is billed as being for kids and &#8220;other beginners.&#8221;  I&#8217;m going to say that the primary focus is rightly on kids, and probably kids who are in grade school or maybe junior high.  This is not to say that the examples and information wouldn&#8217;t be great for anyone brand new to programming.  There are even some nuggets for someone who has written some code but is new to Python.  I am going to guess though that the average high school student will not be as taken with the cartoons and puns.  I&#8217;d have loved to have written my own lunar lander game at that age though, so maybe I&#8217;m selling this short, or maybe it would be something a teen would be happy to work on away from the eyes of others, so as not to appear childish.  (I may take heat for this but even as a teenage geek I was immensely worried about the perceptions of my peer group.)  I think an adult that was serious about learning to program, even if they had no prior experience, would do better with heavier material.  All that said, I think for children they&#8217;ve really hit the sweet spot and as much as marketers would like it to be so, no book can be everything to everyone.</p>
<p>Things start simple with print statements and loops that took me back to good old days of watching messages scroll endlessly by on display computers at Sears when I was a kid.  The move towards games starts even then with text and quickly moves on to leveraging Pygame for games that utilize graphics.  I think this is important as it keeps things entertaining while teaching important concepts at the same time.  I have to say it is quite a bit fun to sit with my child discussing nested loops and decision trees.  By the end of the book examples will have included a simple virtual pet, a downhill skiing game and a lunar lander simulation.</p>
<p>I&#8217;ve discussed a child&#8217;s ability a bit but I think the last two things I mentioned must be taken into account as well.  They are proclivity and experience.  I&#8217;ve let my daughter drive the time we spend working on this.  Just like the parents who project their sports dreams on their kids, I think there is a possibility to do the same with my love for all things digital.  It may even be easier to do so as I view the ability to do some amount of programming to be an important life skill.  The thing is I don&#8217;t want to push her too hard and have her back away from it completely.  This fits in with the experience part.  We take it as it goes, and if things stop being fun, we will back off.  I don&#8217;t do this with her core disciplines from school like reading and math, but for something that is extra right now I&#8217;m not going to push.  It would transition from being a joy to being work.  That brings up a last and unexpected benefit from <cite>Hello World!</cite>  I&#8217;m rediscovering a lot of the fun and excitement that drew me into this industry in the first place.</p>
<p>Title: Hello World!<br />Author: Warren and Carter Sande<br />Publisher: Manning<br />Pages: 430<br />ISBN: 978-1933988498<br />Rating: 9/10<br />Tagline: Computer programming for kids and other beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekbook.org/archives/157/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.195 seconds -->
