Search And Destroy

Look out honey, ’cause I’m using technology!

Archive for the ‘Rants’ Category

Homeless Again

Posted by kilfour on September 2, 2011

It has been a while.

Kind of takes me back to my busking days.

But thanks too my innate ability of not getting stressed out about anything, I am once again in this (for most people) non-enviable position.

Fortunately I’ve got something lined up soon.

But I must say, it does feel as if a weight has lifted of my shoulders.

A lot of useless stuff I accumulated over the past couple of years has been sold or just simply thrown away.
This includes dvd players, tv’s, lot’s of technological gadget’s, my kids stuff that they don’t care about anymore but that were still floating ’round, lot’s of rodent cages and accessories that I once used when I was trying to train a bunch of gerbils/rats etc …

And I kept only what I value most (a guitar or two-three, my macbook, some clothes, …)

I really wish I could get rid of the car aswell ;-) .

I’ve told this story a number of times, but a long time ago we used to hang out in this one guy’s place.
He was the only one with a regular job.
At one point he got a vcr recorder (yep it’s quite a while back).
So we ended up watching movies in his place quite often.
And then it broke down.
Everybody was ticked off.
So he send it in for repairs.
A week later he got it back, walked into the apartement, hooked it up and we started watching a movie.

Half way through he got up, yanked the ‘ken thing out and threw it out of his window.
Seeing as he lived on the fourth floor not much was left of it.
Everybody just stared at him and one person asked : ‘What did you do that for?’
He replied :
Before I had the ‘ken thing I was happy.
When I bought it and it worked I was happy.
When It broke down it made me unhappy.
I don’t like it when _things_ make me unhappy, so I reckon I’m better off without it.

Let go, …, just, … let it go.

Posted in Rants | Leave a Comment »

On Having Fun

Posted by kilfour on August 27, 2011

As mentioned (often) before, a while ago I took a break from professional programming.
During which I started honing my functional programming skills.
I reckon’ I was, and still am, quite proficient in OCaml.

After that I got really interested in Haskell, so I experimented.
But the unforgiving nature of the type system was really hard to deal with and I had a lot of trouble implementing anything usefull.
I managed to pull some things off, but really didn’t get why.

Recently I have picked it up again, and it’s all starting to make sense.

Still having trouble making stuff compile and getting things to work.
The fact that I’m using a different setup/IDE/OS than before, probably isn’t helping.
But I’m really, _really_ having fun with this.

Currently looking into Happstack/HStringTemplate/et-all in order to deliver a simple web app, and I was quite proud of myself that I got a ‘hello world’ working with minimal code, and that I actually understood all of what is going on ;-) .

Another thing that I’m currently investigating is Parsec, Haskell’s built in parser.
Delivering the power of regular expressions _without_ sacrificing readability.
It is not that much more verbose than that horrendous regex stuff, but I can actually program it without having to resort to some kind of tool that translates it for me.

Here’s a small (unrelated to all of the above) thing I cooked up :

module FileCompare (
    fileDiff
) where


import System.IO (readFile)

failure :: Int -> Int -> String
failure lineIndex colIndex  =
    "Files differ at line : " ++ (show lineIndex) ++ ", column : " ++ (show colIndex) ++ ".";

compareLine :: Int -> Int -> String -> String -> String
compareLine lineIndex colIndex [] [] = 				    ""
compareLine lineIndex colIndex (x:xs) [] = 			    failure lineIndex colIndex
compareLine lineIndex colIndex [] (y:ys) = 			    failure lineIndex colIndex
compareLine lineIndex colIndex (x:xs) (y:ys) | x /= y = failure lineIndex colIndex
compareLine lineIndex colIndex (x:xs) (y:ys) | x == y =	compareLine lineIndex (colIndex + 1)  xs ys

compareLines :: Int -> [String] -> [String] -> String
compareLines lineIndex (x:xs) (y:ys) = 	(compareLine lineIndex 0 x y) ++ (compareLines (lineIndex +1) xs ys)
compareLines lineIndex [] (y:ys) = 	"File two contains more lines then file one."
compareLines lineIndex (x:xs) [] = 	"File one contains more lines then file two."
compareLines lineIndex [] [] = 		"Files are identical."

diff :: String -> String -> String
diff a b = compareLines 0 (lines a) (lines b)

fileDiff :: FilePath -> FilePath -> IO String
fileDiff f1 f2 = do
  fileOne <- readFile f1
  fileTwo <- readFile f2
  return $ diff fileOne fileTwo

Performance equals a C++ version and it can easily handle huge files.

Tell me what you think.

For the imperative minded : start reading at the bottom and then move up ;-) .

Posted in Haskell, Rants | Leave a Comment »

One of Those Nights

Posted by kilfour on August 24, 2011

QuickGenerate suits my needs for the moment.

QuickDotNetCheck still isn’t working the way I want to, but I’m going to let it rest for a little while.
I’ll probably iron out a couple of bugs I have recently introduced, so that I can start using it full-time at work.
But after that I’m going to let the idea ripe in my head a little.

So what to do for fun at home.

And then there’s Haskell…

Particulary interested in getting some web-related stuff working.

Posted in Haskell, Rants | Leave a Comment »

On Scientific Arrogance

Posted by kilfour on August 23, 2011

It is not a new thing.

There’s a reason I prefer Alan Kaye’s publications over Edgar Dijkstra’s, f.i.

I think it has to do with pragmatism versus arrogance.

When I was in my teens I read about relativity theory.
For fun.
And because I wanted to be the smartest kid on the block.
In those days, it wasn’t exactly common knowledge, and I did have a lot of fun hassling my science teachers with questions they couldn’t answer.

Recently, I’ve noticed, relativity is far more widely understood, and most people coming out of university have a much better grasp of it than I do.

After reading all that, I took some things as axioms :
– nothing travels faster than the speed of light.
– there is no such thing as action at a distance.
– nothing, not even light, can escape a black hole’s gravitational field.
– the conservation laws (notably the second law of thermodynamics, and conservation of baryon number)
– etc…

Most of these things have been proven wrong by observation in recent years.

So theories were adapted, or thrown out completely, as they should be.
Although the latter option does happen less and less.

The one thing that annoys me up to a point of boiling anger, is that some ‘scientists’ seem reluctant to accept an alternative view and even ridicule it, until a ‘peer’ higher up on the pecking order tells them that’s it’s actually a viable idea.

Just visit some of the physics forums for some ‘discussions’ that make some of the net storms in the software blogosphere seem like a friendly exchange of ideas.

The holographic universe theory (and even more so the holographic mind theory) was regarded as fringe theory for a while until some respected scientists got behind it.

Just to make things clear, I have serious apprehensions to above mentioned hypothesis’s (see my previous post), but I would never have to arrogance to debunk it, because I realize I’m not qualified to do so.

Yet, people who have studied longer than I have and should understand the math, seem to have no problem in doing so (debunking it I mean) on just first glance.
And they often employ the same unscientific methods that they accuse the other party of using.

Being just an interested laymen, I’m looking for an objective, scientific approach to the theories/models I’m interested in, and this is really hard to find.

Engelbarts dream seems further off than ever.

And here’s one thing that _really_ ticks me off.

The Crackpot Index, by John C Baez.

The next phrase should be read whilst imagining mr brando in ‘Apocalypse Now’.

‘The Arrogance, The Arrogance, …’.

Posted in Rants | 1 Comment »

My Favourite Scientific Principle : Occam’s Razor

Posted by kilfour on August 23, 2011

One should not increase, beyond what is necessary, the number of entities required to explain anything.

So please, science dudes, get a grip.

Posted in My Favourite, Rants | Leave a Comment »

The Computer Revolution Might Be Happening.

Posted by kilfour on July 26, 2011

Reference : The Computer Revolution Hasn’t Happened Yet.

Posted in My Favourite, Rants | Leave a Comment »

On QuickGenerate Versioning

Posted by kilfour on July 26, 2011

QuickGenerate 0.5 aims at having a stable implementation.
QuickGenerate 1.0 aims at having a stable interface.

Feel free to get involved ;-) .

Posted in QuickGenerate, Rants | Leave a Comment »

Collective Ownership of Code/Test-Code

Posted by kilfour on July 26, 2011

It do believe I raised this point allready in the past, but, very recently, I have been confronted with yet another in the wild example.

Summarrizing :
The app’s code is free game.
Feel free to change and improve at will.

Changing the tests requires a bit more responsibility.

Somebody wrote that test for a reason, you can’t just delete it and expect everything to go right after a code change.

The recent example I’m refering to was a positive experience actually.

Posted in Rants | Leave a Comment »

Crying Like a Fire in the Sun

Posted by kilfour on May 21, 2011

When I first started out as a ‘professional’ programmer, I was quite lucky to be able to function in a (in retrospect) very protective environment.

I was able to deliver business value without to much hassle involved and getting right down to Puroguramingu, Mazaafakkaa most of the time.

Two of the projects I delivered in the first two years of my ‘career’ still stand out on my c.v.
And rightfully so.

Ofcourse this success got noticed.
My hourly rate went up, and I ended up being sold to ‘enterprises’ who pretty much tied my hands behind my back.
Delivering anything usable got almost impossible, but my employer wasn’t at all worried, because I was bringing in the dough.

After a (very short) while I got really fed up, quit my job and opened up a hotel in Germany.

Now that didn’t work out all that well, but during this time I learned about SmallTalk, Unit-Testing, Refactoring, etc…

When I got back to Belgium I started working for the same firm, but this time I took an XP approach.

I did a small project for a large financial institute, XP-style, and I had a blast.
It was quite a success and ofcourse it got noticed, and thus consolidated.
After that it was back to : ‘sit on a chair, keep your mouth shut, and bring in the dough’.

So I got fed up once again, quit my job and decided to have another go at reviving my musical career.

That didn’t work out too well either, what with CD sales no longer bringing in the bread, and me not being able to cope with touring and all, …

So once more I got a job as a programmer, for a different firm this time.

The first year was actually pretty cool.
I got to write some middle-ware stuff for a CPlex based solution.
Again it got noticed, again I was put on some ‘high profile’ projects and again I ended up sitting on a chair, bringing in the dough for the company without actually delivering value.
And again my employer wasn’t all that worried.

And again I got fed up.

I figured, there must be a firm out there that has a place for a hard-headed guy like me, so I started looking around.

So last year I switched jobs once more.
I chose (as much as they chose me ofcourse) this particular firm mainly because the people who interviewed me were very, very interesting.
One of them was the ‘boss’.
I was taken aback.
I had never heard anybody in that kind of (management) position take a stand for quality in software before.

The other guy that interviewed me, was one I got to work with on the first two projects, and I had a blast.

But here I am now, once again, sitting on a chair, from 9 to 5, bringing in the dough, and not delivering.

I don’t know how it it works outside of Belgium/Germany/The Netherlands/Luxemburg/France, but over here our industry is in a very sad state.

Posted in Rants | Leave a Comment »

QuickGenerate : The Competition

Posted by kilfour on April 21, 2011

As I stated before, the QuickGenerate lib is a side effect from my interest in property based testing.

At the time I could not find anything suitable to fill in for the part of QuickCheck’s Arbitrary class.

So I rolled out my own.

And for me, it does all it that it is supposed to do.
Keep in mind that I’m not using this to populate databases,
Keep in mind that I’m not using this as builders in my unit tests.
I am using it to supply quickdotnetcheck with shrinkable input.

Well, I lied, I do use it to populate databases and all that, … these days.
But the point is, that was not the goal.

A while ago I said to a colleague : ‘If I had known about NBuilder while I was writing QuickNet, QuickGenerate would probably not exist’.
Today I reckon that ain’t true.
I would have run into an issue sooner or later because the goals of both libs are too different.
That applies too all others mentioned below aswell.

NBuilder :
Cool api, mature lib. Probably the easiest one to use. Struggles when used in tests (I think it’s likely that this wasn’t the main focus of the project).

AutoFixture :
Really aimed at simplifying your test code. It offers (amongst a lot of other things such as auto-mocking, f.i.) random data generation in order to implement the test data builder pattern (shines in unit tests).

AutoPoco :
A co-worker of mine recently pointed out this one. It looks really powerfull. And thanks to aforementioned co-worker, who submitted a patch recently, it now has a feature which quickgenerate just can’t produce. Once again, … thank you Jan ;-) .

There’s propably others.

I think most, if not all features of ‘the competition’ can also be achieved reasonably painlessly with quickgenerate.
And most, if not all quickgenerator features can also be achieved reasonably painlessly using one of ‘the competition’ libs.

So whichever one you prefer using, depends on your goal.
And on how close that relates to the goals of the respective lib.

Posted in Rants | 1 Comment »

 
Follow

Get every new post delivered to your Inbox.