Monthly Archives: January 2016

Two Face-to-Face @Coursera Office Hours – Orlando Florida

I will be having two face-to-face @Coursera office hours in Orlando Florida this week. One in Universal Studios near Harry Potter World and another at the hotel where I will be attending a meeting.

The first Orlando face-to-face office hours for my Internet History and Python for Everybody courses will be Sunday Jan 24 – 3:00PM – 4:00PM at Moe’s Tavern in Universal Studios.

https://www.universalorlando.com/Restaurants/Universal-Studios-Florida/Springfield-Dining.aspx

I wish we could have met at the Leaky Cauldron, but people tell me it is too crowded. But the Leaky Cauldron is a five minute walk away so at the end of the office hours we can walk to Diagon Alley and take a video.

The second face-to-face office hours will be at Holiday Inn Express & Suites – Orlando International Drive Tue Jan 26 – 6:00PM – 7:00PM in the lobby / breakfast area.

7276 International Drive
Orlando, Florida 32819

http://www.ihg.com/holidayinnexpress/hotels/us/en/orlando/mcocd/hoteldetail

I hope to see you at one or the other of the office hours.

Contributing to Python 3.0 for Informatics

After many years as a successful Open Python 2.0 textbook, the time has come to update Python for Informatics to be Python 3.0. There will be a lot of work since the Python 2.0 textbook and slides have been translated into so many languages and there are five courses on Coursera all built around the textbook.

Since there is so much work to do, I welcome any and all assistance in the conversion and review of the book. If I can get help in converting the core book, I will have time to add three new chapters that have been requested by the students (see the TODO list for details).

While there are several groups that will likely translate the book and/or slides into Python 3.0, lets wait until the book is relatively solid to make sure that all of the variations of these materials are well aligned.

Temporary Copyright

While I am in the process of drafting a book, I do not put it up with a Creative Commons license. I don’t want anyone grabbing the half-completed text and publishing it prematurely. Once the book is in reasonably good shape I switch the copyright to my normal CC license (CC-BY-NC for print books and CC-BY for all electronic copies). I expect the book to be ready to release in early 2016.

Contributing to the Book

The entire text of the book is in GitHub in this repository:

https://github.com/csev/pythonlearn

There are two basic ways to contribute to the book:

  • Create a GitHub account, then navigate to one of the files for the book in the repository like
    https://github.com/csev/pythonlearn/blob/master/book/02-variables.mkd
    Press the pencil icon to edit the text, and then when you “save” the text, it sends me a “pull request” where I can review your changes, approve them, and apply them to the master copy. Once you get going, it is really easy.
  • If you have more tech-skillz, you can “fork” the repository and send me pull requests the normal way. If you use this approach, please send pull requests quickly so we all stay synchronized. Don’t worry about trying to squeeze a bunch of work into a single comment (like many projects prefer). Lots of little commits avoid merge conflicts.

Make sure to take a look at the TODO list to figure out where you can help. We are only working in the book and code3 folders. We will not be converting the code folder as that will be maintained as Python 2.0.

We have a build server that re-builds the entire book every hour at:

http://do1.dr-chuck.com/pythonlearn/

So you can see your contributions appearing in the final book within an hour of me approving your pull request. GitHub tracks your contribution and gives you credit for everything you do. Once the book is ready to publish, I will go through the GitHub history and add acknowledgements for all of the contributions to the text of the book.

If you send in a pull request and it seems like I am not moving quickly enough for you, simply send a tweet with the URL of the pull request and mention @drchuck. That will make sure I see it and get working on it.

Thanks in Advance

I appreciate your interest, support, and effort in helping make this open book a success for all these years.

I want to make sure to acknowledge the contributions from authors of
Think Python: How to Think like a Computer Scientist” by
Allen B. Downey, Jeff Elkner and Chris Meyers. Their original groundbreaking work in building an open and remixable textbook in 2002 has made the current work possible.

Tsugi – Non-Upwards-Compatible Change – Using Composer

I made a non-upwards compatible change to Tsugi to move towards refactoring the current monolithic Tsugi code base into separate components. I already factored out the static content (tsugi-static) which is shared between the PHP and Java implementations.

Now I am moving the code that was formerly under lib/vendor into its own repository and have it included using Composer and Packagist.

When you do your next “git pull” or check out a fresh copy, you will need to change your config.php and replace one line:

Remove this line:

require_once($dirroot."/lib/vendor/Tsugi/Config/ConfigInfo.php");

Add this line:

require_once($dirroot."/vendor/autoload.php");

If your Tsugi code explicitly includes anything from lib/vendor/Tsugi (it should not) the fix is to simply remove those includes and allow auto-class loading do work its magic. If you include config.php the auto class loader is in effect.

This makes it so we are loading all the Tsugi classes using the auto loader pattern. Interestingly this allows me to make use of the Tsugi utility code in projects that are not even using LTI.

At this point, I am including the composer.lock file and vendor folder in the Tsugi GitHub repo so that it is a one-stop check out that has the files in their new locations and uses autoloading.

In the long run, I will keep a one-stop-check-it-all out repo but eventually get to the point where a Tsugi tool can stand alone in a repo and have all its dependencies fulfilled by Composer.

If you don’t fix the config.php as described above after you r next git pull, you will see the following error:

Warning: require_once(/Applications/MAMP/htdocs/tsugi/lib/vendor/Tsugi/Config/ConfigInfo.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/tsugi/config.php on line 15

Fatal error: require_once(): Failed opening required ‘/Applications/MAMP/htdocs/tsugi/lib/vendor/Tsugi/Config/ConfigInfo.php’ (include_path=’.:/Applications/MAMP/bin/php/php5.5.10/lib/php’) in /Applications/MAMP/htdocs/tsugi/config.php on line 15

Of course the fix is trivial.