Categories
Uncategorized

Of operating systems, and stability

After upgrading my wife’s PC 2 weeks ago, mine went in for it’s upgrade.   Coming home with a box that hardly has any remnant of it’s previous self inside means “Re-install ALL the Operating Systems!!!”

So, off we go with my Windows 7 install… But no – that just doesn’t work right.  I get a blue screen as my PC starts up after it’s installed the base OS.  After much fiddling, I find that it’s my graphics card causing some kind of fault so I give up and start using my on-board card.  It’s not great, but neither is my 5 year old card that’s giving grief.

I had NO IDEA that Windows 7 would require SO many reboots to get all the windows updates in place.  So now I have spent way too long trying to fix my PC and in the process have managed to “repair” my PC so it sees the old install (on the old 300gb drive) and the new install (on the new, and bigger drive)  and I now have to wait 30 seconds, or click a button to get windows to boot up.

Sigh 🙁

Now I think “lets get my linux install going again”.  After hearing rave reviews about “Mint Linux”, I thought – lets try this out.  Download, create bootable USB drive, install… and … First impression “Wow, this is slow, and ugly”.  So I start talking to the friend who recommended it “Oh, crap – I used to use Mint, but moved to Elementary recently because it’s super awesome”

Sigh number Two – I can’t work in a slow and ugly OS that has taken the worst from both Windows and Ubuntu’s UI’s and somehow mashed them together into pure frustration for me.

So – lets go download Elementary OS.  It looks pretty darned awesome in their video.  Download it (smaller than Mint), install it, and… “Wow, this is fast, pretty and kinda cool”.  Except, wait… It only seems to pick up my one monitor.  I hack around in settings, start googling, and am not getting much other than people praising the OS.  While that’s going on, I decide to install Chrome.  I download the right .deb package, open it, install it… and <Insert some unintelligible error here>!

Sigh number Three – Pretty OS, Nice and fast, but one monitor (and it picks the resolution of the worst of my two), and when installations of simple apps that “just work” on Ubuntu start failing then I start giving up on the OS.  I don’t want to fight my way to a working system, I want a working system. 

The point of my Linux install is because I want to fight with programming ideas, not Operating System issues.

And so, that brings me full circle to Ubuntu as my OS (the download is progressing nicely in the background)

I’ve learned a few lessons:

  1. I didn’t know there were “pretty” linux distributions out there. I’m glad I got to try out Elementary
  2. Swapping OS’s is much easier now, than it was 5-10 years ago.
  3. If you want ease of use, sticking with mainstream is sometimes good. (Windows and Ubuntu are popular because they’re common… and sometimes that’s just what you need)
  4. I’m finally learning to not get sucked into “Yak shaving”.  When I’m recompiling a kernel to test out a driver that allows me to activate a beta setting of a subsystem of the OS that lets me do <insert simple task>… I’m doing something wrong.  I’ve done it in the past, so the fact that I stopped myself quickly here makes me kinda happy that I’ve learned from previous time wasted.
Categories
Uncategorized

Today I learned … about body temperature and sleep

A good friend showed me this site for Freeletics which is basically a bodyweight based exercise system that seems pretty much like “Bodyweight only CrossFit”… without the rabbid CrossFanatics. I’ve been reading around a little because I kinda like the idea of their workouts, and today I came across a blog post on the site: Training and a better sleep

There was on part that struck me as “new” information:

Your body temperature increases during your workout and it stays higher for up to four hours. Afterwards however, it will drop to lower levels than if you had not exercised – and this decrease signals your body that it is time for sleep!

I know that your heart rate goes up, and stays up for a while or your metabolism is increased (I can’t remember the details), but I’ve never heard of the temperature change and a sleep trigger. So off I go googling and I find many articles like this:

  • “A drop in body temperature near bedtime triggers the subjective sense that is’s time to go to sleep. Responding promptly to this internal signal may help you fall asleep faster and sleep more restfully, according to a report in the current issue of the journal Sleep.” – TROUBLE SLEEPING? CHILL OUT
  • “Researchers have shown, for example, that insomniacs tend to have a warmer core body temperature than normal sleepers just before bed, which leads to heightened arousal and a struggle to fall asleep.” – Do Cold Temperatures Improve Sleep?

The one bit of advice I found in my quick googling (that I notice I don’t ever seem to follow) was to head to sleep as soon as you start sensing that need to sleep.   Good to know. 🙂

Categories
Uncategorized

Thoughts on Elections

We had our 4-yearly elections today and in the run-up to them I’ve had some interesting discussions with people over the merits of Voting, Not Voting, Spoiling ballots, etc.

For those not “in the know”, we have a few major parties here: ANC, DA, IFP, EFF,

Let me start with the “Not voting” camp because that’s probably the easiest one to talk about.  The best argument I’ve heard against voting is along the lines of how the system of democracy is broken and won’t work and hence why should we take part in something we know is broken.  The downside of that argument comes when I ask the question “so what are you doing to change the system?”.  The average response is “not voting” or “nothing I do will make a difference”.  Both of those are basically defeatist, and a weak way out.  If I see someone complaining about something, but not prepared to do anything to change it, my respect for them decreases.  If you don’t have the drive to try and change something that’s not working right, you can’t blame how broken that thing is on someone else.

Previously I would have stated it as Matt, a friend of mine, did on Facebook:

Remember, your purple dot is your license to complain. No dot? Let’s not hear you moan until 2019 please.

It works, but is just not a great wording of the problem.  It caused an uproar with someone who believed my friend was advocating that we should not have free speech (totally missing the spirit of what Matt was saying).

My newly formed opinion is this:

I will find it hard to respect someone who complains about the state of the country, but does nothing to alter it for the better. (Whether that is just by voting, or by doing something to bring about positive change)

On a base level for me, I take care over how my salary gets invested – Is the money being used efficiently? Will I get reasonable returns? etc. So why do I not care about how efficiently my tax money is being spent, and why do I not do what I can to ensure that it’s spent wisely, that the government won’t continue to increase tax rates unrealistically, that the property I own will grow in value and not become an item of “redistribution”?  I believe that a rational person should do something to take care of that both in the short and the long term.

If I thought that “voting is agreeing with a broken system”, I would do two things:

  1. Think of the long term – start mobilising friends, family, and like-minded thinkers to find ways to create a lasting change to the system.
  2. Thing of the short term – I cannot make it change over night, so how do I spend my little influence (my vote) wisely to ensure that my interests are looked after by the best of the broken system?

To me that’s not “giving in to the man”, that’s simply a prudent course of action given the circumstances.

On the topic of “Spoiling ballots” – your spoiled ballot only has 1/2 the impact that an active vote has. Spoiling a ballot simply dilutes the mix of votes, reducing everyone’s over-all proportion of “yes votes”.  While a vote for any party other than Party X, is both diluting Party X’s proportion, but actively increasing the proportion of the other party.  The only time I would consider spoiling a ballot would be where I can find no party who I believe would be a better choice than the current ruling party.  It’s not a great option because it lacks a lot of the “power” of an active vote for “change”, but sometimes it’s the only option you have. 

If I look at items I care about like Education, Health Care, and Jobs/Employment – I still think that there are many parties who’s policies I agree with. So I don’t see spoiling a ballot as a reasonable option for me currently.

Then on to the simplest strategy: “Voting”. It looks like it should be so simple, but even here there’s the pressure of, as Helen Zille stated recently in a speech, “A vote for any other party is a wasted vote”.  I’m not a fan of the idea that any vote is wasted – if I really and truly believe that the “KISS” party was the only one with the right plan for the country… Even if voting for them does not give them enough votes for a seat in parliament, it does do two important things:

  1. It’s a vote that’s not going to a party you don’t believe in
  2. Your chosen party can see a growth in support and hopefully will be more motivated for the next elections. (Possibly you might also consider helping them spread their ideals, to improve their results next time)

So for me, no vote is “wasted” and by suggesting that a vote can be “wasted” puts unnecessary pressure on people and highlights either that the system is flawed or that the person saying it is not being practical.

There’s a whole “first past the post” vs “alternative vote” debate, which would allow those “minority” votes to have far greater say but even without that in place a “minority” vote still has plenty of merit. 

I haven’t done all the reading up (I think SA has some odd way of calculating “seats in parliament), but if it’s as simple as us having 400 seats in parliament, so to get a single seat you need 1/400, or 0.25% of the national vote.  Lets look at the implications of this 0.25% restriction:

  • We had 33 or 29 parties on our ballot today (depending on which list I manage to find). Lets use the bigger number (33)
  • Lets assume only 2 Parties who get all the votes, and everyone else gets less than 0.25% of the vote
  • That means we have 31 parties getting less than 0.25%, and 2 parties splitting the rest.
  • In reality just about 45% of the parties from the last election got less than 0.07%
  • So lets assume that 15 parties got 0.1, 16 parties got 0.24999%, and the rest was split across the top 2 parties.
  • That works out to 5.5% of the national vote that’s gone to parties who won’t get a seat in parliament, and 94.5% of the vote going to parties who will get a seat.

Even in a fairly “worst case” scenario, we have pretty much every vote counting for a seat in parliament.  In the last elections those “no seat” parties counted for 0.77% of the vote.  That’s hardly anything. 

The counter to that is that if the 0.77% had ALL gone to the ANC’s vote that would have pushed them into a 2/3 majority and they could have just outvoted every other party on any decision.  But that’s just scare-mongering, and in reality the fact that the 0.77% didn’t go to the ANC just proves that every vote counts – no matter how small that % change is, it could have a BIG impact.

In the end I’m all for “voting for anyone you believe will make a change for the better”, but I’d love it more if people were more actively involved in making a change to SA than a simple “X” mark every 4 years.

Categories
Uncategorized

Virtualization, Node, and Ubuntu

I have debated using small virtual machines for specific tasks for a while, but have found it hard to justify the cost or the time to understand the complexity of the offerings of various providers without incurring a cost to “figure it out”. I can see great use in firing up a Linux vm when I want to learn something linux oriented, or using a pre-built vm to save me the hassle of learning how to setup some “tool” (e.g. Apache, node, wordpress, etc)

I needed a way to get my feet wet to see if I liked the experience, without understanding first what I might find. Unfortunately, Azure seems to still require lots of guess work because it offers many different options at different prices for the many configurations of each item… So I end up stuck in a mess of wondering “what the hell is this about and will I possibly be charged a fortune?” Instead of rolling out systems to provide me with a hands on understanding of what I need.

I have looked at amazon’s offerings and they seem to fall into the same category, and while their pricing is getting better,there still are a multitude of options and pricing schemes.

I feel a little bad that my reasoning largely was “I am only casually interested, so why should I have to wade through and understand complicated pricing before I can try the system?”. It’s almost as if I was saying “it’s too hard, so I won’t even try”. That’s the last thing I want to do, but for a casual investigation, I don’t want to have to learn all of the complexity when I would rather be learning some new technologies.

I keep looking at the pricing hoping that it becomes such a “who cares, it costs nothing” expense that it doesn’t matter if I get suckered into buying a virtual machine that is 10 times more powerful than what I need/want, and so I started looking at the price of VM’s again recently after various providers started lowering their costs.

Eventually I found Digital Ocean… They have loads of tutorials, and 6 (or so) prices. So it’s petty easy to know what you are committing to when you sign up with them. And they have a $10 coupon that you can apply when you first sign up (google a bit and you’ll find it). Their cheapest machine is only $5 per month, so that’s effectively two free months.

Given that I don’t like the server I was hosted on before (it’s old… And showing its age), I thought I would try out moving my blog over to a VM where I could try out Ghost (apparently the new hotness), and see what I could do there.

So… Cheap, simple options, and clear instructions and help – that’s what it took to get me to try out a vm.

As it turns out a 768mb ram, tiny CPU, Linux box is really easy to work with and seems to handle a simple blog really easily. I have probably remade the VM four or five times, starting with a Ghost instance and ending up with this WordPress one.

As it turns out, Ghost is missing loads of useful things like: a simple UI for changing templates or doing basic customisation to the site, an app for iOS and Android that let’s me edit posts easily (and while I am offline). Eventually I gave up when I was digging around using nano to edit json files to set up some basic things I needed.

After that experience, I decided to try out some nodejs, because now I could spin up a new vm easily with the tools I needed already setup. This removes one of my biggest frustrations with learning new things… Getting stuck in the complexity of some completely unrelated item that should just be a quick detour but ends up being a 5 hour hair pulling fight with some silly configuration item.

After that I wondered if I could move a php site of my dad’s over to a vm to get one more item off the old server my blog used to be hosted on, and firing up a VM with a LAMP stack pre-configured is as simple as creating the wordpress VM.

I’m not saying it’s the worlds friendliest scenario, but it certainly has given me a really simple way to try out new tools without having to invest any time in figuring out “why for the love of all that is good and holy in this world, the developer decided to not document the one setting that is breaking my installation?”

It’s almost like all the promises Microsoft has made about “infrastructure as a service revolutionising business” are true… And this time it’s not something that “only works on Microsoft”. (I am not trying to be anti Microsoft… I have just grown to mistrust their sales mantras)

Hopefully I can share some learning I experience with Node and a MongoDb soon… And possibly even something from the setup of the LAMP achine and MySQL.

But until then, go try out some cheap Virtual Machine somewhere and see what you can make