Thought Flow

Technology and other things

Author: David

  • Lisp

    Is Lisp easy?I try. I really do. I read articles, I write code, I frustrate myself and I force myself to spend countless hours making things work. Whatever I do, I keep bumping my head into yet another wall. I’m trying to grasp Lisp.

    According to John McCarthy, Lisp represents a local optimum in the space of programming languages. What he and everyone else fail to tell people learning Lisp (at least me) is that is represents a global minimum in the space of programming language learnability.

    There are many good resources to help understanding Lisp everywhere, ranging from almost philosophical over paedagogical introductions to more technical articles. I have also managed to do something in Lisp, like implementing FastICA for Independent Component Analysis in Clojure, a dialect of Lisp, and at the moment, I’m trying to implement FP-growth, a well-known and fairly scalable Association Rule Mining algorithm. And yes, whenever something succeeds (after many hours of pondering), it is a pleasing experiencing to notice how few lines are sometimes needed to accomplish complex tasks.

    But I’m not satisfied. I’m frustrated. When I was learning Java in the early days of my academic career, I was rarely frustrated when faced with new problems to solve. But learning Lisp is like having a very unstable nuclear power plant living in the brain. Meltdowns are inevitable and occur quite often.

    And the worst thing about Lisp is not Lisp itself. It is the feeling of incompetence that hits you in the face whenever you cannot figure something out. The feeling of mediocrity is not very pleasant and the meltdowns are tough on one’s self-esteem. The thought: “Maybe I am just an average programmer” pops up constantly.

    “I want to believe” that Lisp is great. I hope I will see the light. I’m looking for the promised epiphany. And I most certainly will not settle with mediocrity… ever.

  • Space Wars on html canvas

    Space Wars screenshotI recently spent a little time testing out the <canvas> element which is a nice and fairly new markup element that is included in html5. I decided to take a little Asteroids-like game that I made in a group project at the University of Oregon in Fall 2009 (we called it Space Wars) and convert it to work with the <canvas> element and Javascript.

    This was very fun and surprisingly easy. A lot of the code could be copied almost exactly from the Java code and modified slightly to work with the <canvas> element. I gained the necessary background from this excellent tutorial and besides some differences between Firefox and Chrome/Opera/Safari in how to handle keyboard events there were no major obstacles along the way.

    If anyone should be interested, the game can be played here:
    davidlebech.com/spacewars/

    The <canvas> element is definitely a nice addition to the toolkit for online webservices and it will be interesting to see what people might use it for in the future.

  • The business card

    David Lebech business cardDo I need a business card? Probably not right now. But we are still getting it. However, I was recently at a social where I wanted to give my email address to a fellow computer scientist who is also a business owner. It worked out since everyone carry phones but when I remember the feeling of someone giving me their business card (business owner or not), there is just a different feel to it… so I felt bad for not having one.

    This makes me wonder. Is there a reason why some companies give a fancy card to employees of any rank? Does it have a proven effect or is it just show-off, like it is going to be in my case.

    In any case, I will look forward to the next time someone asks for my email.

  • Dual language spell checking in Chrome and Mac OS

    Mac OS has a built-in spell checker. So does Google Chrome. This has caused confusion for me recently but the problem is now solved.

    For example, at the end of an email, we often write “Med venlig hilsen” in Danish which means something like “With kind regards”. Chrome underlines “venlig” with a red line, indicating a miss-spelled word, even when I have chosen Danish as the language in Chrome. When right-clicking the word, Chrome then suggests “venlig” (i.e. exactly the same word) as an alternative. Puzzling.

    It turns out that the underline is actually due to Mac OS’ spell checker and not Google Chrome’s. And the language of the spell checker in Mac OS is set to “Automatic by language”. Obviously, it does not do a good job at detecting Danish but switching the order, in which the languages are detected, solves the problem.

    If anyone else ever encounter this problem, here is how to fix it. In Mac OS X, go to System preferences – Language and text – Text and press the dropdown menu for “spelling”. In this menu, press setup and then drag and drop Danish (or what ever other language) to the top, before English.

    The interesting thing is that English is still being correctly recognized by Mac OS so I am not getting any red lines for this blog post, although Danish now has precedence over English in the language detection. And I can finally avoid all those red lines when writing my mother tongue.

    Med venlig hilsen
    David

  • Metacircle

    Metacircle logoMetacircle was founded in July 2010 by myself and my friend Patrick. We offer consulting services for the IT industry and we are currently making feature enhancements and analyzing performance for the webshop product from MCB, a company based in Holstebro, Denmark.

    The name Metacircle is inspired by the computer science concept of a meta-circular evaluator. We chose the name because we (especially Patrick) are excited about the possibilities of a new functional programming language called Clojure which, we hope, we will be able to utilize in future projects.

    These are exciting times.

    By the way, Ubuntu 10.10 is coming soon. See the fancy countdown below.
    Ubuntu 10.10 is out! www.ubuntu.com