Latest Publications

14. No ideas, but in things

A drop of water hits a distant pool. Lola freezes mid-step. Her hand snakes around her hip resting on the hilt. Another drop of water echos. She relaxes her grip and takes a tentative step, feeling the hard earth though her thin leather shoes. The drop echos and the sound of shuffling of footsteps follow. Lola finds a boulder along the cave wall and kneels behind it. She drops a rucksack and her nose wrinkles from the dust. Rocks grind against each other further down the cave. Lola flips though a stack of colored papers in her rucksack. Steady rhythmic breathing fills the area. Grabbing a bright orange and red paper, she jumps out and flashes it. A white outline of a printed flame catches the light. She closes her eyes to the heat. A dagger clangs on the rocky floor and a charred corpse falls on top of it. The paper turns to ashes. Her hand smothers screaming faces carved into bone handle as she draws her sword.

She picks up a small stone with her free hand and follows the cave to a bend. She puts the sword shoulder height and throws the rock around the corner. A drop of water echos. A short shadow moves around the bend and she thrusts. Blood jets over the cave wall. A body falls, the dagger clanging next to her feet. Around the bend a stalactite drips another drop of water into the puddle bellow it. Flipping the body over, Lola searches the pockets. She pulls out a dull iron key.

Trevor pushes back from the keyboard. Orange fingerprints stain the left side. He brushes Cheeto dust off his belly and stands up. He bumps in to the desk sending Mountain Dew cans across the floor. He kicks them as he walks into the kitchen.

©Chris Richards 2009
Share

67. Travesty

Amy Wong brushed the soft earth off as she crossed back into the room. She felt the ground with her bare feet and pushed away small clumps of broken rock. The room was empty now; a few torches illuminated its smooth surfaces. Amy wondered why the professor ever built these tunnels in the first place. She walked as far into the room as she could with one hand still on the hole Zoidberg had dug for her escape. Working up some courage, she called out. “Zoidberg, where are you?”

A loud roar echoed from the darkened hallway on the other side of the room.  Amy pulled herself back though the hole and watched. Zoidberg came out with Leela in his arms.

He laid her out in the middle of the floor, under the torch light. Her clothes covered in perfectly round holes of the same size. Red hickeys covered her bare skin in the same pattern. Zoidberg looked in each eye checking for dilation or brain trauma. He held his left claw up, “How many claws do you see?”

Leela’s eyes focused on him. “You saved my life.” She reached out and grabbed his free claw. He screamed in pain. Leela quickly let go and looked at his claw. It was cracked down the side. “Oh my gosh, you’re hurt.” She tried to sit up.

He pushed her back down. “You can’t move, I think your rib is broken.” He stuck his good claw though the holes in her shirt and cut the rest of the fabric away. He pressed slightly around her ribs. She flinched in pain.

Amy charged into the room. “Back off Leela, Zoidberg is saving me.”

Zoidberg turned to face her. “What are you still doing here? I told you to escape.”

She threw her arms around him. “I can’t leave you, not after you saved my life.” She forced her lips to his mouth. He fought her for a second and then gave in, his tentacles wrapping around her head. She stroked the quivering fin on the top of his head.

Leela pounded her boot on Amy’s bare foot. Amy yelled in pain and jumped around holding her injured toes.

“Broken ribs here.” Leela said.

Amy cursed in Chinese. “He’s saving me.”

“Ladies,” Zoidberg said. “I’m a doctor, I save everyone.”

Glowing blue eyes came out of the darkened hallway. Zoidberg barely registered it when the giant octopus reached out and wrapped a tentacle around him. He fell on his broken claw. It dragged him along the hard floor, his exoskeleton breaking and leaving red pieces along the floor.

“Hurry, run” Zoidberg yelled as the octopus held him upside down. Another tentacle came out and suckered onto his broken claw.  He screamed in pain as the claw ripped free of his arm.

Amy struggled trying to lift Leela. She managed to stand her up. Leela limped with her as they made it to the hole. The octopus swung Zoidberg in the air. “You have to make it out.” Amy cried. “I need you. I need to be saved.”

They ran though the hole and disappeared.

The octopus stopped swinging Zoidberg and watched the hole for a minute. When no one reappeared the octopus took Zoidberg into the darkened hallway. He held Zoidberg steady so he wouldn’t hit the walls as they turned corners. Eventually they came to a large cavern with light filtering down and reflecting off a large pool of water. The octopus sat Zoidberg down on a bed of broken coral. “Are you ok?”

Zoidberg held his head and sat up. He swallowed a blue pill from his pocket. “I’m going to need a new shell after this,” he smiled at the octopus. “You did good Fred. Amy’s totally fallen for me.”

“Are you sure? I didn’t mean to pull off your claw like that.”

Zoidberg looked at the stump. The end was starting to bubble. “Don’t worry, it will grow back.”

© Chris Richards 2009
Share

Get Column name from MySqlDataReader

Recently someone found my blog by searching google asking how to get the column name from a MySqlDataReader. I doubt they found the answer on my blog, so I figured I’d write about, just in case anyone else needs to know.
(more…)

Share

What to write about.

Next Saturday’s story is supposed to be on travesty. The idea is to take 3 characters and make them behave completely opposite than they would normally. My problem is which characters should I write about. There is no way for the reader to know it’s a travesty unless they already know the characters. Unfortunately, at this point I don’t have any characters of my own that the audience would know enough about for the travesty to work.

So I either have to pick some really popular characters, and use them, or ignore the exercise all together. Which is why I’ve been trying to think of popular characters and what their opposites would be. (off topic, am I the only one who doesn’t like when a sentence ends with a word like ‘be’ ? It just feels wrong.) The first thing I thought of was the Simpsons, I know them better than just about anything. But the problem is how to make a travesty, they’ve done just about everything possible. Homer’s been the weakling wuss, a whiny bitch, the macho man, and the hero. It’s hard to think of something that is opposite of all that.

So who else do I know, or at least know enough to write a travesty. There’s always Fry from Futurama. I could do Harry Potter, that would make it easy to pick which three characters to use. Characters from Lost or Heros could also work.

I’m going to think about the Futurama one a bit longer, although it’ll be hard to think of some situation that they haven’t already done. — Or maybe I should do a situation they’ve already done, to further point out the travesty?

Share

7. Family

3:00 p.m.

Deb was vacuuming her bedroom when it caught hold of something under the bed. She pulled a red Swisher Sweets box from its vice grip. He lied to me. She took the box into the bathroom and lifted the toilet seat. This is one box he’s not going to smoke. When she opened the box she found letters in unsealed envelops. She put the toilet seat down and sat on it. She opened the first letter.

My Dearest,

It feels like forever since you last held me in your arms. Last night was amazing, out in the tree house, the cool breeze over our naked bodies. My body aches just thinking of your gentle touch.

Forever yours, K.

He’s cheating? No it couldn’t be he doesn’t know anyone named K. Deb sat for a moment naming all the women she knew. Their friends, his secretary, his boss … Kathrin, but It couldn’t be his boss. He was always telling her what a bitch Kathrin was … Oh my god, it is Kathrin! She started crying.  In between wiping her eyes she read several more letters, one going into painful detail.

She pulled out a suit case and started packing.

8:10 p.m.

“Hey your dad’s calling.” Kris held up his phone to show him.

“I don’t answer the phone while I’m driving.” They were waiting to park at the Savage Garden concert.

“Want me to answer?” she asked.

Troy grabbed the phone and turned it off. “No, I don’t care what he has to say, nothing’s going to keep us from this concert now.” He leaned over and started kissing her. They heard snickering from the back of the car. Troy reached back and swung is arm wildly. He hit something hard.

“Ow,” His sister and her best friend came out from under a blanket.

“What are you two doing here?” He yelled.

“Going to the concert, duh.” Megan rolled her eyes at him. Jill flipped her hair.

“You’re grounded, besides, you don’t have tickets.”

“I was planning on just taking your tickets once mom grounded you.” Megan put on fresh lip gloss. “Guess she didn’t find the box in time, oh well. We’ll just get our own tickets.” She smacked her cherry red lips.

Troy reached the parking attendant, paid the fee; he was lead to a spot. He turned off the car and faced Megan. “What box, the cigars?”

Megan handed the lipstick to Jill. “The sex notes from miss tubby here.”

Kris scowled at her.

7:25 a.m.

Phil finished his coffee and double checked his briefcase. Walking to the front door a faint vanilla smell beckoned from Troy’s open book bag. Phil pulled out a red box; it was one of his swisher sweets boxes. “Troy!” He yelled across the house.

Troy came out with his coat in hand. “Yeah yeah I’m ready.”

Phil held out the box. “You stealing my cigars again?”

“What? No way. I didn’t take anything.”

“I found this in your book bag.”

“I swear to god dad, I didn’t take them! I don’t know how they got in my bag.” Troy looked up at his father. “Please believe me. I have to goto this concert tonight.”

“Alright you can still go,” Phil took the box and headed to the master bed room. “But we are going to talk about this later.”

Phil walked in and threw the box of cigars under the bed. His wife Deb was in the shower. Phil knocked once and opened the door. “Hey hunny, I’m leaving.”

She peeked out, water ran down her face. “Ok, love you.”

Phil walked over and gave her a kiss. “Love you too.”

Walking out of his bed room, passing Megan’s room he peeked in “We’re leaving, you need a ride to school?”

7:35 a.m.

“No, Mom’s taking me.” Megan said to her father and shut the door. She brought the phone back to her ear. “You still there? It was just my dad. I know right! I don’t care if I’m grounded, I’m still going.”

She wiped blush on. “I already did. Yeah those letters from little miss piggy.” she straightened out her blouse. “Of course she will, I put it in one of dad’s old cigar boxes.” She stood up to check herself out in the mirror. “Right. right. She’ll be so upset that she won’t even know I’m gone. Alright, see you soon.”

8:00 p.m.

Phil dropped his briefcase by the door. “I’m home.”

No one answered. Phil illuminated the house as he walked though. In the kitchen he noticed his empty coffee cup was still sitting there. “Hello?” he called again. He walked down the hall way, all the bed rooms were dark. He opened the door to his bed room.

“Oh shit.” His eyes darted around the room. Drawers where pulled out, their contents littering the room. The bed was flipped over and Deb’s jewelry boxes were gone.

A car engine started outside. Phil ran to the door just in time to watch someone drive off in his car. He slumped in the doorway. We’ve been robbed?

He ran back inside panicking, “Deb? Megan? Where are you?” He threw open doors and fanatically searched the house. It was empty. He tried calling them. No answer. He called Troy, no answer.

He walked back to the bedroom, turned over the bed and sat down. A letter was stuck in the sheets.

My Dearest,

I want to rub my lips all over your body.

Forever yours, K.

K? He pulled off the sheets, more letters fell to the ground. He read those those, all from K.  He crumpled the letter. “Kevin.”

© Chris Richards 2009
Share

SubSonic and ORM

Looking into other ORMs and Linq I came across subsonic. I watched the video and build a quick little sample application with it. I had a slight problem at first because it kept giving me an error with my MySql.Data reference. I upgraded my DLL and played around with it some more, still no luck. I searched around for a bit before I found the answer, if you use their sonic.exe tool, you need to use their MySql.Data.dll as well.

Once that problem was solve, Subsonic was actually very nice to work with. I used work’s database which is a horrid mess (my boss thinks he knows DBA and won’t listen to reason.) So some of the objects sonic.exe built didn’t work correctly, I simply excluded them from the project and everything was fine. My sample code doesn’t do a whole lot but has taught me several things.

Wellness.UserCollection users = new Select().From<Wellness.User>().ExecuteAsCollection<Wellness.UserCollection>();

foreach (Wellness.User user in users)
{
    Response.Write("<p>");
    Response.Write(user.FirstName +" "+ user.MiddleInitial +" "+ user.LastName);
    Response.Write("<br />");
    Response.Write(user.Email);
    Response.Write("</p>");
}

One thing it did was make me question my own ORM project, I thought about abandoning it for SubSonic (or something like it.) But there are several things I don’t like about SubSonic. One is the perl design of giving me tons of different ways to accomplish the same task. personally I find it to be a mess. (Maybe SubSonic just takes some getting used to.) Peeking inside of the generated objects I was disappointed at the amount of code required for a seemingly simple object. My objects can’t do everything that SubSonic’s can, so maybe it’s a necessary evil.

Something I love about it is their use of generics. I like the way it looks and reads.

I think I’m going to continue my ORM development for now (not that I’ve spend a whole lot of time on it.)  I like my design the object to fit you needs and there is one correct way to do things approach.

Share

ASP.Net and MVC

I’m not sure how long this has been around, but ASP.Net now supports MVC with a framework. It’s about time! Not having MVC as always been a big disadvantage in my option (That and no real ORM until Linq).

So I’m going to spend some time hopefully in the next few weeks playing around with it and with MySql and Linq.

I found two ways to use MySql with Linq that look promising. One is the DBLinq Project and the other is to use Linq with NHibernate. Both look promising.

(For the Record, Python Rules, and PHP is pretty good for webpages.)

Share

31. Intelligence

Donnie growled in the middle of a text. He turned to Rose, who was sitting on the bed behind him. “It froze again.”

She held out her hand and he gave her the phone. Rose gave it a quick look over before popping out the battery. “Just remove the battery and it’ll reset.” She handed back the phone. He went back to texting and fussing with his hair.

“So,” Rose said, “Where are we going?”

He put his comb down and looked at her reflected in the mirror. “Well, I thought we would go to a party. ” He paused and then picked up the comb again. “You keep talking about meeting someone, and there’s a rave down Pier Street.” He avoided her eyes. “You like techno and stuff right?”

“And stuff … right.” Rose rolled her eyes and fiddled with a loose bedpost. “Have any wood glue?”

Donnie walked over to the closet and pulled out a single cheap plastic bracelet from a jewelry box. He walked back over the mirror and put the bracelet on one wrist, took it off and placed it on the other wrist.

Rose followed him with her eyes as he repeated the process of taking out a single bracelet at a time. Just take the damn box over to the mirror.

“If you really want to fix something, you can fix the rattle in my car.” He was still trying on little identical bracelets. “Did you bring something to wear, or do we need to stop at your place?”

“You didn’t tell me where we where going, remember?”

“Do you have fishnets and a skirt?” He hovered over, the two-dozen bracelets on each wrist rattled by her face.

“No.” She rolled her eyes at him. Oh Damn, guess I can’t go to the rave then.

He tossed his hands at her causing the bracelets to shift and clank against one another. He disappeared back into the closet. When he came out he threw a pair of torn black pantyhose, neon green fishnet stockings, a black 7″ skirt, and a large assortment of neon, glow in the dark, accessories.

“Finally coming out of the closet?”

“Ha ha, funny. Try this on. I don’t have any shoes that fit you, but I bet my sister does.”

She held up the skirt with two fingers and an outstretched arm. “I’m not wearing this.”

“You wear a spanky under it retard,” he said as he walked out of the room.

Rose poked through the large assortment of bracelets and necklaces. She found a blue glow in the dark pacifier that made her wonder about the stores that sold such things.

Donnie came back with several different high heel shoes, a black fishnet shirt, and a sparkling red bra.

“I’m defiantly not wearing that.” She crossed her arm.

“Just wear a white tank-top under the fishnet, trust me.”

“I don’t think so.”

He dropped the items down in front of her. “Do you want to meet a guy or not?”

“I prefer guys not tripped out on acid, thank you.”

“I can make you another outfit. There are some really great guys at these things, you should give it a chance before you just close yourself off.”

“Name one.”

“Well,” Donnie walked over to the closet, “me … for one. Look, I don’t know what you want me to do. The rave isn’t important; I’ll rent some movies or something if that’s what you want. You’ve just been so…depressed lately. I thought this might make you smile again.”

Rose held out her arms for a hug, he walked over to the bed and sat down. She grabbed and squeezed his shoulders. “I just…I mean it’s silly really.” She threw herself against the bed and hid her face in a pillow. ” I just don’t know who I am anymore. It’s like I can see this great person lost somewhere inside and I don’t know how to let her out. I work a dead end job and take classes, and for what? I don’t know what I want to do with my life. I can’t even keep a boyfriend.”

Donnie sat in silence staring at the floor.

She turned her head slightly so she could see him. “Everyone else knows what they’re doing. They live life, and I can’t even find mine. I feel like I’m drowning in it all.”

“That’s not true. I don’t know what I’m doing. I go to these raves and take X so I don’t have to think about it. I never told you this, but I really look up to you.”

Rose turned onto her back. “Why?”

“Because you have it together, you’re getting a degree in something you like, you’re so smart and you don’t even know it. You’ve fixed everything I own –”

“That’s easy.”

“See, that’s just want I mean, you can make something out of yourself. In 10 years I’m still going to be living with my parents.”

She pulled him down, “I won’t let that happen.”

“That’s just it, you have to, you just need to take the plunge and forget the consequences.”

She grabbed his head and kissed him.

© Chris Richards 2009
Share

jQuery Plugin, $.repeat()

While working on the Knit Project,  I discovered that I needed a way to repeat a string and then insert it into a jQuery/DOM object. So I created this little bit of code to do just that.

//Repeater Plugin
jQuery.fn.repeat = function(times, string) {
    //For each item matched
    this.each(function(){
        var buff = string;
        for(var i=1; i < times; i++){
            buff += string;
        }
        jQuery(this).append(buff);
    });
    return this;
}

The plugin takes two parameters, the number of times to repeat, and the string to repeat. this means that if I want to add a bunch of columns to my table rows, all I have to do is:

//Add the columns
$("table > tr").repeat( width, "<td></td>" );

Now all my table rows will have the correct number of columns.

I used .append instead of replacing the old data just in case I would ever need to keep what is already there. This could easily be changed or even turned into a switch.

Download

If this was what you were looking for, or even if it wasn’t, please leave a comment. I’ve gotten a lot of traffic from this little plugin and I would like to know if people find it useful.

Share

32. Friendship

Within a week of meeting her, Judy had started sleeping with Roger. Jeff tried to find ways to keep busy but there wasn’t a whole lot he could do. He found some old porno magazines in the basement, but most of the time he sat around wondering if they were really the last three people on earth.

After a few months of living in the old house, Roger started scouting the area for other survivors. It was his way to keep busy. Judy was always cleaning. With just the three of them and no electricity, the place never really got dirty, but she went though the motions anyway. This particular day Jeff had been sitting around feeling useless for far too long and Judy was making beds in her floral summer dress.

Jeff watched as she bent over the bed, stretching out to pull the sheets tight. He walked up behind her and put his hands on her hips. She jolted upright.

“Oh sorry, I didn’t know you where behind me.” She said.

“It’s ok, I just thought I could help.” His hands reached around pulling her into him. A hand slithered up her chest. She quickly pushed it away.

“Um excuse me.” She tried to move away, he held her tight against his body. “What do you think you’re doing?”

“You.”

“I don’t think so.” She wiggled free and backed away. “Look I know your lonely but I don’t like you like that. I mean, what would Roger say.”

“Fuck him.” He took a few quick steps and pinned her to the window. “Why does Roger always get everything? Our whole lives Roger always gets everything and I’m just left with the scraps. Well tough shit, this time I’m taking what I want.” He forced her hands above her head and started to kiss along her neck.

“He’s your best friend, you can’t do this.”

Jeff slapped her across the face. “I’ll do whatever I god damn please.” He grabbed her by the arm and flung her around onto the bed. He pounced, holding her down with his weight. He lifted up her skirt and unbuttoned his pants.

“Get the fuck off of her.” Rogers’ voice boomed across the small room. They both jumped out of the bed and turned to the door. Roger was pointing his shotgun at Jeff.

“Hey, uh, we were just –”

“Don’t bullshit me Jeff. What the fuck are you doing, huh?  I leave for a few hours and you fuck my girl?” Roger pushed Jeff to the window with the gun. He turned to Judy. “You been cheating on me? There’s only one other man in the entire world, and your sleeping with him too?”

Judy fell on the bed balling. “No, it’s not like that.”

Jeff just held up his hands watching the end of the barrel. Roger pressed it hard against his chest leaving two round bruises.     “Why man? You’ve stolen every girlfriend I’ve ever had. This was it, this was finally the one and you steal her too. Well Fuck you both.” Roger stuck the barrel in his mouth and pulled the trigger.

© Chris Richards 2009
Share