The only consistent advice I find is keep dovetail length about equal to board thickness. And keep dovetail ratios between 1:6 and 1:8.
It's worth mentioning that some of this is a tradition thing and to some extent that is based on aesthetics; you do see exceptions for specific decorative effect.
Dovetails are inherently strong, both structurally and because of the large glue surface area, so you can get away with a fair amount of variation and still end up with a very strong joint. Broadly speaking, the main things to keep in mind are not to make the pins or the base of the tails too thin, and not to make the slope too excessive (because this would tend to leave short grain at their corners which is weak).
And going on from this, to some degree many joint dimensions are a matter of choice — excluding very fat or very skinny options almost anything in between will work acceptably well.
I wiggled things around until they looked like most stuff I've seen elsewhere.
That's often perfectly acceptable. In joint-making things that look right will many times work fine.
The joint above looks like a half lap dovetail joint, but how well would it function like one ?
What you've drawn up there I think could be called a shouldered dovetailed half-lap (UK: shouldered dovetailed halving joint) and it looks like it will function perfectly well in the way I presume you intend it to.
It's slightly more complex to lay out and cut than a conventional dovetailed half-lap (with I think little or no added benefit for most applications) but if you're happy with how it looks I don't foresee a problem.
Is there any basic science/math to picking dimensions for the joints ?
There are some, but it mostly pertains to structural wood joints where strength is more critical, and the maths is very heavy going as it takes into account the structural strength of the wood, e.g. moduli of elasticity and rigidity. If you'd like to read up on this publications from the Forest Products Laboratory (a division of the US Department of Agriculture) are a good place to start. If you'd like to look into it in even greater detail there are ASTM standards for structural joint strength and testing of wood.
What techniques do you use to layout a joint from scratch ?
Rough rules of thumb are the usual starting point for laying out joints, and some people have their own preferences for how to lay out joints (some based purely on expedience and not with an eye to maximising strength).
In a furniture-making context, because wood is generally more than strong enough for the application much variation in joint dimensions is not critical and doesn't have any noticeable impact on strength.
For mortise-and-tenon joinery for example, older guides may say that tenons are generally 1/3 the thickness of the wood being used. With thinner stock tenons half the thickness are not uncommon however, and with thicker boards tenons under one third can be used; or alternatively, and to be preferred, a pair of thinner tenons are formed (twin tenons). Mortises are generally just a little deeper than the length of the tenon they're intended to mate with, as it's difficult to form the bottom of a mortise perfectly flat it gives you a little leeway so the tenon can seat fully, as well as providing a small pocket for excess glue to collect in (rather than all of it trying to squeeze out when the tenon is pushed home).
Because joinery is such a wide and deep subject it would be best to ask joint-specific questions as and when they crop up.