HackerTrans
TopNewTrendsCommentsPastAskShowJobs

squirrelicus

no profile record

comments

squirrelicus
·7 ปีที่แล้ว·discuss
If you have the skill, we already know who you are.

You have millions in the project and a dozen PhDs working with you, and you've already authored public papers demonstrating the weaknesses of things previously believed to be strong.

If you are not at least one of those things, it's malpractice for you to even consider letting your employer pay for your crypto "invention"s. That's like a nurse building her own OR and insisting the hospital let her cut people open in it. No. Don't. Stop.
squirrelicus
·7 ปีที่แล้ว·discuss
Whoever downvoted this deserves to have their license to code revoked. It's malpractice to roll your own crypto.
squirrelicus
·8 ปีที่แล้ว·discuss
That is another way to accomplish the same goal. This trade-off is more aesthetic than architectural and is just a matter of language support
squirrelicus
·8 ปีที่แล้ว·discuss
Often people will ask how to follow these principles in the world of I/O. The answer is incredibly simple: with values.

Return a DTO that encapsulates all the business information about the result state of the I/O call. Do not throw exceptions. Log them if you like, but you must return all the data necessary for the business logic to react to failure conditions, encoded in your own use case specific structure.

If you don't care about whether you failed due to timeouts or refused connections or query parse failures what have you, don't return that data, just return a hasError kind of property on the return structure (bonus points if your language supports discriminated unions, but this is not necessary). If the parent logic needs to react to timeouts and failures to connect differently, then catch those exceptions or state separately and return didTimeout or cantConnect flags separately.

Values values values
squirrelicus
·8 ปีที่แล้ว·discuss
Simple Made Easy should be mandatory watching for your developer's license.

Seriously though, this talk, Boundaries, and Simple Made Easy are the trifecta that forms the foundation of the software I design.
squirrelicus
·8 ปีที่แล้ว·discuss
It's difficult to overstate the importance of the principles taught in this talk. Almost as difficult as it is to describe why they are so important. The fundamentals of quality software are found here, not in some Martin Fowler dissertation on DDD.

Edit: correction from commenter, thanks!