Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming

Journal MarvinMouse's Journal: What is Modular based coding? (pseudo-evolutionary code)

I was thinking about Open Source projects and while I love them so much, and I realized that all of the projects I use follow one very simple paradigm - Modular based coding.

You may ask, what is modular based coding? Well, it's a program where every part is an independent entity. Ie. there is a part that handles POP communications, and a part the handles the gui, and a part that... well, you get the point. Yet, I am not saying that these programs are just libraries and OOP style code. No, they have the neat feature that (almost like lego blocks) you can pick and choose which style you want and then they all just naturally piece together into one beautiful whole.

Now, this is a neat trick, because anyone can now use the same general components and easily customize their system to work perfectly. For example, I like minimalism, so I use Enligtenment as my windows manager, and make my Term window in the background. Another example, a friend of mine likes a Windows like environment, so he uses KDE 3.0 (I think) and has it customized to look exactly like windows.

You see, each person has an option that allows them to make their computer exactly the way they want. Since I am from the old days of DOS and all I don't mind having a terminal, and actually I find myself having a higher productivity. My friends who have always been using Windows, they prefer the more "windows-like" environments of KDE and Gnome. And since the Windows Manager is just another module to the whole of the OS, they can do that and our programs will still function together easily.

Now, I call this style of modularity, pseudo-evolutionary code. I got the idea from when I was watching a field of flowers one day. I realized that each one of the different type of flowers looks completely different, and yet the bees that take the nectar from the flowers have no problem (With most of them), and then again, one more level up, I noticed that there were many types of bees, each one suited to a different purpose, and they all functioned smoothly together because evolution "discovered" that the best way of having a system that works well through many different situations is to make it very diverse and yet still have every part interchangable with the rest.

The OS projects I use commonly follow this paradigm. There are multiple different "flowers" that each do their own job and are applicable, yet they all generally work well together. There are multiple different "bees" that work with these "flowers" and again they all generally work well together. You can keep on going, and discover that the reason OS is working is because OS follows the paradigm of diversity with interactivity, while commercial software follows the paradigm of diversity without interactivity for the benefit of profit.

Perhaps its time for companies to start programming modular systems like the OS does, and then having "distributions" that take these modules and release them as a useful whole, distributing the profits to the module makers.

This has some major benefits over the current system.

First, a company only has to work on a small part of the larger whole, and thus they can make sure that their part functions to its optimal point so it will be preferred over other similar modules.

Second, the consumer gets the benefit of having exactly the system they want, instead of the system forced on them.

Third, since there is lower costs (modules are easier to program and debug then entire systems), and the possibility of higher production (you can make lots of different modules. For example, Microsoft could release probably about 1000+ modules and make a killing because then even if people didn't want their "entire" OS, they would still like to have some of the modules (like interfacing modules that work with MS Protocols. :-) )

In the end, it's just a good idea. Modular based coding, if properly done, could provide a very happy and good future for tech companies and the consumer.

This discussion has been archived. No new comments can be posted.

What is Modular based coding? (pseudo-evolutionary code)

Comments Filter:

As long as we're going to reinvent the wheel again, we might as well try making it round this time. - Mike Dennison

Working...