SlideShare a Scribd company logo
1 of 32
Download to read offline
Option	-	A	Better	Way	to	Handle	Null	Value
Jiaming	Zhang
03	May	2017
What's	Option?
Scala	Documentation	-	Option
What's	Option?
Option	represents	optional	values.	Instances	of	Option	are	either	an	instance	of	 scala.Some 	or	the	object
None
Scala	Documentation	-	Option
What's	Option?
Option	represents	optional	values.	Instances	of	Option	are	either	an	instance	of	 scala.Some 	or	the	object
None
def	divide(x:	Double,	y:	Double):	Option[Double]	=	
		if	(y	==	0)	None	else	Some(x/y)
divide(4,2)	//	=>	Some(2.0)
divide(4,0)	//	=>	None
Scala	Documentation	-	Option
What's	Option?
Option	represents	optional	values.	Instances	of	Option	are	either	an	instance	of	 scala.Some 	or	the	object
None
def	divide(x:	Double,	y:	Double):	Option[Double]	=	
		if	(y	==	0)	None	else	Some(x/y)
divide(4,2)	//	=>	Some(2.0)
divide(4,0)	//	=>	None
//	Map	is	a	Scala	built-in	class,	equivalent	to	Python's	dict
val	phonebook	=	Map(
		"Vidar	Deòrsa"	->	"202-555-0136",
		"Tito	Oluwafunmilayo"	->	"202-555-0129"
)
phonebook.get("Vidar	Deòrsa")			//	=>	Some(202-555-0136)
phonebook.get("Anthony	Asbury")	//	=>	None
Scala	Documentation	-	Option
Why	Use	Option	instead	of	Null?
Why	Use	Option	instead	of	Null?
1.	Clearer	Function	Signiture
Why	Use	Option	instead	of	Null?
1.	Clearer	Function	Signiture
def	listHead[T](xs:	List[T]):	T	=	{	/*	...	*/	}
listHead(List("x","y"))	//	=>	"x"
listHead(List(1,2,3))			//	=>	1
listHead(List())								//	=>	???
//	Problem
//	-	Hard	to	know	what	`listHead(List())`	returns	w/o	refering	to	doc/source	code
//	-	Some	careless	user	may	even	overlook	such	edge	case,	which	leads	to	the	infamous	NullPointerException
Why	Use	Option	instead	of	Null?
1.	Clearer	Function	Signiture
def	listHead[T](xs:	List[T]):	T	=	{	/*	...	*/	}
listHead(List("x","y"))	//	=>	"x"
listHead(List(1,2,3))			//	=>	1
listHead(List())								//	=>	???
//	Problem
//	-	Hard	to	know	what	`listHead(List())`	returns	w/o	refering	to	doc/source	code
//	-	Some	careless	user	may	even	overlook	such	edge	case,	which	leads	to	the	infamous	NullPointerException
def	listHead[T](xs:	List[T]):	Option[T]	=	{	/*	...	*/	}
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
A	function	can't	return	null	if	its	return	type	is	primitive	(e.g.	integer,	double).	An	arbitrary	value	is	usually
picked	to	represent	null.
def	search[T](haystack:	Vector[T],	needle:	T):	Int	=	{	/*	...	*/	}
search(Vector("a",	"b"),	"a")	//	=>	0
search(Vector("a",	"b"),	"x")	//	=>	-1
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
A	function	can't	return	null	if	its	return	type	is	primitive	(e.g.	integer,	double).	An	arbitrary	value	is	usually
picked	to	represent	null.
def	search[T](haystack:	Vector[T],	needle:	T):	Int	=	{	/*	...	*/	}
search(Vector("a",	"b"),	"a")	//	=>	0
search(Vector("a",	"b"),	"x")	//	=>	-1
def	search[T](haystack:	Vector[T],	needle:	T):	Option[Int]	=	{	/*	...	*/	}
search(Vector("a",	"b"),	"a")	//	=>	Some(0)
search(Vector("a",	"b"),	"x")	//	=>	None
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
A	function	can't	return	null	if	its	return	type	is	primitive	(e.g.	integer,	double).	An	arbitrary	value	is	usually
picked	to	represent	null.
def	search[T](haystack:	Vector[T],	needle:	T):	Int	=	{	/*	...	*/	}
search(Vector("a",	"b"),	"a")	//	=>	0
search(Vector("a",	"b"),	"x")	//	=>	-1
def	search[T](haystack:	Vector[T],	needle:	T):	Option[Int]	=	{	/*	...	*/	}
search(Vector("a",	"b"),	"a")	//	=>	Some(0)
search(Vector("a",	"b"),	"x")	//	=>	None
NOTE:	As	-1	is	commonly	used	to	represent	NO	FOUND,	either	approach	is	reasonable.	However,	the	2nd
apporach	is	more	idiomatic	in	Scala.
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
However,	sometimes	it's	hard	to	find	an	arbitrary	value	to	represent	null.
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
However,	sometimes	it's	hard	to	find	an	arbitrary	value	to	represent	null.
def	divide(divident:	Double,	divisor:	Double):	Double	=	{	/*	...	*/	}
divide(4,2)	//	=>	2.0
divide(4,0)	//	=>	???
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
However,	sometimes	it's	hard	to	find	an	arbitrary	value	to	represent	null.
def	divide(divident:	Double,	divisor:	Double):	Double	=	{	/*	...	*/	}
divide(4,2)	//	=>	2.0
divide(4,0)	//	=>	???
@throws(classOf[java.lang.ArithmeticException])
def	divide(divident:	Double,	divisor:	Double):	Double	=	
		if	(divisor	!=0)	divident	/	divisor
		else	throw	new	java.lang.ArithmeticException	
//	Not	ideal	as
//	1)	FP	discounrages	side-effect	and	throwing	exception	is	a	side-effect
//	2)	Exception	should	only	be	raised	when	its'	truely	exceptional
Why	Use	Option	instead	of	Null?
2.	Can't	Return	Null
However,	sometimes	it's	hard	to	find	an	arbitrary	value	to	represent	null.
def	divide(divident:	Double,	divisor:	Double):	Double	=	{	/*	...	*/	}
divide(4,2)	//	=>	2.0
divide(4,0)	//	=>	???
@throws(classOf[java.lang.ArithmeticException])
def	divide(divident:	Double,	divisor:	Double):	Double	=	
		if	(divisor	!=0)	divident	/	divisor
		else	throw	new	java.lang.ArithmeticException	
//	Not	ideal	as
//	1)	FP	discounrages	side-effect	and	throwing	exception	is	a	side-effect
//	2)	Exception	should	only	be	raised	when	its'	truely	exceptional
def	divide(divident:	Double,	divisor:	Double):	Option[Double]	=	
		if	(divisor	==	0)	None	else	Some(divident	/	divisor)
Why	Use	Option	instead	of	Null?
3.	Work	Well	w/	Pattern	Matching
Why	Use	Option	instead	of	Null?
3.	Work	Well	w/	Pattern	Matching
//	Given	this	function
def	findMax(xs:	List[Int]):	Option[Int]
findMax(List(1,3))	//	=>	Some(3)
findMax(List())				//	=>	None
//	How	can	I	write	this?
def	findAbsMax(xs:	List[Int]):	Option[Int]
findAbsMax(List(1,3))			//	=>	Some(3)
findAbsMax(List(-7,-9))	//	=>	Some(7)
findAbsMax(List())						//	=>	None
Why	Use	Option	instead	of	Null?
3.	Work	Well	w/	Pattern	Matching
//	Given	this	function
def	findMax(xs:	List[Int]):	Option[Int]
findMax(List(1,3))	//	=>	Some(3)
findMax(List())				//	=>	None
//	How	can	I	write	this?
def	findAbsMax(xs:	List[Int]):	Option[Int]
findAbsMax(List(1,3))			//	=>	Some(3)
findAbsMax(List(-7,-9))	//	=>	Some(7)
findAbsMax(List())						//	=>	None
def	findAbsMax(xs:	List[Int]):	Option[Int]	=	findMax(xs)	match	{
		case	Some(x)	=>	Some(math.abs(x))
		case	None	=>	None
}
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
List(List(0,1,2),	List(3,4,5)).flatMap(x	=>	x)	//	=>	???
List(List(1),	List(),	List(2)).flatMap(x	=>	x)	//	=>	???
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
List(List(0,1,2),	List(3,4,5)).flatMap(x	=>	x)	//	=>	???
List(List(1),	List(),	List(2)).flatMap(x	=>	x)	//	=>	???
List(List(0,1,2),	List(3,4,5)).flatMap(x	=>	x)	//	=>	List(0,1,2,3,4,5)
List(List(1),	List(),	List(2)).flatMap(x	=>	x)	//	=>	List(1,2)
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
List(	List(1),	List(),	List(2)	).flatMap(x	=>	x)	//	=>	List(1,2)
List(	Some(1),	None,			Some(2)	).flatMap(x	=>	x)	//	=>	???
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
List(	List(1),	List(),	List(2)	).flatMap(x	=>	x)	//	=>	List(1,2)
List(	Some(1),	None,			Some(2)	).flatMap(x	=>	x)	//	=>	???
List(	List(1),	List(),	List(2)	).flatMap(x	=>	x)	//	=>	List(1,2)
List(	Some(1),	None,			Some(2)	).flatMap(x	=>	x)	//	=>	List(1,2)
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
List(	List(1),	List(),	List(2)	).flatMap(x	=>	x)	//	=>	List(1,2)
List(	Some(1),	None,			Some(2)	).flatMap(x	=>	x)	//	=>	???
List(	List(1),	List(),	List(2)	).flatMap(x	=>	x)	//	=>	List(1,2)
List(	Some(1),	None,			Some(2)	).flatMap(x	=>	x)	//	=>	List(1,2)
Takeaway:	You	can	basically	treat	Some	as	a	List	that	contains	exactly	one	element	and	None	as	a	empty	List
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
Given	this	new	understanding,	let's	rewrite	this
def	findAbsMax(xs:	List[Int]):	Option[Int]	=	findMax(xs)	match	{
		case	Some(x)	=>	Some(math.abs(x))
		case	None	=>	None
}
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
Given	this	new	understanding,	let's	rewrite	this
def	findAbsMax(xs:	List[Int]):	Option[Int]	=	findMax(xs)	match	{
		case	Some(x)	=>	Some(math.abs(x))
		case	None	=>	None
}
def	findAbsMax(xs:	List[Int]):	Option[Int]	=	findMax(xs).map(math.abs)
Why	Use	Option	instead	of	Null?
4.	Work	Even	Better	w/	Higher-order	Function
Given	this	new	understanding,	let's	rewrite	this
def	findAbsMax(xs:	List[Int]):	Option[Int]	=	findMax(xs)	match	{
		case	Some(x)	=>	Some(math.abs(x))
		case	None	=>	None
}
def	findAbsMax(xs:	List[Int]):	Option[Int]	=	findMax(xs).map(math.abs)
Here	is	a	side-by-side	comparison	w/	List
List(-3).map(math.abs)	//	=>	List(3)
List().map(math.abs)			//	=>	List()
Some(-3).map(math.abs)	//	=>	Some(3)
None.map(math.abs)					//	=>	None
Why	Use	Option	instead	of	Null?
5.	Take	advantage	of	FOR	Expression
Let's	continue	the	List	vs	Option	analogy.
val	list	=	List(List(1),	List(),	List(2))
list.flatMap(x	=>	x.map(_*2))	
//	=>	List(2,4)
for	(sublist	<-	list;	item	<-	sublist)	yield	(item	*	2)
//	=>	List(2,4)
Why	Use	Option	instead	of	Null?
5.	Take	advantage	of	FOR	Expression
Let's	continue	the	List	vs	Option	analogy.
val	list	=	List(List(1),	List(),	List(2))
list.flatMap(x	=>	x.map(_*2))	
//	=>	List(2,4)
for	(sublist	<-	list;	item	<-	sublist)	yield	(item	*	2)
//	=>	List(2,4)
val	list	=	List(Some(1),	None,	Some(2))
list.flatMap(option	=>	option.map(_*2))	
//	=>	List(2,4)
for	(option	<-	list;	item	<-	option)	yield	(item	*	2)
//	=>	List(2,4)
Why	Use	Option	instead	of	Null?
5.	Take	advantage	of	FOR	Expression
Here	is	another	more	complicated	example
//	Given	this	function
def	parseInt(value:	String):	Option[Int]	=	{	/*	...	*/	}
parseInt("1")		//	=>	Some(1)
parseInt("x")		//	=>	None
parseInt(null)	//	=>	None
//	Write	function	f	so	that	
f(List("1",	"x",	"21",	null))	//	=>	List("2",	"42")
Why	Use	Option	instead	of	Null?
5.	Take	advantage	of	FOR	Expression
Here	is	another	more	complicated	example
//	Given	this	function
def	parseInt(value:	String):	Option[Int]	=	{	/*	...	*/	}
parseInt("1")		//	=>	Some(1)
parseInt("x")		//	=>	None
parseInt(null)	//	=>	None
//	Write	function	f	so	that	
f(List("1",	"x",	"21",	null))	//	=>	List("2",	"42")
def	f(list:	List[String]):	List[String]	=	for	{
		item	<-	list
		number	<-	parseInt(item)
}	yield	(number*2).toString

More Related Content

What's hot

Miles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java DevelopersMiles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java DevelopersSkills Matter
 
Standard template library
Standard template libraryStandard template library
Standard template libraryJancypriya M
 
Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programmingshinyduela
 
More expressive types for spark with frameless
More expressive types for spark with framelessMore expressive types for spark with frameless
More expressive types for spark with framelessMiguel Pérez Pasalodos
 
Few simple-type-tricks in scala
Few simple-type-tricks in scalaFew simple-type-tricks in scala
Few simple-type-tricks in scalaRuslan Shevchenko
 
Ifi7184 lesson3
Ifi7184 lesson3Ifi7184 lesson3
Ifi7184 lesson3Sónia
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++rprajat007
 
Introduction To Csharp
Introduction To CsharpIntroduction To Csharp
Introduction To Csharpsarfarazali
 
saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...
saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...
saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...butest
 
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...scalaconfjp
 
An Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersAn Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersMiles Sabin
 
High Wizardry in the Land of Scala
High Wizardry in the Land of ScalaHigh Wizardry in the Land of Scala
High Wizardry in the Land of Scaladjspiewak
 

What's hot (20)

Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
Miles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java DevelopersMiles Sabin Introduction To Scala For Java Developers
Miles Sabin Introduction To Scala For Java Developers
 
Best Guide for Javascript Objects
Best Guide for Javascript ObjectsBest Guide for Javascript Objects
Best Guide for Javascript Objects
 
Generics
GenericsGenerics
Generics
 
Standard template library
Standard template libraryStandard template library
Standard template library
 
Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programming
 
Op ps
Op psOp ps
Op ps
 
More expressive types for spark with frameless
More expressive types for spark with framelessMore expressive types for spark with frameless
More expressive types for spark with frameless
 
Few simple-type-tricks in scala
Few simple-type-tricks in scalaFew simple-type-tricks in scala
Few simple-type-tricks in scala
 
Getting Started With Scala
Getting Started With ScalaGetting Started With Scala
Getting Started With Scala
 
Ifi7184 lesson3
Ifi7184 lesson3Ifi7184 lesson3
Ifi7184 lesson3
 
Ch03
Ch03Ch03
Ch03
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++
 
Introduction To Csharp
Introduction To CsharpIntroduction To Csharp
Introduction To Csharp
 
Js objects
Js objectsJs objects
Js objects
 
OOPs & Inheritance Notes
OOPs & Inheritance NotesOOPs & Inheritance Notes
OOPs & Inheritance Notes
 
saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...
saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...
saihw1_weka_tutorial.pptx - Machine Discovery and Social Network ...
 
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
 
An Introduction to Scala for Java Developers
An Introduction to Scala for Java DevelopersAn Introduction to Scala for Java Developers
An Introduction to Scala for Java Developers
 
High Wizardry in the Land of Scala
High Wizardry in the Land of ScalaHigh Wizardry in the Land of Scala
High Wizardry in the Land of Scala
 

Similar to Option - A Better Way to Handle Null Value

First-Class Patterns
First-Class PatternsFirst-Class Patterns
First-Class PatternsJohn De Goes
 
A Scala tutorial
A Scala tutorialA Scala tutorial
A Scala tutorialDima Statz
 
Scala intro for Java devs 20150324
Scala intro for Java devs 20150324Scala intro for Java devs 20150324
Scala intro for Java devs 20150324Erik Schmiegelow
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 
Comparing Haskell & Scala
Comparing Haskell & ScalaComparing Haskell & Scala
Comparing Haskell & ScalaMartin Ockajak
 
Principles of functional progrmming in scala
Principles of functional progrmming in scalaPrinciples of functional progrmming in scala
Principles of functional progrmming in scalaehsoon
 
Ten-page Brief Overview of Swift for Scala Developers
Ten-page Brief Overview of Swift for Scala DevelopersTen-page Brief Overview of Swift for Scala Developers
Ten-page Brief Overview of Swift for Scala Developersihji
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture ThreeAngelo Corsaro
 
From Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risksFrom Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risksSeniorDevOnly
 
A Brief Introduction to Scala for Java Developers
A Brief Introduction to Scala for Java DevelopersA Brief Introduction to Scala for Java Developers
A Brief Introduction to Scala for Java DevelopersMiles Sabin
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?Tomasz Wrobel
 
Getting Started With Scala
Getting Started With ScalaGetting Started With Scala
Getting Started With ScalaMeetu Maltiar
 
2014 holden - databricks umd scala crash course
2014   holden - databricks umd scala crash course2014   holden - databricks umd scala crash course
2014 holden - databricks umd scala crash courseHolden Karau
 
Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010JUG Lausanne
 
Stepping Up : A Brief Intro to Scala
Stepping Up : A Brief Intro to ScalaStepping Up : A Brief Intro to Scala
Stepping Up : A Brief Intro to ScalaDerek Chen-Becker
 

Similar to Option - A Better Way to Handle Null Value (20)

Scala for curious
Scala for curiousScala for curious
Scala for curious
 
First-Class Patterns
First-Class PatternsFirst-Class Patterns
First-Class Patterns
 
A Scala tutorial
A Scala tutorialA Scala tutorial
A Scala tutorial
 
Scala intro for Java devs 20150324
Scala intro for Java devs 20150324Scala intro for Java devs 20150324
Scala intro for Java devs 20150324
 
Introducing scala
Introducing scalaIntroducing scala
Introducing scala
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 
Comparing Haskell & Scala
Comparing Haskell & ScalaComparing Haskell & Scala
Comparing Haskell & Scala
 
Scala Bootcamp 1
Scala Bootcamp 1Scala Bootcamp 1
Scala Bootcamp 1
 
Principles of functional progrmming in scala
Principles of functional progrmming in scalaPrinciples of functional progrmming in scala
Principles of functional progrmming in scala
 
SacalaZa #1
SacalaZa #1SacalaZa #1
SacalaZa #1
 
Functional object
Functional objectFunctional object
Functional object
 
Ten-page Brief Overview of Swift for Scala Developers
Ten-page Brief Overview of Swift for Scala DevelopersTen-page Brief Overview of Swift for Scala Developers
Ten-page Brief Overview of Swift for Scala Developers
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture Three
 
From Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risksFrom Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risks
 
A Brief Introduction to Scala for Java Developers
A Brief Introduction to Scala for Java DevelopersA Brief Introduction to Scala for Java Developers
A Brief Introduction to Scala for Java Developers
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?
 
Getting Started With Scala
Getting Started With ScalaGetting Started With Scala
Getting Started With Scala
 
2014 holden - databricks umd scala crash course
2014   holden - databricks umd scala crash course2014   holden - databricks umd scala crash course
2014 holden - databricks umd scala crash course
 
Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010Introduction à Scala - Michel Schinz - January 2010
Introduction à Scala - Michel Schinz - January 2010
 
Stepping Up : A Brief Intro to Scala
Stepping Up : A Brief Intro to ScalaStepping Up : A Brief Intro to Scala
Stepping Up : A Brief Intro to Scala
 

More from Jiaming Zhang

Elasticsearch Internal - Shards
Elasticsearch Internal - ShardsElasticsearch Internal - Shards
Elasticsearch Internal - ShardsJiaming Zhang
 
Loop Like a Functional Programing Native
Loop Like a Functional Programing NativeLoop Like a Functional Programing Native
Loop Like a Functional Programing NativeJiaming Zhang
 
Functional Programing Principles
Functional Programing PrinciplesFunctional Programing Principles
Functional Programing PrinciplesJiaming Zhang
 
Job Posts Comparison (Linkedin vs Indeed)
Job Posts Comparison (Linkedin vs Indeed) Job Posts Comparison (Linkedin vs Indeed)
Job Posts Comparison (Linkedin vs Indeed) Jiaming Zhang
 
Understand the Demand of Analyst Opportunity in U.S
Understand the Demand of Analyst Opportunity in U.SUnderstand the Demand of Analyst Opportunity in U.S
Understand the Demand of Analyst Opportunity in U.SJiaming Zhang
 
Course Project: Collaboration Proposal Between Port Authority and Tiramisu Team
Course Project: Collaboration Proposal Between Port Authority and Tiramisu TeamCourse Project: Collaboration Proposal Between Port Authority and Tiramisu Team
Course Project: Collaboration Proposal Between Port Authority and Tiramisu TeamJiaming Zhang
 

More from Jiaming Zhang (6)

Elasticsearch Internal - Shards
Elasticsearch Internal - ShardsElasticsearch Internal - Shards
Elasticsearch Internal - Shards
 
Loop Like a Functional Programing Native
Loop Like a Functional Programing NativeLoop Like a Functional Programing Native
Loop Like a Functional Programing Native
 
Functional Programing Principles
Functional Programing PrinciplesFunctional Programing Principles
Functional Programing Principles
 
Job Posts Comparison (Linkedin vs Indeed)
Job Posts Comparison (Linkedin vs Indeed) Job Posts Comparison (Linkedin vs Indeed)
Job Posts Comparison (Linkedin vs Indeed)
 
Understand the Demand of Analyst Opportunity in U.S
Understand the Demand of Analyst Opportunity in U.SUnderstand the Demand of Analyst Opportunity in U.S
Understand the Demand of Analyst Opportunity in U.S
 
Course Project: Collaboration Proposal Between Port Authority and Tiramisu Team
Course Project: Collaboration Proposal Between Port Authority and Tiramisu TeamCourse Project: Collaboration Proposal Between Port Authority and Tiramisu Team
Course Project: Collaboration Proposal Between Port Authority and Tiramisu Team
 

Recently uploaded

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 

Option - A Better Way to Handle Null Value