Latest Blogs

How a Mood-Unstable, Memory-Deficient Man Budgets

Maybe "budgets" should be "saves", but generally I figure "budgeting" is saving enough money for costs which might accrue in the future. In my case, I can't (or won't) think that far ahead, so simple rules I can apply suits me very well. These are the two rules I'm applying these days (the first rule I've been using for my last two paychecks, successfully):

  1. Transfer everything remaining in my checking account to savings when my new paycheck arrives

  2. Immediately transfer the total amount spent on non-necessities during last pay period to savings when my new paycheck arrives

Usually, I'd attempt to explain why I chose those rules, but I'll leave that up to the reader (hi, Paul!), unless a further explanation is requested.

New Version of This Site

I've been playing around with an update (well, total rewrite) of this site for a few weeks now. If you give an eye to the site as it is now, it's not too hard to find it's pretty damn ugly. And the logo I slapped on from horriblelogos has a white background, contrasting from the weird off-blue I chose for some reason, and it bothers me to no end. I'm happy buying a $7 club sandwich from Zaxby's, but I didn't spend the $10 (or whatever) to get a transparent logo. I'm an idiot.

Anyway, I wanted desperately to try out all this fancy new Javascript-powered shit, so I started writing the new version with NodeJS. It's all written in CoffeeScript, and uses ExpressJS as a framework, with PassportJS for authentication. I also shoved in Jade for templates and Stylus for CSS. For database shit, I'm using Sequelize as an ORM.

What I've learned is it's all pretty goddamn straightforward, aside from Sequelize, which seems to brush against the limitations of JS. There's a lot of boilerplate needed for simply describing models, but because it's boilerplate, I'm sure someone will abstract it away at some point. I don't have quite the intimate relationship with JavaScript as I do with Python, so I don't know how ugly that solution may be, but regardless of that, I know if a consistent, intuitive interface can be provided, the ugliness isn't a terribly important factor. You don't need to know what goes on behind the pedals if it controls the car exactly how you'd expect.

I was inspired to write this new version when I stumbled upon hallojs, an HTML5 contentEditable library. I only knew vaguely of contentEditable when I discovered hallo, but the ability to offload the actual editing to the browser immediately got my dick hard, because it meant my main concern was serialization... so "you do whatever the fuck you want, and tell me about it later." I found an Angular plug-in someone had already built (updating it a bit for strict contextual escaping, and COFFEESCRIPT YEAH), and popped it in.

I was amazed at how quickly everything came together. Or maybe it was the realization my elitism was keeping me from Getting Shit Done. In either case, I built a slick interface in which the only other page besides "view all posts" and "view single post" is the login screen. Once authed, I've got a "New Post" link, which adds the same HTML to the page as an existing post, with just a boilerplate "Edit This Title" and "Edit This Post" text, both of which I can simply click and begin editing. It's literally WYSIWYG, because the browser handles all that shit.

The post body is a special case, because I don't save the actual HTML. Instead, I convert it to Markdown and save that to the database. While I'm actually editing the post, I provide a realtime display (YEAH, ANGULAR) of the Markdown source, which itself can be edited to change the HTML display, exactly like the Hallo demo.

That's the small and skinny of the web stack. Behind the scenes, I tried to learn more about Docker. I've got a Dockerfile which I use to build a container of the current folder state (it directly copies over my code at the current state, instead of doing a git pull, so it can be done during development/testing), and I use that to actually serve the site through an nginx proxy on the native box (well, that's a VM in itself... fuck me, technology is cool).

Man, I always told myself I'd never be that guy to just throw technologies at something because they were cool. But now I'm there, and it's because whenever I had something I wanted to do ("I need auth!", "I need CSS!", "I need JS that isn't fucking horrible!"), I Googled a solution and ran with it. But that's the future I suppose, where "lack of pride" completely obliterates "reinventing the wheel", and hacking isn't a lifestyle and commitment as it is an incredibly fun way to sacrifice your time to the All-Knowing[-of-Blog-Posts] to pay forward dozens or hundreds or thousands of man-hours saved with a Google search. If StackOverflow had a dick, I would be sucking all seven of them.

Non-technologically, I decided to can all my past blog posts. I've made some lame-ass posts, I've been dogshit crazy in many, self-deprecating and dogshit crazy in my latest, and anytime I thought "I really don't want this to be what others perceive of me," I said "you posted it... it is you. Sack up, bitch." I think a lot of different shit, and though I wanted to avoid the realization for as long as possible, who I consider myself varies immensely based on how I feel... and my control over how I feel is very shoddy. That's not the end of the world, because I can have control over it, but constantly forcing the opinions I had on myself at my lowest of lows is no way to build. So I'm starting from scratch. I could never bring myself to delete the old posts completely, as if they never existed, so I'll link to them publicly (though not prominently -- but enough for Google to index); I just want new, well-written posts about applicable (or at least interesting) things to take the stage, instead of my babbling and excuses over why I'm not writing those posts.

Giving Up the Brain as My Primary Source of Reward

I recall lots of "ups" and "downs" in my life. I differentiate the two mostly by how much I wanted to talk to others. That's not the only thing that changes (I won't jump around and test out my environment in "down" time), but it's the thing I remember most clearly. When I get into "down" time, I live in my head, mostly. But I try to make up for it by doing something "productive".

In high school, this was trying to figure out how others' behaviour could be explained by evolution. Luckily, at this time, I had a routine what with school and being exposed to many different experiences. Keeping the pensive (and overthinking-prone) "downs" and totally extroverted "ups" in check was easy.

When I went out on my own, I had no reason to go out and force myself to try new shit (or even socialize, which is always new shit), so I constantly chose the down. The few times I realized this and forced myself to try new shit while acting normal, I would feel so uncomfortable I put another tick mark on the "ugh, the world sucks, go do your own shit" column. Next time the opportunity presented itself, it was pretty damn clear that the "down" column outweighed the "up" column.

When I went to San Francisco, I knew absolutely no one. The "ugh, the world sucks" column increased exponentially. I chose to push forward on figuring out how evolution could explain behaviour by researching and figuring on the brain. It became a vice. I could leave work and try to meet new people... or I could just walk home quietly pondering the brain, then get really stoned or drunk and fall asleep.

It's become a rather recurring tendency. When I feel like I can't do anything, including shit like programming, which I absolutely love, I fall back to the brain. I can't say I'm not actually figuring things out, but I'm never researching my ass off, and I'm never verifying my results with anyone. It's more of a coping mechanism than anything.

So, I'm giving it up. I'm accepting I'm not helping myself with it, and I'm not contributing at all. Now I can move on to developing another vice which will actually benefit myself. One which allows me to discuss it with others, to keep my shit in check, and to benefit others.

On Contrarianism

I'm a contrarian to the core, which is to say when I'm told something is, I immediately think about what it would be like if it isn't. I've thought long and hard about the merits of this, and I've decided to keep the habit.

A benefit of contrarianism is when an idea is presented, I think about all the other cases that seem possible if that idea weren't true. From there, I can go through all those cases and apply logic to filter out the ones that obviously don't work. I don't need to trust a person to weigh the merit of their idea, as this process allows me to locate issues quite quickly and inquire about them. They may be legitimate problems, or I may have been missing something, but either way, I'm led to more information, which runs through the same process. I'm able to understand things quite quickly, because, as I like to think of it, I'm "mapping" confusion to processes which help resolve that confusion.

A drawback of contrarianism is if I don't ask these questions to resolve confusion, I'm left with both the confused feeling and the last possible cases I've thought of. To resolve the confusion, it's easy to just choose the last possible cases, and error accrues. If I become depressed and do not feel like asking those questions, it's a very real possibility this level of error can accrue to magnificent levels. The same goes for distrusting others, but that tends to be a product of depression.

Over the past few months (and I could argue years), depression was always right behind my back, incurring chronic distrust. I didn't want to see any of my friends, so I didn't, and thus I didn't even have a chance to ask questions to resolve confusion. The cycle repeated and repeated, and my ability to apply contrarianism quickly and usefully suffered majorly.

A few days ago, a friend told me "you don't have to be right all the time for me to like you," and it broke the cycle. I'd been stuck with the confused feeling for so long that I developed a very complex system of logic to navigate it, accounting for error and defining processes to mitigate it. But since she answered the question I didn't ask, I've been doing the rational emotive behaviour therapy thing and the depression/confusion is quickly disappearing, so applying logic has become more automatic, and I need not rely on the complex system.

With its retreat, I'm amazed at my ability to think deeply and quickly. I used to "self-medicate" with DXM in the hopes that its serotonin-boosting properties would allow for thoughts to "stick" more easily (and it worked... for about 45 minutes, at which point I imagine the NMDA receptor antagonism became a driving force, and it became extremely hard to keep whole ideas around), and alcohol in the hopes its GABA emulation and dopamine increase would allow for thoughts to "stick" and be manipulated quite easily.

Alcohol always did the trick, and it still does, though I worry about its exaggerated effects of inhibition and excitation affecting how sober processing chooses paths... but as the removal of alcohol would clear both inhibitory and excitatory effects, and sleep with enough water would would remove the alcohol at roughly the same time, I do not think it has a chance to cause serious disruption.

Anyway, I want to talk some more about a method for training the mind to quickly learn new things with a low(er) level of error. It's what I like to fancy I use, but I don't keep as watchful an eye on my practice as I'd like in order to offer a level of confidence.

There are three main principles which seem to have led to the development of this practice:

  1. the mind can quickly test confidence of an idea (based on information previously learned)
  2. the mind can easily manipulate and test an idea it's confident in
  3. learning new manipulations and transformations of ideas takes a relatively long amount of time

Presuming those points, #3 is the only thing which takes a long (or unpredictable) amount of time, and is the thing which would benefit most from optimization, or at least mitigation. Wow, I really thought I had something novel when I began writing about this, but it seems the only usefulness is the attempt to provide concrete reasoning for why spending free time learning how others go about tackling problems is beneficial.

I suppose then it would be best to explain how I came to decide on those principles.

For #1, the mind can quickly test confidence of an idea (based on information previously learned), the very broad principle I use to quickly diminish the set of possibilities for how the brain could work is "the brain is a novelty detector", which essentially means it can somehow react when an input does not match what is expected. What's "expected" is dependent on what's previously been "learned", and the causes of that thought are "something that changes requires justification" (which in itself developed by considering "inertia") and "the mind continues thinking the same thought, unless something changes". Thus, "confidence" of an idea is defined as matching what the mind has previously learned, and "novelty" is not matching the same.

#2 (the mind can easily manipulate and test an idea it's confident in) is the same principle, but must also introduce the ability to test an idea which isn't immediately sensory input. In order for that to be possible, it must have some ability to emulate sensory input. Sensory input can only change state if there's a change in the external world. After all, how can event occur without a change (or, how can there be an effect without a cause)? As the brain functions basically through communication between neurons, neurons accept binary communication from dendrites filtered by a threshold value of electrical charge, and dendrites accept charge by action potentials, I figure sensory input can be boiled down to increases of action potentials coinciding with environmental changes. As certain neurotransmitters (namely serotonin, dopamine, and norepinephrine) seem to increase the amount of action potentials (though I could not personally tell you why, so this may be a point of fallacy in this line of thought), I would argue they have the ability to emulate sensory input.

I'm not completely sure what causes these neurotransmitters to be emitted, and how that cause is caused, I'm basing my thoughts on my theory they're emitted given a relatively long chain of action potentials over a short amount of time (somewhat connected to "long-term potentiation"). As sensory input causes action potentials in a selective set of neurons, those which are predisposed to action potentials (which I theorize is due to some mechanism lowering the threshold for an action potential, possibly through quick re-ionization of channels after an action potential) are apt to cause the emission of these neurotransmitters. And thus, a sensory input can cause the same (or similar) effects elsewhere in the brain as if it were caused by a different sensory input.

Assuming that, the mind has the same ability to quickly test confidence of an idea which isn't immediately brought about by sensory input as it does an idea which is brought about by sensory input. The only difference would be the sensory input must occur before this non-sensory-caused idea can be tested, which takes "time".

#3 (learning new manipulations and transformations of ideas takes a relatively long amount of time) is a far more complex thought to explain, so let me begin with my conclusions through observation: I learn new things by deciding what I should be able to do (or immediately feel) if I've learned it, then trying anything which comes to mind and seeing if I'm able to do or immediately feel the thing I've decided on. As I can't be sure of what thing will actually satisfy my goal, my best option is to try anything I know, and this takes time... time I can't predict the length of, because time is the set of events which occur between state A and B, and I don't know which events are necessary to reach B, which is the goal I've decided on.

Essentially, I say "that guy is able to jump over a chair from a standing position" and use the first two principles over and over until I find something which allows me to jump over a chair from a standing position.

Well, I thought I was going to have to delve into my theories of the brain in order to explain that thought, but I got to define it in terms of #1 and #2, so my sense of laziness (er, "efficiency" or "optimization") is satisfied.

So, when I have free time, I spend it searching wherever I can for novel manipulations and transformations of data (or, put another way, optimizations of logic). Though, because these manipulations and transformations are connected in the mind to motor output, things like reading Hacker News and Reddit easily become a sort of loop. Sensory input leads to excitation by neurotransmitters, which leads to preferential excitement of already-excited neurons controlling motor output, which are the motor neurons leading to interaction with those sites (because they're already excited from choosing to visit those sites), so my use continues, promoted by the excitation had by visiting links which make me "happy" and causing neurotransmitter emission, leading to excitation with "preferential treatment" toward already excited neurons... And it continues.

It's not a horrible thing, as the loop itself is useful if it actually learns novel transformations and manipulations. But this must be paid attention to, as it need not actually learn these things and save time in the future.

There's at least 10 more pages pertaining to this subject, but I've already switched topics several times and done enough rambling. Till next time.

On the First Pass of Application of Theory on Comedy

I want to actually apply what I'm theorizing about comedy. One part of me wants to do it because I could actually have success as a comedian, and the rest of my voices say "you really want to take advantage of people like that?" Then the scientist says "in order to show others your theory matches reality, it must be shown through observation." And thankfully, my desire to be a comedian aligns with the scientist, so I don't think my tendency to abandon everything will take this over.

So, to reiterate, my thought of "uncontrollable" laughter involves the excitation of neurons, but more importantly involves neurotransmitters which instruct neurons to excite others, such that these neurotransmitters end up being transmitted slower than their electric potential counterparts. Thus, the electric counterparts can cause these neurotransmitters to be emitted, and once they are, the electric transmission can continue to do "processing" and end up reaching the neurons touched by the neurotransmitters, thereby allowing those neurons to fire far easier, because the combination of neurotransmitter pushing out ions (I assume) and the higher charge (noticed as "thought") between synapses allows action potentials to occur far sooner.

By lowering the "barrier" for what causes an action potential, by increasing the charge between neurons (well, synapses and thus, stochastically, neurons), which occurs because what has been "taught" to the brain through continual activation (also affected by neurotransmitters, though fuck, they're an article in themselves)... by lowering the barrier for action potentials, they occur more often.

Believing in an HTM-like model with neurotransmitters (which I do not because I would bet my life on it, but because it gives me a vocabulary I didn't think I could have in my lifetime)... believing in an HTM-like model with neurotransmitters, and presuming (which I haven't actually confirmed, I only predict) a neuron continually activated through action potentials produces a neurotransmitter, that which causes neurons in a particular area to be activated enough would produce that neurotransmitter, causing neighbouring neurons to produce a higher charge, causing many action potentials, producing a high enough (or enough action potentials to produce enough) charge to emit that same neurotransmitter. This would degrade through time, dependent on the charge between neurons (well, synapses, apparently, which affect whether a neuron emits an action potential, thus making synapses' affectations stochastic in terms of neurons).

So, when an input comes about that activates neurons with the "tendency" to activate others, this can "build" and reach a point which causes excitatory neurotransmitters to be emitted. When this input (with an HTM in mind, most importantly sparse representations) occurs, two (or more) points end up emitting this neurotransmitter and exciting local neurons. When these meet, a "wave-like" pattern occurs. As the motor-controlling layer of neurons is also touched by this, this "pulse" ("wave-like" at one point in space being lots of excitation, then degradation, then excitation again when it reaches the same point again)... this "pulse" hits inhalation and exhalation.

I mean, it should hit all of that area controlling voice box (or similar), but through many hits, the brain (in an HTM-like model) gets trained to promote mostly that which resembles "laughs" we could understand.

Anyway, this pulse begins through that combination of pre-trained electrical state and neurotransmitters affecting that state in a more major way. Also considering an HTM-like model, varying inputs produce a more stable output, and there are many layers. So words or images or sounds or tastes may differ, but the output may not be all that different. But I say that only to mitigate how immediately different inputs can produce the same output, which is what's "actually" being used.

So, two concepts that on their face appear different but can be transformed or manipulated in order to touch each other would give base for this pulse to occur. Then, giving advance excitation to these "thoughts" would allow them to perform this cycle, causing laughter. This advance excitation would be learned, and would not be universal, better explained as "cultural". Luckily, though, culture is defined through many people and is promoted through media and/or other information-sharing services (e.g. reddit), so it can be recognized and utilized. Of course, that's not really "culture", and "culture" really isn't a driving force... But as most viewing culture don't go against it, it can be used.

So, if I can predict a little bit about my audience, I can recognize their "culture" and design jokes for them. I want to give this a go at some improv night and test out my theories. I'll give it a shot.

1 2 3 4 5 Next »