Saturday, January 30, 2010

Scheduler, Part 2: The Design

During the design phase of any application it’s a good idea to sit down and think about what you’re going to be doing. Jumping in head first will get you results fast, but you’ll often find that you’ve overlooked some aspect of the application and in the end it just makes for a longer and tedious process to actually finish the thing.

The class diagrams for the Scheduler were really simple and straight forward.
The Task class represents a task that we will be scheduling, the task manager contains a list of tasks that and has methods that enables it to control the addition and removal of tasks and the logic to decide which task should be executed next.



The applications Form class is where all the event handlers are taken care of (events are triggered such as clicking on a button). Its good practice to brake your applications logic down into formal steps, in the Scheduler for instance you have to click on the New Task button before the text box below it becomes enabled so that you may enter a name for that task. This makes for more intuitive applications that are more user friendly and have a lower learning curve, an applications interface should always “make sense”.

Keeping control of your programs states and the flow of control is often a tedious task and makes for mindless zombie coding, but once done it really adds to the feel and robustness of the software.

State management and application flow also gives a programmer the opportunity to insure that all the data that is needed for the next step is present, type checking should also be done while controlling program flow.
In my next post Part 3, I’ll go over some code snippets and add a link to the source code and compiled application.

Thursday, January 28, 2010

Scheduler, Part 1: The overview


So I've been coding like a daemon ;) and I've just about finished this little scheduler application.
While I could have done it allot faster and simpler, this version of the application is a bit more robust. In other words if the average Joe was to use it, they shouldn't be able to break it.


It's still a fairly simple program though, its primary task is to take applications you give it, couple them with a date and a time and then once that date/time is reached it executes the given application.

I initially started writing this so that I could execute my Age of Conan updater after 01:00 in the morning, since its updates were HUGE and the cost of my bandwidth comes done between 01:00 and 08:00 in the morning. Yes I am aware that windows have a native scheduler, but that damned thing kept crashing AoC on start-up and I didn't feel like installing a 3rd party program so I wrote one myself.

In any case, Part 2 will illustrate the design of this application and how it works.
Part 3 will the run through some code snippets and just show how everything fits together.

Hope someone can make use of this, Part 3 will also include a link from where the application may be downloaded.

Wednesday, January 27, 2010

Vacation, degree and no more lies!

Wow, I've really been bad at giving attention to this blog, so this time I’m not going to make that hollow promise of future attendance but rather just say; it will be updated when it’s updated.

Since my last post there have been a few, big developments:

  • For starters I have a degree, it’s a BSc in computer science and information systems :D :D
  • I've also been excepted into computer science honours at Rhodes university, yay!
  • And I turned 23.

So my 2 month vacation is about to end with university starting again on the 1st of February, during the last two months I had played a ridicules amount of computer games, done some mediocre coding (in XNA) and finished my first website (for which I received payment).


The website was allot of fun, I worked with a close friend on it. We used a php framework he had written (I like to think I influenced some of it) and had a great time working on it. As soon as I see him again I’ll ask his permission and see if I can share the framework on here.


I'm busy working on a light weight scheduling application again, since microsoft vista chooses to crash instead of execute on demand... The application is coming along nicely but after spending some time on it I realised it could serve as a nice tutorial on how to work with the Time object in C#, file dialogs, polymorphism, encapsulation and UML diagrams. Since I've so far failed at putting up a light tutorial (or of any flavour that is) I'll try and get one up, hazaaa!


So this year I get to do one massive and awesome project in honours (along with my chosen modules) and I’m so keen to start and get into it. Oh and this isen’t another hollow promise, when I’ve selected/accepted for the project I’ll post more details on it. Until then though, peace and code for change. (however you wish to interpret that!)