"In the world ye shall have tribulation: but be of good cheer; I have overcome the world." –John 16:33

Category: Software Page 5 of 6

Notes on Christian’s 18th birthday

Day 745 of 1000

I will be in Arizona on Christian’s birthday this year so we had a birthday cake and celebrated a little early with a birthday cake and some candles after dinner last night.  It was nice.  I thought I would write down a few things about him to celebrate this milestone.
Christian and Dad, two days before his 18th birthday

Here are a just a few random notes:

  • When Christian was about 12, he had pretty sloppy handwriting, but for some reason or another, he got fascinated with the topic of fonts.  He implemented anti-aliasing of fonts on RockBox (an operating system for MP3 players with screens), designed some computer fonts, then decided he wanted to design his own, fast, efficient, handwritten, serif font.  He did that and it was quite amazing.  For a period of about two years he took notes and wrote letters with a hand-written font that looks essential similar to courier new.  When he started getting into complicated college class at age 14 or 15 he needed to write faster, so he dropped some of the serifs, but still has impressive handwriting skills.
  • Christian is one class short of his associate degree.  He has enough credits, but needs one literature class to finish up.  He loves his old community college (Wake Tech) and wants to finish the degree online after he gets out of graduate school.  I hope he does that.
  • Christian started NCSU as a Junior when he was 16.  Rather than go through normal channels to get a canned research project, he approached the professor in charge of electrical engineering graduate research to solicit a research project.  The professor told him no one had previously done that, but got the word out and he was given two professors that needed some help.  He is now on his third project for the professor he selected and has had a stellar research experience that has included circuit design, data gathering and analysis, PID loop tuning, C/C++, Assembly, and MatLab programming, a research paper, two research posters (and presentations), and he still has a big capstone project and paper in math and image processing to do before he graduates.
  • Christian started college full time at age 14, but had 15 credits from CLEP testing he started accumulating when he was 13 that were accepted by the community college.
  • Christian started his Senior year at NCSU at age 17.  He has a 4.0 GPA.  He is taking two graduate level math classes this semester and is scheduled for three more next semester.  He has been on the Dean’s list every semester he has been in college.
  • Christian took a driver education class that is offered by the State of North Carolina when he was fifteen.  He got his drivers permit just in time to spend the whole summer driving from near Fuquay-Varina with his Dad to an engineering internship in RTP.
  • Now that he is 18, he is old enough to go into the men’s locker room at the YMCA.
  • He is scheduled to do English-Spanish translation at our church convention this weekend.
  • He is a good son who gives us great joy.

HAPPY 18th BIRTHDAY CHRISTIAN!!!

A serious 18th Birthday picture of Christian with Dad

How to teach computer programming to kids (Part 9) A suggested curriculum

Day 617 of 1000

This is the ninth in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]

This post describes how I think I would teach an eleven year old kid how to program.  I explained the many things we did wrong and the few things we did right in teaching our kids how to program when they were young In the previous posts in this series.  We really did not do so badly with our son.  He is a good programmer with a solid knowledge of the fundamentals of object oriented programming in C#, C/C++, and Python.  His college level Introduction to Java class was a trivial exercise for him.  We did horribly with our daughter.  So much so that she struggled mightily with the same Introduction to Java class at which our son had excelled.

We have a good (certainly not perfect, but good) track record teaching our kids things like reading, math, art, typing, and all kinds of other stuff, so I have tried to think about what I did wrong and how I might do it if I had it to do over.  I think the main reason we did not do so well is that we did not see programming as an essential skill.  We were wrong.  All STEM majors need to know how to program and that knowledge is a huge advantage to kids who enter a STEM degree in the University.

What language should you chose?

So, what could we have done to teach our kids programming at an early age?  There are a lot of small concepts a new programmer has to learn before any attempt is possible to learn the big picture programming ideas, particularly object oriented programming.  There are lots of books that explain these details quite well.  A language that handles some of the minutiae for the new programmer so they can learn these small concepts one at a time is a big advantage.  Languages like C#, Python, and Java all qualify.  C/C++ does not for reasons #3 and #4. There are good reasons for selecting one of these languages:

  1. These are serious languages for serious programmers that can perform anything from small embedded applications for single board computers to game programs running on personal computers to full-blown, big data, internet enabled monster programs running on “big iron”.
  2. They have large sets of libraries that the new programmer can use without a lot of knowledge about what is going on under the hood.
  3. Garbage collection (a technical detail we don’t need to go into here) is managed by the language so the new programmer can concentrate on learning the small concepts without the program breaking for mystifying reasons.
  4. There are very good Integrated Development Environments (IDE) for all of these options.  An IDE is a program that is used to write programs.  It has an editor, a compiler, a linker–everything need to write, debug, and run a program in an easy to use environment that usually has a hint systems (intelli-sense) for computer commands in case the programmer forgets what he should type next.
  5. There is a TON of documentation, tutorials, examples, and books on the internet and in print for all these languages.

We started in C# because it meets all the criteria above, I had good knowledge of the language, and we found what looked like a good tutorial book on C# that featured something of interest to my son.  That was a great reason to go that direction at the time.  I think if I had to do it over, I might start with Python.  There is no particular reason that Python would be better than C# or Java, but I am aware of a number of cool, hobby projects written in Python and I would like to get a little deeper knowledge of Python myself.

What book should you chose?

Programming the Raspberry Pi, Getting Started with PythonThese days, it is possible to get all the information required to program online.  I have learned languages that way (Python and R).  Nevertheless, for a sit down class with an 11 or 12 year old kid, it is nice to have a book to follow.  In addition to the book we used to get started (Beginning C# Programming),  I have been looking at a book with great reviews titled Programming the Raspberry Pi, Getting Started with Python.  The thing that is great about this book is that, if you already have a USB cable and a reasonably capable PC, you can be complete set up with an embedded computer to write robotic, internet, game, and other kinds of programming for less than $100.  Here is the blurb from Amazon for the book, a Rasberry Pi embedded computer, and the Raspberry Pi user manual:

Rasberry Pi + Manual + Python book

The reason both the books are good is that they start from ground zero, they feature good starting languages as defined above, and they have project goals that are likely to interest kids of the age of 11 or 12.  The Raspberry Pi is particularly good because it features a chunk of hardware to which the kids can hook up other stuff and/or connect to the internet.  These are just examples, but the concepts behind both these books are great.

How should I do the teaching?

This is an especially good question if you, yourself know nothing about programming.  The beauty of the above setup is that the books walk you through the set up of the computer, the download of the language and IDE, etc.  They give button push by button push instructions.  If you do not know anything about programming, this will teach you.  As for your kid, it has been my experience that at 11 or 12, kids generally love to do stuff one-on-one with their parents, even if they sometimes do not admit it.  The one-on-one approach is the right way to go.  Here were my rules for a structured program like this:

  • Go by the book.  You might think you have a better idea.  You might ACTUALLY have a better idea, but if you stick to the book you will be assured you and your kid have all the materials to go on to the next chapter.
  • Sit down with your kid for 20-30 minutes per day, at least four days per week.  Be present with him the whole time, but quit after the alloted time so you want to come back for more.
  • Let him do ALL the reading.  Have him read every word, aloud.  Talk about it when you or he don’t get it.  Look up explanations on the Internet when needed.
  • Sit on your hands.  Let your kid hold the book and turn the pages.  Let you kid plug in the computer. Let your kid download and install the programs and software.  Let your kid do ALL the typing.

That is all I have.  I wish I would have done it that way.

How to teach computer programming to kids (Part 8) CSC 116 Introduction to Computing – Java at NCSU

Day 614 of 1000

This is the eight in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

Kelly and Christian both took the “Programming 101” class at North Carolina State University this semester for science majors.  We all agreed that it was badly done.  Part of the problem was with the disparity in knowledge of the students coming into the class, but a lot of it had to do with the structure and operating rules of the class.  This seems to be a typical problem for many, if not most, introductory college programming classes.  Here is the course description:

CSC 116 Introduction to Computing – Java UNITS: 3 – Offered in Fall Spring Summer
Corequisite: (E115 or PAMS 100) and (MA 121 or MA 131 or MA 141)
An introductory course in computing in Java. Emphasis on algorithm development and problem solving. Careful and methodical development of Java applications and applets from specifications; documentation and style; appropriate use of control structures; classes and methods; data types and data abstraction; object-oriented programming and design; graphical user interface design.

First, let’s talk about the disparity of knowledge of the kids entering the class.  Kelly and Christian are a classic example.  Kelly, as is described in a previous post in this series, had virtually no programming experience before she took the class.  The University required her to take a one-hour course on how to log into a University computer and use a Linux environment, how to make a PowerPoint presentation, and a bunch of politically correct goofiness.  In other words, she started the Java class with zero programming knowledge.  Christian, on the other hand, already had more knowledge about programming in C/C++, C#, Python and PHP than would be taught in the course.  So, while Christian was bored out of his gourd, Kelly struggled to learn about data types, loops, if-else statements, classes and objects, and all the rudimentary building blocks needed to program.

Meanwhile, the operating rules of the class prevented her from getting help from her brother, Google, me, or anyone who had deep knowledge of these programming topics other than the course instructor and the less than capable TA’s for the class.  Whose bonehead idea was it to make those operating rules?  I get that the student who takes the class needs to understand the material on their own and it is important to do their own work, but it is ridiculous to forbid the use of tools and resources that will allow the student to learn the material more thoroughly.  I am sure many students ignored these rules, but Kelly worked mightly to do the class according to the operating rules.  Those rules were a great hinderance to the learning process for Kelly.  For Christian, it did not matter, he already knew everything.

There has to be a way to do some kind of triage before assigning kids to a class like this.  There has to be a better way of teach the beginning programmers.  I will talk about what we would do to prepare our kids for these classes if we had to do it over, but I do not know what to do about the college classes themselves.  I am not sure what to do about the college level introductory courses themselves.  What I do know is that I have hired lots of programmers during my career and I rarely, if ever, hire programmers that have Computer Science degrees.  Partly that is because of the type of programming we do in my field (robotics and machine vision), because it seems like the CS majors are best suited for database, gui, and internet programming.  Partly, it is because I have seen too much of the kind of nonsense like the course desribed here that goes for college level programming instruction.

How to teach computer programming to kids (Part 7) Statistical programming in R and SAS

Day 613 of 1000

This is the seventh in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

A Beginner's Guide to RKelly did not start learning to program until she was already in college.  The very first pass at this was when our friend Troy helped her in his work at the Biological and Agricultural Engineering laboratory at North Carolina State University.  We got her a book on R programming.  She spent about three weeks to work her way through four or five chapters of the book before she spent about three weeks in the lab with Troy.  I did not sit with Kelly at all during that process and even though she learned a lot, she felt pretty badly that she contributed so little.  That was my first clue that I had failed terribly by not teaching Kelly to program.

Nevertheless, there was a lot of programming good that came out of Kelly’s six or so weeks in the R Language.  Kelly is a Senior in Statistics at NCSU, so it was a very good thing that R was her first programming language.  Most programmers start with variables that hold a single piece of data and build bigger structures to hold sets of data.  Statistical languages start with whole data sets that allow the programmer to calculate measures of the data set and present the data in user friendly formats.  There is a big difference in paradigms between statistical programming and the more traditional language like C/C++/C#, Java, and Python.

This semester Kelly took her first two programming classes:  SAS (statistical) programming and Java.  The difference between her preparedness for the two classes was stark.  She was way out in front of everyone in her statistical programming class because she had learned to think of programming in terms of how to manipulate entire data sets where looping is often internal.  In Java, not only did she have to learn how to think of data points rather than data sets, she also needed to create loops to work through all the points in the sets.  Her meager six weeks of R experience paid huge dividends in her statistics class and she excelled there.  It was a different story with the Java class.

Kelly struggled and needed to spend many more hours during the first part of semester just to stay even in Java.  By the middle of the semester, she had everything under control, but she did not start “getting” the material until the last few weeks of the semester.  She kept her grade up until that light went on with memorization and hard work.  It was frustrating to her and so unnecessary.  If we would have done the same thing for Java as we had done for R by giving her some training before she got to the class, her experience would have been completely different.  She gets the material now, but there could have been a good deal more joy and a deeper understanding of Java had I given her even a minimal amount of training–six weeks would have done it.

How to teach computer programming to kids (Part 6) C++, Python, and browsing the web with a dumb phone

Day 612 of 1000

This is the sixth in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

C++ Primer PlusPart four of this series describes how Christian studied C# during the first half of the homeschool year when he was 11. Part five describes several computer software projects he performed during the second half of that same year.  At that point, he had gotten to know quite a lot about the build process (compiling and linking).  He could do some procedural programming in C# with a fairly top level understanding of object oriented programming.  He could program pretty well in PHP and use Drupal to build a good website.  He had modified a pretty sophisticated C program to run on a new platform.

All that he accomplished was great, but he had such a strong interest in the topic, it was pretty shameful I had let him do virtually all of this on his own with almost no tutoring from me.  So the next year, when he was 12, I decided I would help him learn C++ so that he could learn more about pointers and garbage collection as well as get a deeper understanding of object oriented programming.  We did something similar with C++ as what we did with C#.  Christian began to work his way through the book for about fifteen or twenty minutes per day.

We set up Christian’s computer with the Unbuntu Linux, the Qt libraries, and Qt Creator as an IDE.  I should him how to work in that environment and he got started.  I sat down with him more than previously, but more of my time explaining concepts and performing code reviews would have helped the process a great deal.  After two or three months, we decided he needed a project.  He decided he wanted to be able to be able to send commands from his SMS phone.  It was not a smart phone, just a phone that could make calls and send and receive SMS and MMS messages.

He created a gmail account just to pass messages between his cell phone and his Linux computer running as a server at home.  When he wanted to do something on his computer from his phone, he would send an SMS message to the gmail account.  The Linux computer continually looked for message on the gmail account.  When it received a message, it interpreted it, ran the command on the Linux computer and sent the message back to the phone via SMS message.  He got his program up and running fairly well about half way through the school year.  About then, he was getting a little bored because he had finished this project and moved further up the curve with respect to object oriented programming and the lower level aspects of C++ programming.  He was not great at it, but was no longer a beginner.

I knew we needed to do something to maintain his interest because we had started to bog down.  He had the idea that he would like to figure out a way to use his SMS/MMS phone (not a smart phone) to browse the internet.  He found some Python libraries that would make this task easier, so he asked if he could switch to Python for awhile.  I thought that was a great idea.  Again, the thing that keeps him engaged is a project he really wants to make work.  Python is an object oriented language that would serve to continue solidification of his object oreinted programming skills.  At this point, for reasons mostly having to do with work and the kids other homeschool subject matter, I disengaged from my teaching efforts with respect to program.

Over the rest of the year, Christian was able to get a fairly amazing program up and running on his Linux server.  It did the following:

  • An SMS/MMS phone sends an SMS message that holds a URL for a specific web page to a specific gmail account.
  • Christian’s Python program running on a Linux server (at home) continually checks for emails arriving at the specific gmail account.
  • If an arriving message holds the URL of a web page, the following sequence is performed by the Python program:
    •  A web browser is opened to the web page specified by the URL.
    • A screenshot of the web page is captured and saved as a jpeg image.
    • Numbers for the links are added to the image.
    • The image is transmitted back to the calling phone as an MMS message.
  • When the phone receives the image of the web page back, the user can send back the number of a link on the page and the Linux program will transmit that web page back to the phone as an image.
  • If the user selects an input field by selecting its number from the web page image and adds some text after the number, the phone will enter the input text into the input field.  That is how he could enter the username and password to check his email accounts and/or enter restricted web sites.

Again, the first part of the year was a little bit tedious for Christian until he got to the point where he could do a project that interested him.  He came way up the programming curve specifically because of that.  He was not a great programmer by the end of the year, but he was pretty good for a 12 year old and had two great little programs and some cool stuff to show his friends to show for it.

How to teach computer programming to kids (Part 5) Projects in C, GaugeCam, and PHP

Day 608 of 1000

This is the fifth in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

Sandisk C200 MP3 Audio PlayerChristian only spent half the school year at age 11 learning to program C#.  We really only got him going on it as an afterthought because he was interested.  After he had established a foundation, he got a little bored, I think because he did not have a specific project in mind to practice his skill.  The reason he asked to switch from C# programming to was that we got him a little MP3 audio player.  When he gets a new “toy” like that, he really likes to investigate its capabilities.  He found that it was possible to convert many MP3 players from just audio playback devices into little, general use computers that could run games, videos, and other programs.

The conversion is made by replacing the firmware provided by the hardware vendor to perform audio playback with an open source program called Rockbox.  Rockbox is written in C and Assembly language.  The problem Christian wanted to solve was to make the fonts look better for Rockbox on the Sandisk C200, the one we bought him for his birthday.  To do that Christian did the following:

  • Downloaded the source code
  • Learned how to build and install the code with the gcc compiler
  • Found some anti-aliasing font code to improve the appearance of the fonts
  • Modified the code to run on the Sandisk C200

This new pass through the whole configure-make-install process was much less automated that with the Linux environment.  It moved him up the curve a little bit further and got him his first experience at modifying someone elses C/C++ code to work on a new platform.  The problem was that he finished that in just a couple of months and wanted to move on to a new project.  That is when he decided he needed to know how to build a professional quality website.

Rather than start with something already packaged like WordPress, Christian decided he would use one of the professional quality open source, content management frameworks and build a site from scratch.  After eliminating the idea of using WordPress, he decided on Drupal, so he had to learn PHP.  PHP is a scripting langauge that looks (speaking very roughly here) like HTML with embedded C functions.  It also requires a working knowledge of the MySQL database program.  He spent several months learning how to use the tools, then built himself a site.

In addition to learning how to program a website, he also learned how to work on the aesthetics of his site. I am notoriously bad at making this blog look good.  Christian browbeat me into adjusting the site’s appearance this very weekend.  He still thinks I did a pretty bad job, but he that it is better than it was before.  Part of that is due to the help he gave me on such things as using complementary colors and using the Color Scheme Designer website for help in their selection.

During this whole time, Christian volunteered his time at the GaugeCam project under Dr. Francois Birgand in the Biological and Agricultural Engineering Department at North Carolina State University.  While most of the GaugeCam spent their time gathering data, performing research, testing equipment, etc,, Christian was tasked with building a server to run the website, capture and process results, host a blog, and generally act as the systems administrator on the project for a couple of years.  We gave him an old computer on which he installed a LAMP stack, the operating system and programs to run the server.

The take-away from all this is that Christian stayed engaged in computing with the help of a variety of projects that had specific goals the he wanted to finish and make work.  He learned a lot along the way, a little at a time as it was required for his projects.  The gift of interesting projects with specific goals is one we believe is essential in the effort to learn how to program.  He had one additional project that fits into this category, but that is sufficiently interesting that it requires a post of its own.  Christian figured out how to browse the web on his “dumb” cell phone.  That will be the subject of the next post in this series.

How to teach computer programming to kids (Part 4) C#

Day 605 of 1000

This is the fourth in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

Beginning C# Game ProgrammingAt the beginning of the school year, just before Christian turned 11, we decided it might be a good thing for Christian to learn a object-oriented, non-garbage collected language with a lot of libraries and support.  The three obvious choices were Python, C#, and Java.  If I had to do it again, I probably would hanve started Christian with Python or Java, but I was doing some work in C# on Windows for my job at the time and was playing with Mono (a cross-platform C# implementation).

I wanted Christian to work toward the ability to program something in which he was interested so when I found Beginning C# Game Programming, it seemed a good fit.  The first few chapters explained the concepts of object oriented programming and the C# programming language.  Visual Studio Express, Microsoft’s Integrated Development Environment (IDE) for learners and hobbyists had come out not too long before this, so I spent a couple of hours on a Saturday downloading the program with Christian and showing the fundamentals of how to write, build, and run a “Hello, World!” program.

Next, as part of Christian’s daily homeschool plan, I assigned him to work on C# for fifteen minutes per day.  I wish I could say I assigned the work as part of a rigorous, well-thought plan to teach Christian to program, but the reality is that I assigned it to him because he was excited about learning to program.  I was more concerned that he focus on Literature, Writing, Math, and Science than programming.  We spent a lot more time on those core materials than his programming efforts.

The reality is that all I really did in terms of “teaching” him anything about programming (and I use the word “teaching” very loosely here), is review where he said he was in the book, quiz him a little bit about the concepts in that part of the book, look at how his program ran, and give him a few hints about coding style.  He was on his own with this.  The amazing thing is that he came away with quite a good understanding of Classes, Objects, Encapsulation, Inheritance, Polymorphism, and the concepts of Object Oriented Programming, as well as a pretty good knowledge of how to make things happen in a C# program.

Christian followed this program for about five months to get through the first four or five of chapters of the book.  The reason we stopped and moved on to something else is because Christian’s excitement diminished after about four months.  After that, we stopped programming for awhile so Christian could work on other computing projects.  It was a great exercise that was just long enough to keep a 11 year old kid interested.  Again, if I had to do it over, I would do it differently and will explain how I might have done it in one or more later posts.

How to teach computer programming to kids (Part 3) Dillo (Compiling and Linking)

Day 602 of 1000

This is the third in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

In the previous post in this series I explained how Christian got his arms around the software build process using the configure, make, make install process.  A good example of how he got pushed through this learning process occurred on a trip we took to Monterrey, Mexico to visit the kid’s Grandparents when Christian was ten.  The only computer we had to take on the trip was a Dell 1300 that did not have too much power nor too much memory.  The computer was dual-booted to both Windows and Linux.  Christian had a very lightweight browser for Linux called Dillo that did not use very many resources.  It ran in Linux, but not in Windows.  Because of the lack of resources, Christian wanted to be able to run Dillo on Windows, too.

Dillo was made to be used on Linux, so Christian started digging around and found some instructions on how to compile the program for Windows.  Here is a website that has instructions on how to do exactly that.  The problem was that, in 2005, the instructions were not so good.  The normal configure, make, make-install process did not work, so Christian had to look for resources on forums to figure out how to get Dillo to compile and link properly.  The support libraries were not quite right and there were tons of problems.  Christian spent most of the time in Mexico when he was not playing with his cousins trying to build Dillo for Windows.  The make files hold commands that perform the compiling and linking of the program.  He had to learn exactly how the compiling and linking worked to modify the make files properly.  He made some major breakthroughs and felt like he was almost there when we had to pack up and go home.

Even though he was not ultimately successful in making Dillo run, he says this set of events helped him learn more about compiling and linking than anything else he had done before or has done since.  He had to dive into the make files to change the order of the internal commands, learn the structure of folders that held support libraries, and generally just learn a lot of minutiae about the compiling and linking of a fairly large program.  The reason he could stick to it was that he had a goal that he wanted to accomplish.  I think that is a very important principle with respect to learning to program.  It is also the reason class-based learning (of programming in particular) can be very ineffective.

How to teach computer programming to kids (Part 2) Working with Linux – Compiling and Linking

Day 601 of 1000

This is the second in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

We think it was about 2005 when Christian was ten years old or so that he really took an interest in how software works on a computer.  I am not talking about how to use software on a computer.  I am talking about how it actually works.  We had an old Dell Desktop (I forget the model) with Ubuntu Linux installed on it.  All Christian wanted to do at first was install some games and some drawing and rendering programs.  The way you did that with Ubuntu is through the use of a GUI front-end program called Synaptic that managed program installation, updating, deleting, etc. using a program tool called APT (Advanced Packaging Tool).

He got pretty good at that, but the computer was so limited in its capabilities and resources he would often get stuck.  This led him to the use of Google to find answers to his questions about how to get unstuck. The problem was that he often stayed stuck because there were no good answers on the internet, even after a thorough search.  The next step, then, was to ask experts on forums like Ubuntu Fourms.  The answers often came in the form of a command line (non-GUI) process where he had to open up a console to get a command prompt so he could follow the procedures he was given.  Little by little, he got proficient at using the Linux command line to run APT and other utilities, getting help from man pages, and learning Linux’s basic directory structure.

Next, he started to run into programs that were not set up for installation via APT, so he learned how to install programs from the source code.  The way it works is that a program’s source code, usually C/C++ is downloaded from the internet.  It is set up for the computer on which it will be installed and customize for the needs of the user by running a program called configure.  Then a program called make is run to compile and link the program which creates the binaries (the actual file(s) that will run the program).  Finally, make is run again, but with the word install after it so that the program will be moved to the correct folder in the Linux file system so that the user will know where and how to start the program and the program will know the location of other files it needs to run properly.

The set of steps listed in the previous paragraph–configure, make, make install–is the normal procedure used to take programs written in C/C++ as text files, turn them into programs that will run on a computer, put the files in the correct folder on the disk drive, and assure all additional files required to run the program are in the right place.  Sometimes the names of these steps change depending on the computer, operating system, and other factors, but the process is essentially the same.  The problem is that the configure, make, make install process hides compiliation and linking from the user.  That is a good thing most of the time, but a person who wants to learn how to program needs to know how to compile and link a program, not just follow the cookbook configure, make, make install process.

Fortunately for Christian, the configure, make, make install process, for some fairly technical reasons, did not allow him to control the installation of the programs he wanted to run in the way he wanted to run them.  Specifically because of that, he started to read and learn about the compiling and linking process.  For some programs, there are heavily documented, step-by-step procedures to walk through that process.  This helped him understand how a program called a compiler takes a text file that holds a C/C++ program and converts it into a binary file and how a second program called a linker takes that binary file and links it to other program files that it needs to run properly.

It is not possible to program without knowledge about how to perform compiling and linking.  This can be hidden from the programmer in something called an Integrated Development Environment (IDE) which we will talk about later, but it is best to get started just the way Christian got started, learning the command line usage of the compiler and linker because this gives a much better understanding of the process needed to test and run a hand-written computer program.

All of the above happened under my radar.  At first he did this to get games and drawing programs running, but eventually, he just wanted to learn more about how Linux and the programming process worked.  All I really did in this process was provide a ten year old boy an old, piece of trash computer that had no programs on it that interested him.  He did the rest.  I am not sure how I would have taught this to him in a structured way, but I will take a stab at explaining how that could be done toward the end of this series of posts.

How to teach computer programming to kids (Part 1) Introduction

Day 598 of 1000

This is the first in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Next post]

We have two children.  Christian was very interested learning to program at a young age.  Kelly was not interested at all.  We systematically taught Christian how to program as part of his homeschool curriculum so that he was able to get an summer internship as a programmer by the time he was 15.  Even though he has sound programming skills, looking back, we think we could have done a better job.  Kelly, even though she was disinterested, would have benefited greatly from some computer programming instruction.   This series describes what we did well, what we did poorly, and our idea of what we would do if we had to do it over.

We started to teach Christian to program when he was about 11 years old.  He actually worked on some operating system stuff both for PC’s and his Palm Pilot before that.  Kelly did not start to learn programming until she was 18 (this year) in SAS and Java courses at college with the exception of some work with the R statistical programming language last summer.  We think we did a good job with Christian and a horrible job with Kelly even though she is turning into a pretty good programmer.  Christan is a proficient programmer in a number of languages including C#, C/C++, Python, Java, and assembly language.  He completed one fairly impressive project, a couple of medium size projects, and is currently at work on a technical assembly language program as part of an undergraduate research in Electrical Engineering.  Even though Kelly does not want to program for a living, as a statistician, she has seen she needs programming as a skill that will help her.  She is pretty unhappy that we did not at least give her some of the basics.

The following is a list of posts I plan to make.  The list will probably morph a little as I progress and grow to as long as it needs to be.

Christian at the Spring 2013 NCSU Undergraduate Research Symposium

Day 597 of 1000

Christian at the Spring 2013 NCSU Undergraduate Research SymposiumChristian dressed up today to go to the McKimmon Center at NCSU to show off a poster he made for the Spring 2013 Undergraduate Research Symposium. He made the poster for his work at NCSU’s Optical Sensing Laboratory where he is designing, building, and characterizing a Black Body Source for infrared camera and spectrophotometer calibration under the Tutelage of Dr. Michael Kudenov.  I think Christian was a little nervous when the thing got started, but he texted me that a lot of his buddies were there with him, doing the same thing.

Christian did not really have much to show because this is the first semester of a two semester project.  He is just getting started building the device and has programmed (in assembly language) some basic functionality into it.  When we get back from California at the first of June, Christian will devote about six hours per day to this project until it is complete.  He hopes to be able to present some good data and a manual that explains how to build and use the device.  The big deal about what he is doing is not so much about what it does, but what it does for less than $1000.  I am looking forward to seeing how this all turns out.

Figuring out how to program Android phones

Day 584 of 1000

Yesterday I wrote about a series I plan to write on how Christian learned to program during homeschool.  My buddy, Conrad wrote a comment about how he was interested in programming Android phones.  That very same day, another friend and I went to lunch to talk about a little Android programming project.  I have always used Eclipse to program Java in the past, but my friend pointed me to about a free, open source IDE for Java called Intellij IDEA Community.  I downloaded it, installed it, and had my first application up and running in an emulator in short order.  I will see how long it takes me to figure out how to get it running on my Samsung S III.  I think I am going to move over to that environment for awhile to see what I think.  My plan is to port BleAx to a cell phone and this might help me kill two birds with one stone.

Intellij IDEA Community edition

Computer programming for kids – a new series of posts

Day 583 of 1000

It is my daughter, Kelly’s, birthday today.  She is now a 19 year old Statistics major at North Carolina State University and is taking her first two formal programming classes, Statistical programming with SAS and Java.  She has also programmed with the R statistical programming language.  She enjoys programming a great deal, but is a little frustrated with her Java class.  Kelly is not frustrated with the material; she enjoys that.  She is frustrated because I taught a lot of programming to Christian, but virtually none to Kelly.

She said, “Dad, why did you teach Christian how to program and not me?”

I said, “Because you enjoyed other stuff like art and crafts and Christian wanted to know how to program his Palm Pilot.”

She said, “You should have taught me, too.  I need to know how to program now and I am having to learn it from scratch.”

“You really have to have something you want to do with programming or it is really boring,” I replied.

“You made us do Mavis Beacon Typing 15 minutes every day for two years and we didn’t have any real use for it until years later.  It was really boaring at the time, but got A LOT out of being able to type faster and better than everyone else.  We are really glad you made us do that.”

All this was true.  I think I failed Kelly in this.  Christian learned how to program on his own, but I bought him the learning materials, made computers available to him, and vmade a program of study that was both systematic and and integrated part of his homeschool curricula.  The reason we did all this for Christian was because he had something he wanted to accomplish. I should have thought to teach them both how to program whether they wanted to or not.  The program we put together for Chrisian has given him a huge leg up both in class and with work opportunities.  Any student who plans to get a hard (STEM) degree, would benefit from such a study program.  I am just sorry I did not do this for Kelly.

I have decided that, when I finish my current series on Why not skip high school?, I will write a series on how we taught Christian to program.  I will link to that series from this post as soon as it is started.

Revisiting comics and other web stuff

Day 568 of 1000

Betty Blonde 2010_07_14

I talked to my buddy Eric last night.  He described some very interesting ideas about the internet and blogging that has me thinking I might be able to improve my efforts.  He gave me some homework and I plan to do that, but it also got me to thinking that maybe it would be a good idea to spin back up my comic book aggregation and web publishing software (BleAx).  Kelly really would like to spin up her comic strip efforts again this summer.  She is not sure she wants to continue with Betty Blonde even though she has two years of strips under her belt.  I would like to have a side project I can do from my hotel room and this sounds like a good one.  It will take me awhile to get back in the saddle, but I think it will be a lot of fun, especially if Kelly is wanting to publish strips again.

Working on Java with Kelly

Day 513 of 1000

Both Kelly and Christian have a class in the Java programming language this semester.  Christian has done a significant amount of programming already, so for him, the class it is more of a nuisance class than anything else.  Kelly has really only programmed in the R and SAS statistical programming languages.  She has never learned a general purpose programming language like Java or C++.  Shame on me.  She struggled with her first assignment and the teacher had made some draconian admonishments about not getting any help, so she did not want me to she her what to do.  That would have been OK if the teacher would have explained the stuff in any way that makes any sense.

So, I helped her with her first assignment.  I did none of the typing, but we walked through the programming assignment step by step, then went through another in-depth explanation of exactly what went on in the program as it ran.  I LOVED it.  Kelly has a knack for programming and picks stuff up fast, so it was fun.  The other thing that is an issue is that she has to write and run the programs over an SSH link from a Linux computer.  That stinks.  It would not be so bad if we had the computer set up right, but we do not and I will not be able to help much until I return from Arizona.  Right now, the way I help her is by cutting and pasting the code snippets into a gmail chat session and talking through it over the phone.

We have a different plan going forward.  I am going to show Kelly how to do several things.

  1. Install Skype in Linux so we can share desktops and talk while Kelly is programming.
  2. Install the Oracle JDK (Java Development Kit) so Kelly can develop and run Java programs on her computer before she SSH’s in to do it on the NCSU computer.
  3. Install Eclipse so Kelly will have an IDE for Java program development.

As for myself, I installed the above stuff in Windows last night at the Prescott Valley Public Library so I could run programs as I helped Kelly.  Now, I have to think about how I am going to do the new Android GaugeCam application, in Java or C/C++.  I will probably stick with C/C++ because I will be able to reuse a bunch of libraries, but Eclipse looks like a great development environment for developing for Android.

Working with Ubuntu again

Day 417 of 1000

Christian has been stressed out about a test he took about a week ago.  He was pretty sure he was going to get a score of about 70%, but was hoping for 80%.  He messaged me today that he got a 94%.  We were both happy.  I am happy about something else.  I have spent a lot of the day loading a Linux development environment into a virtual machine on my computer.  That is part of my job!  I have to pinch myself when I think about what I am doing for a living.  It does not get much better than that.

I have been pretty down on the change to Ubuntu Unity from the normal desktop that they had previously, but after talking to my buddy, Andrew about Windows 8 and Android, I realized there is a pretty big shift in desktop architecture going on and I better get on board or I would be left behind.  Thankfully, I have a very cool project going on with Linux and the Microsoft Kinect right now, so I decided I would do the development on a Linux platform rather than Windows.  I am not all the way to loving the whole new Unity thing, but I am to the point where I can see it is really not so bad.  Give me a few more days and I might really love it.  I will keep you posted.

Christian’s undergraduate research

Day 376 of 1000

Christian asked his Electrical Engineering professor what he could do to get some undergraduate research in the EE department.  His professor told him to get in touch with the EE head of graduate programs who got the word out that there was an undergraduate math student who would like to do some research.  From there, he got two interviews, both of whom gave him an offer of work.  He would like to take both, but I doubt there will be time for that.

The latest offer would give him three hours of independent study research credit gathering data with a spectrophotometer.  It might even lead to paid work.  It is under a young professor who got his PhD from one of the top two optics school in the country.  That would be an awesome opportunity because it is real research aimed at discovery and he would be gathering primary data.  The first job was also quite good because it would give him an opportunity to hone his expand on his Python programming skills.  I am not sure that would turn into anything other than a software maintenance job, but programming experience never hurts.

License plate reading: The template to find the plate works great, but needs some refinement

Well, I got the template matching going this evening.  It works great.  It is very forgiving for size and angle as can be seen by the images below.  The thing I really need to do next is get a somewhat bigger sample taken of cars pulling up to a fixed location so I can better characterize the size of the plate in the image over a fairly large range of cars.  The image of the pickup plates were taken further away than for the car.  There was variability in both angle and size for all the plates, but the same template set was able to find them all very well.  I have a few cleanup things I need to do before I move on which include some speedup work and some precsion improvements.  I am searching in rotation right now, but not in scale.  After I see the more controlled sample set, I will know whether I need to add scale.  After that, I will move on to segmenting the individual characters.

Found plate - car image 001

Found plate - car image 002

Found plate - pickup image 001

Found plate - pickup image 002

License plate reading: Handling plate rotation

Day 335 of 1000

Today, I was able to build an “on-the-fly” template that handles ±5º of rotation.  I just have the template search complete, too, but I do not think I will get it completed before the end of the evening.  Here is a GIF animation of all the patterns for the template search described yesterday.

Rotated license plate template gif

License plate reading: Using a template to find the lettering

Now were getting to the fun part.  I am going to start trying things, one by one, to try to find the lettering on the license plate.  The first thing I want to try is template matching.  From the very limited sample set, I can see that the license plate letters can be turned into a block of white (uising previous preprocessing combined with some morphology) like this:

and like this:

My thinking is that to start with a template that looks like the white rectangle in the image below.  I generated it automatically based on the relative size of a license plate (12″x6″) and the width of a typical car (6′) and the distance I measured between the outsides of the brakelights.

I will have to rotate the template +/- five degrees and apply it multiple times to find the best match, but that will go pretty fast.  My hope is that it will give me a repeatable, robust position of the center of the license plate.  If it does, I will try to start separating the characters.  If it does not, I will try a few more tricks.

Page 5 of 6

Powered by WordPress & Theme by Anders Norén