Latest Publications

GetProperty() SetProperty()

I created the GetProperty() and SetProperty() methods to allow the base object to manage holding the variables needed for the object. I’ve implemented these methods on my old object classes just to test them out in some real world examples. I’ve found two problems, the first is that sometimes I only want to set a new value if the old value changed, so I created isPropertyDifferent() that will return true or false if the property’s value is different from the specified value. This is more useful than making the SetProperty() check it because now I can do extra processing depending on the result.

        ///
        /// Will return true if the value is different
        ///
        protected bool isPropertyDifferent(string name, object value)
        {
            //Check if it exists yet
            if (_properties.ContainsKey(name))
            {
                //Check if it's different
                if (_properties[name] == value)
                {
                    return false;
                }
            }
            //It's different or it doesn't exist.
            return true;
        }

The other issue is that right now GetProperty() only takes a value to use as the default if the Property doesn’t currently exist. But what if I want it to call a function instead? In fact that’s exactly what I want. If tags doesn’t exist, I want you to go fetch them, but I don’t want you to waste time fetching them if the value already exists (which is what It’ll do with the current implementation) so I need to figure out a simple way to use delegates here.

Share

6. The Royal We

“I figured, since it’s my birthday I should have a new car.” Cecil walked over to the bench holding a Walmart pharmacy bag. He was one of the few residents that didn’t need a Rollator (wheeled walker) to get around.

“And how old are you?” We asked. The three of us where sitting alone outside of the Golden Years Retirement Village.

“I’ll be 90 years old tomorrow. Figured it was time for a new car. It’s one of those nice ones, with a computer and such.”

“Is it here yet?”

“No not yet, my grandson, Billy is going to bring it over.”

A beautiful ’75 Pontiac Grand Ville pulled into the parking lot. Marilyn struggled to pull out a Rollator. We watched as she made her way over to us.

“Is this town square?” Marilyn flashed Cecil her famous smile that won her Miss America in 1946. We spent many nights looking at her magazine spread, now all these years later she lives in the same building. Luckily she’s still just as pretty as ever not that it mattered much with Cecil always making googly eyes at her.

“Come come, sit next to me, I was just telling the boys all about my new car. I got a new car for my birthday.” Cecil was beaming.

“Is it a convertible? I do love a convertible, wind  blowing in my hair. It’s just so … exciting.” Marilyn closed her eyes and pictured herself young again, driving down the coast line.

“Your hair has never been messy in your life.”

Marilyn giggled like a young school girl. She batted away his hand creeping up on her hair. “You old rascal, your getting me all worked up.”

“That’s the idea, cutie”

A car came rattling up to the sidewalk. The conversation hushed as we waited. A middle age man in a cheep suit got out of the running car. He walked around to the side and opened the door. Elsie got out, the man gave her a quick hug, and sped off.

“What’s the good word?” Cecil asked.

“Had a real nice lunch with my son. He’s a business man you know.”

Cecil smiled, “My boy bought me a new car for my birthday.”

“You old coot, You –”

Marilyn interrupted. “Did you son ask for money again? If he’s so rich then why does we wear a three dollar suit?”

Elsie’s face twisted. “At least my son still visits me. You’re still living in the past, no one even remembers who you are.”

“They’re fighting over you Cecil.” We said.

“Just like in the old days.” Cecil said.

Elsie laughed.

“How dare you, Cecil” Marilyn said, “I was in pictures, I still receive love letters from fans you know.”

“No, I didn’t mean you, I was talking about what the boys said.”

Elsie laughed again. “Been forgetting your medicine again?” We gave her the stink eye as she scuttled inside. She’s just jealous, Cecil’s son is always buying him nice things.

“Don’t worry about her dear, when are you getting the new car?” Marilyn said.

“My son’s bringing it around, it’s really fancy, would you like take a ride with me sometime?”

“Of course Cecil, I’ll ride with you any day.” She started to stand, We were about to go over and help her up, but Cecil caught on and helped her into the Rollator. She took him by the hand and started to walk inside.

“I really should wait for my son.”

“Don’t worry, I’m sure the boys will wait here for him.”

“Really? Will you do that for me? I don’t want to miss him.”

We smiled, “We’ll wait forever.”

Cecil waved goodbye and walked inside. We would keep our promise, just as we’ve kept it for the last six years, it was an easy job for a couple of stone tortoises like us.

© Chris Richards 2009
Share

Sometimes I’m a bit schizophrenic sometimes.

Ok I’m not really schizophrenic, but it gets the idea across.

I know I missed last Saturday’s story, It’s coming along with the new story for this Saturday. Calculus has been taking up all my time so I have to squeeze writing in were ever I can (weekends mostly.)

The reason I say I’m a bit schizo sometimes is my constantly changing of interests. I Write (and love it.) But I also like to program (sometimes.) Even when I do program, I’m not content to program with things I know, no I want to program in things I have almost no experience, like Objective-C or Python.
So I want to program this and that in Python, something else in Objective-C, maybe a few things in C# (eh), Some web programming with jQuery (Yay!), maybe update some things in PHP, and somehow tie all of this back to my Writing.

You can see why I have problems finishing things.

Calculus makes me want to do some game programming in PyGame again. I keep calculating velocity and it makes me want to actually use it. I’m no where near the level needed to try a game in Objective-C, plus I like Python.

I’ve also been playing around with my Neuron program in Objective-C. It would be easier to do this kind of program in a language I know better, but I just want to do it in Objective-C because, well I can, or at least I think I can. A lot of the reason is because I need practice if I ever want to develop a game for the iPhone.

I want to write an action/mystery/puzzle solver game, I keep telling myself that I need to write the story first, which is true, after all what’s going to happen as I start building an engine? I’ll need a story to go with it. But that logic doesn’t keep me from wanting to build parts of it anyway. If I really want something to program I still have the Knit Project and DBObject programs to work on.

Share

77. Deathbed Conversions

There’s something about water that I’ve always liked. It’s just so … Zen. We are creatures born of the water. Our bodies are made of the water, and we must constantly replenish it or die. I guess it’s no surprise that I’ve chosen the water to be my final resting place. Back in to the sea from whence I came to allow the next generation to take over the earth. (more…)

Share

Writing and Programming

I still haven’t figured out how to cope with the urge to write and to program. I know I lean more towards the writing side, but I get ideas for programs and games that I want to build. It’s frustrating, I don’t know how to mesh the two.

Like lately I’ve had more ideas for some games, one idea is for an Advanced War type game on the iPhone. It would be a turn based stratagy game where you gain levels though battle. Then you can use these levels to perminatlly enhance units/buildings.

Or for a more pokemon type game where you get badges and place them on your monsters to modify their ablilities.

Plus many others.

So whats the problem?

The problem is that I can’t seem to ever stick with anything long enough to get it done. I can write the short instant stories I post on saterdays, I’ve even written a few longer short stories (about 4,000 words) and a novel (+50,000 words) but I get bogged down when I start editiing them and then never finish. The same thing happens when I try to program on my own. I’ll start and do a few things, but before long I’m off doing something else. I just have too many things I want to do. This problem extends to more than just writing or programming, I do the same thing with video games. It’s pretty rare that I’ll finish a video game, not because it’s too hard or I’m stuck on something, but just because I can’t bring myself to keep playing. Just like I can’t keep myself focused on anything in the long term.

This is a huge problem and it really annoys me.

And it’s not a problem of planning. I have task managers and reminders and the full nine yards. My work uses the task manager I built to track and manage our entire system. I know what I should be doing, and often how to do it. I just struggle to bring myself to do it.

It’s sort of like waking up early saterday morning (this might only apply to night people). You’re awake, you know you should get up, you might even move a little. But before you know it, it’s three hours later and you’re still in bed.

I’m starting to wonder if I have ADD or something.

When I look around the internet or a book store, it seems like a lot of people have this same problem. I doubt that I’m alone here. It seems like there’s this huge problem with doing things you need you should be doing. Maybe it’s related to the whole, exercise problem. You know how you get reved up to exercise three times a week and the first week you do it. Then the seciond week you only go twice but you’re going to make it up next week. Then by the third and fourth week you’ve stopped going all together. Maybe, these are the same problem just showing themselves at diffrent forms (dieting useally takes this route as well.)

Unfortunately this post ends on a sad note because I don’t know the cause of this problem (for myself or others) and I don’t know how to fix it.

Share

5. Journalism

Wednesday, March 4th 2009.

My stupid doctor said I have to keep this journal. I don’t know why, I’m not hearing voices or suicidal or any of that shit. Besides, Journals are for girls. Did you ever see a G.I. Joe journal? No, you only see Barbie and Kim Possible journals because JOURNALS ARE FUCKING GAY (more…)

Share

WarGames: The Dead Code, Review

I just finished watching WarGames: The Dead Code on netflix instant (thanks xbox360!) and thought I’d share a few remarks about the moive.

So here we are, many years after the first WarGames movie and a new computer system is in place. This computer find terrorists on the internet. How does it identify someone as a potential terrorist? Because they gamble on a poorly rendered, 3d, drop poison gas on civilians, video game, and win. So this tells us two things:  First, being good a video games makes you a terrorist. Second, Terrorist are funded by playing video games on the internet (how they got internet out in the dessert I don’t know.)

So whatever, the computer thinks Will Farmer is a terrorist and has his Family, his neighbors, his friends, and the school chess club arrested while they watch how Will reacts. Surprise, he freaks the fuck out.

We need a love interest, so he stairs at this chess girls rack and she invites him to Montreal. They have the whole flight from Philadelphia to Montreal to get to know each other, which is good because as soon as they get their, the police are after him. She helps him run all over the country to avoid capture.
Hold It.
She’s running from the police in a foreign country for a boy she just met, and she doesn’t even know why? It’s hard enough to get a girl you just met to go back to your place, let alone all over Montreal running from the police and taking rides from mysterious old men.

So the guy from the first move takes the happy couple to the computer Joshia from the first movie so they can stop the new computer from nuking Philadelphia. Wait what? How did they even know what was going on in Philadelphia from the boonies in Montreal? How do you get high speed internet access in the middle of the boonies? How the hell does a chess playing computer from the 80′s know how to hack into a super computer behind government firewalls in 2008?

The movie ends with Joshia being uploaded into the new super computer and playing so many games that she can’t keep up, So she calls off the attack!

Man, I’m so busy from all these games that I’ll just go over here and direct my unmanned aircraft back to the ground, I just can’t take the pressure of pushing the Fire button.

Oh and by the way, There’s no way for any other branch of the government to do anything like Shoot down the fucking plane!

The plot had, shall we say, a few problems. But overall it wasn’t terrible to watch if you don’t have anything better to do and you can see it for free.

Share

Knit Project Update

My girlfriend has suggested a very important update to the Knit Project program. She needs to be able to draw lines, It just takes to long to click each cell individually. It would also be nice if she could draw circles or squares as well.

Another update is to allow adding/removing rows/columns of the current pattern. Right now you have to restart from a blank pattern if you need to change the size.

I’m not entirely sure how I’m going to draw the line yet. Three  ideas that come to mind are to use the Canvas feature in the newer browsers, or to use an image, or maybe yet, to do a colored div. The div might be the easiest to get started. Then I need to figure out how to notify the cells under the div that they’ve been clicked. I think that’s about all I need to do for the simple draw a line.

To notify the cells under the line. Well if it’s a straight line, then it would be easier because I could just find the starting cell and the ending cell, figure out if they are on different rows or not, and call the proper click method on each. If it’s a diagonal, then it gets a little more complicated. If I look I might be able to find some line algorithm out there that solves this problem already, or maybe it’s simpler than I’m imagining.

Share

3. The Unreliable Third

Roger opened the blinds and tried to peer out into the street. The afternoon sun burned at his eyes and skin. Global warming and ozone depletion made even the simplest task of going outside a hassle. Roger put on a large brimmed hat and large dark sunglasses. He double-checked that the antique revolver was empty and slid it into the pocket of this trench coat. (more…)
Share

4. The Unstable Self

I took a deep breath and enjoyed the sounds going on below me. This was the last performance of The Comedy of Errors and each line brought me a little closer to being home and playing HaloWars. Julie’s voice started to creep up again, I turned a knob controlling the volume of her microphone. She has a habit of getting louder and louder as the show progresses. I wouldn’t mind seeing a show of just her dancing around speaking long elegant phrases, like Madame de Pompadour, I’d be in heaven. (more…)

Share