Answer the question
In order to leave comments, you need to log in
What is the best way to build a family tree?
Tell me the best way to build a tree.
There is no problem to do it on crutches, I'm interested in how to do it more correctly and then ask the database (Postgresql) less.
Problem:
An object can have two parents and any number of children.
So far I have seen ready-made solutions with one parent. Did you miss something? Ideally, it would be a ruby/rails gem, but some algorithm is enough. Or see the SQL query. I'm with him for now :)
I think to get something like from the database: id;name;lvl;gender;father_id;mother_id
and this is already used to build on the page.
There are no special requirements, it's not scary to get a ring, 3 generations are enough.
upd: Maybe I'm not looking for something at all? Maybe not the tree algorithm, but me? :)
Answer the question
In order to leave comments, you need to log in
It is convenient to use nested sets for storing tree structures, an explanation of the principle can be found at phpclub.ru/detail/article/db_tree.
The disadvantage of this approach is that each time an element is added to the tree, the changes will affect a large number of rows. But the advantage will be a quick search and navigation with a minimum number of calls to the database
can the contractor be trusted to set deadlines?
Freelancers are no different from any other wage laborer at a time.
Let's say I dig, for example, a hole 2 by 3 with a depth of 1 meter, I take 1000 rubles for this. and go to bed at 3 o'clock.
I receive an order for a pit, and as usual 3 hours and 1000 rubles. we talk and start. And in that place bam and 2 large cobblestones, who knew about them, but no one. At 3 o'clock we no longer fit, they also need to be dug up, taken out and moved somewhere. Nobody will pay for this.
Once again, bang and some cable at the site of digging a hole, they forgot to warn. You also need to do something with the cable. If you refuse this hole, no one will give money, and you have already dug up half of it, but the customer doesn’t care, he has a trigger (done / not done).
Another pit, and there is some kind of bang pipe. You are told to dig then elsewhere first. And the fact that this part of the digging should be paid for is nobody's business.
There are an infinite number of such options, here you can add “Why is the pit rectangular, but let’s make it an asterisk” or “Why are you holding a shovel like that, I want you to dig my hole holding a shovel like this”, etc.
Having stuffed a bunch of such cones, you begin to set a deadline of 6 hours and 5000 rubles, according to your calculations, most of such surprises are solved at this time. Only those who turn to you whine: “But a friend of a friend’s son digs for 800 rubles.”
Over time, you spit on all this, open, for example, a cemetery and dig for your own pleasure without any surprises and collect much more money. =)
what you are doing? Are you pushing the deadline? Lower your bonus?
I would like to collect and read the use cases of colleagues (customers, freelancers) in the following cases:
How to evaluate the timing?
Break the task into subtasks, set subtasks hours for which they can be completed, if you don’t know how, then break it into subtasks that can be done in two hours.
For example, I'm a customer, I don't know the materiel for how long this or that functionality can be developed, can the contractor be trusted to set deadlines?
Ask three performers to compare and ask to justify.
A question for freelancers - how often does the customer agree to your deadlines?
And where should he go, as an option, I am ready to work faster in an emergency for a doubled rate of 100 bucks an hour.
A fix for the work, deadlines was agreed, but the next delivery (code, design) fails on time, something has already been partially done.
Those. iteration is not the first, the quality of work is good - what are you doing? Are you pushing the deadline? Lower your bonus?
It's a stupid situation, the risks should be included in the deadlines, if you have this once, then you can shift the deadline, or reduce the bonus or hire more people. But if you have this all the time, then you need to treat the causes, not the consequences.
From freelancers, I would like to know the most common reasons why this happened.
Because gladiolus, laziness, a lot of work at one moment from several customers, improper scheduling, and a million and one more reasons.
If there are interesting examples from life when working with freelancers, but not in these cases, share anyway.
Here you can read and listen about working on the freelance exchange code
pumainthailand.com/category/rabota-2/
Well, the question, as I understand it, is not only about time, but also how to work with them in principle. So the ideal option is to find a freelancer who has already solved exactly the same problem, then it all comes down to buying a ready-made solution. I call it a catalog of developments. If this cannot be found, then this, as it were, already hints at the fact that you can’t get off with an hour of work. Break the work into two stages - the first is an estimated one, at which he gets acquainted with the task, at this stage you either pay nothing at all or pay a symbolic agreed amount (calling fee, it is also “for beer”). At this stage, he himself tells you possible options for the development of further events with his participation. They either suit both of you and you cooperate, or they don't suit you and you scatter. Let's remember the plumber - he first looks at your scope of work, only then he says the deadlines,
If the deadlines are not running out, then you can give long-term tasks to novice freelancers. In this case, we agree so, if you do it, well done, if you don’t do it, it doesn’t matter.
How to evaluate the timing? For example, I'm a customer, I don't know the materiel for how long this or that functionality can be developed, can the contractor be trusted to set deadlines?
A question for freelancers - how often does the customer agree to your deadlines?
A fix for the work, deadlines was agreed, but the next delivery (code, design) fails on time, something has already been partially done.
Those. iteration is not the first, the quality of work is good - what are you doing? Are you pushing the deadline? Lower your bonus?
From freelancers, I would like to know the most common reasons why this happened.
How to evaluate the timing?
A question for freelancers - how often does the customer agree to your deadlines?
Those. iteration is not the first, the quality of work is good - what are you doing? Are you pushing the deadline? Lower your bonus?
From freelancers, I would like to know the most common reasons why this happened.
How to evaluate the timing? For example, I'm a customer, I don't know the materiel for how long this or that functionality can be developed, can the contractor be trusted to set deadlines?
A question for freelancers - how often does the customer agree to your deadlines?
A fix for the work, deadlines was agreed, but the next delivery (code, design) fails on time, something has already been partially done.
Those. iteration is not the first, the quality of work is good - what are you doing? Are you pushing the deadline? Lower your bonus?
From freelancers, I would like to know the most common reasons why this happened.
I can say from the side of the web team that there may be several reasons for this:
1. Fuzzy Terms of Reference. Haven't figured it all out. It happens like this - you stipulate everything clearly what needs to be done, and when you sit down and write the code, new problems come out that were not foreseen. Therefore, I tell my developers that before writing estimates and saying that they have no questions, mentally imagine in their heads how each module will work - that is, make an assessment on a task-by-module basis.
2. They did not take into account all the risks of the project - for example, the technology was not able to solve the problem,
3. There is no project manager - somewhere the estimate has floated, no one is following this, and accordingly all the deadlines are floating. And the estimates float in different ways - but the main thing we faced at the very beginning was that there was no change request management. The customer said, let's fix it a little here, and let's do it like this - and all this increased the amount of work, but the estimate remained the same.
4. The banal laziness of a freelancer and the inability to calculate his working day.
We usually try not to put pressure on deadlines, especially for people who are starting to fulfill our orders for the first time. Usually we look at estimates, examples of work, after discussing the quality of a particular candidate. After we talk with a potential contractor, the deadlines, of course, are set by the contractor himself. If we strongly want to reduce the time for completing the task, then we negotiate this with the contractor by offering a larger amount of payment from the originally agreed one. There were cases when the performers did not cope with the tasks on time and in such a situation, in such a situation we pushed back the deadlines, but we did not turn to such performers anymore. Somehow, we calculate everything by trial method.
For example, I'm a customer, I don't know the materiel for how long this or that functionality can be developed, can the contractor be trusted to set deadlines?
For example, I'm a customer, I don't know the materiel for how long this or that functionality can be developed, can the contractor be trusted to set deadlines?
How to evaluate the timing?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question