26

I'd use a scoring algorithm. Each person starts with a score of zero. Each time they bring croissants, increment their score by 1. The score of all team members who did not bring croissants is decremented by 1/N. Thus a score of 0 means that a team member has neither over or under bought. Without randomness, choose the person with the lowest score out ...


10

The measure of how good scheduler is would be average/total wait. Assume you have a set of jobs J, within these you have job x which is the longest. Let y be any other job. If you put x last, total wait time of the jobs executed before will be total(J)-time(x), while for any other it'll be total(J)-time(y). Thus only putting the longest job last minimizes ...


9

Scrum leans towards eliminating slack Yes and No. Scrum forces you to make an intelligent "time for innovation and other good things". "Other good things" are what retrospectives and daily stand ups are for. "innovation" is what technology spikes or spike solutions are for. They don't go away. They aren't buried. They become first-class, highly-valued ...


7

Joel Spolsky says that a software development team is a scheme for converting capital (money) into working software. Honestly, from your question, it sounds like your team is good at that: you're getting decent software for reasonable amounts of money invested. Now, of course the next step is to put the software into service. Until your company chooses to ...


7

What I would do, if I had to pick this, is get a hat, and put everyone's names in the hat once on little pieces of paper. Then each day, I'd draw someone's name from the hat at random, and that's the person who brings the croissants the next day. That paper then gets tacked up on a board, under "BRINGING CROISSANTS TOMORROW". The paper that's currently on ...


7

I'm not sure that I see what "huge impact on the database" a process would have that polled the database every 5 minutes. Presumably, you have some sort of table that stores your meetings and their start times. It should be relatively easy to index the column that stores the start time and to write a query that looks for all the meetings set to start ...


6

Algorithm, smalgorithm. Use a DB. create table team_members ( id integer auto_increment, name varchar(255), purchase_count integer, last_purchase_date datetime, present integer, prefers_donuts integer default 0, primary key( id) ) Who buys? select id from team_members where (present = 1) and (prefers_donuts = 0) order by ...


6

You should be using a Priority Queue here. A Priority Queue is a queue in which items added to the queue have a priority, and whenever you get an item, you get the item with the minimum (or maximum, depending on implementation) priority. Priority Queues are generally implemented using a min-heap (or max-heap). It will logically represent the data as a ...


6

In principle, the idea is good, and it solves a real problem: what do you do when the developers of two other programs have chosen priorities 12 and 11 for their processes and you need yours to be in between those two? However, there's two problems: You need to do a topological sort of the priority graph every time a new process is created or its priority ...


6

Golang Goroutines are a compiler facility. Conceptually Goroutines and fibers are cooperative multitasking methods with respect to the Environment. Fibers are a OS level concept, whereas goroutine is a compiler level concept. Goroutines may match a specification of Fibre (there seem to be many) but not necessarily fibre in the strictest sense. In fact a ...


6

HaHa :) its NP-Hard https://en.wikipedia.org/wiki/Job_shop_scheduling But your main problem are the humans involved, who will go on holiday, become ill and change shifts at inconvenient times. Your best bet is to forget about optimal and go for ease of use. Automate the calculations that people do in their heads to work out which job to allocate to whom, ...


5

First, watch this video: http://the99percent.com/videos/5822/Seth-Godin-Quieting-the-Lizard-Brain Executive Summary: The way you ship on time and on budget is this: when you run out of time or run out of money, you ship. That's it. The reason most projects don't ship on time is because someone comes along with "just one more feature or fix" ...


5

The number one cause of scheduling overruns is scheduling pressure. I disagree. The number one cause of scheduling overruns is a schedule that doesn't reflect reality, and in an overly optimistic manner. Human nature dictates that some scheduling pressure is an absolute necessity. Just a couple of the problems that arise without some amount of scheduling ...


5

I would try to use a one dimensional sweep-line algorithm for this. First, for each resource part of a booking, find out the points in time where its status switches from "available" to "booked", or vice versa (restricted, for example, for every point in time after now). You put each of this points in time into a data record containing time stamp kind of ...


5

Here's an algorithm I invented myself. I don't know if it already exists or is actually the round robin implementation: 1 4 1 5 1 6 1 3 1 2 2 5 4 6 5 3 6 2 3 4 3 6 2 3 4 2 5 4 6 5 basically you start with and always keep the 1 in the same position and rotate the rest. That way you will always get a schedule of unique matches. ...


5

In one of Tom Kyte's books he described a company with this exact problem. They did what you did and the performance was terrible. His recommendation was to store each instance of a recurring appointment in the database up to some point in the future. This solved all their performance problems with appointment searches. Yes, there may be hundreds of ...


5

This is tricky, because you've modeled your bookings as time intervals with granularity as fine as your DB allows. Perfectly natural to do, but as you've found out it makes some comparisons difficult. Max of For each booking that overlaps given timeRange return sum of each booking that overlaps this booking and given timeRange The ...


4

I come across this kind of requirement all the time. Let's say you have a date range you want to check (ie, find free units for) which is defined with a start and an end date. In the database, for the sake of making it clear what we're talking about, lets say existing reservations have a first and a last date (of the reservation). So there's six possible ...


4

You have clearly described the problems you are facing, however what I am unclear on why the managers are behaving this way. Can you clarify? For instance, you believe it's ready to deploy, does someone disagree, if so who and why? Are they ex governement beaurocrats This sounds a lot like a capability vs desire alignment problem, you have the desire to ...


4

Obviously I don't want to cycle through the entire collection It's not obvious to me. How big is this collection? Anyway, why would you have to cycle through the entire collection? Put them in a list ordered by expiration time. Since time moves forward, you can discard everything that has expired. So you only have to check if the first element is ...


4

This is something I've long desired as well. But a kernel scheduler only has to decide what task to run right now, not when in the future to run other tasks. So those schedulers may help you with part of the problem, but there is a lot more here than they solve. And they have a key bit of information you aren't keeping; namely if a task is blocked or not. ...


4

I've actually had to solve this problem somewhat in the real world: remember how many times people have gotten donuts every day: var candidates = everyone toss out people who aren't here tomorrow toss out people who aren't here today toss out the person who got them today (unless they're the only one left) toss out everyone where "times they got ...


4

It seems to me that your problem is in your first sentence: Our company implemented a calendar system a few months back with recurring appointments, using iCal strings to store the recurring appointment criteria. Having to scan all records to determine date ranges is simply not scalable. In essence, you're using your database as a flat file, so of ...


4

A key concept/search term may be ETL (Extract, transform, load). That's a formalization of the process you describe: grab data from all over the place, clean it up, and then deliver it. You're in luck, there are both a number of existing tools you may be able to use and a lot written on the topic. I'm most familiar with Pentaho (Kettle, actually). Don't ...


4

I believe the body of knowledge you are looking for is "Mathematical Programming". In general you want to build a model to support decision making. To do this i would start with a "toy" model. This is where you take a very small example, say you only have one machine and three orders to process. You then need to answer some fundamental questions, like ...


4

A preemptive scheduler can not be written entirely in C. The logic that is needed to switch between tasks must be written in assembly code, because you need low-level access to the processor's registers. The way that a preemptive scheduler normally works is like this: Using a timer interrupt, the scheduler code is called every X microseconds When called ...


4

From the information you present us here, it is hard to judge whether it makes sense to use Docker at all. From what you write: We have a python scheduling solution which, at the moment dynamically loads python modules to run each job in a separate process. What would a dockerized scenario bring to the table? If you design for docker, you would ...


4

This is tricky, but... In short order CalDav is not a well supported standard. Everybody adds on their own little bits here and there and can really make it a nightmare to use as an integration point. iCal is better supported in most products but not all. On the plus side you can usually have an entire calendar in an iCal file and just server it without ...


3

As someone who spent almost ten years studying manpower requirements, I can tell you that no one in any profession should ever be planned at 100% for direct work. We used a figure of a little over 30 hours of direct work per week per person. You have to account for meetings, breaks, unavoidable delay (fire drills comes to mind as an example), non-direct ...


3

Agile is really just a set of principles (see here). Scrum is just one tool to try to adhere to those principles. Another agile/lean tool which does rely heavily on theory of constraints in Kanban. Where one of the key points is to limit work in progress (WIP) in order to improve output (See here). Its worth noting though that Kanban is only agile if ...


Only top voted, non community-wiki answers of a minimum length are eligible