Saturday, May 31, 2014

Still Keeping to Pygame Despite Great New Kivy O'Reilly Book (for now)


Since I wrote about Kivy six months ago, my son and daughter have continued to make strong progress with Pygame.  For IDEs, they've both moved to PyCharm with its awesome code completion and easy integration with GitHub.  My son is making progress with object oriented programming and recursion.

Kivy is much more powerful than Pygame.  It is also harder to use.  Although the documentation is comprehensive, only the tutorials on Pong and Paint are geared toward beginners.  It also not designed to teach programming concepts to new programmers.  Kivy is geared more toward intermediate to advance programmers that want to get a mobile app up quickly. The new O'Reilly book, Creating Apps in Kivy,  by Dusty Phillips is great.  However, most people new to programming will get stalled around chapter 4.  Although the text is easy to follow and the code examples are clear, the concepts are dense.  Just as an example, in chapter 2 of this thin book, Dusty rips into list comprehensions.  While the example is easy to understand, a new programmer is better off dealing with for loops and list iteration.

There's many other places where Dusty teaches us a valuable concept, but I think it is too much, too soon for young developers.  This said, I've been gearing up for my son''s summer by going through the Kivy book and I plan to introduce him to Kivy later in June.

Kivy makes use of a Python file, which works great in PyCharm, and a kv language file, which does not work great by default.  To get the kv language syntax highlighting and tabs working properly in PyCharm, you need to install the kv settings file.  This makes the development process much easier.  I could never get the kv language settings working properly in Emacs.    After 20 years of using Emacs, I find myself grabbing PyCharm more and more.  It's amazing to me that even at my age, I find myself moving to new tools.  I've even moved off of the Emacs key mappings and am using the default PyCharm keymaps.  JetBrains has done a nice job.

I've also gone through the Packt Publishing book, Kivy: Interactive Applications in Python.  The O'Reilly book is much better, clearer, easier to read, with less errors in grammar.  It's also newer.  The O'Reilly book does focus on Python 3, which I don't think is a good thing since most Kivy development is still done with Python 2.7.  Though, I haven't run into any problems following the Python 3 examples.


No comments:

Post a Comment