Posts filed under 'programming'

practice of programming

Not much new to tell. Have been reading a few chapter thus far in Kernighan & Pike, The Practice of Programming, which is a very good introduction to, well, programming. Very basic concepts, most of which I already knew, but very well laid out and good to sharpen my skills. I’m anxious to spend some time doing their exercises, but without a computer at home that will have to wait, I suppose.

Their somewhat silly example of a random text generator made me think about how to implement some code that reads the news and then runs some kind of factor analysis to group articles. So that might well be my next coding project - something different from online games (just read an extensive blog which convincingly argues how dangerous those games can be) and even kind of related to my studies.

Also discovered that Neoware is going to sell a thin client laptop. This means a laptop without harddisk, so that the prime use is through networking, including remote desktops and SSH. Cool idea, were it not that it does not actually lead to a cheaper laptop - they still charge $800.

Add comment October 19th, 2006

some books and kaya

In relation to a query by an client, I had to look up a bit of information about memory management. There is a very interesting page on Unix and C/C++ Runtime Memory Management (I read up to here) and Micah Altman gave an interesting presentation on the subject.

Earlier today I have to go to the library in the applied sciences faculty and there were several seemingly very cool books. One was by Bill Blunden, Virtual Machine Design and Implementation in C/C++, about the design of the HEC virtual machine. Seems intruiging, although a lot of plain code instead of text. Another book was called Computer Arithmetic, by Parhami, about the real nitty-gritty details of the algorithms and circuit designs used for processors to do arithmetic.

Last night I looked at some presentations about Ruby on Rails. It’s intruiging - about three lines of code to have a complete online form linked to a database etc. It just basically automates an enormous amount of coding between the SQL database and the webpage to maintain it. Useful for many applications, I think, but not really for online game design. It feels like giving up a little bit too much control, though, but that’s just a feeling ;) .

I also spent a tiny bit more time on Kaya, trying to see how the webprog library works. It’s badly documented and the tutorial is outdated, but the source code of the library is simple enough to figure out what to do. I miss syntax highlighting in Emacs, though! The webprog part makes it quite easy to write proper webpages in Kaya code without being too much bugged down by HTML syntax, which is nice. Here’s the tiny sample program I tried:

webprog webhello;
import Webprog;
import HTMLDocument;

HTMLDocument webmain()
{
doc = HTMLDocument::new(HTML4Strict, "Test webpage");
blog = addDivision(doc.body, "My blog", "blog");
return doc;
}

Which, after very slow compiling, produces:

Content-type: text/html; charset=UTF-8
My blog

In other words, I did not have to worry about any HTML syntax, and I can determine all layout issues with CSS by simply using the

Maybe I really should consider working on an Emacs environment for Kaya and a GeSHi language file to make the above sourcecode look nice!

Add comment October 12th, 2006

kaya, cantr, and learning how to program

On Friday morning I saw a link to the intruiging but utterly useless Whitespace programming language, which in turn refers to the language in development Kaya. Kaya looks pretty cool. It’s based on Haskell, which I don’t really know, and thus not object-oriented but functional language. They call it a scripting language, but it’s really more a general programming language, I think. It has many features geared towards server-side web development and it has nice quirky features I didn’t know before. It is a clear attempt to keep the language simple but take good things from many languages. The community on the mailinglist is also very friendly.

But then, I spent hours and hours - well, doing other stuff in between - trying to get the Kaya compiler to compile and run. I missed all major libraries it uses - probably a sign of how outdated our Cantr II server is, which is a bit of a worry. Eventually it worked (this RPM search engine was invaluable), but then I get compiler errors on the most basic tutorial examples. And the documentation, except for one non-exhaustive tutorial, is practically non-existant. So it’s both cool to see a language in it’s very early yet promising stage of development, but it’s also clearly risky to use it on a bigger scale.

Then Monday and Tuesday this week were almost entirely spent on server management. For unknown reasons, the server had rebooted on Monday morning, and we had the wrong mysql server version in the boot script, resulting in all kinds of SQL errors about corrupted and missing data. It took hours before we figured out what happened and then quite some time to get it all back up and running. And from out of shock we finally set up proper automatic daily backups for the database … which I see now didn’t actually work.

I really want to make it a project to simplify things in the next few months. Clean up the server and remove obsolete stuff; clean up the Cantr organisation and remove unnecessary elements; clean up the Cantr game design and remove unnecessary features.

I just read an interesting blog with an interview of some of the most prominent programmers, including the designers of C++, Linux, Ruby, Python, etc. Very interesting. Especially the sections on what books they recommend. Linus Torvalds and Bjarne Stroustrup both recommend Kernighan & Ritchie, The C Programming Language. Linus goes on recommending Patterson & Hennessy, Computer Architecture: A Quantitative Approach and Crawford & Gelsinger, Programming the 80386. David Heinemeier Hansson recommends Beck & Andres, Extreme Programming Explained and Peter Norvig suggests Abelson & Sussman, Structure and Interpretation of Computer Programs. Finally, both James Gosling and Tim Bray suggest Programming Pearls by Jon Bentley.

Through this interview I also just found the Dojo Toolkit which is somewhat similar to Google’s Web Toolkit, but both more advanced and in a more premature state (that is, some of the examples don’t seem to work on my computer). Interesting drag-n-drop features.

Note to myself: I really need to figure out what Ruby on Rails is all about …

Add comment October 11th, 2006

Next Posts


Calendar

November 2008
M T W T F S S
« Oct    
 12
3456789
10111213141516
17181920212223
24252627282930

Posts by Month

Posts by Category