Programming now feels like playing a video game!

62 views
Skip to first unread message

Edward K. Ream

unread,
Jan 18, 2020, 7:07:38 AM1/18/20
to leo-editor
The recent Aha's re the connection between unit testing and coverage testing have turned computer programming into an utterly absorbing adventure. Computer programming now feels like playing a video game!

The analogy is exact!

In a video game, you have more or less clearly defined goals. (In some games the goal is to figure out what the goal is.) To attain those goals, there is a well defined set of actions you must take. In well-crafted games, those actions are pleasurable in themselves, or at least not utterly tedious. There are also a set of obstacles, which make attaining the goals non-trivial. There is also usually a score that measures progress. All these combine to make a computer game it's own little universe.

Likewise with computer programming. You have more or less clearly defined goals. There are also actions, obstacles, and now, with coverage testing, a score. Programming is now it's own structured universe. The goal gets translated to unit tests, which all must pass with 100% coverage.

Summary

Unit tests translate a possibly ill-defined goal into something concrete, specific and well defined. The task is, by definition, complete when all unit tests pass with complete coverage.

Coverage testing allows uncovered code to be discarded when all relevant tests pass. This was a completely unexpected, and most welcome, development.

The entwined tasks of creating unit tests and ensuring complete coverage almost completely structures the task of programming. As a result, programming is more engaging and compelling than ever before.

Folks, this is a big deal.

Edward

Offray Vladimir Luna Cárdenas

unread,
Jan 21, 2020, 12:36:37 PM1/21/20
to leo-e...@googlegroups.com

On a related note, with the recent release of Pharo 8, someone said[1]:

> I'm sure the author of this language uses the IDE like many people feel when they play minecraft. It's a playground of ideas for those who really love OOP.

[1] https://www.reddit.com/r/programming/comments/erd65s/pharo_80_the_immersive_pure_object_oriented/ff3cgl6/

For me, live coding has been part of bringing back this playful feeling to programming. Something difficult to experiment with the indirection of editing files approach of most computing programs and environments, except for the Jupyter alike interactive notebooks, but the difference is the moldability, uniformity and simplicity of Pharo live coding experience over other interactive notebooks languages.

Cheers,

Offray

--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/28875ae4-d8b6-46fe-8b30-13557bf8eaae%40googlegroups.com.

john lunzer

unread,
Jan 23, 2020, 7:51:42 AM1/23/20
to leo-editor
Not quite exact. The precise and important difference is that in almost all video games somebody else has written the unit and coverage tests for you. Writing the tests and coverage yourself would be akin to setting your own goals which is rare in video games. 

If the goal is to make programming more video game like you may have exposed a worthy programming pattern: write tests, but not for yourself; and write code, but not to pass tests you've written. This could be done in pairs or in a larger group. In fact I can see how this could also make writing tests for existing code more fun as there would be a challenge in finding holes in other people's code.

Edward K. Ream

unread,
Jan 23, 2020, 8:18:32 AM1/23/20
to leo-editor
On Thu, Jan 23, 2020 at 7:51 AM john lunzer <lun...@gmail.com> wrote:
Not quite exact. The precise and important difference is that in almost all video games somebody else has written the unit and coverage tests for you. Writing the tests and coverage yourself would be akin to setting your own goals which is rare in video games. 

To me, it feels like I have a guide who is always looking over my shoulders.

If the goal is to make programming more video game like you may have exposed a worthy programming pattern: write tests, but not for yourself; and write code, but not to pass tests you've written. This could be done in pairs or in a larger group. In fact I can see how this could also make writing tests for existing code more fun as there would be a challenge in finding holes in other people's code.

I like the pattern you propose. However, making programming more like a video game is not my goal. I was only explaining why programming feels even more immersive.

Edward
Reply all
Reply to author
Forward
0 new messages