tech

Programming Class - Lesson 1 - Basic Expressions

in

So begins Lesson One - Basic Expressions

In the previous message you wrote your first program, the traditional “Hello World.” How does it feel to be a computer programmer?

Not all programs are so simple of course, though you’d be amazed at what you can do with a few lines of code.

Programming Class - Introduction

in

History: I’ve offered to teach some high school students that attend the same church as me how to program. I’ve taught programming classes before but this one is unique because it’s happening mostly by email. Therefore I’ve decided to post the classes here. I’m editing them slightly to remove identifiable information about the students and also information about meeting irl. Also, keep in mind that this material is being written on the assumption that the student is a bright, self-motivated learner age 15 - 19 without any prior programming experience.

So lets get started.

Connecting to firewalled hosts using PuTTY SSH

in

Maybe this fits your description:

  • You have a network of computers (or one computer) protected by a firewall of some sort
  • You want to be able to ssh into those computers
  • Your firewall runs Linux or some other OS that has OpenSSH on it.

If your personal computer that you’re running SSH from is Linux or has OpenSSH on it, this is a piece of cake (I’ll explain further below). But if you’re using Windows and PuTTY then it can be a bear to get setup.

Scenario:

  • You’re using Windows and PuTTY SSH.

Simple Iterable Objects in Python

in

Sometimes the python documentation can give too many details such that its difficult to get answers to simple questions. One that I’ve just worked through is “[iterable objects][0].” For example, if you have an object called Family and you want to display a list of all the members of that family, you might use this code:

family = Family('Nuzums')
for person in family:
    print person['first_name']

Shouldn’t be hard, right? Its not, once you figure it out. You start out with your usual class definition, then you need to add the following methods:

Syndicate content

Back to top