Allen B. Downey – Why I Wrote This Book?

Why I wrote this book

This is the fifth edition of a book I started writing in 1999, when I was teaching at Colby College. I had taught an introductory computer science class using the Java programming language, but I had not found a textbook I was happy with. For one thing, they were all too big! There was no way my students would read 800 pages of dense, technical material, even if I wanted them to. And I didn’t want them to. Most of the material was too specific—details about Java and its libraries that would be obsolete by the end of the semester, and that obscured the material I really wanted to get to.

The other problem I found was that the introduction to object-oriented programming was too abrupt. Many students who were otherwise doing well just hit a wall when we got to objects, whether we did it at the beginning, middle or end.

So I started writing. I wrote a chapter a day for 13 days, and on the 14th day I edited. Then I sent it to be photocopied and bound. When I handed it out on the first day of class, I told the students that they would be expected to read one chapter a week. In other words, they would read it seven times slower than I wrote it.

The philosophy behind it

Here are some of the ideas that make the book the way it is:

    • Vocabulary is important. Students need to be able to talk about programs and understand what I am saying. I try to introduce the minimum number of terms, to define them carefully when they are first used, and to organize them in glossaries at the end of each chapter. In my class, I include vocabulary questions on quizzes and exams, and require students to use appropriate terms in short-answer responses.
    • To write a program, students have to understand the algorithm, know the programming language, and they have to be able to debug. I think too many books neglect debugging. This book includes an appendix on debugging and an appendix on program development (which can help avoid debugging). I recommend that students read this material early and come back to it often.
    • Some concepts take time to sink in. Some of the more difficult ideas in the book, like recursion, appear several times. By coming back to these ideas, I am trying to give students a chance to review and reinforce or, if they missed it the first time, a chance to catch up.
  • I try to use the minimum amount of Java to get the maximum amount of programming power. The purpose of this book is to teach programming and some introductory ideas from computer science, not Java. I left out some language features, like the switch statement, that are unnecessary, and avoided most of the libraries, especially the ones like the AWT that have been changing quickly or are likely to be replaced.

The minimalism of my approach has some advantages. Each chapter is about ten pages, not including the exercises. In my classes I ask students to read each chapter before we discuss it, and I have found that they will do that and their comprehension is good. Their preparation makes class time available for a discussion of the more abstract material, in-class exercises, and additional topics that aren’t in the book.

But minimalism has some disadvantages. There is not much here that is intrinsically fun. Most of my examples demonstrate the most basic use of a language feature, and many of the exercises involve string manipulation and mathematical ideas. I think some of them are fun, but many of the things that excite students about computer science, like graphics, sound and network applications, are given short shrift.

The problem is that many of the more exciting features involve lots of details and not much concept. Pedagogically, that means a lot of effort for not much payoff. So there is a tradeoff between the material that students enjoy and the material that is most intellectually rich. I leave it to individual teachers to find the balance that is best for their classes. To help, the book includes appendices that cover graphics, keyboard input and file input.

One of my students wanted a suggestion for a Java book. I Googled and found some. When I saw this book, I thought it may be a good one to start with. I like Allen’s books. There are three reasons I like Allen’s books.

  1. The chapters are small and easy to read. For a beginning programmer, they are not very intimidating.
  2. Allen’s Python book had a creative common’s license, and I noticed that a few authors have taken his material and reused parts of it and came up with new books.
  3. The most important reason is this philosophy behind the book (and also why I copied the entire section in this post).

From a few experiments I have conducted so far, I found that the first challenge in teaching computer programming to students is to make it interesting.  Once students are interested and feel confident, they can create simple programs with reasonable effort, they tend to explore more. Many programming books, however start out with too much detail. If you can teach the basic concepts in a few sessions and get them to code, you have won half the battle.

Innovation and Startup Culture in Colleges

How do you bootstrap a culture of Innovation and  Entrepreneurship in your college?

  1. Start an Innovation and Entrepreneurship development activity. Find a few mentors from the industry. Involve your nearest TiE/NASSCOM/NEN/CII chapters. Have each mentor adopt a few projects. They can teach students how to generate ideas, build demonstrable prototypes, find initial users and validate ideas. Pick simple ideas that benefit people or industry. Encourage projects with an element of social innovation.
  2. Adopt The Lean Startup method. The concept of a lean startup is to build early prototypes and validate product/service ideas. There is a great free course on Udacity on building The Lean Startup.
  3. Create a set of student startups (have a goal of doing 10-20 startups in every batch). Associate a faculty member and an industry expert with each group. Create a plan for brainstorming ideas, building prototypes to test the feasibility.
  4. Develop student skills on user centric design, communicating with potential customers, validating ideas. They can start in the Second Year of college.
  5. Give course credit to innovation and entrepreneurship activity. Kerala government is doing this, and it is a great idea to adopt it in your institution.
  6. Focus on finding at least 5-10 customers/users for each startup, in the first year of entrepreneurship. Every following year, try to raise that number by a factor of 10.
  7. Allow for failures. Don’t discourage them. Make students blog about their experiments, what worked and what did not. This will be useful for students. Have open sessions to discuss these experiments.

By creating a practical program for student entrepreneurship and getting faculty involved, you will change the culture of your institution. You are sending a message that practice is as important as theory.


This is part of an article I wrote for ICT Academy of Tamil Nadu.

Different Micro Realities

the concept of “the umwelt” coined by biologist Jakob von Uexküll in 1909 — the idea that different animals in the same ecosystem pick up on different elements of their environment and thus live in different micro-realities based on the subset of the world they’re able to detect. Eagleman stresses the importance of recognizing our own umwelt — our unawareness of the limits of our awareness:

I can see this in different ecosystems I observe – the entrepreneur ecosystem, the learning ecosystem and the microcosm of our own product teams and businesses.

In the startup ecosystem, different players – startups, investors, mentors and customers have different micro-realities about products, businesses, and markets. While they overlap somewhat, sometimes they are very different.

In the learning ecosystem similar micro-realities exist between institutions, teachers, students and learning experts.
But the best example, I have seen of these different micro-realities is in a product team or a business.

Source of inspiration

This Will Make You Smarter: 151 Big Thinkers Each Pick a Concept to Enhance Your Cognitive Toolkit

7 Things I Learned from Listening to The Culture of Innovation Talk

I really enjoyed watching  “The Culture of Innovation” from MIT Technology Review.

The talk covers several interesting topics worth exploring.

  1. Permission less innovation and Innovation at the edges
  2. A culture of practice over theory
  3. The concept of Social Investing
  4. Connectivity in Communities
  5. Peripheral vision and Pattern Recognition and how they are the total opposite of focus and execution
  6. Attachment bias
  7. Cultures and sub-cultures

My favorite quote from the talk:

We so cherish focus, execution and they are the opposites of peripheral vision, pattern recognition
Peripheral vision and pattern recognition lead to discovering new ways of doing things.
Here is a link to the video interview with Joi Ito.

ReadLog: When Leaders Think Aloud…

When leaders think aloud, it is a fascinating to listen. Satya talks about innovation, handling failures, AI, advances in cloud computing, using silicon to speed machine learning and a variety of other topics including bits of history (of Microsoft) and philosophy.

satya may 2 2017-1

Microsoft had been there, too early.  And they were too far behind on the Internet and managed to catch up.

On handling failures – instead of saying “I have an idea”, what if you said, “I have a new hypothesis”?

satya May 2 2017

Satya Nadella goes on to talk about some of their innovations (accelerating AI using FPGA), on investing in the future and the future of innovation. This article is a good read.

Q&A with Microsoft CEO Satya Nadella: On artificial intelligence, work culture, and what’s next

Popular Posts From This Blog in 2014

With 100 or more views

Title Views
Home page / Archives More stats 4,003
Attributes of a Great Teacher (Updated on Mar 2014) More stats 1,656
How Will Cloud Computing Impact Software Industry? More stats 548
Web Information Sources More stats 485
Treating Code as an Essay More stats 476
Thirteen Dwarfs – Computational Kernels of Future Applications More stats 476
Machine Learning Application: Job Classification at LinkedIn More stats 448
A Simple Survey: If I Take Care of Your Salary … More stats 336
Multiple Roles of a Teacher More stats 327
Python Learning Material More stats 299
Data Jujitsu – A Pragmatic Approach To Applying Data Science More stats 299
About More stats 286
Seven Things To Do After You Finish a Hackathon More stats 268
What Ever You Want to Do, Some One Either Has Already… More stats 251
“Why Can’t You Be Like Him?” Asked my Mom More stats 246
Problems Inspire Creativity More stats 243
F# Is Moving Up In Popularity More stats 228
Interviews with Entrepreneurs – Srikanth, Funds India More stats 184
Gardner’s Multiple Intelligences for iPads More stats 156
List of Lists More stats 153
What is Technology Intelligence? More stats 153
Service Business vs Product Business More stats 141
A Few Snippets From “Secrets of Analytical Leaders” More stats 129
Dart, Swift and Popularity of Big Data and Computational Statistics More stats 127
Product Conclave: Early Customer Development – Different Strokes for Different Folks More stats 127
Indian Startup Resources More stats 127
For Students More stats 124
Where Do Ideas Come From? More stats 113
For Software Developers More stats 111
Are You Synesthesic? More stats 110
Do You Manage Facebook Groups? This App May be Useful To You More stats 106
For Entrepreneurs More stats 106
My Talks More stats 100


Promoting Self Organized Learning

XPrize is offering $15 million to build tablet apps that help kids teach themselves.

The goal is to help the 250 million school-age children in the world who can’t read or write. Contestants will build apps that kids can use on their own — because many of these kids don’t have access to the “unscalable” resources of teachers and schools.

The prize all ties into a philosophy known as self-organized learning — where kids learn autonomously by figuring out technology for themselves — that’s popular with the TED crowd. And of course, the other big idea is that contests are a peculiarly effective way of motivating people.

Keller said he anticipated that the winning app would use an artificial intelligence approach to figure out what an individual kid knows and does not know.

A few thoughts:

  1. The kids (targeted by this effort) cannot read or write. So you need to starting points may be different (speech, images).
  2. Kids should use these apps on their own. This means the apps need to be engaging and evoke curiosity constantly (the game community can contribute a lot).
  3. Since there will be no teachers involved, this would encourage peer based learning (and students playing the role as teachers)
  4. You cannot make any assumptions about what they know or what language they speak.
  5. The app is supposed to use AI approach. So you need to use AI to mimic a teacher or a self learner or a combination of both.
  6. To come up with a reasonable solution, you need to understand how kids learn.  That, in itself, is a fascinating area of exploration.
  7. Kids don’t have access to “unscalable” resources (like teachers and schools). That points to tablets with long battery life, solar chargeable or something that requires hand cranked power. This is not actually the app quality but the need of the underlying platform. This also means, schools cannot the platform for distribution of apps or devices. Hopefully that will be a different challenge.

Rural India and countries in Asia and Africa will certainly benefit from the outcomes. No matter which app wins, we will get a lot of great ideas for self-organized learning. That is bound to change education as we know it.

If You Like Database Technologies… You Will Enjoy This

Dr. Michael Stonebraker is a legend in the database world. He was the architect of Ingres, Postgres, Vertica, Illustra, Cohera, Streambase, H-Store and VoltDB. In this interview, he dives deep into database technologies. He talks about evolution of databases and certainly provokes you to think about the technology, the industry and how application needs are driving development in database technologies. A few nuggets from the interview.

  • The traditional (row oriented) database technology is becoming obsolete
  • The database market is at a tipping point
  • DB market can be viewed as three segments – data warehouse market, OLTP market (both new and old) and a potpourri of other stuff
  • The potpourri consists of various types of NOSQL, Graph databases, Column Stores, In Memory databases
  • Databases currently spend 90% on overheads and only 10% on   value producing work (big Gasp!)
  • The overhead consists of – feeding buffer pool, mapping buffer pools to disk, lock management, logging, multi-threading
  • There are ways to reduce these overheads using shared data structures, removing the record level locking, implementing multi-version concurrency, logging commands instead of data changes, using replication, getting rid of buffer pools, getting rid of expensive multi-threading, optimistic concurrency control etc.
  • He talks about Distributed concurrency vs eventual consistency
  • Most database books cover traditional database architectures. He advocates teaching  – column stores, in memory databases, array databases and graph database architectures.
  • He talks about embarrassingly parallel databases
  • VoltDB evoloved from HStore prototype from MIT
  • Applications are multiplayer games, high speed OLTP
  • Some  examples of NewSQL databases – Hana from SAP, Hekaton from Microsoft, SQLFire by VMWare, NeuroDB, NetSQL
  • Most of the db systems written in the past year are open source

He takes a lot of digs at the closed source sales models.  Deep dive into databases is an intoxicating topic and this was a great interview. Thanks to IEEE Software Engineering Radio folks for their indepth, high quality interview questions.

Here is a link to Dr Michael Stonebraker on Current Developments in Databases


  • I was lucky to spend a lot of time in late 80s and early 90s reading Michael Stonebraker’s papers.
  • I met him twice (once when I attended an RDB seminar at Palo Alto and once when we walked into Illustra offices (we built the ODBC driver for Illustra in my previous startup)
  • I have been following him when I was working on complex event processing and looking at Telegraph (built on top of Postgres) and Streambase
  • I lost touch even though I kept hearing about Vertica and other developments
  • Michael Stonebraker inspires me and lots of other data geeks like me




How Do We Spot Genuine Talent?

How do we spot genuine talent?

The Little Book of Talent gives us some ideas.

For most of us , the problem revolves around one word : “how.” How do we recognize talents in ourselves and in those near us? How do we nurture talent in its early stages? How do we gain the most progress in the least time? How do we choose between different strategies, teachers, and methods?

In the book Dan talks about Talent Hotbeds and the methods they use.  First:

The talent hotbeds are not built on identifying talent, but on constructing it, day by day.

This is a kind of relief. So people can be trained to develop talent. You (the teacher, the institution, the parent) needs to figure out how.  There seems to be some general approaches that apply across multiple disciplines.

No matter what skill you set out to learn, the pattern is always the same: See the whole thing. Break it down to its simplest elements. Put it back together. Repeat.

You can take some comfort in the fact that

You are born with the machinery to transform beginners’ clumsiness into fast, fluent action. That machinery is not controlled by genes, it’s controlled by you.Even the most creative skills— especially the most creative skills— require long periods of clumsiness.

This book provides a few tips.  It is worth running a few experiments and observing the results.