Open in app
Home
Notifications
Lists
Stories

Write
Ricardo Romero Benitez
Ricardo Romero Benitez

Home

Apr 27

Java Keywords: Static

The static keyword is pretty well known and commonly used in different java design patterns but there are some places where is not often used but is still useful to know. Usually, when we use the static keyword, we are trying to say “Hey! I just want 1 instance of…

Java

2 min read

Java Keywords: Static
Java Keywords: Static

Mar 21

Java Design Patterns: Prototype

NOTE: Usually this design pattern is used with Clonable, but it isn’t recommended. Check here for more info (search for Copy Constructor versus Cloning). In terms of programming, usually (USUALLY), we need to create objects with identical properties as other ones, it may kind of like this: EventDto.java public class…

Java

2 min read

Java Design Patterns: Prototype
Java Design Patterns: Prototype

Mar 11

Java Design Patterns: Observer

In all these years of being a java developer, I’ve seen quite a few design patterns, but the observer isn’t one of them that I’ve seen used very often. Probably because its structure is not fully hierarchical and it can be more difficult to debug and read when you don’t…

Java

3 min read

Java Design Patterns: Observer
Java Design Patterns: Observer

Mar 2

Java Design Patterns: Factory

Let’s recap, you are a programmer, as a programmer you love conditions, since you started programming it is the first thing you learned. But then you see something like this: public void createPayment(PaymentType paymentType) { if (paymentType == PaymentType.CREDIT_CARD) {// More code here…

Java

3 min read

Java Design Patterns: Factory
Java Design Patterns: Factory

Feb 23

Java Design Patterns: Builder

Everybody has faced the same problem once coding. You need to create an object, and it has a huge constructor. Example: User user = new User("1", "John", "Travolta", "amazing street", "2", "New York"); User.java public class User { private String id; private String name…

Design Patterns

3 min read

Java Design Patterns: Builder
Java Design Patterns: Builder

Feb 18

Java Design Patterns: Singleton

Let’s say you want to use a class several times since it usually has information that must be used multiple times and also be easily accessible. One approach to the solution is creating a class instance in every method that you require it and using as much as you want …

Java

3 min read

Java Design Patterns: Singleton
Java Design Patterns: Singleton

Nov 25, 2020

Creando restricciones personalizadas en Spring Boot (REST Api)

Si quieres validar tu objeto automáticamente en Spring Boot se puede usar “javax.validation.ConstraintValidator”. En esté post dejaré un ejemplo de cómo se puede crear uno especifico para tu projecto. En este ejemplo verificará si el campo LocalDate es mayor de edad. También puedes usar los ya creados que puedes mirar…

Spring Boot

2 min read


Feb 11, 2019

Por qué deberías viajar

Esta story viene dada por una reflexión que tengo en mi cabeza desde que deje mi casa, en el año 2010. Mi familia nunca ha tenido demasiado dinero ni interés en viajar por lo que siempre he vivido en mi ciudad y sólo he ido de una ciudad a otra…

Superacion

3 min read

Por qué deberías viajar
Por qué deberías viajar

Feb 11, 2019

Why you should travel

This story comes because a reflexion that I have in my head since I left my house, in 2010. …

Travel

3 min read

Why you should travel
Why you should travel

Dec 23, 2018

La importancia de aprender idiomas

Todos hemos empezado en el colegio a aprender uno o varios idiomas, se nos enseña en mejor o en peor medida a saber comunicarnos en un ambiente que no es el que usualmente necesitamos en nuestro entorno. …

Idiomas

3 min read

La importancia de aprender idiomas
La importancia de aprender idiomas
Ricardo Romero Benitez

Ricardo Romero Benitez

Software, travel and adventure

Following
  • Muzli

    Muzli

  • Tim Sneath

    Tim Sneath

  • Michael Thomsen

    Michael Thomsen

  • The Angry Therapist

    The Angry Therapist

  • Chris Sells

    Chris Sells

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable