The Team Grows

26 01 2008

As of yesterday, another programmer has joined the Fizzure project. This makes me very happy but at the same time, a little worried.

I am very happy about having another programmer to help me on this project for a bunch of reasons. It gives me someone to help me out when I am stuck on a bug. Someone to bounce my ideas off of and see what they think. Someone to do another portion of the programming. It is a huge help in a lot of ways.

However, at the same time, I am a little worried. I’ve never really worked with someone in a team on a large project before. I have to figure out the best way to keep code and things organized well between both people.

I am thinking of using Mercurial to help manage the code.  Luckily, the project is easily split into 2 quite separate parts – the Server and the Client. I will be working on the server, and the other programmer will be working on the client. Both of us wanted to almost start over from a code perspective because what I had written was pretty messy. I think it was quite a good idea. I’ve looked at his basic re-design of the client, and it looks pretty good. We are hoping to implement a skinning system for the client so people can make the program look according to their own likes.

I was not happy with the way the server was organized before so I decided to completely redo the structure. The server is going to be a distributed system so that it will be handled by several computers instead of just overloading one. I’m trying to make it an easily scalable and efficient distributed system. We’ll see how it turns out.

I haven’t spent too much time working with the new addition to the team, but the time we have spent has been great. We discuss the best way to do the current thing that we are working on instead of just going right to the first idea that pops into our heads. This, in the end, I think will cause a much more efficient and well organized program. We’ll see how everything turns out.





Thoughts About Distributed Computing

20 01 2008

For me, distributed and parallel computing is one of the most interesting areas in computer science that I have found so far. I would really love to do work/research with it.

Distributed and Parallel Computing, at least from how I see it, seems to be the future of computers and processing power. Processors are starting to reach towards their physical limitations. So instead of making one processor even better, why not just use several, or even hundreds.

Slowly, I’m putting together my spare parts that I have at home into more computers to use. I got two more working in the last 2 days, both of which are semi decent machines. The main thing that I want to do with them is to try to make some of my own distributed applications that will be able to spread its processes out over several computers. Right now I have 3 computers that I want to use in my distributed system, the most powerful of which will be the main computer that is in charge of assigning the tasks. the other two, which are not as powerful, but still can handle plenty, will be sent instructions that will be processed and then they will send results back to the main server.

Now seeing as the 2 secondary nodes that will be in the system do not have the same specs, I have to make sure the server pays attention to the % of their resources that are being used when it goes to assign instructions. If the slower computer has been assigned less, but is using more of its resources, the next task that needs to be processed will be sent to the other computer.

Currently both of my secondary nodes are running Windows XP. This is fine I guess, but it seems like a large waste of system resources to have to run full windows. Though I realize that there is no way in hell that I can actually do this, I would love to write my own very basic OS just to handle being a secondary node in a distributed system. A node that when it turns on, simply connects to the central server, waits for its tasks, and then executes and sends back reports. No need for hogging resources with a gui or anything. All that is particularly necessary is enough to execute instructions and send/receive data over the network. But, when you actually think about it, that would take a very long time for me to figure out how to do. I don’t know the first thing about where an operating system starts really. Maybe I could use a linux kernel and just build off of that and get rid of things that aren’t really needed. I need to do a lot of research on this one.

This seems like it has the opportunity to be extremely efficient. Just a lightweight OS meant solely for being a secondary machine in a distributed  system would be so much faster than running anything i could create as a windows application. Unfortunately, I don’t know where to begin. Maybe I will set this one aside as a very long term project, slowly do research on it, and spend the bulk of my time on other projects are already have going like Fizzure. Haven’t worked on that one in a few days. Need to get back to it. I’ve been doing some little practice applications with sending and receiving data with the TcpClient and TcpListener class in C#. Now that I think I have a much better handle on how those work, it should be much easier to get over the hurdle I was stuck on with Fizzure.

Another goal I have is to make the Fizzure central server able to be split into nodes. Have different sections of all the XML data to be searched stored on different nodes. when a query comes in, the server sends a request to each node, each node searches the part of the data that it has stored and returns its results to the server, which than returns all of the results to the client. This seems more efficient than just having it all done by one computer, though because of network bandwidth, I don’t quite know if it would be in actuality.





I Own The Windows Registry

11 01 2008

As of last night, I officially own the windows registry. JK. But I did figure out how to store and retrieve information from it with C#. Makes the development of Fizzure much easier. Before I was just going to use XML to store everything. But I was like,

 Hrm, Why not just use the Registry. It would be so much easier…

And as it turns out. It is haha. I’m not sure how much info I will actually store in there, but right now it just stores your Username and Password. I need to figure out how to store the password in, well, not plain text… If anyone knows  how to do that, please let me know :]





w00t – Great Success

9 01 2008

I know for most professional programmers and really anyone else in general it isn’t much of an accomplishment, but for me this is – I got the basic TCP connection working between the Fizzure client and server.

The server is just a lightweight console application. So far all it really does is accept connections. But for now I guess thats good enough. Today, I need to work on the XML usage of both the client and the server, and then the interaction with XML between the two. For efficiency I think I will do a lot of caching data. But I guess I need to figure out how to do that as well. I’m going to have to do a little more planning and deciding before I do too much programming.

Also though, I need to work on the GUI for the client.  I’m thinking about making it kind of skinnable. Or at least it will have different like color themes you can choose from. But eventually, I want it to be skinnable. People do seem to like that, it makes you feel like your program is just that much more personalizable.





Great News For me – Less Work!

7 01 2008

Despite last nights extreme anger over the fact that I thought I was going to redo the structure of my Fizzure application, I learned today that I most likely do not! And this simple fact makes me very happy. There is almost nothing I hate more than having to redo work.

I came into school this morning with some of my code in hand and went straight to my computer science room. My teacher (the ever brilliant Dianne Meskauskas) took a quick look at my code. As it turns out I had just made a small mistake of where I had placed the creation of one of my objects.

The error I kept getting was a NullObjectException when I tried to access an array. I had made the creation of the object inside of a timer, so each time the timer ticked, it was creating a new object. On the first time it ticks, it creates the object “o” of the OptionControl class and fills the array SharedDirectories. On the second tick, it recreates “o” and tries to access the now empty array SharedDirectories, thus giving me the NullObjectException

Here is the little code snippet :

private void timer1_Tick(object sender, EventArgs e) {
OptionControl o = new OptionControl();
if (count == 0) {
loadWhat.Text = "Finding Shared Directories...";
o.SharedDirectories = o.getSharedDirs();
} else if (count == 1) {
loadWhat.Text = "Scanning Directories...";
o.DoScan();
} else if (count == 2) {
loadWhat.Text = "Shared Directories Found!";
} else {
Dispose(false);
}
count += 1;
}

My mistake here is on the first line. This line needs to be taken out of there and made as a class variable instead of inside a method, that way it can be accessed from any of the methods and have the same data as well.





This Is What Happens When You Don’t Plan Your Projects!

6 01 2008

Man, I am going to be completely honest with you.

I am very angry right now.

With my new project, Fizzure, I did what I always seem to do. I jumped into it. I got the idea a while ago and spent a week or so organizing some of my thoughts in my head. But that is the only place I organized them, and that was my mistake.

Once again, I got screwed over by not writing things down. I was up until about 4 A.M. last night working on this project (just because I could be) and I got stuck on an error. Which at 4 A.M, Isn’t all that unusual. But even today I couldn’t figure it out. Of course after wasting most of today on this error as well, I realized it was because almost my entire project was structured wrong and would not ever work if I continued programming the way I was.

So just like what normally happens. I have to delete a large amount of work, and almost start over. I’m sure you would be angry too! But, alas, I have no one to blame but myself. It is because I was too stubborn and lazy to write things down! But on the upside, it gives me something to do during my boring classes tomorrow. *laughs maniacally*

So a lesson I learned today about programming was to always write out some organizational thoughts about your project on paper before you start actually programming.

On the upside of things, I did figure out some useful things last night while I was working, like how to read and write XML as well as a small amount of file and directory handling – among other things. I believe I really just need to copy and paste a large amount of my code into different places. We’ll see.