Coming out of my closets: #01 Musical

In an earlier blog post (Understanding my students or why I started learning Haskell, Part III) I came out the Computer Science closet by admitting I don’t know functional programming, at least not good enough. Having admitted that I might as well continue admitting other weaknesses I, until now, secretly have.

Having worked in a record store for some years I learned that some music is OK (Pink Floyd, Guns ‘n Roses…). Some music is totally obligatory to like (Velvet Underground, Bob Dylan) and some music is NOT ok (Whitesnake, Bon Jovi).

Perhaps it is my fright of being regarded as a hipster that forces me to write this. Or perhaps I am seeing too many people liking stuff because they really should like it (hipster!). But let’s not put too much into this. This post is just for fun.

Bands I like that are NOT OK to like by most musical snobs:

Bans I am supposed to like, but I don’t:

  • Velvet Underground – well, some songs are good.
  • Beach boys – I just don’t get it. What’s good about ’em?
  • Queen – come on, does anyone really them?
  • The Doors – I did like them years ago. Not at all anymore.
  • The Police – No, don’t feel a thing. Like the drums though!
  • The Strokes – Don’t get it.

I do however qualify as a basted liking bands I should so I am just like anyone else. I am huge fan of Sonic Youth, Talking Heads, Tom Waits – and boy, they all give super duper heavy duty points among record (store) folks.

I have some ideas on subjects where I feel a need to come out: movies, literature, beer,

Understanding my students or why I started learning Haskell, Part III

– Why a new language and why Haskell?

Reason 01: Understanding my students or why I started learning Haskell, Part I

Reason 02: Understanding my students or why I started learning Haskell, Part II

Ok, so it was decided. I, the volunteering Guinea pig, should start the quest for a really good book – not exactly a holy quest for the holy Grail but still (and finally), a quest!!!

Quest:

  1. Find one good book to a limited list of programming languages (Scheme and Haskell).
  2. Use the book to learn the programming language.
  3. Find what’s good and bad about the book – and compile that to a list.

I will cheat and GOTO 3 before I finish (2). ….. I, personally, will use this list later when I will look for books for new courses or when updating existing ones.

Disclaimer (redundant given the text above, but important!):

  • I am NOT looking for the best book for someone already being a programmer.
  • I am looking for a book that explains the language for a newbie. 
  • I totally suck at, among other things, writing manuals – so who am I to complain?

And ….. “I am not looking for a New England”

Searching for a good book

…… with my good eyes open

Scheme documentation

Oh boy, will I get in trouble now.

I started with Guile/Scheme docs but they were somewhat dry and there were some barriers that lowered my motivation. I couldn’t find book that really inspired me to continue reading. I am not saying that there is anything wrong with the books, but I don’t think they were aimed at newbies.

Haskell documentation

I tried some Haskell guides but starting out with “dry mathematical introduction” didn’t really motivate me. And an almost 600 pages long manual is kind of tough to have in front of you.

Heureka, I found Learn You a Haskell which seemed nice. After a while I noticed that I’d been reading and hacking for two hours. Now, that’s a sign of a good book! Perhaps not for programming newbies but nice for me. Ok it’s about time, I am coming out of the terminal/command line closet: I like the graphics!!

The last year I have tried to teach the same way as the book did. Mix theory and practical studies in small increments.

Haskell it is… I will learn Haskell

So this book made the decision easy – I will learn Haskell, since the book will not only learn me Haskell but I hope it will also give me some pedagogical ideas.

Some extra words here. It is crucial for me that the tools for the language (e.g. compilers) are Free Software. Furthermore the language specification should be free. ….. and there should be an emacs-mode for the language!

Result:

These are my findings so far. And this experiment is flawed from start since I am using only one person, furthermore that person is myself. So I am the first to blame myself for not using a scientific approach. Still I will use the results as input for choosing a book for students in the future.

A good book for newbies is imho a book that:

  • Is short enough to feel you can finish it in a couple of days/weeks – certainly doesn’t mean you should master the language after just a few days. 100 is a perhaps bit short and 600 pages is a bit too long. 200-400?
  • Uses Small increments. It’s important the theory and practice/hans-on (and exercises) are show with small increments. Give the user gratification every now and then.
  • Has quite a few examples that the reader can copy and try out herself.
  • As quick as possible, give me what I need to write a small but useful program (play audio, fetch web pages..) and then teach me more. I think it is important to quickly show the reader that the language can be used for something good and useful.
  • Does NOT write your own API and use that throughout the book.
  • Provides some exercises and well commented solutions.
  • Uses a relaxed language. Not a dry/mathematical one. Programming is fun!

For those of you saying that the Haskell book is not fulfilling all of the above. Yes, I agree. It doesn’t. But it’s the best I found and it’s good!

And for those saying “write your own damned book then!” – perhaps I will. Fact is that I secretly have started.

… If you feel there’s something missing in the list above. Please email me (hesa _AT= sandklef.com) with suggestions or write your comments on the blog.

Btw ……. my favorite programming books:

  1. Linux Device Drivers (I liked the 2nd edition best)
  2. The Art of Computer Programming
  3. Expert C Programming: Deep C Secrets
  4. The C Programming Language

Woops lots of C books there! I’ve read some Tannenbaums as well from which I learned a lot, but they’re not among my favorites.

And I really have to bring this paper up:

  • Reflections on Trusting Trust by Ken Thompson

Coming up next: A Good book introducing programming to newbies.

 

Understanding my students or why I started learning Haskell, Part II

– Why a new language and why Haskell?

Reason 01: Understanding my students or why I started learning Haskell, Part I

Reason 02: Feeling like a student again

This calls for an explanation. I’ve been teaching at two Universities with various intensity for some years and I have started (nudge nudge – know what I mean) to notice some patterns among students. I lack proper backing here so I can’t make too general and sweeping arguments, but I can say that the course book/literature isn’t read by the students the way we expect. I get the impression that the book is not at all among the students’ main alternatives when learning how to program. Students have been telling me that they’d like to watch videos to learn. Why don’t the students read the books? Are the books bad? Should we use books at all? Are they all written in the wrong why – e g assuming everyone knows math and programming? Are the books using a boring pedagogy? One thing I’ve noticed is that most books are best suited for people who already know how to program and need to know another one.

By the way: … is there a good book on learning what programming is? I mean learning from scratch. And I mean good

Talking about books I think about the ones I used during my studies. Did I read the books? I’ve always thought and said I did, but really, did I? Being honest I don’t think I did a good job reading the books. Not in a proper way at least. So in a way I may be more similar to my students than I think.

In a class where I currently lecture we have switched (partly) to using Flipped Classroom and I get the impression – again, no proper backing – that we can see an increase in learning among the students. Still, we can’t rely on videos. Hmm, perhaps if we tag the videos properly? And develop an interface that makes it easy to browse and search. Anyhow, I don’t think we rely on videos alone. We need a book.

Learning, or re-learning after some 15 years in my case, a functional programming is as close to learning programming from scratch as I can come. So I decided to use this as an opportunity. Btw, learning a logical language like Prolog would perhaps be better – but I want to learn something I will find useful in my current profession. I guess I’ll be a Guinea pig in a way. How will I feel when reading books on a new subject? What kind of books do I like when NOT knowing the subject?

So learning a functional language will make me find the kind of literature that fits me. And assuming I am somewhat similar to my students in not wanting to read a language specification to start with I think I can draw some conclusions from the book I find nice and use these conclusions in my coming classes/courses. And probably I will eat some humble pie too. … btw, I certainly don’t mind reading language specifications. But not when starting off with a new language. Yeah yeah, some of you want to do it that way.

Bla bla bla, I will write about my findings tonight (publish tomorrow) – why it became Haskell and not Scheme.

Understanding my students or why I started learning Haskell, Part I

– Why a new language and why Haskell?

Two main reasons!

Reason 01: I need a new hacking challenge.

Knowing the Free Software hackers I have the pleasure to know it’s hard to think I am any good as a programmer. I think I am pretty good and fast in writing C. But comparing myself to my hacker friends I sometimes feel a bit limited in my understanding of programming. So I really think I need to extend my programming skills with a new language. Or even better, a new programming language paradigm. Since I know imperative/procedural programming (C), scripting (Bash) and OO (Java) the obvious next thing is to properly learn a functional language.

Functional languages or languages that can be used in a functional way I was considering: Lisp, Javascript, Scheme/Guile and Haskell.

…. sorry, Luca and Jose, Epsilon Algol are not functional 

Javascript:

I have been talking with a friend (Mikko) about my next language to learn for over a year and since he’s good at Javascript I always thought that Javascript (using it in a functional way) would be my next language. I think I would love the “competition” between us. But after some thoughts I decided let go off it – after all I am not a web programmer which is where Javascript is used mostly, I like lower level stuff…..  the idea of writing an Arduino simulator in Javascript is still kept in my brain.

Scheme/Guile:

It’s GNU’s extension language and Andy and Ludovic have been presenting it nicely to me… and they contribute a lot to it). I decided to give it a try.

Haskell:

Jon has done a good, almost fanatic, job promoting it and it is a language I almost learned when I studied – I learned Standard ML – Haskell wasn’t ready then I guess. Ok, I decided to give this a try too.

Lisp:

Hmmm, it’s kind of embarrassing to not know Lisp in Free Software communities. Still I skipped it. I think I wanted to go for a language which is used by friends of mine so I can discuss details over a chat or a beer.

Reason 02 coming up soon….