<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Charles Solar &#187; computer science</title>
	<atom:link href="http://charlessolar.com/post/tag/computer-science/feed" rel="self" type="application/rss+xml" />
	<link>http://charlessolar.com</link>
	<description></description>
	<lastBuildDate>Fri, 29 Apr 2011 04:38:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ubuntu and the Future of Linux</title>
		<link>http://charlessolar.com/post/95</link>
		<comments>http://charlessolar.com/post/95#comments</comments>
		<pubDate>Tue, 16 Dec 2008 03:37:35 +0000</pubDate>
		<dc:creator>Charles Solar</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.mrlwork.com/?p=95</guid>
		<description><![CDATA[Contrary to the many many posts about &#8217;10 reasons why ubuntu is the next #1 consumer desktop&#8217; or &#8216;Switching from windows to ubuntu&#8217; this post is about my experience with ubuntu and why as of this moment I am reinstalling windows vista. First off let me say that I use debain as the main operating [...]]]></description>
			<content:encoded><![CDATA[<p>Contrary to the many many posts about &#8217;10 reasons why ubuntu is the next #1 consumer desktop&#8217; or &#8216;Switching from windows to ubuntu&#8217; this post is about my experience with ubuntu and why as of this moment I am reinstalling windows vista.</p>
<p><span id="more-95"></span>First off let me say that I use debain as the main operating system for ALL my servers.  My asterisk, data, and web servers all run debian and I love the stability and flexibility that comes with debian and apt.  I have spent at least 4 years working with debian casually and through all the problems, ideas, and solutions that are typical in my line of work have presented me plenty of opportunities to exercise and expand my knowledge of linux.</p>
<p>It was just over a year ago that I tried moving to a linux environment on my laptop.  Since my laptop was custom built all the parts worked well with ubuntu and I had very little configuration troubles.  Unfortunately after a couple months I encountered problems caused by my tinkering that made me have to reformat.  I believe at the time I was trying to get Compiz or Beryl to work with my ATI card, something I think caused a lot of people some hair.  At the time I decided to reinstall Windows XP because I could no longer justify the inconvenience of playing around with linux when I could not make it do what I wanted.  This I will admit was because at the time I had very little experience with linux desktops, and my number one gripe was network configuration, which does not seem to have improved but more on that later.</p>
<p>This is a post about why I believe linux is not ready, nor should it try to compete in the PC desktop market.  Linux is an excellent server environment make no mistake, I would choose linux over Windows Server any day of the week.  I find the code for critical applications to be very well maintained, optimized, and in general very clean.  On the other hand, I find the code for desktop environments and &#8216;configuration GUIs&#8217; to be a joke and buggiest pieces of software I have had the misfortune to work with.</p>
<p>For further reference, 4 days ago I decided to reformat my Vista desktop to Kubuntu, an operating system I had worked with in vm&#8217;s and had pleasant experiences with.  I chose to leave Vista because of a bug with USB hand off to my virtual machines, which is a crucial element of programming a Nokia 810.  This inconvenience was the last straw for me and I made the decision to reformat to an operating system I felt would work better for control freaks like myself.</p>
<p>My first impressions of kubuntu, was the very excessive amount of useless garbage programs sitting in my application menu.  My second problem was with the desktop widget system which would seem like a good idea but is executed very poorly and is not very user friendly to say the least.  After removing as many of the useless programs I could and installing some other better programs I opened firefox and was greeted by the ugliest looking interface I have ever seen.  I will admit, I have never been a fan of the GTK interface.  Even on windows I found the layouts and graphics to be messy, unappealing, and bland.  So when I came to realization that my entire desktop would look this way I was a little put off right off the bat.</p>
<p>However I was determined to give this a chance since indeed I needed to be able to program my new Nokia 810 and linux was the only solution.  I visited the Ubuntu forums, a place which actually deserves the praise it gets, and found various things to do &#8216;Right after installing ubuntu.&#8217;</p>
<p>I installed more programs, added sources for my media and graphics, updated openoffice, speed tweaked the file system and boot process, and was fairly happy with the end result.  Firefox looked half decent, my programs had neat little effects like wiggle, darken, etc, and most of all it was running on par with my windows system.  So I began to seriously exercise the system and bring it up to my standards.  I installed dmraid to manage my nvidia raid array, I got my other disks provisioned in fstab for automatic mounting, configured all my programs to work exactly as I wanted them to, and in general personalized the system to my liking.</p>
<p>It was during this time that I started to notice the little problems and glitches.  Firstly, I was not happy to see that the network manager was still the worst configuration app in the entire system.  I ended up uninstalling it and setting a static ip in network/interfaces.  Then came the problem of getting my dual monitors to work, and in turn, get nvidia drivers installed.  The automatic &#8216;Install restricted drivers&#8217; wizard failed to produce any results, so I turned once again to the ubuntu forums and a script called <a href="http://www.albertomilone.com/nvidia_scripts1.html" target="_blank">Envy</a> which did the job very well.  Configuring TwinView was then just a simply xorg.conf edit.</p>
<p>This brings me to point number one.</p>
<p><strong>Linux is not ready because to much configuration is left to the command line</strong></p>
<p>The gui configuration utilities simply do not work.  Those that do work have limited functionality and you end up configuring it yourself in the command line.  When was the last time you saw a standard user open ms dos to configure his network settings?</p>
<p>So as I finished configuring various systems and building the system as I saw fit I decided to try to actually use the os.  Opening firefox still left me with flash backs from 10 years ago, but it worked fine, so all was good.  I then downloaded and installed pidgin, as I could not live without a constant line to any of the people on my buddy list and was once again greeted with those flashy windows 95 graphics.  At this point I was getting pretty frustrated.  Sure, my windows swayed, they faded, I could alt-tab like a pro but my applications looked like they were resurrected from my old DOS laptop.  Something had to be done, so I immediately went online searching for solutions.</p>
<p>I found that you have the option to install custom themes for things like text layouts, colors, window styles, etc.  Something that I have never really used on Windows but I went ahead and dived into the top rated everything to bring my operating system into the year 2008.  I found that these layouts helped a little bit, but the real problem, boxy art, out of date pictures, remained.  It was at this point that I decided to look for different GTK themes and customizations, hoping to fix the problem at the source.  However I soon found out that GTK artwork is non-existent, very hidden, or just not possible.  Tell me what is the point of a centralized graphics framework when you cannot change themes?  This definitely deserves a check-minus in my book, and introduces point number two.</p>
<p><strong>Linux is not ready because the system looks like crap</strong></p>
<p>While the underlying framework and core operating code is fantastic, the GUI&#8217;s and desktops need work.  KDE4 from my understanding is an attempt to mimic some of Vista&#8217;s features and has been touted as the better desktop.  I could not disagree more.  The system was buggy, slow, and definitely not user friendly at all.  As a side note, in the little time I spent analyzing and poking at KDE4 I could never figure out why we needed a separate desktop &#8216;Widget&#8217; to display files that are in the desktop folder.  The widgets sit on the desktop, but the widgets display the desktop files&#8230;</p>
<p>As an additional side note I have only had the pleasure of using Gnome, KDE and a splash of X during my brief forays into the linux desktop world, if there is a better desktop out there please feel free to post.</p>
<p>At this point I was pretty frustrated with the whole mess so I went to sleep and decided to work on it more in the morning.</p>
<p>After a good night sleep I was back on my computer and ready to tackle the operating system once more and amidst the endless forum searches, configuration tweaks, Dolphin crashes, I realized something.  This something is my third and final point and probably the one that will get the most flames.</p>
<p><strong>Linux is not ready because linux does not work for the user, the user works for linux</strong></p>
<p>Let me explain what I mean.  While I was wondering around the settings screens (the few that there are) I found myself continually frustrated at the limit of what I could change, configure, optimize, or just in general, &#8216;do.&#8217;  Linux is very much a arrogant bastard who would much rather give you a new world and say have fun then give you the tools to operate in its world.  When using windows, all the tools you need to change the system are given to you, right out of the box.  If you want to do something incredibly difficult, like add a 3d desktop or program your own file explorer, you are pretty screwed, but for most situations windows gives you the tools to handle the problem yourself in its world, not your own.  Linux on the other hand, even though its open source, is ruled by obscurity.  There is no consistency between the network configuration and the display configuration.  There is no intermingling of different programs, as was painfully pointed out to me when I tried to burn an iso image from a windows machine across the network.  All and all, linux is very introverted and unlikeable.  Now I must make a small note here, the ubuntu community needs to be given a handshake for their excellent effort on compiling useful guides and providing help to any strangers who grace their doorstep.  Unfortunately, all the smiles and friendly hand shakes do not detract from the serious design flaws inherent in any operating system in the hands of anyone who uses it.  And even though I hate to say this, I much prefer my operating system built by a money corporation where strict testing, quality assurance, and optimizations are kept at the forefront, not for the customers, but to make themselves competitive with other corporations.  On that note I would like to say that I might actually prefer to try a Mac OS next time I feel pined down by the Microsoft money machine.</p>
<p>So there in lies linux&#8217;s biggest problem.  It is not competing.  Not that it does not want to, it just can&#8217;t.  It can not compete with the multimillion dollar budgets of Apple and Microsoft dev teams, and it certainly cannot get any decent project management system in order to organize the thousands of varying and unique programs built for it since release. <strong>But this is OKAY</strong>.</p>
<p>Its OK that linux can not compete, its OK that the programs are different.  What is not ok is trying to convince people to install linux on a desktop or laptop pc where hardware is never consistent, drivers are always needed, and just getting the thing to recognize and deal with the thousands of different environments is itself a full time job.  No this is not where linux&#8217;s strength truly lies.  To find where the future of linux lies I took a look back at the device that started all of this.  The small, sexy, and very much in control Nokia 810.  This little device is run by a special operating system built off of debian called Maemo.  You will find no better example of synchronous design and program execution then here.  Why?  Because its not a pc, its not a computer that needs a new video card every two years, it does not need to know about any other devices outside of its own perfect little world.  <strong>That</strong> is what makes it the best version of linux I have used.  The system is still open, but users do not have to draw cards to tell whether they will spend 5 hours getting running or 5 days.  With this increase in freedom comes standardized programs and configuration GUIs, systems that actually WORK.  The Nokia works so flawlessly that it inspired me to first install Kubuntu, then write this article because I feel that the future of linux does not lie with the desktop pc, but with these small devices.  These devices, that have a set of unchanging hardware, guarantee that no network manager will crash when detecting your Broadcom modem model number x15220 from 1997.  It guarantees that when you run network configuration your settings will take effect on your true device, instead of usb0 or visa versa.  I am currently reinstalling Windows Vista on my computer and with that I will reinstall VMWare and find a solution to my original bug so I can setup the maemo sdk and start programming applications for this device.  Yet in order to do this I am ditching my linux desktop solely because I just could not stand it compared to Vista.  Vista is by no means perfect, and in some ways it can make me just as frustrated as Kubuntu did, but I can accomplish a hell of a lot more in a windows operating system at this time.</p>
<p>Maybe this will change, maybe there is some other desktop environment that people like me use and I am unaware of it.  Certainly if you the reader have any suggestions I would welcome them and maybe even consider reformating again to try them, but at this moment I stand by what I have said in this article and hope that those who read it can offer constructive feedback, good or bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://charlessolar.com/post/95/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Projects Online and Open Source</title>
		<link>http://charlessolar.com/post/24</link>
		<comments>http://charlessolar.com/post/24#comments</comments>
		<pubDate>Fri, 11 Jul 2008 05:31:04 +0000</pubDate>
		<dc:creator>Charles Solar</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bafprp]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.mrlwork.com/?p=24</guid>
		<description><![CDATA[I finally got around to setting up svn for my project. Thanks in part to some new tools I recently came across the transition was fairly painless and after about 2 hours of cleaning up my old project and trimming the fat I uploaded what I will be working on to http://code.google.com/p/anaa/ I also created [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got around to setting up svn for my project.  Thanks in part to some new tools I recently came across the transition was fairly painless and after about 2 hours of cleaning up my old project and trimming the fat I uploaded what I will be working on to <a href="http://code.google.com/p/anaa/" target="_blank">http://code.google.com/p/anaa/</a></p>
<p>I also created a second project of a more work related function.  This project deals with reading and parsing Bellcore BAF files created by various soft switches in use around the world.  These records contain call records in a highly coded and formated to Telcordia specifications in their GR-1100 document.  This document is not very cheap to come by so I have started work on improving one of the best free parser&#8217;s available today, <a href="http://www.xach.com/misc/bafview/" target="_blank">bafview</a>.  You can find this project here <a href="http://code.google.com/p/bafprp/" target="_blank">http://code.google.com/p/bafprp/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://charlessolar.com/post/24/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Driven Apps!</title>
		<link>http://charlessolar.com/post/20</link>
		<comments>http://charlessolar.com/post/20#comments</comments>
		<pubDate>Mon, 17 Mar 2008 18:29:49 +0000</pubDate>
		<dc:creator>Charles Solar</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[factory]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://www.mrlwork.com/?p=20</guid>
		<description><![CDATA[Ok ok, I am writing again! If you read my previous posts on dynamic npc actions then this is an update on my progress. If you have not, this is about how to create good file formats for your applications. As some might have expected this project is taking more time then expected, partially because [...]]]></description>
			<content:encoded><![CDATA[<p>Ok ok, I am writing again!  If you read my previous posts on dynamic npc actions then this is an update on my progress.  If you have not, this is about how to create good file formats for your applications.</p>
<p>As some might have expected this project is taking more time then expected, partially because I am currently downing bosses in WoW, and partially because its very hard.  So lets just cover what has been going on since my last post.</p>
<p>I spent a lot of time thinking of the best structure for my idea in terms of objects and file formats.  I do not know if I covered this before because I am to lazy to view my past posts so heres a recap of the basic composition of what I have been calling a &#8216;Puppet.&#8217;  A puppet is a game object with x number of movable joints.  These joints are built in a tree structure and move based on messages passed to his parent.  These messages are generated from a actor class who learns actions and movements as I previously discussed.  When I was designing the puppet class I hit a big fat road block.  I wanted the ability for a puppet to be independent of his underlying joint structure.  That way I could have a puppet control everything from a human to grass.  So you might think, &#8216;No problem, do some tricky interface work and have derived classes for each type of puppet.&#8217;  WRONG!</p>
<p>See I myself have read many articles about component game object design, and I do believe I wrote an article on this in the past.   However do not get the wrong idea, what I did is not EXACTLY component objects, but kind of close.  Because when I thought about components I also thought how to best describe them in a file format.  And after thinking about that I decided that I wanted a global file format to describe not only each type of puppet but the entire world.  And that the entire game will be built out of components in a tree structure built at load time from this file format.  I am getting a bit ahead of myself here so lets get some examples here.</p>
<blockquote><p> &lt;world&gt;<br />
&lt;name type=string&gt;Main&lt;/name&gt;<br />
&lt;description type=string&gt;<br />
Big world for which to run tests in<br />
&lt;/description&gt;<br />
&lt;floor type=plane&gt;<br />
&lt;p1 type=vector&gt;-1000 -1000 -1000&lt;/p1&gt;<br />
&lt;p2 type=vector&gt;1000 1000 1000&lt;/p2&gt;<br />
&lt;material&gt;dirt01.mat&lt;/material&gt;<br />
&lt;/floor&gt;<br />
&lt;joint&gt;<br />
&lt;position type=vector&gt;0 0 0&lt;/position&gt;<br />
&lt;orientation type=vector&gt;0 0 0&lt;/orientation&gt;<br />
&lt;puppet&gt;arm.puppet&lt;/puppet&gt;<br />
&lt;/joint&gt;<br />
&lt;/world&gt;</p></blockquote>
<p>This is my toy world I am working in.  The file format is xml and I use tinyXML to load and parse these files.  For those familiar with ogre, I made a resource of type XMLFile to load these.  Now here comes the clincher, this XMLFile resource will load every type of game object I desire, regardless of type or purpose.  Not only that, but I only added 2 methods to the class.</p>
<p>So let me explain a bit about these methods, they are named &#8216;build&#8217; and they are called usually immediately after loading the file.  Basically what they do is look at an element in the xml, find a builder for it, have the builder build it, and attach the new object to the world tree.  In this example, the world has no parent and all elements inside the world tags are children of the world.  I use the type descriptors so that I would not have to write many classes that do the exact same thing.  Elements that load another file, like the puppet tags, will load that file in their own world and all objects created from that are children of the puppet.  After the build the main program is not aware of any object other then the world.  Messages are passed to the world when need be, however most thought processing is done in the world object, not by the game engine.</p>
<p>Lets get an example puppet up here:</p>
<blockquote><p> &lt;puppet&gt;<br />
&lt;name type=string&gt;arm&lt;/name&gt;<br />
&lt;description type=string&gt;<br />
Generic arm<br />
&lt;/description&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;shoulder&lt;/name&gt;<br />
&lt;gib&gt;upperarm.gib&lt;/gib&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;elbow&lt;/name&gt;<br />
&lt;gib&gt;forearm.gib&lt;/gib&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;wrist&lt;/name&gt;<br />
&lt;gib&gt;hand.gib&lt;/gib&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;pinky&lt;/name&gt;<br />
&lt;gib&gt;pinky.gib&lt;/gib&gt;<br />
&lt;/joint&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;ring&lt;/name&gt;<br />
&lt;gib&gt;ring.gib&lt;/gib&gt;<br />
&lt;/joint&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;middle&lt;/name&gt;<br />
&lt;gib&gt;middle.gib&lt;/gib&gt;<br />
&lt;/joint&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;index&lt;/name&gt;<br />
&lt;gib&gt;index.gib&lt;/gib&gt;<br />
&lt;/joint&gt;<br />
&lt;joint&gt;<br />
&lt;name type=string&gt;thumb&lt;/name&gt;<br />
&lt;gib&gt;thumb.gib&lt;/gib&gt;<br />
&lt;/joint&gt;<br />
&lt;/joint&gt;<br />
&lt;/joint&gt;<br />
&lt;/joint&gt;<br />
&lt;/puppet&gt;</p></blockquote>
<p>As you can see this file format is very flexible, the same structure that built the world can build a puppet and also a gib:</p>
<blockquote><p> &lt;gib&gt;<br />
&lt;name type=string&gt;forearm&lt;/name&gt;<br />
&lt;notes type=string&gt;<br />
Fore arm gib<br />
&lt;/notes&gt;<br />
&lt;mesh&gt;forearm.mesh&lt;/mesh&gt;<br />
&lt;input&gt;<br />
&lt;name type=string&gt;shoulder&lt;/name&gt;<br />
&lt;position type=vector&gt;0 0 0&lt;/position&gt;<br />
&lt;/input&gt;<br />
&lt;output&gt;<br />
&lt;name type=string&gt;elbow&lt;/name&gt;<br />
&lt;position type=vector&gt;7 0 0&lt;/position&gt;<br />
&lt;/output&gt;<br />
&lt;/gib&gt;</p></blockquote>
<p>I want to clarify one thing before I go on.  Elements called position or orientation, these attributes are not given any attention by the builders.  Instead those objects simply exist on the tree for someone else to read them and make the correct adjustments.  For example, the puppet&#8217;s name element simply sits as an element on the tree until a debugger opens and the entire tree structure is displayed.  At that time the debugger will go through each element and find name tags that it will use to give more information on the node.  And the description works the same way.</p>
<p>They are both created by the string builder, as denoted by the &#8216;type=string&#8217; attribute I give them.  The value is assigned and the name of the new object is set, but the type is always a string.</p>
<p>So what exactly is required to declare a new type of object?  Just a builder and an actual object.  Take this example of the string object.</p>
<blockquote><p> class ScktString : public ISocketable<br />
{<br />
friend class StringBuilder;<br />
public:<br />
void setValue( std::string val ) { _string = val; }<br />
std::string getString() { return _string; }<br />
private:<br />
ScktString( std::string propName ) : ISocketable( propName ) {}</p>
<p>std::string _string;<br />
};</p>
<p>class StringBuilder : public IBuilder<br />
{<br />
public:<br />
StringBuilder() : IBuilder() {}<br />
Socket* build( std::string element, Socket* parent );<br />
const std::string&amp; getType() const;<br />
static std::string BUILDER_TYPE_NAME;<br />
private:<br />
static const StringBuilder registerThis;<br />
};</p></blockquote>
<p>As you can see its relatively easy to create a new object.  Lets start at the builder, when the xmlfile is building it will search for a builder based on its type name, which is assigned by you.  A builder list is created at the start of the program, as each builder has a static &#8216;registerThis&#8217; variable that adds it to the builder list.  Those familar with static factories should be familiar with this.  The builder&#8217;s build method gets called with the name of the element and its parent&#8217;s socket.  A socket is an object that accepts links from children.  The builder then builds the object passing its name.  The sockable base class is for objects that can be socketed or linked with a parent.</p>
<p>So the string object is created and the string builder passes back the parent object.  This is done in case the new object has a socket himself.  In that case he would pass back his socket and the builder would build his children and attach them to him.  In string&#8217;s case however, there is no socket and a little while later the builder assigns the string object a value by calling the setValue method in the parent object with the objects name and value as parameters.</p>
<p>After all the work we are left with one tree that contains all objects in the game.  Kind of like a scene manager, but for ALL objects, not just renderable ones.  And oh, don&#8217;t forget that the entire tree was created by one instance of XMLFile.  As programmers we should always strive to achieve the cleanest and most powerful format we can muster.  This format is not only really easy to implement, but also holds unlimited power.  You want to load a texture?  Create a texture socketable object, and implement file specific loading inside it.  You want to script AI?  Either create an AI socketable object that reads children objects that decribe a strategy, or create a python socketable object that will load your ai scripts and parse them.  In this way our file format can act a proxy for another format or as the direct format.  The most important thing however is that none of our in game objects need to give file formats a single thought.</p>
]]></content:encoded>
			<wfw:commentRss>http://charlessolar.com/post/20/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

