Tag Archives: programming

Demystify Technology

Janice Jackson, CEO of Chicago Public Schools, during Recode and MSNBC’s interview with Apple CEO Tim Cook:

But, to answer your question, yes — everybody has to code in Chicago because it’s a graduation requirement. I want to be clear on that.

The goal is not to turn 380,000 students into computer scientists, but really to demystify technology, and to make sure that they understand that this is a language, and these are skills that transcend disciplines; that they can use it in math courses — they can use the logic that they learn in any course that they’re taking. It really is about bringing in the type of robust learning that we see in schools around the country to every school in Chicago.

When I first heard about it— I’m former history teacher, so I couldn’t imagine what that would look like in my classroom 15 or 20 years ago. But the teachers are really embracing it. Through the training that we’re going to offer our teachers at North Western through Apple support is just amazing. It’ll demystify coding — not only for the students, but for the adults. I know at Escuela — we were just over here chatting about how the students are teaching the teachers. I think as adults we’re coming into this and learning the importance and it’s being driven by the technology. But it’s mostly being driven by the demand from our students. They learn differently and they are asking us to catchup with the 21st century.

One of my biggest regrets is not leaning into programming in high school.

In middle-school, I found it fascinating. But, during high school, caught up somewhere between punk ethos and popularity, I opted out of taking programming courses. I always felt like I’d get my ass kicked for taking a computer programming course. However, that didn’t stop me from enrolling in the chess club and taking AP physics, calculus, and government. Such is the confusion of high school identity.

Needless to say, programming was not required. It fills me with joy to learn that it is required in Chicago. Technology is as fundamental as history, math, and writing. It goes beyond revamping home economics. Everyone should learn to code, just as everyone should learn algebra and about World War II. It doesn’t mean they’ll be forced into computer science any more than they’ll be forced to become mathematicians or historians, but they’ll be better equipped to problem solve and understand how the world around them works.

Tagged , ,

In Rainbows

After publishing ‘Building Zero Counts’, I became curious about syntax highlighting — the walls of rainbowed text you see splayed out in front of developers.

In ‘Building Zero Counts’, I used a gradient from sea foam green (#00fa92) to Zero Counts blue (#004992) to denote code. Here’s the Bitbucket Pipeline YAML example I used:

image: php:7.0.27

 - step:
 - apt-get update
 - apt-get -qq install git-ftp
 - git ftp push --user $SFTP_username --passwd $SFTP_password --verbose sftp://ftp.[host]/home/[username]/[domain]/wp-content/plugins/jetpack/modules/minileven/theme/pub/minileven
 custom: # Pipelines triggered manually
 - step:
 - apt-get update
 - apt-get -qq install git-ftp
 - git ftp init --user $SFTP_username --passwd $SFTP_password --verbose sftp://ftp.[host]/home/[username]/[domain]/wp-content/plugins/jetpack/modules/minileven/theme/pub/minileven

The color scheme and implementation is completely useless, but it’s meant to abstract how I perceive syntax highlighting. In the tech industry, it’s impossible not to see engineers, developers, and designers living in front of colorful walls of text. And for me, it’s impossible not to want to live and work in this world of rainbows. So, the way I display code on Zero Counts is a window into the beauty I see, the envy I have, and my ignorance of what is actually going on with syntax highlighting.

Poking around, I found some interesting posts about syntax highlighting and some methodologies behind color schemes and implementation. Ethan Schoonover’s Solarized is a simple color scheme that shares the same syntax highlighting between light and dark themes. It’s inspired by reading in the shade vs direct sunlight and incorporates fixed color wheel relationships:

Solarized works as a sixteen color palette for compatibility with common terminal based applications / emulators. In addition, it has been carefully designed to scale down to a variety of five color palettes (four base monotones plus one accent color) for use in design work such as web design. In every case it retains a strong personality but doesn’t overwhelm.

Meanwhile, Evan Brooks notes switching to semantic highlighting from syntax highlighting — an inverted use of highlighting, moving away from colorizing built-in keywords such as let, var, and function to coloring user-defined variables, methods, etc.:

We think syntax highlighting makes the structure of code easier to understand. But as it stands, we highlight the obvious (like the word function) and leave most of the content in black. Rather than highlighting the differences between currentIndex and the keyword function, we could highlight the difference between currentIndex and randomIndex. Here’s what that might look like:

Brooks’ method has been incorporated in a variety of text editors. Beyond that, KDevelop had actually incorporated semantic highlighting in 2009 — five years before Brooks’ post:

Understand code: The real facility that helps you understanding global code-structure is the navigation-tooltip or the code-browser. However those are not very useful to understand local algorithms. The following picture illustrates my favorite part of the semantic highlighting: Local Variable Colorization. That colorization assigns a semi-unique color to each variable in a local context. This allows much easier distinguishing those variables, largely without reading their full name at all. By freeing you of actually having to read all the variable names, this allows grokking local code relations faster, and has already helped me fixing quite a few very stupid bugs right away. 🙂
Great minds!

Syntax highlighting is a silly reason to want to learn to code, but well designed colorization and implementation certainly make it an attractive work environment. Who wouldn’t want to live in rainbows?

Tagged , , , ,