programming a finch without being able to read (parent required)

Someone at work was asking me about robots for kids. I offered to lend him my Finch to try out. I noticed there’s an experimental language called Snap! on there now which says it can be used by ages 4-7. The idea of Snap! is that it is a simplified Scratch which is also supported. I really like that the Finch supports such a range of languages from ones like Snap! and Scratch to “full fledged” languages like Java and Python. I also like that it has a variety of sensors so you can incrementally make things harder.

Anyway, I wanted to give Snap! a try to see how easy it was too use. My was it easy. Including downloading the software, it took me less than 15 minutes to get the finch to move forward and back having a different color nose when pressing keys. (and another 15 to make sure installing Java 6 didn’t mess up anything else on my machine.)

Install (parent required)

I downloaded and installed the BrainBirdRobotServer which was clearly described on the Snap! page. Installing was the usual for Mac; just drag to the Applications folder. The only catch was that I had to re-install the long since unsupported Java 6. Not a big deal. The software even gave me the link. And it didn’t muck with my paths for anything else so Eclipse/Ant/Tomcat/Postgres etc still work normally.

Setup and initial run (parent required)

This isn’t hard, but it does require being able to read so a four year old isn’t going to be able to do it alone.

  1. Open BrainBirdRobotServer
  2. Click Open Snap! I choose local since I wasn’t planning to save my program
    finch1
  3. Plug in the Finch. (One end of the wire goes into the Finch and the other end goes into a USB drive on your computer. I put it in a USB hub
  4. Write program. It opens with a simple one that drives forward with a green nose if you press space. I adapted it to go forward with a green nose when you press the up arrow and backward with a red nose when you press the down arrow.
    finch2
  5. Press up and down and watch Finch move. That’s it.

Play

What more to say here. These basic blocks already do stuff. And then the parent can show the kid more blocks.

Making it harder

Assuming the kid can read (or you are present), the higher levels of Snap! allow writing more complicated programs. I couldn’t figure out how to change the level other than editing the URL. You can easily sense the pattern here. The only catch is that I had to load the page twice with the new level URL to see it.

  • http://snap.berkeley.edu/snapsource/snap.html#cloud:Username=birdbraintech&ProjectName=FinchLevel1
  • http://snap.berkeley.edu/snapsource/snap.html#cloud:Username=birdbraintech&ProjectName=FinchLevel2
  • http://snap.berkeley.edu/snapsource/snap.html#cloud:Username=birdbraintech&ProjectName=FinchLevel3

The higher levels allow adding timing delays and such.

Caveat

As far as I can tell, the Snap! language doesn’t allow you to use all the sensors on the Finch. But it looks like a fun way to get started. (Not true. The highest levels can at least use some of them)

OCP Book Now Available!

OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide: Exam 1Z1-809

Jeanne and I are thrilled to announce that the Kindle version of our second book, OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide: Exam 1Z0-809, is now available for purchase on Amazon! The OCP paperback edition, available for pre-order, is currently printing and will be shipping in the next month.

This book, which is nearly twice the size of our previous OCA Study Guide, is chock full of information on topics ranging from design patterns, to concurrency and NIO.2, to JDBC. Unlike many other older study guides, we have written our material centered entirely around Java 8, with an emphasis on lambda expressions and streams.

While some experienced developers can pass Oracle’s OCA exam with limited amount of studying, the same cannot be said for the OCP exam. Besides the large-scale inclusion of lambda expressions and streams, the exam covers includes much broader topics that seasoned developers may not be readily familiar with.

For example, you might have been using JDBC for years, but can you list the differences between obtaining a connection using the 3.0 and 4.0 versions of the drivers? You may have also been reading and writing files with java.io streams for years, but we bet many of you haven’t ever used the mark(), reset(), or skip() methods. It is for reasons like these that we strongly recommend you study carefully for the exam using our book or an equivalent study guide, avoiding the pitfalls (mentally and financially) of having to pay to take the exam multiple times.

Our book covers all 3 variations of the OCP exam, including a dedicated Appendix for those taking the Java 6 or earlier version of the OCP 8 upgrade exam, as it contains material not found in the other two versions of the exams.

We hope you enjoy reading this book as much as we enjoyed writing it!

cropping video fast for dummies on a mac (updated for 2015)

I don’t edit video often, which means it feels different each time I try. I last wrote about cropping on a Mac in 2012. It felt different (but easier) this time.

Downloading the file from youtube

I entered the original youtube URL into http://en.savefrom.net. Then I downloaded the mp4 file.

Opening the video in iMovie

  1. Open iMovie
  2. New Project
  3. No theme
  4. Name project
  5. Import Media > navigate to the mp4

Crop the video

  1. In the thumbnails view, select the beginning of where you wan the video to start.
  2. Drag to where you want the video to end.
  3. Adjust as needed
  4. Play the video in the preview to ensure it is right.

Export the video

  1. File
  2. Share > File
  3. Next
  4. Save to location
  5. Wait until Mac pops up message that export was successful