Software gone wrong.

October 4th, 2015

Recently I found that xubuntu on my laptop would not show me the desktop after waking up.
Second or third try it would work. But it seems this is a known problem and the solution is to uninstall lightlocker and install xscreensaver.
So somebody broke lightlocker and now its almost useless. It doesn’t get fixed and it doesn’t get removed as the default screen lock handler, you just end up with a laptop that won’t reliably wake up.

Save buttons and backups.

September 17th, 2015

It seems to me that it’s gotten to the point where we don’t need a save button anymore.
Actually I think this happened a long time ago, but we are all so hung up on our save buttons.
In windows programs you’ll see (although I don’t use windows much so maybe this isn’t true anymore) that the icon for the save button is a picture of a 3.5 inch disk. An item that is so far out of use that amazon charges $1.50 for one of them, after they showcase all of the discontinued listings.
But what is the save button for? It takes the data in memory and puts it on disk.
Why can’t the computer do this by itself? Why can’t it permanently record every bit of work you do, so you won’t lose it?
Well, the classic argument is that if you screw up what’s in memory you can fall back to the last saved version.
A valuable technique for sure, but you only get one version of history and it is easily wiped away if you accidentally hit save. It’s hard to argue that the save button is a serious archival data system.

My point is that computers have gotten complex enough and fast enough and disk is so cheap and voluminous that there’s no reason the computer can’t keep track of all of your history since the dawn of time.
Some applications provide this functionality, I think ms office products do, and I know eclipse has a built in local history feature, but these are limited to specific applications.

But it turns out there’s a way to provide this history for everything you do, it’s called zfs snapshots.
Alas I don’t think they’ve ported zfs to windows, and a little poking around says they’re not going to implement btrfs either, but what you can do is set up a virtual machine running some form of linux that exposes a samba share attached to a zfs drive.
And just have the drive take snapshots every minute.
It only stores the deltas, so it will take you quite a while to fill up a $50 terabyte drive.

I’m a linux guy so I use it for everything. I’ve gotten into the habit of storing everything in my home directory, so I made my home directory a zfs filesystem and I run these scripts to snapshot every minute of use, and I never lose anything…
https://github.com/nixomose/scripts/tree/master/zfs
https://github.com/nixomose/zfs-scripts/tree/master/scripts

Can’t say enough good things about zfs.

I had to take some notes for the process of converting my home directory to be a zfs filesystem.

There’s docs on how to make your root filesystem a zfs filesystem, but it’s a real complicated hassle, and does it really matter if /var/ and /run and /usr are on zfs? That stuff doesn’t change much, and you can reinstall it. The valuable stuff you want to backup and archive is usually in your home directory.

So firstly, google and mozilla make a big mess of your home directory, via the .cache and .mozilla directories. You’re better off moving those outside of your home directory and making symlinks to them.

So here’s a cheatsheet list of things I did to make a zfs volume out of my home directory:

(presuming you’re using all of your disk space, and need to make room for the zfs pool)
boot live cd
shrink /
make new partition, leave blank

reboot to your machine again, make sure everything is sane.

I use ubuntu, your mileage will vary with distro…

add-apt-repository ppa:zfs-native/stable
apt-get update
apt-get install ubuntu-zfs
modprobe zfs
cd /home  (don’t tie up your home dir by having it as your current directory)

sudo su

mv username oldusername

(assuming /dev/sda5 is your freed-up partition space)

zpool create zhome /dev/sda5 -m /home/username

(this alone is worth the price of admission…)
zfs set compression=lz4 zhome
cd ../oldusername
mv .* * ../username/
chown username:username username
reboot just to make sure zfs automounts it.

and now you can add the backupnotidle script here for added fun.

https://github.com/nixomose/scripts/tree/master/zfs

 

Yet another note on star wars

September 7th, 2015

There’s that scene where obi wan has to sit down after alderon was blown up by the death star.
He’s deeply hurt because of a disturbance in the force.
Well this just occurred to me: how fast is the force? How long does it take to travel interstellar distances?

The first thing we learn about star wars is that it happens in a different galaxy a long long time ago, and very far away. It’s the absolute first thing we find out.
So if we have our galaxy, and we know there’s another galaxy where star wars lives, it’s not too much of a stretch to say that there are probably other galaxies, and some of them will also have the force.

If the galaxy is really big, I mean really really big (you-may-think-it’s-a-long-way-down-to-the-chemist big) then there are probably millions upon millions of galaxies that are force enabled. Probably more.

Some of them will have empire like things, and some of them will have darth vaders who will go blowing up planets full of people.

But there is only one universe.

So it seems to me given the number of likely force-enabled planets being blown up all the time, obi-wan would never be able to walk.

Patents

August 15th, 2015

So there is this long ranging debate about the value of patents which stretches back hundreds of years.

If I understand it correctly, some people think that inventors should be rewarded for their ideas and be given an exclusive use period of time for selling their invention as the reward.

Other people think that patents stifle innovation and should be done away with.

So let’s think about that for a minute. What would happen if there were no more patents?

People who invented things for profit made by taking advantage of the patent system would stop inventing things.

Does this mean nothing would ever be invented ever again? Probably not. What would happen is that the same type of people who write open source software would invent things and make the invention publicly available for the greater good and expect no financial gain in return.

Maybe they’d get some popularity out of it which might get them a job or funding for their project, but they wouldn’t expect to make any money directly from their invention.

The other side of the coin is that not all inventions are cheap and easy to create. Like drugs from pharmaceutical companies, sometimes a lot of R&D goes into inventing something, and this could not be produced by a handful of volunteers willing to give their ideas away.

So what we’d end up with is something different that would work better in some cases, and worse in others. Simpler ideas would be picked up by quick manufacturers and brought to market more quickly. And complex and difficult ideas just wouldn’t happen, or would take a lot lot longer as the ideas were slowly grown over a long periods of people standing on the shoulders of their predecessors.

There is also the argument that people who find no value in patents aren’t creative and have never had an idea worth protecting and therefore would only gain by getting rid of the patent system.

 

Gotta Get Git

June 8th, 2015

I think I finally get git. I did my first rebase today and I understood what it was doing, and it did what I wanted.

Feeling confident in my understanding of git, and my slight understanding of github, I feel the need to point out a funny little thing I noticed about the brave new world of source control management we all seem to have entered into.

In the good old days, you had version control like cvs or svn.
Everybody checked out, made changes and checked in, if somebody got their changes in before you, you had to merge the updates and commit again. If there was a merge conflict, it was your problem. You had to fix it before you committed.

This spread the responsibility of doing the merging around to everybody and I guess it was unfair in that if you were slower, or committed less often, you had to do more merging. But that’s how it was, erm… still is to some people.

In short, you checked out, you did work and you checked in. Everybody played nice, you tried not to break anything and the build ran off HEAD in the repository.

Git is actually very cool, but I think it is overkill. Mercurial I also found out about, is a happy medium, it gives you all the cool parts of git without having gone overboard the way git does, but that’s just my goldilocks opinion.

Git is the cool source control management system of the decade, and ‘github’ is the new way of working.

So this is what I noticed:

svn/cvs/perforce/etc:
1) check out
2) make changes
3) check in.

git + github.
1) fork project
2) clone your copy of the project
3) check out from your local repository to your work directory
4) make changes
5) add changed files to list of things to commit
6) commit changes to your local repository (admittedly this can be done in one step, but it is actually 2 steps)
7) push changes from your local repository to your forked repository on github.
8) open a pull request to the owner/project manager of the original project you forked, where they will then pull the changes from your forked repository to the main repository.

I think we can safely call this ‘progress’.

I think the oddest thing about this new process, is that svn used to tell you when you tried to commit that you had to update and merge changes first.
The github way, github will mention that your changes will or won’t merge cleanly, but that doesn’t stop you from submitting a pull request.
So the effort of not accepting your pull request becomes the problem of a human (the owner of the project who got the pull request) whereas it used to be a computer that did it.
I don’t know github that well, maybe it’s configurable not to allow pull requests if the merge won’t be clean, but if not, the making-the-human-part-of-the-process seems to be a step backwards.

I realize that github now gives the project owner the flexibility of not accepting changes they don’t want, but, I dunno, where I come from, we’re all supposed to be working on the same team.

Maybe that’s the core difference between the open source environment and the corporate environment: you can ignore the work of open sourcers, after all, you’re not paying them anyway.

 

Transitioning to no money.

May 4th, 2015

A long time ago I pondered the idea from star trek that it might be possible to live in a world where there was no money.

The system existed such that there were robots to make whatever you wanted, and there were robots to fix the broken robots.
You could requisition whatever you wanted, and you would get it as long as it didn’t impede on anybody else’s freedoms yada yada yada, Lots of details to work out, but in the basic form, if you had free labor in the form of robots and nobody owned the land from which the resources were drawn, it might be possible to live in a world like that.

Everybody has leisure time all the time. Nobody goes without food or shelter, some would have it better than others, but perhaps at some point the desire for materialism would fade because the ownership of toys would no longer be an indicator of status. Something else would be. Perhaps creativity. You’re cooler if you can dream up something even more insane for the robots to make for you.

Sure there would be rebels, there would be people who wanted it the old way. There are currently people in this world who live without money, it can work. There are also people in this world who re-enact famous moments in the civil war, so I expect there would also be people who would want to live with money just because it was a novelty.

I realize this sounds a little like communism, but the key point here is that there is no government or higher class running things, and nobody has to work for anything. It would be less unfair, because everybody would have unlimited amounts of whatever they wanted, and nobody would be oppressed in any way because somebody else wanted more. There are plenty of things you can’t have in this world, and there are plenty of things you still wouldn’t be able to have. The only difference here is robots and no money.

I can imagine a world where the status quo was leisure, and the effort you made in your life was to figure out creative ways to pass the time.

There would be criminals, there would still be prejudices, and somebody would have to mete out the punishment and those would be robots too, and many people wouldn’t like the idea of the robots having the authoritative power and everybody questions who controls the robots and so on and so forth,  I understand there are problems to be dealt with.

But that’s not what I’m interested in. I think that can all largely be worked out.

What I find to be a fascinating problem is how to get from here to there. That’s been bugging me for a long long time.

And yesterday I think I had an inkling of how to make it work.

For hundreds of generations, humans have been raised with the notion of property ownership and pay-for-labor and the terrible complexities of social rank endowed by their perceived net worth.

There are lots of people in the world, some buy into it, some do not, but everybody has to play ball. Just because you don’t believe in paying taxes, doesn’t mean you don’t have to. Just because you think food should be free, doesn’t mean you don’t have to work to acquire money to buy food to live. That’s just how it is, and that’s all most of us have ever known.

So assuming it is possible to live in a world without money how do you get from here to there.

And I think that the key part of the solution is to do just that: physically migrate to a money free state.

You can’t just blanket say one day to everybody “any property you own no longer belongs to you” or “any money you have acquired up until now is not worth anything.” Nobody would go for it. The “everybodys” would rebel against the “sayers”. It just wouldn’t fly.

But what if a few industrious types set up a plop of land somewhere, and built the robots.

The robots would do work, perhaps mine natural resources and manufacture things. They would sell these things for money to the rest of the world. The money would be used to buy more land and parts and materials and natural resources to make this somewhereland function on its own. After all, the plop of land is small and doesn’t have all the resources of the world available to it (yet), so it needs to import them. At the moment it sounds like a company.

But the people who live there don’t work and don’t take a salary. They are cared for by the robots. And they spend their time doing nothing or figuring out neat things for the robots to do, if they want. Some will have to do the selling to the rest of the world, but most can sit back and enjoy their leisure.

Anyway, the robots keep making more robots and more and more normal-world people slowly give up all their other worldly crap and move to somewhereland. Somewhereland grows in size and starts having more self sustaining resources available to it. More room for people to go there, more resources to use to sustain the people and the robots, and of course, make more robots.

At some point, the tide will turn, the the people not in somewhereland will start running out of parts and people to make them, and the expertise to care for the sick and so on.

And then somewhereland will start giving these things away for free. Or perhaps in trade for more land for somewhereland.

This would be a very slow process, and take a long long time, generations perhaps, but it is a not-unimaginable way to slowly transition from one state to the other without anybody have to break any of their taboos or switch on a particular day from owning property to not owning property.

Everybody would voluntarily sell their land in trade for this new lifestyle.

And if it were managed correctly, I think it could work.

I obviously haven’t flushed this out having just thought of it yesterday, but there’s an inkling of an idea here. I’ll keep working on it.

Perhaps it wouldn’t even have to be all one way or the other. People who didn’t want to join somewhereland could stay where they were and just buy what they needed from the robots in somewhereland. They could even buy robots from somewhereland and used them themselves, and still keep their money. It could work both ways at the same time.

But I think a path to make it work, is possible.

 

Two circles

April 13th, 2015

Has anybody else noticed that we’ve come full circle twice?

In the beginning, there was the mainframe. And lo, it was big and fast and ran applications, and it used dumb terminals. They were very thin clients that served only as a presentation space.

Then, there was the first age of the microcomputer, and people wrote applications, and fat clients which spoke with back end servers to get data, but the application itself, ran on the local computer.

Then out of the depths, came the internet. The internet for whatever reason, created farms of servers which ran the bulk of the applications, and your [relatively] thin client just rendered the data.
A web browser is not a simple presentation space like a dumb terminal was, but it is also not a fat client. Yes systems load much javascript on to your local machine, but the application is still basically running on the server side.

And then, the android and the ios descended from the heavens, and now we have come full circle again. For all of those zillions of apps people are writing are in fact, fat clients for the new breed of computer everybody is buying up.

Boy I can’t imagine what’s going to come next…

The supreme court needs competition.

February 8th, 2015

I will admit I know very little about the goings on of the supreme court. I only hear little tidbits here and there about how they presided over this case or refused to hear that case because of a technicality or something.

The supreme court doesn’t scale. There are 9 justices on the supreme court and that’s it. Every year there are more people, more businesses, more technology, more progress, more activities, more things in life that create grey areas that require decision making by our judicial leaders. But there will always only be 9 supreme court judges.

Maybe I misunderstand, but if the supreme court can choose not to see a case there is little recourse.
But imagine if there were 2 supreme courts. They would have to compete. One court by itself might choose to not take a case, but if there were another court able to do so, the first might compete to get the case so as to be the ones to try the case and make the decision that sets important precedent, or at least keep the other court from being able to do so if they think they wouldn’t like the result of the other court’s precedent.

Of course this idea is fraught with problems, and it would require a change in the constitution so it is unlikely to happen. The goal of the court would no longer be solely to provide justice but their motives might now include keeping the other court from providing their version of justice. Which sounds an awful like politics which is something our government needs less of, not more.

But it is an interesting and very american idea.

Past the peak of smartphones.

December 6th, 2014

The motorola droid 3 is probably the best machine we will see for a while.

I think the phone was only available for 6 months or something like that, and that’s probably when motorola and/or google figured out their mistake.

For a while there was a race to the top, the most stuff in the most phone for the most money. Reasonable business plan. You cram a lot of features into a device and then charge a lot of money for it. This pays for the R&D for the next round.

Except somewhere along the way, somebody figured out that giving the end user lots of cool hardware was probably not in their best long term interest. Apple makes the example obvious. No apple device (phone, tablet) has ever had an SD card slot. Why? Well, why would you ever need to take any content off your phone? Especially without Apple’s ok. If you want more storage, then buy a gizmo with more memory, but allowing you to add removable storage is just bad news for the ecosystem.

I think motorola or google eventually joined that bandwagon, because I notice that the newer the device, the less crazy over the top hardware it has.

The newer devices don’t seem to have HDMI ports on them. Or SD card slots.

I noticed that the droid 4 comes with 8 gig of internal storage whereas the droid 3 came with 16 gig.

So I figure the droid 3 was near the pinnacle of the best hardware that anybody’s ever going to make for the mass market.

And since they can be had on ebay for $30 now, it seems like an incredibly good deal, until they make interfacing with them impossible.

What I mean by that is that I have a samsung captivate glide, it’s only 2 years old, but since it runs android 2.3.something I can no longer download the latest google calendar app, so I can no longer sync the calendar on my phone with my google calendar.

I figure we’ll be seeing more and more of google moving towards their walled garden ecosystem like the one apple as created for themselves.

After all, that’s where the money is.

 

Buying a lottery ticket isn’t such a bad idea.

December 6th, 2014

Buying a lottery ticket is a tax on people who can’t do math.
So they saying goes. And it makes sense to some degree. I have a friend who is a genius math guy and he says you have about as much chance of winning the lottery as you have of having the winning lottery ticket fall in your pocket.
He’s a smart guy, I believe him, but I recently started buying the occasional lottery ticket anyway, and here’s why.

Some of the money that collects in the new york state lottery pool ends up going towards schools. It’s not half like I thought, but I looked it up and it’s a good chunk. Billions of dollars a year are spent on schools that come from the money spent on lottery tickets. It doesn’t amount to a whole lot from the school’s point of view (4% of the revenue per school district said one article), but it’s better than nothing.

Of course this is a big joke in one sense, because the money spent on schools from the lottery is money that doesn’t have to come out of any other budget, and I’m sure whoever owns those other budgets happily pisses away the money on thing’s I’d rather they not.

But here’s the point: Some of the money spent on lottery tickets goes towards schools and it’s one of the very few ways you get to decide how your tax money is spent.

Yes, you could give money directly to your school and will have more of an effect but this way… I have a chance of willing a million dollars. 🙂