Wednesday, May 27, 2015

Review / JavaScript & jQuery: Interactive Front-End Web Development

Have you ever had a book that was so beautiful, it was hard to put down? Did it happen to be a programming book? Breaking out of what is normally expected of a technical volume, Jon Duckett's JavaScript & jQuery: Interactive Front-End Web Development really is that lovely.  But it's not just a pretty face—it makes a good reference, too.


This book is for anyone interested in front-end web development, whether you have programmed before or not.  The only assumption is that you have a basic knowledge of HTML and CSS.

The book begins with a gentle introduction to basic programming concepts related to JavaScript.  Being an object-oriented language used for event-driven web development, these aspects are touched on early.  I am not convinced that the early treatment of some concepts (like objects and classes) will make sense to beginning programmers, but theoretically the early sections can be revisited and the ideas will make more sense over time.

After covering the basics through branching, looping, and functions, the Document Object Model (DOM) and events are introduced.  There are lots of notes about how you probably won't end up using the specific techniques shown once you know jQuery, but that it's important to understand them as a base.  That's something I really like about this book: you get a good sense of not only what's available, but how real developers work.

The second half of the book covers jQuery, Ajax and JSON, APIs, error handling and debugging, and a few other miscellaneous useful topics.  Though this section has conceptual lessons, much of it feels more like a reference.  There are also many cross-references between pages, which ensures you remember to consider everything relevant when you come back later.

So that's the content.  What about the part about being beautiful?

Every glossy page is laid out like a mini poster.  There is always a visual demo or diagram to support the text, and the text is never in one huge block.  Each page's background is colour-coded to its purpose (for example, explanation vs example) and has a large title in the same location that makes flipping through to find what you're looking for a breeze.  Sometimes I like to sit with the book and just admire how nice each page looks.

Overall, I would recommend this book to anyone who is getting started with front-end development or finds having a physical book as reference useful.  If you already know how to program, you can skim through the first bit.  You may find a closer read useful if you haven't used JavaScript much in the past.  The rest of the book gives a great sense of how front-end works, and can be used as a handy reference when you want to accomplish something specific.  I don't think anyone would be disappointed to have this book on their self.

Tuesday, May 19, 2015

What Eighth Graders Think About Women and Computer Science

On the last day of the 2015 edition of my week-long mini-course (Computer Science and Games: Just for Girls!), I held a discussion about women in computer science.  Below is a transcription of the notes I made on the white board.  The thoughts, if not the wording, very closely represent what the girls said.

"If it is not appropriate for women, it is not appropriate." (via Wikimedia)

Why do girls avoid computer science?
  • Seems nerdy
  • Stereotypes: man's job
  • Don't want to stick out as only female
  • Impression that you must love video games
  • Accused of being interested to attract guys
  • Stereotypes of femininity
  • Females more pressured to take certain programs of study
  • Pressure from others who don't think certain skills are valuable (e.g. video game development)
  • Too many guys, "I will never fit in"
  • Girls are less confident, partly due to society's messages

Why does it matter?
  • Girls can change an idea or product without destroying or outright rejecting it
  • Girls should have the freedom to choose their career without barriers
  • We are turning girls away from their passion
  • Discrimination is always bad
  • Women should have independence, especially financially
  • We need products designed by us
  • Women can change how women are represented in games

What would make you interested in trying computer science in high school or post-secondary?
  • Stop the stereotypes!!
  • Enforce a better gender balance, or provide all-female options
  • People around us have to stop talking down about CS
  • Give us a chance to try it out! We don't know what it is otherwise!
  • More interesting application in university-level courses (like robotics)
  • More positive attitudes toward college-level options [which typically grant diplomas in Canada, as opposed to universities, which grant degrees]
  • Avoid giving the impression that it's impossibly complicated.
  • More one-on-one time (and other better teaching strategies) to make sure we get a good base in math.

Tuesday, May 12, 2015

Mini-Course 2015: Survey Results

Another May, another "Computer Science and Games: Just for Girls!" mini-course on the books.  I'm very pleased with how this year went. The course material and games made by the girls are all online, and below I share the results of my usual pre- and post-surveys.


Pre-Course Survey Results

I have the girls fill these in the very first day before we start into any course material.  Some of them did see the code.org video I showed during orientation, which might affect their answers. 18 students filled in the pre-course surveys.  Here are some of the results.

"What made you decide to take this course?"
  • I thought it might be interesting, trying something new.
  • I like video games and I wanted to find out how to make them.
  • it seemed interesting and I enjoy the idea of creating a virtual game
  • Both my parents have jobs involving computers, and I wanted a course that would be hands on.
  • I think It might have been the words "vidio games" In the title, If It was there.
  • The description looked interesting. I was just curious. I anticipated fun activities.
  • I like computers and gameing.
  • My mom chose for me.
  • My dad is a software developper, and I thought it would be interesting.
  • Because I am interested in expanding my knowledge on computer science and how games are made.
  • I wanted to try something different and this course sounded pretty interesting.
  • There was no other good one to choose & my friend chose it.
  • My parents recommended it for me as they have a friend who works with computer science stuff and he has a successful career.
  • It looked interesting and it was just for girls.
  • I decided to take this course because even though i'm not very good with technology, I was always interested in coding and computers. I like to learn new things and it could be good for a job.
  • I like playing video games with my older brother and love the idea of making my own.
  • I thought it would be fun to know a little more about the technology that we use every day.  At school and at home, we use computers a lot so I thought it would be nice to know how to use them more.
  • I'm interested in trying new things and I spend a lot of time on the computer.
"I am confident that I understand what the field of computer science is."
  • Agree: 1
  • Neutral/don't know: 12
  • Disagree: 4
  • Strongly disagree: 1
 "I would consider computer science as a good career for women in general." 
  • Strongly agree: 5
  • Agree: 10
  • Neutral/don't know: 2
  • Disagree: 1
"I would consider computer science as a good career for me."
  • Strongly agree: 1
  • Agree: 7
  • Neutral/don't know: 9
  • Disagree: 1
"I signed up for this course because I was curious about some of the computer science topics (including usability, graphics, or artificial intelligence)."
  •  Strongly agree: 7
  • Agree: 6
  • Neutral/don't know: 4
  • Disagree: 1
"I have previous experience programming."
  •  Strongly agree: 1
  • Agree: 1
  • Neutral/don't know: 3
  • Disagree: 9
  • Strongly disagree: 4


Post-Course Survey Results

Here are some of the results from the survey I gave at the end of the course.  One student injured herself the previous day, so only 17 students filled in this one.

"Would you have signed up for the course if it wasn't just for girls?"
  • Yes: 10
  • No: 7
"Are you glad the course was just for girls?"
  • Yes: 8
  • No: 2
  • I'm happy as long as I'm not the only girl: 7
"I enjoyed learning about what computer science is really all about."
  •  Strongly agree: 9
  • Agree: 8
"It was cool to see how many different areas of study can be connected to computer science."
  • Strongly agree: 4
  • Agree: 11
  • Neutral/don't know: 2
 "I would consider computer science a good career for me."
  •  Strongly agree: 5
  • Agree: 6
  • Neutral/don't know: 6
(What a great improvement over the pre-course responses!)

"I am more likely to try computer science in high school or university after taking this course, or this course has confirmed my desire to do so."
  • Strongly agree: 8
  • Agree: 6
  • Neutral/don't know: 3
(WOW!! :D)

"I liked having a variety of practising computer scientists to help out with the course."
  • Strongly agree: 8
  • Agree: 9


Summary

I'm very pleased with these results.  You can check out data from previous years (see list at the bottom of this page), but I think this year's course has had the most positive outcomes.  It could be this particular group of girls, the changes I made to the course (like being in the lab all day and cutting more lecturing), or maybe, just maybe, we are finally starting to see the attitudes of the next generation changing.  Let's hope it's the last one, because it's about time we crack this "women in CS" problem once and for all.

Thursday, April 30, 2015

Two Semesters Teaching CS2 With C++ and Java

As you may recall, I have been experimenting with a CS2 design that teaches both C++ and Java in a single semester.  I previously reported on the success of the design after teaching a section of majors and non-majors in the off-term.  This semester, we used an iteration of the design with two large sections taught by myself and another instructor.  Most students this semester took CS2 immediately after taking CS1 last semester.


The grades for my section are shown above (the other section's distribution was similar).  As you can see, students generally either "got it" or they didn't.  The average of all final exams in the two sections was about 70%, as was the average final grade (I expected worse for both measures).  No concessions were made to massage grades other than to drop marks for one of eleven assignments (dropping one tutorial mark of eleven and one quiz mark of three was always planned).

Aside from better preparing students for our second year courses, a major goal of the redesign was to ensure that students who do not master the concepts don't continue.  My hope is that the grade distribution above indicates this will happen.  Certainly my design has enabled me to assess deeper understanding of concepts that serve as a foundation to what comes next; such concepts were not prominent (or even existent) in previous designs.

Much of the course design was stable from last term, with some improvements in sequencing and in class code examples.  The topics now progress rather nicely from a low level procedural view of problem solving, all the way up to advanced object-oriented programming.  The new topic list follows.
  • Introduction
    • Introduction to problem solving
    • Introduction to C++
    • Pure puzzles
  • Solving Problems With Arrays (C++)
    • Arrays and structs  (including memory models)
    • Solving problems with arrays
  • Solving Problems With Dynamic Memory (C++)
    • Stack and heap
    • Pointers
    • Dynamic memory
  • Object-Oriented Basics
    • Introduction to objects (including memory models)
    • Introduction to Java
    • Object behaviour (constructors, methods)
    • References and linked lists in Java
    • Shallow vs deep copying in Java
  • Solving Problems With Classes (Java)
    • Goals of class use (encapsulation, information hiding, etc)
    • Complex reference structures
    • Separated presentation design
    • Abstract data types
  • Advanced Object-Oriented Programming (Java)
    • Class hierarchies and inheritance
    • Polymorphism
    • Abstract classes and interfaces
  • Event-Driven Programming (Java)
    • Introduction to Processing
    • Model-view-controller
    • Polymorphism you can see
  • Solving Problems With Recursion (Java)
My slides and code examples (other than code directly from our textbook, Think Like a Programmer) can be found on GitHub.

This summer, the course will be taught according to the current design, and so far it seems the plan is to continue with it next year to give time to evaluate how well students were prepared for second year.  It will be interesting to see whether it will be used long term, and if so, how it will evolve.

Tuesday, April 7, 2015

Spring Research Update

It's been a while since I last did a research update. With spring (sort of) arriving, there's no better time to reflect on a winter's worth of hard work.

First
First / Dean Gugler 

Coherent Emergent Stories

Most of my effort in the last 8 months has been dedicated to teaching, but despite this, I managed to make progress on my PhD and thesis project.  In the fall, I spent time putting together my thesis proposal, trying to make the content as close to final-thesis quality as I could.  Then I proposed in December.

Since then, I have been dabbling with a next-iteration prototype to test my story ideas.  Instead of trying to craft an entire game, I am focusing on what I call a "story explorer."  I am designing the prototype to be as data-driven as possible so I can quickly and easily test many different stories and approaches to arranging those stories with my story engine.

Gram's House

The Gram's House project is a labour of love, and I am so excited to see how far it has come since I came up with the idea years ago.

Lately we've been hard at work on the NSF AISL Pathways grant we were awarded to study the effect of story on teaching computer science concepts with games to middle school girls.  We have been working on prototypes for three analog games to be used in informal settings.  The game cover the concepts of data representation (specifically images), data organization (searching and sorting), and algorithms (writing and reading precise instructions).

It has been a lot of fun coming up with the game designs, but also very challenging.  I really want to make sure we have something more than a lightly gamified activity.  I want the games to have inherently interesting and motivating goals that happen to require understanding of our CS concepts to achieve.  I want the games to present interesting and meaningful choices to players, and have at least some degree of replayability.  I'm not sure that our current games have all these features, and I am convinced that we can come up with even better designs.  Hopefully our resident story and game design expert Lorraine Hopping will stay patient with my constant pushing, because she has been an amazing asset to this project and has a lot more experience than I do!

Something else exciting is that two of my first year students may be joining the procedural content generation grant team at Northeastern University in Boston this summer.  I am beyond thrilled to be able to enable this kind of opportunity, and I can't wait to see what they are able to accomplish.

In addition to the summary of Gram's House on my own webpage, we have started an official project site hosted by Northeastern.  We are still working on adding content, but that should be a good place to find information about the project in the future.