Python | Links | Learning App | Code Wars | Hitchhikers

hitchhikers-guide-to-python
Preview image of book ~ not available yet as of July 2016

Aaah, I’m stuck on question 2 of Code Wars’ Python test! While researching the answer to this question involving __init__ I came across the blog of Jeff Knupp – he seems to write in depth with good analogies and code examples etc; also, an e-book by him is avaiable.

I’ve ended up going full circle; all the way back to Chapter 9 on Classes in the official Python documentation/tutorial. I think that is where I need to go next in my Python journey! [I also installed an Android app that is just basically the Python 3.5 docs – Little Drops]

The above picture is from the Python docs chapter about using Turtle to draw images. Also, while looking for a nice image to borrow for this post I came a Python and Blender based Procedural City Generator..

One more waffer thin link: The Hitchhiker’s Guide to Python!

Makeuseof | Programming | Interview | Preparation

turtle-star
“Turtle can draw intricate shapes using programs that repeat simple moves.”

My Google Plus feed for Makeuseof recently had a nice guide to help when preparing for a programming interview. It also featured links to some websites to practice coding, such as:

Project Euler
CodinGame
/r/DailyProgrammer on Reddit

I’ll add these to my arsenal of learning programming resources. 🙂

 

Programming | Cool sites | Web Development

Study-Web-Development
Lots of resources at Study Web Development

Thankyou to StudyWebDevelopment.com for the 3 website suggestions:

  • Larger.io – Let’s you see what programming languages and frameworks are used on any website.
  • Typing.io – This is such a cool app to practice your coding skills and to help you code faster.
  • Caniuse.com – See what frontend web technologies will work on most of the browsers.

Freecodecamp | Resources | Coding | Learning

Freecodecamp clubs
Freecodecamp clubs

Wow! Actually, my exact words were “Oh my gaad!” or something; that was what I said when I started the next section at the start of my Freecodecamp journey – HTML elements. My surprise was at the big resources page called Let’s Explore the Universe of Programming which seems to have a ton of links to loads of free programming books and even free University courses!

This blog post is being written in the time I’ve set aside for “learning to code”. The philosophy I picked up from a Youtube video that featured Freecodecamp was to aim to do 25 minutes of coding a day; and to do 3 days in a row. Then 3 weeks in a row and then 3 months in a row. This is especially if you really want to code but you are finding it hard to get started or to focus etc.

It’s the first day of my second block of  3 days and I still haven’t actually done any coding yet! But, I have installed Gitter on my smartphone and joined the chatroom for Freecodecamp (don’t forget the Facebook page and the local clubs list with links to the Cardiff and Chepstow clubs and the FCC subreddit). So, in my last few minutes I am going to look at the first proper tutorial (which looks pretty easy if you’ve done lots of HTML before).

But I will definitely be going back and looking at the free Uni courses linked via FCC. But next I have to join the forum. And check The Changelog – a podcast all about opensource.

Ooh! Almost forgot to link the Github Readme on the main page.

Fullstack Python | Flask | Resources | Tutorials

Flask Peewee
Flask

The Fullstack Python site has a page dedicated purely to Flask resources and tutorials. With links to the Mega Tutorial and many others – there seems to be an emphasis on guides that get you to make real projects.

Flask is a Python web framework – I haven’t yet tried it myself. After trying Django with the Django Girls tutorial (actually, I haven’t completed the last proper section yet – Django Forms). From what I’ve read about Flask it sounds like it is smaller and more “Pythonic”. For a definition of that word, the Secret Weblog recommends that you type import this into a Python interpreter.. I just tried it and it works.

Code Visually also recommend Full Stack Python and carlos.bueno has a long page about what it means to be a full stack programmer.

Credit: I have borrowed the Flask + Unicorn image from Charles Leifer’s Python blog who also has a post about building a Flask app in an hour (or less).

Video | PyCon | How to | Writing | Blogging | Review

The video is a very nicely paced talk about how to write a great programming blog (or any other topic really). It’s at PyCon 2016 in Portland, Oregon. He really takes his time and has great slides that simplify what he’s talking about. The Youtube description also has links to the actual slides on Github too.

It’s 27:00 minutes long roughly and it has great audio with the speaker in the corner of the screen to leave room for the slides. He uses a classic teaching structure:

  • tell them what you’re going to tell them
  • tell them
  • tell them what you’ve told them

I personally found it very inspiring as I have been publishing blogs since 2005 (e.g. such as this short post written by myself from almost exactly 11 years ago that links to an intriguing article by George Monbiot about choosing a career). Sometimes I may spend hours over one blog post so it’s great to hear someone describing blog posts as articles or essays.

At the end of the talk he provides a bit.ly link that takes you to his essay about writing great content (which I’ve not read yet). He provides some great yet simple ideas such as reading articles all the way to the end and asking yourself whether it was an effective article or not. The main idea behind the talk is that he provides techniques, concepts and structures that will help if you write blogs but struggle to find the time etc.

Python | Conditional Main Program

Code example
Code example

Today I learned about the use of a “conditional main program” when programming Python. I read about this in a great Python tutorial PDF from Southampton Uni.

You may write some code that is only intended to be used as a module for another program. So if you try running the module directly you may well get no output or response. But, if you include the code below

if __name__ == " __main__ " :

and if you include some functionality to this function, you will get some handy output. It means you can run a module as its own program. You could get it to give some instructions about the correct use of the actual program or use it as an example of what the main program is supposed to do.

Go to page 73 of the PDF for a better explanation! Or this blog post about the same topic.

And here is a page about Spyder and part of a book on computational programming that also covers Spyder.