I like this recent GOTO conference talk about the role of linguistics in understanding the language of coding. It touches upon many issues I’ve noted over the years as well as newer-to-me issues in non-English programming.
All posts by William Doane
Common statistical tests are linear models (or: how to teach stats)
This post by Jonas Kristoffer Lindell presents a parsimonious view of common statistical tests which are, on their own, confusingly and inconsistently named and, taken together, a mess.
Jonas argues that there is a common theme among these tests and that it is simple. Simple to explain and simple to understand.
I highly recommend you give it a read.
President Jimmy Carter’s Message to the Universe
“This Voyager spacecraft was constructed by the United States of America. We are a community of 240 million human beings among the more than 4 billion who inhabit the planet Earth. We human beings are still divided into nation states, but these states are rapidly becoming a single global civilization.
“We cast this message into the cosmos. It is likely to survive a billion years into our future, when our civilization is profoundly altered and the surface of the Earth may be vastly changed. Of the 200 billion stars in the Milky Way galaxy, some—perhaps many—may have inhabited planets and spacefaring civilizations. If one such civilization intercepts Voyager and can understand these recorded contents, here is our message:
“This is a present from a small distant world, a token of our sounds, our science, our images, our music, our thoughts, and our feelings. We are attempting to survive our time so we may live into yours. We hope someday, having solved the problems we face, to join a community of galactic civilizations. This record represents our hope and our determination, and our good will in a vast and awesome universe.“
Jimmy Carter
President of the United States of America
Statement on the launch of NASA’s Voyager I, 1977
Sonmi 451’s Revelation
“Our lives are not our own. From womb to tomb, we are bound to others, past and present, and by each crime and every kindness, we birth our future.”
~Son Mi-451 in David Mitchell’s Cloud Atlas
Charlie is so Honest Like
In the early days of the universe, 9 or 10 years ago, I remember being impressed by this young man‘s musical and video creations.
Worlds collide and memes cross, and that’s how I recently ran across Charlie again in the context of a tomato risotto recipe on the SORTEDFood feed. Sorted.
Here, Charlie speaks to an issue that’s near to my heart and that too many people have forever gotten far too wrong: sex & consent. He speaks well and he speaks honestly. I commend you, lend an ear.
In this age of people doing awful things to one another and yet somehow justifying it to themselves, consent is fundamental. As humans, we should be able to discuss it and manifest it in meaningful ways.
If you’ve experienced non-consensual sex at any age, I hope you have or will find your way to talk about it with people you trust. RAINN—the Rape, Abuse & Incest National Network—is available, if you need assistance.
issuer: Local issue tracking, no net required
The goal of issuer is to provide a simple issue tracker, hosted on your local file system, for those users who don’t want to or are disallowed from using cloud-based code repositories.
Online code repositories often provide an issue tracker to allow developers, reviewers, and users to report bugs, submit feature requests, and so on. However, many developers either choose to work offline or work on enterprise networks where use of cloud services may be prohibited.
issuer is an Add-in for use in RStudio’s desktop IDE. It works entirely locally with no requirement for a cloud service or even a network connection.
Read more about issuer at https://github.com/WilDoane/issuer
You can install the development version of issuer from Github with:
devtools::install_github("WilDoane/issuer")
Yes, and…? Inviting People to Take the Next Step
As an educator who advises students working on theses and dissertations, there’s a standard question I ask—I refer to it as “the PhD question”: So what? It’s a shorthand to challenge students to consider the question: If everything you’ve just said is shown to be true, what will that mean for changes in our understanding of the world or how we engage with it?
I found myself using So what? again recently at ICER 2019, a community of education researchers that values openness and community building. I heard myself saying it, and I realized I didn’t like the tone of it at all. So what? is confrontational. It’s a conversation stopper, not a starter. It’s a blockade, not an invitation. Yes, I learned it from my graduate advisors way back when, and I think it’s time to put it to bed.
Continue reading Yes, and…? Inviting People to Take the Next StepClean, Consistent Column Names
I like to standardize the column names of data I’m reading into R so that I don’t have to match column names from one dataset that has an i.d.
column and another that has an id
column or maybe an ID
column. Keep it simple: lower case with a single underscore separator between words.
Here is Your Data
It’s a common situation: you want to code and debug in R *and* leverage RMarkdown for a presentation or document.
The challenge: file paths.
Executing code in the console and from within a saved RMarkdown document typically requires distinct file paths to locate data files.
Continue reading Here is Your DataMy RStudio Configuration
I help a few of dozen users install RStudio and learn R regularly. Whenever I need to install RStudio on a new machine, I have to think a bit about the configuration options I’ve tweaked. Invariably, I miss a checkbox that leaves me with slightly different RStudio behavior on each system. This post includes screenshots of my currently preferred standard RStudio configuration and custom keyboard shortcuts for RStudio 1.3, MacOS.
If you need an exact copy of your settings, consider the discussion at https://stackoverflow.com/questions/55903423/export-import-rstudio-user-preferences-global-setting-etc/55940249 (h/t: liebrr)
Continue reading My RStudio ConfigurationConverting Individual Binary Vectors to a Value Based on Column Names
When processing data downloaded from popular survey engines, it’s not uncommon for multiple choice questions to be represented as one column per possible response coded as 0/1. So, a question with just two responses might be downloaded as part of a CSV with one column for q1_1 and another for q1_2. If the responses are mutually exclusive, then (q1_1 == 0 iff q1_2 == 1) and (q1_1 == 1 iff q1_2 == 0). If the responses are part of a “choose all that apply” question, then it’s possible to have multiple 1s.
How can these individual binary indicator variables be reassembled into a single response variable?
Continue reading Converting Individual Binary Vectors to a Value Based on Column NamesBryan Cantrill on Being Great, Worthy, and Ethical—all at the same time
- Greatness and innovation come from great teams.
- Your legacy is about how good of a person you are in your various roles… child, sibling, spouse, parent, community member, colleague.
- Potential is realized through integrity.
Common Uncommon Notations that Confuse New R Coders
Here are a few of the more commonly used notations found in R code and documentation that confuse coders of any skill level who are new to R.
Continue reading Common Uncommon Notations that Confuse New R Coders
Cambridge Handbook of Computing Education Research ~ Fincher & Robins (Eds.)
An almost wholly new and updated perspective on the history and state of the art in computing education research (CEdR). I’ve been reading it on my Kindle and enjoying it tremendously.
What Every Data Scientist Should know about Education ~ Greg Wilson
To the list of books mentioned in the video, I would add:
- Ken Bain: What the Best College Teachers Do
- Alan Alda: If I Understood You, Would I Have This Look on My Face?: My Adventures in the Art and Science of Relating and Communicating
- Steven Strogatz: Calculus of Friendship
- National Academies of Sciences: How People Learn
Principles of Technology Leadership
Bryan Cantrill, a leading technologist and CTO of Joyent, outlines the vital differences between principles, values, and buzzwordy vacuousness.
Applying to Graduate School
The graduate school application process has surface similarities to applying to undergraduate programs, but behind the scenes it’s quite different.
Continue reading Applying to Graduate SchoolThe Shiny Module Design Pattern
Foremost in your mind should be the quintessential reality of R: Everything that happens in R is the result of a function call. Shiny is no exception.
To write a minimal shiny app, you create an object that describes your app’s user interface, write a function describing runtime behaviors, and pass them into a function that spins up the app you’ve described. By convention, these two objects are associated with the variable names ui and server.
library(shiny)
ui <- fluidPage()
server <- function(input, output, session) {}
This is just R code. You can type it into the Console to execute it line by line and inspect what it does.
If you’re working in RStudio, you can type it into a Source file, then press Control-Enter (Windows) or Command-Return (MacOS) to send each line to the Console for execution.
Checking the Environment—or the structure of these two objects with str()—we can see that ui is a list of three objects. If we print ui to the Console, we see only an empty HTML <div> element.
<div class="container-fluid"></div>
The object associated with server is simply a function with no body.
To execute this minimal shiny app, we pass the ui and server objects to the shinyApp() function.
shinyApp(ui, server)
The app will be spun up either in RStudio’s Viewer pane, in a Viewer window, or in your default Web browser, depending on your settings in RStudio.
Don’t be surprised: it will be just a blank window, since all that has been defined thus far is an empty <div> element. The document that opened is an HTML document with some boilerplate CSS and JavaScript. You can inspect it using your Browser’s Developer Tools.
That’s it. That’s shiny. Everything else flows from these core ideas:
- ui is a list object representing the HTML UI to be constructed.
- server is a function describing the runtime behavior of your app.
- shinyApp() takes these two objects and uses them to construct an HTML document that then gets spun up in a browser.
Writing Research Well
Newcomers to writing nonfiction research—often new PhD students—may find the research process and the formal structure of research documents daunting. Here are a few resources both on research writing and on the writing craft itself that I found useful when I was starting to hone my skill. And, yes, writing is a skill; you can improve your writing through practice.
Above all, seek out and be open to feedback. Anyone who is willing to offer honest feedback on your writing to help you improve it is valuable.
The Craft of Research by Wayne Booth, et al
A Manual for Writers of Research Papers, Theses, and Dissertations by Kate Turabian, et al
On Writing Well by William Zinsser
The Professor is In by Karen Kelsky
Avoid Strunk and White. It’s an interesting historical read, but much of the advice is either incorrect or outdated, by modern standards.
On Finding your Voice
“You find your own voice by reading the poetry of others” ~Billy Collins, poet, as cited by Alan Alda