Re: Looking to develope skills
Quote:
Originally Posted by
Arjay
You didn't copy the code as I typed it. Take another look at the code in my responses of #78 and #79. I have an InitializeAlarmTime( ) method which you need to call in your SetAlarm button handler:
Code:
private void btn_setalarm_Click(object sender, EventArgs e)
{
Reset();
SetInitialAlarmTime( );
CreateAlarmThread( );
}
Then compare your CheckAndIncrementNextAlarmTime( ) method with mine. You'll see that mine is simpler and that you've merged the functionality of SetInitialAlarmTime( ) with CheckAndIncrementNextAlarmTime( ).
All the check method should do is check to see if the alarm time has passed. If it has, it sets the day to the next and returns true. Your check method keeps initializing the time from your text box. It shouldn't do this.
Btw, if you aren't doing so, you need to start using the debugger. You can set a breakpoint in the while( true ) loop by pressing F9. Then each time through the loop, you can check the values _nextTimeAlarm and other values. This will help you figure out what is going wrong.
Oh yes! My bad!
I shall make the necessary changes, study the program thoroughly once more, understand what's goin on by setting the breakpoints, and then get back to you.
And thanks for the tip on using the debugger! :)
Quote:
Originally Posted by
nabeelisnabeel
Dragster93 !
To be a good programmer you should have a good grip on algorithms. Do you know what an algorithm is !
Secondly, after reading all the replies I have come to the conclusion that your basic programming skills are not well developed yet, and you are trying to go for big things. You should buy some beginner level C# programming book and read it thoroughly and solve the given exercises at the end of each chapter.
Although the work you are doing with the help of forum members is not bad at all, but you should know the basic syntax of any certain language to be able to code in it.
in the meantime, let me think some other advice for you...
Yes, I'm familiar the concept of algorithms.....never got a chance a chance to study it though....
I do have basic knowledge about the syntax, but like you said, my skills are not well developed yet. And as you know, the language is very vast, so it not so easy to know every thing about the language so fast. My main objective of doing such projects is to develope my skills. I do have 2 books already :
1) C# (which is basically for Console Apps)
2) WinForms with C# (which cannot be studied if you haven't read no.1)
And you are VERY right about the fact that I should read some books and do the given exercise to so I can get the syntax and the basics of the language! :)
I shall do that. But in the mean time I would like to continue making these small programs also.
Quote:
Originally Posted by
nabeelisnabeel
Yes, I read the post. You know what. I think I'll help the guy out. Because, I know how to make databases work with C#.
It'll be like another challenge! :)
I shall start on his program once I'm done with my Alarm program.