Trevis Rothwell's weblog

Almost, but not quite, entirely unlike tea

Mindstorms – Children, Computers, and Powerful Ideas

20 April 2013

I just finished reading Seymour Papert’s Mindstorms, the first couple of chapters of which were assigned readings for the MIT Media Lab course on creative learning, but I found so enjoyable that I kept going.

The central topic of the book is about the Papert’s LOGO/Turtle programming environment, which I had used myself in elementary school. I saw Turtle programming then as an introduction to computer programming in general: writing scripts to make the “turtle” on the screen move around and draw pictures. Papert’s intentions were in fact much deeper than that; he developed the Turtle programming environment for the purpose of creating situations in which children could learn about basic concepts of Newtonian physics (how objects move) and differential geometry (how shapes can be constructed).

While much of the book uses the Turtle programming environment as an example, the main thesis of the book is that people learn best when they are engrossed in an environment in which to make use of what they are learning, rather than learning abstractly, disconnected from application of the ideas. Papert brings up the challenge of learning a foreign language: would you learn French better by sitting in a classroom memorizing books, or by living in France for a month, communicating with native speakers? The goal of the Turtle system, then, was to provide an artificial place for children to go to engage in ideas of physics and geometry, where those were not just abstract concepts but things to play with and to create with.

But Papert’s grand vision was not to create Turtle and be done with it. He hoped that it would serve as an example for others, to continue to use computers to create environments in which people could engage with ideas for better learning of any imaginable subject. Years after writing the book, he mused that, unfortunately, what most readers got out of the book was a study of the Turtle system itself, rather than the ideas behind it.

A very good read for those interested in education, and the intersection of education with technology. Oddly enough, the book does not appear to be available in digital format yet, but you can buy a printed copy at Amazon.

Tips on Socializing a Border Collie

01 June 2012

These are some notes I took following a conversation with the staff at a local dog training organization:

  • If your dog is anxious or agitated around strangers, you need to slowly acclimate her to being around other people.
  • Do not reenforce fearful behavior. If she jumps up on you or cowers around you, she is seeking confidence and reassurance from you. It’s best to ignore her in these situations, or instruct her to do something else that she has learned to do on command. It’s only okay for her to jump up on you if you say it’s okay, not just any time she wants.
  • Around strangers, if she becomes agitated, keep her on a short leash: an inch or so of slack is enough for her to learn that she should prefer staying right next to you instead of running away from or toward the other people.
  • Have your house guests throw her treats from a distance, so she learns to associate visitors with treats. Preferably use high quality, high value treats that she especially enjoys (but rarely gets).
  • Do not exhibit fear or anxiety yourself; she will pick up on that, and she needs you to be a strong leader.
  • If she gets out of control around other people walking on the sidewalk, try to practice that on purpose rather than avoid it. Preferably get her around people on the sidewalk who are walking away from her, rather than toward her. They will still be in the vicinity, but less threatening.
  • Some of her behavior may be related to natural herding instinct. Unless you plan to put her into service as a sheepdog, it’s best to train that out of her, as much as possible.
  • One benefit of her herding instinct is that she protects the herd. Once she accepts someone into her herd, they become someone she protects, not someone she fears.

Cedar Rapids IEEE Meeting on Real-time 3D Graphics Rendering

15 May 2012

In one of those rare instances when my schedule and that of the local chapter of the IEEE aligned, tonight I enjoyed listening to a talk by Chris Wyman on the topic of real-time 3D graphics rendering. This blog post is just meant to capture some of the notes I made during the talk:

  • There are two kinds of wrong answers in computing: an answer can be so inaccurate that it is useless, or an answer can be so late as to be useless. Inaccurate answers might be timely, and late answers might be accurate, but in neither case is the answer helpful.
  • Some optimization techniques that made sense decades ago, such as caching trigonometric values in memory rather than recomputing them, no longer make sense, as computing has become faster than memory access.
  • There are two general approaches to improve real-time interactive graphics rendering: you start with fast but poor quality graphics and improve the quality, or you can start with slow but high quality graphics and improve the rendering time. Relatively simple adjustments can make a big difference, coming from either direction.

Graphics rendering is about as far away from what I do as you can get and still be within the field of computer science, but it was interesting to get some insight into this line of work.

Native Applications or Web Applications?

06 February 2012

One of the things I’ve been contemplating most from my recent trip to MIT is the hypothetical decision of, for any given software application, should I write a native application that runs directly on the phone or PC, or should I write a web application? Our instructor, an accomplished software developer, pointed out that the web applications he built nineteen years ago are still running just fine, while he doubts that any native mobile phone applications written today will even be usable, much less running, nineteen years from now. And on top of that, it’s usually much more complicated to write a native application than to write a web application that does more or less the same thing.

After investing a fair bit of time into learning iPhone development, that hurt a little to hear! But further consideration leads me to the same conclusion. For all of the hours I’ve poured into iPhone programming, I’m still pretty disgusted by it. I wince when I envision the drudgery involved in making even modest changes or additions to an iPhone application. Web applications have always felt pretty streamlined overall.

But what about making money? Isn’t it super easy to make money on the iPhone App Store? I’ve recently been making some designs for a music education program that I planned to develop as an iPhone application. Yesterday, a friend showed me her new iPad, and asked what I thought about running GarageBand on it for basic music tracking. I said it’d be hard to go wrong with that option, as it only costs five dollars.

I seriously doubt that my planned music education app would have 10% of the overall functionality as GarageBand, so maybe I could offer a good value on the iPhone App Store if I just gave it away for free!

At least with web applications, you can justify time and resources spent hosting and maintaining the application, and charge money accordingly. Big companies might think it’s a good idea to build iPhone applications just so their marketing departments can say that they have one, but for an individual software engineer, maybe it’s not only more technically pleasant to write web software, but potentially more profitable…

Relational Database Programming Class at MIT

04 February 2012

IMG_7207I started reading Philip Greenspun’s database-backed web application books and articles around 2005. While I had previously seen database development as the droll, boring corner of computer science, as I realized how useful it could be to route a database through a web site, I became intrigued.

I shortly dove in and tried building some database-backed web sites of my own, more or less following along with Philip’s curriculum for his semester-long class at MIT. I was pleased with what I had learned, but was aware that my self-taught understanding of the database side of things was somewhat superficial.

In January 2012, I had opportunity to take a three-day (all-day) intensive class at MIT, led by Philip, specifically focusing on relational database systems.

Class Format

Perhaps one of the most novel aspects of the class was the overall format. From what I’ve seen, most computer science classes consist of an hour-long lecture in which students are more or less read passages from a textbook, and then given homework assignments to go off and do by themselves.

In this class, Philip gave a mini-lecture of a half-hour or so, then gave the class a short programming exercise based on the lecture material. We were all to bring our own laptop computers to class, and (thanks to the power of Virtual Box, we were all running the exact same software configuration) complete the assigned exercises right there in the classroom. Philip along with a handful of teaching assistants were available to help, and roamed about amongst the students asking us how were were doing if we appeared to be stuck.

After a half-hour or so of letting us churn through the exercise, we pasted our (attempts at?) solutions into a shared Google Docs document, and Philip reviewed and discussed our solutions in front of the class, followed by showing us his own solutions. Then he moved on to the next topic, and the process started over. The pace was fast, and reminded me of the time I spent on the Cornell College block schedule, only more so.

How did this approach work? I think very well. Nearly all of the material we covered in the class was taken either directly or indirectly from Philip’s online SQL book, which I had perused many times while working on my own database projects. But even though I had access to this knowledge, my depth and breadth of study was limited to what I thought I needed to know in order to solve my immediate problem. Being “forced” to work through all of the material in class, even if it appeared too boring or too challenging from a distance, prompted me to learn things that I had never bothered to learn before.

Web Clients vs. Native Applications

IMG_7302

While the class focused on databases, we also took some brief excursions into making end user-facing applications that connect with the databases, both a small web application and a small Android mobile phone application.

What did we learn? It’s much easier to make web applications, and much more cumbersome to make native applications, that do more or less the same thing. Philip wisely pointed out that the web applications he built nineteen years ago still work fine, while he doubts that any mobile phone applications built today will still be usable nineteen years from now.

Which makes more sense to work on?

But Are Relational Database Systems Still Useful?

On Tuesday afternoon, database expert Michael Stonebraker gave a fascinating guest lecture in which he proposed that the standard big-name database systems like Oracle and MySQL might not really be what you want to use.

Modern database usage can be divided into three general areas: online transaction processing, data warehousing, and a variety of other specialized niche uses. Online transaction processing demands high availabilty and fast performance on short, simple queries. Data warehousing demands huge amounts of storage space and running complex queries. Quantitative analysis (such as that done on stock market numbers) demands access to data more like a two-dimensional array than rows of columns in a traditional database.

Systems like Oracle and MySQL can be used to model the data in all of these situations, but they aren’t optimized for any of them. Instead, if your application needs more than Oracle can muster, it is better to use specialized database systems: VoltDB is optimized for online transaction processing, and works as much as 75x faster than Oracle. Vertica provides a 25x performance boost over Oracle for data warehousing applications. For array-based processing, SciDB offers superior performance.

So is Oracle just a worthless piece of junk? Not exactly. There are plenty of applications that do not require a high-performance database. If you don’t need high performance, then Oracle might be a fine choice. An even better choice would be an open-source database system like Ingres or PostgreSQL, since they offer features comparable to Oracle without the hefty licensing fees.

In addition to recommending that we explore diverse kinds of database systems rather than assuming that one size fits all, Dr. Stonebraker admonished us to become well-versed in linear algebra and statistics, as he believed these skills will be increasingly valuable to database developers.

Additional Topics

Ollie the Border Collie

After the final class session, several of us stuck around to chat with Philip and hear his views on sundry other topics, such as startup companies.

Many young programmers today aspire to launch a successful startup company. Of course, many more startups fail in obscurity than strike it rich, but the allure is strong. The recent trend has been to try to acquire some sort of funding and go to work on your startup full-time.

Philip asked, why would you want to work at a poorly-funded startup, working potentially very long hours and always wondering when the horizon of money is going to run out? Wouldn’t it be better to get a job at a well-funded company and work on your product idea in your free time? If your project takes off, then wonderful, but if not, you haven’t put yourself at financial risk.

What about deciding which technologies to learn? All other things being equal, it may be better to develop experience on expensive proprietary technology than on freely-available technology: if a company has the money to pay for the proprietary technology, then (ostensibly) they also have the money to pay you well. Many proprietary software vendors offer free demos; download the demo, build something with the software, and add your newly-acquired skill to your resume.

But even more important than having a laundry list of technologies on your resume is being able to list projects completed. Being able to point to a software product (or a distinct sub-component of one) and say “I built that” is a strong indicator of engineering ability.

Outside of the Class

It seems that different parts of the world are somehow more conducive to certain fields of endeavor than other parts of the world. If you’re into science and engineering, the Massachusetts Institute of Technology is simply an awesome environment to be in. As I roamed the corridors, hung out in the student center, and bought tea in the lobby café, it was as if innovative technological ideas were just floating around in the atmosphere, available to grab and make your own.

Bonus Points: An MIT Hack

MIT students are well-known for performing hacks on campus, and we had opportunity to witness a small one during the class:

IMG_7228 IMG_7313

Final Thoughts

The knowledge I gained in the class was sitting right before me in book form for years. Probably had I only read all of the material, and made a solid effort to work through all of the examples, I would have been much further ahead earlier on. This surely holds true for other areas as well: if a good educator has taken the time to write a good book on a topic that you wish to learn more about, then read the book.

That said, the class was a great experience. The interactive nature lets you learn more easily than through reading alone, and the class structure helps you to stay focused and get through the material.

Not only did I learn more details about database systems, but I feel professionally recharged, and eager to continue on in my career as a software engineer.

More