Showing posts with label make. Show all posts
Showing posts with label make. Show all posts

Make an Inside Out Computer

Friday, June 3, 2016

For the end of the year my AP students are working on projects. This year I left it very open ended, use anything in the lab and just make something awesome.


They can make with code or something physical. I have students doing everything from a scratch version of Doom to building a cell phone signal amplifier.

One of my favorites at this point is this - the Inside-Out Computer. The parts are all recycled from a couple of old 486s that were donated. Once we can find a non USB mouse the plan is for them to load Linux on it.
Im pretty excited about having this in the lab next year when we need to teach hardware. 

I am particularly excited about this for next year when we go over computer hardware. Having a running computer while you point out all the various parts and pieces seems like it will be very helpful.

Basically theyre attached all the parts to an old plastic crate using zip ties. The have booted it up several times and it works perfectly, except for the no mouse thing.

We have five weeks from the AP exam until the end of the school year, which is a lot of time to fill. In order to get grades on the books I give them a daily Ted Talk to watch and respond to on a discussion board. More on that later.

Update: Another student turned in their final project today. It is a bike with a chainsaw motor added to make a moped. Did all the welding themselves. I was kind of expecting a poster, then they rolled this in:


Amazing!



Read More..

To Make a Program you Have to Break Some Eggs

Tuesday, April 26, 2016


One of my favorite toys in computer science are plastic eggs. Cheap and they can be used to teach so many things. We are working on searches and sorts in the APCS class right now. They also work well when doing algorithms in the CS Principles class.

To start with searches and sorts I use plastic eggs filled with fish tank gravel. Email your faculty and parents - I guarantee you can get these for free. Fill the eggs with varying amount of gravel and tape them shut. Better yet have a kid do this. You are busy.




I let the kids pick a partner and each pair gets 6 or 7 eggs. Please do not forget to explain that the eggs do not have candy in them. I didnt do that the first time we did this and it made for a very disappointing mess.

Have them put the eggs in a row then "search" for the heaviest egg. Write out the steps you followed.

On the board I then do:

int eggs[] = new int[6];

This is in the APCS class, in CS Principles I make this less formal since they will be doing this in Scratch.

I have the kids come to the board and write out their algorithm, in Java in the APCS, pseudocode in CS Pricniples, using this array. Bam! They just all created a Linear Search.

So, why eggs?

I used to do this writing numbers on the board. They watched and I did. It is always better when THEY do. They are going to remember the Linear Search much better if it was their idea in the first place. 

Also, when you do numbers the amazing processor that is the human brain can just scan the list and pick the biggest. No problem. 

But a computer cannot do that - it cannot just look at a data set in aggregate and pick one. It must "touch" every piece of data in the set and make a comparison. Which is exactly what the kids do with the eggs. Point that out, they should know that.

This is also a good time to go over swapping. They get so confused on this.

How many times have you had them try to swap two numbers and they do:

a = b;
b = a;

Here is the fix: Hand each group some cups - make it look like you are giving them an arbitrary number, but make sure they all get at least 3.

Rule - you can only have an egg in a cup. NEVER can you have two eggs in a  cup. Now swap two eggs.

Again, once they get the point of using a third cup, you have them write out the algorithm in the language of your choice.
Read More..

What it Takes to Make a Computer Science Teacher

Tuesday, April 12, 2016


Ive had this conversation 5 or 6 times over the last few months. Always with teachers, always centered around respect.

And mostly about computer science education.

So Im going to go ahead and put this in writing. A good teacher can teach computer science. Not every computer scientist can teach.

Im not just pulling this from thin air. For the last 5 years Ive been deeply embedded in the process of training new computer science teachers. I ran a program of 30 new AP Computer Science programs across Virginia. Some teachers had programmed, some had not.

I also have a decade of experience running extracurricular programs in computer science. Weve had some wonderful and knowledgeable volunteers.

I trained math and history teachers, business teachers, turfgrass teachers. And yes, turfgrasses a real subject.

So what does it take to make a good computer science teacher?

First and foremost is command of the classroom. Someone who can get kids engaged in great learning activities. Teaching is an art, one that has to be developed just like any other skill set.

But we cant stop there. Too many teachers have been thrown into computer science class rooms without the base knowledge they need in order to teach the subject.

This sets the teacher and students up for frustration and ultimately, failure. Its not that experienced teacher cant do computer science, its that they dont know computer science.

Computer science is the only high school subject I know of where we take people who have never even taken a class in the subject and say to you gotta go teach this. Can you imagine a calculus or physics, or art teacher that had never taken the subject at college?

And in an era where are professional evaluations are very closely tied to student test scores, its a wonder anybody would take that risk.

So what does it take to be a good computer science teacher?

The bottom line is content. With a good classroom teacher and solid curriculum you create a situation where a teacher can succeed, which is the base of all student success.
Read More..

Random Numbers make Big Hair

Saturday, February 6, 2016



Random numbers are one of those core topics in teaching computer science. We experience them all the time, but most folks really dont know anything about how they happen or what they are used for.

Often games are the most obvious way of teaching about random numbers. It is a quick and easy way to introduce the topic. However there is a downside in relying too much on games. Not all students, especially females, are naturally interested in gaming. Traditionally it is perceived to be a very male centered activity and  only using gaming to teach runs the risk of turning off a large chunk of our students.

This months Wired Magazine had a quick article on how the animators at Pixar created the hair in Brave. It gives and interesting discussion of how geometry and computer science come together in animation. The article is nice and short and would make a good discussion board prompt on random numbers.

I do use games throughout my courses, but I try to balance them with other types of programs. We use a lot of media computation based problems also, and when I do games I try to wither offer a social component or an alternative assignment.

A side note - overall this was one of the better issues for high school kids. Pretty readable overall, and less questionable content than some.


Read More..

Make up day! Everything due by the end of the day today!

Sunday, January 31, 2016

If you have anything missing it will need to be turned in today by the end of the day.  My suggestion is to double check all of your quiz grades and make sure you arent missing any of those; I would also suggest looking to see if you are missing the Thanksgiving blog post (if this is missing send me an email with a link to your blog).  Lastly, the crossword puzzles are probably the next easiest to complete.  I mention those because they are easy to complete and should give you some quick points.

Beyond those two assignments if you have missing formatting activities that are partially completed you could take time today to get more of it done and then hand it in at the end of the hour.  Remember...some points is better than no points!

Tomorrow and Friday we will finish our bracket challenge!  If you are in first, second, or third hours I will not be here and the sub will be guiding you through the bracket competition.
Read More..

Fedora 14 How to make Samsung Fn Brightness buttons work

Sunday, February 23, 2014

If you own a Samsung R510 the most important feature that does not work in Fedora 14 are the brightness buttons. Ubuntu users are fortunate to have a repository that enables Fn functionality, please see https://launchpad.net/~voria/+archive/ppa

I will be using files provided by this repository to enable brightness control in Fedora 14 on my Samsung R510.

Please make sure your Fedora system is fully up to date before proceeding. If you are not sure open a terminal and run the following command,

su -c yum -y update

If advised to reboot, please do.

Are you ready?

Open a terminal and type the following,

su -c yum install kernel-devel gcc

This will download some required tools. Next, edit the 95-keyboard-force-release.rules file.

su -c nano /lib/udev/rules.d/95-keyboard-force-release.rules

Look for the following line

ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*E252*|*N120*|*N128*|*N130*|*N140*|*N148/N208*|*N150*|*N150/N210/N220*|*N220*|*N308*|*N310*|*N510*|*NB30*|*NC10/N110*|*ND10*|*Q210/P210*|*R410P*|*R425/R525*|*R428/P428*|*R460*|*R463*|*R468/R418*|*R480/R431/R481*|*R509*|*R518*|*R519/R719*|*R520/R522/R620*|*R528/R728*|*R530/R730*|*R530/R730/P590*|*R560*|*R580*|*R580/R590*|*R59/R60/R61*|*R59P/R60P/R61P*|*R710*|*R720*|*R780/R778*|*SR58P*|*SR700*|*SR70S/SR71S*|*SX22S*|*X118*|*X120*|*X460*", RUN+="keyboard-force-release.sh $devpath samsung-other"

Add R510/P510 as highlighted

ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*R510/P510*|*E252*|*N120*|*N128*|*N130*|*N140*|*N148/N208*|*N150*|*N150/N210/N220*|*N220*|*N308*|*N310*|*N510*|*NB30*|*NC10/N110*|*ND10*|*Q210/P210*|*R410P*|*R425/R525*|*R428/P428*|*R460*|*R463*|*R468/R418*|*R480/R431/R481*|*R509*|*R518*|*R519/R719*|*R520/R522/R620*|*R528/R728*|*R530/R730*|*R530/R730/P590*|*R560*|*R580*|*R580/R590*|*R59/R60/R61*|*R59P/R60P/R61P*|*R710*|*R720*|*R780/R778*|*SR58P*|*SR700*|*SR70S/SR71S*|*SX22S*|*X118*|*X120*|*X460*", RUN+="keyboard-force-release.sh $devpath samsung-other"

Press Ctrl-X to exit nano, followed by Y to save the file.

Edit your kernel grub entry,

su -c nano /boot/grub/grub.conf

and add the following, acpi_backlight=vendor as illustrated below.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda1
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.35.10-74.fc14.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.35.10-74.fc14.x86_64 acpi_backlight=vendor ro root=UUID=........... rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk rhgb quiet
initrd /boot/initramfs-2.6.35.10-74.fc14.x86_64.img
title Fedora (2.6.35.6-45.fc14.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.35.6-45.fc14.x86_64 ro root=UUID=............ rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk rhgb quiet
initrd /boot/initramfs-2.6.35.6-45.fc14.x86_64.img
title Other
rootnoverify (hd1,0)
chainloader +1

Press Ctrl-X to exit nano, followed by Y to save the file.

Now we are going to download and compile the kernel module responsible for making the brightness buttons work.

mkdir samsung

cd samsung

wget http://dl.dropbox.com/u/16953763/samsung-backlight.c

wget http://dl.dropbox.com/u/16953763/Makefile

make

This will compile the samsung-backlight kernel module. The next step is to copy the module to your kernel.

su -c cp samsung-backlight.ko /lib/modules/$(uname -r)/kernel/

su -c depmod -a

su -c modprobe samsung-backlight

Reboot your laptop and try out the FN brightness buttons.

Note:  You will have to rebuild / insert the samsung-backlight kernel module every time your kernel is updated.
Read More..