Archive for January, 2008

How many CS major's from oxford each year?

Thursday, January 24th, 2008

Excerpt from the oberon compiler page at oxford: (bold not in original)

At Oxford, we use Oberon as the second language we teach to our undergraduate students (the first one is Haskell). We chose it because of its cleanliness and simplicity, and because of the availability of books that emphasize clear reasoning about programs.

computational geometry rant

Monday, January 14th, 2008

I have my own version of an arrangement creation code (side note: so it is arrangement, not arrangment! cgal is driving me crazy!). This version works iteratively, and as a result very very slowly. But it does work, and I’ve used it quite a lot and know that the output seems ok. I don’t have enough tests and especially enough good tests to qualify that remark furthur. Enter a CGAL based sweep (batch) version which is totally fast and amazing, so what’s the problem? the results look (when displayed) virtually the same, but are different:

my old results: <DCEL: 7045/28416/7165>

new code results:  <DCEL: 7086/28566/7199>

At first I thought this was due to the creation of ~0 length edges due to different underlying numerical types I and CGAL use. That is a different problem I’m yet to handle, but for this particular instance of the computation it wasn’t the problem, as evidenced by this tests:

[he for he in d.edges if he.norm() < 1e-6]

So what’s the problem? I’m not sure. Which code is correct? I’m not sure. How do I check it? I need a set of postconditions, and then just test each. Work I didn’t set out to do. Doh.

p.s. I guess a first test should be for almost zero area faces – which means basically bogus faces. Altough I think there should be none.
p.p.s given n numbers, how do you bin them into m bins in a way that “seems natural”?

Some random text from info (proof that you should read manual pages)

Wednesday, January 2nd, 2008

     Our units of temporal measurement, from seconds on up to months,
are so complicated, asymmetrical and disjunctive so as to make
coherent mental reckoning in time all but impossible.  Indeed, had
some tyrannical god contrived to enslave our minds to time, to
make it all but impossible for us to escape subjection to sodden
routines and unpleasant surprises, he could hardly have done
better than handing down our present system.  It is like a set of
trapezoidal building blocks, with no vertical or horizontal
surfaces, like a language in which the simplest thought demands
ornate constructions, useless particles and lengthy
circumlocutions.  Unlike the more successful patterns of language
and science, which enable us to face experience boldly or at least
level-headedly, our system of temporal calculation silently and
persistently encourages our terror of time.

…  It is as though architects had to measure length in feet,
width in meters and height in ells; as though basic instruction
manuals demanded a knowledge of five different languages.  It is
no wonder then that we often look into our own immediate past or
future, last Tuesday or a week from Sunday, with feelings of
helpless confusion.  …

— Robert Grudin, `Time and the Art of Living’.

It is kinda appropriate, this being my birthday.