Multi-Time Zone Clock (Analog + Digital)
Author |
Message |
Cezna

|
Posted: Sat Jun 12, 2010 7:38 am Post subject: Multi-Time Zone Clock (Analog + Digital) |
|
|
This is a clock I made, mostly as an experiment in Turing's Time procedures, but partly just for fun, which I got from designing the aesthetics of it.
It has an analog clock in the center, a digital clock at the bottom, and a date and time zone display at the top.
It is re-sizable (some of you may remember me asking how to do this in the help section a few days ago), but I only made the clock re-sizable, as the text becomes very difficult to read if it is re-sized much. However, it should be easy enough to re-size the text by changing the font size and repositioning it, or just eliminating it all together.
There are also changeable time zones, all of the time zones in Canada, as well as Universal Coordinated Time (aka, Greenwich Meridian Time or GMT).
All of the predefs, including size of the clock and colour of just about everything, are up at the top where they are easy to change.
If anyone likes it, or has ideas as to how I can improve upon it, or just messes around with it and makes something cool, or just has something, anything they want to say about the clock, please post back.
Description: |
This is a short program showing how the methods I used for getting the time work (so that others can learn how to use them) |
|
 Download |
Filename: |
Time Keepers.t |
Filesize: |
745 Bytes |
Downloaded: |
297 Time(s) |
Description: |
|
 Download |
Filename: |
Clock.t |
Filesize: |
13.7 KB |
Downloaded: |
415 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
InfectedWar
|
Posted: Sun Jun 13, 2010 8:15 am Post subject: RE:Multi-Time Zone Clock (Analog + Digital) |
|
|
Impressive, but Cezna what is the point of passing your variables if they are all global? If they were local variables they would need to be passed. I do see you modify the value of a couple of them,but the one's that arn't being modified don't need to be passed since they are global variables located at the top of your program.
But otherwise It's a cool program an I do like your graphics a lot >=)
|
|
|
|
|
 |
Cezna

|
Posted: Sun Jun 13, 2010 8:50 am Post subject: RE:Multi-Time Zone Clock (Analog + Digital) |
|
|
You'll have to specify which variables you mean, as I used so many (to make it customizable).
If you let me know which ones you mean, I would be happy to simplify it any way I can.
Anyway, thanks for the compliment.
|
|
|
|
|
 |
InfectedWar
|
Posted: Sun Jun 13, 2010 9:10 am Post subject: RE:Multi-Time Zone Clock (Analog + Digital) |
|
|
Yeah I thought you would ask =d. Every variables that is located at the top of your program before any procedure or process are considered global variables, this means everything in your program can access them without passing them. But you obviously know that, ohh and I re-looked at your code and they are local variables being passed so yes that's right. Guess only thing I have to say now that's its not a good Idea to have all almost all global variables for a program because of efficiency issues (obviously it's not a big deal in turing, but still) and modularity (A lot easier if the variables are local). I know I say use local variables which you should, but realistically it would become so tedious to code and pass back and forth between procedures I really don't blame you at all =d.
Other things I have to say after the observing code, I would say you have pretty relevant variable names (which a lot of people usually don`t have), looks like you followed coding conventions well and consistent (My coding conventions are slightly different, but that does not matter).
Ohh and one other questions, does every variables in your program really require to be a int =d, only time I really required every variable to be a int was when I made my recursive landscape program which almost everything in the program was randomized with a randint =d (No clue why there is no randnat or something -.-), I`m just curious why(question mark lol)
|
|
|
|
|
 |
Cezna

|
Posted: Fri Jun 18, 2010 11:31 am Post subject: Re: Multi-Time Zone Clock (Analog + Digital) |
|
|
Sorry it's taken so long to get back, for some reason this topic didn't show up as orange for me.
I have everything set as an int variable so that all of the colours and other parameters are easily changable to allow people to have fun customizing it to their heart's content, since I love to do this myself when I find a new program.
About the local vs global variables, a lot of the global ones are the customizable ones mentioned above, and the others I have as global to avoid having to pass too many variables to the draw procedures, so that I could keep it simple for me and anyone who was interested in looking through my code.
I am also attaching a slightly modified version, anyone who looked at the first version will notice a difference in the default colours, but don't worry, that is not the only difference, I also added a few more customizable variables and fixed a few minor bugs.
Description: |
|
 Download |
Filename: |
Clock.t |
Filesize: |
14.22 KB |
Downloaded: |
204 Time(s) |
|
|
|
|
|
 |
Nick

|
Posted: Tue Jun 22, 2010 8:44 pm Post subject: Re: Multi-Time Zone Clock (Analog + Digital) |
|
|
InfectedWar wrote: Ohh and one other questions, does every variables in your program really require to be a int =d, only time I really required every variable to be a int was when I made my recursive landscape program which almost everything in the program was randomized with a randint =d (No clue why there is no randnat or something -.-), I`m just curious why(question mark lol)
Cezna @ Fri Jun 18, 2010 11:31 am wrote: I have everything set as an int variable so that all of the colours and other parameters are easily changable to allow people to have fun customizing it to their heart's content, since I love to do this myself when I find a new program.
I believe the question was why use ints instead of say nats which are ints >= 0.
|
|
|
|
|
 |
Cezna

|
Posted: Wed Jun 23, 2010 1:30 pm Post subject: Re: Multi-Time Zone Clock (Analog + Digital) |
|
|
Nick @ Tue Jun 22, 2010 8:44 pm wrote: InfectedWar wrote: Ohh and one other questions, does every variables in your program really require to be a int =d, only time I really required every variable to be a int was when I made my recursive landscape program which almost everything in the program was randomized with a randint =d (No clue why there is no randnat or something -.-), I`m just curious why(question mark lol)
Cezna @ Fri Jun 18, 2010 11:31 am wrote: I have everything set as an int variable so that all of the colours and other parameters are easily changable to allow people to have fun customizing it to their heart's content, since I love to do this myself when I find a new program.
I believe the question was why use ints instead of say nats which are ints >= 0.
Cause I didn't know that last part.... lol
|
|
|
|
|
 |
napwressyrisp
|
Posted: Sat Jun 26, 2010 12:14 pm Post subject: Multi Time Zone Clock |
|
|
It would probably also help to have a PST or whatever your time zone is, um.... time on the forums here. That way, at a stretch, one could wake up the old maths noggin and work it out in terms of "how many hours from now?"
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Cezna

|
Posted: Sun Jun 27, 2010 8:34 am Post subject: Re: Multi Time Zone Clock |
|
|
napwressyrisp @ Sat Jun 26, 2010 12:14 pm wrote: It would probably also help to have a PST or whatever your time zone is, um.... time on the forums here. That way, at a stretch, one could wake up the old maths noggin and work it out in terms of "how many hours from now?"
Not exactly sure I know what you mean...
|
|
|
|
|
 |
|
|