Monthly Archive for September, 2009

Programming exercise: maximum value in integer array, part 1

[Permalink]

This exercise is just a little bit more substantial than the last one — but not by very much. Given an array of \(n\) non-negative integers, find the maximum value in the array, or return \(-1\) if the array is empty. Obviously, the use of any built-in maximum-finding function is forbidden. While the problem is almost trivial, it does illustrate how each language works with array or vector data types, as well as how it handles iteration.

This exercise, like some of the other ones that I will also be going through, is from the book Programming Interviews Exposed by John Mongan and Noah Suojanen[1]… » [Expand post] [Permalink]

0 Comments

Programming exercise: Hello, world!

[Permalink]

As a preliminary exercise to jog my memory, here is the obligatory “Hello, world!” program in a variety of languages. On the one hand, the programs do nothing except output a string, and so don’t illustrate very much about the respective languages. On the other hand, the simplicity of the task does illustrate the difference between languages that allow you to begin coding right away versus those that require a considerable amount of setting up (importing libraries, declaring classes, etc.) before you even have a functioning program… » [Expand post] [Permalink]

0 Comments

Programming exercises and comparison of programming languages

[Permalink]

I started programming when I was eight years old. The first programming language I learned was Basic, followed very shortly by C and 8086 assembly language. During elementary school, I was also exposed to Pascal and Logo. I ignored Pascal because it seemed to me that anything I could do in it I could already do with C, and although I had some fun with Logo’s turtle graphics, I didn’t take it very seriously. At the time, I didn’t appreciate its connection with Lisp and other “serious” programming languages… » [Expand post] [Permalink]

0 Comments

My nerd scores

[Permalink]

Someone asked me to take the “nerd tests”, and these were my results… » [Expand post] [Permalink]

No related posts.

0 Comments

Fixing the site’s appearance in Internet Explorer

[Permalink]

I just spent the day in the library, where I used Internet Explorer on a public terminal. I knew that IE did not render CSS properly, but until I tried to use this web site for several hours in IE, I had no idea how bad things were. I’ve hacked the CSS so that it displays reasonably well in IE now. I hope this didn’t mess things up for other browsers. Grr… » [Expand post] [Permalink]

No related posts.

0 Comments

Two popular books on fuzzy logic

[Permalink]

These are two popular books on fuzzy logic: Bart Kosko’s Fuzzy Thinking: The New Science of Fuzzy Logic, and Daniel McNeill and Paul Freiberger’s Fuzzy Logic.

Fuzzy logic was pioneered by Dr. Lotfi Zadeh, whom I met when he gave a lecture at the University of Toronto… » [Expand post] [Permalink]

If you like this post, you might also like:

  1. Two popular books on the human genome
0 Comments

365 Ways to Kiss Your Love by Tomima Edmark

[Permalink]

This was a gift from my ex-girlfriend while we were still dating. The lip print on the transparent card is actually hers, and the silk handkerchief is what the book was wrapped in when she gave it to me.

It was a very thoughtful and romantic gift… » [Expand post] [Permalink]

No related posts.

0 Comments

Funk & Wagnalls Canadian College Dictionary

[Permalink]

I had actually obtained this book shortly after arriving in Canada at the age of eight. I think it was either a gift or a hand-me-down, but I don’t remember exactly how I got it… » [Expand post] [Permalink]

No related posts.

0 Comments

Object Oriented Turing

[Permalink]

I suppose that this post is a continuation of the one on old software and books.

The Turing programming language (named after Alan Turing) was developed at the University of Toronto as an introductory language for teaching computer programming at the high school level. It was (and apparently still is) widely used in Ontario… » [Expand post] [Permalink]

0 Comments

Hamlet as a word cloud

[Permalink]

Hamlet word cloud

This is the text of Shakespeare’s play, Hamlet, as a word cloud… » [Expand post] [Permalink]

No related posts.

0 Comments