creating a work schedule program
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 23
- Joined: Tue Mar 12, 2013 12:28 am
creating a work schedule program
Hi. I'm trying to create a program to help automate my employee work schedule. All employees are divided into six groups. Group 1 and 2 would be off monday, 2 and 3 tuesday, 3 and 4 wednesday ect. The week is based off a 6 day work week so days off shift by one every week. I want to create a database with all the employee names and have the program create a list of who should be working each day. Is it possible in LiveCode to create a program that will be able to follow that schedule? i.e. 03/26/13 groups 1 and 2 off, 3-27-13 groups 2 and 3 off without me having to manually input it every day?
Re: creating a work schedule program
Hi.
Of course.
How experienced are you with LiveCode? With any other programming language?
The core of this could be written by even an intermediate level LiveCoder in half an hour, in that all the functionality would be there, if not the bells and whistles and a pretty interface.
The above is meant to encourage you.
Write back....
Craig Newman
Of course.
How experienced are you with LiveCode? With any other programming language?
The core of this could be written by even an intermediate level LiveCoder in half an hour, in that all the functionality would be there, if not the bells and whistles and a pretty interface.
The above is meant to encourage you.
Write back....
Craig Newman
Re: creating a work schedule program
Livecode is the perfect program for doing what you want. The easiest way would probably be to make a separate card for each of your 6 employee groups. These cards would be where you enter your employee names and any other relevant information so your employee lists will be editable. Then make a seventh card with the schedule layout. A "New Week" button on the schedule card could run a script to plug in the values for the next employee group and save the group number value to a text document so when the program is reopened it will remember which group is currently scheduled. When the program opens it would load the text document, evaluate the saved group number and repopulate the schedule. With basic understanding Livecode can do all that in under an hour. Some of the more adept users on here could probably do that in under 10 minutes
-
- Livecode Opensource Backer
- Posts: 23
- Joined: Tue Mar 12, 2013 12:28 am
Re: creating a work schedule program
Thank you for the replies. I have a few failed attempts at learning to program over the years. I finally found Google App Inventor and made a few apps. I just found LiveCode on Kickstarter and it seemed somewhat similar but with a lot more potential. I'm exited at the possibilities. I'm trying to use some needed work programs as motivation to keep learning.
Re: creating a work schedule program
Hi.
You can do this. But as happens, though LiveCode is by far the easiest language to learn, and you only need to learn a small fraction of it in order to start producing, there is still a learning curve.
For your project, I would estimate 100 hours of practice. This will put you in a position to be able to produce applications of the scale you mentioned in an hour or two. Your project is a perfect place to start. Make a mainstack, and start trying to develop. Whether or not you use Magice's ideas or not is up to you. In fact, it would be good if you tried a few different ways.
But though you will receive ALL the help you could possibly ask for here, you will receive very little hard stuff until you are at least up and running. In other words, you will get answers to questions about functionality, design and coding, but little in the way of "how do I start to learn LiveCode"
Get the user guide, dictionary and tutorials. Read and play. Then write back. You will have your app in a few weeks. It will be pretty to look at in a few more.
Craig Newman
You can do this. But as happens, though LiveCode is by far the easiest language to learn, and you only need to learn a small fraction of it in order to start producing, there is still a learning curve.
For your project, I would estimate 100 hours of practice. This will put you in a position to be able to produce applications of the scale you mentioned in an hour or two. Your project is a perfect place to start. Make a mainstack, and start trying to develop. Whether or not you use Magice's ideas or not is up to you. In fact, it would be good if you tried a few different ways.
But though you will receive ALL the help you could possibly ask for here, you will receive very little hard stuff until you are at least up and running. In other words, you will get answers to questions about functionality, design and coding, but little in the way of "how do I start to learn LiveCode"
Get the user guide, dictionary and tutorials. Read and play. Then write back. You will have your app in a few weeks. It will be pretty to look at in a few more.
Craig Newman
-
- Livecode Opensource Backer
- Posts: 23
- Joined: Tue Mar 12, 2013 12:28 am
Re: creating a work schedule program
I have been going through tutorials and practicing for a couple weeks. The program is actually more involved. I'm making an outline of what's involved and that is the part that was giving me the most trouble. I basically printed an entire book of tutorials. 

Re: creating a work schedule program
Hi lithium630,
To help simplify the problem go Orwellian - use numbers instead of names for groups.
1-6, you can shift the working groups by + 1
if tVar >6 then put 1 into tVar --and theres your loop
With:
put "1364367600" into tDate --seconds: the number of seconds since the start of the eon
convert tDate to long date
if "Sunday" is in tDate then --just don't run on Sunday
Now you've skipped the missing day and the numbers are there for you to manipulate.
When I first read your question I immediately thought there would be a calendar involved and the answer became much more complex but in actual fact there is no need for a calendar just the above (unless you want one for other reasons).
Oh, I guess I should say there are alway a dozen ways to skin a cat and this is just one that came to mind.
Simon
To help simplify the problem go Orwellian - use numbers instead of names for groups.
1-6, you can shift the working groups by + 1
if tVar >6 then put 1 into tVar --and theres your loop
With:
put "1364367600" into tDate --seconds: the number of seconds since the start of the eon
convert tDate to long date
if "Sunday" is in tDate then --just don't run on Sunday
Now you've skipped the missing day and the numbers are there for you to manipulate.
When I first read your question I immediately thought there would be a calendar involved and the answer became much more complex but in actual fact there is no need for a calendar just the above (unless you want one for other reasons).
Oh, I guess I should say there are alway a dozen ways to skin a cat and this is just one that came to mind.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: creating a work schedule program
So, it has already started.
The ways to implement your revolving schedule can easily be accomplished with just a few lines of code. Really. It will be the interface, data entry, display, etc., that will take most of the effort.
Thus the difference is between the brain power required and the sweat required. In this project, very little brain power, much more sweat. When you are more experienced, you will agree.
So write back with specific questions. Just be a LiveCode programmer, keep practicing.
Did I mention to ask specific questions and to keep practicing?
Craig Newman
The ways to implement your revolving schedule can easily be accomplished with just a few lines of code. Really. It will be the interface, data entry, display, etc., that will take most of the effort.
Thus the difference is between the brain power required and the sweat required. In this project, very little brain power, much more sweat. When you are more experienced, you will agree.
So write back with specific questions. Just be a LiveCode programmer, keep practicing.
Did I mention to ask specific questions and to keep practicing?
Craig Newman
Re: creating a work schedule program
Sorry Craig, I couldn't resist.
Simon
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Livecode Opensource Backer
- Posts: 23
- Joined: Tue Mar 12, 2013 12:28 am
Re: creating a work schedule program
I appreciate the help. LiveCode seems to encourage new programmers. I think it was a legitimate question in the beginners section.Simon wrote:Sorry Craig, I couldn't resist.
Simon
Re: creating a work schedule program
Hi lithium630,
My message to Craig was because the thread up to my post didn't contain any code, and there is a point not to add code until a specific coding question is asked.
Simon
My message to Craig was because the thread up to my post didn't contain any code, and there is a point not to add code until a specific coding question is asked.
Yes, perfectly legitimate, if I made you think otherwise I apologize.I think it was a legitimate question in the beginners section.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Livecode Opensource Backer
- Posts: 23
- Joined: Tue Mar 12, 2013 12:28 am
Re: creating a work schedule program
Ahh I understand. Guess my thought process was a little different than the common practice here. I was just trying to understand the basic concept of how it would work, more than the specific code. In any case it's all good.Simon wrote:Hi lithium630,
My message to Craig was because the thread up to my post didn't contain any code, and there is a point not to add code until a specific coding question is asked.Yes, perfectly legitimate, if I made you think otherwise I apologize.I think it was a legitimate question in the beginners section.![]()
Re: creating a work schedule program
Actually I think the person who broke forum etiquette here was me. In my answer to your question I basically outlined a complete solution. That is something I should not have done. While it is good to help people, it is not good to stifle creativity, nor is it good to make things so simple that people don't get a chance to make their own mistakes and learn from them. My purpose was actually to show how quick and easily Livecode can produce a solution not to suggest a right or wrong way of doing it. You will learn that sometimes the hardest part of programming is figuring out the general idea rather than the details but that can also be the most fun part.lithium630 wrote:Ahh I understand. Guess my thought process was a little different than the common practice here. I was just trying to understand the basic concept of how it would work, more than the specific code. In any case it's all good.Simon wrote:Hi lithium630,
My message to Craig was because the thread up to my post didn't contain any code, and there is a point not to add code until a specific coding question is asked.Yes, perfectly legitimate, if I made you think otherwise I apologize.I think it was a legitimate question in the beginners section.![]()
Re: creating a work schedule program
Hmmm.
Lithium. If it helps, know that LiveCode is at root very simple and accessible. But a new user looks at the vast potential of the program and might be daunted. I say again, a tiny subset of the language, and only a moderate mastery of the development environment is all you need to create quite sophisticated applications.
It would probably be a good thing to have a "LiveCode Light", delineating about 15% of the program, those elements of the language and authoring tools and objects that would not overwhelm a beginner, but permit easier learning and build confidence.
You need to ignore, in the beginning, all but the bare necessities. How to discern which these are might be a problem.
So dig in, put some buttons and fields on a card. Try to do some math and write some scripts. Then ask this forum anything you care to.
Anyone think it a good idea that dictionary terms be coded "basic, intermediate, advanced", as a possible feature request?
"Put" would be "basic". "libURLSetAuthCallback" would be "advanced".
Craig Newman
Lithium. If it helps, know that LiveCode is at root very simple and accessible. But a new user looks at the vast potential of the program and might be daunted. I say again, a tiny subset of the language, and only a moderate mastery of the development environment is all you need to create quite sophisticated applications.
It would probably be a good thing to have a "LiveCode Light", delineating about 15% of the program, those elements of the language and authoring tools and objects that would not overwhelm a beginner, but permit easier learning and build confidence.
You need to ignore, in the beginning, all but the bare necessities. How to discern which these are might be a problem.
So dig in, put some buttons and fields on a card. Try to do some math and write some scripts. Then ask this forum anything you care to.
Anyone think it a good idea that dictionary terms be coded "basic, intermediate, advanced", as a possible feature request?
"Put" would be "basic". "libURLSetAuthCallback" would be "advanced".
Craig Newman
Re: creating a work schedule program
Sure a feature like that would be good.
I think the second day I got LC I went through most of the items in the dictionary, not to memorise them but with the idea that I could get acquainted. It would have been great if it could have been sorted by level, "The 25 terms you should know". I could have skipped all those paint related ones (but those did show me how far LC extended, now if those had only been about media
).
Simon
I think the second day I got LC I went through most of the items in the dictionary, not to memorise them but with the idea that I could get acquainted. It would have been great if it could have been sorted by level, "The 25 terms you should know". I could have skipped all those paint related ones (but those did show me how far LC extended, now if those had only been about media

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!