Optionals have been introduced in Java 8. This concept is borrowed from other languages. Primarily from languages of functional nature like Haskell, F# etc. Optional is a container object which may or may not contain a non-null value.
Let’s have a look at this example where we want to get name of a book retrieved from database:
Book book = bookRepository.findById(id);
String bookName = book.getName();
This code will compile just fine and nothing will not tell you that there is a huge problem. We forgot to check for null. …
I want to discuss a JSON format that could be helpful in reducing this problem.
If you use Angular in your project you probably have used ngx-translate library to manage your translations. This library uses JSON files to translate strings for Angular components. English translation strings would be normally located inen.json
. This is how it might look:
{
"animal.bear.name": "Beer",
"animal.bear.desc": "Bears are mammals that belong to the family Ursidae"
}
To modify the text on the UI you need:
en.json
"animal.bear.name": "Beer" -> "animal.bear.name": …
This article is for people who apply for Junior Developer role with no or little experience
I have worked as a software engineer for about 9 years. As a Team Lead in my department I help hire other software engineers. I conducted about 45 interviews for the last year. 19 of them were for Junior Developer positions. 7 candidates were with no prior engineering experience.
First step of every interview is receiving a candidate resume. Usually it contains a prior experience and education of a candidate. But what could you put in your resume when you have zero or little engineering experience and aspire to become a Junior developer? …
My department went through a transition from 5 to 25 software engineers. Number of teams grew as more and more developers joined the company. This brought many challenges, including building consistent REST API across different teams. We’ve put up together a REST Resource Naming Guide to remove confusion and uncertainty within the team.
Ideally, all design decisions should be documented and be available as general knowledge within the company. In my previous article, we’ve come up with a good name for GET endpoint. Also we’ve documented our decision process. We called it REST Resource Naming Guide. …
Recently my department went through a transition from 5 to 25 software engineers. This brought many challenges, including building consistent REST API across different teams. To improve it, we’ve put up together a REST Resource Naming Guide.
The naming guide is a set of rules on how to choose a good name for an endpoint. As you go with development — it will contain more and more rules. Each rule ideally is discussed within your company. It can be hosted in Confluence, GitHub wiki or even in your source code.
Representational state transfer (REST) is a software architectural style for creating Web services. As part of this style, your application has a state (resource). To alter the state of your application, you expose certain actions (endpoints). …
About