Friday, December 31, 2021

Replace nested-if's with proper exception-handling

" Why handle exceptions separately:
■ Handling exceptions separately enables you to define the main logic of your
code together.
■ Without the use of separate exception handlers, the main logic of your code
would be lost in combating the exceptional conditions. (See figure 7.5 for an
example.)
■ Exception handlers separate the concerns of defining regular program logic
from exception-handling code."

OCA Java SE 8 Programmer I Certification Guide  by Mala Gupta


Wednesday, May 15, 2019

Force Proper Error Handling - via Checked Exceptions?

Forcing the calling code to handle the error right away is the correct approach, because it forces the programmer to think about the possibility of an error occurring. That's a key point. The fact that this clutters the code with error checking is unfortunate, but it is a small price to pay for correctness of operation.
http://www.lighterra.com/papers/exceptionsharmful/

Friday, May 10, 2019

Providing Rest Clients Nearly as Bad as Publishing SOAP Contracts

Even still, many developers and architects have continued to emotionally cling to the SOAP bad old days, wherein the contracts between a server and a client are to be well-defined and strictly-enforced. Semantically-versioned contracts is a common pattern, where the contracts themselves are held in a separate package, and compiled for consumption by consumers. Another is the published “ServiceClient” which exposes all methods and contracts for the consuming clientA to call serviceB. Both are architecturally troubling, because once more these contracts or clients are nothing more than another form of tight-coupling.
Once again, nobody moves unless everybody does, just not in as rigid a format as SOAP provided.
from: https://medium.com/it-dead-inside/isolating-your-microservices-through-loose-coupling-48b710e28de6

Overly Coupled Microservices

The rule of thumb goes that if a change to one microservice requires the redeployment of x number of other microservices in order for all of them to be successful, then the higher x is, the worse your architecture is.
https://medium.com/it-dead-inside/domain-driven-design-in-the-era-of-icroservices-de2be01821ed

Thursday, May 2, 2019

Waterfall better than Agile without Business Support

For agile to be effective, stakeholders and product owners have to change their behaviors and provide a conducive environment for the delivery team. Else, they should just stick with traditional waterfall because doing agile without reaping the benefit is sheer stupidity.
https://blog.gds-gov.tech/the-biggest-myth-of-agile-development-faster-cheaper-and-better-outcome-27c20a95978c

Wednesday, April 24, 2019

Everything is either a Service, Entity, or Value

First, remember that everything in your system is either a Service, Entity or Value. I didn’t make those names up: I learned them from Eric Evans in Domain-Driven Design.
https://blog.thecodewhisperer.com/permalink/when-is-it-safe-to-introduce-test-doubles

Tuesday, April 23, 2019

Fourth generation languages

Another is that trying to make a language syntax English-like often demands that the ``English'' it speaks be bent seriously out of shape, so much so that the superficial resemblance to natural language is as confusing as a traditional syntax would have been. (You see this bad effect in a lot of so-called ``fourth generation'' and commercial database-query languages.)
http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s09.html