Should the language shape the mind ?

I've read an interesting blurb from Lera Boroditsky (Cognitive Psychology & Cognitive Neuroscience, Stanford University) in Do our languages shape the nuts and bolts of perception, the very way we see the world?, where the basic answer is: yes, languages not only influence our way to interpret information, but also they way we perceive it.

There is an often quoted phrase in the programmers circles:
When the only tool you have is a hammer, everything looks like a nail
,which basically states the same thing: the languages we programmers know and use influence the way we perceive reality.

That's a dangerous thing, because languages (programming languages) were only supposed to help up interpret information. Skewing our perception means we obviously don't even notice the wrong path we've taken.

Being multi-cultural -- that is, knowing multiple languages -- helps, as these may overlap and give you various perspectives on the information and thus make a better representation of the information. The end solution is also most likely to be better.

But I often wondered: shouldn't we at some point just stop trying to force our thoughts into some language and just start expression into another language altogether ? Into our language ?

Sure, learning a language might bring some "discipline" into minds; using it might help up programmers get along with each-other. But in the end a language should just give a programmer some new perspectives. The output should still be in our language.

I assume this is the reason most people think everybody else's code is shit: their internal interpretation doesn't map with the mapping inside the other programmer's brain. A younger you produced a lot of bad code by your current mapping.

Which basically means we are utterly unable to find a way to fully express our thoughts in a way other people would understand, agree and like. And by like I mean having a close mapping with the other (or just bring something totally fresh).

And this limitation doesn't just apply in relation with others but to ourselves.

Then, how should we function ? Each new problems brings into us a current solution with our present interpretation. Should we express this into something like a Domain Specific Language (DSL) ? Should each new problem be represented into a new Problem Specific Language ? (And sure, maybe PSLs at a given time might have something in common as they also represent us).

So what means that some code looks like shit then ? It means the chosen PSL is incomplete, somehow flawed or just not elegant enough compared with our current PSL. Rarely does code look like shit if we like the PSL and the solution is somewhat broken -- then it just has bugs or is incomplete, but we fix it while following the given PSL.

Won't this make cooperation really hard ? Well, not really as cooperation might change the PSL for the better. It will also force programmers to slow down a bit and try to first understand the PSL before understanding the solution. We do this anyway as even while using a common language there is always a meta-layer programmer-specific; only that this layer is sometimes obfuscated by the language used instead of being very prominent like in a PSL.

Maybe general purpose programming languages should stop existing and be replaced only by programming paradigms and concepts.

NetBeans Platform autoupdate via BitTorrent

Something I'm pursing nowadays is having my platform applications as decentralized as possible.

And the fist pet peewee I had is that fact that the Update Centers are such, big, centralized, monolithic blocks.

I always assumed that I would need to hack the AutoUpdate module from the NetBeans Platform quite hard in order to get what I wanted all along: BitTorrent downloads for new or updated modules.

So, the first thing we have to notice is that the AutoUpdate Catalog (see DTD) provides for each module in the Update Center a location called distribution. The distribution may be a relative path to the catalog location. That is usually something like ./com-example-mymodule.nbm or it can be a totally new URL.

Now we have a first step towards splitting traffic: we can put the actual NBM file on another URL altogether. Or, if we have the AutoUpdate Catalog location sit behind a servlet we could even try a bit of balancing and return a different distribution link depending on how loaded are the servers. That's a plus...

Ok, that's something but it isn't BitTorrent, you still download the whole file from a single place.

It's alive !

But what the Platform does offer is the possibility to register in the Lookup your own URLStreamHandlerFactory . So, I can register a new handler for the torent:// protocol and the AutoUpdate module will just use my stream handler.

And thus, a few hours later I have a working AutoUpdate infrastructure via BitTorrent. My StramHandler downloads behind the scenes with BitTorrent using Snark and provides a nice InputStream to the AutoUpdate module. It's still not polished but already useable. Install the module from this update center: http://emilianbold.ro/modules-updates.xml or just grab the NBM.

Something else: the destination of the module is no longer pointing now to the NBM, but to a torrent file actually which has the NBM file.

The steps are: place the torrent file on http://example.com/module1.torrent.nbm, edit the catalog to have destination="torrent://example.com/module1.torrent.nbm" and you're good to go. Behind the scenes I'll actually download the http file and then download the torrent.
<!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.3//EN"
"http://www.netbeans.org/dtds/autoupdate-catalog-2_3.dtd">
<module_updates timestamp="35/26/18/21/01/2008">

<module codenamebase="org.yourorghere.emptymodule"
distribution="torrent://example.com:6881/cc032d0c003b12568c91a0339f88301fa6ca67f5.torrent.nbm"
... >
...

A small remark: note the .nbm extension. It's something the AutoUpdate module needs otherwise it won't be able to install the file as NBM (could be a bug, I'll report it at some point).

The module still needs some extensive testing and different BitTorrent libraries (I'm using Snark, but I would like to have the Azureus core as a different provider in the Lookup maybe) but it does show it is possible.

Using the same technique one could write multiple backend/"protocols" for the AutoUpdate. Drop me a message if you want to know more or want to help me (source code will be online soon).