Archive for February 2010


How I Conquered Insomnia

February 23rd, 2010 — 4:44pm

For the longest time, my insomnia was the bane of my existence.

Pain and Suffering

Kidding, but still, kinda serious.

I did not have COMPLETE insomnia; it would be possible for me to go to sleep, I just had NO CONTROL over when. I could not nap on command, sleep on command.. I mostly relied on nature to take its course and after many hours overcome my mental resistance; I would not fall asleep until I was completely spent.

I would have to get up in the morning at a specific time, so I would go to bed, and PRAY that I could fall asleep on time. Inevitably, I would just lay awake in bed, tossing and turning, for hours and hours, and then wake up to an alarm EXTREMELY tired, setting the tone for an awful day.

It sucked, and completely controlled my life in various ways:

1) Unable to nap. If I had to get up early, then I could not stay out late and be non-tired.

2) In college, I could not take any morning classes. All my classes started at 10:30 or later. I often did not go to those. I often only attended classes that started at noon or later.

3) Unable to do other morning activities. If something started at 9;30 or earlier I would pretty much rule it out of my life.

4) Fatigue throughout the day.

5) Wasted time at night. oh man, this one was BRUTAL. I would literally lay awake in bed for HOURS trying to fall asleep. Why did I not get up, and do other things instead? Because I often NEEDED to get up early (for some morning task) and didn’t want to fill a moment where I could potentially be falling asleep, with some other activity.

6) Wasting time with various sleep apnea treatments.

7) Unhappy associations with sleep. Sleep is a primary reinforcer. (I will write another post at a later date about the fundamental implications of reinforcement in guiding behavior. I am not a strict behaviorist like Skinner but I believe that reinforcement has complex ramifications for guiding behavior.) Many people enjoy it a lot. For me, though, it caused dread and anxiety.

I think I’ve made the point: It really CONTROLLED my life. A large amount of choice taken out of the equation completely.

But it’s not like I didn’t try remedies.

Things I tried

1) Sleep apnea treatments. When I was in high school, my parents took me to multiple doctors for sleep apnea. They did not know about my struggles with insomnia (it didn’t occur to me until much later that such struggles are ABNORMAL). Anyway, The stanford sleep center thought I had sleep apnea; the people at UCSF disagreed. The sleep charts taken during my sleep study suggested that I had perhaps very very mild apnea. Regardless, in desperate search for an explanation of their son’s aberrant behavior, I went through a series of surgeries. (My tonsils were removed [and then later I picked up an infection in the hospital ;) ], my adenoids were removed, I had surgery on my nasal septum, my uvula (the thing that dangles in the back of your throat) was resected, my adenoids grew back and were shrunk again.. et cetera.

2) Masturbating before bed (rarely useful)

3) Smoking marijuana

4) Taking over the counter sleep medication

5) Taking ambien

6) Counting integers one at a time

7) Trying to become an “early riser” like Steve Pavlina suggests

None of these things ended up being very effective. My struggles with insomnia, and the related consequences I had to endure, continued full speed ahead.

But now, I think I’ve fixed my problem. If you have had some of the laundry list of symptoms I described, I recommend trying all of the things below. Yeah, I know that “correlation is not causation”, but if you’re going through what I was going through, I think they’re worth trying. BTW, the time I lost while laying awake in bed probably costs me ~500-1200 hours a year. Not to mention my impaired skill performance throughout the day, missed opportunities, mental suffering through anxiety, et cetera

Solution

Strategy vs Tactics

This is an idea I got from the interesting business book by Chet Holmes, “The Ultimate Sales Machine“. Some executives think in terms of strategy, big picture; others think in terms of tactics, specific moves to take; the best ones think in terms of strategy (big picture) and then let others translate that into congruent tactics. The machine is more than the sum of its parts but all parts should be working towards an ideal of the big picture. etc. So I’m transforming that notion into the dualism of strategy=principles and tactics=implementation.

Tangent About Et cetera

My 8th grade English teacher Sylvia Harp, whom I detested at the time, told me that “etcetera” is something people use when they don’t know what they’re talking about. I was too young and immature to benefit from her wisdom, plus she called me out on not doing my homework, so I dropped out of the class.

Anyway, except in the context of lists, I use “etc” when I don’t really know what I’m talking about, but to suggest that there is more to the idea than what I was trying to convey, and leave it up to the reader to understand it.

Strategy/Principle: What really caused my insomnia

An active mind.

Thinking = “the voice in my head”

Quieting the voice = peace = can fall asleep naturally.

Tactics/Solution: How I cured it

1) Going to bed as soon as I feel tired – no exceptions

2) When in bed, let myself feel good about the fact that I’m tired, and that I’m also IN BED! Good feelings and no-mind typically coincide, unless they are ego-based good feelings (e.g. through comparison to others)

3) Maintaining full integrity in my life keeps the conscience quiet. Conscience = another voice that pipes up.

4) Occasional 20 minute breathing meditation practice in the morning.

5) Doing a mental RAM “brain dump” by writing down any ideas that accrue to me

6) Cleaning my room

7) Not using the computer before bed. In practice, this is extremely difficult to implement, especially if you are an addict like me. My solution is to leave my laptop at the office so I don’t have access to it at home, and therefore am forced to read in order to entertain myself. Reading burns up mental energy and leaves my mind exhausted. Of course, I will probably soon start to feel energized through reading, once the neural pathways involved become more commonplace; at that point I will have to shift to a different strategy. My intuition is that practicing any new skill is going to be mentally exhausting. We know that sleep leads to restructuring of procedural (skill) memory.

8) Avoiding processed foods. Everybody reacts to food differently, but for me, I find that highly processed foods cause my mind to race.

24 comments » | Uncategorized

JavaScript zip code to state conversion

February 23rd, 2010 — 10:22am

I think it makes very little sense for a website registration to ask you for your zipcode AND your state. That’s redundant; your state can be inferred from your zipcode. Studies reveal that fewer fields in a form sharply increases conversion rate.

function zipToState(zip) {
    var state;
	if (zip >= '99501' && zip <= '99950')  { state = 'AK'; }
	else if (zip >= '35004' && zip <= '36925')  { state = 'AL'; }
	else if (zip >= '71601' && zip <= '72959')  { state = 'AR'; }
	else if (zip >= '75502' && zip <= '75502')  { state = 'AR'; }
	else if (zip >= '85001' && zip <= '86556')  { state = 'AZ'; }
	else if (zip >= '90001' && zip <= '96162')  { state = 'CA'; }
	else if (zip >= '80001' && zip <= '81658')  { state = 'CO'; }
	else if (zip >= '06001' && zip <= '06389')  { state = 'CT'; }
	else if (zip >= '06401' && zip <= '06928')  { state = 'CT'; }
	else if (zip >= '20001' && zip <= '20039')  { state = 'DC'; }
	else if (zip >= '20042' && zip <= '20599')  { state = 'DC'; }
	else if (zip >= '20799' && zip <= '20799')  { state = 'DC'; }
	else if (zip >= '19701' && zip <= '19980')  { state = 'DE'; }
	else if (zip >= '32004' && zip <= '34997')  { state = 'FL'; }
	else if (zip >= '30001' && zip <= '31999')  { state = 'GA'; }
	else if (zip >= '39901' && zip <= '39901')  { state = 'GA'; }
	else if (zip >= '96701' && zip <= '96898')  { state = 'HI'; }
	else if (zip >= '50001' && zip <= '52809')  { state = 'IA'; }
	else if (zip >= '68119' && zip <= '68120')  { state = 'IA'; }
	else if (zip >= '83201' && zip <= '83876')  { state = 'ID'; }
	else if (zip >= '60001' && zip <= '62999')  { state = 'IL'; }
	else if (zip >= '46001' && zip <= '47997')  { state = 'IN'; }
	else if (zip >= '66002' && zip <= '67954')  { state = 'KS'; }
	else if (zip >= '40003' && zip <= '42788')  { state = 'KY'; }
	else if (zip >= '70001' && zip <= '71232')  { state = 'LA'; }
	else if (zip >= '71234' && zip <= '71497')  { state = 'LA'; }
	else if (zip >= '01001' && zip <= '02791')  { state = 'MA'; }
	else if (zip >= '05501' && zip <= '05544')  { state = 'MA'; }
	else if (zip >= '20331' && zip <= '20331')  { state = 'MD'; }
	else if (zip >= '20335' && zip <= '20797')  { state = 'MD'; }
	else if (zip >= '20812' && zip <= '21930')  { state = 'MD'; }
	else if (zip >= '03901' && zip <= '04992')  { state = 'ME'; }
	else if (zip >= '48001' && zip <= '49971')  { state = 'MI'; }
	else if (zip >= '55001' && zip <= '56763')  { state = 'MN'; }
	else if (zip >= '63001' && zip <= '65899')  { state = 'MO'; }
	else if (zip >= '38601' && zip <= '39776')  { state = 'MS'; }
	else if (zip >= '71233' && zip <= '71233')  { state = 'MS'; }
	else if (zip >= '59001' && zip <= '59937')  { state = 'MT'; }
	else if (zip >= '27006' && zip <= '28909')  { state = 'NC'; }
	else if (zip >= '58001' && zip <= '58856')  { state = 'ND'; }
	else if (zip >= '68001' && zip <= '68118')  { state = 'NE'; }
	else if (zip >= '68122' && zip <= '69367')  { state = 'NE'; }
	else if (zip >= '03031' && zip <= '03897')  { state = 'NH'; }
	else if (zip >= '07001' && zip <= '08989')  { state = 'NJ'; }
	else if (zip >= '87001' && zip <= '88441')  { state = 'NM'; }
	else if (zip >= '88901' && zip <= '89883')  { state = 'NV'; }
	else if (zip >= '06390' && zip <= '06390')  { state = 'NY'; }
	else if (zip >= '10001' && zip <= '14975')  { state = 'NY'; }
	else if (zip >= '43001' && zip <= '45999')  { state = 'OH'; }
	else if (zip >= '73001' && zip <= '73199')  { state = 'OK'; }
	else if (zip >= '73401' && zip <= '74966')  { state = 'OK'; }
	else if (zip >= '97001' && zip <= '97920')  { state = 'OR'; }
	else if (zip >= '15001' && zip <= '19640')  { state = 'PA'; }
	else if (zip >= '02801' && zip <= '02940')  { state = 'RI'; }
	else if (zip >= '29001' && zip <= '29948')  { state = 'SC'; }
	else if (zip >= '57001' && zip <= '57799')  { state = 'SD'; }
	else if (zip >= '37010' && zip <= '38589')  { state = 'TN'; }
	else if (zip >= '73301' && zip <= '73301')  { state = 'TX'; }
	else if (zip >= '75001' && zip <= '75501')  { state = 'TX'; }
	else if (zip >= '75503' && zip <= '79999')  { state = 'TX'; }
	else if (zip >= '88510' && zip <= '88589')  { state = 'TX'; }
	else if (zip >= '84001' && zip <= '84784')  { state = 'UT'; }
	else if (zip >= '20040' && zip <= '20041')  { state = 'VA'; }
	else if (zip >= '20040' && zip <= '20167')  { state = 'VA'; }
	else if (zip >= '20042' && zip <= '20042')  { state = 'VA'; }
	else if (zip >= '22001' && zip <= '24658')  { state = 'VA'; }
	else if (zip >= '05001' && zip <= '05495')  { state = 'VT'; }
	else if (zip >= '05601' && zip <= '05907')  { state = 'VT'; }
	else if (zip >= '98001' && zip <= '99403')  { state = 'WA'; }
	else if (zip >= '53001' && zip <= '54990')  { state = 'WI'; }
	else if (zip >= '24701' && zip <= '26886')  { state = 'WV'; }
	else if (zip >= '82001' && zip <= '83128')  { state = 'WY'; }
	return state;
}

Thanks to http://www.novicksoftware.com/udfOfWeek/Vol2/T-SQL-UDF-Vol-2-Num-48-udf_Addr_Zip5ToST.htm for the data.

36 comments » | Uncategorized

How I Landed A $50/hr Side Gig With Very Little Effort & How It Relates To Picking Up Chicks

February 4th, 2010 — 9:44am

As many of you may know, I recently resigned from my job at the NHL. The reasons for that are straightforward yet belong in another blog post, so we won’t digress. Anyway, I was saving more than I was earning, but even though I had enough for a month or two of rent, plus groceries, I decided it wouldn’t be a bad idea to attract some extra money into my life.

I did two things: I posted an ad on Craigslist, in the NYC resume section, advertising myself (http://newyork.craigslist.org/mnh/res/1563000834.html), and I replied to a a handful of jobs in the “gigs”/computer section.

Lemma: Chasing Talent

Back when I was single and into running around and meeting women, it would be common to meet a chick and exchange numbers. Although some feisty young ladies were proactive in establishing contact with me, most of the time, the burden fell unto me to solidify the connection. This meant calling or texting them. Naturally, some of these numbers led to further relations, whereas others fizzled out to the point that, well, continuing to pursue would have been weird.

So what went wrong with some girls and what went right with the others?

I’d call it Confidence, but that idea is so overplayed in the dating/mating/fucking game, and is sullied by so much “fake it til you make it bullshit” that actually does not yield real results, that we are forced to use another concept.

Abundance, Indifference, Value-Giving

Let’s say I met a girl and wanted to send her a text. When I was tripping out about the text that I wanted to send, then even if I could somehow manage to perfectly micromanage a witty exchange, something would go inevitably go wrong and the relationship would not be successful.

It makes sense. If I couldn’t even sustain an initial, casual, textual interaction, how could I maintain any sort of extended relationship? [In any sense of the word, "relationship"..]

Obsessing over an individual chick, or text, actually implies a laundry list of problems, all relating to:

Scarcity

Scarcity: why would you care about any individual woman if you have access to a lot of them? The phenomenon of “social proof” is remarkably important in the majority of human consciousness, and albeit a blunt generalization, women only want what other women want. Dating, for men, is typically a winner-take-all market (not my phrasing but instead someone’s from Hacker News, it’s oh so apt that I had to borrow it). Why does it work this way? Why is social proof so important for consciousness? Because otherwise, people would have to *individually* critically evaluate each thing they would want to evaluate, and that’s such a waste of energy. Relying on other people’s feedback is a nifty shortcut that became hardwired into our postmonkey brains.

So yeah. If I just acted naturally, without tweaking, I did so because I knew I was good enough, and the subtle details which fall into place as a consequence of your casual, abundant frame…will very quickly paint a very attractive picture, or very quickly paint an unattractive one. Either way, they’ll paint an accurate picture, and it’s more efficient for you in terms of energy, as well as for them.  It’s more honest, and non-manipulative, which is something I think we could all strive for.

(Philosophers: I tend to describe myself as philosophically immature for good reason. I’m not really sure how to interpret Plato’s Republic, which encourages manipulation (via the noble lies about creation) as a crucial element of a just society. Maybe they’re justifiable via the essential notion that we all really know nothing, so what does the actual content of a thought matter? To be discussed later, in tandem with an important post on how abundance mentality relates to the allegory of the cave)

And to reiterate, Specific details of a successful text/phonecall, really are irrelevant, because even if you micromanage them successfully, you will inevitably fuck up somewhere…trust me, I’ve tried. It doesn’t work. The only thing you can do is say the first thing that comes to mind – WHATEVER it is, even if you think it will ultimately backstab you, because you say something stupid, and then do your best to put it out of your mind. Human interaction is more about subtle social signals than words, anyway. (And that, too, is the subject for another post).

Responding to Craigslist Ads

Like Lil Wanye, back to the money. I adopted the same attitude to my craigslist gig responses as I did to my successful phone flirtations: concise, friendly, abundant, value-offering, indifferent. I introduced myself, explained how I could benefit them, and gave them info on how to contact me.

Value Offering vs Value Taking

The notion of value offering is very different from value taking. Value offering coincides with abundance mentality; value taking coincides with scarcity mentality. When you are value offering, you really want to help the other person. You want to present them with the truth and honestly evaluate how you could meet their needs, rather than manipulating and micromanaging to get your end of the deal. You create a win-win situation.

Important Tangent: You Have Complete Control Over The Universe Because It Only Exists In Your Head

The notion of an abundance mentality is simple to accept once you realize that the universe is really only a product of your own consciousness, and that you have the power to change the world. In the great Scorsese movie The Departed, Jack Nicholson’s character opens the movie with an important monologue: “I don’t want to be a product of my environment. I want my environment to be a product of me.” And it’s true, your environment can be a function of you, rather than you being a function of your environment. All it takes is diligence, decision, education, and some sorts of enlightenment. By the way, if you want me to expand on this notion further, I would be delighted to do so in a subsequent blog post, just encourage me to write it. BTW, if you don’t own The Departed, get it here from Amazon for only $8.99. Seriously, it has excellent dialogue, intriguing motifs, exposition of human nature, and it’s not too absurd. Plus it has Matt Damon and Mark Wahlberg and Alec Baldwin and Jack Nicholson and Leonardo DiCaprio. Leonardo, btw, is amazing. I used to call him “Leonardo DiCraprio” in 5th grade because I was jealous of all the girls getting slippery cuz of Titanic. Guess I thought I myself was pretty crappy.

Anyway, this one guy got back to me. He said that he was “meeting with people” on a few different days, and we scheduled a time to meet in their fancy midtown manhattan marketing agency.

The Day Of The Interview

In an unrelated event, earlier in the day, I met up with my friend Devin at the BeExtraordinary (beex.org) office in SoHo, to discuss the possibility of helping them out with some stuff. They have a fundraising/organization platform for prosocial causes. The time is flying by and I notice that my meeting downtown is in 20 minutes. Uh oh.

I hop on my longboard, skate to the train, hop on the train, walk to the car nearest the exit (to reduce my commute time), get out, navigate to the building, stop to compliment a beautiful stranger along the way, and make it to the building after asking directions from a doorman. I make it up, and at this point I’m sweaty, unshaven, wearing a sweatshirt and carrying a longboard in the waiting room. I neglected to dress up for this “interview.”

Dude comes out to meet me. He explains that “this will be a short meeting”, implying that he will only give me a couple minutes of time, due to his busy schedule or possibly my appearance. That’s fine. I tell him “that’s cool dude.” I treat him like my friend, because he is.

Reiterating: Other people are only projections of your own consciousness. If you are not a friend to everyone then you are not a friend to yourself. Incidentally, this coincides with the notion that being pure evil and being pure good are actually the same thing.

We get to the office and I make it a point of actually listening intently to his problems. I absorb it. My goal is to provide value, provide a solution; if I do not understand the problem completely, I cannot provide the best solution. Instead of wasting mental energy, stressing on how we only have a couple minutes together, I decide to dedicate my mental processes to actually listening. With my spare mental cycles I am more apt to suggest elegant solutions. He later reveals that he is very busy and harried with an important project for a big client; but because I want to focus on his need instead of my own, I can extend the interview if I am actually helping him with his problem.

Ultimately, he hires me on the spot to do some work that very evening.

Negotiations

He offers $25/hr. I tell him that’s too low. I know my own value. He then raises it to $50/hr. I accept with alacrity although I note it is lower than my usual rate. It’s just not worth it to haggle over prices to the max; it’s a result of scarcity thinking, and it burns good will, and may actually decrease your intrinsic motivation. I’m sure a lot of people my age (22) might be wondering how I can justify $50/hr as significantly lower than my usual rate. I’m happy to explain in a future blog post, if you so desire, but the quick answer is that a couple years ago  I experimented with raising my prices super high just for the fuck of it, and wound up shocked when I found out that people were actually willing to pay it! (I’ll write another post about negotiations at some point, but really, it’s a consequence of doing the math and FOILing things out. If the alegbra metaphor doesn’t make sense, what I mean is that once you internalize the core principle of reality being a projection of your consciousness, you just need to make certain logical deductions, combined with experimentation, in order to find out practical tactics for getting what you want)

Success

Later, when I got home, I spent some time doing work to help him out; he loved it, and we are meeting once again to establish the future of a potential relationship. It’s important that he be grateful for what I do. Otherwise, I am not reflecting abundance, because I would be providing a useless service. It’s important to focus on useful, effective, appreciated, loved services. You can’t cheat others without cheating yourself.

33 comments » | Uncategorized

Back to top