I got a copy of Computer Programming for Kids and other Beginners for review, I was interested because I have always thought that someday I would like to write a programming book for kids — I would have given my right arm to have this book as a kid! Here are some things I have always considered and how this book taught them:

How to get “out of the dos window” ?
Whenever my husband sees me typing at the console, he calls it the “dos window!” and he thinks we could move past that! I explain that you can’t point and click your way through life. But, visual is the way people think of UI’s now and it makes the program seem “real” if it has a popup box rather than a prompt on the console. Right off the bat, this book starts out introducing EasyGUI. one example of usage is

user_response = easygui.msgbox(”Hello there!”)

Nice huh? easy and straight forward. I think a new programmer seeing progress like this is pretty cool and probably very encouraging!

Looping
Whenever I have tried to teach looping, i have started out with arrays and indexes. Starting from 0 to “count” has always been confusing. This book uses ranges to loop. Starts at one and keeps it simple. Great idea!

Game
There is a chapter on PyGame and has a simple ski game. Reading through the code in the book gives you an idea of what a game is like and it annotates the sections of code to help you follow. Putting this in the middle of the starting section is cool, it keeps the reader from being all about syntax and seeing real code help them keep the end goal in mind.

More Syntax
The book continues with functions, objects, modules … but then another game chapter. This goes through some simple examples of graphics. Its pretty good I think, i think its easy for beginners to look sight of what they are making…syntax really isn’t all that fun. But i think this book is going to keep someone interested.

More on GUI
PyCard is another GUI library to help. I haven’t heard of this, but it looks pretty cool. Looks pretty easy to use.

String Formatting and File IO
This is something that is always at the beginning of a book. How interesting that it is last. I think because its not very interesting! Really how interesting is it to format a number. This chapter ends with a hangman game where the words are stored in files. Thats cool, something useful with files.

Infinity and Beyond!
The book ends with a few chapters to inspire the new programmer, computer simulations and hints on where to go next.

Overall an excellent book to inspire and keep a new programmer interested. Young and old alike. This book has fun stuff and tools to make it easy to learn (PyGame and PyCard). I’m actually wanting to go try some of this now…

This book is still in beta, but so far… I love it!

Chapter 1 is a very brief overview of RSpec and Cucumber and in Chapter 2 you are shown some examples. This is Real Code That Works! You can type it in and run. That is awesome, I was so excited last night that I almost couldn’t stop and go to sleep (Doc tells me to get more sleep. BAH!). I’ve done RSpec on a fairly large project before, a few years ago. I had seen some presentation at the Chirb meetings about some kind of testing involving Stories and Scenarios. It was interesting then… I just wasn’t sure how you can translate that into code. Now I see, it looks like this method has matured to the point where it is viable. Cucumber is only version 0.3.11 at this time but hey! Its cool, its tight, its gonna take off!

Chapter 3 - Starting off with a game example! WAY TO GO! Nothing more uninteresting than Yet Another Bank Account or Blog example. This is totally awesome. Its a very conversational at first, as you are learning how to apply the “Story” concept to the need. Once the planning is out of the way…. its time to code!

Chapter 4 - Cucumber, Writing steps to the stories

Chapter 5 - RSpec, writing rspec tests

Its great to see code that you can type in an run and its kinda fun, it a game! what isn’t fun about that! Great book so far Dave Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesoy, Bryan Helmkamp and Dan North. Right on! Looking forward to the rest :)

Not sure!

I’m done with school for the summer and trying to decide on …

- working on a site in rails (haven’t done much rails in the past year.. ::cry::)
- learning more about GWT (Google Web Toolkit)
- making an android app, i started a few but haven’t gotten very far
- trying antlr (http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-reference)
- reading a sort non-tech book like Pragmatic Programmer or http://www.pragprog.com/titles/cfcar2/the-passionate-programmer

I picked up another copy of Getting Things Done.. i had given the book to my mother and bought it on audio book. Is such a nice sized little book (paperback).

I’m watching the git peepcode again.. haven’t used this in a little while. Man if you don’t use something you lose it! All I’ve been doing lately is perl and mason. I read a bit about using git to use your svn repos but i am not so sure its worth it??

More later… when i figured out what project to work on. Suggestions welcome!

I am trying to teach my husband Nick some programming. He has tried before but he always loses interest before we get more than a couple sessions. He finally found a problem he was interested in solving. He wants a program that will tell him the most efficient way to organize his vast dvd collection. Keeping series together in a binder and leaving blank spaces for DVDs yet to be acquired. Then no more shuffling will be needed later when he gets the other DVDs.

He was confuse with some of the terms I was using …

Loop
Ok so we start simple, just reading a hard coded file name and looping through and printing the csv row from the file. He was like “loop?” thinking that we were going to start at the beginning, go to end, then back to the first which didn’t make any sense! He was like why are we looping?? Oh, hmm. I guess we aren’t really looping. We are more like walking through the file and printing each row of data

Why do we use the word loop?? it not really a loop? What is a better word?

Dictionary.com says (among many defintions) :

1. a circular area at the end of a trolley line, railroad line, etc., where cars turn around.

2. an arm of a cloverleaf where traffic may turn off or onto a main road or highway.

3. Computers. the reiteration of a set of instructions in a routine or program.

Iterate

I also use the word iterate interchangable with loop. “We need to iterate though this list and find X value” Nick was saying that iterate is when you review something. What do you think?

Dictionary.com says:

1. to utter again or repeatedly.
2. to do (something) over again or repeatedly.
–verb (used without object)
3. to operate or be applied repeatedly, as a linguistic rule or mathematical formula.

Do we as programmers abuse the english language and come up with our own dialect?

It been months since I went…but I was missing my ruby peeps! I didn’t see too many of the old faces and they have started a new tradition of going out for a beer afterwards which is always a good time when I can talk code over a Guniness! Good times!

The talk was about something I had not heard of before — Sinatra. It seems like it would be nice for a lightweight site that you didn’t need alot of the power of rails. It has a testing framework too. It is able to use the data mapper ORM which was also new for me. I’ve always wondered what it was like, it seems pretty cool.

Man i want to really work on some ruby now!!!

This is not a ground breaking thing but something I learned a few weeks ago. I've been learning java for the past few months and its a whole different world than php, perl or ruby. I learned how to use standard in from my professor a few week ago. Say you have a program like this, where you want to get some user input.

JAVA:
  1. import java.util.ArrayList;
  2. import java.util.Scanner;
  3.  
  4.  
  5. public class Example2 {
  6.  
  7.     /**
  8.      * @param args
  9.      */
  10.     public static void main(String[] args) {
  11.         Scanner input = new Scanner(System.in);
  12.         ArrayList<String> studentList = new ArrayList<String>();   
  13.        
  14.         System.out.println("Enter names separated by \n or space, Q to quit");
  15.         while(input.hasNext()) {
  16.             String userInput = input.next();   
  17.             if (userInput.equalsIgnoreCase("Q")) {
  18.                 break;
  19.             } else {
  20.                 studentList.add(userInput);
  21.             }
  22.            
  23.         }
  24.        
  25.         for (String name : studentList) {
  26.             System.out.println("Name is: " +name);
  27.         }
  28.     }
  29.  
  30. }

Modifying the program slightly, you can accept standard input like:

JAVA:
  1. import java.util.ArrayList;
  2. import java.util.Scanner;
  3.  
  4.  
  5. public class Example {
  6.  
  7.     /**
  8.      * @param args
  9.      */
  10.     public static void main(String[] args) {
  11.         Scanner input = new Scanner(System.in);
  12.         ArrayList<String> studentList = new ArrayList<String>();   
  13.        
  14.         while(input.hasNext()) {
  15.             String name = input.next()
  16.             studentList.add(name);
  17.            
  18.         }
  19.        
  20.         for (String name : studentList) {
  21.             System.out.println("Name is: " +name);
  22.         }
  23.     }
  24.  
  25. }

Then you can run the program on the command line like this:

$ java Example < sample_data.txt
Name is: Bob
Name is: Charles
Name is: Henry
Name is: Emery
Name is: Chad

Not too earth shattering but may help you make a simple program easier to test!

Wow, its been a long time since I wrote anything. I guess I haven't done too much cool lately in programming or really much coding to think of it. But I have been working on some things...

Android! -- I've been working on an android app with a friend ... soon we can talk about it I think. Its kinda fun to program and actually see it on a device. I've been bored with web programming, so this is actually something different and interesting.

School! -- I'm starting a masters program in computer science. First class? ... Java ... Though I am not superexcited about java, it what I need at work now. SO, java it is. I took my ruby books off my desk so I wouldn't have to be reminded of them. ::sniff:: ::sniff:: (Don't slap me Obie!)

Haskell! -- Yeah, I'm learning Haskell ... I am reading Real World Haskell which is available free but I also ordered the book. Nothing like flipping through pages of a book... but its also nice to have it online too! I've always "heard" it makes you think differently and so I am looking forward to that since I've been bored with programming really the past 6 months.

Well, thats all for now ... look for some tidbits about haskell and android in upcoming weeks.

I am not not not not doing it! I am not getting an iphone. The lower price is very very tempting... but I am not doing it. A friend of mine signed up for an apple developer account like hours after it opened -- I asked him yesterday if he was approved and he said ONLY 4 PEOPLE ARE! out of 200k ... huh? what? where are all the HUNDREDS of apps that Apple thought would magically appear when they let the SDK loose on eager developers. Hello?

What is going on Apple? I love my mac... and would like to have a phone that would integrate with it ....

Meanwhile I haven't done too much with Andriod development but I keep up reading blogs about it. I don't feel like I have all the restrictions and "Steve Jobs says ..."

I'm holding out for an android phone...and by the rate things are going with the iphone developers.. my app will be done before yours.

I had a pcmcia sierra wireless broadband card for my old laptop for the past 2 years , since I have a loooong commute and its just plain boring being off the grid. I am usually programming on the go and sometimes I need to look something up or ask a friend or install a library. On one hand, it was a distraction. I would get on the train and just browse the web instead of concentrating on a project. On the old laptop i dual booted - so when in linux, no internet, I could not set it up for the life of me. So I had to boot to windows (another reason to NOT use the net, ugh windows). So, I could get alot done without the distraction. Well, I want internet back!! even so much so that I am not getting a crackberry or iphone or any other fancy phone for awhile (secretly holding out for a android phone in the fall)

So I am happy to say -- the new aircard is on the way!

Being off the grid I found "offline" things to do....

Google Reader -- offline mode is freaking awesome. Before i log out at night I sync and download my blogs. Read them on the train, get to work - sync and download. If I remember I will sync and download them again before I leave to get the afternoon content. Today for some reason, its not working. :(

Print to PDF -- if I find a page with a blog, tutorial, whatnot I will print to pdf to read it offline. Its pretty cool. I can search it easy too. Generally webpages look decent, though I've had some sites where the text runs off the edge of the page into who knows where?

Stockup on PDF books -- This has more to it then just being off the grid, but for the last Apress book review I am doing I asked for a PDF book. Nice, I got it within an hour! Rock on. I still like paper books though, for home. And for reading at the gym.

Sleep -- usually I can never sleep on train and usually never ever nap unless I am deathly sick. If I skip the after lunch/afternoon coffee I can sleep on the train usually. I usually have to set my backpack on my lap soI have something to lean over on. My rain poncho that folds up into a little pocket actually makes a nice pillow! I don't sleep every day, but every so often. I haven't had much success sleeping in the mornings, even if I dont bring coffee with me.

Read paper books -- obviously... I've been reading some fantasy books: Warcraft Archives, its fun to read about these places and people i hear about in the game of World of Warcraft. I'm also reading Elminster, a book about a wizzard. Its pretty cool.

Playing DS -- some days I bring my Nitendo DS with me. I am working through thew New Zelda game and Final Fantasy III. Boy is FF hard, I get so far then die...and I have to start over. Where's the freaking save point? Its the first time I have played a game of this type, my husband warned me it was hard core and difficult! But I feel up to the challenge.

Write Blogs -- I've been writing more lately I think, I will write them offline then upload them when I get to a net connection. I will sometimes even compose emails into a text file to people and then copy-paste them to emails when I get net.

I'm watching the Git peepcode by Geoffrey Grosenbach and as usual with other peepcode it is very good. This is the ultimate in geek-tv. I swear, i will burn these to a DVD sometime so i can watch them on my tv! :)

Things I like about git so far:

- branching, since I am often on the road without internet access.
- clean, just creates one .git dir in your project root. I just found a bash command that will clean out my .svn dirs from a project I've modified so much on the road that I've borked up the svn process and I'm going to convert it to git

BTW here's that bash command if you are interested

from: http://www.anyexample.com/linux_bsd/bash/recursively_delete__svn_directories.xml

its simply:

rm -rf `find . -type d -name .svn`

Haha, I remember I wrote a perl script I think to do this like 4 years ago for someone. Who knew it was just a rather short bash command...apparently not me.

Branching is freaking awesome. But what is even more interesting is the stash. Geoffery said it was like a clipboard. You can be working away and you have some changes you are in the middle of but you don't want to commit yet, so you stash them, then go do something else, then later get that stash and apply to your code. Interesting.

There is a progam gitk that will give you a GUI look at your branches and commits. Thats cool.

get-svn lets you use git locally and then check back into svn.

BTW I keep typing get instead of git! ... grrr.. I am about ready to make an alias! :)

I like! .. and the Peepcode screencast is great, as usual. I will need to watch the branching again but I highly recommend getting this screencast if you are interested in learning git. Its only 9 bucks!

Next Page »