Building ghc from source

Am trying to get a latest ghc + haskell platform + cabal setup on my laptop.. I have built ghc-7.4 from source… now here’s the time it takes to run make on amd athlon 64×2 running on a 32-bit Ubuntu 11.10 with 2 GB RAM..


time -p ./configure
real 32.47
user 12.16
sys 4.77


time -p make

real 10345.75
user 8729.29
sys 1045.89


sudo time -p make install
real 121.08
user 54.49
sys 8.96

programming language mix-up

I don’t know why or how i still mix-up both C and python usages…i.e: Just tried to use python’s global keyword like i would in C. Declaring global and then trying to use the variable throughout the module…in different functions….It’s amazing i still think of it that way, considering how i never professionally program using C.. Once out of college, my only touch with C was timepass trying small programs from blog posts…. Darn,, i wasted about a couple of hours on this..

Update:
In retrospect, i can be excused… After all throughout my career i have been through atleast about 3 languages(Baan script,presentation script,python not to mention ones i started programming with C,C++, java) so far and my professional programming career is only 5 years old(not to mention with a break)… That’s to ignore that i have been through 3 natural languages too… I guess, it’s too much to ask of my brain…Perhaps only more than what most people ask of..either way am cool with it..

Programmers vs Runners

You can classify programmers by whether they love OOPs based programming or functional programming… I know it’s obviously not a binary classification(though i wish it were), but let me go with it. The difference is basically on what kind of programs they like to create.. the OOPs/Object-oriented is al about state-ful objects and things they can do… alone and working together…. It’s like a marathon runner….. Starting off not with fastest pace, but a steady pace.. that can be maintained for a long run… perhaps slightly faster till you get ahead of the crowd, but the focus is on finding steady,consistent pace where you are in the zone… On contrast functional programming is a lot like sprinting/relay.. the focus is on being as fast as possible on a given course/distance..

Now any decent athelete will tell you how cross-training is important… By cross-training am referring to playing across variety…Not training weights if you are a runner, though that helps too but not as much as running in rain, snow, bare feet, matted ground, running at a steady pace.. full acceleration etc…

i am beginning to realize i prefer the relay/sprintings nowadays… But if you want to be a programmer throughout your career, you’ll eventually have to find a balance and preferred state(more like range of states) in-between… On the other hand, if you want to move into management, then you finalize on the pace you prefer and take on other management responsibilities…
Now one of my hypothesis about the popularity of OOPs is that it sets a steady,predictable pace and frees up time to take on other responsibilities..

I wonder how one goes about testing it though.. Obviously, setting up experiments spanning that length of time is going to be expensive and unlikely to happen anytime soon..
But let me try and imagine how anyone from the future could conclude this assuming they have every data about the career path of a programmar..
Before that let me put out the other requisites:
What are the alternative career paths for someone starting out as a programmer??
1. Startup founder and/or CEO
2. Venture capitalist (mostly successful startup founders, think paul graham)
3. Stay programmer
4. IT/Data/ Architect
5. Consultant
6. IT director
7. System Administrator
8. Analyst

Ok, i am running out of options.. update me if you think something more should be added.
Now which one of these promotes/rewards functional programming and which one of these promote/reward OOPs??
Am going to assume startups prefer/reward functional programming biased programmers..I know it’s a debatable assumption, but debate away.. am not going to join the debate*..:-)
So if am a future analyst looking at programmer careers vs the type of code(and language,and perhaps functions-to-objects ratio??) they wrote,
I would expect:
1. Majority of the startup founders(successful or not) would have been functional programmers
2. Same for VCs as they would have mostly been startup founders.. I gues, there are some programmers who joined VC firms as analysts after a MBA degree even now.. I would guess they would have preferred functional programming too..
3. Ofcourse, the ones who stay programmer are the ones that prefer OOPs.. they can build on and reuse and reuse objects and more remember the state.. and they like retaining state in their heads..

Ok.. now my thinking is going to the lizard brain mode.. will just post it for now and update later for other career choices…
Feel free to add your thoughts in comments… will try to incorporate them in the next edit…
*– because i have debated it a lot with myself and concluded that it needs one hell of a lot more empirical study before accepting either stance and am safer to bet this way.

Django-ORM-template annoyances

The more i learn django templates and rendering html from django forms and formsets.. the more i want to puke at the OOPs model and python’s shift towards primarily becoming a object-oriented program.. I mean.. there you go with the models/classes for the data.. All you need is different types of views….and you go ahead creating new classses and objects for the same….yikes… whatever happened to writing functions to create the views….
Am more and more tempted to run away from python and right into haskell + yesod..

Overrated django

I think django is overrated for developers… the templating system is inconsistent…
And worse, doesn’t give a clue as to figure out the problem.. there are sometimes when you change the form and the template system still just ignores the new fields.. no idea why/what to do.. even a restart of the dev server doesn’t work…..guess googling and filtering through a lot of the drivel will get an answer.. but it really is an annoying amount of work for something that seems so intuitive..

And more mess from django, this time inspired by Relational SQL see here . The reason/explanation given for won’t fix is very casual and assumes a highly normalized database design. Turns out, real life ain’t that perfect with tables and relations so very clearly defined.

I don’t know what am supposed to damn for this, the dogmatic relational model whose chosen tradeoffs doesn’t make much sense in today’s cheaply available storage media or the set of compulsive habits, picked up by programmers(including me) following and depending on the relational model. And as the outrage subsides, quiet despair settles in sneakily…

Software Development–introspection

The more i get into quick s/w development the more i realize that one of the necessary conditions in s/w product development has become that of minimal state in the mind/memory(STM)….And naturally wonder if that has anything to do with the cultural differences between asian vs american cultures… it’s rather known that american culture is the least context dependant,..
Wonder if that’s the reason Indian s/w companies are more into consultancy works than product development..