Friday, July 4, 2014

Inheritance

Lately, I've been implementing all the database interaction.  Using a database is really an ideal way for Idea to work.  However, there are a few things that databases don't necessarily do well that are important to Idea.  The most prominent is inheritance, which I talked about in my last post.

Inheritance is an important concept in object-oriented programming, but it's non-existent in relational databases.  Therefore, I had to come up with a way to imitate it in a database.  I can tell you, it wasn't easy.

Sometimes things just click and I gain momentum, and I never seem to hit any ruts.  Well, I was that way in my first few iterations of Idea, but I'm not that way now.  It's mostly because my current version requires alot of work on the foundation before I can ever even test the thing. So far, I've had to hold everything in my head, and I'm doing something that hasn't really been done before, so I don't really have any precedents.  The best way to do things isn't very obvious.

Before, I just jury-rigged everything, but now I'm focused on quality and performance.  This time, it's not just a fun experiment.  This time, I really want to take it somewhere.

Thus, I was determined to find the best way to implement inheritance.  I'll be honest, the first way I thought up seemed really nice at first, but then I realized that it opened a huge can of worms when changing existing idea types' settings.  Then I came up with my current method, which at times seems a little tedious, but it utilizes the nifty perks of relational databases better, which actually make things sooo much easier in the end.  For example, if you were to change an existing idea type's inherited type, the old way would have been ridiculously hard and impractical.  The new way, while still difficult, makes it infinitely easier.

I'm actually a bit proud of my inheritance code.  However, it's probably riddled with bugs.  I haven't tested anything yet.  I'm excited to get to that point.  However, I know I'll spend a couple days just ironing out bugs.  But that's fine with me.

Thanks for reading!

clevceo

Saturday, June 28, 2014

Idea

This blog has been sitting here on the internet for years, so I assumed that somewhere down the line, I must have explained what Idea was all about.  However, today I looked back and the first post has a link to an explanation, but the link is broken.  I have no idea where it linked to.  Fortunately, Idea has evolved since then, so it would have been outdated anyway.  I figured now would be a good time to tell what Idea is and means in its current form.

Idea is an idea organization tool.  I know that's vague, but there's no other way to say it.  I think a good way to explain it would be to tell how I came up with the idea.

Years ago, I was interested in creative writing.  I bought a few books by big authors about their writing process and I swallowed them whole.  Steven King says he usually plans out a good beginning situation and then starts writing, never knowing what's going to happen until he writes it.  Terry Brooks, on the other hand, outlines everything before he puts a word on the paper.  I figured I'd probably lean towards Brooks' method, since I'm not that good at improv.

Terry Brooks explained his method of outlining.  Most of us picture an outline as a numbered list, like we all learned in school.  However, his outlines consist of post-it notes, note cards, etc. scattered on his wall or desk.  He puts one idea on each note card or post-it note so that he can order them, group them, and rearrange them as he pleases as he plans out his story.  My mom likes post-it notes, but they would put my mind for a spin.  I'd be in a constant jumble with notes surrounding me.  I'd lose notes, I'd forget where I put them, I'd, I'd, I'd...  Long story short, I'd go crazy.

I began to wonder how writers managed to write an entire novel and keep track of everything.  Being a computer-person, I began to wish there was some sort of software that could keep track of it for me.  Soon, I had a fairly solid idea how that software could work.  All of a sudden, I realized that as a programmer, I would be able to develop that software myself.

Unfortunately, I was a very new programmer at the time.  I didn't have much experience.  However, the experience I gained while working through each iteration of Idea got me my current job, and my current job gave me the skills I needed to complete Idea.  It also helped me to solidify the design of Idea.

While I don't yet know what all bells and whistles I'll add to the software, I know its under-workings, which is honestly the most uniquely important part of the software.  If you're a programmer, you'll probably recognize some of the principles as I explain the philosophy behind it.

The bare bones of it is that I wanted to imitate the post-it note method on a computer.  What's different between a post-it note and a written document or even a specialized note program like OneNote is that a post-it note is an individual entity, separate from all other ideas.  In a document, each idea is merely a block of text mixed with all of the other ideas on the same page.

Say for example, you have a post-it note for each character.  You can put the characters relevant to a certain scene next to you on the desk as you plan it out.  And if you want to add a character, grab the other character's post-it note and put it next to the others.  Also, you might have a post-it note for each setting/location.  You can just grab the right one and put it in the group.  Each note is a building block.  Whereas in a document, you have to write it all out, meanwhile flipping back to the characters page (if you remember where it is) to make sure you're staying consistent.

Idea allows you to create standalone ideas and mix and match them as you please.  It seeks to streamline the idea generation and development process.  However, it is not only for writing.  It is designed to be used for just about anything.

To see how it works, you must first understand what an idea consists of in this software.  An idea is a list of fields that contain data.  For example a "character" idea might have the fields "First Name", "Last Name", "Age", "Occupation", etc.  A "setting" idea might contain the fields "Name", "Country", "Description", etc.  Then you'd have a scene idea with the fields "Name", "Characters", "Setting", and "Plot Summary".  Now here's the cool part.  "Characters" and "Setting" are fields that contain other ideas, and "Characters" is actually a list.  This is where you match the ideas together.

You might even have an idea type called a "time line".  The "time line" idea would contain an ordered list of scenes.  Imagine seeing the list of scenes on the screen.  You can drag them around and rearrange them as you please.  You can also tell it to show you which characters are in each scene, mixing and matching as you go.  You can get a birds eye view of your story, only seeing the surface details, or you can dive into a scene, shutting everything else out and showing all the nitty gritty details.

You are the master of the idea types.  Until you're more comfortable, you can stick to prefab types.  However, when you're ready, you can edit the prefabs or create your own idea types, allowing you to use Idea for just about anything.

Now here comes a more complex concept.  What if you were writing a fantasy story and you'd like each class of character to have its own fields?  It would be a mess to just add all of the fields in and only fill the relevant ones, wouldn't it?

The answer is a programming concept called inheritance.  One idea can inherit the properties of another.  I know that sounds confusing, but hear me out.  Say you made a base idea type called "character" with the general fields "Name", "Gender", and "Short Description".  These fields would apply to any character.  Now, say we made another idea type called "wizard" with the fields "Powers", "Wizard Type",  and "Wand Wood Type".  Then we made another called "elf" with its own fields, and another called "human" with its own fields.  Then, we'd have all of them inherit "character".  That means they'd all share the fields contained in the "character" idea type, but keep their own unique fields.  A good way to look at it is this: wizards, elves, and humans are all kinds of characters.

Now, remember that the "scene" idea type asks for "character" ideas, not "wizard", "elf", or "human" ideas.  That means that as long as the idea is a "character" or inherits the "character" type, it can be added to the scene.

That completes the basics of how Idea works.  It's only a few principles, and I might add more later, but I think it can go really far.  I want to the interface to really make the process feel simple and intuitive.  There will probably be alot of prefab idea types to begin with if you'd like.  Creating the idea types themselves might be the unintuitive part, but people can figure it out and take the software alot farther as they learn.

So there you go.  An explanation of Idea.  I hope it wasn't too confusing.  Let me know if you find it interesting, you have questions, or anything else.

Thanks,
clevceo

Tuesday, June 24, 2014

SQLite

Well, here I am working on Idea again.  It's been a long time, and I don't think it will be finished any time soon, but I at least want to get a simple version on its feet so I can play with it.  In my last post, I mentioned that I didn't know what database software to use, but that's behind me.  I'm using SQLite.  When I read up on it, I realized that it was exactly what I'd been looking for.

I'm working on the foundation of the software at the moment.  I have a decent idea how I want it to work, and it's coming along nicely.  I've got the database pretty much designed, and now I'm implementing it.  The problem is that SQLite's version of SQL leaves out some handy features.  For example, you can't drop or modify columns once they're in place.  Instead, the way to do that is to copy the data into a temporary table, drop the table, recreate it with the changes, and copy the data back in.  It sounds like it would make more sense to just create one new table, copy the data over, drop the original and rename the new one, but that would actually mess things up.  In other words, it's a bit inconvenient.  However, I'm going to make it work, and I'm excited.

SQLite is the absolute perfect solution to the issues I had with Idea's design.  It's no longer impractical and really hard to manage.  I could go on and on why this solves all of my life's problems, but I won't.  Just know that this makes my life soooooo much easier.  Basically, once I have this part developed (which will be soon), then I can start experimenting and having fun.

Anyway, gotta go.  I hope to keep this updated as I continue to build it.  Thanks for reading!

clevceo

Wednesday, July 10, 2013

Maybe in the Future

My girlfriend is now my fiance and my job title turned from junior developer to development lead.  Nope, no time for Idea right now.  However, I am ten times the programmer I was, and I now have a much better idea of how I'd implement Idea (no pun intended, for real).  Given the way I was trying to store and update data in Idea, I was basically reinventing the wheel and creating my own really inefficient database software.  Now that I've been drinking and peeing databases for the last eight or nine months, I realize that I could just build Idea around a database.  It would be perfect.

However, the problem is that I only know database software built to run hundreds of queries at the same time on a server.  I definitely don't need that, and I'm not sure what the solution is, but I'll find it.

I guess what I really wanted to say is that debt collection software is great and all, but I would love to finish Idea one day.  I really like the concept and I'd love to use it myself, to be honest, but I'd really need to flesh it out more before it would be useful to anyone.

Hopefully I'm able to pick this back up in the next couple years.

clevceo

Tuesday, March 12, 2013

Backburner

I thought I had passed the point of no return with this project.  However, the unexpected happened.  I was offered a full-time job as a developer and I took it.  If I hadn't gone part time for Idea, I wouldn't have gotten this job, so I'm glad I began this project.  Unfortunately, I don't have nearly enough time in the day to continue working on it (I have a girlfriend, too).  I wish I could because it is still exciting to me.  However, I have learned sooooo much from this job, and I think that if I came back to Idea later, my experience would show.  Thanks for your interest!

clevceo

Thursday, October 18, 2012

Idea Is Officially Back

That's right folks.  It's back.  Because I was so burnt out last semester, I decided to take a semester off of school to work full time.  However, it is a call center and I am not a salesman.  Since I am not performing very well at work, I decided to switch to a less intense division of the company.  Most that work this part of the company are students working part-time.  Plus, my brain is bored.  I want a challenge.

Around this time, a friend of mine mentioned this event at the end of the semester where students can present a project of their own creation to a panel of judges who will give feedback and compare it to the other projects in a contest.  The winner gets some award and it goes in his/her resume.  This got me thinking.  This could be my chance to restart Idea.

If you look at the beginning of this blog, you will see that Idea has been floating in the back of my mind for a long time.  It was my first real project, and it went through a number of iterations before I set it on the back-burner to make way for Sever.  Sever, I thought, was a simpler, more practical project for my limited skill set and resources.  Little did I know, even Sever would grow too big for me.

I have come to realize that in order to finish anything without a full team of programmers working full-time, my projects will have to be limited to proofs of concept.  With that in mind, Idea becomes much more doable.  I no longer have to worry about the best way to store and update mass amounts of data.  I can instead keep it simple, though inefficient, so that I can focus on the project as a whole.  Besides, no one is going to be using this version seriously.  The chances that it will ever need to accommodate large amounts of data are small.  That can come later.

As with every new iteration, I have made significant changes.  If you've read my last post, you'll know that I was unsure about how to link ideas.  This time around, the answer just came to me almost as if I had always known it.  It made so much sense that I assumed it wasn't anything new.  I had already begun coding it when I stopped and realized that I had just completely changed the way things worked and had utterly solved one of my biggest dilemmas without blinking an eye.  It was exciting.

I switch to part-time in five days.  The switch is solely for the sake of Idea, so I am committed to it.  I am excited and intend to work hard on it daily.

clevceo

Thursday, May 31, 2012

Thinking About It Again

Lately, I've been thinking about picking Idea back up again. There are only two problems in the design that are holding me back. The first is how I'll store the data in memory in such a way that it can be accessed quickly. The second is how to link all the ideas together in a way that is organized and quick to alter. I should just make a rough iteration and not worry about that just yet. I think Idea has some merit and I think I should pursue it. clevceo