Monday, August 4, 2014

The Way of the Program

The single most important skill for a computer scientist is problem solving. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately. As it turns out, the process of learning to program is an excellent opportunity to practice problem solving skills. That’s why this chapter is called, The Way of the Program. - How to Think Like a Computer Scientist.

Is programming a discipline that can increase one's ability and desire to solve problems? Or are people who are drawn to programming more naturally inclined toward critical thinking and problem solving?

I think that the answer may be a mixture of the two. I firmly believe in constantly doing that which one can not do. (Borrowed from Van Gogh) Perhaps it's my stubborn, dogged mind. My mother used to say that when I was little, if I couldn't get what I wanted one way, I would keep trying different angles until one worked.

It became a life philosophy for me. I call it the Assaulting the Fortress way of life. If one way doesn't work, keep going around the fortress until you find a chink in the wall that you can begin to whittle away at, or search out the bolt hole. (Many ancient castles and fortresses had an underground passage that led out a secret way for families to escape if under attack.) If I want something badly enough, I'm certainly not too good to sneak in the back way.

The take-away here is never give up and keep trying different things and be stubborn, but flexible. For me that is problem solving. Let's see how well it works in learning to program.

Today I'll be reading Chapter 2 in Python Programming for the Absolute Beginner. I have to figure out the best way to post on those lessons. The author worked hard on them and I don't want to infringe on his rights or hard work.

I would love to hear people's thoughts on this. If for some reason you can't post a comment, please let me know at nadinarmedlin@gmail.com

Have a great day and never give up!

Friday, August 1, 2014

How to Think Like a Computer Scientist.

The book How to Think Like a Computer Scientist was originally written by Allen B. Downey for a JAVA course he was teaching. He states in the following article, "I had taught it three times and I was getting frustrated. The failure rate in the class was too high and, even for students who succeeded, the overall level of achievement was too low."

So he wrote a book with the following goals:

  • Keep it short. It is better for students to read 10 pages than not read 50 pages.
  • Be careful with vocabulary. I tried to minimize the jargon and define each term at first use.
  • Build gradually. To avoid trap doors, I took the most difficult topics and split them into a series of small steps.
  • Focus on programming, not the programming language. I included the minimum useful subset of Java and left out the rest.

  • He released the book under GNU Free Documentation License and Jeff Elkner, a high school teacher in Virginia translated to book into Python and sent a copy to Allen Downey. 

    Allen Downey published the Python version as Green Tea Press. It has evolved into a book called Think Python.

    Here is the article.

    Now, the book I'm using is still called How to Think Like a Computer Scientist. Their introduction says it best:


    About this Project

    This interactive book is a product of the Runestone Interactive Project at Luther College, led by Brad Miller and David Ranum. There have been many contributors to the project. Our thanks especially to the following:
    • This book is based on the Original work by: Jeffrey Elkner, Allen B. Downey, and Chris Meyers
    • Activecode based on Skulpt
    • Codelens based on Online Python Tutor
    • Many contributions from the CSLearning4U research group at Georgia Tech.
    • ACM-SIGCSE for the special projects grant that funded our student Isaac Dontje Lindell for the summer of 2013.
    The Runestone Interactive tools are open source and we encourage you to contact us, or grab a copy from GitHub if you would like to use them to write your own resources.

    The great part about this book is the interactive code. When you open the book you see a graphic program called Turtles. It is a spinning design in different colors. Right below this is a box where you can run the program and watch it spin again or show/hide the code. It gets you playing with code right away by having you show the code and change the number of turtles in the graphic from 10 to 6.


    I love how they emphasize playing and having fun. It is the best way to learn. I tried registering, but don't have a class name to put in. I also tried the log in with Facebook option and got an error message. It is open source, and freely available, but projects like this do cost money. If you are able to donate to them, they can receive donations through Paypal. 

    What I have found is even though I am not registered, the book keeps the work I've done within it. I'll have to experiment with turning my computer off and clearing cookies and history to see what might make it lose my work.

    They tell you from the beginning that the goal of the book is to teach you to think like a computer scientist. This involves being able to think critically about problems and formulate solutions to them. That's why I'm so excited about learning to program! These are skills that can extend to other aspects of life. 

    Programming is cool! (Remind me of that when I'm tearing my hair out over the Base 8 number system! Ok?

    If you are learning along with me, today I am reading the following pages in this book.

    The intro to the book with a link of next steps.

    The first of the next steps, which is an overview of the features of the book. You can play with the video, active code boxes, the Codelens tool and the review questions. I didn't fully understand the last couple of exercises. I just played with them until I got the right answer. I also cheated on the Octal question. :) I pulled up an Octal Conversion tool. 

    Remember, right now you are just learning about the book. Right answers are relative and not the goal!

    Have fun!

    Thursday, July 31, 2014

    Building Games Right from the Start!

    I realized today that I actually ordered the second edition of Python Programming, for the Absolute Beginner. I'm not sure of the differences between the editions. I will also be working in Python 2.7.  I read a few things about the differences between Python 2.* and 3 and I decided to start with the Python 2. No special reason for this, I'm just old school and like to work from the ground up. :)

    What I really like about Python Programming for the Absolute Beginner is the exercises actually create little games. I just finished the first chapter and the result was a Game Over print out and a little bit of code that I don't understand yet, that keeps the screen open when you run the program, until you press enter.

    I'm looking through some of the other chapters. The games sound pretty cool.
    Chapter 2, The Useless Trivia Program
    Chapter 3, The Guess My Number Game
    Chapter 5, The Hangman Game
    Chapter 8, The Critter Caretaker Program
    Chapter 11, The Pizza Panic Game
    Chapter 12, The Astrocrash Game

    I love the idea of actually building something I can use and share. I'm a closet game addict. Back in the early Nintendo days I got caught up in Legend of Zelda and forgot to feed my kids dinner. I swore then I would never let a game control me. I revert occasionally, but my kids are grown and feeding themselves now.

    Tomorrow I'll go through some of the features of How to Think Like a Computer Scientist. It's an open source, interactive book that you can freely access. It has some cool features, but more about that tomorrow!

    Wednesday, July 30, 2014

    Studying Python

    I will be studying the programming language, Python for at least the next year! I'm looking forward to learning this simple yet powerful high level language and building some great things! Come join me if you like. I will be studying with two different books. 

    The first one is Python for the Absolute Beginner.

    http://www.amazon.com/Python-Programming-Absolute-Beginner-Edition/dp/1435455002



    The second one is How to Think Like a Computer Scientist Interactive version. It is based on the original book by Jeffrey Elkner, Allen B. Downey, and Chris Meyers. 

    http://interactivepython.org/runestone/static/thinkcspy/index.html

    I will be posting here on my progress. :) I will start tomorrow with a video and step by step description of how to install Python.

    I hope you can come learn with me!