Builder Pattern Explained Simply

The Builder pattern is useful for creating complex objects that need step-by-step assembly. Or put more specifically, when a constructor just doesn’t do the trick anymore… Builders are incredibly common and you are already using them. For instance: Builders “chain together” methods and allow you to append method one after…

read more

Factory Pattern Explained Simply

Creational patterns abstract the instantiation process, because sometimes using new is just not cool enough. This is because instantiation can often times lead to coupling problems. Coupling problems are not cool. When you see “new”, think “concrete”. – Head First Java While this is a play on words, it is…

read more

Clean Code 101: Error Handling

Error handling is a balancing act. Too much and unnecessary errors will drive you insane. Too little and you have a terrible user experience. When things go wrong we are responsible for making sure that our code works. Use Exceptions Rather Than Return Codes Exceptions are new in the world…

read more

Clean Code 101: Functions

Computers can do 2 things: store data and do things with data. Functions are what we do and describe actions we take with the data we already have (or want to create). Consider this code: Can you figure out what this function is trying to do? Probably not. This is…

read more