Andrew Breese

Infrequent thoughts of a professional geek

Starting to learn a bit of Python

Thinking about the wonderful options developers now have in terms of cloud and virtual hosting, collaboration tools, automatic test and deployment tools, and how-to sites offering a variety of advice – it seems an interesting time to be a developer. Particularly interesting is how powerful languages have become. Which Language?

To learn more I’ve decided to pick up a development language I don’t know and tinker around with it. I wanted something which was either free or all-but-free to code in, had a variey of very separate purposes, and a syntax which wasn’t hard to read visually. I’m a management type by trade now so the code I create has to be simple to write and also be understandable 12 months later. Helps even more if the language is similar to shell and command scripting, very well supported by a plethora of libraries, and supports objects.

I also wanted something I could easily use with AWS and would have an excellent set of libraries specifically for random numbers, text transformation, and Regex. I also would like to eventually understand how to write a lambda call and create serverless apps. And who knows what else along the way.

So I picked Python.

By happenstance Python is good for all that, and is one of the languages which seems well supported by AWS Lambda. I’m confident that AWS does not need to be my only choice, for now though it is a reasonable choice.

Then second question – what dev tools do I need – what editor, which interface, and how easy is it really to get setup?

Tools Steps

  1. installed python on windows (download v3.7.0 from here). I first grabbed the 32 bit installer but updated to the 64 bit later. I also chose to change the install location so it works for all users by putting the files off a new dir on the root instead of burried in a user path; and also added it to the OS path.
  2. Opened a command line and started Python. It ran.
  3. Went looking for an IDE for python and found Atom editor which isn’t an IDE out of the box (url), installed it, it ran.
  4. Then installed the IDE plug-in for Atom, which is done inside the Atom app (which is a great feature).

Tools setup, still to do…

  1. Figure out how to automatically link the Atom editor so it grabs the source code from a central spot. That will mean figuring out a management space – perhaps just a shared cloud volume that I manually sync to the local pc, perhaps a propper SC system (??). For now I think I’ll just copy the files up and down from my cloud drive each day, and the days I forget will be days I watch TV instead.

Programming tasks

I’ve already dug into the RNG functions that come as part of a basic core in Python v3 and they work exceedingly well. Simple and direct. So I wrote a few VERY simple random functions;

  • a Hello world, because its just the first thing to write.
  • roll a d10 dice – shocking called, it was so darn easy it hurt.
  • a d10 where 1s multiply up – called d1Quality, because the rpg I have in mind calls that a Quality dice, and …
  • a d10 where 1s multiply, and a 10 might be a zero result – called dStress because the rpg calls that a stress dice.

Next I want to (in no order or set timeframe):

  1. Keep playing with really simple operations and functions to slowly learn how to do a variety of things with strings and numbers.
  2. Then start to learn about file system access to open/read/save (CRUD) a file.
  3. Then dig into calling URLS,
  4. Then dig into passing parameters to via a command console to a python application, and perhaps also how to do that to a compiles object (many years ago I wrote some unix commands in VB so I could use them on a windows box, it was a great learning task).
  5. Then to dig out the old Visual Basic code I wrote over a decade ago to see if its worth using the basis of that logic for much harder rolls, functionalisation of rolls between applications, and a compiled program for rolling dice.
  6. … how to publish to a basic web page
  7. … how to publish as a binary for Win, then Linux, then Mac??

This is such a great thing to do while the radio garbles away in the background. Happy coding people!


Nerdy convergence of Starwars and the Beastie Boys

Sabotage by the Beastie Boys is the perfect teaser & trailer music – as demonstrated by how perfectly it sells movies. Starwars and the Beastie Boys is a nerdy convergence. I want to see this film, with this style soundtrack.

Dont believe me? – check these out after the fold… Read more of this post

old laptop becomes htpc

My 4 year old laptop died about 6 months ago due to a horridly corrupted Windows issue which I found basically impossible to fix. Over the past months I’ve been trying to fix it, and find a new use for it as a home geek project. The issue was My account (yes, a non-admin Account with slightly elevated privileges) and the admin Account was unable to write files anywhere on the local disks. This meant that programs crashed, nothing would install, and likewise nothing could be removed. I went as far as booting into safe mode and trying all sorts of permission hacks (which looked like poor imitations of CHMOD) and new Account hacks before ensuring I had a good backup and wiping the damned thing.

I still have no idea what I did to corrupt the OS that badly and half expect it was either a drastic virus infection or a stupid “are you sure” prompt where I should have said “nooooooo!”. Without a root cause I’ll blame myself for the mess and move on.

So the laptop has been wiped clean and a fresh Windows 8.1 install is now running smoothly. I also caved in and bought a new laptop to muck about in and play games (a great gaming laptop is like a slow desktop gaming machine except it costs twice the price). The old notebook became the new “spare” laptop. It still a solid pc as it was nice when I grabbed it in late 2014. It has multiple IO ports, VGA HDMI and a good stack of ram and hard disk space. It got me thinking of a home theatre pc (htpc as the kids used to say).

First I tried an install if KodiBuntu for the OS but found the new disk management didn’t like installing from DVD or USB! Same for another version of Linux which was a frustrating waste of a few evenings. I gave up on using a Linux distro quickly after that. Windows 8.1 isn’t a great OS anymore but it’s already installed and I paid for it so might as well use it. KodiBuntu isn’t available for 64bit Windows 8.1 easily either, so it’s gone.

Aside – I wouldn’t use a Windows OS on a dedicated “appliance” pc by choice without a very good antivirus & firewall like Sophos home and ensuring the OS runs on an account that isn’t an admin. Call me paranoid? I’m considering an additional layer of protection by only allowing the laptop to connect to a dedicated and segregated wifi network on the router, however its not in place yet so still pondering. That may also mean upgrading my home router too, which I do not want to do just for that config option.

Then I installed Kodi (the renamed XBMC) tool and its working well. I was able to quickly add my old media box as a video source and I’m now starting to ponder how to use this theatre pc better, and what mods might be handy. Kodi made it very simple once i adapted to how the menus work.

My plan is to have a good “spare” laptop which can be lent, borrowed, moved about when needed and also used up play videos which are using codecs which my old WD media box does not play. The WD is even older and suffering from Codec fatigue, a nd I also worry that the WD is not supported and might be a little insecure by today’s standards.

bitcoin additional thoughts and a great comic

cartoon non sequitur for 2018 Jan 18- on bitcoins loss of value

Extending from an earlier post on bitcoin thoughts … Finding an exchange is tricksy as they could dissapear overnight, so many cryptocurrencies are dropping value, yet companies and governments are weighing in on the issues surroudning CCs – like implementing taxation guidelines for virtual goods.

Aside – folks I played online games with laughed at  concept of paying real money for in-game gold in WoW many years ago, despite wow, eve and many other games demonstrating that gamers have an appetite to do so. BTC is certainly different enough to not be a fantasic comparison (not decentralised, owned by one company, artificial levers on supply and demand), however WoW gold has a much better stability than bitcoin. Thank about that for a sec!

Personally speaking I think the recent adjustment downward by 30%+ on most of the leading CCs is very reasonable, and a lot more is probably on the way. This is because there is very little difference in the features and benefits of almost all cryptocurrencies, and while the different offering have useful features to offer many “investors” who helped the bubbles proliferate probably do not appreciate the details enough to differentiate. Frankly though a few countries have said they will inhibit CC growth (like China), or seriously hunt for taxation revenue from profits (Aus and USA that I know for sure), so the free and open nature of all virtual currencies is evaporating. And there is nothing stopping another CC from starting up and taking the “popular name” market share from BitCoin. e.g. A CC backed or unofficially sanctioned by China’s government would be very powerful. Maybe China is watching and learning about CCs so they can capitalise. Perhaps Google, Amazon, Alibaba, or Yandex will back or create one too which would make for a powerful market offering too. Now that bitcoin has having a huge adjustment it might be time for another virtual currency to rise, and use the brand of a big corporate as staging to market penetration.

Looking the price adjustments another way: investors who hunt for get rich quick have now seen BTC hurt them. Other CCs are following downward. What is the intended use for virtual currency? I’d like to know why people are still buying CCs in bulk. The inventor of DogeCoin used them to donate money to charities, and Bitcoin can be used as currency for a few major companies and strange-ish products; note that these companies take regular money too – so buying a bitcoin just to buy a product isn’t always logical.

Products need customers who have problems to solve, and CCs don’t see to have enough customers (except for the speculators). Digital currencies are getting a lot of attention now due to their rise and fall, so if they stabalise it will be good to watch where the investing market goes next. No idea where the prices are going but this is so interesting to watch (my bet is downward, hard to about $450 for BTC, because at that price they might actually be useful to humans as well as investors).

Does Meltdown or Spectre affect normal users? Probably not

The impacts of two new CPU security expoits are being tested at present, and I’ve seen two different views – one that it will have an impact (of single digits), and another saying that those single digits are not relevant (or almost not) for gamers and normal users because they don’t involve the kernal.

TLDR = You have no choice except to Patch and move on. Maybe keep reading in the background.

  • The CPU exploit probably won’t greatly impact a gamer or a normal user, and if they do – it will be a small slow down.
  • Pretty much everyone is nominally affected, so the playing field is still level.
  • Patching the machines is important (duh!).
  • There are no known exploits in the wild yet.
  • It will be years before consumer grade hardwar is released which won’t be impacted, because deisgning new CPUs takes time, and then the companies will need to get the hardware into market.

The background:

a Bitcoin random thought – its now a darn risky investment artefact

Quickly to be frank – A family member with a traditional banking and investment background asked me about bitcoin as an investment option – I had to tell him that I’m no expert, and he should play with CCs with as much many as he’d like to throw away. In fact I then suggested that giving money to strangers might be just as valid an investment. It is a fabricated artefact – here is why.

Bitcoin started as a techie concept which took a few years to be taken seriously by the techies, then moved to a very enticing and interesting practical implementation with benefits (pizza, games, anon purchases), and is now a mechanical artefact that suits investors and risk takers. This write-up by Seeking Alpha is an example – which indicates that Bitcoin is at its (apparently) weakest stage. Likewise the other CCs are not at all mature. Its a growth stage that may lead to a great long term currency when one of the many CC options becomes stable and ubiquitious. BitCoin is neither at present, but is very dynamic and interesting if you can throw away the time and money it costs you to investigate.

What that means is nobody is buying pizza anymore, investors are solidly looking at it for quick bouncing returns. That’s not a good time to buy, especially when a coin costs UD$14,000 (+/- 15-35%) + high fees. At this stage in its life I don’t think it is much different from the stock market, except there is no centralisation or control, nobody to hold accountable, frequent technical issues, and no demonstrated longevity. Think about that risk profile – its amazingly risky by comparison and people are buying and selling in large amounts recently.

I’m intersted in what happens later – when more curencies are in the market, offering different options for stability, style of implementations, or by financial institutions or countries. We are amid the maturing of CCs, and there are great times ahead. If I more time and $5k I was happy to throw away I’d still buy-in, and I’d take a serious look to other CCs instead of BitCoin, or wait till BC stabilises a lot more. The enticement is to find another CC which costs $50/coin, and hope it tripples as that would be enough of a test.

via seekingalpha, BC value


Firefox Mr Robot add-on fail is akin to U2 fail

I’m staggered to read that Mozilla tried to advertise the TV show Mr Robot by forcing the install of an add-on. Yes, it was disabled by default, but thats is plainly a crap thing to do. So much for thinking of the community or for acting responsibily.

As reported by Shaun Nichols of “The Register” – Mozilla automatically installed a weird add-on to Firefox on people’s computers – an add-on that turned out to be a marketing promotion for the hit telly show Mr Robot.

The reactions are justified and blunt. Its almost implausible, but happened.


I do not understand how this would have been seen as clever advertising, and was probably damaging to their geek-cred. As if anything the geek audience of Mr Robot tends to be more security and IT sector aware and wouldn’t like the move.

Did the music industry folks love it when U2 brute forced their new album into the iTunes media library? Broadly speaking no; there was a lot of bad press, and apologies.

Mozilla chief marketing officer Jascha Kaykas-Wolff has posted a mea-culpa on the Mozilla blog. “We’re sorry for the confusion and for letting down members of our community,” Kaykas-Wolff wrote.

“While there was no intention or mechanism to collect or share your data or private information and The Looking Glass was an opt-in and user activated promotion, we should have given users the choice to install this add-on.”

The exec also said Mozilla did not sell out its loyalists to a TV network – this was done for free.

“Over the course of the year Firefox has enjoyed a growing relationship with the Mr Robot television show and, as part of this relationship, we developed an unpaid collaboration to engage our users and viewers of the show in a new way,” Kaykas-Wolff explained.

Somehow, that just makes it even worse.

I don’t care that they didn’t get paid, I care that they did it. If fact the did sell out, however their price was exceptionally cheap in dollars, and expensive in reputation damage.

So bye-bye Firefox! You’re done for another few years (or until Chrome does something equally stupid and I’m forced to pick between the lesser of two evils).

xkcd on self driving cars – bravo!

self_driving_car_milestonesGreat comic as usual. Its only as the concepts drift wistfully past your personal point of insanity that it makes you think something here might be unreasonable. Should the AI decide that mimicing driver behaviour is better than efficiency; then we are all doomed.

  • Cars that indicate left and never turn,
  • Cars parked in no standing areas,
  • Cars honking at pedestrians,
  • Pedestrians carrying devices which send out signals identical to automated cars, so they get equal treatment.
  • Roombas striving for equal rights.

I hope our (soon to arrive) AI overlords have a dark sense of humour, and better judgement than the Road Traffic Authority.

New Firefox and Handy Chrome Extensions, bloat & Security.

Even after reading that my old favouraite browser Firefox is making a comeback, I think it will be a while before I try to abandon Chrome; and the reason is the integrations and extensions are great for security and quality of life. I also think it is best to keep the number of extensions limited, because that in-turn might keep memory bloat down and should limit unknown future vulnerabilities.

  • Fair AdBlocker – a browser ad blocking widget, which is mandatory to me; especially as there are websites where I am very happy to see their ads and you can choose what to see.
  • uMatrix – javascript controller, which lets me block/allow scripts specifically by page and domain. Javascript is a nightmare for good security as it is so easy to exploit, and I’m hoping this widget will make that less likely.
  • a few GoogleDoc related plugins, but not all of them, as each adds bloat. I do love GoogleDocs, sure they lack a few features, but they are pretty amazing.
  • a password manager, I’m not goiung to say which (because while everyone should be using one, I don’t think I should give a hacker an easy start), but its one of the big ones and is excellent in terms of features and ease of use UI.
  • HTTPS Everywhere – which tries to force your browser session to always use the https protocol; in plain terms that means your should be a little safer.

Thats it.

Understand too that enabling widgets and extensions also introduces risks too. Who created it, are they seeing your traffic in real time (like many of the spell-checkers)? What information of yours do they store externally? What if they are hacked? Recommend being smart and using as few as possible.

Back on browser choice – Chrome is plenty fast as is, has a linked ID to my home PC and phone so my bookmarks will sync between devices, and does not crash. The ad blocking and password manager are tools I cannot live without. And although I’ve ony be using uMatrix for a very short time it has already impressed.

One key feature I read about recently was having FireFox tell you if the site you are visiting is also listed on HaveIbeenPwned (via Lifehacker) – such a great widget idea, and one that has been written as a plug-in for Chrome and others for a long while.

I really recommend registering for HIBP too; in fact I registered my families accounts for them.

Happy & safe browsing folks.

Blockchain and Bitcoin Humble Bundle

The current Humble Bunddle is all about Bitcoin and Blockchain – two topics which are well understood in technical circles, but not well understood in many others. Like the post on Crypto and Cybersecurity with the Humble Bundle, I think this is worth seriously considering. At the $8 level it is good value and handy to have a handful of electronic textbooks. I’m no expert, but I plan to at least validate what I think I know against useful sources. Happy reading.

%d bloggers like this: