Jan 112016
 

Watching the 32c3 conference videos for free (which is relevant), and coming across the inevitable “the Internet is dead”, “corporations have bored the spirit of the Internet to death”, etc. It’s a pretty common meme amongst those who somehow believe that the Internet used to be free.

The Internet was never free, but it did have the appearance of being free.

Of course we have become used to paying for access to the Internet, but that monthly payment to the ISP doesn’t pay for the Internet as a whole. As an example none of the money you pay your ISP reaches me to help me pay for the server this web page is on. Supposedly I can ‘monetise’ your visits by publishing adverts on my web site; in practice it doesn’t. At least not for low traffic sites.

And things like Facebook or Twitter do cost lots of money to run; enough that many of the large successful companies took a long time before they became profitable.

Of course I’ve been concentrating on the monetary meaning of “free” but this applies to a certain extent to the other meaning of free – you can’t post content to Facebook that they don’t agree with (although in practice very little is censored with the main victim being pictures of breastfeeding). A company like Facebook is in this game to make money and whilst they are not going to censor your content for no reason, neither are they going to fight too hard for your free speech.

In the end you can only exercise your freedom of speech on your own servers. But with the exception of a few weirdos like me, most of us are not keen on running servers.

All normal people want to do is run an application that lets them “do stuff” and the conventional way to implement an Internet application is for an application running on the person’s desktop to speak across the Internet to a server – for example the web works this way. The big problem with such an approach particularly when something like Facebook becomes almost ubiquitous is that you are giving a large central organisation a lot of data about yourself.

Of course everyone who is not up to anything nefarious is not bothered by that, right? Well perhaps, but there are other aspects of sending all your data to a company who desperately needs to monetise your data and your eyeballs. Such as targeted advertising. And worse.

The conventional way. There are of course what could be called unconventional applications that communicate across the Internet without a centralised server managing it all. These are commonly called “peer-to-peer” (or P2P) applications and are commonly used to share files; very commonly files that the copyright owner would rather not be shared (films, applications, music, etc.). So P2P has a bit of a rogue reputation.

But it is merely a means for communicating and does not dictate what is communicated. There is nothing to stop someone from implementing a P2P-based application that communicates “posts” that are the equivalent of Facebook posts. Such an application :-

  1. Would continue to use the web browser as a display engine.
  2. Run as a separate “service” on the desktop to send and receive P2P posts in the background; displaying relevant ones on request.
  3. Automatically encrypt all postings so that they can only be decrypted by the relevant audience. Keep the automatic encryption hidden to avoid scaring those who just can’t be bothered with all that.

Of course as I am not going to be writing this (I simply don’t have the time), I have no right to say how it should be written! But writing such an application would be very beneficial if we could persuade people to use it rather than the monolith that is Facebook. Unlike some people, I don’t believe that Facebook is intentionally evil, but because of the centralisation of social networking in the hands of Facebook, it has the potential to be evil.

Those who want the Internet to be free (as in freedom) need to put their money where their mouth is and write the code.

Rusty_Padlock

 

 

Jan 052016
 

A bit of a simple one this … if you are looking at converting an Intel hex format file that looks like the following :-

2016-01-05_2123

Then it is relatively trivial under Linux (Debian). The relevant tool is probably installed anyway; unless you are not compiling software which may be a marginal activity for weird people but so is converting ihex files. But just in case, you can install it with: sudo apt-get install binutils.

Once installed (or being already present) the conversion process is as simple as :-

» objcopy -I ihex -O binary somefile.hex somefile.bin

Be careful to specify the second file name or objcopy will overwrite the original hex file (don’t ask how I discovered this!).

Dec 102015
 

damascus-unix-prompt

You have a a column of numbers that you have produced in some manner such as :-

$ awk '/clean message/ {print $(NF-1)}' mail.info.log
...
100935
12197
3606
84653
4498
99110
4762
3001
10889
12611
12249
12245
136599
49097
6668

And you want a quick and dirty way of finding the largest number. Well there is a way but it is perhaps the least efficient way to do it, and that is to sort the numbers into numerical order and use “head” to display the first one :-

$ awk '/clean message/ {print $(NF-1)}' mail.info.log | sort -rn | head -1
5476168

But frankly there must be a better method. And yes there is if you happen to be using zsh (or possibly others, but this has been tested with zsh). Simply iterate over the values assigning the current value to the “max” variable if the current variable is larger :-

$ max=0; for x in $(awk '/clean message/ {print $(NF-1)}' mail.info.log); [[ $x -gt $max ]] && max=$x; echo $max
5476168

You may be wondering why I don’t simply use the ability of awk to perform calculations. Well that is certainly possible, but I may not always be using awk to produce the numbers in the first place, and this is supposed to be a generic recipe.

Nov 142015
 

See an updated post here.

I am obviously doing something wrong because computers are not supposed to behave like this, but my Linux containers (despite previous attempts) are booting with IPv6 privacy addresses randomly :-

✓ root@pica» lxc-ls --fancy | grep chagers
chagers   RUNNING  10.0.0.32  2001:8b0:ca2c:dead::5e11, 2001:8b0:ca2c:dead:f42b:6dff:fe16:2f2d  YES        
✓ root@pica» lxc-stop --name chagers; lxc-start --daemon --name chagers
✓ root@pica» lxc-ls --fancy | grep chagers
chagers   RUNNING  10.0.0.32  2001:8b0:ca2c:dead:206b:70ff:fe45:7242, 2001:8b0:ca2c:dead::5e11  YES        
✓ root@pica» lxc-stop --name chagers; lxc-start --daemon --name chagers
✓ root@pica» lxc-ls --fancy | grep chagers
chagers   RUNNING  10.0.0.32  2001:8b0:ca2c:dead::5e11                                         YES        

That is not how computers are supposed to behave!damascus-unix-prompt

Nov 132015
 

There was a story this morning about how normal people find a constant flood of emails very stressful because it is constantly interrupting whatever they are doing. As someone who has been emailing since 1987 (with a six month break), I find dealing with it less stressful than phone calls and desk visits because you can leave it until later.

It is definitely true that being interupted whilst trying to concentrate on some tricky piece of work can be somewhat stressful (and it is cumulative). One aspect that was not mentioned is that you have to discard everything you were thinking of and bring some other subject to mind; not always the easiest thing to do especially if you are deep in concentration.

Of course it is also unavoidable, and not always unwelcome. But back to emails,

Don't read emails when they arrive, and if you have a ping that announces each email that arrives, turn it off. Check your inbox regularly – on the hour, every half hour, or even every 15 minutes (although that is perhaps too frequent for when you are concentrating on something). You can change the frequency based on what you are doing – if you're concentrating on a project or for a deadline, check less often.

The point is you choose when to deal with emails.

Another source of stress is the amount of emails in your inbox; your inbox is not a "todo" list. Create a "todo" folder and move emails from your inbox into it, and concentrate on keeping that folder reasonably well processed. Your inbox becomes a cesspool of spam (there's always some that gets through), near-spam, and general information. Of course you can get much more organised than this!

And make your own decision on the priority of tasks given through emails. You may agree with the priority a sender sets on a task, or you may disagree, but you decide. 

Ultimately the more control you take over your email, the less angst it causes you.

damascus-unix-prompt