the girl to forget

Mon, 13 Dec 2010 01:24:25 +0800 | Comments(140) | Category:crazy-life | Tags:

I am almost forget the girl.

Just For the reason that we haven't seen for such a long time?

We all need simple life.

So don't hung heavy in our life for each other.

If we can meet, Maybe it is a strange karma,

which could not explain.

good lucky!

T-shirt: programmer's love

Sun, 05 Dec 2010 09:34:47 +0800 | Comments(2397) | Category:crazy-life | Tags:

Late Hours This Night ...

Sun, 05 Dec 2010 08:37:43 +0800 | Comments(99) | Category:crazy-life | Tags:

Late hours are incompatible with health.

I known it clearly. But this night, I just want 2 make my code run normally.

The principle of compiler is complex.The LALR analyzer make me crazy.

I took oath to implement it. Q_Q`

continue coding ...


Links My blog Reader

Sun, 05 Dec 2010 03:02:18 +0800 | Comments(52) | Category:crazy-life | Tags:


“My husband is a programmer; I have no idea what that means.”-Just testing!

Sat, 04 Dec 2010 21:14:45 +0800 | Comments(52) | Category:摘抄&引用 | Tags:

Wednesday, August 11th, 2010 | Author: renaebair

I met my husband 11 years ago. I was carrying my guitar into my dorm room on freshman move-in day at the University of Southern Maine. I saw him eyeing my guitar with great interest. When he knocked on my door and introduced himself, he said, “Hey! I’m Adam. I live across the hall. I’m a computer geek!”

It was a bold move on his part. Being a computer geek ten years ago wasn’t exactly “hot” and he was either socially ignorant to this fact, or he just didn’t care. Regardless, I was in love. I wasn’t even a computer geek myself at the time, but I was smitten with his forwardness and his apparent lack of concern about his own geekery. Finding out that he also played guitar sealed the deal. Fate would have it that he lived directly across the hall from me.

In the following weeks, months and years, he was able to hold my attention as he ranted about hardware specs for his gaming machines, his god-like status in Unreal Tournament matches, his ColdFusion senior project application, and his long explanations on programming theory. I sat and watched in amazement as he built and tore down PCs. I listened to him talk through programming problems and watched him build websites. All the while I was planning some vague career with political science and english, but I was nonetheless interested in Adam’s life.

It was no accident that years later I knew that “Ruby” wasn’t just July’s birthstone and that “Ruby on Rails” wasn’t a rebellious act of sacrificing precious gems on railroad tracks in hipster neighborhoods. I spent years actually being engaged in his interests. And when he fell in love with Ruby in late 2005, I was supporting him all the way and knew exactly why Ruby was incredible. Several years later, when I decided to learn Ruby, I came out with a post on my blog about the Ruby community. A lot of people were confused as to how a Ruby newb could already understand the Ruby community so well. Truth was, I had been following the community for quite some time before I ever decided to learn to program in Ruby. I knew all the big names, the trends, and the history before I ever opened up TextMate and saved a .rb file.

Do you get that glazed, faraway look in your eye when you partner starts talking about a programming problem, or the newest testing framework? There’s no need to be bored. Ask questions, try to understand! When I meet women today, I don’t avoid talking about the work that I do, my love for pc gaming, or my fascination with D&D and other such geekery. Often I’ll get a response along these lines: “Programming? My husband does something like that I think.” To which I always inquire, “Oh really? What language does he work with?” Their response is always the same: “Language? huh. I have no idea. There’s more than one? I don’t really know what he does. I don’t pay attention to that stuff.”

This always blows my mind. You’re married to someone, and you aren’t interested enough in the person to know anything about what they do with nearly 40-50% of their time, aside from their job title? Is it dangerous to draw a correlation between high divorce rates and the lack of interest that people have in their partners lives? It’s easy to fall in love with the “idea” of a person when you first meet them. But I think it would be hard to endure a lifetime of ups and downs, trials and tribulations and the everyday challenges that life throws at two people, if those partners didn’t have a truly vested interest in each other’s passions and life’s work. And if you don’t have even a basic understanding of what your spouse does with 40+hours of his/her week, then you’re not on a team.

I’m not suggesting that you give up your own individuality and personal interests when you meet someone special. But open your mind enough to experience the world through your partner’s eyes. I admit there were occasions when Adam would be on his third diatribe of the evening on meta-programming, and my mind would start to wander. But I was generally engaged in his interests. And why wouldn’t I be? Falling in love involves getting to know a person. And getting to know a person usually involves talking about and understanding each other’s personal interests. Adam certainly had to endure hundreds of hours listening to Ani Difranco, Dar Williams, and Iron & Wine albums, along with my absurdly psychotic analysis of all of the lyrics. He learned to play tennis at my prompting, although I have to swallow losing nearly every game to him now. He watched my ballet performances in college, and even knew how to pronounce a few of the positions. Below is a photo of Adam and I embarking on a hike up Tumbledown Mountain. It captures Adam’s willingness to step away from the computer for a day and partake in my interest in the outdoors. He was a trooper.

hiking up Tumbledown Mountain in Maine

hiking up Tumbledown Mountain in Maine

It should not be hard to be engaged in your partner’s interests. If it is that hard, you might want consider the possibility that you might be full of yourself. Even amongst my friends, I make a concerted effort to listen and understand their individual interests and passions. I always learn something new, and sometimes I get to discover a new passion for myself.

Professionally, I wouldn’t be where I am today, if I had daydreamed my way through Adam’s geek rants. Our relationship resulted in thousands of hours of video gaming, late-night programming tutorials, brainstorming sessions for new apps, some camping trips and lots of folk music. Even if you don’t follow a similar career path as your spouse, being interested in their work and their hobbies can open up other doors for you. It broadens your world view and helps you to suck less as a human being. It’s about being part of a team that works together. I don’t professionally program like Adam; I’m not built that way. I understand programming, but unfortunately I wasn’t given Legos to play with as a child, math skills were never encouraged in school or at home, and the engineering/problem-solving side was never nurtured. So, while I enjoy programming, it comes a lot harder to me than it does for others. But writing is a strength, and programming and technology is a huge interest of mine - so scoring a gig as Intridea’s Community Manager really rocked my world. I keep my eye into the world that I love, my finger on the pulse of it, and the work that results is always rewarding and fun.

So if you’re with someone new, find a way to be interested in the the things they like to talk about. And if you’re with someone old, rediscover the love of your life by asking about their work and listening to their response. Don’t feign interest. And please, don’t be one of those girls that doesn’t know what language her husband programs in. Be the cool wife that surprises her husband’s dorky friends when she knows Java is, and can engage in a short discussion on the evangelicalism of the Ruby community without asking, “Honey, I didn’t know you were a jeweler!”

C Object Stack Implementation

Sat, 04 Dec 2010 07:04:03 +0800 | Comments(174) | Category:linux-embedded | Tags:

I implemented a objective stack container Last Week,used for a simple compiler.It made me  crazy when happened to some strange exception of pointer...Now,it has been released.

code as following:


 * xiaoyang yi @2010.12.2
 * A simple C object Stack.
 * Wanning:Before you new a stack,stack_capacity should be assigned.
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>

#define __ERROR__(str)	printf("%s",str)
typedef int T;
|____5____| <---- 5-top(no value)
|____4____|    |
|____3____|    |
|____2____|    |
|____1____| <---- 1-base(first value)

typedef struct _obj_stack{
    T* base;/*warning:it won't release space pointing to *item*/
    T* top;
    int capacity;/*capacity of stack*/
    int elements;/*count of elements*/

	/*stack interface*/
	//struct _obj_stack* (*new_stack)();
	int (*push)( T* val);
	int (*pop)();
	void (*release)();
	T* (*stack_get)(int pos);

/*stack function*/
int _obj_push(T* val);
void _obj_release();
int _obj_pop();
obj_stack* new_obj_stack();
T* _obj_stack_get(int pos);
int stack_capacity;
T* _temp_;
obj_stack* __newstack__;

obj_stack* new_obj_stack()
    if(stack_capacity <= 0){
        return NULL;

    __newstack__ = (obj_stack*)malloc(sizeof(obj_stack));
    if(__newstack__ == NULL){
		__ERROR__("error:malloc failed!\n");
        return NULL;

    __newstack__->capacity = stack_capacity;
    __newstack__->elements = 0;
	__newstack__->base = (T*)malloc(sizeof(T)*(__newstack__->capacity));
	__newstack__->top = __newstack__->base;

	__newstack__->pop = _obj_pop;
	__newstack__->push = _obj_push;
	__newstack__->release = _obj_release;
	__newstack__->stack_get = _obj_stack_get;

    return __newstack__;

/*pop without return value*/
int _obj_pop()
    T *val = NULL;
    if(__newstack__->elements <= 0){
		__ERROR__("warnning:stack is empty!\n");
        return -1;
        val = __newstack__->top;
        __newstack__->top -= sizeof(T);

    return 1;

int _obj_push( T* val)
    if(val == NULL | __newstack__ == NULL){
		__ERROR__("error:null params!\n");
        return -1;

	/*if space is enough,malloc again*/
    if(__newstack__->elements >= __newstack__->capacity){
		_temp_ = __newstack__->base;
		//m_stack->base = (T*)malloc(sizeof(T)*(m_stack->capacity)*2);
		//m_stack->base = (T*)malloc(80);
		__newstack__->base = realloc(__newstack__->base,__newstack__->capacity*2*sizeof(T));
		if (__newstack__->base == NULL){
			__newstack__->base = _temp_;
			__ERROR__("error:malloc failed!\n");
			return -1;

		__newstack__->capacity <<= 1 ;

		__newstack__->elements = __newstack__->elements;
		__newstack__->top = __newstack__->base+__newstack__->elements;

    __newstack__->top ++;

    return 1;

/*random access to stack*/
T* _obj_stack_get( int pos)
	if (pos < 0 | __newstack__->elements < pos){
		__ERROR__("warnning:out of boudry!\n");
		return NULL;

	return (__newstack__->base+ pos);

 * warning:it just frees the space of struct and content in stack together!
 * if you don't want delete the content,just free(m_stack)
void _obj_release()

/*test stack*/
#define MAX	200
int main()
	obj_stack *newstack1 = NULL;
	int i = 0;
	T *val = NULL;
	T a[MAX] = {1,2,3,4,5,6,7,8,9,0};

	for( i = 0; i < MAX; i++){
		a[i] = i;

	stack_capacity = 5;
	newstack1 = new_obj_stack();

	for (i = 0;i < MAX; i++){
	for (i = 0;i < MAX; i++){
		/*before using val you need to check it*/
		val = newstack1->stack_get(i);
		if (val != NULL){

	return 0;


If there are some other errors,you can post email to me: hityixiaoyang@gmail.com. 


The End of November

Sun, 28 Nov 2010 03:42:47 +0800 | Comments(48) | Category:Uncategorized | Tags:

Late November, earthly grave. Only last month, the autumn-kissed trees were alight; a graceful end of life burning that enchanted our passions for beauty. There was shopping, hot cider, reading, and chatter amidst the loveliness of it all. But now burnt oranges, plum reds and banana yellows have dropped and decompose their way to a [...]

Staring at the Ceiling

Mon, 08 Nov 2010 12:09:24 +0800 | Comments(1138) | Category:Uncategorized | Tags:

As an adolescent I’d rush home after school, run upstairs to my room, and fling myself upon my bed. Then, staring up at the popcorn ceiling and bright lights, I’d re-imagine my world. It was a fantastical escape that I looked forward to all day long while toiling away through the uncomfortable pressures of adolescence [...]

&#8220;My husband is a programmer; I have no idea what that means.&#8221;

Thu, 12 Aug 2010 02:53:19 +0800 | Comments(40) | Category:Uncategorized | Tags:

I met my husband 11 years ago. I was carrying my guitar into my dorm room on freshman move-in day at the University of Southern Maine. I saw him eyeing my guitar with great interest. When he knocked on my door and introduced himself, he said, “Hey! I’m Adam. I live across the hall. I’m [...]

We&#8217;re Never Alone

Fri, 07 May 2010 04:01:05 +0800 | Comments(51) | Category:Uncategorized | Tags:

It’s 6:00 am; the kids just woke up. As they eat their cereal, I’m leaning up against the kitchen bar, iPhone in hand, checking Twitter updates from last night and catching up on email. It’s 9:00 am, and the kids have found a way to amuse themselves without me. This will last about 20 minutes. [...]