Search This Blog

Friday, 15 February 2019

Why "The Cloud" is the bottled water of the Internet

I have been "on the Internet" since before most people had heard of it, and certainly well before the "World Wide Web" was invented. As a nerd, a geek, an early adopter and a technical purist (some would  - rightfully,perhaps - say "pedant")  I groaned when "ignorant " folk said "Internet" when they really meant "world wide web"...

It didn't take long for the two to become synonymous as the backwaters of the Internet wherein resided archie and gopher and ftp and smtp and pop3 etc were subsumed into the great beast that was "the web". "The web" -  where you could read email in a browser! And download files - from a browser! And....etc ....from a browser! OK, OK, I give in, I'll stop calling it the "world wide web" and start calling it the "Internet" just to make you happy even though I know it's wrong, but I insist on keeping that capital "I", ok???

What I will not do, no nay never is call it the fucking "cloud". And yes, I'm angry about it.

For one small moment after the execrable a*hole from marketing / sales invented this meaningless term (can you tell I don't like it, yet?)  - for one tiny, small, fleeting, worrying  moment - I thought "the cloud" was something new that I needed to know about. I had a huge technological FOMO experience and rushed to find out what it was. What I found was - if you'll excuse the expression - a cloud of obfuscation, buzzword bullshit bingo, marketing jargon and management-speak for (cough) - the Internet. Or, as I saw in recently in someone else's facebook post - in a rare moment of clarity for that platform - "someone else's computer".

Yep, that sums it up nicely. "The Cloud" is a salesman's invented concept to sell you access to someone else's computer that you don't actually need. To get that access, you use the Internet, but thats all too technical and and complex, so we jsut say "In the Cloud". As in where your head must be when  you buy bottled water.

In most developed nations, or indeed any country where the water is safe to drink, paying for bottled water is the result of a marketing man's greatest wet (literally) dream: Get people to pay for something they already get for free. Package it in toxic, planet destroying plastic, invent a sexy deceptive name evocative of cleanliness, purity (yeah those same requirements for the stuff that comes out of your tap) and charge money for it to gullible suckers who think it's different from the stuff that comes out of their taps - which is perfectly good anyway - when sometimes it's even the same stuff out of the same tap.

Yes, there have been several documented cases where unscrupulous* operator have taken mains water , bottled it, given it a fancy name and sold it at something like 10gazillion percent markup. The same stuff. People actually pay money for the same stuff that comes out of their taps. *It makes it hard to call such operators "unscrupulous" when the general public is so dumb and lemmingly free with their money...what next? Getting people to pay to wear your advertising logo on their clothes and shoes...damn, that ship has sailed...

Seriously, any time I see anyone buy bottled water I want to punch them really, really hard. I get a similar twitch when I see branded clothing, but that's less than it used to be.

Some may say that the music business are the kings of "reinventing the format" to make you pay again for what you already own - and that is true, but at least something has changed each time: CD was more robust and less scratch-prone and hissy, mp3 is waaay more convenient and portable etc

Neither bottled water nor "The Cloud" have that redeeming feature, both are actually worse than the equivalent you already paid for: either by pollution in the former case and massive security isses in the latter. But the principle of "pay up, pay up, and pay up again" is the same driver behind them all.

In the (g)olden days, you paid for a cardboard box with a CD and a manual in it. For "paid" read " often a very large sum of money" - but then you could sit back and use it for many a year. The provider could no longer milk you. Solution? Put it "in the cloud" and charge a subscription, now you are hooked into them for life. Open your wallet and repeat after me "Help yourself".

You would, of course, need to invent some reason why it was better - especially if it wasn't - but that's what marketing and sales are best at: fancy new names for the same old shit, subterfuge and glitz to part you from your hard-earned cash. Now you have been duped - sorry - persuaded to put your private data onto somone else's computer - sorry "in the cloud" you need security, privacy protection, backup etc etc all of which - of course - cost more. Its brilliant if you are a provider, bullshit if you are a consumer. Unnecessary, expensive bullshit at that.

A lot of brilliant, resourceful and respected people invented the Internet. No technician ever had a hand in inventing "The Cloud".

Remember, it is just "someone else's computer". Personally I prefer to keep my data on my own computer - its cheaper, and I'm not going to go bust or disappear overnight or sell all my data to the highest bidder or get specifically targeted by hackers...

"In the Cloud" = "On someone else's computer".


Monday, 4 February 2019

Esparto V3.0 nears release

Esparto v3.0 will soon be released: here's a little taster of the pin types available - v3.0 allows you to add them at runtime with no programing!





"Stupid" code examples and WiFI startup times

I frequently moan about the standard of example code "out there". I also roundly deride the "standard" technique of using WIFi.begin in setup() as opposed to monitoring WiFI events... The main reason being that the former requires a reboot in the event of router / net failure and will almost certainly hang or crash + reboot cycle. The "sensible" method can continue to run hardware and simply reconnect automatically when the router comes back up... I have also known that the startup time is longer in the "stupid" version, but never got around to actually measuring it. The reason I call it it "stupid" is because DOING NOTHING AT ALL works just as well, i.e. the code is utterly redundant as well as being slower! While shaving nearly half a second off your start time may not seem amazing, how about shaving 3.35 seconds off? Since the sensible method start running the loop almost immediately after setup, your critical hardware is up and running in microseconds, literally (716 in the code that follows) whereas the "stupid" method cannot start the loop until it has connected - in my house about 3.3secs. The actual values are here: Stupid LoopStart Sensible Loop Start 3502034 3502043 3019311 715 3001939 3001948 3012237 714 3002018 3002027 2925192 718 3502023 3502032 2908446 718 3502016 3502025 3011961 714 3502019 3502028 2927768 716 3001946 3001955 3013314 718 3502024 3502033 2922075 715 3502023 3502032 2909590 719 3502020 3502029 2921998 715 AVG 3352006.2 3352015.2 2957189.2 716.2 Diffs: WiFi 394817 Loop 3351299 So, the sensible method is 0.4s faster to connect to WiFi, 3.35 seconds faster starting the "real" code...is less code to write and allows automatic re-connection whereas the other usually crashes or hangs... Dr Phil's surgery is now open to listen to anyone who would care to justify using the "classic" method...

#include <ESP8266WiFi.h>

uint32_t baseline = 0;
uint32_t loopStart = 0;
volatile uint32_t connected = 0;

#define STUPID

#ifdef STUPID
const char* method = "stupid";
#else
const char* method = "sensible";
void onWifiEvent(WiFiEvent_t event) {
  if (event == WIFI_EVENT_STAMODE_GOT_IP) connected = micros();
}
#endif

void setup() {
  baseline = micros();
  Serial.begin(74880);
  Serial.printf("T+%d WiFi startup timer using %s method baseline=%d\n",micros()-baseline,method,baseline);
#ifdef STUPID
  WiFi.begin("LaPique", "");
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  connected = micros();
#else
  WiFi.onEvent(onWifiEvent);
#endif
}

void loop() {
  if (!loopStart) {
    loopStart = micros() - baseline;
    Serial.printf("T+%d Loop started\n",loopStart);
  }
  if (connected) {
    Serial.printf("T+%d WiFi was connected after %d uSec\n", micros()-baseline, connected - baseline);
    connected = 0;
    ESP.restart();
  }
}