It took me a long while to fall in love with Python (the language). It was mostly because the features I ended up liking were hidden behind the giant flaw in the foreground: mandatory matching white space. That means that, unlike in most other programming languages, Python decides that two lines belong together if they are preceded by exactly the same white space. If the white space doesn't match, Python complains.
I won't go into details here. Suffice to say that I ended up loving what lies beyond that fatal flaw. The Python developers created an environment where things are easy, and expected. Python tries to do what's intuitive most of the time, and that makes it so much easier to work with.
So I decided to use it instead of my old staple, Tcl. Tcl was really marvelous in certain aspects, but it had gotten little love lately. Tk, its GUI, was once the gold standard of graphical user interface scripting, but it looks dated and weird now. So I started porting all my old scripts from Tcl to Python, to see how much time it would take and if they'd get longer or shorter.
What do you know, programming was a breeze. Python has libraries for pretty much anything you could wish, sometimes it's a bewildering amount of choices. So all my scripts ended up being significantly shorter, faster, and easier to read.
Once I was done with my scripts, I started looking for a new challenge. I came up with the idea of taking the NOAA chart for the Torrey Pines buoy and making it look better and more informative.
Here is the original chart. Notice how wave heights are simply plotted without averaging out anything. That's very confusing and doesn't give a good picture of the current waves - especially because the data is accurate only to 10 cm and the jump from one level to the next is quite high.
So I thought I could do better. I decided I would create a graph with configurable memory that would average waves out, so that I'd get a smoother picture of what's happening. To do so, I'd have to figure out how to get the data, and what kind of data visualization was offered in the Pythonic world.
All of you who knew him will be saddened to hear that Mondo, my cat and friend of 13 years, passed. He was the loudest of cats, especially in the middle of the night, but it was near impossible not to love him. He made up for his annoying night time ways with a cuddly and loving personality that charmed even the lightest sleeper.
Mondo was perfectly fine (as humans can discern) until mid-July 2014. Then he turned suddenly ill, seemed to recover, but four weeks later had a fatal relapse. Cancer ate him through and through at the young age of 13.
Now that we got the fundamentals out of the way, a little bit more about Mondo:
After the previous article explaining the principles behind this form of "safe" cloud backup, here a step-by-step tutorial on how to make it work. The software used and the commands issued are all for Ubuntu, but you should be able to translate them into any modern Linux variant. On the other hand, much of the infrastructure required works only on Linux.
Aside from the obvious (a modern version of Linux), you will need a series of tools that don't come installed standard. First the actual commands, then an explanation:
sudo apt-get install mdadm lvm2 cryptsetup-bin
We are installing three packages:
mdadm: the package to control RAID arrays. From the description: "tool to administer Linux MD arrays (software RAID) The mdadm utility can be used to create, manage, and monitor MD (multi-disk) arrays for software RAID or multipath I/O."
lvm2: the package required for logical volume management, allowing us to resize after creation. "This is LVM2, the rewrite of The Linux Logical Volume Manager. LVM supports enterprise level volume management of disk and disk subsystems by grouping arbitrary disks into volume groups. The total capacity of volume groups can be allocated to logical volumes, which are accessed as regular block devices."
cryptsetup-bin: the package to encrypt the data. Technically, this is just a utility to manage the process, while the Linux kernel does the actual encryption, but to us it's the same thing. "Cryptsetup provides an interface for configuring encryption on block devices (such as /home or swap partitions), using the Linux kernel device mapper target dm-crypt. It features integrated Linux Unified Key Setup (LUKS) support."
Here is my problem: when I travel, I want to have access to my most important documents (like my passport, or my drivers license, or the airline tickets, or a bunch of other things). I want to have access to those documents particularly if I lose my computer and the originals. Imagine I am in Fiji on a surf trip (I wish!) and my everything gets stolen while i conquer Cloudbreak. I come out, have nothing, and have nothing to prove that I once had something.
I could store documents online, of course. But then I have to deal with security issues. What if someone gains access while I am not watching? Can I trust the company that stores them to do so securely? What if the company runs out of business? What if a hacker locks me out of my account, and I have no way to get back access?
Also, once I come up with a system that stores my emergency documents safely and securely, what about non-emergency documents? Can I find a system that stores things securely and safely, but can be updated constantly? Is there a way to have files saved online that doesn't jeopardize their integrity?
I figured out the way, and now I am replicating my sensitive documents online, trusting my experience and not any company's promise. And this article is a howto on how you can do so, too.
On the most fundamental level, I started with file synchronization tools like Dropbox. In case you don't know how that works, you essentially create an account with a company (say, Dropbox). Then you designate a folder to be synchronized. From then on, dropbox (the driver software) will copy all files in that folder to the Dropbox account, and vice versa.
When I moved to America, back in the ancient days, my friends tried to dissuade me. "Don't move!" they'd say, "You won't like it!"
I asked why, and the replies were scattered. There was a cluster of "Americans are so shallow!" in the mix, but mostly it was about trivialities like, "Their bread is terrible," or "You can't ride your bike anywhere." My friends clearly had no idea of what life in America is like.
Then I moved, and I saw the opposite situation: Americans generally don't know much about other pleaces, peoples, and cultures. So, when asked, "What's so great about America?" they sometimes fail to find a workable answer, because they don't really know where, when, and why America is different.
Having bridged the gap, I found that America is really different and better than the culture from which I moved. But the reasons it is so are not the reasons either side of the divide would enumerate. And that's very sad, especially for America, because not knowing what sets you apart makes you likely to abandon those distinctions. So here, for you, my summary, in hopes it might lead to more awareness. In a separate post I might write about the misconceptions that exist.
1. Americans are fundamentally honest. Yes, I know, there are lots of crooks here. Even if the news were not full of reports of crooked politicians, CEOs, companies, etc. you'd evince that from the simple fact that America has the largest prison population of any nation on planet Earth.
- Apple Buys Beats: Who Do I Want to Be When I Grow Up?
- Samsung UD590 4k Monitor and Kubuntu 14.04
- Up and Down the West Coast: Seeking Fresh Powder Edition
- I HEART Janet Reid, but She's Dangerous
- Following the Pineapple Express to Mammoth with a Mountain Collective Pass
- Living With the Puck: StraightTalk Unimax U240C Reviewed
- L'America: The 411 on Thanksgiving
- Fixing KSnapshot Quirks - and Programming the Linux Shell in the Process
- L'America: What's the Nuclear Option in the Senate
- Chinavasion Rear View Mirror Device