Josh Knutson

Pondering Life Away

More Updates

Alright so I tried moving the blogger stuff to my own server, but a lot of the widgets stop working then, and I really like them, but I have learned a heck of a lot about the blogger code and how little of it is actually important. Technically I would have kept it on my server except that I am too lazy to always update the template as the search functions would generate html files instead of cfm pages so my cfinclude statements wouldn't work, and that just ain't cool with me. Anyways Its probably better if the server doesn't get that much activity anyways, but I know plan to throw up some coldfusion examples, maybe just for me for future reference.

On a side note one of my favorite blog sites, Ajaxcold, is no longer there, looks like it has been deleted, so before the Google cache disappears I'll repost some of them on here, hopefully the Antonio Lupetti won't get mad as I think he is now working a new projects.

More Updates

Yes I realize that the site now looks really bad, but this is more of just a test, hopefully I will be able to do some cool things since I have transfered the blog over to my server, means I get to free up some space on the side and make the whole site cleaner and easier to navigate. I will be doing this tomorrow. This is more of just a test at this point.

Trip to New York

New York Pictures via Flickr




Add to my blog


Don't worry eventually I will add more to this entry

Strange Rant

People wonder sometimes why I don't get attached to material things as mush as some people4 do. Could be my religion of Joshism or it could it could be I don't have time to be somber as much as some people do. Some people block out pain, I don't, I let it wash over me and accept it as it is. Some might say that I have disillusions of grandeur but I know a little and guess the rest. I try to give my self to so many people yet when I become selfish I seem to upset so many. Maybe I would be happier to be a hermit somewhere or live a few hundred years ago. Sometimes I wake up and think of all the people that have gone through my life and smile, appreciating all of the small trivial things that make those moments so unique with those people.

Tribulations and salutations to all the people I know and those that call me friend, some might say friend is a four letter word but friends I have no matter where I go it seems as I make my rounds in this life knowing as little as I actually know still seeming to impress. Some say I speak in riddles whilst I speak plainly dwelling on lore where my heart and soul rest to each day I postulate some new means to the end with some help of my friend. To prepare for the future but look upon the past for inspiration as I seem to crawl through this life of mine. but it does tend to be a very fulfilling crawl if that is what it is

woman

Look in side always
A phrase long ago remembered
Like a person long lost in hallways
Looking for help but instead was dismembered

Asked for my heart girl
That is something I could never do
You tell me to give it a whirl
You wanting us to be two

You asked for me
I turned you down
You were on a spree
Always going around

I learned a lot from you
Yet you always wanted more
Hope you see my view
And yes you shook me to my core

Comment Delete

Just a quick fun story from Trevor Johnson that he wanted me to post. Enjoy :)

As Computer Science majors at North Dakota State University, our initial drive was to create a program utilizing Microsoftâ??s Visual C++.NET which neither of us were familiar with. We had limited experience using Visual Studio 2003; so we also took this opportunity to expand our knowledge base to encompass Visual Studio 2005. This then allowed us to build the application using the standalone features of Visual Studio .NET which allowed us to create the program, taking advantage of the .NET architecture but without using the common libraries; so that a userâ??s machine would not require the .NET 2005 Framework to be installed.

In searching for a program to create we noticed that in many code files available on the internet and distributed by various professors and other sources it is not unusual to find the number of comments outnumber the actual lines of code. This can reduce the readability of code and sometimes as much as double the file size making it tricky to store larger programs on flash drives.

We began project development by creating a command line C++ program implementing our initial algorithm for Java/C++ single line comments (//Comment) only. Using the C++ standard classes; FileWriter and FileReader, we originally made a simplistic version of a typical Find and Replace function which replaced comments with null characters. Because of the limitations of the FileReader class to navigate a text file one line at a time, we determined it lacked the dynamic abilities to remove multi-line comments (/*Comment*/) which would require a start symbol and an end symbol which could occur after any number of lines.

To resolve reliance on a starting and ending symbol we would need to navigate through the text file character by character. To accomplish this task we inevitably downgrade our technology to use fscanf to read in the text document a single character at a time. We modeled the algorithm after a Turing Machine which we had been introduced to us by John C. Martin III in Theoretical Computer Science II. The algorithm was as follows; after starting in an initial position in the text document we would progress character by character leaving each character intact until we encounter the specified start symbol at which point it would be replace by a null character or blank, this progression would then continue until closing with the end symbol.

Figure 1.
Turing Machine representation of algorithm




The Turing machine can be defined via the 7-Tuple structure; { Q, Î?, Î?, Σ, δ, q0, F } where Q = { q0, 1, 2, ha }, Î? = { Σ â?ª Î? }, δ: Q x Î? â?? Q x Î? x {L.R.S}, F = { ha }.
In our Turing machine â??xâ?? represents an arbitrary character from the ASCII character encoding standard, and the symbols α and β are defined as our staring and ending symbols as determined by the userâ??s comment selection. Since â??xâ?? is an element of Σ and â??xâ?? is already known to be a member of the ASCII character encoding standard it is obvious that Σ is as well . Finally the Î? symbol will represent any form of null character such as λ or a blank, not to be confused with a space but rather an empty character.

After we had defined our second algorithm we began working on a user interface to best optimize the recursive nature of our created methods, which we have placed in a C++ header file that they could easily be extended to any GUI. Our user interface would allow a user to select the files and then choose the comment type to be deleted from a list of; Java/C++ Comments single and multi-line, Assembly comments (;Comment), Perl comments (#Comment) and HTML comments (). This selection would define our start and end symbols. A log was added to the GUI to show how long the process took, how many comments had been deleted, and how many lines the new document contains.

It was at this point that we encountered a problem when using the C++ FILE data type which required the passing of a constant char. The use of a constant char would not allow us to dynamically select the files to be parsed. To resolve this quagmire we used pointers to create two constant chars, one for the in File and one for the out File, and then proceeded to manually add it to the system memory reserved for the constant char.


Hope You all enjoyed that as much as me, anyways the program in case you don't already have it.

Added yet another element

Finally got around to making a tag cloud on the side where it doesn't take up nearly as much space as the last label showing widget. Well if you want the code then hear it ya go for your pleasure. Cheers y'all till next time.

Older Entries Newer Entries