Better HN
topnewbestaskshowjobs
Log inSign up

kastephens

2 karma · joined May 9, 2012 (14y ago) · 2 submissions

http://kurtstephens.com
Submissions

comment 13y ago · link · parent

  I give employers/customers a copy of all my pre-existing open-source or private work on a DVD and have them sign a document stating "This code/IP existed before our work agreement and have no claim to any of it, now or in the future, including derivative works."  They sign it before I sign any contract of theirs.

  This can be hard to demand from larger droid-run companies.  The more entrepreneurial businesses understand: they want solutions to immediate problems, and don't care about collecting vague legal hammers that are only useful in the future.

comment 14y ago · link · parent

The problem isn't controllers. Controller are responsible for mediating the behavior presented to external actors, not defining complex "business" logic.

Complex logic interacts with complex object graphs, not individual models. Therefore, complex logic does not belong in models or controllers (or views). Complex logic belongs in instantated objects (not modules) that represent complex logic. This style may also be known as the "Strategy" Design Pattern.

Strategy objects can have state during their activities, this is why they should be instantiated.

Strategy objects simplify testing because they can be connected with any object graph that presents the same interfaces as the target object graphs.

This leads to interchangable Strategy objects that represent generic behavior which can be applied to actual, simulated or speculative object graphs.