Search This Blog

Loading...

Wednesday, May 1, 2013

Dance of Functional Programming

Our mooc course is here:

Languaging with Haskell and Python

Register if you like it!
If not tell us what you're looking for.

Friday, April 26, 2013

Functional Programming Scratchbook

Concepts of FP – Mindmap

Please note this is a scratchbook, ie Work-in-progress
Lambda MindMap
A mind map of how to approach the concepts of FP

Saturday, February 2, 2013

C in Education and Software Engineering – Retrospective

Its more than 20 years ago that I wrote C in Edu and SE[1]  I had mostly forgotten about it until I saw Mahesh's review. So thanks Mahesh for your kind words.  The trouble is I dont exactly agree with myself from 22 years ago ;-)  You see even in 1991 what I was saying was that C is a stupid language to teach programming with – education – unlike say C++ which is a stupid language – period.

Thursday, November 1, 2012

Imperative Programming: Lessons not learnt

We like to believe that Computer Science (or Information Technology) has advanced and keeps on advancing.

But has it?
What was called programming 60 years ago would today be called Imperative programming.  And it remains the mainstream (but see 7. below).

In short our field has a definite resistance to learning from our past.

A few examples will illustrate:

Thursday, October 18, 2012

Layout Imperative in Functional Programming

How long should program lines be?

But wait! Is this question even meaningful without specifying which programming language?

Monday, October 8, 2012

Functional Programming – the lost booty

Lisp was conceived in 1958 and already implemented by the early 60s.  One of its strange features was something called 'garbage-collection' … which took 35 years to enter the mainstream in Java.

Which is to say that for 35 years:
  • CS researchers did whatever they were doing for their tenure, (sorry) publications
  • Programming teachers righteously beat their students on their knuckles for getting pointer-errors/core-dumps/segfaults etc… 

Saturday, August 4, 2012

Functional Programming – Philosophical Difficulties

All the competing programming paradigms have serious philosophical problems.
FP probably less than the others but it too has its little share, which I deal with here.

Equality

Haskell programs look beautiful. You just write equations and everything magically just works. What could be a prettier dance between declaration (equations) and imperation (works)?

However the equations of Haskell hide a fundamental problem – equality is undecidable in general. Lets look at this from different angles:

Saturday, July 28, 2012

We dont need no Ooooo-Orientation – 4

The Grandeur of The Absolute

From the time – probably millenia ago – when humans first learnt to think ahead of their animal neighbours, we've been able to make certain statements that (presumably) animals can never conceive – abstract generalities.

So for example, a baby calf can recognize its mother cow with a greater unerring precision than a human baby's, yet when the human baby grows up, it can make distinctions out of the reach of our bovine brethren: eg
  • my mother vs motherhood
  • motherhood vs love
  • cheap love poetry vs hi-class love poetry
  • etc
In short, humans are very comfortable

dealing with abstractions as though they were concrete.


Now I have a conjecture, viz. that grand generalities have some hormonal trigger for making us feel elated (a grande-generality-pheromone maybe?) so that statements like
  1. Nothing in the universe can go faster than the speed of light
  2. Every pair of bodies in the universe attract each other according to a trivial-to-state mathematical law irrespective of their distance or relative size
  3. Anything that can be computed by any computer whatever (invented or yet to be invented) can be computed by a Turing machine
create a certain tickling feel-good that a 'normal' (non-general) statement like say: My tea has less sugar does not produce.

Friday, July 27, 2012

We dont need no Ooooo-Orientation – 3

In my earlier posts Ive discussed some context around why OO has been one of the more dismal failures in the history of IT/CS.
Here I talk of the error in thinking 'inheritance'.
And this gives the philosophical separation between those drawn to OOP and those not.

Before I come to the meat of the matter – why OO sucks – it would be good in all fairness, to deal with the

Very few successes of OOP

Monday, July 23, 2012

We don't need no Ooooo-Orientation – 2

Philosophical Underpinnings of OO

In the case of OO, we find a good deal of…
No philosophy
We don't need no philosophy (we are techies!) 1
Naive philosophy
Isn't it obvious what an object is? Just a(ny) thing? 2

Saturday, July 21, 2012

We don't need no Ooooo-Orientation – 1

When I was younger, I believed that OO was THE (or at least one important) solution to programming problems.  Over years Ive come to see that OO works in some cases and fails badly in many others. So I intend to blog on and off about my reservations with OO. I'll start off with touching on…

Problems with OO Terminology

Tuesday, May 1, 2012

Recursion pervasive in CS

I am often surprised that people think of recursion in the narrow context of recursive functions, missing the widespread and ubiquitous status of recursion in computer science.  If I may be permitted some jargon, we need to move on from recursion in recursive functions to the

Recursion Design Pattern

which has a large number of instances such as

Friday, October 21, 2011

Vagaries of Intelligence

To grow a chip on a grain of silicon
   And see god in a programmer
Store infinity in recursing automaton
   And decidability in a compiler

A source-tree filled with cases by the horde
   Shudders hell through the Intel board
A programmer unslept, working late
   Predicts the ruin of machine state

Monday, October 10, 2011