Constraints: Null, Empty, and Blank.

As I see there is some confusion related to validation annotations usage in Java. Let’s see a quick example of the three most confusing annotations from the Hibernate Validator.

@NotNull

public class User {

   @NotNull
   private String name;


   // ...
}
Value passedValidation result
<null>🍎 – validation failed
“”🍏 – validation passed
" "🍏 – validation passed
“Alex”🍏 – validation passed

Note: only null values are not allowed, emtpy value will pass this validation.

@NotEmpty

public class User {

   @NotEmpty
   private String name;


   // ...
}
Value passedValidation result
<null>🍎 – validation failed
“”🍎 – validation failed
" "🍏 – validation passed
“Alex”🍏 – validation passed

Note: null and empty size/length values are not allowed, values with multiple spaces will pass this validation.

@NotBlank

public class User {

   @NotBlank
   private String name;


   // ...
}
Value passedValidation result
<null>🍎 – validation failed
“”🍎 – validation failed
" "🍎 – validation failed
“Alex”🍏 – validation passed

Note: null values are not allowed and trimmed length must be greater than zero.

Title image by Matthias BΓΆckel from Pixabay

Newsletter – Week 43, 2021

News

Articles

Videos

Newsletter – Week 42, 2021

News

Articles

Videos

Newsletter – Week 41, 2021

News

Articles

Videos

GitHub Rising Stars September 2021

Β GitHubΒ trends for September already there. Let’s go!

Java


Zeus IoT

Total stars:Β 508Last month stars:Β 371Growth:Β 73%

https://github.com/zmops/zeus-iot

About the project:Β Zeus IoT is the world’s first open source Internet of Things distributed collection platform based on Zabbix, with the ability to collect, analyze, and store data from millions of IoT devices.


MusicBot

Total stars:Β 2348Last month stars:Β 974Growth:Β 41%

https://github.com/jagrosh/MusicBot

About the project:Β a Discord music bot that’s easy to set up and run yourself.


DSA-Bootcamp-Java

Total stars:Β 3841Last month stars:Β 1086Growth:Β 28%

https://github.com/kunal-kushwaha/DSA-Bootcamp-Java

About the project:Β repository consists of the code samples, assignments, and the curriculum for the Community Classroom complete Data Structures & Algorithms Java bootcamp.


FtcRobotController

Total stars:Β 164Last month stars:Β 36Growth:Β 22%

https://github.com/FIRST-Tech-Challenge/FtcRobotController

About the project:Β repository contains the source code that is used to build an Android app to control aΒ FIRSTΒ Tech Challenge competition robot.


DBeaver

Total stars:Β 2090Last month stars:Β 431Growth:Β 21%

https://github.com/dbeaver/dbeaver

About the project:Β free multi-platform database tool for developers, SQL programmers, database administrators and analysts.
Supports any database which has JDBC driver (which basically means – ANY database).Β 

Rust


Metaplex

Total stars:Β 1273Last month stars:Β 742Growth:Β 58%

https://github.com/metaplex-foundation/metaplex

About the project:Β protocol and application framework for decentralized NFT minting, storefronts, and sales.


hello-world.rs

Total stars:Β 1115Last month stars:Β 491Growth:Β 44%

https://github.com/mTvare6/hello-world.rs

About the project:Β memory safe, blazing fast, minimal and configurable hello world project written in the Rust programming language.


youki

Total stars:Β 2173Last month stars:Β 850Growth:Β 39%

https://github.com/containers/youki

About the project:Β a container runtime written in Rust (implementation of theΒ OCI runtime-specΒ in Rust, similar toΒ runc).


Anchor

Total stars:Β 630Last month stars:Β 221Growth:Β 35%

https://github.com/project-serum/anchor

About the project:Β Anchor is a framework for Solana’sΒ SealevelΒ runtime providing several convenient developer tools for writing smart contracts.


Solana Program Library

Total stars:Β 693Last month stars: 221Growth:Β 32%

https://github.com/solana-labs/solana-program-library

About the project:Β the Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs are tested against Solana’s implementation of Sealevel, solana-runtime, and deployed to its mainnet. As others implement Sealevel, we will graciously accept patches to ensure the programs here are portable across all implementations.

Obversvations

  • Interested in algorithms and data structures in Java go for DSA-Bootcamp-Java repository and Youtube videos related. All details are in the repository.
  • If you never tried DBeaver for your work with SQL databases, it is time to give this tool a try. I personally used this tool some time ago with only a positive impression about this tool.
  • If you are interested in Rust and cryptocurrencies you might also be interested in NFT. So, take a look at the Metaplex project. It grows on Github quite impressive.
  • If you love programmers’ humor take a look at hello-world.rs project, but first read a readme file to avoid misunderstanding or confusion.
  • As containers and containers management a hot topic last couple of years, youki project looks pretty interesting.
  • Does the Solana name seem familiar to you? Take a look at the Anchor project then.

Title image by Free-Photos from Pixabay.

Newsletter – Week 40, 2021

News

Articles

Videos

Newsletter – Week 39, 2021

News

Articles

Videos

Newsletter – Week 38, 2021

News

Articles

Videos

Newsletter – Week 37, 2021

News

Articles

Videos