TTM Dinners

Later tonight, at a small restaurant in Park Slope, Brooklyn, I am hosting a dinner of ten. Some are old personal friends, others are former colleagues, and a few are people I’ve recently met. All are accomplished in their respective fields. Tonight’s gathering is the fourth such dinner I’ve put together since the first in nearby Carroll Gardens last January.

The genesis of the dinner idea came from my belief that interesting things happen when you bring together a cross-section of people of different backgrounds and industries, from organizations large and small — and that being at that intersection is a great place to be. As I’ve put together the previous dinners I’ve been asked “Is there a theme?”, “Is there an industry focus?”, “Is this a dinner where investors can meet founders?” The answer to all of these questions is “no.” It’s just dinner and conversation.

Now nicknamed “TTM Dinners”, those attending tonight represent a cross-section of industry sectors including edtech, investment banking, fintech, film, consumer packaged goods, venture capital, and technology. At previous dinners, we’ve had leaders and founders from other industries such a real estate, adtech, academia, public sector, and philanthropy.

While my intent is to keep diverse the industry sectors of the attendees, the dinners have been weighted somewhat towards media, education, financial services, and the technology startup community (i.e., founders and VCs). That’s probably a reflection of both the industries in which I make a living as well as the commercial dynamics of New York City. What does concern me a bit is that the dinners have been sometimes too male, too white, too straight, too economically privileged, and perhaps too comfortable in a narrow center-left lane of political opinion. I have work to do to make the dinners authentically inclusive of different perspectives and backgrounds while also avoiding the appearance (or reality) of tokenism.

What is central to the dinners, and I think non-negotiable, is Brooklyn. I love my adopted borough of Brooklyn as much as I do my home state of Maine. Going back to my years at Deloitte and the work I led there with Silicon Valley Bank, NASDAQ, and Cooley to create the Digital Media Center, I have been excited about the idea of encouraging the business community to embrace Brooklyn as someplace where great ideas are incubated in a one-of-a-kind setting. I remember the excitement (and relief) I felt in March 2011 when I saw Deloitte colleagues, and then TMT industry leaders, Phil Asmundson and Craig Wigginton arrive to the first Deloitte event I organized in Brooklyn with Digital Dumbo. It’s incredible how the perception of Brooklyn as not just a place to do business, but also as a place where innovation happens and new companies emerge, has changed in seven years. There is perhaps no better place for a dinner like this.

Over the course of the three dinners to date a core of regulars have emerged, including the technologist and philanthropist Paul Walker, filmmaker Steve Shainberg, and media entrepreneur Gregg Schoenberg, who help me organize the dinners and, especially, curate the guest lists. Each has been incredibly helpful in providing me candid feedback and concrete ideas.

I am excited about tonight’s dinner and the amazing people with whom I’ll break bread in a few hours. The next dinner will likely be in April or May. If you’d like to join, please let me know by sending me an email at rob(at)

Thoughts for the CSforAll Summit in St. Louis

The CSForAll Consortium Summit in St. Louis starts Monday. CodeBrooklyn, co-founded by Brooklyn Borough President Eric L. Adams and myself in 2015, is a consortium member. The mission of CodeBrooklyn is to raise awareness of computer science education among Brooklyn parents and schools and in turn connect school communities, especially those that are majority students of color or Title I, with funding for CS programs. Due to various client commitments I am unable to get to St. Louis. So here’s a few questions and thoughts I have regarding the CSForAll movement in the United States, with a heavy dose of NYC in particular, going into what looks to be a tremendous coming together of incredible educators, donors, advocates, and organizations. These topics and questions are organized as follows:

Should the “CS Ed Movement” Work with the Trump (and DeVos) Administration? And Will Different Choices Divide It?

It’s evident to many who work in CS education in the U.S. that some of the leadership of the national computer science education movement has divided into two camps. This division is largely, though not entirely, based on willingness to work with the current president, his education secretary, Betsy DeVos, and the administration overall.

The first “camp” is led by, which has made the calculation that despite concerns they might have about other Trump administration policies (including and notably the “Muslim Ban”;’s founders, twins Hadi and Ali Partovi, are immigrants from Iran) there is more to be gained by moving forward and working with the current administration.

The result of this collaboration was the September 25 White House announcement of the Trump administration’s intent to “establish a goal of devoting at least $200 million per year in grant funds towards … high-quality STEM and Computer Science education”). This was followed a day later in Detroit by First Daughter and Advisor to the President Ivanka Trump’s announced commitment of $300 million in new private sector funding for computer science education by Internet Association members that have also chosen to be partners with the Trump administration on computer science education. These White House partners include Amazon, Google, Microsoft, General Motors, and (How much of both the public and private funding is actually “net new” vs. money previously pledged and/or being shifted from other important federal purposes is a separate, though crucial, question to be asked and is as of now unanswered).

The other camp is essentially the CSForAll Consortium — or, more correctly, several of its most visible and well-known leaders and supporters. Several of these people were previously members of Obama White House Office of Science and Technology that led that administration’s development of CS policy. In particular, they were behind President’s Obama’s January 2016 CSforAll proposal, the center piece of which was to be $4 billion in federal funding (Disclaimer: In December 2015 I attended one of a series of White House CS For All meetings; I was also consulted by the Hillary Clinton campaign regarding the development of her CS education platform). The position of many in this group is perhaps best represented in Reshma Saujani’s powerful op-ed in the NY Times last month about her decision that she and the organization she started, Girls Who Code, would not participate in the new Trump White House CS Education announcement.

Personally, I’ve been conflicted on the topic of working with the Trump administration, and my views have shifted in the last 11 months.

As context, I supported Hillary Clinton in the primaries and voted for her in the general election. I am a registered Democrat; for a couple years I have represented the blocks, the 64th Electoral District, around my house in Park Slope, Brooklyn on the Kings County Committee.

But I also grew up in Maine – Kennebunkport specifically. Maine is a notoriously independent state and being from Kennebunkport I couldn’t avoid meeting a Republican or two. I have a friend who worked on the transition team and now has a senior role in the Trump administration with the Department of Homeland Security.

My first inclination immediately after the election was to give the President-Elect and his team time to develop and announce their CS education policies (unlike Hillary Clinton, President Trump’s campaign did not have a CS education policy plank) – but to also retain the option to change my mind if circumstances warranted.

In November I argued for this view – “let’s give them a chance” – on a Facebook forum for those involved in the CS movement. Many argued against me, taking a position similar to Reshma’s view expressed last month in the Times. They viewed any work with the Trump administration as inherently amoral. Undaunted, I created a petition asking the incoming administration to support the CSForAll program. I shared my petition by email on December 1, 2016 to a number of the people I know who are active in the CS education movement, a number of whom will be in St. Louis.

Circumstances warranting introspection and a revisit of my view happened quicker than I had anticipated they might. The impetuous to change for me was the “Muslim Ban” weekend of January 28th. My children’s elementary school in Brooklyn is approximately 10-15% Muslim, including many whose family come from Yemen, one of the countries include in the original version of the ban. On January 30, 2017 I wrote to the same group I had on December 1, 2016 a one line email: “I renounce my email, dated 12/1/2016, in its entirety.”

Ten months later, after all that’s transpired, working with the Trump administration seems more fraught with moral hazard risk than ever. And yet organizations I respect and admire like and Microsoft have made the decision that partnering with the president, his daughter, and Secretary DeVos in order to further fund and expand computer science education is worth that risk.

My larger concern now is what this means for the CS education movement, both now and down the road. The dominant role plays in the CS education movement was already a point of contention and consternation before President Trump’s ascendency. While much of this is political inside baseball probably irrelevant and invisible to the teacher in her/his CS classroom (and, at the end of the day, that’s really all that matters), I worry that the movement further fractures based on decisions to work – or not – with Donald Trump.

“Rigor for All”: We Must Avoid Watering Down (and Creating Two Tiers of) Curriculum and Lessons, Especially Based on Socio-Economics

Last month I attended the first joint CSNYC/CSTA-NYC Meetup – the previous CSNYC Meetups have been reconstituted as the NYC chapter of CSTA. Through my employer, TTM Advisors, I’ve done work with both CSNYC and CSTA and admire both organizations. The Meetup was also a celebration of Cornell Tech’s new Roosevelt Island campus. Diane Levitt, Director of K-12 Education at Cornell Tech and Michael Preston, Executive Director of CSNYC, were co-hosts; these two people have worked tirelessly to expand computer science in New York City for many years.

While the event was good, and the company even better, I was disappointed by an exemplar video the NYC Department of Education CS4All team chose to highlight as an example of the computer science lessons both NYS/NYC taxpayers and the funders of CSNYC are paying to have developed. Mike Zamansky, one of the most esteemed computer science teachers in the city, and who until last year led the CS department at Stuyvesant, was similarly disappointed in the video and its showcased lesson.

The most celebrated attribute of the lesson featured in the video appears to be that it was “culturally responsive.” But I am not really sure just how “culturally responsive” what’s shown in that video really is. I am not really a big fan of the whole cultural appropriation critique popular now, especially on college campuses, but if I could ever sympathize with that view a bit, it’s in this video.

Throughout the world drumming has a tremendous spiritual tradition. Drumming is also an important way of communicating stories and traditions across generations. I am not sure students rote memorizing and reciting HTML does that tradition the respect it deserves. Moreover the children in the video looked, like many NYC schools(though, sadly, hardly all – more on that in a bit), pretty diverse. To which children’s culture in that video was the lesson seeking to respond? I couldn’t help wonder what the reaction might be to a video of Korean- and Chinese-American students in Flushing reciting the periodic table to Japanese Taiko drums in order to construct a “culturally responsive” chemistry class.

My larger concern is the contents of the lesson itself. Simply put, memorization and recitation of an HTML page, even if done to the beat of a drummer, is just not computer science education from what I’ve seen. Is there any proof, anywhere, that having students rote learn HTML contents of a web page has any pedagogical value?

I am guessing someone decided to take this approach because 1) they wanted to do something “culturally responsive”, 2) they wanted to introduce kinesthetic learning (not uncontroversial; sometimes connected to efforts to be “culturally responsive” which is one source of the controversy), and/or 3) drum class was the only class during which the principal could find a way to do computer science.

But in the video the drum teacher is clear in his own admission that he doesn’t understand the semantic meaning of the words (the HTML code) he’s teaching the kids to say. This is remarkably different from the traditional cultural role of drumming and chanting in the first place — the words matter tremendously, whether it’s invoking a God or transmitting a traditional story from generation to generation. The person leading and drumming would definitely know the meaning of the words and likely have a hand in their interpretation.

And is there even an opportunity for the kids to learn the semantic meaning of, for example, “a href”? We never find out. It feels like going to Latin Mass and reciting the Gospel but not having any idea what you are saying because you don’t read Latin.

Moreover this video is now online as a featured exemplar for other school communities around the city. Do we want other schools, principals, parents, teachers still getting their head around what “CS4All” even means to see this video and think “Oh, so that’s what computer science education is?” I’d argue “No.” I cringe thinking that school communities I work with in Brooklyn and around the city might see that lesson and conclude that’s what computer science education is.

Another concern I had at the Meetup was that the DOE CS4All team member made the statement that “We wanted to make sure teachers were not grading students based on their code and whether it was correct or not… based on wanting them to grade students on their process and how they got there.”

First of all, this is a terrible message to send to kids. It’s the epitome of “everyone gets a trophy”. It puts effort above results. The world is a brutal place and just doesn’t work that way.

Perhaps in the affluent, largely white, ostensibly “progressive” neighborhoods like the Upper West Side and (sadly) my own, Park Slope, many children, through the trust funds and inherited wealth of their parents, can be safely insulated from the real world of accountability, testing, and objectively right and wrong answers. But outside of these neighborhoods and a particular cohort of parents (the same general group of parents who in New York City are fond of attending public forms to clamor for integrated schools but whose own, quite different, personal choices to self-segregate their own kids contributes to making NYS and NYC home to the most segregated schools in the country; I have seen this issue first hand when I was an elected member of CEC 13 and had to vote on the contentious PS 8/307 rezoning) the rest of us study, work, and live in a world where we are measured not by effort but results. And I’m guessing that more than a few of the children in the exemplar drumming video are not the beneficiaries of the socio-economic privilege to “opt-out” of accountability, testing, or jobs with performance reviews based on objective criteria (results).

Moreover, it must be noted that correctness is a very real thing in computer science. The correctness of code is a critical concept within computer science theory. Programs can be proved correct using formal verification techniques. Code can be evaluated by things like its readability by other developers, its extensibility, and whether it makes appropriate use of abstraction.

Software can be be further evaluated on its ability to fully and wholly solve the problems it was designed to solve while additionally creating no secondary effects, including and especially negatives ones — i.e., adherence to business requirements and (successful) acceptance testing.

Code can also be evaluated – objectively – on the time complexity of its component algorithms (Big O notation).

And while it’s true that a program might be written in, say, 100 different ways, so long as the requirements are met, functions produce expected return values in unit tests, etc., the DOE team member’s assertion didn’t even reach that bare minimum. Getting the right answer apparently matters not at all.

More broadly this pedagogical approach, advocated by some in the education community – the one of process over answers; the “we just need to teach kids how to think” approach that devalues the role of objective fact in schooling, I believe has contributed to the rise of our corrosive “fakenews” political climate and portions of our citizenry seemingly challenged by the need to differentiate fact from fable.

The assertion that “We wanted to make sure teachers were not grading students based on their code and whether it was correct or not” is a perversion of the originally and legitimately valid concern about the time spent on testing and rote learning. That twisting has taken us to a new place where people stand up to assert we do not want to evaluate students work for objectively right or wrong answers. Right answers do exist in computer science and it is a misrepresentation to set the expectation with students that computer science – or the real world – is just “Free to Be You and Me“. It’s not.

Beyond the concerns I had at last month’s Meetup, I have another concern: paper based computing activities and their use in economically disadvantaged school communities.

As context, many key concepts of computer science can be taught off line – i.e., on paper. For example, the summer professional development for TEALS volunteer teachers shows how one can demonstrate algorithms like insertion sort and merge sort using student participants and pen and paper. Moreover, nearly every teacher I know has a backup plan or two for any online lesson in the event of network or laptop problems (which happens a lot).

But increasingly, especially in NYC, I’m seeing what is a “hands in the air” approach to infrastructure issues that schools may encounter with laptops and networks, and which are major obstacles to online computer science instruction. The effective message is this – if your kids’ school (and the parents at that school) are not affluent enough to buy a bunch of laptops that actually work and/or politically connected enough to lobby your city council person for “Reso A” funding to get infrastructure upgrades, these school communities are expected to get by with paper based off line lessons for computer science. This is two tier education and in conflict with “For All.”

I think it’s unfortunate that the interdependence between the success of the ten year DOE CS4All roll out in NYC and ongoing upgrades to school LANs and the DOE WAN does not formally exist, though is obvious to everyone involved nonetheless. I know the CS4All NYC DOE team – who work their butts off for our city (let me clear: my constructive criticism comes from a place of love, not disdain), has no control over the NYC DITT schedule of projects. But that doesn’t make disconnecting these work efforts within the DOE the right approach.

I know fairly well the laptop and network situation on the ground in NYC schools. Last year I contributed, through my work on Code Brooklyn, to the Technology Survey Report developed by the Brooklyn Borough Presidents Office which was released during last year’s CS Ed week. Right now, through my work with TTM Advisors, I’m doing a project for the Heckscher Foundation for Children where I’m visiting economically disadvantaged school communities (i.e., Title I) around the city, especially in the Bronx and Brooklyn, to assess the root causes of network, both LAN and WAN, poor performance.

The headline is that public schools of privilege, which are generally schools with majority white populations in Manhattan, “Brownstone Brooklyn” and pockets of Queens – the school communities that can raise a million dollar PTA fund and pull political strings as needed to get still more funding, have the best hardware and networks in the city. The rich, as is all too common in our nation, especially in areas that self identify as “liberal” and “progressive”, get richer.

So while affluent white children learn to code on shiny new laptops in Tribeca on fast Meraki networks, children of color in Brownsville are expected to get by learning computer science on paper, if they have any computer science at all. That isn’t right. The answer to crappy laptops and slow networks can’t be continue the “let them eat cake” approach of telling them to do computer science offline on paper. The answer must be to get those schools new laptops and fast, reliable networks. To be clear, I know first hand that the DIIT is working really hard to address this; New York State’s slowness in dispersing Smart Schools Bond Act money hasn’t helped matters either. But, again, effort is not the same as results and we must make sure ALL of our schools have the laptops and networks they need in order to teach computer science.

One final note on the topic of have and have not school communities: if you’re involved in the computer science movement, regardless of your role or where you live, and you’re not getting to a school that is either Title I and/or majority students of color, once a month and at least once a quarter, you risk falling of touch with the school communities that deserve the most attention and focus. These are the school communities most critical to our nation realizing the “for all” vision for computer science. It’s essential to spend time in schools, talking to students, parents, teachers, and administrators (though, if you do visit a school, please do not do as one global social media company did and spend the majority of your time at a school located in in the Howard Houses public housing in Brooklyn, and at which many students’ families have daily concerns about basic food security, talking about how great the free corporate cafeterias are in Palo Alto. If you’re that well-off, you might consider donating a couple dollars to that school so it can buy a few new computers instead of bragging about your burrito and sushi bars).

We Can’t Forget the Rural Areas of the Country

With the exception of my work from 2015 to 2016 as the founding Executive Director of TeachCS, which was national in scope, most of my work within the CS movement has been limited to New York State, New York City, and the great borough of Brooklyn. But love Brooklyn though I do, my heart will always be in my home state of Maine. And so I when I was back home in July I was happy to read an op-ed in the state’s largest paper, the Maine Sunday Telegram/Portland Press Herald, that the state legislature had passed L.D 398, an act “to enact measures designed to ensure that schools are authorized and encouraged to consider courses taken by a student in computer science as demonstrating proficiency in science or mathematics.” The centerpiece of this legislation is the establishment of a K-12 Computer Science Task Force, chaired by Jason Judd, Project Director of Project>Login at Educate Maine, and on which is also a member.

I think we all know now all to well what can happen when affluent college educated professionals in coastal cities lose site of the real economic pain being experienced in much of rural America, especially among those whose jobs in manufacturing and other heavy industries have been lost. But given the nature of the CS movement – many, though not all, of its leaders, philanthropists, donors, and organizations are based in large urban centers on the east and west coast, it can be easy to forget and neglect the needs of rural America. We can’t let that happen.

Of course, it must be noted, a relatively rural state not entirely dissimilar to Maine in size, poverty level, and economic head winds – Arkansas, is arguably the national leader in statewide computer science education programs. This is in large part due to the tremendous work of Anthony Owens, Arkansas’s State Director of Computer Science. Arkansas has shown us that rural states in the middle of the country can’t just keep up, they can and will lead.

Some will argue that the answer is online learning. Some of the TEALS program delivery to rural states is done in that just model using remote TEALS volunteers and telepresence. And while as the former CTO of Relay Graduate School of Education I have certainly seen the potential and power of flipped classrooms, hybrid models, and online learning more generally, what’s needed most, whether it’s the south side of Chicago or Aroostook County in Maine is qualified, in person teachers in all schools, urban and rural.

It’s great that the CSForAll Consortium chose St. Louis, the gateway to the west and the geographic center of the country, for its host city. A critical part of “For All” is our more rural states and territories (let’s remember Puerto Rico and USV now more than ever!) and this choice of location sends an important message about the CSForAll Consortium’s commitment to those areas. (And if you’re interested in this topic, check out Garth Flint’s blog).

Our Choices of Languages and Paradigms Need Review

Imperative and object oriented (OO) programming, and languages in these paradigms like Java and Python still make up the lion’s share of computer science curricula. What gets short changed in these choices is functional programming and that’s unfortunate for a few reasons. First, the cross walks between math and computer science are arguably their strongest and most clear in functional programming. Second, by not seeing functional programming until years into their CS education students end up so used to both imperative and/or OO that FP seems like a huge leap, and it really shouldn’t (it’s worth noting that universities like Harvard teach functional programming in the second semester of their computer science program). Third, while FP has been around a long time (Alonzo Church, who developed the Lambda Calculus on which functional programming is based, was a professor to Alan Turing) it’s now seeing a huge resurgence in interest and usage, both academically and commercially.

We also need to talk about the appropriateness of block based coding in high school.

Our mission at TeachCS was to fund, via philanthropy from Tata, Microsoft, Google, and Quotidian Ventures, professional development for teachers to be trained in one of five National Science Foundation (NSF) funded courses, three of which were aligned to the new (and so far quite successful) AP Computer Science Principles framework. A key feature of AP Computer Science Principles is that, unlike AP Computer Science A, which is based on Java, AP Computer Science Principles is language independent.

Most of these new AP Principles courses, including ones like Beauty and Joy of Computing which TeachCS supported, use block based coding for their courses (BJC uses SNAP, which is based on Scratch).

As part of the Microsoft TEALS program, I taught what was essentially a beta version of AP Principles during the 2013-2014 school year using Beauty and Joy and SNAP at Uncommon High School in Brooklyn. Though BJC is thoughtful, rigorous, well designed course, my students were relentless in asking “when are we going to learn real coding”, by which they meant text based coding. Last week, when I was visiting Brooklyn Technical High School, one of the most selective high schools in New York City, the student tour guide described, unprompted, her AP Computer Science Principles class as “not real coding” because they “just used blocks.”

Platforms like Codesters (Disclaimer: Codesters, a computer science education company, is a client of TTM Advisors LLC, my employer) attempt to bridge that gap by allowing students to develop in a block based environment and then, when they’re ready, switch over to text-based (in Codesters’ case that’s Python). I think models like that, as well as curricula that simply are text based from the get go, need to get more consideration for both middle schools and, especially high schools. We can’t be afraid of text based coding. Students are telling me at least that they think block-based programming is “for little kids” and we must take that feedback into account.

We Need to Spread the Funding Around Better and its founder, Hadi Partovi, have done a tremendous service to the CS community and this recent wave of enthusiasm for CS education nationwide. It’s signature event, the “Hour of Code” has like no campaign ever made a huge impact in areas of inclusion and participation not just in the United States, but around the world. CS Ed Week is still almost two months away and already overall 9,000 schools and communities around the world have committed to doing the “Hour of Code” this year.

As recognition of this great work, just last week Amazon announced a $10 million donation to To put that in perspective, the total budget for the Computer Science Teachers Association is under $1 million a year. Amazon’s donation could have funded CSTA’s current operations for ten years.

I have not done the numbers, but my rough finger in the wind from having done fundraising myself is that over half of the philanthropy for CS education is going to and I’m guessing that’s more like 2/3 of the funding coming from the big tech companies like Facebook, Amazon, Microsoft, and Google.

This is a difficult topic to discuss but discuss it we must —’s incredible ability to raise philanthropy is making it difficult for other nonprofits in computer science (with a couple exceptions, like Girls Who Code, who also do a great job of marketing and fundraising) to make ends meet. Corporate Social Responsibility (CSR) departments are not known for being either well-resourced themselves or as risk takers — this makes a follow the herd model of simply giving money earmarked for computer science education to by default an easy choice for a haggard, over burdened CSR middle manager. And does do great work. But this present state of affairs doesn’t always make more for a vibrant, robust community of thriving non profits.

I also think it’s important to make room in CSForAll for curriculum developers, coding platforms, and professional development companies that are for profit (for purposes of this discussion I’m leaving out for profit K-12 schools; I personally can not yet support for profit K-12 schools). McGraw Hill is for profit. Pearson is for profit. Nearly every ed tech startup you can think of is probably a venture backed for profit – companies like Knewton and Code Academy. Organizations that sell products and services to schools and districts are usually for profits.

And yet, this current wave of computer science education momentum has largely been built on the assumption that the predominant business model for organizations involved in CS curriculum and professional development will be the 501(c)(3). Anyone who has run a non profit knows how difficult it is to raise money and keep going year after year raising ever more, at least until earned revenue can become a significant source of funding, which can take many years. And because of the afore mentioned dominance of in attracting CS philanthropy, this leaves the remainder of the CS nonprofits essentially in a constant state of fierce competition amongst themselves for what amounts to philanthropic table scraps. It also makes young nonprofits vulnerable — when the cornerstone donor of TeachCS for over 80% of our first year scholarships and programs operations decided mid year to instead shift its funding to a similar Donors Choose program, it effectively killed TeachCS and left me personally out tens of thousands of dollars in back salary I could no longer pay myself (thankfully the afore mentioned other four donors honored their commitment and we were able to still do a scaled back program).

Meanwhile there is a ton of cash out there in the form of venture capital, both institutional and individual. There are business opportunities in CS education and we have to stop being queasy about that as, again, organizations that sell to schools are usually profit generating businesses anyways. And so I’m happy to see for profits like CodeHS and VidCode as partners at the CSForAll Summit.

I’d also add that technology community – especially Google, Amazon, Facebook, IBM, Twitter, Microsoft, etc. – can do much more more in terms of philanthropy. I’d challenge the tech sector to increase their giving – both in the form of philanthropy and VC, to CS education organizations by 10x over the next 3 years, and that each company commit to supporting at least two other CS organizations other than (again, this isn’t a knock on — but the CS education community will benefit from more diversification in philanthropy by well-heeled companies with valuations in the hundreds of billions of dollars).

And while I understand the impetus (and touch of arrogance) that pushes companies like Google (CS First), Apple (Swift Playgrounds), and Microsoft (MakeCode) to build their own CS programs, curricula, and platforms, the CS community, school communities, teachers, and students, would be better served by less fragmentation. While it’s wishful thinking, these companies could serve the community better to instead focus on financially supporting the curricula and platforms already out there, many with principal investigators and a decade or two head start on academic peer review and in-class evaluation.

Corporations are Going to Need CS Education Strategies

In 2000, while I was still living Silicon Valley, I joined KPMG Consulting LLC, then still part of KPMG LLP. Over the next six years, as the Enron scandal rocked the accounting and consulting community, I’d watch on as KPMG spun out KPMG Consulting, which would be rebranded BearingPoint. In 2006 I left BearingPoint and joined Deloitte Consulting LLP‘s corporate strategy practice, where I advised Fortune 500 tech and media companies on their channel, partner, and route-to-market strategies. Deloitte Consulting was (and is) still part of the overall Deloitte family of partnerships, the last of the group of Deloitte, KPMG, E&Y, PwC, etc to retain its original structure which includes both audit and its original consulting unit.

Since 2000 there has been tremendous change in the “Big 4” (then the “Big 5”). In 2000 the control and power within these firms lied with the audit and accounting partners. By the time I left Deloitte in January 2013 it was evident that consulting was on the ascent both in terms of consulting revenue as as a percentage of aggregate overall revenues from the US member firms (Audit, Tax, Consulting, and Financial Advisory) and internal influence. A year prior to my departure, in January 2012, Deloitte bought Ubermind, in turn creating Deloitte Digital, and moving fully into the market once traditionally dominated by the digital agencies. Deloitte, like most of these professional service firms, is not your grandfather’s white shoe accounting firm.

What does this all have to computer science education? Computer science is becoming a critical skill in a lot more careers than ever. 30 years ago it’s hard to imagine that firms like Deloitte or PwC would care much if a candidate knew how to program a computer. Now it’s an essential skill for many positions, both client facing and back office, in those companies. And as I argued last year in a guest post for, I think the traditional division between functional analysis work and software engineering is going to go away.

And so increasingly I think we’re going to see large organizations, and not just those in technology, developing explicit talent and philanthropic strategies for computer science. This will likely take the form of…

  • Increasing the share of philanthropic and other corporate giving to computer science (the afore mentioned overworked CSR manager is going to need help determining which organizations to support). In particular corporations are going to be inclined to want to support organizations that are helping students develop the skills that they are going to need most from prospective employees, whether that’s A/I, big data, cybersecurity, hardware design, or some other area of computer science.
  • Firms like Deloitte start formal recruiting in the junior year of students’ undergraduate program but they look even earlier to begin attracting and identifying top talent. Corporations are going to be looking for top computer science students and solid computer science programs in high schools as sources for prospective employees.
  • Computer science will be an ever more important part of talent development strategies and so leading companies are going to want to better engage with the computer science education community about best practices in teaching computer science.

What About the Boys?

This is perhaps my most controversial point. I don’t just think that – I know that – as I’ve shared the following view point with several prominent people in the CS Education movement and the reaction has been quite negative. But persist I will as I think this is important.

My son goes to a progressive, politically left-leaning, public middle school in the East Village of Manhattan. It does not yet offer computer science as part of the curriculum taught during the day – i.e., it’s a school that has yet to benefit from the NYC DOE CS4All program’s 10 year rollout.

However the school does offer a Girls Who Code after school club, which is open to only girls at the school.

Before I go any further, let me be clear: I think the world of Girls Who Code and its founder, Reshma Saujani and nothing here is meant as a critique of that program or her. There are also academically researched cases to be made for creating places for girls and young women to explore computer science on their own.

But I’d like to think that the intention of our inclusion efforts around computer science was not to end up with school communities where the de facto condition is that a student may not study computer science at school, though offered, just because he is a boy. 

In the case of my son’s school, fault lies not with GwC but with the school administration and DOE overall as well as an overall funding mechanism for schools in NYC – one that over relies on the affluence of parents to pay for core programs as if these public schools were in fact private – that can neither yet provide CS during the class day for my son nor fund an additional after school program for CS that would be open to girls and boys alike. This is not inclusion. This is not equity. This is not “For All”.

How did we get here? I think the CS movement has made a mistake by assuming autodidact models from our past when we ourselves were children. These are outdated, errant, and even racially and privileged based assumptions about how boys get exposed to computer science. These models include Gen X boys like me in the 1980s who huddled around Commodore 64s or Apple IIs programming Basic between bouts of Castle Wolfenstein, or more recently, archetypes like the young Mark Zuckerberg in the 1990s teaching himself to code basic web sites. These models are also premised largely on the life experiences of privileged, suburban, mostly white boys and are not representational of boys in their own full diversity.

Complicating this still more is that we – adults who can often remember command prompts and even DOS, do not always appreciate the degree to which programming has been abstracted away from the casual tech user. For many young people programming a computer today is no less foreign than the idea would have been in the 1970s to open up the television set to fiddle with its internal circuits. So even young autodidacts may not have the inclination to just start coding on their own. In other words, they need computer science to be explicitly offered and introduced to them, ideally by experienced teachers trained in peer reviewed, academically pressure tested, curricula, whether those children are boys or girls. We must stop assuming boys will just go off to learn to how to code on their own.

Having a strategy for boys need not, and should not, come at the the expense of the many crucial programs, like Girls Who Code and Black Girls Code, that exist to promote inclusion and equity with young women (and, I’d note that I’m also the father of a daughter). I’d argue that for boys the strategy is one based on using computer science to address the widening academic gap between boys and girls, which is now starting to manifest itself in the work place as well. Computer science could be a powerful way to help our boys from falling even further behind girls in the classroom.

To give an (hypothetical) example: if 10,000 students take AP-CSP year one and 7,000 are boys and 3,000 are girls, and then in year two that number is 5,000 boys and 5,000 girls, is that success? I say no, but I think there are some in our community who would say yes, that’s (some) progress. Again, these numbers are illustrative but I think the goal should not be just a shift in relative terms, but increases in absolute numbers, with the additional goal that we want girls’ participation to increase at a (much) faster rate than boys.

So in this example, success in my mind would be if in year two we grew male participation by 2,000 more to 9,000 (a 22% increase) and female participation by 6,000 to 9,000 as well (a 200% increase), thus increasingly the absolute number to 18,000 (an 80% overall increase) while also improving the ratio in the numerator and achieving gender parity. Isn’t THAT what we want? And yet I get the distrinct impression that for some the numerator ratio in relative terms is in fact the priority – that the first illustration where 2,000 less boys participate would, yes, be a form of success. I just can’t get behind that. And while this example is illustrative, the practical policy of my own son’s school seems to be just this in real life terms. CS is available to only one gender – girls. That changes the ratio, sure, but leaves my son behind in the process to achieve that goal.

Finally I’d observe that US civic society is not going to be a better place in 20 years if we have even more men wandering around with few to any skills relevant in the modern job market.

In Conclusion…

I have been but a bit, part-time contributor to several efforts to expand computer science. As mentioned above the bulk of my work has been limited to New York City and Brooklyn in particular. And while I taught CS in high school for a year as part of the TEALS program (and three years of English in Japan on JET) I am not a professional educator and do not posses a graduate degree in either education or computer science. It’s classroom teachers, especially in Title I schools, along with parents, whose view points are perhaps the most critical. And incredible national leaders like Jan Cuny and seasoned CS educators like Mike Zamansky know far more than I could ever about the best strategies to roll out CS nationwide and within individual schools. So take all that in consideration and as a disclaimer re my thoughts above.

I wish I could be in St. Louis. The line up looks incredible and there are a lot of smart people that will be in attendance. Have fun and do great stuff.

ReasonML and React

I’ve always loved programming. My first language was Basic on the Commodore 64. Later I picked up VBScript, VB, Javascript, ABAP, Ruby, and a bit of Java.

At Relay Graduate of Education, where I was CTO from 2013 to 2015, we used PHP, and specifically the Symfony framework. The conventions of Symfony coupled with its MVC pattern eliminate some, though not quite all, of the chaos and noise endemic to PHP.

I learned a lot at Relay. One important lesson I learned was that especially in smaller organizations like Relay CTOs really must allocate some of each week – I’d estimate 20% is about right – to hands-on development. CTOs shouldn’t expect they’ll be able to “out code” full time developers who spend all day coding. But for myriad reasons – not least of which is credibility – CTOs must be able to code in the languages and frameworks of the organizational tech stack.

I came to Relay right from Deloitte, and while my experience delivering large scale programs at Fortune 500 technology and media companies had taught me a lot, it had been a long time since I had done much hands-on development, and I had never developed in PHP anything but “Tinkertoy” practice projects. While reading our code, evaluating data structures, was never an issue, writing PHP code was not an area where I could lead by example. I was keenly aware of this deficiency. My team, I’m sure, picked up on my lack of sure footedness. I regretted this and I think I was a less effective leader as a result.

So after I left Relay, believing (as I do now) that those who will do best in this economy are those who are at once deep technologists AND deep strategists, I committed to filling what I thought were gaps in my formal computer science education.

Through my ongoing work in CS Education I had become aware of the popular CS50 MOOC from Harvard University offered through Coursera. But rather than take the free Coursera version, I elected to enroll directly through the Harvard University Extension School, which cost me a couple thousand dollars in tuition, but also earned me 4 graduate credits in CS and access to the professor and TAs like any other Harvard CS student. After successfully completing CS50 in May 2016, I decided to continue on and take CS61, a deep systems programming class in C and x64 Assembly in which I did projects like building my own shell and developing a virtual memory page allocation routine.

After CS61 I still had a taste for something more and decided to take CS51, “Abstraction and Design in Computation”, which probably could be just as aptly titled “Functional Programming in OCaml”. CS51 was a complete flip from CS61. CS61 was deep down in the guts of the computer, dealing with registers and low level I/O. CS51, by contrast, seemed in the ether of math and higher order functions. And OCaml presented a totally foreign syntax, at least at first.

But once I started to tune in, once I opened my mind to a new way of approaching coding, the combination of succinctness and expressiveness blew my socks off. Here, for example, is the idiomatic solution to Euclid’s algorithm in OCaml:

let rec gcd a = function
| 0 -> a
| b -> gcd b (a mod b);;

The essential idea in functional programming is that everything is an expression and expressions evaluate, via substitution rules in line with the Lambda calculus, to values. That made a ton of sense to me. So too did the did ideas like map, filter, reduce, immutable state, currying, etc. Perhaps most importantly my exposure to OCaml left me convinced that static typing is the way to go — as Yaron Minzky of Jane Street, the largest institutional user of OCaml (though Facebook is catching on fast) says, a whole class of errors just go out the window with a type system like OCaml’s.

Back to Relay for a moment – one of the last projects during my tenure was a bake off between the two most dominant Javascript frameworks, Angular and React. We ultimately chose Angular but I liked what I saw in React and kept abreast of it in the time since, developing some projects of my own using React. During that time React’s popularity has grown a ton.

So when as I was doing my final project in CS51, a meta-circular OCaml interpreter, and heard about ReasonML, “a new syntax and toolchain” for OCaml that makes OCaml a bit more accessible syntactically to developers coming from languages like Javascript, I was intrigued. But when I really got excited was when I learned it was some of the same team building ReasonML that work on React.  Thanks in large part to a transpiler from OCaml to Javascript developed at Bloomberg called Bucklescript, ReasonML is now a great way to build React applications as among numerous other benefits, ReasonML brings to React the full power of the OCaml type system. And as context, React was originally prototyped in a cousin and antecedent to OCaml, so this – React using OCaml (ReasonML) – is full circle and back to its roots for React.

There are numerous videos and tutorials out there about both ReasonML and using ReasonML with React (and React Native). If you’ve developed apps in React, I suggest you give it a try. There’s a learning curve at first for sure, but soon enough you’ll get the hang of it, and the OCaml type system coupled with capabilities like match (renamed “switch” in ReasonML) will make you a convert.

If you’re already pretty comfortable in FP, especially OCaml, and have some React in your bag, this YouTube video of a recent lecture by Jacob Bass is great. If you need a more gentle introduction, check out this ReasonReact tutorial by Jared Forsyth. Also check out the official ReasonML and ReasonReact documentation of course too. And the support from the ReasonML community on Discord is incredible.

ReasonML is still new and there are still rough spots here and there, especially when using it for production class systems. But it’s gaining momentum fast and has big companies behind it, along with a whole bunch of developers who know of course that Javascript is the lingua franca of the browser but would like to have an alternative with static typing for front end development in particular. ReasonML, which can be compiled down to Javascript via Bucklescript, is just that.

Here’s to Reason!

It’s Time for You to Quit Facebook and Twitter

Like you perhaps, I’ve been using social media for a long time. I signed up for both Twitter and Facebook in 2008 or so, and had been using LinkedIn and MySpace for a few years prior to joining those two now dominant platforms.

There is nothing new under the sun, and that’s true for social media. While Facebook and Twitter’s platforms produced myriad innovations in content delivery, personalization, and community engagement, the essential idea of sharing a thought or photo online with a wide group of people – both friends in real life and strangers alike – is as old as the internet itself. Usenet newsgroups built on the NNTP protocol have been around since the 1980s; the 1980s were also marked by the growth in private BBS services. Protocols like RSS (used by this site if you’re reading this post in an email), while not directly analogous, also provide the capability to share posts and media far and wide.

Recently there have been myriad articles about the downsides of social media, especially in regards to their use in conjunction with mobile devices and their role in politics (a topic I wrote about in 2008 when I was with Deloitte). We are at a “What hath we wrought?” point of inflection about social media, mobile, and the wider vision – inasmuch as there is a coherent and human one – of Silicon Valley.

Here’s a few such articles that resonated most strongly with me:

The common theme to all these pieces is this: social media is toxic. Social media is toxic to our minds. Social media is toxic to our relationships. And social media is toxic to our democratic system here in the United States and society more generally.

And yet, strangely, no one seems to be quitting social media. Even the author of the “Is Social Media a Failure?” piece, Umair Haque, is still a prolific user of social media.

Is our FOMO – our fear of missing out – so great that we’ll really give up our minds, relationships, and democracy for fear of missing the next cat photo meme or Twitter spat between the Kardashians? I hope not.

We must start to admit that social media is no less a threat to us, both individually and collectively, as tobacco and guns. The “Giant Vampire Squid” is not the banks; it’s the social media companies. The squid doesn’t live on Wall Street. Its home is Palo Alto and San Francisco. The squid has wrapped its tentacles around us and is squeezing hard. It’s killing us.

So my ask of you is this: quit social media, especially Facebook and Twitter, at least temporarily, though maybe you will ultimately decide to stay away permanently. Here are the links you need to quit:

[NOTE: Facebook and Twitter deactivation work a bit differently. On Facebook you can deactivate indefinitely and then any time in the future reactivate and all your posts, friends, etc. will restore right where you left off. Twitter is a bit different. After 30 days everything – followers, tweets, etc., will be gone for good]

I have deactivated my Facebook account as well as my personal Twitter account, @brooklynrob. I first deactivated my Facebook account over a year ago and have periodically reactivated for a day or two, taking gradually longer breaks. Twitter, which I use much more than Facebook, has been harder for me to leave, but I have deactivated that too. I also deactivated Instagram. I am taking it one day at a time with each.

Of course some will argue that there is no going back, that social media can’t be put back in the box. Perhaps that’s so – almost certainly it will iterate to new, hopefully better, forms. Others will respond that social media is the only game in town in terms of marketing. To that I’d respond that many digital marketers still consider email a far more effective channel, especially for driving conversions to actual sales. How much money has social media really made you?  Others will miss the ability to share photos with friends and family. Services like Flickr provide the same or similar sharing use cases.

Think too of the effect if widespread deactivation catches on. Facebook and Twitter are public companies. Their stock price depends on growth in overall registered users, monthly active users (“MAU”), and time spent on the platform. These metrics are key to their ad-fueled models. As the adage goes, if you’re not paying you’re the product. Let’s start to remove the product – ourselves – from the shelves. Facebook and Twitter assume that we’ll always stay, that they’ve successfully hooked us. Let’s prove them wrong.

Quitting social media is not easy. FOMO is real. And you are hooked. You’re an addict like us all. Can I keep faithful to my own departure from Facebook and Twitter? I don’t know. But I’ll try. And I hope you’ll try quitting too (Extra points for both taking walks without your phone and leaving your mobile device off during the weekends; while you’re at it remember to support your local paper, professional journalists, and independent bookstores).

I also hope you’ll share this post with 10 friends. Of course, you may choose to share this on social media, but we also need to go back to old models that served us well in the past. Consider forwarding by email this post to at least 10 friends, relatives, and colleagues. Post this to a newsgroup or two.

If a product is doing this much damage to our minds, our relationships, and our society, why would we continue to use it? We must quit. You must quit. Quit. 


(Update: October 12th)

Since I posted this a controversy has arisen around Rose McGowan and her account getting suspended by Twitter. In response, there have been tweets like this:


Logging off and not tweeting for a day is a step I guess, but why do people stay? Why not deactivate, if not leave altogether? I don’t understand the desire to stick around on Twitter when you’ve already determined it’s a deeply flawed platform. Just leave.


(Update: October 13th)

Still need a reason to quit? From Politico: Twitter deleted data potentially crucial to Russia probes

Helping with Harvey

For the last couple weeks I’ve been giving a bit of a hand to the civic hacking community in Houston that is playing a critical role in helping with the rescue and recovery efforts in Texas and has now turned its attention to helping prepare for Irma in Florida. Angela Shah of Xconomy did an article on this work that includes a quote from me about how this work related to some similar work I helped lead (NYTechResponds) in 2012 after Hurricane Sandy. 

The Fierce Urgency of Now

Earlier today I attended a stakeholder and planning meeting for “The Campus”, the “first technology and wellness hub at a public housing site in the United States.”

Our meeting was at the Howard Houses in Brownsville, Brooklyn. It’s in the Howard Houses that The Campus operates. Brownsville and public housing projects like the Howard Houses have been largely left behind by the surge of investment (and gentrification) in Brooklyn in the last 15-20 years. Brownsville still suffers today from high levels of crime, violence, and poverty.

A key goal of “The Campus” is to provide opportunity to young people, especially young men and women of color who live in public housing. It is hoped that through technology, especially computer science, as well as programs in entrepreneurship and wellness, that we can provide youth the hope, confidence, and career skills with which to turn lives and communities around.

Tragically for one man our work came too late. About twenty minutes before the start of our meeting Rysheen Ervin, 28, still with a whole life ahead of him, was shot immediately outside our meeting room and only a few more feet from a public school. The man died of his wounds. The shooting was witnessed by my friend State Senator Jesse Hamilton, sponsor of The Campus. Senator Hamilton recorded this powerful video immediately after the shooting. This violence had a deep impact on everyone in attendance, including me.

At last week’s CSForAll Summit at The White House a key theme was broadening participation and making sure the “For All” in CSForAll is not just a platitude. On Thursday Mayor Bill De Blasio will give his one year update on New York City’s CSForAll initiative. During his speech we can expect to hear much about the city efforts to keep the “For All” in the forefront.

To complement and magnify CSForAll and the work of its foundation partner CSNYC, Borough President Eric L. Adams (also a sponsor of The Campus), his staff, myself, and a number of non-profit and private sector partners, put together CodeBrooklyn last year. The purpose of the CodeBrooklyn campaign is to champion the expansion of computer science and STEM in our schools, especially in communities like Brownsville, with the goal of establishing computer science in every Brooklyn school in 7 years — 3 years ahead of the city target. We’re still in the early days, but last year were able to help get over 80% of Brooklyn schools to participate in Hour of Code.

Senator Hamilton is a key supporter of CodeBrooklyn. Senator Hamilton held one of the first hackathons in Brownsville last year. Another supporter of CodeBrooklyn is City Councilmember Laurie Cumbo, who at a CEC 13 meeting in October 2014 literally jumped onto the stage at PS 307 to join CSNYC board chair Fred Wilson to give impromptu, moving testimony about the civil rights case for computer science.

The fight for civil rights brings to mind Dr. King. The death of this man, Mr. Ervin, literally before the eyes of those gathered to plan for The Campus, gave new relevance to these words of Dr. King:

“We are now faced with the fact, my friends, that tomorrow is today. We are confronted with the fierce urgency of now. In this unfolding conundrum of life and history, there is such a thing as being too late. Procrastination is still the thief of time. Life often leaves us standing bare, naked, and dejected with a lost opportunity. The tide in the affairs of men does not remain at flood — it ebbs. We may cry out desperately for time to pause in her passage, but time is adamant to every plea and rushes on. Over the bleached bones and jumbled residues of numerous civilizations are written the pathetic words, ‘Too late.'”

For the man murdered today,  and his murderer perhaps as well, we were “too late.”

Let me be clear – computer science education is not a panacea to all of our nation’s problems. The challenges in communities like Brownsville – or McDowell County in West Virginia – are a Gordian knot that can not be swept away with a couple lines of JavaScript. But our commitment to inclusion and participation in computer science education is a right and important first step in creating new opportunity for communities that the economy has left behind.

And so let us resolve to act, in the memory of this man killed today at the Howard Houses, with Dr. King’s “fierce urgency of now”. Let us never be “too late” again.

Goodbye Hello Bluehost

Short post today.

I’ve been meaning for some time to start the migration of a couple WordPress sites I own and manage from onto another hosting provider as self-hosted WP sites.

On a the recommendation of a friend who blogs daily, I’ve gone with Bluehost, and migrated all of my blog content for this blog from to a new WordPress instance I’ve created. In all, it probably took me two hours to migrate, configure DNS, and set up the various plugins. I also had a bunch of fun getting my .htaccess file and the Apache ReWriteEngine directives to work right (as this is not the only site I’ll be hosting on bluehost). There is still some stuff to do, namely work on my CSS (my buddy David of Smarter Storytelling is right that WP CSS is intricate).

Hopefully this change over was invisible to you. Let me know in the comments (now powered by Disqus; one of the reasons I wanted to get off is that it allows “widgets” but no plugins such as Disqus) how it’s working. Mike Zamasky’s kick in the butt to get back to blogging gave me a reason to do this migration as well.

Would love to hear what plugins and WP themes you like in the comments as well.

In the coming weeks I’ll probably hook up Cloudflare, but that is probably not urgent right now.

Back To Blogging

I was browsing the web over the New Year’s holiday looking for some material on computer science in schools (more on that in a bit) and saw a post from my friend Mike Zamansky that referenced a post by Alfred Thompson which itself referenced my last post to this blog. It was fun to see my post being discussed. Some commenting back and forth on both blogs ensued and in one comment Mike encouraged to me to start blogging again. Mike’s kick in the rear for me to blog was welcome.

So, back to blogging.

An update is probably in order about what I’ve been up to the last few months.

In July I left Relay with the intention to start doing my own independent advisory and consulting work, and to also spend more time working on computer science education. As luck would have it, very soon after I was asked by my friends Evan and Pedro to serve as the ED of TeachCS. Since late August I’ve been doing that about three days a week. That has resulted in some really fun things such as…

…getting to open NASDAQ with my friend Fred and a whole bunch of other friends and leaders in the CS is schools movement…

… and, that same week, being invited to the White House to participate in a computer science education meeting. Here I am at the entrance to the West Wing…

Honorable mention to front row tickets at Hillary Clinton’s birthday party — Bill was sitting behind me! Here’s a picture I took from my seat…

TeachCS has not been all I’ve been doing. Other things I’ve up to:

  • Launching the CodeBrooklyn campaign with Brooklyn Borough President Eric Adams to promote computer science in Brooklyn school communities
  • Providing strategy advice to my friend Gordon’s CS education startup, Codesters
  • Helping my friend Nathaniel and TEALS doing class observations
  • Checking in with my friend Chris and his startup, WillSomeone, into which I made a small angel investment last year
  • Keeping tabs on AlumniFire, another company into which I made a small investment
  • Joining the advisory board of Gemr, an amazing startup for collectibles and the people who collect them, based in Portsmouth, New Hampshire
  • Putting together a new startup idea with my friend Seth (nothing to announce yet but stay tuned — very interesting stuff)
  • My continued community work in Brooklyn as an elected member of CEC13 and the new youth chair of Community Board 6
  • Lifting heavy things and running my 10th NYC marathon

Finally, I also have a personal tumblog you can check out if you’d like. Warning: It’s mostly a mix of my writing on Brooklyn school and civic issues (including updates about CEC 13 and CB6 stuff I’m up to) plus more pictures from Instagram of me lifting weights.

Code Syntax Compared

A friend of mine is getting into coding. He was asking me a bit about what language to learn and how they are different. He was curious about functions in particular.

To show him the differences I decided to write a very simple program to calculate the area of a triangle in 5 different languages. Each program is run at the command prompt. I tried to write the program in more or less the exact same way, somewhat ignoring a couple conventions in order to make each program as identical to the others as I could.

#run at command prompt with python

def triangle_area(base, height):
    area = (1.0/2) * base * height
    return area

a1 = triangle_area(10, 2)
print a1


#run at command prompt with ruby triangle.rb

def triangle_area(base, height)
   area = (1.0/2) * base * height
   return area

a1 = triangle_area(10, 2)
print a1

For all the Ruby (and Rails) vs. Python (and Django) debates, these two languages look nearly identical in these examples. That doesn’t hold true forever, though. The main difference is that Python starts the function definition (the inside of the “black box”) with a colon. The function ends when the code is no longer indented – white space matter a lot in Python compared with other languages. Ruby on the other hand does not use the colon and ends the function instead with “end”.


// triangle.js
// run at command line with a program such as node – e.g., node triangle.js

function triangleArea(base, height) {
   var area = (½) * base * height;
   return area;

var a1 = triangleArea (10, 2);

JavaScript, in part due to its history and orientation to the web, does printing to the prompt a bit differently.



// triangle.php
// run at command prompt with php triangle.php

function triangle_area($base, $height)
      $area = (½) * $base * $height;
      return $area;

$a1 = triangle_area(10, 2);
print $a1;
print “n”;


Many people think PHP is ugly. I think it’s the dollar signs and question marks. Somehow it feels cheap and uncertain.


Must be compiled first 
Run at command prompt javac
Then run java Triangle

class Triangle {

public static double triangleArea(double base, double height)
         /** Need 1.0 to get calculation to work right – indicates double **/
         double area = ((1.0/2) * base * height);
         return area;

public static void main(String args[]) {
      double a1 = triangleArea(10.0, 2.0);
      System.out.println(a1 + “n”);


This is the only example that needs to be compiled. Complied languages generally run faster and programming in languages that need to be compiled is sometimes seen as “harder core”, though that’s a somewhat outdated view. Remember – right tool for the job!

I’ll do this again soon .. maybe adding R to the mix.