aporem.net

the web of questions
  • Home
  • About
  • Links
  • Contact

Test coverage

andi | 2007/10/31

Testing, especially when doing test driven developement, is only effective if the tests cover 100% of the code, i.e. running all tests means all of the production code has been executed.

But coverage testing is not so easy as it seems. One can give simplistic examples which have 100% test coverage but still are buggy. The reason is simple: branching (and combination of paths) can produce a plethora of possibilities. But once every line of code is executed once, by definition, the coverage is 100%, although not every permutation has been tried.

An introduction to this topic can be found in Ned Batchelder’s blog, more at Wikipedia and here.

Comments
No Comments »
Categories
Programming
Trackback Trackback

Over-engineering

andi | 2007/10/30

A roundup on the old struggle between too simple and too complicated development strategies: On the one side there are the quick fixes on the other the overly perfect designs. Obviously, these extremes are rarely reality but a constant threat to every project.

Keeping the design simplicistic means risking extensibility and maintainability. Even though it’s easy now, no one will remember the ad-hoc decisions made during coding.

The opposite extreme is over-engineering, the fiddling with the design to make it even more pluggable or extensible or use the newest patterns. Especially seasoned developers are prone to this behavior.

To counteract these extremes and in particular the second there is the “Make it Work First!” motto. It helps to get a first look and feel of the program while requiring to keep an eye on the ease of refactoring since the first version will have to be modified almost surely.

Comments
No Comments »
Categories
Programming
Trackback Trackback

History of Reverse Engineering

andi | 2007/10/22

I like this very personal history of reverse engineering and the suggested test driven approach taken by S. Lott as a solution.

The idea is to extract an object structure from procedural code, cover it by unit tests to ensure its functionality and then take on the next piece of code. The question the author puts up, if this really is test driven in the strictest sense. I would not be this picky about it, since reverse engineering is a far more painstaking process than starting from scratch.

Comments
No Comments »
Categories
Programming
Trackback Trackback

Context-Switching in our Schedules

andi | 2007/10/20

Like with computers, multi-tasking is a mere illusion for humans. There are not so many things one can do simultaneously at any given time. So we (computers and humans, especially when in front of the machines) have to simulate it by constantly switching from one task to another and then back again. But these context-switches cost time and energy, giving an upper limit of how well we can put up with more than one thing to do. And in contrast to machines our context switching is dependent on the complexity of the task we want to jump into and of its familiarity with the task we are trying to get out of.

It is then not very surprising that if we cram in our daily schedule lots of different things, little gets done. What is surprising though is that neither the project planning tools nor any of the calendar programs allow to schedule for these context-switches in an easy straight-forward way: there is no benefit in trying to schedule as large chunks as possible for any given task, so they create the illusion that 5 times one hour is as productive as one times 5 hours work!

So back to your schedule and tidy up!

Comments
No Comments »
Categories
IT
Trackback Trackback

Parallel Problem of Choice

andi | 2007/10/10

There are quite a few parallel programming environments around: MPI, OpenMP, Ct, HPF, TBB,Shmemm, Portals, ZPL, BSP, CHARM++, Cilk, NESL, PVM, Pthreads, mpC, Tstreams, GA, TPIE, UPC, Titanium, Parlog, Split-C …

This creates a problem of choice for programmers, where one can argue that less choice would be beneficial; that it would allow to focus on improving the remaining languages.

An other argument is that a new and hence “yet another” parallel programming language will solve the problem.

This alone is an example of the problem of choice.

Comments
No Comments »
Categories
Programming
Trackback Trackback

There may be dragons

andi | 2007/10/09

I found this little game which tries to teach dragons to survive with genetic programming the assault of the player.

It’s not working as desired (the dragons don’t team up and chase the player) but this makes it even more interesting. There are several flaws in the setup:

  • Genetic programming does not create complexity by and on itself. The less input/initial instructions you pass to your agents, the more thought has to go into the genetic (i.e. reproductional) part of the code.
  • The rules must enforce an active behavior. In this case, running away from the player would be a very good option for the dragon, since it is not punished for running, only for getting killed.
  • The calculation of the individual fitness has to be tailored to the problem. If a dragon is killed in the first few rounds because it was put right next to the knight, it is considered less fit than his peer at the other end of the game field.
  • There is no possibility to learn form encounters with the player: if he strikes, the dragon is slain. The dragon can not come up with a strategy in this short time.

But hey, it’s a good place to start and experiment with the code.

Comments
No Comments »
Categories
Programming
Trackback Trackback

This is SOA

andi | 2007/10/06

So what is SOA? — beside a neat three letter acronym?

It is the idea to get the business logic and the data separated and available over the network. Basically. But there’s a row about what it really is. — So go, read for yourselves!

Comments
No Comments »
Categories
IT
Trackback Trackback

Histogram Picture Maker

andi | 2007/10/02

Data can be interpreted in unforeseen ways: imagine to hide a picture in the histogram of another!

The idea is great and so is the online tool to generate those.

Comments
No Comments »
Categories
Programming
Trackback Trackback

Navigation

  • Editorials (10)
  • FreeBSD (42)
  • IT (42)
  • Programming (56)

What I'm reading

Blogroll

  • Christoph Weber’s WeberSeite
  • Mark Hofstetters Homepage
  • Quics
  • Radausflug Panamericana
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox