Computer Science: STEM’s Bastard Child

“The basic issue is that the nation is understanding rightfully the importance of STEM education, and computer science is being largely left out of the conversation,” he told me, “although if you were to look where the job demand is going to be and what drives the economy, … computer science is huge.”

I’m trying to teach Computer Science, but everywhere around me, computer science programs are being cut, teachers are being let go, and those of us still around feel like a dying breed. States are ramping up their core curriculum standards and emphasizing STEM, but they are all leaving out the “T” (for Technology).

I’m guessing part of it is because at some point, some idiot thought that giving kids access to computers was going to turn them all into computer scientists or innovators or something like that, and then they thought “there, we did our job.” 

Unfortunately, learning how to navigate to a web site, or do a google search or write a paper on a word processor does little to teach computational thinking, software engineering or information technology.

Computer Science is the underlying foundation of our economy, and yet it’s just an elective that can be placed on the chopping block when times get tough. A professor at the University of Oregon told me that Biology graduates cannot get hired if they don’t have a computer science background. What’s the point of Science and Math if you can’t figure out how to apply it or harness the essential processing power of computers to conduct the much needed analysis of huge chunks of data that is core to most, if not all, science disciplines.

Help save computer science, take computer science classes, encourage your friends and friends’ children and neighbors to take computer science courses or join robotics clubs. Tell Obama that it’s not just about funding green energy.

I have another idea, download Scratch, or Alice or Python or something and get your kids creating video games and animations. What they won’t realize is they’ll be learning fundamental computer science concepts at the same time.

Is Failure the Crazy Uncle?

Nerdgirls.com posted a great article from Katy Williams, titled, “If Necessity is the Mother of Invention, Is Failure the Crazy Uncle?”

Failure is just an intrinsic part of the innovation process…For, if you are hard at work on a problem, and are busy discovering all of the things that your work is not, you might finally stumble upon that which it is. Through your stumbling, you may come to understand the intricacy of your subject in a greater depth – or an entirely different light – that would not have been possible had the path been straight and unencumbered.

I wholeheartedly agree with the article. As Randy Pousch once said,

The person who failed often knows how to avoid future failures. The person who knows only success can be more oblivious to all the pitfalls.

and

Experience is what you get when you didn’t get what you wanted. And experience is often the most valuable thing you have to offer.

CS Unplugged in Eugene

Hello all teachers, administrators et. al. who have attended my CS Unplugged workshop in Eugene. I’m presenting a taste of CS Unplugged at the OACTE Spring Conference in Eugene, OR. I only have 1 hour and 15 minutes to attempt to cover 3 topics.

Below are the PDF versions of my presentations:

I hope I can get to the Searching Algorithms part because I have an idea for an epic human battleship contest. I spent much time preparing party hats and purchasing goodies for the winners. I might have to switch my initial order of events to make sure we can play battleship.

One Giant Step for IE: One Baby Step for the Web

It looks like I’ll be calling IE Internet Exploder for years to come. The reports are coming out, and it looks like even though IE9 supports the main HTML5 and some CSS3 technologies, they left out some of the best: like transitions (animations), border-image (it’s a lot of fun, but can be tricky at first), text shadows & gradients.  

Microsoft has opted for a conservative approach to new web technologies in IE9. While the nearly complete Firefox 4 and the recently released Chrome 10 support more of the HTML5, CSS 3 and web API stack, IE9 is a huge step forward for Microsoft. IE9 offers support for the most widely used elements of HTML5 — like the new audio, video, canvas and semantic tags. Still, Microsoft has decided to pass on many of the new APIs. Cutting edge web tools like the offline web applications API, the File API, Web Workers API and the Web Notifications API won’t work in IE9. That’s bad news for web developers, but it’s also bad news for IE users since the web shows no signs of slowing down to accommodate IE.

If you want the full list of IE9 features, go to the IE9 Guide for Developers. Designing websites for Internet Explorer (all of them, even v9), is like paying alimony: the marriage was a bad idea to begin with, and we’ll be paying for it for years to come.

A few posts ago, I defined a layout that degrades gracefully is one that works on Internet Explorer, now I classify Internet Explorer 9 as legacy software.

A comparison between Chrome9 (scored 242) and IE9 (scored 116) from Feb. of 2011 -

Here are the results of an HTML5 test comparing Chrome9 beta build and the release candidate of IE9.

Introduction to Game Design in Scratch

There are many game-design related topics—too many to cover in a post or 1-hour workshop. I will nonetheless cover a handful of core topics:

  1. Game Setup & Preparation
    • Create core variables for main object: health, score, & lives
    • Position all sprites where they need to be
    • Hide any sprites that should not be showing
  2. Display Game Name & Brief Instructions
    • Display a stage Background with Game name & Instructions on how to play
    • Note: be sure to tell the user how to start the game
  3. Start the Game
    • I recommend you broadcast to start the game (as a message to all sprites)
    • Begin the GAME LOOP
  4. The Game Loop - This is where all the action happens. For the game loop, you need to deal with the following topics:
    • Character Control for the “hero”/main object
    • Artificial Intelligence for enemy/antagonistic objects
    • Collision Detection
    • The “End Game” this is where you determine how the game ends
  5. The End Game

I could write all about this, but I think it’s better to use visuals (especially considering how Scratch is virtually all graphics). For that reason see my PowerPoints:

ScreenShots

Simple AI (Artificial Intelligence

How I script artificial intelligence (AI) for a flying "bogey"

How I script artificial intelligence (AI) for a flying "bogey"

Dealing with Navigating through Rooms

How I create multiple Rooms (apply to the stage)

How I create multiple Rooms (apply to the stage)

A Script for dealing with multiple rooms - Part one
A Script for dealing with multiple rooms – Part one
 
 

This is how I deal with moving through rooms - part 2

This is how I deal with moving through rooms – part 2

Scores and Lives

 

Why I use Scratch in my High School Computer Science Courses

“The best way to teach somebody something is to have them think they’re learning something else. – Randy Pausch

Scratch is an entirely graphics-based program that allows kids to easily manipulate graphics in order to create animations, video games, simulations, & other similar applications (whatever students may dream of).

The beauty is that while they are having fun making games and recreating scenes from their favorite movies or television shows, they are also learning computer science.

Resources

Why I Like Scratch?

  • It’s easy to use
  • You can easily edit and modify your resources: backgrounds, images, and sounds
  • You can import your own images and even animate yourself and friends
  • It’s like a puzzle where if the pieces fit, it will work
  • It covers most programming structures
    • input
    • output
    • math
    • repetition
    • conditional execution
    • assignment statement
  • Those programming structures allow students to visualize what the code looks like
  • They have an extensive online gallery that anyone can contribute to and share with others

How I Use Scratch in My Courses

This is more how I as a Computer Science teacher approach teaching with Scratch. I primarily use Scratch to introduce my programming students to program decomposition (how you break up a difficult programming challenge into smaller chunks) and game design. I have found that all I have to do is begin by showing the students the Scratch icon and encourage them to review the Getting Started with Scratch Guide. It’s sometimes only a matter of a few minutes before students are making complicated videos and games.

I also like to use Scratch for my special needs populations. Whenever I have a student on a modified diploma or one that needs additional help, I find that they can use Scratch as a resource and even as an alternative working environment for a program. So, for example, once my students begin writing programs in Python, which is all code, students with special ed needs could use Scratch to tackle the same problem.

The other way I use Scratch is in my exploratory course titled, Introduction to Digital Technologies. This course offers up a sampling of the various courses in our technology department. The goal of the course is to be a teaser for our other courses. Scratch is a quick way to get students interested in programming in a non-threatening way.

2010 Hood to Coast Relay Live Blog

On Friday and Saturday (August 27th & 28th), I’ll be running for Team Fuller in the 2010 Hood to Coast Relay. Our team will be live blogging the event, and you can catch all the wacky action live with updates and pictures. Join us in the fun.
Due to technical difficulties, we are not able to publish the live blog for now. Check back and we’ll see if we can get it up and running.

Drupal v. Joomla – Part 1: Installation

This is part of an on-going article about my Drupal v. Joomla toe to toe knock-down drag-out fight called Drupal v. Joomla.

Installation

Initial Drupal Setup

Initial Drupal Setup

 

For both Drupal and Joomla, I used CPANEL to install the CMS. Drupal was a quick installation. Once you have it installed, you can see a nice, clean layout with 4 steps to getting started. Each step is easy to understand and includes links to documentation. Joomla was a little different. 

First of all, I forgot that there was Joomla and Joomla 1.5. I installed Joomla and told it to enter test data. The initial page was inundated with data (something I did not expect). I regretted starting out with initial test data. I then saw I could have installed Joomla 1.5, so I installed that as well; however, this time, I chose not to give it test data. Guess what, there was no data or content at all. In fact, there wasn’t even a log-in or admin section, it was that sparse. There was nothing I could do but start over with test data. 

Initial Joomla 1.5 Setup (with data)

Initial Joomla 1.5 Setup (with data)

 

Joomla 1.5 installation with test data looks almost identical to Joomla 1.0; you’re presented with 3 menu boxes on the left, a list of latest news, an online poll, and a few articles from the Joomla developers, etc. The first thing I wanted to do was get logged in and start administrating (for lack of a better term) the page. 

Score 5 points to Drupal for an easy installation and 10 points for a welcoming screen

Score 5 points to Joomla for easy installation and -10 points for the no-test data install and 0 points for cluttered test data install 

Getting Started

I wanted to see how quickly I could set up a new theme, modules, and users. In Joomla it wasn’t clear where to go after logging in. I logged out and back in to see if anything changed, and I noticed there was a User Menu on the left. I clicked the first link, User Details, and checked it out. 

I got excited when I saw a back-end and front-end language, thinking it had something to do with choosing between PHP and Python or something, until I realized it was what language the documentation was written in, and the only option was UK English. I guess I’ll have to deal with colours, torches & bobbies. 

On a better note, I had the option to include a WYSIWYG editor (TinyMCE) or not. Drupal does not come with a WYSIWYG out of the box like Joomla does, but you can install a variety of WYSIWYGs if you want (I’ll try that later). 

Drupal was completely intuitive in getting to the admin panel. On the first installation, you’re welcomed with a list of steps to get started, and you get the login up front and visible. The best part is there is no other noise from random articles, etc.  

  

Drupal scores -5 points for no WYSIWYG editor out of the box and -5 points considering they are already on version 6 with no editor 

Score 10 points to Joomla for WYSIWYG editor right out of the box 

Administration Panel

Drupal had a well-organized administration panel, but there are so many options, it could overwhelm a new admin. The panel has 2 views (by task & by module), and there are 5 sections of links to administer with 4 to 12 specific links each. I’m not saying that it’s bad, but you immediately realize that you may have some work to do, especially when you see the word, “taxonomy” for the first time. Anyone starting with drupal will do themselves a service if they at least skim the various topics related to administering a site before clicking and entering. I recommend you browse the Drupal Cookbook

Once I did the initial setup of Joomla, I had to dig around to get to the administration section. It turns out that to get there, you have to click on the “Administrator” link at the bottom of the resources box. I had to log in one more time. Once I got to the administration section, I felt like I was finally getting somewhere. Finally, I was given some power. I could add an article, manage articles, manage the front page (clean it up would be the first order of business), manage sections, categories, media, the menu, the language, users, and configure the global settings. 

Drupal gets 5 points for immediately presenting the admin panel and organization.  

Joomla gets -5 points for having to dig and log in 2 separate times to get to the admin. 

Bonus Round

5 bonus points go to Joomla for the SEO Settings box at the global configuration section, especially the Search Engine Friendly URLs option. Not only that, but you can easily set up ftp settings and set up a mailer. Drupal does have a search engine friendly URL, but you could easily miss that. 

Final Score After Round 1:

Drupal: 10  

Joomla: 5 

Drupal is currently in the lead for initial set up and admin screen, but Joomla 1.5 gets kudos for their out of box wysiwyg and SEO settings.

How I Might Code a 2-Column Layout in HTML5

HTML5 has a whole host of cool new elements and attributes to be on the lookout for, but the thing that gets me most jazzed is I no longer have to create a boatload of <div> tags with id attributes. That’s because they took into account web designers and the way we code & structure layouts when redesigning HTML5. Here is how I plan to start using the new tags for layout design:

The Old School Markup

The old-school way to code a layout is to determine all “real estate” sections to your page (call them windows, panes, divisions, etc.), then create 1 <div> with a unique id attribute for each section like so:  

<div id="banner">
   <h1>Website Logo or Title Goes Here</h1>
   <h2>Tagline goes here. Note: this could be in a p tag with a tagline id attribute</h2>
</div>
<div id="navcontainer">
<ul id="navlist">
     <li><a href="index.html">home</a></li>
     <li><a href="about.html">about us</a></li>
     <li><a href="gallery.html">images</a></li>
     <li><a href="contact.html">contact us</a></li>
     <li><a href="site.html">site map</a></li>
</ul>
</div>
<div id="page">
   <div id="content">
      <h2>Content Header Goes Here</h2>
      <p>Paragraph goes here.</p>
      <!-- Continue on with more content for the "content" div -->
   </div><!-- close "content" div -->
   <div id="sidebar">
      <h2>Side Bar Div</h2>
      <p>Add side bar content here.</p>
   </div> <!-- close "sidebar" div -->
</div> <!-- close "page" div -->
</div> <!-- close "container" div -->
<div id="footer">
   <p>Designed by <a href="http://hundredvisions.com">Hundred Visions</a> &copy; 2010</p>
</div> <!-- close "footer" div -->

Note the following:  

  1. According to the W3C, it is acceptable to use the <div> tags with identifying id attributes as a way to select the specific tag with CSS to be displayed in the way we deem fit
  2. Some people surround everything with a “container” or “wrapper” <div> to allow us to center all of our content and possibly add some interesting background graphics to the body element, but I’m beginning to move away from that technique because it adds an extra meaningless <div>, and you can still apply width and centering technique to each main div (“banner”, “navcontainer”, “content”, & “footer”)
  3. Creating a “page” div that has two direct child elements: <div id=”content”> and <div id=”sidebar”> makes it much easier to display as two columns, plus, you can add a background color to the “page” that matches the “sidebar” div and make it look like the sidebar’s background color extends as far as the “content” div (provided you have no padding on the “page” and you do set the “content” background color)
    • However, the extra div is mostly meaningless, and combined with the “container”/”wrapper” div, you’re mostly just adding markup in order to make more stylistic changes

The New HTML5 Way to Do it

Note: I should give credit to A List Apart’s article, titled A Preview of HTML5 for giving me inspiration (in fact most of what I’ve come up with came from that site). The remaining ideas came from trying to “translate” my HTML from above and the W3C’s specs on section tags in HTML5. For each new tag, I added a content with a definition of that element taken straight from the W3C spec. 

<header>
 <!-- The header element represents a group of introductory or navigational aids. -->
 <h1>CSS Samples</h1>
 <h2>Different Ways to Style a Layout</h2>
</header>
<nav>
 <!-- major navigation blocks are appropriate for the nav element -->
 <ul id="navlist">
  <li><a href="index.html">home</a></li>
  <li><a href="about.html">about us</a></li>
  <li><a href="gallery.html">images</a></li>
  <li><a href="contact.html">contact us</a></li>
  <li><a href="site.html">site map</a></li>
 </ul>
</nav>
<section> <!-- a section represents a generic section of a document or application...a thematic grouping of content,
               typically with a heading. -->
  <article> <!-- an article represents a self-contained composition in a document, page, application, or site and that is,
                 in principle, independently distributable or reusable -->
     <h1>Content Header</h1>
     <p>Content content goes here.</p>  
  </article> 
  <aside> <!-- The aside element can be used for typographical effects like pull quotes or sidebars, for advertising, for groups
               of nav elements, and for other content that is considered separate from the main content of the page -->
     <h1>Here is my aside Header</h1>
     <p>Here is my paragraph of text</p>
 </aside>
</section>

<footer>
 <!-- A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like. -->
 <p>Designed by <a href="http://hundredvisions.com">Hundred Visions</a> &copy; 2010</p>
</footer>

Note: This isn’t the only way to code a page in HTML5. In my opinion, the difficulty mainly lies in the difference between the usage of a section and an article; I chose to go the route that Standardista recommended. In the case of a blog, each post should probably be its own <article>, and they could be sectioned into 2 parts (the post and the comments section) using the <section> element (for obvious reasons). 

Also Note: this post is about using HTML5 for semantically marking up a page for layouts. The elements I introduce here (header, nav, section, article, aside, & footer) have not been officially recommended by the W3C. They are currently in “last call” status, which means they are probably not going to change between now and recommendation stage.