Aharoni in Unicode, ya mama

Treacle tarts for great justice

Archive for the ‘education’ Category

Kas buvo tai nebus

Posted by aharoni on 2009-05-14

In the last couple of years i fell in love with Israeli literature, especially poetry – from Y. L. Gordon, H. N. Bialik and S. Chernihovski, through N. Alterman and J. Amihay all the way to the present days’ M. Arad and D. Manor. Because of this – among some other things – i decided to study for a minor degree in Hebrew and not in Chinese.

In school i learned about Israel’s poetry like this: There was a literature teacher. We started to study Bialik. She said: “There are common meters – amphibrach, anapaest, iambus, dactyl, and so on, and according to the program you are supposed to study them now, but it is hard for you, and i am not in the mood, so we won’t do it.” She hardly even mentioned Chernihovsky, Shlonsky, Alterman and Avidan – they are, according to her, also “hard, and you can do fine without them”. And so i received the reasonable 75 grade in the matriculation exam in literature in an Israeli high school, but in fact hardly studied any Hebrew literature at all, and for nearly ten years after the school didn’t read a single Israeli book, and not much foreign ones, either.

So now i am replenishing this. At the university i was quickly taught the basics of poetic meters and devices, and suddenly realized what a terrible crime that teacher committed. Without understanding these mostly simple rules it is very hard to read poetry. And he who learns them a little, becomes more educated and opens for himself a new exciting world.


The complete collected works of David Avidan are being released these days. I saw the book in the shop and thought – to buy or not buy? Previously, Avidan seemed very hard for me. I looked through a few pages and understood – now i’ll be able to enjoy it. I looked at the table of contents and all of a sudden saw a title of a poem in Latin letters, and not in English – “Kas buvo tai nebus”. It seemed familiar, i thought that it was Latin, but no, obviously not Latin. And after a moment i realized that it was in Lithuanian: “What was, shall not be”. Here is an attempt in translation:

Two Lithuanians, remembering their mother tongue
Less than they remember
Their mother, meet in a cool evening
In an open coffee house and begin
Remembering. How does one say
The past in Lithuanian? Really, how does one say
The past in Lithuanian? Very awkward, indeed
Very uncomfortable. Maybe there is
Someone here in this nice environment, within a radius of a
Kilometer or two who will be able to fix
This depressing linguistic short circuit? But
The time is very late, and all
The Lithuanians, who arentdeadyet are already asleep.

How does one say sleep in Lithuanian?

1964

(The poem may have been already translated into English, maybe even by Avidan himself. As for “arentdeadyet” – Avidan often stuck words together as a literary device.)

I don’t know what prompted Avidan to write such an unusual poem. Lithuanians, as far as i know, preserved their language much better than did most peoples of the USSR. But perhaps he spoke of the Lithuanians in America or in Israel.

But i bought the book, of course.

Posted in Israel, education, literature, poetry | Tagged: | 3 Comments »

Regular expressions

Posted by aharoni on 2009-04-06

I love regular expressions. I cannot live without regular expressions. I cannot understand how people can go on with their lives without using at least one regular expression every couple of hours. I don’t understand why schools teach algebra instead of regular expressions. I didn’t use any algebra in my life, ever. I used a lot of regular expressions and it is not less mathematical.

Posted in Perl, education, philosophy, programming | Leave a Comment »

is perl still worth learning

Posted by aharoni on 2008-01-17

Someone entered “is perl still worth learning” into a search engine and found my blog.

The answer is Yes.

Python and Ruby are not inherently bad, but Perl is at least as useful and modern as them, it has – arguably – a wonderful community of programmers, it has an amazing library of reusable modules called CPAN.

My wife Hadar is starting serious work on her PhD in physics in the Technion. The guys in the lab in which she will be working wrote some calculations software in Fortran on Windows. The first thing that Hadar is doing is deciphering this Fortran code. She asked me for some help, and i couldn’t provide much, because i don’t really know Fortran. I suggested that she will advise those lab guys to consider porting their software, at least for the future, to Perl, because it is portable and because it is quite possible that it has the same capabilities for mathematical and scientific work as Fortran has. She told it to one of the researchers there and he replied that it should not be done, because “Perl is just a language for network servers.”

Saying that “Perl is just a language for network servers” is pretty much like saying that all Russian women are prostitutes. It’s a sad and silly prejudice. Here’s an article that dispels it: Ten Perl Myths.

So Hadar learned a little Perl and PDL – the Perl library for advanced mathematics. She picked up the basics very quickly. I was pleasantly surprised that she found that Perl’s main data types are scalars ($drug = 'caffeine') and arrays (@drugs = ('marijuana', 'quaalude', 'paracetamol')), because in math it works the same way (we didn’t discuss hashes yet). I was even more surprised to learn that it seemed perfectly fine to her that @drugs is an array, but to access ‘quaalude’ you need to write $drugs[2] and not @drugs[2]. We tried searching CPAN for various mathematical functions, such as eigenvalue, matrix diagonal and linear algebra, and found everything.

So she’s gonna try that.

If she can’t convince them to migrate to Perl, i’ll have to learn Fortran and try to help them migrate from a Windows version of Fortran to GNU Fortran.

Posted in Free Software, Perl, education, programming | Tagged: | 3 Comments »

Binary

Posted by aharoni on 2008-01-09

I program for living, but i’ve never received proper formal education in serious algorithms.

Here’s a very simple problem: Take an array of length n and fill it with zeros. Every array member represents a binary digit. Now, using this array and not using the usual math for binary conversion, print all binary digits from zero to the maximum binary number with n digits. For example, with n == 3 this should be printed:

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Here’s what i wrote. Is it OK or is it an embarrassment?

use strict;
use warnings;

# That's right, upgrade to Perl 5.10.
# If you can't, comment out this line.
use 5.010;

my $digits = $ARGV[0] // 3;

# /If you don't have Perl 5.10, use this:
# my $digits = defined $ARGV[0] ? $ARGV[0] : 3;

my @matrix = ();
my @number = map { 0 } (1 .. $digits);
my $last = 0;

NUMBER:
while (not $last) {
    push @matrix, [ @number ];

    my $digit_index = $digits;
    DIGIT:
    while ($digit_index) {
        $digit_index--;
        $last = 1;

        if ($number[$digit_index]) {
            $number[$digit_index] = 0;
        }
        else {
            $last = 0;
            $number[$digit_index] = 1;
          next NUMBER;
        }
    }
}

foreach my $number (@matrix) {
    print "@{$number}\n";
}

Oh (edit): The real embarrassment – in WordPress the sourcecode presentation cannot display Perl properly. But if i put ‘ruby’ instead of ‘perl’ in the language attribute, it works mostly fine …

Posted in Perl, education, programming | Tagged: , | Leave a Comment »

I Gotta Move

Posted by aharoni on 2007-08-01

Oh no.

He came from my home town
He was a prophet
Some kids they put him in the ground
Got coffee
Got donuts
Got wasted
Erased head
And what do they say?
He’s not afraid of the present tense
And talking back is a bad defense
I gotta move
I gotta break
I gotta get me cross the lake
I gotta move

Bother.

Posted in Israel, Tel-Aviv, education, job hunt, marriage, me, music, physics, poetry, reform, university | Tagged: , , , , | 3 Comments »

Blaise P.

Posted by aharoni on 2007-04-12

This is not a “People speaking” entry. And, hopefully, not a self-indulgent bragging entry.

— “Amir, did you learn Visual Basic .NET in the university?”

— “No. I learned VB.NET here, at this project that i’m doing now.”

— “And where did you study the old Visual Basic?”

— “I wrote many macros for Microsoft Word and Excel in Visual Basic.”

— “And C#?”

— “I learned C# at this project too.”

— “I want to learn C#. And C++. C# is just a new version of C++, right?”

— “Not exactly – they are different languages, but they are in the same family and their basic syntax is very similar.”

— “And is VB.NET a new version of the old Visual Basic?”

— “Yes, but Microsoft made a lot of changes in the syntax of the advanced parts, such as types, classes, objects, inheritance, controls, and stuff like that.”

— “Oh, yeah … That’s exactly the part that I don’t understand at all. I guess that I should learn it.”

If you are not a programmer, “that part” is called “Object-Oriented Programming”, OOP for short, and it is one of the most important concepts in the world of software since the late 1980’s.

At this point in the conversation i suddenly realized that i have never studied Object-Oriented Programming. I also realized that the biggest programming project that i’ve ever done all by myself was in high school. It was a project for which i received a bonus grade in my final school certificate (“bagrut”). Functionally it was a database of pupils in extra-curricular school activities.

Technically it was a pretty big Pascal program. I don’t remember how many lines of code it had, but i guess that there were at least a few thousands; i did have to break it up to several files (“modules”). It had a DOS’ish text based menu interface – almost a GUI, written using the wonderful Turbo Vision library, which apparently still exists today as free software.

To use Turbo Vision i had to learn Object-Oriented Programming and most of the concepts of Software Design and even System Analysis. I studied using books, completely by myself (except the stupid DFD diagrams, which looked hard, so i got some help from my high school Computers teacher; but he admitted at some point that they seem hard mostly because they are not so useful and allowed me to omit them from the project).

Now here’s the scary part: A year later i studied OOP at Programming Course in IDF. I’m not sure that i would understand it as well – if at all – had i not learned it earlier from a book.

And this is the point – for me self-study from books is nearly always better than classes.

In a class i feel that being there is enough. I mean come on! I woke up early, i went all the way to the school, i sat there for hours – what else do i have to do? Homework? Self-study?? I studied OOP from a book for the fun of it when i was sixteen. I am absolutely sure that i would understand it just as well if i would read it when i was nine.

When i am thinking about it this way, it seems that dragging children from the age of six all the way to to eighteen through all those classes in school is terrible dictatorship. It seems that it is done for a good cause, but it seems disastrously ineffective and possibly destructive.

But maybe that’s just me.

Posted in education | Tagged: , | 3 Comments »