I wanted to make my laptop running Ubuntu automatically mount a Samba share whenever it connected to my wireless home network. I quickly discovered the
/etc/network/if-down.d folders which contain scripts that are run whenever a network interface is started or stopped.
I devised the following simple scripts to mount and dismount the share when needed:
Several times before, especially while developing applications for Android, I have found myself (re)implementing TCP clients and servers in different programming languages, most notably Java for Android clients and Python serverside. Everytime a new message or parameter had to be implemented, this would mean writing (or at least copying) a lot of boilerplate code... twice - once for each language.
In order to make things a easier for me, and honor the DRY (Don't Repeat Yourself) principle, I came up with the idea for a way to define network communication between clients and a server regardless of the programming language(s) in which the client and server would be implemented.
Therefore I am proud to annouce the Network Protocol Specification Language (or NPSL), currently in version 0.1. This early version is capable of outputting both a client and a server in Python (of course, more languages will come later - I am currently working on Java), who are perfectly able to communicate through the defined network protocol.