$(whoami) Times

Not a diary, no smalltalk and hopefully not a waste of your time.

Monday, 20 April 2009

Education looks deeply misunderstood (1)

Pondering on my activity at the university, I started thinking about how well the current academic system of education fulfills its goals. And I got the feeling something is wrong not just with my university, but with the whole established practice of teaching.

First of all, let's take a look at lectures, which are a core part of teaching these days and perhaps the most well known from outside. Lectures entail the students recieving information from a teacher in an oral fashion, and they last for 2 or 3 hours at my university. Most teachers will tell you lectures are very important in the learning process. They might be, but are they optimal?

In the past, the main role of lecturers was to transmit the raw information to the students. There were no or few books, and written material was expensive. As expected, this process is time-consuming. However, those times are long gone and written material is widely available at the moment, and at virtually no cost of duplication if we think about digital content. Still, this practice continued to exist and even remain widespread even today.

However, teachers insist that their activity positively benefits the students significantly more than written material. Their arguments usually refer to the explanations that the speaker can give to the attendants. Other arguments discuss the non-informational benefits of lectures, e.g. a charming speaker can motivate the audience. But these arguments fail in several ways, and here is the rebuttal:
  • Lectures are mainly a form of one-way communication. Therefore most of the teacher's explaining is no more than raw information and thus can be stored on some media, unless yet unrecordable sensations are involved (smell, touch etc.).
  • There's no evidence or compelling argument as to why the information is better conveyed orally rather than stored. Even if we suppose plain paper cannot store it suitably, there are still other means of storing it, like audio and video recordings.
  • Lectures are actually unsuited for transmitting raw information. A mistake in a book is more readily seen and corrected timely. A book can also be browsed and a sentence may be read again if percieved incompletely. None of these are true for oral presentations.
  • Any explanation that the teacher may give, if not stored on paper by the student, can be forgotten later on.
  • While in most cases, at least in my experience, interruptions are permitted or welcome (even at random moments), students can hardly even know all the questions they need answers to during the lecture itself, as it is only a first, quick pass through the learning material.
  • It is unreasonable to expect that the student will have learned anything more by attending a lecture rather than by going through a suitably recorded material at his own pace. In fact, the effect is quite the opposite and, moreover, the student is only under a false impression he learned more by attending.
  • The motivating factor is only secondary, and there's little use to argue for motivation not related to the subject itself, at least in an academic setting.
It can easily be seen that lectures themselves are most likely a huge waste of time in comparison to other means of conveying information, and that they can even have negative secondary effects. And it does not end here, as relying on such courses entails other problems, all somewhat related to each other:
  • Lectures are inefficient time-wise and so information tends to get overly compressed.
  • There's little room for additional explanations, material overviews and miscellaneous and motivating information (examples of real-world application, connections to other areas of study and so on).
  • Written materials and textbooks, where present, are often neglected.
  • The bibliography is also neglected and does not follow the object of the course.
  • Teachers often do not publish specifically what information pertains to the exam outside of the lecture.
Even lectures taking the form of slide-show presentations have shortcomings. These might look like a more modern approach, but nevertheless fails to be the teaching instrument of choice. Just as was the case before, every information in addition to the actual written material that the speaker conveys to the audience can be forgotten or altered.

Don't get me wrong... In both these cases, classic lectures and slide-shows, such presentations can be wonderful social events. The latter kind can constitute effective tools to promote or raise awareness about different subjects.

But students in an academic setting are supposed to be active learners, not just passive targets. Furthermore, no matter how much teachers try or how good they are, they can't substitute themselves for the student's actual effort. And such effort can at most be directed and corrected, so this is where teachers actually provide benefits.

I believe textbooks should be the primary focus of pedagogical effort, along with two-way communication having a supporting role. In a future post, I'll talk about other related problems and sum up what university teaching should be like in my opinion.

Thursday, 11 December 2008

Excluding own traffic from Analytics

Playing with Google Analytics (GA) on this blog, I wanted to exclude my own traffic from reports. GA help suggests creating and visiting a page which adds a cookie, and then filtering all traffic from those sources. However, I found this method awkward to apply on blogger.com. Here's an alternative way to exclude your own traffic if you use Firefox on Linux (although it should work equally well on Windows or other operating systems).

First close Firefox. Install sqlite (I used version 3.5.9), then go into your Firefox profile directory. Now do the following, replacing 'blogname' so that the resulting URL corresponds to your blogger.com blog:
$ sqlite3 cookies.sqlite
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> select * from moz_cookies where host = ".blogname.blogspot.com";
You should see entries for 3 cookies. Copy the invariant number from the third column, e.g. if it is XXXXX.blah, where XXXXX is the same for all entries, remember XXXXX. Copy the seventh column, let it be YYYYY. Now compute a date a few years in the future, perhaps in another terminal:
$ date -d "2012-01-01" +%s
1325368800
Let this rezult be ZZZZZ. Let's forge a cookie now:
sqlite> insert into moz_cookies (name, value, host, path, expiry, lastAccessed, isSecure, isHttpOnly) values ('__utmv', 'XXXXX.forgetaboutme', '.blogname.blogspot.com', '/', ZZZZZ, YYYYY, 0, 0);
sqlite> .quit
Of course, replace blogname, XXXXX, YYYYY and ZZZZZ with relevant values. Now you can go and do what GA helps suggests to set up a filter to exclude traffic from sources with the user-defined value 'forgetaboutme'. And you could check within Firefox if the cookie is indeed as it should.

Yeah, I'm not sure if all that stuff needs to be duplicated in the forged cookie. I tried to keep the forged cookie as close to the others as possible, format-wise. I got a hint about that '__utmv' while browsing GA help and user questions.

[Fixed a mistake.]

Learning Haskell, part 2

Last time I left you with an example of what Haskell looks like. The purpose of the program is to do numerical integration. I wish to take that example and comment on it, so that the reader can see how distinct is programming in Haskell.

1 | import Data.List

2 | integrate :: (Double -> Double) -> Double -> Double -> Double -> Double
3 | integrate (func) a b stepsize =
4 | let
5 | steppair :: Int -> (Double, Double)
6 | steppair n = (a + stepsize * fromIntegral n,
7 | a + stepsize * (fromIntegral n + 1))
8 | num_steps :: Int
9 | num_steps = floor ((b - a) / stepsize)
10 | pairs = [steppair n | n<-[0..num_steps]]
11 | in
12 | foldl' (+) 0 (map (stepint func) pairs)

13 | stepint :: (Double -> Double) -> (Double, Double) -> Double
14 | stepint (func) (x, y) = (func x) * (y - x)

15 | main = print (integrate sin 0 1 0.001)
Line number 2 defines the type of the 'integrate' function. It may not be obvious how it works. In fact, this is the curried form: currying takes a function (A x B) -> C and transforms it into an equivalent function A -> (B -> C). The first function takes 2 arguments (in fact a pair) and outputs one value. The second takes one argument and outputs a function that takes one argument and returns a value. Currying is especially useful because one can do partial applications, e.g. you can use 'integrate sin' to determine the integral of sine over different intervals, without explicitly specifying 'sin' at every step. Furthermore, currying allows any function to be described by lambda calculus (which I won't discuss here).

Next, we actually define how 'integrate' behaves. Lines 5 through 10 define a list of pairs which we use to break down the interval of integration. Line 12 defines 'integrate' as the sum of products given by 'stepint' defined below. 'map' takes the list 'pairs' and applies 'stepint func' (an example of partial application) to each element of that list, that is, to all subintervals. The result is summed up by 'foldl'': it recursively applies operator + (addition) left-associatively to what 'map' returned (a list), with an initial value of zero. For example, given suitable parameters, this would result in:

((((stepint sin 0 1) + (stepint sin 1 2)) + (stepint sin 2 3)) + (stepint sin 3 4))
The rest of the program is quite self-explanatory. I hope this explanation will spark some interest in Haskell and in pure functional programming, which is quite a neat way of accomplishing things.

Saturday, 6 December 2008

Learning Haskell

I don't easily entertain in learning new programming languages, but Haskell did make a good impression to me, mostly due to its unusual (but nevertheless useful) properties. Having heard about it a few times (Pekka's blog is one such source) and after reading the Wikipedia article, I decided to give it a try. So I engaged in cowboy learning (akin to cowboy coding :D) Haskell, combining guides with reference manuals and other sources of information, like IRC channels.

Haskell is a pure functional language. In contrast to imperative languages, such as C and all the others you're probably familiar with, things get done very differently. First, once you assigned a value or expression to a variable, you can't change it. Secondly, all the programmer does is express all computations in terms of functions and equations, just like in mathematics. Generally, there is no sequential execution of statements (although Haskell provides monads to express such behavior). It features lots of mathematical computer science constructs, such as lambda calculus, structures from abstract algebra and currying, and declaration of infinite objects (like infinite lists) is allowed. Here's a short example showing how easy it is to compute Fibonacci numbers:

fib :: Int -> Int
fib 0 = 1
fib 1 = 1
fib n = fib(n - 1) + fib(n - 2)

Calling fib n will compute the nth Fibonacci number. The algorithm looks just like the mathematical definition.

Haskell programmers claim that code which compiles most often runs without problems, since the coding process involves a different way of thinking the problem than in the case of imperative languages. Of course, there are drawbacks. Haskell's unusual properties, like lazy evaluation, often make for slower executable code and harder debugging. Moreover, Haskell is percieved as hard to learn. Nevertheless, large applications have been written in Haskell: Darcs (a SCM) and House (an operating system) are a few examples.

I'll leave you with a more thorough demonstration of what Haskell tastes like:

import Data.List

integrate :: (Double -> Double) -> Double -> Double -> Double -> Double
integrate (func) a b stepsize =
let
steppair :: Int -> (Double, Double)
steppair n = (a + stepsize * fromIntegral n,
a + stepsize * (fromIntegral n + 1))
num_steps :: Int
num_steps = floor ((b - a) / stepsize)
pairs = [steppair n | n<-[0..num_steps]]
in
foldl' (+) 0 (map (stepint func) pairs)

stepint :: (Double -> Double) -> (Double, Double) -> Double
stepint (func) (x, y) = (func x) * (y - x)

main = print (integrate sin 0 1 0.001)

Tuesday, 2 December 2008

Latvia goes after critics of banking

[Sources: Mises Economics Blog citing The Wall Street Journal]

The Latvian state attempts to suppress those who express concern about the banking system. Action has already been taken against individuals. It seems they're ready to back up by any means the system they've put in place and supported through legal measures. Deposit guarantees and lender-of-last-resort laws are not enough to keep this going, so they moved on to breaching the free speech rights. The state helps fractional-reserve banks, fractional-reserve banks help the state... what could be more romantic?

Well, but this is just one of the measures proposed or taken worldwide in the attempt to protect this flawed banking system. Here in Romania, the Romanian Banks Association (ARB) proposed criminal punishment for those that speak against banks (Romanian article here). A fragile systems is held in place by sheer force.

So much for the state acting in the interest of the people (or at least a majority); it seems it's acting in its own interest, and in the interest of fractional-reserve banks. Surely they don't mind about people losing their deposits, but they're really concerned about the possibility of having fractional-banking collapse totally. If this were to happen, two things would disappear: the opportunity banks have to make huge profits by resting upon state-given privileges, and one of the state's primary ways of inflating the money supply. And probably along with it so would the fiat money disappear or at least lose credibility, as almost was the case in some parts of US during the 30s' economic crisis.

Monday, 1 December 2008

Against nationalism

Today, 1st of December, is the national day of Romania. It is an occasion for Romanian nationalists to celebrate their ideals. Nationalism is a feeling that unites people of the same nation and culture. It is a concept different than patriotism, which generally does not restricts itself to a country's borders.

Nationalism is seen as a virtue by many people. In the context of foreign tolerance, it's much like religion: every nationalist can tolerate nationalists belonging to a different country, but lack of nationalism is frowned upon, just like atheism. In what follows, I'll attempt to explain the fallacies and consequences of nationalism.

Aside from the natural language and cultural barriers, there are other promoters of nationalism. This feeling has been instilled for centuries by lords, kings and cheiftans. It helped them rally people for defending the state's sovereignty: "Come and fight for your lands and our country!". It's true that the aggresors would've been less tolerant of the victim country's culture and people. But nevertheless, nationalism has also been used by these aggresors: "Come and let us conquer other lands and further our fortunes!". Often, soldiers of the attacking side have been killed in the process, so my question is: what good has this done to individuals? If you answer that those that remained alive and well have profited, well, this is nothing more than a game of chance: "Let's draw the straws and whoever loses shall be killed and his fortune be given to the survivors!". Who can argue for the morality of a thing equivalent to such a game of chances? Wars are very costly, both in terms of resources and lives lost. The fact is that most cheiftans don't lead wars with their own resources: taxation and/or involuntary draft are used very often. The ordinary man's mental comfort is achieved by embracing nationalism, because the immorality of such actions is suddenly masked and abstracted by "higher, noble purposes". I believe this is no better than sports-related hooliganism.

Apart from war-related action, nationalism is furthered by other state interests. Taxes are an example of a wrongdoing transformed into a virtue, or rather a duty, of every citizen. Refusing to participate towards furthering the country's ideals is often seen as wrong, irrespective of how the state treats the citizens. Seccession is regarded as theft and sovereignty goes above property. This is because people like to be part of a group. Even when a person is cast out by those close to him and no one wishes to acknowledge his membership to any social group, he can still find comfort in the thought that he's part of a nation. The nation is always an open group that anyone joins by birth without discrimination. How can one feel so close to a large group whose members he mostly (99.9%) does not know? And sometimes it is the case that he despises most of them individually.

As I see it, nationalism supports many harmful ideologies. It does it by suppressing other concepts, such as individualism, self-ownership and freedom. It justifies statist socialism, the mob rule of democracy and interventionism in all its forms. States support nationalism, for it transforms fear of aggression into feelings of duty towards it. And so nationalism provides gut arguments against anti-statism and liberation movements: "You're either with us or against us!".

The moral of this post? Restrict nationalism to strict utilitarian purposes. It's natural to feel close to a city you know, a native language you speak or such things. It's okay to feel proud you're a member of the most free community there is. But it's not normal to feel like you have a duty to your country. Go for cultural globalism, since you're more likely to meet people with similar ideas in a larger group: the world.

Sunday, 30 November 2008

Yo Frankie! Apricot is here.

Yo Frankie!, codenamed Apricot, arrived a couple of days ago at my doorstep. It's an open-source and open-content game made by Blender Foundation. I supported its development by pre-ordering it around the beginning of February this year (check my name in the Crystal Space credits within the game :D). Being part of the open-content series that includes Elephants Dream (codename Orange) and Big Buck Bunny (codename Peach), they finished working on it a few weeks ago. You can download it from the project's site, along with the GPL'ed source code and CC-BY'ed models if you wish.

What's the purpose of this project? Simply put, it intends to show the game industry that it's possible to develop games using only open-source tools, in this case Blender (3D modeller, engine and scripting) and Crystal Space (engine). A lot of effort was put into extending these two tools to provide the functionality needed for developing high-quality games. In other words, the game itself is only a part of the whole, a demonstration of what can be done.


You probably want to hear more about it. The player controls Frankie from a 3rd person point of view, who can walk, run, jump, climb ledges, grab and carry animals and fight enemies. The objective, at least for the main level, is to reach a certain endpoint. During the journey, you'll encounter different natural obstacles and enemies. For example, in order to cross a river, you can grab and throw a sheep into the water, jump on it and then on the other side. Or you can run up curved walls fast enough to defeat gravity for a while. The Blender Game Engine (BGE) version [in the picture above] contains a few levels which you can play and it's easier to code/script for. In contrast, the Crystal Space (CS) version has only one level, has no menus, but provides greater potential for high-end graphics, as far as I can tell. In conclusion, the game is playable, looks (and sounds) quite nice and very original, but don't expect Apricot to be a complete game.

However, Blender Foundation made it possible to have a very strong starting point for high-quality games. Hopefully, more artists would contribute to this project and make a great game out of it.

In any case, go on and try the game, you'll have fun.

[Because somebody asked, Apricot is available for Windows, Linux and Mac OS (both PPC and Intel).]