Wednesday, March 21, 2007

Framework Progress and New WM

First, just a quick post on the progress I made with the framework I've been working on. It turned into an interesting exercise in evolution. To start, the index.php page that is used was procedural in nature, but instantiated objects for each page. Nice and easy. Well, I figured I'd try to make the framework a bit cleaner for the developers, so I figured I could use inheritance, so I created a small class with a couple helper functions that the page classes would extend. Well, it worked, but I made a small goof where I goofed the path to the page classes. So, since the variable I needed was outside of the scope of the class, I ended up wrapping all of the code up into the class. So, where I started out with procedural code and ended up with a Object-oriented setup.

Second, I'm trying out Ion as my windows manager on my Linux laptop. So far, I'm liking it. It seems to be very fast and doesn't require me to use the mouse much. Very nice. I've been an Enlightenment fan for quite some time, but I think I may enjoy using this one more.

Tuesday, March 13, 2007

Well, since I off-loaded the associative database, I managed to get more work done on another project of mine. Because of the dynamic nature of a project I worked on, and the fact I absolutely hated working with Fusebox, I created a something akin to a framework for PHP. I had three goals in mind when I created it:

  1. Easy to add additional pages in a minimal amount of time.

  2. Low processing overhead.

  3. Don't force the user into a method of development they don't want to use.

To elaborate a bit, to make it easy to add more pages I took advantage of the ability to load classes dynamically. This way I can simply create a new page without having to modify any other files and all I have to do to use it is link to it. Also, the main file, index.php, is very minimal in terms of functionality, so it's very light-weight compared to other.

As for not forcing the user into a method of development, I kind-of lied. I do force you to organize your pages into subdirectories, but outside of that, there's not much that I force you to do. I do have my own way of doing things, but you don't necessarily have to do it the same way. I find that I prefer to build the structure of the HTML first and then insert the content into it. String replace works nice for this. I find that if I get the document structure down first, then I can more easily get a good HTML doc built.

Well, that's all for tonight.

Friday, March 09, 2007

Associative Database...done?

Well, I decided to stop working on the associative database. I simply don't have the time to give it the proper attention that it needs to go forward, so I put it out into the world on Perlmonks.org. Here's a link for those who are interested: Associative Database

Monday, March 05, 2007

Things software engineers should learn...

Every once in a while I think of what I know now and what I learned in college and every once in a while I see some discrepancies.

Here are some things that I thought of that I think should be taught as part of a CS course.

  1. Version Control. I don't care what tool is used, just to learn and understand the concepts I think would be valuable.

  2. Basic software engineering. Things like project plans, requirements, design, life cycle models. I'm not looking at anything too in depth. Just enough to give them an understanding of what's going on.

  3. Vi/Vim. I know that there are a lot of people will probably balk at this, however it's a very useful tool and it is one of the few editors/IDE's that exists by default on many different platforms. Even if the students can't use it very well, it's good to at least be able to changes to a file.

  4. Scripting vs. compiled languages. How are they different? When are the best used? How can they be combined? I've personally come to like scripting languages a lot, however I do understand where they're not the best tool for the job.


That's all I have for now. I'm sure I'm short a few things, but I just can't think of what they are right now.

Sunday, March 04, 2007

Long time, no post...but progress...

Sorry for the lack of posts, but I've been busy with school and what not. Anyway, I do have some good news: I think have a tool to create source code documentation. Yes, I know there are others, however I think most are based on Javadoc which I never liked. Granted, I think this is more because people don't know how to document their code.

Anyway, the big difference between what I produced and similar tools I've seen is that what I created exports to LaTeX instead of HTML. The nice part about this is that the documentation can then be exported to several different formats. For example, converting it to HTML allows you to publish it on the web while converting it to PDF makes it easily printable.

I came up with this after learning LaTeX at work to document an API that I am working on at work. It was fantastic to be able to create good documentation that others could use without having to switch programs to create it. With gVim, I split the window vertically and as I finished parts of the API, I documented it. Unfortunately it's a manual process, so I decided to take advantage of LaTeX while automating the process.

The syntax is a bit different from Javadoc. First, I denote blocks of text to be processed with triple brackets. This was done so that only text within these blocks would be processed and nothing else. This can be useful if sections of code are commented out and you don't want them documented or you may have embedded text that's similar to the syntax I used for the documentation options. As for the documentation options, I based them off the LaTeX syntax. This made sense to me because I can define one or more elements for each option. For example, a function description has one element: the description. On the other hand, for function parameters, you could want the name, type, and description of the parameter.

To conclude, I'll probably start using it myself, but if I get a chance, I may put in on sourceforge.net so that others can use it.