Latest Publications

2. Imperative

Wake up and fill your young lungs with the morning air. You smell fresh flowers nearby and feel the cool grass under your body. You hear mother calling, you’ve slept in late again and everyone else has left. Answer mother quickly so she’ll stop calling you. Roll around a bit to wake up and find your mother. Thank her for breakfast before you eat it all. Ask her where to find your brothers and if you can go play. Run to your brothers, who are probably setting up a trap for you, through the meadow towards the woods, birds warn of your presence from the air. (more…)

Share

69. Consciousness Slowed

I thrust deep inside of Amy’s slender frame. The force of my hips collided into her, creating a ripple though her body. I watched in slow motion as it traveled up and away from me. Her breasts hung in mid-air. The shock forced her head back, exposing her fragile neck. I love the look of her neck while she rides me. I’m going to cum soon; I can feel an urge form in my balls. (more…)

Share

1. The Reluctant

The mist formed a walking shadow. It grew in size as it approached. It walked with a cool clean demeanor. Almost a century has passed since I last stood here. He dropped a package on the ground, and disappeared back into the mist. No words were exchanged, no passing glances, this was business. (more…)

Share

Welcome!

As I said on my other blogs, I’ve finnaly set things up so I can consolidate all of my blogs in one place. I tried DJango at first but after several months I still didn’t have it working properly! As much as I wanted something in python, it just wasn’t going to work. So now I’m on WordPress. So far I really like it. I haven’t done much PHP stuff in a few years so I might have to brush up on that.

It’s going to take some time, but I am going to move all my old posts onto this blog. I may or may not keep my xanga open, I don’t think anyone really checks it anyways.

Share

Join Progress

I’ve worked on the Joining with attributes a little bit but I’ve run into a problem. Maybe it’s not really a problem but I just think it is.

I can easily get the Join string from the attribute, and the new .WhereJoin uses it. The method gets all the tags for the user as expected.

So whats the problem?

The problem is that I have to specify the column instead of a property. I don’t like that because it means I have to know the column name. On the other hand, I know all the column names because I set them myself, so it’s not terrible

It still bothers me though.

Share

Join is working

I have the join working but it’s not pretty.

_tags = DBObject.WhereJoin("user_id", "=", this.ID, typeof(DBTag), "tag_user", "tag_id", "id", DBUser._conn);

Right now, in the Where you have to specify all the information about the Join, the table, the columns, etc. and it doesn’t use a property but the column name (because there is no object for the join table.)

I think I’m going to try and move some of this information into the attribute. I also noticed that I need something like a Helper object, or something to help me get information about the object and prevent from calling the same methods over and over again every time I need the same bit of information.

For the Join, I need to know:

  • Join Table name
  • Join column on the join table.
  • Join column on the normal table
  • Where Column on the join table
  • Where value

Do I want a static Search column for the join? Or do I want to be able specify that in the method?
In my example:
SELECT * FROM tag JOIN tag_user ON tag_user.tag_id = tag.id WHERE tag_user.user_id = 2;

This gets all the tags for the user, so this will always be the case. The easiest would be to assume this is the default until I have evidence to the contrary.

Share

Back to bussness

Ok, so My top pirority for this right now is to get a list of object via a join table.

I have the Tag Object, which has ‘id’ and ‘name’.
There is a join table tag_user to Join Users to Tags.
I need to pull a list of tag via tag_user.
Share

LINQ

I’ve been avoiding LINQ for several reasons. One is that I’m afraid that it would mean all my code and effort went wasted. (Not a good reason I know.) Another was that it doesn’t really work with MySql yet. I know there are ways to make it work, but it’s not production ready or easy to use.

I read an article about LINQ which was very informative. The bottom line seemd to be that LINQ was great for small databases that didn’t change offten. But once you started having large databases or complex data structures it becomes a hassle.
Another article seems to share some of my conserns with LINQ.
But these articles are old. Maybe I’m just looking for something to be wrong with LINQ. My frist reason for not using it so far can be a pretty powerfull modivator. Maybe I need to just give it a go.
Share

idea

An idea has struck me. What if the DBObject could build its self from the database? You specify the table and it would take care of all the properties and accessors. The one problem with this would be that you lose type safety and intellisence features. The programmer would have to know what columns exist in each table without intellisence there to remind them. There would still be the join problems, but I’m already trying to work those out.

This kindof design would be more data driven and easer for other developers to use.

How do I tell the the object what type each column is? I don’t. The developer would have to know this on their own. In a static typed language like c#, this could be very frighting.

Share

On the right path.

So I made an Index version of the DBObjects to test this new method. To say the least, it’s been a very inlighting. 

For my test each object had to get 1,248 User records 100 times (so I could get an average). As far as just retraving the inital list, the index method worked considerablly faster. This didn’t come as a surprise because it’s just geting all the IDs for all of the user records in the system.

Normal method Retreave List: 3.8 seconds
Index method Retreave List:    0.43 seconds

As I said this isn’t surprising because the index method only fetches 1 out of 5 columns. Now on to actually accessing a property for every item in the list

Normal method Access: 0.0 secionds (around 6,700 ticks)
Index method Access:    3:50.50 minutes (around 850,000,000 ticks)!

The index method lost horribly! It just takes too long to query the database 1,248 times. So far this is pretty much what I expected. Heres the total averages.

Normal Retreave & Access: 2.13 secionds (21,380,733 ticks)
Index Retreave & Access: 1:53.21 minuetes (around 1,132,100,354 ticks)

So far it looks like I’ve been on the right track. In my experiment I did create something neat. For the index I created the abliblity to get a list of objects from the DBList object, with a call like DBList users = new DBList(typeof(DBUser));

One thing I might want to try, is instead of making 1,248 calls to the database, to get batches at a time. So if I want user.id = 1, it’ll actually load the first 100 or so items. That would reduce our class to 13. But still I just don’t see how 13 calls is going to be any faster than our single call to get all 1,248 items.

Share