July 2, 2006

Best Universities in the UK according to Times

Posted in Education, Life at 5:38 pm by pmatos

Times published its Best University Guide. A very nice piece of information for people wanting to know more about international universities.

May 9, 2006

IST, DEI e o Portfolio Pessoal…

Posted in Dia-a-Dia, Education, Portuguese at 9:18 am by pmatos

Durante o ano de 2005 publiquei neste blog uma crítica à realização dos Arraiais do IST dentro do recinto do mesmo, o qual teve felizmente, muitos comentários. Um deles que me entusiasmou foi o de que eu não tinha ainda comentado situações graves de educação (ou falta dela) internas ao IST, outros problemas de falta de condições, problemas com docência, etc. Ora, chegou a altura de criticar outra das coisas que penso ser inadmissível.

Aqui há uns anos foi estabelecido no DEI (Departamento de Engenharia Informática) uma nova cadeira que iria substituir outras à quais se chamou Portfolio Pessoal. Interessa perceber o que é isto e qual o seu objectivo. Tanto quanto sei (na altura em que isto foi colocado no currículo ainda não era docente do DEI), a ideia era a de dar hipótese aos alunos de fazerem algo extra-curricular que complemente os estudos científicos que os alunos têm no Técnico isto porque existia uma ideia generalizada de que os alunos saiam do técnico e durante o curso pouco tempo tinham para fazer outras coisas e apesar de terem um elevado conhecimento científico da área que estudaram, eram completamente ignorantes noutras. Assim, os alunos passaram a ter que realizar Porfolios Pessoais ao longo do curso que lhes dão créditos como se de uma cadeira se tratasse. Eles propõem temas e um docente responsável do DEI, aceita a proposta ou não. No final, uma apresentação e um relatório, um Aprovado ou Reprovado e está feito (corrijam-me se os detalhes não estiverem correctos).

Já tinha conhecimento disto à algum tempo, no entanto, só a semana passada é que me suscitou interesse de ir ver o que se fazia pois um aluno estava a falar sobre o Portfolio Pessoal e eu perguntei-lhe mais detalhes, no entanto, os detalhes esvaneceram-se mas a ideia geral dos alunos presentes era de que o Portfolio Pessoal era uma tanga. Ora, sendo esta a ideia dos alunos decidi ir investigar o que se fazia pois isto devia ser algo para os alunos e não contra estes. Devia ser algo que eles têm prazer em fazer e não algo que têm de fazer e propôr uma treta qualquer.

Qual não é o meu espanto quando me deparo com a página dos Portfolios Pessoais e uma listagem dos mesmo não só do semestre corrente como também do semestre passado.

Vejamos algumas actividades:

  • Página Web sobre a minha freguesia – Desenvolvimento de Site Web (sem Clientes)
  • Construção de Página Web para um Restaurante. – Desenvolvimento de Site Web (com Clientes)
  • Carta de condução – Apoio ao Desenvolvimento de Competências não curriculares
  • Realização do TFC com empresa – Actividade Profissional – Informática
  • Volei – Desporto
  • Promoção da LEIC – Organização de Eventos ou Estruturas Organizativas (Geral)
  • Página Web para apresentação do meu currículo, trabalhos e reflexões da vida académica – Prática Reflexiva

E não continuo com mais… mas a questão é? Quem é que aceita isto?
Isto é inadmissível!!! Como é que numa Instituição que se preze existem docentes que permitem que um aluno vá tirar a carta de condução e faça uma disciplina do curso? Isto é um 2 em 1?

Volei? Volei é para praticar nos tempos livres como todas as outras pessoas dos outros cursos e das outras universidades? O que é que têm a mais os meninos da LEIC, LERCI, etc para merecerem tratamento especial? São menos capazes? NÃO Têm mais trabalho que os outros? NÃO Então porque é?

Consideraria esta iniciativa importante se tivesse como objectivo que os alunos aprendessem algo fora da sua estrutura curricular mas que tivesse pés e cabeça. Olha, Português dava jeito a muitos. Literatura, línguas, música (ainda existem alguns)… agora Volei? Carta de Condução? Fazer páginas na web? Dar explicações de Matemática? (sim, também lá está!)

Infelizmente, tenho dúvidas sobre as melhorias que a Reforma de Bolonha possa trazer ao ensino, no entanto, se remover esta ideia do Portfolio Pessoal como ela está neste momento, já não se perde tudo… A ideia não é má… o problema é que cá em Portugal é assim… aparece a ideia, coloca-se em funcionamento e depois ninguém se rege pelos ideais que deram força á ideia, esta perde-se e é a bandalheira que se vê.

March 4, 2006

NanoTech is having its way…

Posted in Education, Life at 1:25 am by pmatos

There are some researchers at INESC-ID where I work, which work on nano technology (it seems there’s even a INESC division just for them, which means they’re not really INESC-ID, but INESC-MN, instead!)

Still, I’ve never quite understood, probably due to laziness or lack of time what they were doing. Gladly there is starting to show up some applications on the press…. Go Nano! :)

By the way… I think IST is in dare need of that paint in its classrooms!

February 22, 2006

Palestra: Sudoku, futebol, diplomacia e outros aspectos da matemática

Posted in Education, Mathematics, Portuguese at 9:13 pm by pmatos

O Prof. Jorge Buescu do Departamento de Matemática do Instituto Superior Técnico dará amanhã uma palestra na Faculdade de Ciências da Universidade de Lisboa integrada no 4º Ciclo de Palestras “Matemática, Ciência e Arte”, 2005/2006.

Como devem saber o Prof. Buescu tem uma excelente reputação a nível nacional e internacional, publicou alguns livros na área da divulgação científica, algo em que é exímio. Assim, não convém perder estas oportunidades. Já assisti a várias palestras e nunca saí de lá como se tivesse perdido o meu tempo.

E claro, a parte interessante é que aqueles que não podem ou não têm tempo para se deslocar ao local da palestra podem assistir á mesma, em directo, confortavelmente do vosso emprego/casa pois vai ser transmitida em directo a partir da internet.

December 9, 2005

Teaching Mathematica as First Programming Language…

Posted in Computers, Education, Lisp, Mathematics, Programming, Scheme, Uncategorized at 1:57 pm by pmatos

is worse than shooting yourself in the foot… worse than shooting yourself in the head… is like shooting a whole bunch of students in the head, his friends, parents and colleagues. I would better call it a genocide.
From the wikipedia definition of genocide:

Genocide is (…) Killing members of the group; Causing serious bodily or mental harm to members of the group; Deliberately inflicting on the group conditions of life calculated to bring about its physical destruction in whole or in part; Imposing measures intended to prevent births within the group; and forcibly transferring children of the group to another group (…)

Students learning Mathematica as a first programming language are most probably mentally mutilated beyond hope of regeneration. In what follows I will explain why this is so.

During my degree in Software and Computer Engineering I had the possibility to learn programming in various languages like C, C++, JAVA, and some more eccentric languages like Scheme, Common Lisp and Mathematica. During the last years teaching Programming Fundamentals in Scheme as a first Programming Language in Software and Computer Engineering and following students from the Mathematics Department which learn Mathematica as a first Programming Language I’ve noticed the following differences:

  • Mathematica does not ease teaching students Programming Techniques, while Scheme does.
  • Mathematica makes it hard to teach good programming styles while the PLT Scheme approach makes it much easier.
  • Mathematica makes the learning of abstract datatypes (ADTs) extremelly difficult, while Scheme mostly enforces it.
  • Mathematica makes it even more awkard the teaching of orders of growth while Scheme does not.
  • Usual Programming Concepts like Interpreter, Compiler, REPL are not easily taught to students using Mathematics. PLT Scheme makes them explicit.

Now, I’ll try to detail each of the previous items in more detail.

Programming Styles

A beginning programmer needs, more than usual, that tools work on his side. No need for highly extensible, general-purpose, do-all tool (that’s why in general everyone works in windows, and why no beginner starts programming in emacs). If they are learning a programming language they already have a steep curve to go through, no need for another one to learn about an editor or how pretty-print stuff, indent or anything else.

Mathematica interface goes against these principles. Its interface is highly problematic, counter-intuitive and ugly. No help source colouring is provided and paren-matching functions are as simple as they can be. Check the snapshot!

  • It’s hard to keep track of what each parentheses close;
  • No colouring at all;
  • No support for indentation – the code is indented automatticly but if you for some reason miss the indentation and destroy the automatic indentation (remember, they are only beginners) it’s hard to get it back in place;
  • Copy-pasting the code can get a harsh job due to newline problems, etc… (I was never able to understand these issues)

Now, for your delight, check for example a PLT Scheme snapshot.

ADTs

One thing which is particularly annoying in Mathematica is its uses of lists. Students learning Mathematica know surely all of the following functions for lists: PreppendTo, Preppend, Append, AppendTo, Length, First, Rest and [[_]].

Lists are a very good datatype but one that should be used with care not to shoot yourself in the foot. The major problem is Lists in Mathematica are not Lists. Lists in Mathematica are vectors, uni-dimensional tensors, and what makes things more irritating is that they are called lists. Check the following copy-pasted from Mathematica 5.1 help on List:

- {e1, e2, ...} is a list of elements.
(...)
- {a, b, c} represents a vector.
- {{a, b}, {c, d}} represents a matrix.
- Nested lists can be used to represent tensors.

Geeez, check the first line, oh it’s a list of elements… some lines below… it’s a vector… 2 lines below, oh no, nested lists…

This will not make sense of any student and imagine what a beginning student will learn from this? Lists and vectors are probably the same. Which is utterly incorrect!

From the Dictionary of Algorithms and Data Structures on list:

Definition: A collection of items accessible one after another beginning at the head and ending at the tail.

And on vector (also known as 1D-array):

Definition: A set of items which are randomly accessible by numeric index.

So, definitely this is a vector. How we really know the Mathematica list is a vector and not a list? Check next section on orders of growth.

This seems like a stupid non-sense that any student may go through without any problem but it is not true. Mathematica students learn talk about lists and which is ultimately worse, “think” about lists when they really mean vectors. And these are basic ADTs, every other ADT knowledge will come distorted because of this.

One can think:

Oh, no big deal, I can explain my students that lists and vectors are one. There are list functions and vector functions that work exactly on the same datatype (which is true).

You can explain this fact and probably 40% (at best) of them will understand but this will not help. When they get to learn other programming languages like C++ (which have separate STL List and Vector), Common Lisp, Scheme, etc, etc, etc… they won’t understand.
Using Mathematica and getting used to the fact that lists and vectors are the same will make them bad programmers for the rest of their days and will mutilate them and everyone who this person might teach.

Orders of Growth

Although we do not teach our students much about orders of growth in a first programming languages course, we do mention about the computational cost of some function and the computational cost of each ADT we use. However, we do know most students in their first project are eager to make them as computationally efficient as possible so that it’ll run faster than of most of their colleagues, not knowing that:

Premature Optimization is the Root of all Evil!
— Donald E. Knuth

Imagine that a student A is asked to define a function in Scheme that given an ordered list of numbers and a number (which is known to be in the list) should return the position (1-based) of the element in the list. A smart student will try to make is run as fast as hell so it uses a neat trick:

  ;; Returns the position of a given element in an ordered list.
  ;; (give-element '(2 3 6 8 15) 8) => 4
  (define (give-element-fast l n)
    (define (aux l i)
      (let* ((len (length l))
             (mid-pos (inexact->exact (ceiling (/ len 2))))
             (n-element (nth l mid-pos)))
        (cond (( n-element n)
               (aux (take l mid-pos) i))
              (else 
               i))))
    (aux l 1))

(defined nth and take for Scheme, almost as defined in Mathematica to resemble [[_]] and Take, which for Schemers is Take is take when receives a positive argument and drop when receives a negative argument. Code is in the end of this blog post.)

This is a usual recursive function with no-side effects that will as fast as possible try to compute the position given the fact that the list is ordered. A simple-minded student B will do in Scheme:

  ;; Returns the position of a given element in an ordered list.
  ;; (give-element '(2 3 6 8 15) 8) => 4
(define (give-element-slow l n)
    (let loop ((l l) (i 1))
      (if (= (first l) n)
          i
          (loop (rest l) (+ i 1)))))

Let’s make the same students define these in Mathematica. So student A:

GiveElementFast = Function[{l, n},
      Module[{lst, i, len, midpos, nelement},
        lst = l;
        i = 0;
        len = Length[lst];
        midpos = 1;
        nelement = Infinity;
        While[nelement != n,
          len = Length[lst];
          midpos = Ceiling[len/2];
          nelement = lst[[midpos]];
          If[nelement 
Let's take a bunch of benchmarks now.</del>(In fact I did take some benchmarks but unfortunately, posting them along the post would take more time than it should and the results are intuitive.)
What happens is that the time to search a list in Scheme with the Fast Procedure is much larger than the Slow one, and in Mathematica happens exactly the opposite. This is exactly due to the fact that Mathematica Lists are vectors and the Fast Procedure is only really fast if the datatype is a vector since getting an element from a list is O(n) and getting an element from a vector is O(1) (which means that getting an element from a list is done in linear time with the size of the list, and constant in the size of the vector). So, in fact, the approach student B took when developing the functions was the correct one since he probably new the orders of growth in list access, what he didn't knew and that's why his approach fails in Mathematica is that Mathematica cheats you when talking about lists. Student A approach although wise with vectors is naive with lists and or he knows he is working with vectors in Mathematica (which is rarely the case if we are talking Mathematica as a first programming language) or he gets is fast just by luck. Either case, something is wrong and potencially confuses the student. Mathematica is great for symbolic manipulation, data plotting and programming of rather simple software prototypes but extremelly bad to teach programming concepts. Seems simple and straightforward to those programming in Mathematica for a long time but cannot see the damage they are inflicting to their students.

<strong>License</strong>

And of course, there are the license issues. Mathematica is cross-platform but also is PLT-Scheme and many others. However, if you find a bug in Mathematica 5.1 (for example, the extremelly annoying bug of numlock not working ok on Linux Systems) you have to wait for the next release (probably a couple of months), if you find a bug in an open source free system you contact the developers and probably in less than a day they put online a binary version of the software working as you wanted to.

<strong>Last Comments</strong>

Surely Mathematica is not useless. Mathematica is a powerful symbolic manipulator with a nice embedded Programming Language, still using it for a course on Programming as a first Programming Language should be considered a criminal offense, and those enforcing its use should revise the course or accept the death penalty.

<strong>Other Code</strong>
Nth:

(define (nth l n)
    (if (= n 1)
        (first l)
        (nth (rest l) (- n 1))))

Take:

(define (take l n)
    (define (take-aux l n)
      (if (= n 0)
          ()
          (cons (first l)
                (take-aux (rest l) (- n 1)))))
    (define (drop l n)
      (if (= n 0)
          l
          (drop (rest l) (- n 1))))
    (if (> n 0)
        (take-aux l n)
        (drop l (- n))))

November 25, 2005

Novos Talentos da Matemática… Técnicos

Posted in Education, Mathematics, Portuguese, Uncategorized at 7:27 pm by pmatos

Foram divulgados os resultados do programa Novos Talentos da Matemática da Fundação Calouste Gulbenkian que atribui bolsas de mérito a jovens brilhantes para que estes realizem um estudo aprofundado durante um ano numa área a seu gosto acompanhados por um especialista na área. Das 20 bolsas distribuidas a nível nacional, 8 vieram para o nosso Instituto Superior Técnico. Parabéns a todos os jovens e bom trabalho para este ano!

Novos Talentos Matemática (IST-06)

October 24, 2005

Se querem brincar… mudem de poiso!

Posted in Dia-a-Dia, Education, Portuguese, Uncategorized at 9:39 am by pmatos

Ora, hoje não foi um dia que acordasse por aí além bem disposto. Foi até um dia bastante normal, acordar às 6.30, apanhar o autocarro, tomar o pequeno-almoço no IST, seguir para o INESC trabalhar. Mas a partir deste momento a normalidade terminou. Entro no INESC e dou de caras com um monte de jornais, do qual decidi retirar um. Era o Diferencial, o Jornal dos Estudantes do IST. Rapidamente sorri… As linhas da primeira página diziam: “O fim da barracada: Muito se falou e ainda mais se escreveu sobre o último arraial do caloiro do IST. O conselho directivo convidou a AEIST a fazer a pândega noutro lado.”

Após leitura meticulosa do artigo que podem consultar na página 2, constatei que finalmente o bom senso parece ter vencido (o ‘parece’ é devido à palavra ‘convite’ referida no artigo) ao disparate.

Algo que vale a pena referir, é que ninguém quer abolir a realização dos arraiais mas sim, a realização dos mesmos DENTRO do campus. No entanto, muitos parecem não entender isso, pensando que se pretende fazer com que os alunos se deixem de divertir mas ninguém pretende tal coisa, como já tinha referido anteriormente. Mesmo assim, recebi alguns comentários extra-longos e extra-‘ordinários’ ao meu artigo, o que por razões óbvias foram removidos.

Assim, gostaria de agradecer publicamente ao Prof. Paulo Gil que parece ter iniciado uma discussão que está perto de dar frutos. E termino então um artigo, no ínicio de um dia que apesar de não se ter iniciado especialmente bem, recebeu um ‘boost’ rapidamente…

September 28, 2005

Um Portal de Scheme

Posted in Computers, Education, Lisp, Portuguese, Scheme, Uncategorized at 2:33 pm by pmatos

Tenho desde o início do meu blog publicado anúncios e ideias sobre Scheme aqui. Agora terminou… não os anúncios mas sim os anúncios aqui. O Portal de Scheme está oficialmente inaugurado e em constante construção.
O endereço é: http://sat.inesc-id.pt/~pocm/scheme_portal

Divirtam-se!

September 24, 2005

Noite Europeia dos Investigadores

Posted in Education, Portuguese at 2:55 pm by pmatos

Ontem decorreu no Pav. do Conhecimento em Lisboa a noite europeia dos investigadores. Deu-se inicio às 19.00 e terminou pouco depois das 24.00.

Iniciou-se com uma introdução aos 16 livros digitais de banda desenhada virtual dirigida aos mais novos criada por um grupo de investigação da Universidade Nova com o apoio da Agência Ciência Viva, o que foi de facto, extremamente interessante, tendo deixado muito boa gente de boca aberta. De facto, deverá ter grande potencialidade num futuro cada vez mais próximo em que os mais jovens passam cada vez mais tempo ao computador. Desta forma, tenta-se aliar o didático com as vontades deles (de estarem ao computador).

Posteriormente deu-se inicio a um conjunto de demonstrações, em àreas como a Física, Matemática, Climatologia, etc em que o público interagia com investigadores sobre matérias que estavam previamente determinadas e com experiências variadíssimas. Pode-se encontrar desde uma janela com mais de 2 metros de altura de sabão em que bolhas de sabão com mais de 50 cm de diametro poderiam ser criadas, ilusões de óptica impressionantes, jogos de reflexos, experiências de acústica, um criador de tornados, entre muitos outros.

O ponto alto foi a partir das 22.30 em que nos reunimos até ao final num debate. Muitas foram as intervenções, desde o Prof. Mariano Gago, Ministro da Ciência e da Tecnologia, Prof. Carlos Fiolhais, Prof. Pedro Lima, Professores do Ensino Secundário, Presidente da Sociedade Portuguesa de Genética, Professores estrangeiros entre outros.

O debate cujo tema foi “O que é ser cientista?” teve alguns pontos altos e outros não tão altos. Um Professor alemão que está a fazer investigação em Portugal criticou severamente o sistema de evolução da carreira docente e de investigação em Portugal comparando-o com o de outros países, como com a Alemanha e os EUA. Professores do ensino secundário reclamaram a inexistência (ou existência deficiente) de reciclagem dos Professores e a enorme burocracia a que estão constantemente sujeitos. O Prof. Carlos Fiolhais falou sobre a extrema importancia da Curiosidade Apaixonada de um cientista (título também do seu mais recente livro). O Prof. Mariano Gago falou da sua experiência enquanto cientista em Física das Partículas e o Prof. Pedro Lima sobre a sua experiência enquanto investigador no Instituto de Sistemas e Robótica (IST).

Alunos do secundário questionaram os presentes sobre o “medo da ‘não’ descoberta”, “o que é ser cientista”, “como ser cientista”, “qual a àrea a escolher”, etc.

Dois pontos mais baixos sobressairam. O Prof. Mariano Gago fugiu à questão colocada por uma finalista sobre bolsas de estudo em Portugal e Professores de um Politécnico em Évora foram totalmente ignorados quando questionaram os presentes sobre a importância dos Polítecnicos em Portugal.

Em geral, foi um encontro extremamente positivo. Parabéns Ciência Viva!

September 21, 2005

Instituto Superior T…

Posted in Dia-a-Dia, Education, Portuguese at 12:32 pm by pmatos

Custa-me ver um instituto como o IST a ser alvo de festas, arraiais, e mais festas e mais arraiais durante um ano lectivo cujo objectivo é estudar. Começa no início do ano lectivo com o arraial do caloiro e termina com outro arraial. Mas não fica por aqui, os arraiais seguem-se a um ritmo impressionante. E são tão bem organizados que me deixam a pensar… se os alunos se empenhassem a estudar como se empenham para organizar um arraial tiravam muito melhores notas.

Ah, mas desculpem… O arraial do caloiro justifica-se! É óbvio que com a entrada dos caloiros na faculdade, num mundo novo, a melhor coisa a fazer é um arraial para eles se ambientarem e lhes darem as boas vindas. Um Mega arraial é obviamente interessante pois é practicamente a despedida de mais um ano lectivo. Ah, desculpem, claro, que a existência do arraial da primavera também se justifica… nada melhor do que um arraial para receber a primavera e
o primeiro sol de verão com cheiro a praia de braços abertos.

E as desculpas seguem-se… arraiais seguem-se de arraiais que por sua vez se seguem de arraiais. Existem com certeza alunos, e não são poucos, que devem ser com certeza mais assíduos aos arraiais que às aulas que têm durante os semestres. É inacreditável!

Cheguei a pensar em tempos, quando entrei como estudante para o IST, que este era um local de estudo e de lazer (o que não é o mesmo de ‘festanças’). No entanto, tenho-me apercebido, ao longo dos meus últimos anos como estudante de Engenharia e agora como estudante de Pós-Graduação e como Docente, que quando mal me esqueci do arraial anterior já vejo um enorme palco à entrada do meu local de trabalho.

E não basta passar o ano com barracas e barraquinhas espalhadas pelo técnico quase mês-sim, mês-não ainda tenho que navegar na net e ler:

Todos os caloiros deveriam ser recebidos com uma festa assim! A reentré das Festas académicas é no Instituto Superior Técnico, com a MEGA FM!

29 e 30 de Setembro vais poder beber, dançar, rever os amigos ou entrar com o pé direito na vida de estudante universitário!

A questão é… qual a definição de estudante universitário para a MegaFM? Parece-me ser bem diferente da minha…

Resta-me fazer uma proposta. Ou se terminam com os arraiais dentro do recinto do IST, o que não implica que eles terminem, apenas que os façam fora do IST ou então que criem um novo instituto para fazer investigação e formar profissionais de elite.

Caso contrário, proponho ao Presidente da Câmara de Lisboa a mudança da Feira Popular para dentro do recinto do Técnico. Podemos inclusíve, manter as siglas e passarmos todos a conhecer um tão distinto, ilustre e prezado instituto num tempo distante como Instituto Superior das Tascas, de agora em diante.

Previous page · Next page