Archive for the ‘Programming’ Category

On the importance of pure research

January 14, 2007

I recently finished reading the book Engines of Logic (2000) by Martin Davis (apparently published as The Universal Computer in some countries) of Davis-Putnam SAT-solver algorithm fame, a book about the origins of computer science from the viewpoint of the mathematicians who founded it, in particular: Leibniz, Boole, Frege, Cantor, Hilbert, Godel and Turing.

Leibniz had the notion that it ought to be possible to be able to write down ideas in a language (he called this a universal characteristic) such that “serious men of good will” could sit together to solve some problem by calculation using an algebra of logic he referred to as the calculus ratiocinator.

Despite attempts at such a language and algebra of logic by Leibniz, it was ultimately the work of his successors that gave rise to the logic that made automated computation possible.

Of Leibniz’s work Davis said that “What Leibniz has left us is his dream, but even this dream can fill us with admiration for the power of human speculative thought and serve as a yardstick for judging later developments.”

In the epilogue, Davis had this to say:

The Dukes of Hanover thought they knew what Leibniz should be doing with his time: working on their family history. Too often today, those who provide scientists with the resources necessary for their lives and work try to steer them in directions deemed most likely to provide quick results. This is not only likely to be futile in the short run, but more importantly, by discouraging investigations with no obvious immediate payoff, it shortchanges the future.

These days, universities and it seems, too many aspects of society are becoming shackled to the oft-times short sighted and petty expectations of business, as if it mattered as an end in itself. We would do well to pay attention to history.

On the subject of history, it occurs to me increasingly that most of what we study is in fact historical in nature. Incremental advances in computer science, software engineering,  astronomy, and Science in general are mere blips on the vast landscape of accumulated knowledge. When I read books such as Engines of Logic and The Art of Electronics, I am overwhelmed by the contributions of countless scientists and engineers over decades, to say nothing of the work of the founders of Science such as Copernicus, Galileo, Kepler, Newton, and Einstein.

Kierkegaard and Stroustrup

December 15, 2006

This Lambda the Ultimate post pointed to an interview with the creator of the C++ programming language Bjarne Stroustrup in which he says he was influenced by the 19th century philosopher Soren Kierkegaard. It immediately reminded me of a Kierkegaard quote to which I find myself drawn over and over:

What I need to make up my mind about is what I must do, not what I must know, except insofar as knowledge must precede every action…The vital thing is to find a truth which is truth for me, to find the idea for which I can live and die. Of what use would it be for me to discover a so-called objective truth…if it had no deeper significance for me and my life? (Soren Kierekgaard)

I am still very much in search of this “idea”. I first saw this quote on Julia Watkin’s University of Tasmania website. During the brief time that I knew her, I enjoyed talking with Julia about philosophy and other subjects. Sadly, Julia is no longer with us. I wonder what she would have had to say about Stroustrup’s interview comments re: Kierkegaard?

I went back to Stroustrup’s book, The Design and Evolution of C++ (Addison-Wesley, 1994) to see what he had originally said about Kierkegaard. Here are the relevant excerpts (page 23):

I have a lot of sympathy for the student Euclid reputedly had evicted for asking, “But what is mathematics for?” Similarly, my interest in computers and programming languages is fundamentally pragmatic.

I feel most at home with the empiricists rather than with the idealists…That is, I tend to prefer Aristotle to Plato, Hume to Descartes, and shake my head sadly over Pascal. I find comprehensive “systems” like those of Plato and Kant fascinating, yet fundamentally unsatisfying in that they appear to me dangerously remote from everyday experiences and the essential peculiarities of individuals.

I find Kierkegaard’s almost fanatical concern for the individual and keen psychological insights much more appealing than the grandiose schemes and concern for humanity in the abstract of Hegel or Marx. Respect for groups that doesn’t include respect for individuals of those groups isn’t respect at all. Many C++ design decisions have their roots in my dislike for forcing people to do things in some particular way. In history, some of the worst disasters have been caused by idealists trying to force people into “doing what is good for them.” Such idealism not only leads to suffering among its innocent victims, but also to delusion and corruption of the idealists applying the force. I also find idealists prone to ignore experience and experiment that inconveniently clashes with dogma or theory. Where ideals clash and sometimes even when pundits seem to agree, I prefer to provide support that gives the programmer a choice.

In Julia Watkin’s book Kierkegaard (Geoffrey Chapman, 1997, pages 107-108), she had this to say:

In his use of the Socratic method, Kierkegaard strove to keep his own view to himself through the use of pseudonyms, acting as an “occasion” for people’s discovery and self-discovery instead of setting himself up as a teaching authority or arguing the rightness of his own ideas. I would urge that it is this feature of Kierkegaard’s writing that makes him especially effective in a time when two main tendencies seem to be especially dominant – a pluralism that accepts the validity of all views but stands by the correctness of no particular view of the universe, and a scientific or religious fundamentalism that is rigidly exclusive of views other than its own. Kierkegaard avoids the pitfalls of both trends, and he also does something else; he makes room for truth, both intellectual and existential, through encouraging people to be open-minded, to be aware of the spiritual dimension of existence, and to venture in life as well as in thought.

Although Stroustrup remarked in the interview referred to above that he is “…not particularly fond of Kierkegaard’s religious philosophy”, there is some resonance between his comments and Julia’s analysis.

Embedded Java: Down to the metal

October 18, 2006

In September 2004 I gave a talk to the Adelaide Java User Group (http://ajug.org.au/display/AJUG/AjugAdlMeeting20040920) entitled Embedded Java: Down to the Metal at which I talked about:

The TINI is Java 1.1.6 compatible with respect to the language and libraries, while the Javelin Stamp implements a smaller subset of Java with some deviations (e.g. ints are really shorts, no interfaces, no GC).

At that JUG meeting I demonstrated the Javelin Stamp displaying the temperature from a DS1620 IC on an array of 7-segment LEDs and dumping to System.out, which on the Stamp is a serial port.I mostly use the Javelin Stamp to prototype an application with unfamiliar hardware due to its easy serial-port based progamming and source-level debugging, and because I can write OO code for similar yet slightly different devices (e.g. for 7-segment LED displays that are direct pin to pin, via BCD-to-7-segment IC, or via serial-to-parallel-to-7-segment IC), varying driver code implementation while keeping the interface fixed. It also comes with a nice assortment of Java library code for exploiting the Stamp’s hardware features.

I wasn’t quite ready to demonstrate the DS TINI during the JUG meeting, but have experimented further since. The TINI, like the Javelin Stamp has serial I/O, but in addition, physical interfaces for Ethernet, CAN bus, I2C, DS 1-wire, and iButton. It comes with a similarly rich set of Java libraries (along with the many of the standard Java 1.1.6 libraries including collections and network I/O) for working with its capabilities.

Here’s a link to a simple PLT Scheme (http://www.plt-scheme.org/) servlet (currently unavailable, Jan 2008) that connects to a Java server running on a DS TINI in my home with a DS18S20 temperature IC connected to its 1-wire adapter:

  

http://www.kepler.podzone.net:8080/servlets/david/get_tini_temp.ss 

The TINI is suitable for more ambitious yet relatively resource-low projects. If you want to see even more resource-constrained Java, check out JavaCard for smartcards. I worked on a team that developed a JavaCard VM for a smartcard development and test tool in the late ’90s.Here’s an embedded.com article about some alternatives to C for embedded system development: Java and Ada.

So folks, Java is not just for the desktop or web/Enterprise, but also for the embedded space.

About “Strange Quark’s”…

August 26, 2006

Thanks for visiting Strange Quark’s. In this first post I’ll tell you what I intend to write about and why I chose that name. In the late 80s I ran a “service” called Quark’s Cosmos on Australia’s Viatel, later called Discovery 40, pretty much the same as the UK Prestel (40 column teletext-style) system. The content of Quark’s Cosmos was focused upon astronomical and space mission news.

It was pre-Internet, so news items were distilled from traditional media along with regular snail mail from space agencies such as NASA, ESA, and occasionally NASDA (Japan) and the agencies of other countries such as Russian and India.

A highlight was that I was able to use the forum to provide up-to-date information about Neptune as seen through Voyager 2’s eyes in 1989 because of previous communications with the Tidbinbilla Deep Space Tracking Network near Canberra.

Quark’s Cosmos also had chat boards for these topics plus Sci-Fi and Philosophy along with running the odd astronomical quiz complete with prizes (books usually). Running Quark’s Cosmos was a labour of love and actually cost my wife and I money. Nevertheless, it was fun, rewarding, and appreciated by a lot of people.

With the advent of the Internet, Viatel and Quark’s Cosmos became less compelling. Competing with the richness of the Net became a zero sum game.

Much has changed in the last 20 years, but from a content and presentation perspective, systems like Viatel 40/Discovery and CompuServe were the ancestors of most of what we see on the Internet today. Long before Internet banking was available, Viatel had it for at least one large Australian bank. IRC, ICQ, blogs, all had some counterpart on these systems. The main difference is that the Internet is unbounded, unlike these older systems (and bulletin boards) hence the need for search engines.

I’ve been considering a blog for ages, and wanted to retain the “Quark” theme, but since I and the world in general are stranger than almost 20 years ago, Strange Quark’s place/blog seemed appropriate.

The main topics of interest to me these days are:

  1. Programming paradigms and languages
  2. Low-resource microcontrollers such as PIC, TI MSP430, AVR, 8051
  3. Amateur astronomy (generally sharing the night sky with others, planetary nebulae, the life & work of Johannes Kepler)
  4. Science Fiction books and movies
  5. Philosophy (in particular the Philosophy of Mind)

So, these are the topics I’ll mostly talk about. Anything else will be under clearly different categories. I’m doing this not because blogging is trendy but because I need a writing outlet, and believe I have some worthwhile things to share with others.

Finally, here’s a bit more general background about me:

  • I’m married (I mentioned Karen above) with a 6 year old son Nicholas and a 2 year old girl Heather.
  • I’m a professional developer having worked for Motorola, Freescale, the University of Tasmania, and ISPs (Vision Internet and Internode). Prior to that I was a nurse for the better part of a decade.
  • Several years ago I developed and released the ACE Basic compiler (Amiga) and LittleLisp interpreter (Apple Newton).

My long-standing and slightly antiquated website is at:

http://www.users.on.net/~dbenn

My email address is dbenn@computer.org

Stay tuned for more posts on topics such as:

  • Astronomy and Science podcasts
  • Web-based astronomy software under development
  • Java-based embedded systems
  • TI MSP430F20xx and PIC microcontrollers and rapid development
  • Reflections on personal loss (the odd one out, but something I need to write about).

That’s enough for a first post.