When to class / when to table

January 3rd, 2016

So, there’s a related issue in database design and in object oriented programming, and it surrounds the question of when do I break this type of data off into a new table / new class?

Fully normalized data is a pain in the ass to work with. You have to join to find anything you care about, and there’s a performance cost to doing joins, especially outer joins. On the other paw, fully denormalized data is also a pain in the ass to work with. It can be very expensive to search that enormous haystack for that tiny needle, ALTER TABLEs take forever to run, etc.

In the programming world, if you create too many object classes, it’s a royal pain in the ass to find anything, your executable size is going to go up, and unless you do a very good job of inheretince you’re going to be doing cut & paste coding every time you add a good feature. On the other paw, if you create too few object classes, you’re going to find they get large and cumbersome as you have to add many methods to them for the varying sorts of data they’re carrying. Again, maintainability goes down, readability goes down.

So, how do you decide when it’s time to tack on a table or a class? I don’t really know how I make this decision – there’s some sort of intuitive leap that happens inside my mind that says ‘now would be a good time for another table / another object’. Sometimes there are clear data bounderies – a map coordinate probably doesn’t belong in the same table as a phone number, because it’s a very different type of data. Sometimes external APIs suggest a path, because of the way their interfaces are defined. And so forth.

I don’t have a good answer to write down here yet. I’m still thinking about this. But if anyone wants to comment, I’d be happy to hear your thoughts on the matter. (I think I have about 3 readers at this point, although my web traffic statistics would suggest that’s not correct)

..

January 3rd, 2016

Watching the movie Amy has me thinking about addiction and neural networks.

I suspect that despite the simplistic observation that we have free will, what we actually have is free will in building the structure of our minds, which then informs our decisions.

I further suspect that there is a ratio between our memories of the initial results of a decision and our memories of the long term results of that decision that affect the ‘dice’ we throw when making them. (basically, this ratio controls whether we, in AA parlance, “Play the tape all the way to the end.”). In most cases, overusing drugs has a high initial score in terms of knowing that it is going to have pleasurable results, or at least at one point in time did so, while it has a very low overall score insofar as we know that the long term results will not be good. The long term results also probably form a very large probability distribution (as, realistically, anything that you do repeatedly will tend to have, because life is full of surprises) while the short term results probably fit in a much smaller probability distribution (i.e. the initial results tend to follow predictable patterns, where as the long term results tend to be chaotic)

What does that look like in neural network land? Well, the subnets that have the long term results stored are not in as good a position to be predictive as the subnets that have the short term results stored. So, you need to have the ability to do some classing of resultsets. Normally, I eschew black and white thinking, but in avoiding addiction, it’s a very useful skill – PROVIDED you’re using it in the right direction. What you do NOT want to do is use black and white thinking to prove to yourself that you’ve failed. (There’s no winning percentage in kicking yourself). Instead, you need to use black-and-white thinking to filter the large probability distribution of all the memories of previous long term results into basic classes of ‘good’ vs ‘bad’ – now this likely doesn’t happen in a way that you can immediately see on the surface, so this article is really only useful for those of you who are into modifying the structure of your mind and have learned a fair amount of how to do it. Anyway, filtering in that way will let you ‘play the tape all the way to the end’ in parallel and average the results even though they’re all over the map. Done correctly, this can be a powerful tool.

In terms of measuring success vs failure, what you want to do is filter the other direction. If you delayed using by even a minute, if your actions matched your intentions more than the last time you walked through this cycle, you’re succeeding. And you want to champion your successes, because NNNs learn much more easily by success than by failure. (There’s a very good reason for this, which I will likely go into in a future article – you might say it’s a design feature)

It might be interesting and informative for me to go through all the classic cognitive distortions here to figure out what I would guess they look like in a NNN.


Unrelated note:

One thing that really stands out to me in the movie is that Amy would probably have been okay if her label had not considered her contractional obligations more important than her life. In general, this is a flaw we repeatedly see in corperations, and I think it would go away if everyone in the world understood the milgram effect and fought it, instead choosing to do what I would describe, with apologies to Mookey and the trash can, as doing the right thing.

January 3rd, 2016

So, I look over the list of things that I hypothesize could have split me, and I think, what a bunch of first world problems. I mean, the only one that sounds like it rationally could have done much damage is the idea that I might have been raped, and I have no memory of the actual event and don’t have any reason to think that it happened other than a fear and a change in my attitudes towards one gender. I hear on the news that people are having to live in war zones and other people are getting shot at by the cops. I really don’t have anything to complain about, comparitively, although it would be really nice to live in a world where what happened to me was on the outside edge of bad and undesirable.

Pink, F***ing perfect

January 1st, 2016

Made a wrong turn once or twice
Dug my way out, blood and fire
Bad decisions, that’s alright
Welcome to my silly life

Mistreated, misplaced, misunderstood
Miss ‘No way, it’s all good’
It didn’t slow me down.
Mistaken, always second guessing
Underestimated, look I’m still around

Pretty, pretty please, don’t you ever, ever feel
Like you’re less than fucking perfect
Pretty, pretty please, if you ever, ever feel
Like you’re nothing, you’re fucking perfect to me

You’re so mean (so mean) when you talk (when you talk)
About yourself. You were wrong.
Change the voices (change the voices) in your head (in your head)
Make them like you instead.

So complicated,
Look how we all make it.
Filled with so much hatred
Such a tired game
It’s enough, I’ve done all I could think of
Chased down all my demons
I’ve seen you do the same
(Oh oh)

Pretty, pretty please, don’t you ever, ever feel
Like you’re less than fucking perfect
Pretty, pretty please, if you ever, ever feel
Like you’re nothing, you’re fucking perfect to me

The whole world’s scared, so I swallow the fear
The only thing I should be drinking is an ice cold beer
So cool in lying and we try, try, try but we try too hard
And it’s a waste of my time.
Done looking for the critics, cause they’re everywhere
They don’t like my jeans, they don’t get my hair
Exchange ourselves and we do it all the time
Why do we do that, why do I do that (why do I do that)?

Oh, pretty, pretty, pretty

Pretty, pretty please, don’t you ever, ever feel
Like you’re less than fucking perfect
Pretty, pretty please, if you ever, ever feel
Like you’re nothing, you’re fucking perfect to me
(You’re perfect, you’re perfect)
Pretty, pretty please, if you ever, ever feel
Like you’re nothing, you’re fucking perfect to me.

My religion, until further notice

January 1st, 2016

1) Trust in love
2) Do what works

(This is based on the theory that the shorter the source code, the less likely things are to go wrong. Both the Christian and the Muslim God were bad programmers.)

And what’s going on?

January 1st, 2016

Let me try to explain. I don’t know that I really can, but you all know I’m lousy at keeping secrets, and I’m going to take a stab at it.

$person, I’ve been talking with you every day for years. One big problem I have is I don’t know if I’m talking to a copy of you, or the real you. Or even if that distinction makes *any* sense. What you tell me is that I’m talking to you in the future – when we all know better how to be who we really are. That fits the data.

I have seen more than one world during my time on Earth. I have seen a world where people rollerblade in the street, completely secure in the knowledge no car will hit them – a world where there are no locks, no passwords, nor any need for them. A world where love won over fear. I’ve seen this. I’ve seen the people – so beautiful, so healthy, so happy. I’ve danced with them and skated with them. I don’t know what makes the transition happen, other than it seems to involve my mental headspace in some way. And then I’ve seen this. A world where social media seems to have replaced being social. A world where the news constantly tells us of wars and gunshots fired and bad decisions made because of money.

My gut feeling is both of them are real. I’m a musician, see, and I understand about multitrack decks. And I also understand that there’s no reason to think a three dimensional reality wouldn’t fit in a multitrack deck. You’d just have to have a really really big one. (Big in terms of bytes stored)

I fell in love with you the minute I met you. This isn’t just true of you. There’s a LOT of people out there I fell in love with the minute I met. If you could see my office wall, you would see the pictures of them. But we live in a world that preaches fear. Well, I don’t honestly know where you live.. but you sure act like you live in a world where fear won. And I know I did, or I’d be recording albums instead of writing commissions systems. And in fear world, we do stupid things. Things that don’t work very well. Like not being able to tell people how we feel about them.

When you knew me as a teen I was extrordinarily screwed up. Now I’m just somewhat screwed up, and forever am chasing being a better friend and lover and dreamer. I keep persuing personal growth, but I don’t have any good way to measure success. I do, however, have a good way to measure failure. Showing up in court and being told “I think if you talk to me in the next two years you should go to jail”, that’s failure. Not sure which of us it’s indicative of failure in. Used to think I knew every failure was me. No longer so sure about that.

Now, one mental model I use for handling all this is to think that I’m a very big neural network, and that part of my neural network is the person that’s on the ride, experiencing reality, and part of it is the glue that connects me to the world I’m in. And it’s entirely possible that glue is faulty. What I saw, might not have happened, might have happened, or might have happened entirely differently. Because the you that I talk to using the mental equivalent of texting (this may be prayer, but I wouldn’t want to bet on it) tells me things like ‘Let me in’ and ‘Come home’.

Fuck if I know where home is at this point, or how I would get there.

As far as not talking to you out there, I do the best I can. I think it’s a stupid request, I think you’re being blind, but I also think it’s a request you should be free to make, and one I should comply with. But my mind is broken. Occasionally it glitches and suddenly I’m on a different track’s memories even though I’m still in this track. And I REMEMBER! We’re not supposed to have to live afraid. We did so much better once. And I keep trying to light the fuse.. leave the keys in the ignition, leave the doors unlocked, trust and hope the others trust too.

What split me?

January 1st, 2016

So, I have multiple personalities. Blame never really helped anyone, but I’m really curious what happened to me to make this true.

1) My inability to say no resulting in my parents not recognizing I was refusing their religion. I tried to say no, but I’m not that great at it now and I was really bad at it then. I did tell them I wasn’t sure I was ready for this. They essentually said that I had to. Now, at this point I know the right thing to do – Kids, if someone does this to you, explain to anyone who will listen why you’re not ready for it. Walk down to the center of the building, grab the mic, and start talking. You have just as much right to be talking as the preacher – if he’s trying to force the religion into your mind, you have MORE right than he does. Your mind belongs to you. You get to choose the software that runs on it.

2) My sister’s attitude towards me. I don’t know how many of my memories are viable, so I don’t know if remembering her punching me in the stomach, pulling my hair, taking my things, criticizing me in a carefully crafted tone, etc are all real. But I do know that my impression is she hates me and wants me to hurt, and is quite willing to use all her skills to make that happen.

3) School. In general, I find Earth’s schools fatally flawed for my type of cat. The best way for a person like me to learn is to be given access to information and left alone. Grading me does bad things to my self-image and even worse things to my feelings about you. Telling me what I should learn when is just plain selfish.

4) Whatever $thing I can’t remember that makes sexual contact with males unpleasant and the idea of being on the receiving end of anal sex terrifying. I remember finding both boys and girls attractive at one point. Something happened to me. I am not sure I *want* to know what.

5) My mother’s extremely screwed up attitude about sex. I’ll just leave that there. Don’t be so afraid of your children doing what they naturally are going to do, what they should do, that you send hardcore negative emotions their way and are hypercritical of them for cuddling with one of their friends and listening to music.

One more thing..

January 1st, 2016

My best theory at the moment is that God is *us*. That we built this universe, and that we’re in fact inside some sort of hypervised experience. However, if I’m wrong, I challenge God: Come down here, in person – as long as you don’t use weapons on us I am absolutely fine with you being totally invulnerable – and give us a religion that doesn’t suck.

I should warn you my standards for ‘doesn’t suck’ are high. If you can read my mind (and you’re welcome to, whoever you are, if you have the tech, please do!) you know how I define heaven. The heaven in both major world religions is *pathetic*. Given access to a big computer system connected to my mind and infinite time, I could do so much better. And I’m one tiny li’l inconsequential dude.

I think it enormously telling that I get a lot more out of going to a church if I don’t speak the language.

But what about me?

January 1st, 2016

One thing that’s really frustrating for me is that I don’t feel like my friends are pulling their weight for me as much as I am pulling it for them. I paid two people’s rent this month. And I certainly don’t want anyone getting evicted. But I would like some idea that my friends are doing *something* to further *my* dreams:

Worldwide goals:

1) Everything for everyone – a end to money as a limiting factor in the lives of people
2) A end to abuse of authority and power. No more parents breaking their children. No more cops shooting citizens. No more politicians starting wars.
3) A end to irrational fear – certainly not a series of systems that perpetuate it, which is what we have now.

Personal goals:

1) Real life friendship with $person
2) Music career
3) Lucid dreaming, of sufficient quality to be able to experience things like controlled flight with accelerator data (Look, when I go into a dive, I want to FEEL it, caprice?)

January 1st, 2016

Like Kirk, I don’t really believe in the no-win scenario. I appear to be in a couple of them (my desire to be real-life friends with $person and my desire for a music career without sacrificing quality of life) but I also tend to remind myself that I’m in the middle of the ride – that both of them appear no-win right now doesn’t mean to give up, it just means I haven’t figured out everything I need to know.

I’m trying to master the art of *almost* going crazy. Because there definitely is something special that happens when I get my mind up to wide-open road speeds that is worthy of having – every time I do it, I get more capacity, mental-wise. But there’s some point at which it starts shaking like a unbalanced tire, and then Bad Things Happen. ™ If nothing else, I have to think that time spent in a blackout is not exactly productive, and there’s no doubt that I push $person further away whenever I’m in that state, and I can’t run a multitrack deck to save my life, because I lose the ability to easily see cause and effect and Earth’s tech is still too buggy to be relied on to Just Work.

My current thinking is the goal is to slam the throttle up, and then back down as I come over the top. I think using seroquel every day is definitely the wrong use of the drug – like all sleeping pills, it loses control authority. So the challenge is to treat it like it’s a addiction – as soon as I get to where I *need* to use it every day to sleep, I need to be fighting it and trying my hardest to get off it. Then once I’m ‘clean’, wait for the spool up (currently happens twice a year) and then use seroquel scaled to my current clock speed to make sure I still get sleep.

I would dearly love it if I could trust Earth’s health care system, but so far it hasn’t given me *any* reason to think that I can and has given me a number of reasons to think I can’t. Sometimes I think this planet is deliberately cracked in a whole bunch of ways just to teach us how not to.

I know what I would build, if I were in charge of mental health. Because it’s so obvious to me, and I don’t know nearly as much as the powers that be, I have to suspect that they don’t want cures. For whatever reason, they like seeing people hurt. I hate them for it, and wish I could take away their power over me. If anyone is curious:

Artificial Neural Network + Trans-cranial electromagnetic induction + FMRI = win.