Showing posts with label Personal. Show all posts
Showing posts with label Personal. Show all posts

Friday, 19 May 2017

A touch of Religeon.

To begin, let me start by making my view on religion reasonably clear: I think religion is mostly nonsense, the church exponentially so…  I however think the core ideals of the religion known as Christianity are well worth upholding, and modern Christianity has the ideal of being a predominantly private choice (which in my mind makes it a prime contender for the mantle of "the one true religion").  And I do believe that the intelligent design philosophy is at least plausible.  With that in mind, on with the story…

A little debate recently happened in one little corner of my family, a new round of a recurring debate on the evolution vs creation issue.  I've heard it a few times, the argument that the chances of a species like us evolving being so very unlikely, that it must have been intentional.  But is it?  Really?

Is it really just 1 chance in whatever sized space?  In an infinite universe, even if just one in every nearly infinite number of possibilities is us, there's still an infinite number of possibilities we will exist, within an infinite space of possibilities — infinities are weird that way, and I often hear it said, and agree, humans just really are rather crappy at correctly judging extreme quantities; really small numbers like 1 in infinity, or really big ones, like that infinity itself.

And why should we be the only possibility.  While it's true we're the only us, so far as we know, would a different version of us also not think, "we're the only us"?  I think it is, perhaps, a little egotistical to think we're THAT special.  Unique, sure, but what makes us so special?  Did we achieve universal peace quicker?  Have we figured out our purpose for existing yet?  We're a million years old, on a planet several billions of years old.  What have we done to make ourselves as special as we think we are, among all the species that may or may not exist out there.

Then, even if we are indeed alone in all the knowable universe (and I kind of hope we're not, personally), there's still a fair bit more of it out there.  There is the suggestion the solution to the Fermi Paradox, is that the universe itself has an age-wise Goldilocks Zone for the creation of life, so we may just be one of the earlier species to appear in this region of the universe, and there may well be the radio bubble of another species screaming it's way towards us right now, just as ours does towards them.  And speaking of which, there may well be more us's that we'll never in the lifetime of the universe have a chance to meet, and we'll never know because the expansion of the universe is taking even their radio signals away from us too fast to reach us in time.  (And even assuming future FTL travel, that simply moves the bar, it still doesn't actually remove it.)  Assuming the universe is as big as scientists seem to believe, there's still a distance beyond which we will never be able to observe, and a far more populated region of our universe could begin just the other side of that line, and neither us nor them will ever know.

Now, does any of that make creationism impossible?  Well, before the universe existed, what was there?  If some entity was responsible for our existence, perhaps they simply chose a beginning that they knew would lead to the end they wanted.  Perhaps without even knowing how, and they're looking down thinking, "wow, look at these weird little creatures I made".  Or perhaps they did choose the one that will have us in it, with all that we are, and all that we will be.  But no matter how much you play statistician, that question, along with whether in fact an external entity was responsible for any of this at all, is for the time being still the provenance of religion, and we have only our faith (or lack thereof) for answering the question of whether religion is even real at all, or just a creation of our own making intended to make us feel a little better, and/or behave a little better too.

All I know for sure, is that if God — in any of the forms imagined by mankind — is real, and He's aware that I exist, I hope He isn't too disappointed in me.

Monday, 27 March 2017

The problem with personal projects…

I, I have to confess, tend to have a lot of unfinished or broken projects laying about.

I've done the odd bit of work for a friend, even a couple small projects by contract.  It's a different issue when you're working for someone else — be it a free, or paid — where the goals are in support of someone else's endeavour, and the reward is the respect of a job well done (with appropriate emphasis on the word done), and a pay-day to back it up.

But when it comes to my own projects … the goal is typically more so to learn something.  So I tend to find myself wondering along with only the most vague of plans, and reinventing a whole lot of wheels, partly simply to prove to myself that I can.  Though, reinventing some of those wheels are  not only about knowing how to do something, but how it actually works — it's one thing to stick a CSRF token in your web forms because your company policy tells you to, it's something else to understand what goes into that token and it's application, because you've implemented it yourself, and done the research into how and when it should (and should not) be used.  The risk, of course, is that of having done it incorrectly — but in your own projects, aimed at personal consumption, that's usually a risk well worth taking.  And besides, it's not like that same risk isn't there when using someone else's product to do the same job — the industry is littered with issues caused by flaws in well known and regarded standard implementations.  Everything from long-standing bugs, brand new latest release bugs, through to intentional backdoors, and even the odd spot of governmental interference.  Those implementations do, however, have the benefit of real life usage time, and hopefully the attention of a few experts … unlike your own pet wheel which has, well, you.

So now, while I consider it advantageous to reinvent all the wheels I can for the understanding it gives me — and I do exactly that in my own website, eschewing frameworks for nuts and bolts — there is a downside, too.  I spend so much time working at the lower levels building up the foundations, or learning to work with some new tool or functionality, I often don't get to finish the project — usually, simply because it stops being fun, I've learnt what I wanted, something else caught my attention, and/or requires the injection of funds which are needed elsewhere — so it languishes on the hard drive forgotten and unloved for months (or years) at a time.

Of more recent note, I finally decided to put the time in to add a feature to one of my more functional coding projects — one which took me ages to get around to finishing just recently — tearing into it without bothering with the niceties of version control (or even making a backup of the script first – although I could hunt down a past version if I got desperate, thanks to the working folder being on Dropbox), and then didn't finish the update.  So it's presently in a non-functional state, again.  Well, was fun while it lasted…  I used to use revision control regularly through University, and when my main PC was running Linux, keeping a log of changes, and all the rest.  So I'm certainly no stranger to it all.  I suppose it just doesn't seem quite so handy on the little bits and pieces I do these days, and doesn't seem to fit my Windows flow nearly as well.

In any case, my more recent projects:
  • I have a desk clock that got broken over a year ago now, and I've not yet fixed (waiting mostly on the designing of revision 2) — this was working quite well for a time.
  • A game I started building to learn OpenGL, but got distracted by building a — still unfinished — UI library (they're surprisingly complex little beasts).
  • … and several more …
Though, not all my projects go unfinished, and I have to admit, it is rather nice to have a "done" (at least to the point of functional) project.  The empty space on my desk, in particular, keeps pulling me back to my desk clock project.  I should do a proper post on that sometime … sounds like another project to add it to my TODO list.

Arduino, my DeskClock, and a sprinkling of IoT to flavour…

Okay, so I said in my introductory post that I'm a fan of Arduino, and hope to get back into that side of my hobbies…  And though this isn't the post I was planning to do as number two, I think it should be.

I went to University to learn Home Automation.  Basically.  Though I didn't realise it until I was already there.  I was never into electronics enough to do the whole engineering route, with all that messy analogue stuff — I much preferred the nice clean and crisp digital life.  Of course, that's not the reality of electronics, but hopefully you know what I mean.  On the flip-side, while programming is definitely a hobby of mine, and I'm reasonably good at it (at least as good as a couple friends of mine who are actually in the industry), I don't enjoy the process as much as I wish I did.  My first Arduino Blinky Light project, however, gave me that warm fuzzy glow of success I've been craving all these years!  (Well, okay, maybe not quite that glowing, but it was a definite step in the right direction…)  And I've gotten ahead of myself again…

During Year 12, my science teacher put a small stack of flyers for various University courses on a table while he talked to us about where we were planning on going next, at the end, he told us to all come and grab a couple of the flyers and have a look through them, see if there's anything we liked.  He also picked up one flyer in particular, and handed it to me, specifically.  Now this guy I used to call Mr Smiley, because he was always smiling.  But this was one of the times when he seemed positively pleased with himself, and as I looked over the flyer, it just clicked.  Embedded Systems.  Controlling stuff with little computers.  It was perfect.  And that's what I applied to study.

As you can probably guess, I floundered a little bit on the analogue electronics, I was okay at it, and I passed, but I wasn't fantastic.  Digital electronics, though, building up a basic processor from its fundamental components, writing its microcode, through to making it run a simple machine code program using that same microcode, now that was an experience to behold!  (Better than sex, even!  Sex is messy and awkward, especially on your first time, this was beautiful and clean!  …ish…)

Anyhow, my plan was set…  I wanted to finish Uni (I had hoped to do it at Uni, preferably as part of my honours year, and/or post-grad, but things didn't work out that way, and I quickly decided I was better off pursuing it later on…), get a job, buy myself a house (…like now), and deck the crap out of it with Home Automation.  And not that media centre rubbish, but the real stuff — lights, doors, windows, blinds, aircon, the tea jug, fridge, ovan, washing machine, shower, toilet, you know… all the important things in life.  I wanted it all under my control!  (Insert evil laughter here.)

Well…  As I think I said something about (or at least intended to) in my introductory post, that didn't quite go as planned either.  In fact, it's a decade and a half later, and I've done a grand total of two Arduino projects: one blinky lights tutorial through to turning a simple servo, and a desk clock.  I will say, it's a pretty snazzy little clock (and totally my own creation, unlike the blinky light); a single 4-digit 7-segment display (with dimming of selected characters — mostly non-edit characters during configuation, and the likes), an RGB LED (which was used purely as a quick temperature indicator), and a single lonesome push button to drive it all.  And "it", in that context, was time (HH:MM, or :SS), temperature (in °C, °F, or °K - it had °R available too, if you were desperate enough to turn it on in the configuration, though there's only so much you can do with 7 segments, so I left it off by default), alarm (HH:MM), and a configuration menu (set the time, zero the seconds, set the alarm, set display brightness, select the order you want your temperature measurements to show in, that sort of thing, complete with little 7-segent animated icon things).  Oh, and no buzzer — that was intended for version 2, along with improved display driving.

Now…  In the meantime, I've been watching — and wincing — at the state of security and privacy in the IoT field, particularly with respect to Home Automation.  All these gadgets, often sporting fairly potent processors, and bugger all security.  Routers, thermostats, TV's, and all manner of other things being hacked and taken over, sometimes with the hack lying dormant for months, just gathering information by monitoring your network traffic, thermostats just waiting until you seem to have disappeared for a long weekend, or your new smart TV listening in on your conversations, for example.  And as much as I love the Arduino platform, totally want to support Arduino and the fantastic job they're doing, especially love the MKR1000, I have to admit, I'm leaning a little more towards birds of a different feather…  Sorry Massimo, you've done some awesome stuff, and you were the flag that renewed my interest anew, but you've kind of been left behind a little for me…  (Not your fault, you're doing a whole lot of really good stuff that I whole heartedly encourage people to pay attention to, just not so much that swings my particular way, unfortunately.)

And so I finally get back to what I wanted to say…  Right now, we seem to be on the cusp of something (well, one more something at any rate).  The world has only just woken up to the fact that we need security in our IoT, we can't just assume that no one's going to hack our refrigerator or TV, because these things have cameras and/or microphones on them now, amongst other things, even our internet controlled light globes are spreading malware, and they're within the primary network defence perimeter that is, for most people, their internet modem/router.  And we're starting to realise that even the innocuous thermostat stuck to the wall, might just be harbouring a secret foothold that's watching our behaviour, looking around to see what else it can sneak into, or trying to find an opportunity to slip some ransomware onto our computers, and we'd never know this was even happening because it's just a little device with a tiny screen (or maybe no screen at all!) and a couple buttons, that we barely even think about, and which just happens to be exposed on the internet, fetching weather forecasts or vaguely secured firmware updates with default passwords on its internet-facing configuration ports.  Oh my…

Now, I'm not an expert in all that, there are people much better at talking about that than me, people whom I listen to myself to keep up to date on these things.  So I'm going to get back to me… and as I sit here with my busted Arduino desk clock (the dogs got caught in the power cable and yanked my PC along with the clock sitting atop it all onto the floor one day, and the clock landed up on the bottom of the pile somehow), I can't help feeling a little disturbed trying to figure out how to best go about making sure version 2 has a bit of security as well — because you just know I'm going to want it to have a web interface of some kind.  You see, the industry has only recently realised they need to make a move on the issue, and there seems to be a flurry of new products coming out.  But as quickly as new products appear, new chips come along as well, and you want them because they have better hardware support, which means you won't be wasting battery power doing so much crypto gruntwork in software, and so forth.  But it takes time for the Arduino's of the world to pick up and start using them in new products, and at the same time they're getting too advanced to hack together on a breadboard or a scrap of veroboard you have laying around, and unfortunately, I don't have a budget for buying any of these gadgets… at all.  That is, after all, the primary thing that's kept me sliding time and again from electronics back to merely programming.  Arduino allowed me to start making moves back into electronics, though I have to admit I often find myself feeling like a noob all over again.  Luckily, this old dog does so enjoy the challenge of learning new tricks…

And then, when you do look at adding secure internet connectivity to your IoT device, to make that little light on the wall flash when you get a tweet, there's this huge disconnect.  The internet is big, with protocols designed for computers, packet headers, even larger HTTP headers, and compression.  Security is hard, with a ton of complex math, manipulating kilobyte keys and those data buffers again.  That's lots of processing power, and storage buffers holding your keys and data…  To securely turn a light on and off — a task that can be otherwise accomplished by a dinky little 8-bit µC that draws a few µW's of power at most, and less storage than a single good sized cryptography key.  Which leads to HUB's.  Now, if our IoT devices talk to HUBs, and it's the HUB that does the heavy lifting onto the internet.  This works.  Except the IoT device is probably using Wifi, that computer protocol that really should have security, which is now being provided only by your router again.  And those HUBs — when they exist at all, because people don't want to buy yet another extra piece of hardware — are different for every company, so you need several of them, and each one has to be designed with proper security, because the malware doesn't care about branding!  There's a whole world of further discussion just there…

But whether my next steps into the IoT is with the MKR1000, or a feather, one thing is certain…  I for one won't be connecting an embedded development board direct to the internet, that doesn't have crypto.  Just like it's no longer safe to put a PC online without the protection of both a firewall and a NAT router, it's not safe for an IoT device to go out and play among the intertubes without some serious crypto security, as those many many devices with token efforts at security (all too often, little more than the absolute minimum required to be able to use the relevant buzzwords on the packaging) are starting to discover — mostly at their customers expense.

Tuesday, 12 April 2016

Me, Myself, and My Blog: An Introduction.

Well now, I have a blog.  Isn't that grand?  No, probably not.  Still.  Here it is.  And for some reason, you're reading it.  Well, I don't promise to make sense, be right, be polite, politically correct, correctly spelled, grammatically correct, lacking in profanity, or any of that nicey nicey rubbish.  After all, I'm Australian, and aren't we all down-under here, just a bunch of dumb, drunk, and stupid yobbos?  Further on the disclaimer, I also don't promise that posts I make on here will be overly polished, well considered (or for that matter, involve any prior thought or consideration at all), and I most certainly reserve the right to change, revise, or reverse my opinion on any post presented herein.  So if I say something here that offends you…  You know where the close button is, it is totally your right to go right on and use it — I won't be offended, that I do promise.  And on that note…  Let's get on with the show.

Truth be told, I'm not really Old as the title of this blog suggests…  That is to say, back in my very early 20's I decided that people 30 and over were Old, people 40 and over were Elderly, so on through Antique, Ancient, Prehistoric, Primordial, and anyone 90 or older were from Before Time Itself.  Well…  It comes to pass that I'm now Elderly, fairly recently as of my writing this post, in fact.  So lets just call this part of my mid-life crises, and move on, shall we?

Okay…  I've been thinking about having my own blog since the late 90's, but in all that time, there's been a few less things I've particularly wanted to post on one, than I have fingers to count them on (and once or twice, rather glad in hindsight that I didn't have a blog to post them on).  So why now?  Well I was trying to find something I'd written some time ago to re-post to someone, and it occurred to me that if I'd written it on my blog — the one I didn't have — I'd know were to find it.

Thankfully, my younger brother started his own blog just recently, which reminded me that there are web sites that do all that for you — if he can start one, I figure it's about bloody time I did too.  And so now that I'm Elderly (see below), I have.  Not so much for you, to be honest, though someone may be disturbed enough to enjoy reading my ramblings, but more as a repository of some of my own thoughts and opinions…

Admittedly, I suppose, way back then, I actually did kind of have a blog of sorts…  Though it was more so just a personal webpage (and I didn't use it either, so don't be expecting many — or at least consistent — posts on here), but that was generally because my idea of webpage aesthetics are a little, well, lacking, and more-so because when working on my own projects, I generally prefer exploring new ideas over perfecting old ones.  So shortly after writing my first web pages, amounting to what would be my first couple blog posts, I set about crafting some shell scripts to wrap it up in a basic template system, followed by some active content using CGI, and then I set about writing (and occasionally re-writing) myself an entire web server to host it on (but ended up hosting more useful things which got all my attention)…  And why?  No particular reason…  Mostly just because I could, and because the challenge of writing the web server was mostly more enjoyable than that of writing the pages it was actually hosting.  All in all, it ended up being a significantly comprehensive and capable little web server, that I was quite proud of if I do say so myself, and which currently resides on a hard drive that went deceased in between implementing a backup strategy, and realising I no longer had the benefit of several distinct University accounts functioning as my backup system — oddly, I now do backups.

Further along those lines — and to round out this now rather long and exceedingly rambly introductory post — I am, I suppose, a hobbyist programmer and electronic engineer.  Somewhat regrettably, due to that pesky thing called life (and it's bothersome dependency on money), I've let both of those slide a little too much for the past decade or so.  Although I have a good breadth of knowledge on both areas (and continue to learn and expand), being more of a tinkerer than even a serious hobbyist since leaving University has allowed the detail skills to slip a wee bit — it takes me a little while to remember the specific differences between a regular binary search algorithm, and finding the insertion point into a sorted list using binary search, or driving the segments of a 7-segment display from a microcontroller lookup table, over the particulars of a constant current source to properly drive those same segments.  I'm also afraid things like Python, Arduino, and Google Search have spoilt me so.  Though I am working to rekindle those skills (I didn't study Embedded Systems because it sounded like a high-paying career!), perhaps I'll post something about that sometime…