Product ID

March 24th, 2014

A very comfortable, very long-term-wearable EEG which has the minimum subset of electrodes needed to detect mental activity level, connected to a electroluminescent panel on a T shirt that shows current activity a la CPU meter.

When having a conversation with someone wearing this device, you’d be able to tell when something you said engaged their mind. I think it would be *very* cool.

Sting, Send Your Love

March 20th, 2014

Finding the world in the smallness of a grain of sand
And holding infinities in the palm of your hand
And Heaven’s realms in the seedlings of this tiny flower
And eternities in the space of a single hour

Send your love into the future
Send your love into the distant dawn

Inside your mind is a relay station
A mission probe into the unknowing
We send a seed to a distant future
Then we can watch the galaxies growing

This ain’t no time for doubting your power
This ain’t no time for hiding your care
You’re climbing down from an ivory tower
You’ve got a stake in the world we ought to share

You see the stars are moving so slowly
But still the earth is moving so fast
Can’t you see the moon is so lonely
She’s still trapped in the pain of the past

This is the time of the worlds colliding
This is the time of kingdoms falling
This is the time of the worlds dividing
Time to heed your call

Send your love into the future
Send your precious love into some distant time
And fix that wounded planet with the love of your healing
Send your love
Send your love

There’s no religion but sex and music
There’s no religion but sound and dancing
There’s no religion but line and color
There’s no religion but sacred trance

There’s no religion but the endless ocean
There’s no religion but the moon and stars
There’s no religion but time and motion
There’s no religion, just tribal scars

Throw a pebble in and watch the ocean
See the ripples vanish in the distance
It’s just the same with all the emotions
It’s just the same in every instance

There’s no religion but the joys of rhythm
There’s no religion but the rites of Spring
There’s no religion in the path of hate
No prayer but the one I sing

Send your love into the future
Send your precious love into some distant time
And fix that wounded planet with the love of your healing
Send your love
Send your love

There’s no religion but sex and music
There’s no religion that’s right or winning
There’s no religion in the path of hatred
Ain’t no prayer but the one I’m singing

Send your love
Send your love

Chesney Hawkes, The One And Only

March 8th, 2014

I am the one and only, oh yeah

Call me, call me by my name
Or call me by my number
You put me through it
I’ll still be doing it the way I do it

And yet you try to make me forget
Who I really am
Don’t tell me I know best
I’m not the same as all the rest

I am the one and only
Nobody I’d rather be
I am the one and only
You can’t take that away from me

I’ve been a player in the crowd scene
A flicker on the big screen
My soul embraces
One more in a million faces

High hopes and aspirations ideas
Above my station maybe
But all this time I’ve tried
To walk with dignity and pride

I am the one and only
Nobody I’d rather be
I am the one and only
You can’t take that away from me

I can’t wear this uniform
Without some compromises
Because you’ll find out that we come
In different shapes and sizes

No one can be myself like I can
For this job, I’m the best man
And while this may be true
You are the one and only you

I am the one and only
Nobody I’d rather be
I am the one and only
You can’t take that away from me

I am the one and only
I am the one and only
Nobody I’d rather be
I am the one and only
The one and only
You can’t take that away from me

I explain SQL to a beginner

February 28th, 2014

I recently gave this explanation of SQL to a beginner, and I thought it was good enough to save for posterity. This is from a Skype Chat.

[2/28/14 3:56:05 PM] Sheer Pullen: The real thing to understand is that SQL is just a very formal way of asking questions
[2/28/14 3:56:42 PM] Sheer Pullen: and putting information into a system to enable you to ask it questions
[2/28/14 3:57:08 PM] Sheer Pullen: The basic form of information storage in such a system is the table, which is basically just like a excel worksheet
Tables have rows and columns – a column is a datum about something, generally, where a row is a instance of that something.
So if you had a list of customers, each customer would be a row and details about them, like their name or number would be a column
In order to make joining easier, a convention has grown up to use “keys”, which are unique numbers or strings that help identify a row
[2/28/14 3:59:20 PM] Sheer Pullen: in most systems these are just a number, called a identity, that automatically increments.. grows by a set number each row you add – generally 1
[2/28/14 3:59:33 PM] Sheer Pullen: foreign keys point to values in other tables or even other databases
[2/28/14 3:59:51 PM] Sheer Pullen: so if you had a table that was orders, and a table that was customers, orders might have a foreign key to point to he customer
[2/28/14 4:00:00 PM] Sheer Pullen: because it’s “foreign” to the orders table..
[2/28/14 4:00:36 PM] Sheer Pullen: SQL has a few very basic verbs that you use for almost all operations
[2/28/14 4:00:44 PM] Sheer Pullen: SELECT, for looking up a value – asking a question
[2/28/14 4:00:47 PM] Sheer Pullen: INSERT, for adding a row
[2/28/14 4:00:50 PM] Sheer Pullen: DELETE, for removing a row
[2/28/14 4:00:54 PM] Sheer Pullen: and UPDATE for changing a row
there are also some verbs you use only when you’re setting up a table, like CREATE TABLE and CREATE INDEX
[2/28/14 4:01:13 PM] (name deleted): insert, delete and update sound scary to a newbie
[2/28/14 4:01:20 PM] Sheer Pullen: yes, as a newcomer you start with SELECT
[2/28/14 4:01:29 PM] Sheer Pullen: especially if you’re working on a production database 😉
[2/28/14 4:02:01 PM] Sheer Pullen: and as a newcomer, you don’t work directly on prod databases at places like (medium-sized client), you work on what is called a read replica, which is a clone
[2/28/14 4:02:05 PM] Sheer Pullen: that way you can’t actually damage anything
[2/28/14 4:02:15 PM] Sheer Pullen: even if you ask a question that takes more resources than the server has to answer
[2/28/14 4:02:33 PM] Sheer Pullen: (it is possible to hurt (our production main server) with a poorly chosen SELECT just by asking it to use more resources than it has)
[2/28/14 4:02:54 PM] (name deleted): server down
[2/28/14 4:02:56 PM] (name deleted): crash
[2/28/14 4:02:57 PM] (name deleted): boom
[2/28/14 4:03:00 PM] Sheer Pullen: well, no, you won’t crash the server
[2/28/14 4:03:06 PM] Sheer Pullen: but you will make it very slow for all the other people using it
[2/28/14 4:03:17 PM] (name deleted): what is a deadlock
[2/28/14 4:03:27 PM] (name deleted)t: to many wanting the same thing from same place
[2/28/14 4:03:29 PM] Sheer Pullen: Ah. This actually gets into a non-SQL concept
[2/28/14 4:03:33 PM] Sheer Pullen: but yes, that’s a very good summary
with modern computers, you can be doing more than one thing at once because there’s more than one CPU
[2/28/14 4:04:02 PM] Sheer Pullen: if two CPUs both want the same disk resource at the same time, they can’t have it, because there’s only one disk
[2/28/14 4:04:09 PM] Sheer Pullen: so one has to wait for the other
[2/28/14 4:04:13 PM] Sheer Pullen: if they ask at *exactly* the same time
[2/28/14 4:04:23 PM] Sheer Pullen: then the database engine doesn’t know which of them it should serve, so it tells them both they deadlocked.
[2/28/14 4:04:27 PM] Sheer Pullen: and then they have to try again
[2/28/14 4:04:47 PM] (name deleted): so what manages that “request”
[2/28/14 4:05:03 PM] Sheer Pullen: modern database engines have a concept called ACID, which means Atomic, Consistant, Isolated, and Durable
[2/28/14 4:05:11 PM] Sheer Pullen: They will not let the code ask for something which would break it
[2/28/14 4:05:24 PM] Sheer Pullen: the database engine is what handles requests in SQL
[2/28/14 4:05:28 PM] (name deleted): are we a modern DB engine?
[2/28/14 4:05:30 PM] Sheer Pullen: We are.
[2/28/14 4:05:42 PM] Sheer Pullen: We use mysql 5.5, which is a database engine with 20 years of open source work behind it’s code
[2/28/14 4:05:47 PM] Sheer Pullen: I’ve worked on it a time or two myself
[2/28/14 4:05:51 PM] Sheer Pullen: thousands of people have
[2/28/14 4:06:15 PM] (name deleted): is there any book you recommend ie sql for dummies?
[2/28/14 4:06:25 PM] Sheer Pullen: That w3schools tutorial is a great place to start
[2/28/14 4:06:32 PM] Sheer Pullen: it has a SQL engine written in java written right into the page
[2/28/14 4:06:37 PM] Sheer Pullen: so you can try things out on the web page
[2/28/14 4:06:48 PM] (name deleted): and what is the best doc to have for (clients) schema
[2/28/14 4:06:56 PM] Sheer Pullen: *laughs* There isn’t really one.
[2/28/14 4:06:58 PM] (name deleted): saw something called ERD?
[2/28/14 4:07:02 PM] (name deleted): what is ERd?
[2/28/14 4:07:12 PM] Sheer Pullen: (our DBA) is building ERDs, which are graphical representations of the relationships between tables. ERD stands for Entity Relationship Diagram
[2/28/14 4:07:22 PM] Sheer Pullen: and you can get a copy of those and look at them and they will help you
[2/28/14 4:07:42 PM] Sheer Pullen: the “stock” ofbiz tables are documented in several Ofbiz books, I can send you links if you like
[2/28/14 4:07:56 PM] Sheer Pullen: but we have added many tables and relationships only documented in (our DBA’s) diagrams, or in some places (sadly) nowhere.
[2/28/14 4:08:18 PM] Sheer Pullen: However, a lot of those are for pretty exotic concepts
as a beginner, you’re going to start out asking questions like “What was the volume for this order, and who placed it”
[2/28/14 4:08:50 PM] Sheer Pullen: Actually, your very first questions will be things like “What is the name for this party ID”
[2/28/14 4:08:54 PM] (name deleted): how many active (customers) by state
[2/28/14 4:09:42 PM] Sheer Pullen: Now, if you are curious, here is how I would ask that question
[2/28/14 4:10:32 PM] Sheer Pullen: First, I’d think about what tables I needed
[2/28/14 4:10:41 PM] Sheer Pullen: I’d know I needed POSTAL_ADDRESS, because duh that’s where addresses live
[2/28/14 4:10:49 PM] Sheer Pullen: I’d know I needed (custom customer table), because that’s how I find active consultants
[2/28/14 4:11:01 PM] Sheer Pullen: I’d know i needed PARTY_CONTACT_MECH_PURPOSE, because that ties the two together
[2/28/14 4:11:13 PM] Sheer Pullen: then I’d think about HOW I needed to join the tables together
[2/28/14 4:11:44 PM] Sheer Pullen: I’d know POSTAL_ADDRESS and PARTY_CONTACT_MECH_PURPOSE needed to join on CONTACT_MECH_ID, and additionally that I wanted entries that had a CONTACT_MECH_PURPOSE_TYPE_ID of (a enum), because that’s where we store their most important address
[2/28/14 4:12:34 PM] Sheer Pullen: I’d know (custom customer table) and PARTY_CONTACT_MECH_PURPOSE needed to join on PARTY_ID, because that’s the key that describes a unique person like a consultant, and that in addition I only wanted rows from (custom customer table) that had a APPLICATION_STATUS_ID != ‘(Customers who are still active enum)’ because I wanted ACTIVE (customers).
[2/28/14 4:13:09 PM] Sheer Pullen: In addition, I’d know I wanted to group the results, because I’m looking for a particular thing, their state
[2/28/14 4:13:15 PM] (name deleted): so first tables
[2/28/14 4:13:23 PM] (name deleted): that the where
[2/28/14 4:13:29 PM] (name deleted): then the what
[2/28/14 4:13:30 PM] Sheer Pullen: *grins* I’m just describing the way I think through these things. You might choose a totally different way.
[2/28/14 4:13:34 PM] Sheer Pullen: but yes, that’s exactly right
[2/28/14 4:13:37 PM] Sheer Pullen: then the last one is the how
[2/28/14 4:13:48 PM] Sheer Pullen: in this particular case, I want them grouped by the state they’re in, and I want a count of that state
As far as what order to join in, the true wizard joins for performance, starting with most specific first, when writing something that’s going to take a lot of database Parenthesis. For a question like that one that’s pretty easy, I generally just write it out in whatever order it comes to me.
[2/28/14 4:35:46 PM] Sheer Pullen: Two more little quick things I want to mention and then I’ll get back to “real work”
[2/28/14 4:35:48 PM] Sheer Pullen: 1) AND and OR
[2/28/14 4:36:02 PM] Sheer Pullen: these are very important concepts in every type of computer operation you will ever do
[2/28/14 4:36:13 PM] Sheer Pullen: AND means both sides are true, OR means one or the other (or both) sides are true
[2/28/14 4:36:21 PM] Sheer Pullen: There’s a third, XOR, which means ONLY one or the other side is true..
[2/28/14 4:36:29 PM] Sheer Pullen: but that’s not very often needed for stuff you’ll do
[2/28/14 4:36:33 PM] Sheer Pullen: and 2) Parenthesis
[2/28/14 4:36:53 PM] Sheer Pullen: As you probably learned in high school math, there is a order of operations which every equation.. which a SQL query is a type of.. will be evaluated on
[2/28/14 4:37:07 PM] Sheer Pullen: The way to bypass this is by placing terms in parenthesis
[2/28/14 4:37:24 PM] Sheer Pullen: if you are getting results you didn’t expect, you might add parens to expressly state the order of operations you want
[2/28/14 4:37:29 PM] Sheer Pullen: this is just like algebra..
[2/28/14 4:38:02 PM] Sheer Pullen: i.e. in algebra the OO is PEMDAS – where the P is parens, forcing anything in parenthesis to be evaluated first
[2/28/14 4:38:19 PM] Sheer Pullen: and otherwise it would be exponents, multiplication, division, addition, subtraction
[2/28/14 4:38:28 PM] Sheer Pullen: but if you want subtraction to be evaluated first you throw it in parens
[2/28/14 4:38:39 PM] Sheer Pullen: SQL is the exact same way, as is every high level programming language I know of

Fraud In France live show

January 24th, 2014

From my current band, : http://www.fraudinfrance.com/files/FraudInFrance-Pogues.mp3

Includes the first ever performance of Click of the Gate, among other songs.

Tracks:

Click of the gate
Road Less Gravelled
Love You
John’s Song
Starshine
Hurricane Heart
Dirty Boulevard (For Lou Reed, with our best wishes for wherever he’s headed)
1%
Liar
Turmoil Boy

Request for itunes / other mp3 player people

January 23rd, 2014

Could you coders please start encoding lyrics in mp3s as metadata and then allowing us to search our mp3 collection via lyrics?

Thanks, S.

More on money and value

January 4th, 2014

TL;DR=Conservatives appear to me to think that what defines what we can afford is the number of dollars available, not the amount of food, concrete, steel, and other real resources available, and that is a problem

For more about this, see http://www.sheer.us/weblogs/?p=2316

So, I’ve been thinking lately about how what money is worth – and what liberals and conservatives believe is possible – represents our faith in ourselves. When conservatives talk about how there’s not enough money to solve problem X – where problem X might be homelessness, hunger, health care – or whatever – essentially what they are saying is that they don’t have faith in humanity’s ability to come up with enough resources to solve these issues. In a previous post, I discussed the dichotomy between value and money, and explained how we often destroy the former in our chase for the latter because we have a corrupted and confused idea about what money is and what it represents. I’ve also talked about how in order to accurately abstract the value available to humanity, the government should be printing and handing out large amounts of money every year, because the amount of value available to us increases every year, often by leaps and bounds as we discover new things. In a future article, I will discuss how certain types of patent hoarding destroy value and make us all poorer so that a few corperations can garner more money, and why that’s a undesirable thing. But in this article, I am going to talk about the whole idea that we can’t do things like universal health care because “we can’t afford it”.

The conservative approach to anything that involves giving resources to people is “we can’t afford it”, with the automatic assumption that the conservative will somehow be less wealthy if those lazy welfare moms get a free ice cream sundae. Now, in fact, we probably can afford it – with all we know about automation and science, and all we’re learning, we could probably feed everyone, clothe everyone, give them all free houses, etc. If our goal were to give everyone everything tangible they wanted, we probably could give them that experience. (more on that later) Whether it would be good for them is another, more complicated question, because many people have a need to draw self-esteem from their jobs, from the feeling that they’re doing something useful.

I suspect if you told a lot of people that it was possible for us to feed all the hungry, house all the homeless, etc, without taking any wealth from their pocket at all, their response would still be that we shouldn’t do it – “Because I had to work for this, if they get it free, it makes my work less meaningful and it’s not fair” is one possible explanation of this, while another one is “But if we didn’t give them free food, we could give me more.”. Conservatives, please contact me and tell me I’m wrong if I am, so I can update this and learn more about how you see the world.

I would argue that the simple knowledge that there are people starving and cold and homeless makes us all less wealthy, and that some people have not taken some factors into account.

Now, I’m going to digress from that for a minute to state something. I think everyone deserves everything they want, except insofar as the things they want are hurting other people. I even think people deserve to have the *experience* of hurting other people if they want it – just that no other people should actually be hurt. I think this is technologically achievable and I think it’s desirable.

Now on the other paw, there are those who say that we only appriciate the things we earn. I think it’s possible that this is somewhat true on earth but I think it is the result of our culture – I do not think our culture does a good job of programming us to be healthy and happy – in fact I think it often does a good job of programming us *not* to be healthy and happy. I think it would be possible to build a set of beliefs under which we could be given things and appriciate them even though we didn’t have to work for them – and I think this is a desirable thing to do, because I think – yes, really – we should be trying to give everyone everything they want.

Anyway, back to the question of “we can’t afford it.” Many times, our need to not take care of our fellow man so we can feel good about how they aren’t getting “something for nothing” ultimately costs us far more in real value than just giving them what they need would. I’ve heard of cases where people have looked at the cost of having homeless vs. the cost of sheltering them, and the cost in dollars was actually higher to keep them homeless (see http://www.huffingtonpost.ca/2012/09/24/canada-homelessness_n_1908876.html). Now, I suppose we could just actually say “well, if you’re homeless, you don’t deserve to live” and just execute them and/or provide no services at all. However, I’d *really* rather not live on the planet that would make that decision.

Often, in the case of theft, it would be far cheaper just to give the criminals what they wanted to steal than to keep them in jail, for example. But we’re horrified by the idea that someone could get something for nothing – even though, as automation and the number of people wanting jobs goes up, we have far more hands to build things than we have things that need built.

For some of this, I blame the particular set of morals that our modern world espouses. I think the idea that we deserve to suffer is wound all throughout several of our religions, and I think it’s deeply flawed. We *don’t* deserve to suffer. We *choose* to suffer, as a race and as individuals, and to some extent we have not yet figured out how *not* to suffer, and we do deserve the freedom to *choose* to suffer, but we also deserve the freedom to choose not to.

Anyway, back to the whole money thing. Part of why I am a left-winger is I have optimism, and hope. I believe that we *can* afford to treat everyone well, that human ingenuity and creativity is more than up to the task of making us all wealthy, healthy, loved, and well cared for. I believe that the reason it looks like, on paper, that we can’t is that we have a system of accounting that is fatally flawed, and I think we should all be holding the people who are upholding that system accountable for that, as well as educating them as to why their system fails to abstract value and is keeping us all far more poor in real value than we should be.

Of course part of the problem is that the issue at hand can get attached to theology – the honest and deeply held belief that people don’t deserve anything unless they work for it, that people should have to work harder than they are, that the poor are somehow not good enough to be anything more than poor, that they’re all gaming the system and they deserve to suffer for that.

I did have a good conversation with a member of my extended family which opened my eyes to the one glaring problem with the welfare state – that generally people need something to make them feel useful (as I’ve said, I think we could fix this culturally so people realized they were a positive force just by being them, and having friends, and living) and so people on welfare have self-esteem issues that result from them not feeling like they are useful. And I won’d deny that I would probably go nuts if I didn’t have some sort of work to do to occupy my time (although as has been mentioned many times before I really wish that that work was more music and less IT)

Note that this article has been edited from the original, which I feel was bringing in issues that are irrelevant to the discussion.

Now that we’ve talked about that, perhaps it is time to look at Resource Allocation As A Group

December 28th, 2013

The song most often commented on at Fraud In France shows is Starshine, which is about Voyager I. We finally have a halfway decent take of it, captured at practice #46 and mixed by Bunne Rabb – for the curious, here’s a link: http://pb.sheer.us/bunne/Dec%202013/Star%20shine/SS-46-non-asplodey_mix.mp3

C# arg parser

December 2nd, 2013

Since I posted a perl one. Note there’s probably some neat way to do this using system libraries that I just don’t know about, but this is what I use

As part of the class (you can have this as a class i.e. Config.cs, or as part of the program:


static readonly Dictionary argsDict = new Dictionary();

Parser:


static public void ArgHandler(string[] args)
{
foreach (string arg in args)
{
Regex quoteRE = new Regex(“\”(.*)\””);
string[] quoteResults = quoteRE.Split(arg);
string workarg;
if (quoteResults.Length > 1)
{
workarg = quoteResults[1];
}
else
{
workarg = arg;
}

Regex argRE = new Regex(“–(.*)=(.*)”);
string[] regResults = argRE.Split(workarg);
if (regResults.Length > 1)
{
Console.WriteLine(string.Format(” — {0} -> {1}”, regResults[1], regResults[2]));
argsDict.Add(regResults[1], regResults[2]);
}
}
}

Get a argument:


static public string GetArg(string arg)
{
string result = null;
argsDict.TryGetValue(arg, out result);
//if (debug)
// Console.WriteLine(“arg ” + arg + ” -> ” + result);
return result;
}

At the top of main(), call:


ArgHandler(args);

From a emailed conversation..

December 1st, 2013

TL;DR=We should use prisons as a experimental ground to find out what media help broken people heal

I emailed this, and then – while I think it needs rework and expanding on, which I will probably do later – I thought I should paste it into my blog now just to get it out there. It’s a idea that I’ve discussed with various people over the years, that’s slowly grown..

From email:

This actually reminds me of a experiment I want to do. I will never,ever,ever be allowed to do it, but I think it would be truly awesome.

I want to retrofit a bunch of the country’s jails. I want to equip every cell with a very hardened computer console [as in virtually indestructable and also virtually impossible to break into from a hacking point of view]. Then, I want to try a number of different permutations of libraries of videos and books in each jail, and try different amounts of freedom to roam the net / free phone calls / things of that nature. I’d even want to try in some of the jails letting the employees work doing data entry or other remote-control things and potentailly also try having their income partially go to pay back their victims. I’d try anything in the initial seed set – porn, religious texts, movies from the 20s, childrens movies..

The purpose is to see what set of media, what set of communications options, and what set of employment options

a) Reduce recividism the most
b) Result in the happiest population

If we really think about it, what we really want our jails to do is help the people inside become better citizens. Since we don’t execute very many criminals and we don’t keep very many inside forever, we really want to figure out what to do for them that will turn them into people who don’t commit crimes. Ultimately it’s in the best interest of everyone who has to live here for our jails, rather than “punishing” people – often for crimes they committed because of mental illnesses they have – to heal them. And if a particular set of books or movies or whatever encourages that process, let’s give it to ’em free of charge, maybe even find ways beyond that to encourage them to watch & read! I know from my parking meter days that I could make a terminal that would survive anything a inmate could do to it. It wouldn’t be pretty, and it wouldn’t be possible to touch type on it that easily, but it probably wouldn’t cost *that* much either – and utlimately, if one is measuring using value rather than money, it would potentially pay for itself many, many times over. Plus, the value of knowing which, out of the milions of books and movies we have really heal people is almost beyond putting a dollar amount on.

I also talk about commercial prisons and the profit motive encouraging recidivism here and suggest a fix

I also make another suggestion here – that if we must have commercial prisons we only pay them for the prisoners that do not re-offend.