http://www.bloglines.com/topblogs
Concise Coding
A website devoted to computer programming.
Tuesday, January 20, 2009
Saturday, March 10, 2007
Blog spam
Sigh.. I've beem spammed!!
I'm working on cleaning up the spam in my blog. Also, i've been really busy this past year. But i will come back and update this blog soon!
Saturday, January 14, 2006
Tip #4: Systems Analysis and Design
The initial design of a system can make or break your business.
I am currently in the middle of developing an online textbook/classified system to be used by university and college students. Click here see a basic sample page.
Taking the RAD (Rapid Application development) approach to design, I set out certain milestones that i wanted to meet on a timely manor.
1.Setting up a log In system.
2.Setting up an add book / search book system
3.Creating some other features
4.Scale the system for use locally, provincially, nationally
Unfortunatly, what started out as a small system has cascaded into a large scale project taking more time then I had originally thought and pushing back milestones.
>
Where did I go wrong?
What I wanted from the system, and what I was designing were totally two different things. I wanted a perfect system where every section came together and worked and didn't interfere with other systems. I was designing the system not as a whole but in parts forgetting about the interaction between the parts.
I've learned alot developing this system and would like to share with you the most important tip!
TIP 1: Analysis, Analysis, ANALYSIS!
Sit down and thouroughly analysis your system.
Brainstorm all the non-functional requirements (System expectations, features you wish to implement, but nothing about the design or the technical aspects).
Once you have tabulated a list that you feel comfortable with, then develop a design that you wish to acheive. Remember, nothing is done on the computer yet. Create relationships between different parts of the system and try to create on paper a well planned out database design (Database tips coming soon).
This done, create on paper a UI, some general sketches to how the system should look.
Finally, once your have the system created in words and drawings. Analysis it again, make sure you have everything you want to do covered. If you are missing something, reevaluate each step illustrated here, until you are 100 percent satisfied.
If you take this tip into practice. You will have a larger success rate of reaching those milestones.
Thanks, graham.
Wednesday, January 04, 2006
The New Year
The holidays have come and gone, and now its back to work for me.
In the coming weeks I will be looking at Algorithms as well ass good Algorithm design. So very shortly I will be writing this article.
I will also be looking at Database development. I have spent alot of time in the development of databases. In an ongoing project to create a well optimized and expandable database, I have tabulated a few helpful tips to be written in an article.
So, come back often!
Cheers, Graham.
Wednesday, December 14, 2005
MacMedia News Article
Recently an article I wrote for my University Newspaper (MacMedia) was published.
Take a read, it's a light hearted look into the wish list of a geek.
TALK NERDY TO ME
- By Graham McCarthy.
MAC Media is an awesome newspaper. Every month great readers (like YOU!) submit wonderful stories, sometimes so hilarious I pee myself laughing, sometimes so shocking and disturbing that I have nightmares, but never NERDY.
Today, I change history by writing for all those geeks who never get to speak their mind (possibly because they are too engrossed in World of Warcraft, Lineage II, and all those other MMORPGs out there). Wanted or not, I shall do this for them!
As my first article and sticking to the Christmas theme, I have tabulated a “What a Nerd Needs for Christmas” list. I hope you enjoy.
WHAT A NERD NEEDS FOR CHRISTMAS (2005 edition)
Video iPod.
When I said “needs” I definitely meant “wants”. 30gigs of storage space (at least), and the ability to play music/movies as well as store photos has definitely gotten every tech junky drooling over this. It’s a great gift for that geek on your list and with a price tag of $379.00, you’ll have that geek indebted into fixing any computer problem for life!
Caffeinated Soap.
Caffeinated soap solves two major problems geeks face; Sleep deprivation and showering. You could definitely purchase one of those energy drinks (like Red Bull or Bawls) and they would give you the necessary energy to level up that Paladin, but it won’t get you clean, in fact it might add to the problem. 1 Bar $6.99 (USD).
Not an XBOX 360.
I say that with a heavy heart, I am an avid fan of new technology, especially one that makes The Master Chief look so damn sexy! But, a true geek would have a lot more fun tricking out his first gen Xbox or PS2. Gino’s mod Honda Civics, geeks mod game systems, this is our Fast and the Furious. A modded XBOX won’t graphically look like an XBOX 360, but it will perform all the same functions, additionally you can throw some flashy under lighting LED’s to totally impress the ladies. You can get one for about $100.00, but the memories to be had, priceless.
Binary Clock.
Personally, I’ve wanted one of these things for the past 3 years. It serves no functional purpose except make it even harder to read a clock. But if you are looking to impress other geeks in an epic “out-geek-a-thon” like I do, you’ll need to add one of these to your arsenal. The Binary clock sells for around $30 (USD).
Well, that’s all a geek really needs this holiday season. Anything else would be just going overboard. Happy holidays everyone!
Friday, December 09, 2005
Sorry for the delay...
Hey everyone,
Sorry for the delay in my daily updates, I am currently spending way to much of my time studying! I recently finished the hardest of all my exams, my Math exam on sets and logic, It was difficult, but I feel very confident about it.
Today, I have my Canadian Policy exam, which will be hard, but its not worth that much. Once I get these out of the way, i'll be right back in there with some coding tips, and some neat examples!
Thanks!.
Wednesday, November 23, 2005
Tips #3 : Conditional Statements
Today's tip will be really quick, lets talk conditional statements.
A neat suggestion was posted as a comment on my last article, suggesting a really good way to prevent logic errors from creeping into your code. Logic errors being the hardest type of errors to find in your code.
If presented with an if statement:
if(num == 0)
{
//do something.
}
Now, if you forgot to put the double equals in the condition like:
if(num = 0)
{
//Do something
}
An error like that might not be catched, the suggestion put forward was to declare the constant first, and then the variable after like :
if(0 == num) {} , this way if you forget one of the equals, the compiler will be sure to catch it.
You can take this step one further, by declaring the 0 as a constant, like this:
public final int ZERO = 0;
if(ZERO == num);
This just takes your code that 1 extra step to insure good coding practices.
Thank you Jeff, for that great tip!
Lets continue,
Since white space is never compiled into your program, you should never worry about making your code extra readible with space. A lot of the code that I have tested, has been really hard to traverse through because the authors don't leave enough white space between actions, let me demonstrate:
public class MyTestClass{
public final int SIZE = 5;
public static void main(String [] args){
for (int i = 0; i<>
public doJob() {
for (int i=0; i
if (i%2 == 0)
System.out.println("number: " i);}}}
Confused? Frustrated? Good!
Make your code clear to read; the clearer the code, the easier it is to find errors later.
And also dont forget to add comments!
//MyTestClass.java Author: Graham.
//Desc: Prints out numbers, then the even numbers
public class MyTestClass
{
___//Variables
___public final int SIZE = 5;
___//Main Method, prints numbers o - 4, then runs doJob() method
___public static void main(String [] args)
___{
_____for (int i = 0; i (LESS THAN) SIZE; i++)
_____{
_______System.out.println("number: " + i);
_____}
____doJob();
___} //End Main
___public doJob()
___{
_____for (int i=0; i
_____{
_______if (i%2 == 0)
_______System.out.println("number: " i);
_____}
___}//End doJob
} //END Class
NOTE: Instead of LESSTHAN you'd obviously put in the symbol, which for some reason Blogger won't let me write.
Now, if I was going to critique my own code here, I would say that the method doJob() is pretty ambiguous, I should have called it countEvenNumbers().
Hope you have found this article useful! Thanks you.