# FizzBuzz in R

Functions are first class objects in R. Functions establish closures also known in R as environments. So, you can use functions to create other functions in creative ways.

Here, I’ve written a function called `divisor` that returns a function that checks whether a given input, `d`, is evenly divisible by `number` and if so, returns `string`. Then I use `divisor` to create a test for divisibility by 3 and another for divisibility by 5.

Problem: Given a range of positive, non-zero integers, output “Fizz” if the number is evenly divisible by 3, output “Buzz” if the number is evenly divisible by 5, and output “FizzBuzz” if the number is evenly divisible by both 3 and 5; otherwise, output the number.

Solution:

```divisor <-
function(number, string) {
function(d) {
if (d %% number == 0) string else ""
}
}

mod3er <- divisor(3, "Fizz")
mod5er <- divisor(5, "Buzz")

fizzbuzz <-
function(i) {
res <- paste0(mod3er(i), mod5er(i))
ifelse(res == "", i, res)
}

sapply(1:100, fizzbuzz)
```

# What Students Say

A note to myself

I believe that I can be a better educator through reflection and active engagement. I believe that I can better serve my students and colleagues by being honest with them. I believe that reflection, engagement, and honesty can help other educators improve their praxis, should they feel so inclined.

It has always been about the students

A note to students

# Mike Monteiro @ WebStock ’13: How Designers Destroyed the World

Mike offers some blunt and intense advice about maintaining absolute integrity in one’s work. While he’s addressing his concerns to designers, I take his advice to apply equally well to computer programmers, UX, UI, teachers… any profession where you’re creating… and really, shouldn’t that be all professions?

# Visons of Science

I’m supporting a friend with a great idea that’s a little less than 12 hours old….

My friend and fellow computer science education researcher, Brian Danielak, has worked hard today to create what we hope will be the first of many video podcasts to promote high quality visualizations in science.

He and his team would like feedback ASAP on their initial effort.

If you have ~25 minutes tonight (or as soon as you can) watch his ‘cast and provide feedback via the form underneath the video…

http://briandk.com/2013/07/visions-of-science/

# Why are Teachers Leaving Teaching?

The Washington Post– and many other outlets– recently reported on the resignation letter of Gerald J. Conti, a social studies teacher at Westhill High School, Syracuse, New York. Mr. Conti has 40 years of teaching experience, but feels that teaching has been marginalized in the increasingly aggressive drive for standardization of curricula, instruction, and assessment.

With regard to my profession, I have truly attempted to live John Dewey’s famous quotation (now likely cliché with me, I’ve used it so very often) that “Education is not preparation for life, education is life itself.” This type of total immersion is what I have always referred to as teaching “heavy,” working hard, spending time, researching, attending to details and never feeling satisfied that I knew enough on any topic. I now find that this approach to my profession is not only devalued, but denigrated and perhaps, in some quarters despised. STEM rules the day and “data driven” education seeks only conformity, standardization, testing and a zombie-like adherence to the shallow and generic Common Core, along with a lockstep of oversimplified so-called Essential Learnings.
Gerald J. Conti

# Making Space for Others

Whatever your personal level of achievement, it’s vital that you remember to make space for others to stand up and stand out. Here are three examples of celebrities rising to that challenge.

Michael Bublè and Sam Hollyman in 2010

Billy Joel and Michael Pollack– a Vanderbilt University student in 2013

Bono of U2 and Adam Bevell– a self-taught, blind guitarist– in 2011

Thank you to Christie Veitch and Brian Danielak for reminding me.

# Silhouette Man Wonders WTF is Wrong with Americans

Infographics have a way of bringing issues into focus (… thus “INFOgraphics”, I suppose!). American education reform seems to be stuck in a pattern of finding fault, then believing that more of the same policies that created the faults are the solution.

# Oppa Adjunct Style: How Schools are Cheating Teachers and Students

“Adjuncts are not regular members of the faculty; we are paid an hourly rate for time spent in the classroom. We are not paid to advise students, grade papers, or prepare materials or lectures for class. . . . To ensure that we remain conscious of the adjunctification of CUNY, we ask that you do not call us ‘Professor.'”

To learn more about the source and context, be sure to read The Village Voice’s article on the outsourcing of education.

# Lawrence Lessig: We the People, and the Republic we must reclaim

My sense is that we all often throw up our hands and imagine that there’s nothing we can do, whether it be about our country or our organizations or ourselves.

We should fear failure: the failure to try and the failure to behave in a moral, principled way; everything else is ego.

http://www.ted.com/talks/lawrence_lessig_we_the_people_and_the_republic_we_must_reclaim.html

# Apple’s Doing The Two-Step

I wanted to let you know about Apple’s new two-step verification process and give you my recommendation regarding it.

Recommendation: Activate it.

Two-step verification is a security method that has become popular over the past few years as passwords, pass phrases, and security questions have become increasingly less secure.

# Logan LaPlante at TEDxUniversityofNevada

Logan’s thoughtful, well-presented talk at a recent TEDx conference reminds me just how much massified education is failing our youth.

Learners need agency over their learning experiences.

# CSC 111 Introduction to Computer Science

Location: College of Saint Rose
Term(s): Fall 2012, Spring 2013
Class size: ~20

In this course, students develop their computational thinking skills through guided inquiry discussions. Topics such as the nature of computation, binary, boolean logic, computer architecture, networking, and programming are introduced. Students are challenged to reverse engineer programming solutions in order to explore functional decomposition and other computational concepts.

 Prerequisite: None Credits: 3

# EPSY 687 Assessment and Evaluation for STEM educators

Location: University at Albany, School of Education, Department of Educational & Counseling Psychology
Term(s): Spring 2013
Class size: TBD
Co-taught with Paul Zachos

Backward design, formative assessment and action research will be applied to practical problems chosen by participants to develop critical assessment and evaluation concepts and skills for STEM-related education. The course will support participants in creating innovative lessons or productively addressing classroom, school, and state challenges such as high-stakes testing and professional performance reviews.

 Prerequisite: Participants must be actively teaching during the course. Participants are expected to build and refine a learning module related to their own teaching, to conduct and share the results of assessments of student learning on a monthly basis and to work in consultation with fellow participants and course instructors to produce and evaluate a completed module. This work will be in lieu of extensive readings and a formal paper. Credits: 3 Format: Online with regular synchronous chat sessions

# Bad Data Handbook: Mapping the World of Data Problems

http://shop.oreilly.com/product/0636920024422.do
By Q. Ethan McCallum
Ebook: 31.99\$ • Print: 39.99\$

Bad data is a fact of life. Coping with bad data is a valuable, learned skill. Bad Data Handbook offers insights from over 20 authors based on their years of personal experience managing ill-defined, often chaotic and incomplete data. We begin with a exploration of what is meant by *bad data* and what checks we can preform to help us understand data quality as a prerequisite to data analysis.

Kevin Fink offers suggestions on approaching data critically in order to ensure that we understand what we’re working with before we begin to try to manipulate it. Fink offers useful scripts in shell and Perl that can be used to inspect data and perform basic sanity checks. Paul Murrell tackles the problem of scraping data from sources formatted for human consumption into a format more amenable for algorithmic analysis using R. And on and on.

Each chapter addresses a critical concern in the data life-cycle: identifying, annotating, capturing, archiving, versioning, manipulating, analyzing, and deriving actionable information from imperfect or incomplete data. The advice offered is both powerful and immediately useful to data scientists and newcomers to the field alike and for me has spurred several ideas for how to approach teaching statistics.

Given the number of authors who contributed to this volume, it should come as no surprise that the tone, writing styles, and tools used vary greatly among the chapters, sometimes wandering into technical minutia, but only infrequently. The book holds together remarkably well, regardless, and was a pleasure to read.

Disclosure: I received a complimentary ebook copy of this book to review

# Simple Timeline Creation

Many of the writing projects I take on involve the creation of a timeline graphic. Such timelines can be quickly created using nothing more than a spreadsheet and some clever formatting tips.

# The Problem

Listening to Pandora tests me. Their algorithm seems to be that whenever they detect that I’m listening to a song I like, they should visually or aurally interfere, thus creating the most agitating experience possible.

This evening, before I logged in, they began playing a song I like, but a version I hadn’t heard before so, to fully appreciate the music, I paused it to grab my headphones. Of course Pandora made it impossible for me to listen to the song by modally forcing me to login (#fail). Unfortunately, their login routine isn’t sensitive to what you were listening to immediately prior to login, so they just start playing something new and different (#fail).

# Solutions

• Don’t get in the way of the user enjoying the experience.
• Suggest logging in non-modally.
• If the user is already listening to a song on Pandora, but not logged in, then immediately after login begin playing the same song.

# The Calculus of Friendship

When a close friend sent me a copy of this book, his inscription read, in part

it has always been about the students

In this short video, Dr. Steven Strogatz– a Cornell Mathematician– reminds us that the student-teacher relationship is complex, dynamic, enduring, and often unpredictable; far from the Brave New World-style cold, isolationism espoused by the so-called professionalization of education that the United States has experienced over the past 100 years.

# Bret Victor Speaking on Inventing on Principle

Bret offers some interesting insights into the importance of immediate, direct feedback while learning to program – really, while programming at all in target=”_blank”>his CUSEC talk from early 2012.

# Adding a keyboard shortcut for Save to PDF… in OSX

When I’m commenting on electronic documents, I find it useful to be able to quickly generate a PDF of the marked-up version of the document to return to authors for review. I annotate the document using track changes and adding comments (using the INSERT > COMMENT feature… not by adding text to the body of the document!!!), then

Save as PDF…

to keep a copy for myself and to email (or post to a course management system) for the author to review.

Unfortunately, OSX doesn’t have a built-in keyboard shortcut for Save to PDF…, but it’s easy to add one.

[Note: you can’t Save to PDF… from an Adobe Acrobat print dialog box… it would bruise their ego]