It’s Not Awesome But I Can Live With It

My goal is to have this week be full of awesome days even though those days would not be, textbook-speaking, awesome. Take Sunday, for instance, which is one of my hair-trigger days, and yet I managed to make large parts of it awesome.

Monday was more of a challenge.

Good morning Twitter. I am awake but tired. No nightmares! But a wistful dream about trying to find out what I really want to work for.
Mon, 14 May 2012 07:40:29 -0700

No conclusions were reached. At any rate, while yesterday was not completely awesome at all, I managed to discover awesomeness. Kept me sane
Mon, 14 May 2012 07:42:40 -0700

I had to make the awesomeness happen, and/or make an effort to notice and recognize it. Now I wonder if I can make a work day awesome.
Mon, 14 May 2012 07:43:55 -0700

First thing to note, it’s unusually sunny outside for Seattle. This means that I should enjoy it as much as possible. Get out of the car?
Mon, 14 May 2012 07:50:33 -0700

Up atop the ferry in the quiet room. It’s peaceful as we loll across the sound. I forgot what it’s like to be a passenger. It’s novel.
Mon, 14 May 2012 08:22:20 -0700

Back in my car. Seriously thinking about becoming merely a passenger again. Work has shuttle support on the other side. Hmmm.
Mon, 14 May 2012 08:27:44 -0700

So that was first good thing of the day. Now I get to head into work and attempt to deal with a foobar computer. No shame is attached.
Mon, 14 May 2012 08:30:13 -0700

After I drive in, I can’t work on my story (not that I did so this morning). So must take comfort somewhere else. But where? Maybe tea.
Mon, 14 May 2012 08:32:28 -0700

Keep holding onto twitter. Day will go alright. Or something.
Mon, 14 May 2012 08:34:30 -0700

Frustrating morning with a loss of a little composure. Will be a redundant afternoon with loss of time on the project schedule. Negative.
Mon, 14 May 2012 11:19:21 -0700

Positives: learned something for the next new team members. Will soon see pretty desktop again and work with a challenge. I’m strange.
Mon, 14 May 2012 11:20:59 -0700

Still going to keep up with my plans to go to a learning series today. And there’s beef pho to be had. Positives.
Mon, 14 May 2012 11:22:42 -0700

Pho is a definite positive for the day.
Mon, 14 May 2012 11:59:00 -0700

Basically I feel horrible for no reason right now, which is to be expected of the bipolar. I try to find positive things, even little ones.
Mon, 14 May 2012 15:22:50 -0700

I think I may take a walk while something is installing.
Mon, 14 May 2012 15:23:50 -0700

I never did get my chocolate soy milk.
Mon, 14 May 2012 18:48:32 -0700

Tuesday was rather more of a challenge.

A package of manga got misdirected somehow over USPS. I could let it spoil my day, but that would be silly. So I got GF DF muffins instead.
Tue, 15 May 2012 08:25:28 -0700

The skies are gray, and I’m going to miss home fiercely. Will see if I can arrange to leave work a bit early since I stayed late yesterday.
Tue, 15 May 2012 08:31:52 -0700

And I think I’ll work from home tomorrow? Maybe, although that gets into a dangerous no-people zone. Work feels unfriendly though.
Tue, 15 May 2012 08:34:45 -0700

I tried napping in the car instead of walking about decks. I’m now sleepy still, so note to self: get out of car, even if it’s cloudy out.
Tue, 15 May 2012 09:10:15 -0700

The bipolar is hitting hard right now. I almost broke down into tears for literally no reason at our team lunch, which wouldn’t be good.
Tue, 15 May 2012 13:04:30 -0700

At least it’s sunny. I almost always seem to need walks to get rid of the bad bipolar vibes. Too bad I don’t have a private office…
Tue, 15 May 2012 13:05:42 -0700

Can’t close the door and have a good cry. Really need to find a solution other than walks.
Tue, 15 May 2012 13:06:32 -0700

So apparently an alternative to walking around to resolve bipolar issues is to dig into one aspect of work that can get you into The Zone.
Tue, 15 May 2012 22:58:48 -0700

I’m doing my best to stay connected via Twitter, to find the positives in life (no matter how drudgy it gets), and to proactively make positive decisions—for instance, going on walks—when I’m feeling down.

Fingers crossed that I do okay tomorrow, where I work from home, away from people. But with Twitter, I should be alright. Or something. There’ll be plenty of laundry, too. Plenty.

I may end up taking a walk, or eating lunch out.

Making the Best of Mother’s Day

I don’t want to talk about the bad parts of today, but they have to be talked about. I was bad off, my anxiety was somewhere in orbit, and the memories were particularly bad, though not intrusive as in the past.

And, with the help of Twitter and friends, I’ve been able to hold up over the weekend without draining my little bottle of Xanax. Much. It’s got a dent in it, but I didn’t take 10 of them over the course of two days (more like three).

I also did the following:

  1. I went out in the sun.

  2. I stayed around people.

  3. When I needed alone time, I found somewhere to be alone.

  4. I scribbled away in my new Moleskines during my alone times. I don’t know why this is important, or even if it is important, but it made me feel better.

  5. I stayed connected to Twitter.

  6. I watched a big, stupid summer blockbuster movie.

#1-3 are pretty solid items to do.

#4 is a little… weird. It’s faster than typing on an iPhone, and slower than typing on my Transformer’s keyboard or my laptop’s. I write in block letters, cursive was always unreadable for me, and I need these notes readable. It’s… soothing, somehow. What’s probably best is that I associate writing in my Moleskines with this relatively nice day.

And yes, I’m using my Moleskines for figuring out fiction. The second scene in Seal Tales is giving me a headache, which is embarrassing but what can I do, it sets up a hell of a lot and involves two complicated characters. Scribbling down all of the little things that need to be done during the scene has been incredibly helpful.

#5 is something that some would consider unhealthy, but I’m starting to think I need. Not in a craving sense—just that it’s easy for me to get disconnected, or at least to feel disconnected. Even when I’m with other people, I still need to interact with people I know.

#6 took my mind off of bad memories for … three hours? Something like that? Yes, The Avengers is problematic in a few regards (see Cleolinda’s post, to which I would add one other sour note that I’m not going to talk about because I don’t want to talk about it), but it was still a fun movie whose noise and action did not leave me any time to think about anything else. It’s not my type of movie, but then again, it was better than if I’d seen Dark Shadows, which apparently would have left me with plenty of time to contemplate my parents.

Ah yes, my parents. To whom I do not owe anything. I figure if anyone wants to bring up the idea of child-rearing as putting children in debt, I think I can safely say that the years of terror, beatings, and strangling (even though it only happened once, when I was maybe ten)—oh yes, and some episodes involving BOILING WATER—well. I’ve paid that debt off and then some.

Of course, it’s one thing to say that, and another thing for the paranoia to let go during these times.

I know, from the past, that the woods haven’t come to an end yet. I sometimes suffer a weird relapse a few days after the “landmark” date. I don’t know why that is, you’d think it was over, but maybe that’s when I let go or something.

Anyhoo, I hope that I dream about the Moovengers. Rather than the possible other kind of dream. Which would break me for the rest of the day.

Yeah, so, let’s see what happens next. Maybe I should blog every day for a while.

Time Betrays Us

As you may know if you’ve been reading this blog for very long, I moved to a new team in a situation that was not entirely of my own choosing. The new team has no one I know on it, to start with. The projects they deal with are internal, whereas I’m used to backend systems that have an external impact (as well as internal). Nothing will scale beyond maybe ten thousand users, whereas I’m used to services that have to withstand millions of hits in a day worldwide.

I’m used to services that, by necessity, have a pager attached.

It’s weird not to have one.

My new team is also pretty isolated from the rest of the company. In fact, my team is pretty isolated, period, and that makes me sad. I know they brought me in to bring that sort of experience, but the process so far is lonely.

There is no reason I should have already started to drift away from my old team. Maybe after a couple months, but not a couple weeks! And yet in less than that, when I hung out with the old team on Friday night for boardgames, I had that disconnected feeling. Suddenly what was familiar and comfortable was no longer familiar.

New associations are displacing old ones, and it’s happening so fast that it depresses me, frankly.

The team (the new team) is still in its forming/norming stage. I suppose it will take a few months before we get to storming and performing.

I miss my old team. It tears me up inside.

On the up side, I’ve been cooking all weekend, which I haven’t done in a while. It’s difficult to work up an excuse to cook when you know you might be interrupted by a high-severity issue when your hands are in the chicken.

Strains of Memory

When you are with me, I’m free
I’m careless, I believe
Above all the others we’ll fly
This brings tears to my eyes.

I heard this famous Creed tune come up on my iTunes omni-shuffle, and it was like those years of Zorn and Tharn again, except I can look at them in another light. Oh dear, another light. Thank goodness for Abilify.

That was when Crimney left me, and I was all alone. And my parents got me bang to rights, but I escaped, but it was all so scary.

As the music segued into “I Am the Doctor” from the 11th Doctor’s run, I realized that I could reach out to my Crimney. So I found him on the interwebs. He seems like he’s leading a good life.

I can’t risk it, no matter how rising the music is. Gods know what connections to my parents he might bring. After so many years, how can I trust him?

I’m tired. The cows are calling. It’s time to head off to bed.

I Killed Cthulhu’s Cousin in the Library with a Nerf N-Strike Barricade

I’m writing this dream down in the hopes that I will have more dreams like it, and fewer of the parental issues ones (I have lots of them). I actually had it a couple days ago, but I’ve been keeping as much of it in long-term memory as possible.

There were the warnings. First, a chill running down your spine; then, flashes of fluorescence and swiveling colors on the flanks of fish in the local pet store where Crimney was observing poisonous tree frogs.

We didn’t know what the warnings meant at first until the waters of the nearby lake churned and one of Cthulhu’s cousins emerged, rivers streaming down its tentacles, and its scaly skin a terrible grey-green that made you think of the squirming things you found beneath moist rocks. The stink was that of a fish-market gone to rot, maybe hundreds of them all at once.

The library was the only place it made sense to flee to. And so we did, with a tank of fish in tow, their colors rippling less the farther we got from Cthulhu’s cousin.

I had been trained by a wise old woman in the arts of Nerf gun handling, and had two large rifles made of real metal, along with a couple of Mavericks cast from steel. Nerf material is deadly to aquatic species; Nerf darts turn into orange arrowheads, video-game like, when they strike.

She was at the library, and had little advice for me, except to remember that, since they were only semi-automatic, to use the rifle as a blunt instrument when necessary.

The library basement housed Fantasy Flight Games components, so that we could learn, from black-and-white prototype cards for Call of Cthulhu, what was coming down the street. I picked up one, and I remember it turned into a full-color glossy of fish changing their colors.

Upstairs, Cthulhu’s cousin had opened the door to the second story, enormous four-pointed pupil backed against yellow right up against the door.

I fired the first shots and emptied out the rifle. Their sharp tips dug into squalid flesh.

The monster recoiled in pain, but only briefly, before it lashed out towards the door again.

So I beat it with the rifle several times, then fell back behind a low bookcase. I forget what Crimney was doing. Probably something to do with rituals, or playing a card game that had come to life, but I was focused on doing some damage. It’s hard to concentrate on anything else when a monster is thrashing outside your window.

I kept firing, and reloaded only with difficulty, thanking the stars that I had multiple loaded weapons, and two of which could deal melee damage.

Eventually, whether through the gathering of elder signs or the barrage of Nerf darts, the monster cried out, thrashed one last time, and disappeared in blinding white light.

Relieved, we hugged one another, and headed out to enjoy the day.

Unfortunately, another one emerged from the lake. But we knew how to deal with it.

And so we did.

I put this dream down to too much Elder Sign: Omens.

It’s sunny and nice out, and I think I’ll go have lunch, then come back to sleep, and repeat for dinner. Unfortunately my Maverick (not made of steel) is at the office, being hopefully moved to my new quarters.

C#: Non-ideal MSDN Threading Tutorial Examples

I’m partway through the MSDN C# Threading Tutorial and, as a Java developer, have had fun breaking/refactoring their tutorial code. I haven’t yet gotten to the Mutex section, mostly because I spent some time to learn about System.Collections.Concurrent.

Using MonoDevelop, I’ve been modifying the examples and playing. Whoever wrote the tutorial is inconsistent with capitalization of field names, comes up with terrible names (seriously, when “Example” and “Call” are more descriptive than your chosen names of “Alpha” and “Beta”, you have an issue), and hasn’t proofed their tutorials against malicious students.

Primary instance of non-proofing: the Monitor example. You can introduce failure (inconsistently) via deadlock by simply adding either a second producer or a second consumer thread. You need something like Java’s CountDownLatch, which apparently exists as System.Threading.CountdownEvent… but I haven’t tried it out yet.

What I did find interesting was sorting out the mess that was the simple ThreadPool example. I used a concurrent dictionary (thank you generics), cleaned up variable names where I could (seriously, who decided that only W2K supported thread pooling? Even if you assume Windows-only, I can’t imagine that Vista or Windows 7 come without it. In other words: things change. Try to be timeless with your variable names).

using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Threading;

namespace SimpleThreadPool
{
    /// <summary>
    /// Simple value holder. Also demonstrates that C# has 
    /// a complicated outlook on keywords.
    /// </summary>
    public class Cookie
    {
        public int value;
        public Cookie(int value)
        {
            this.value = value;
        }
    }
    
    /// <summary>
    /// Callback class that keeps track of which threads hashed to which hashcodes.
    /// </summary>
    public class Example
    {
        public ConcurrentDictionary<int, int> HashCount;
        public ManualResetEvent resetEvent;
        public static int count = 0;
        public static int maxCount = 0;
        
        public Example(int maxCount)
        {
            HashCount = new ConcurrentDictionary<int, int>(10, 10);
            Example.maxCount = maxCount;
        }
        
        public void Call(Object o)
        {
            int currentThreadHashCode = Thread.CurrentThread.GetHashCode();
            
            Console.WriteLine ("#{0} {1} :", 
                               currentThreadHashCode, ((Cookie) o).value);
            Console.WriteLine("HashCount.Count={0}, CurrentThread.GetHashCode()={1}",
                               HashCount.Count, currentThreadHashCode);
            
            // Lambda expressions are radical.
            HashCount.AddOrUpdate (currentThreadHashCode, 1, ((x,y) => y+1));
            
            Thread.Sleep (2000);
            Interlocked.Increment(ref count);
            if (count == maxCount) {
                Console.WriteLine("Setting reset event.");
                resetEvent.Set();
            }
        }
    }
    
    class MainClass
    {
        public static void Main (string[] args)
        {
            const int maxCount = 10;
            
            ManualResetEvent resetEvent = new ManualResetEvent(false);
            
            Example example = new Example(maxCount);
            example.resetEvent = resetEvent;
            
            bool threadPoolSupported = false;
            
            try {
                ThreadPool.QueueUserWorkItem(new WaitCallback(example.Call), 
                                             new Cookie(0));
                threadPoolSupported = true;
            }
            catch (NotSupportedException e)
            {
                Console.WriteLine("ThreadPool is unsupported: #{0}", e);
            }
            
            if (threadPoolSupported)
            {
                for (int i = 1; i < maxCount; i++) {
                    ThreadPool.QueueUserWorkItem(new WaitCallback(example.Call), 
                                                 new Cookie(i));
                }
                
                Console.WriteLine ("Waiting for thread pool to drain.");
                resetEvent.WaitOne(Timeout.Infinite, true);
                Console.WriteLine ("Thread pool has been drained (event fired).");
                
                Console.WriteLine ();
                Console.WriteLine ("Load across threads:");
                foreach(int o in example.HashCount.Keys) {
                    Console.WriteLine("#{0} {1}", o, example.HashCount[o]);
                }
            }
        }
    }
}

I truly wish that the libraries were better documented. Java docs tend to come with examples; C# docs generally don’t.

And I know this is “simply” tutorial code, but that’s the point. It’s teaching code. You can teach bad coding habits into people.

And now I need to review stuff for OWW. It’s a nice day, but I’m stuck inside due to oncall unless I drag my laptop and associated peripherals around with me. Still, I may go out for an early dinner.

Can’t Sleep: 10 Days in the USA

20120421-040217.jpg

I can’t sleep, and I’m on my last week of oncall so I can’t take my sleeping pills. I did give in and take a Xanax, which is a little bit like drinking a glass of wine, to calm down a bit. Freakin’ mania/insomnia/panicking at not sleeping and being drop-dead tired.

So I’ve decided to start playing calming games. The 10 Days series is one of those easy-going games.

I played it wrong. You’re supposed to start with 10 tiles and replace as you go, and set up the three discard piles ahead of time. Instead I started one rack with no tiles and the other with a state that friends of mine are currently driving away from, and ended it with the state they’re driving to.

I think this affected the game in a decent way. Maybe seeding just the start and end states leads to a more strategic game because there’s less of a chance of a vital state being held by the other player(s) and you not knowing about it. Perhaps ideal start/end states could be collected in a set of trip cards. The experience was certainly a little different.

As always, the routes taken are not suggested to take in real life. The winning route (by a couple turns) ended up like this:

Delaware – Car – West Virginia – Pennsylvania – Blue Airline – Louisiana – Car – Alabama – Red Airline – Virginia

I like the 10 Days series despite them lacking a lot in the strategy area with a corresponding increase in the luck area. It’s educational, can be played in a small space, and interesting to see how routes turn out.

Off to try to sleep again.