October 2018

Volume 33 Number 10

Don't Get Me Started - Reading the T Leaves

By David S. Platt | October 2018

David PlattI just had a blast teaching Xamarin.Forms at Harvard’s summer session. The keystone of any programmer’s education is building a working app. I can lecture and show code samples until my head falls off, and the students can regurgitate them on exams. But students don’t own those skills until they’ve fired them in anger against a target they need to kill if they want to eat (or, in this case, pass the class).

As always, I wanted to provide my students with a real-life project, not some artificial concoction. Last year’s class built a mobile weight tracker app for Harvard Medical School (see my December 2017 column at msdn.com/magazine/mt814422) that can improve care and outcomes for patients with congestive heart failure. I found another great project this year.

The Massachusetts Bay Transportation Authority (MBTA), universally called “the T,” runs most public transportation (bus, subway, rail, ferry) in eastern Massachusetts. As with most government agencies, the T is not universally respected for its competence. As columnist Howie Carr wrote in February of 2016: “The only way to stop the Trump train now might be to turn it over to the MBTA.”

But the T did something extraordinary in 2016. They hired as their CTO an upstart named David Block-Schachter, co-founder and former technical lead for the startup Bridj. I read of his hiring just as I was finishing my book “The Joy of UX.” Always looking to pour oil on troubled fires, I asked him to review the chapter containing my critique of the T’s mobile app for commuter rail. (See my video at bit.ly/2Pmg790, and sample chapter download at bit.ly/2Pqwulj.) His response: “Completely agree with the criticism of the current app (and it’s before my time, so I’m free to do so without being defensive).”

Block-Schachter realized that an organization like the T will never be able to develop great software, nor should it be asked to. What it can and should do is enable third parties to write great software. Under his guidance, the T has put all of its data (schedules, routes, stops—everything) online, accessible to any app via RESTful services. The documentation and discussion forum is online at mbta.com/developers.

With these APIs, anyone can develop any kind of app their customers want. An app can display the schedules for bus and commuter rail, updated with real-time vehicle position. Crusaders for improvement could build an app for reporting unsafe conditions or broken equipment—snap a picture, attach GPS coordinates, e-mail it to the repair staff. A local bicycling app could include the current availability of bike lockers at the nearest rail station, or the real-time schedules of busses capable of carrying bikes. The ticketing portion isn’t open to developers yet, but it will be in two years when the T’s plan for cashless operation is implemented.

Block-Schachter and his merry men came to an early class to explain the system to my students, and then to the last class to see the results. The best ones were fabulous, and may well be deployed by the working students.

This project was an excellent match for Xamarin.Forms, which has improved a lot since I last taught it a year ago. For example, it now seamlessly uses .NET Standard 2.0, instead of requiring custom fitting. It crashes less, works better in the debugger, and its display of IntelliSense is better. Your code can also access device features, such as accelerometers, GPS and even cameras in a platform-independent way. It reminds me somewhat of Visual Basic 6. The framework geeks understand the underlying devices and build the components, and the application programmers understand the users and their problems, and assemble these components into useful tools. If you haven’t tried Xamarin.Forms yet, now is the time.

The most difficult part of a killer app, as always, is not coding this piece or that piece, it’s figuring out what ought to be coded to solve the users’ problems. I taught the students as much of this as I could, leading them daily in the chant, “Know Thy User, for He Is Not Thee.” But I could only fit one UX lecture into the crammed schedule. You, my friend, are luckier. You can learn Xamarin UX in a hands-on workshop, working on your own project with my assistance. I’m teaching at the Microsoft NERD center in Cambridge, from Oct. 22-24. You can find information and register at joyfulxamarinapps.com. Be there! Aloha.

David S. Platt teaches programming .NET at Harvard University Extension School and at companies all over the world. He’s the author of 11 programming books, including “Why Software Sucks” (Addison-Wesley Professional, 2006) and “Introducing Microsoft .NET” (Microsoft Press, 2002). Microsoft named him a Software Legend in 2002. He wonders whether he should tape down two of his daughter’s fingers so she learns how to count in octal. You can contact him at rollthunder.com.

Discuss this article in the MSDN Magazine forum