I am trying to find a solution to an automation problem. I'm trying to automate a process to make sure users do not need to keep track of many things. I'm trying to make there life easier. But since there is not really code involved in my actual question but it is mostly process based I am not sure if I can post it on SO.

I read the SO help page where they tell you when a question is good and when its bad, but I'm still not sure. Mostly since I have a specific problem and need a specific solution and because it is a solution I need to implement in my software. But in general it could be seen as not a question about software. So I could ask the question not even mentioning software/code and probably still get a solution. Though if I would ask the question, I'd probably make sure people understand it's meant as a solution for software.

So my question here is: where can I ask such question? Is it okay if I post it on SO or a SE? Or should I try it and remove it when it gets downvoted? (Hoping to not get question banned).


Here is a draft of the question I want to post.

Title: How to automaticly calculate the norm for users.

Body: I'm creating a time registration application for employees where they can register there hours. Now I want to show the users there "norm" (not sure if this is an actual word or just made up by my company). The norm is basicly the amount of hours someone has to work in a week. So for each week in a year I have to show this "norm". So when someone has a 38 hour contract his norm for a normal week would be 38. Someone with 32 hours its norm would be 32. etc. etc.

Administrators can register "closed days", this means the company is closed for a specific day (national day off or whatever). So lets say this closed day is at week 30 on a monday. The user has a 38 hour contract. The norm in week 30 should for this user be 30.4. Since the user works 5 days in a week, 38 / 5 = 7.6. 38 - 7.6 = 30.4.

In reality the user works 8 hours a day, meaning he builds +2 hours a week as extra hours. In case he needs a day off without using its holiday hours. (leaving awey if that is a good practise or not).

If employees (users) always work 5 days a week, no matter how many contract hours, calculating the norm would be easy. Just do the contract hours / 5 and substract that from the contract hours like I did above and your done. But here comes the problem.

Lets say an employee has a 32 hour contract and is always free on Wednesday, working 4 days. What will now be the norm if monday is closed? My boss say's the norm should be 24 (3 day's work). Since employees are then just lucky to have an extra day off. But what if the closed day falls on Wednesday? This means the employee has nothing new and can still work his monday, tue, thu and fri. Making 32 hours. But it does also mean I have to register AND maintain for each user, that has this 1 day off, which day he always has a day off (in this case Wednesday). Each time a user wants to change his day off, Wednesday to another I.e., it has to be maintained in the software. Without this I belive I can't calculate the norm.

The employee that currently maintains the hours and pays people out say's he does not want this and then can better keep doing things the way he always did. By hand, but less complicated than above.

So for users that work 5 days in a week its all easy. But when they work 4 days a week it's getting harder. Some example code to explain and maybe rebuild my issue (not working code):

// Quick elaboration in PHP.
$contract_hours = 32
$norm = $contract_hours; // 32
$work_days = 4;
$hours_per_day = $contract_hours / $work_days; // 4
$closed_day = "monday"; // Actual data is more like: 'YYYY-MM-DD'
$always_free_on = "Wednesday";

// if (closed day occured in week) ...
// In this case the else should trigger.
if ($contract_hours === 5) {
    $norm = $contract_hours - $hours_per_day; // If does trigger, 32 - 8 = 24.
} else if ($contract_hours < 5) {
    if (closed_day != $always_free_on) {
        $norm = $contract_hours - $hours_per_day; // This or - 8 by default is both far from ideal, explenation later.
    } else {
        // Norm stays the same, since the closed day ends up on the same day the user is already free. Nothing changed for him then.

This code obviously does not work. Because what if a user works like this:

Contract hours: 16

  • Mo: 4 hours | Normally 4, but today is free since its a closed day.
  • Tu: 4 hours
  • We: free
  • Th: 6 hours
  • Fri 2 hours

Its really hard to tell what the norm should be now. I know its 12, but how does the system know. Without doing alot of handwork for the employees. I want it to be as much automated as possible but im not sure if this actually is possible. It for sure is very desired by the employees :).

My idea of a solution is that it has something to do with different calculations. Like always doing $norm - 8, which obviously wont work. I think there is a different way to Rome, just can't seem to find it.

It kinda became the whole question instead of a draft but I have to say im quite bad in explaining things simple and clear without making it too big. If anyone understands it and knows how to simplify it, feel free to edit this.

  • 1
    You could try to post a draft of your question here so we can get the idea of it, because currently it feels rather opinion based which wouldn't fly on any stack...
    – Tomerikoo
    Oct 11 at 14:24
  • @Tomerikoo Oof, okey. I must say that I didn't watch my time. In 5 min the office closes here. So I will make an edit probably later today or tomorrow. Since I do not have time to write my question down.
    – Allart
    Oct 11 at 14:25
  • 5
    Just posting it, and deleting when you get downvotes is definitely the worst choice.
    – Luuklag
    Oct 11 at 14:28
  • Probably ux.stackexchange.com but I think we need more clarification to be sure
    – Mohammad
    Oct 11 at 16:52
  • 1
    @Tomerikoo I Edited my question. Hope it clarifies things and did not make it too big...
    – Allart
    Oct 11 at 16:58
  • 1
    That whole question seems a bit broad for our format and might solicit opinions instead of answers.
    – rene
    Oct 11 at 17:41
  • @rene Well, then at least answer if it is possible on stackoverflow. Also I think my question is not that broad, I just want to know where I can ask this. Or are you talking about the question in my edit?
    – Allart
    Oct 11 at 18:10
  • I'm talking about the question you're about to ask / seeking a site for
    – rene
    Oct 11 at 18:12
  • @rene Yeah, I think its not a broad question :)
    – Allart
    Oct 11 at 18:48
  • Well this is an X-Y problem I think. Our company faces the same things and fixes that in a far simpler way.
    – Luuklag
    Oct 11 at 18:51
  • But as rene said, I don't think this fits on any of the current sites we have.
    – Luuklag
    Oct 11 at 18:56
  • @Luuklag I thought the same, every company must have the issue I have right? Im very interrested to hear what your company does, if possible.
    – Allart
    Oct 12 at 5:44
  • @Luuklag Does that also mean there will not be answers about other options I can do? Like about sites outside SO/SE? Will my question ever get answered this way?
    – Allart
    Oct 12 at 8:56
  • Well you could try places like reddit or quora I think.
    – Luuklag
    Oct 12 at 8:57
  • @Luuklag Could we please have contact in some way? I would really like to understand how your company fixes things. Or at least get a direction to look at.
    – Allart
    Oct 12 at 10:39

You must log in to answer this question.

Browse other questions tagged .