Reads and links May 1st to May 15th 2018

Links Thoughts
Day one course Like Shawn’s material. I did not buy it, as am already a power user of Dayone. If you thinking about journaling, I would think this would be wonderful
Concurrency and Parallelism Simple explanation about the most powerful concepts in programming.
Kids view Another great writeup from NPR for
Startup ideas This was a good overview if ur in a startup. Not sure if I can translate this in a big shop where I’m used to.
GDPR Am sure am not alone in getting all GDPR privacy update emails. This link was a good overview.

JAVA 9 takeWhile and doWhile

Trying to get my hands wet with Java 9. Looks like the streams have got another round of good method updates. Here in this gist, we are trying to demonstrate the takeWhile and the dropWhile filter in the Java 9.
public static List createSong() {
return Arrays
.asList(new Song("Venilave", 2000, "Rehman"), new Song("Va Va Vasanthame", 2002, "Raja"), new Song("Vanjokotiya", 2010, "Raja"), new Song("semmaFigure", 2008, "Rehman"), new Song("Arabic kadloram", 2001, "Rehman"), new Song("Anjali Anjali", 1995, "Raja"), new Song("Pen alla Pen alla", 2010, "Rehman"));
}
public static void main(String args[]) {
createSong().stream().takeWhile(song -> song.getAlbumYear() System.out.println(song.getAlbumYear())).map(Song::getName)
.map(String::toUpperCase).forEach(System.out::println);
}

takeWhile method

Operates on a stream and in the code, we are trying to identify the songs that were from the year that is less than 2002. This condition qualifies only one record to be returned. The returned data is

2000
VENILAVE

dropWhile method

Aging this operates on a stream as well, and this one returns all the records whose album year is after 2002. So we get back the following records.

public class Song {
private String name;
private int albumYear;
private String genre;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAlbumYear() {
return albumYear;
}
public void setAlbumYear(int albumYear) {
this.albumYear = albumYear;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public Song(String name, int albumYear, String genre){
this.name=name;
this.albumYear=albumYear;
this.genre=genre;
}

2002
VA VA VASANTHAME
2010
VANJOKOTIYA
2008
SEMMAFIGURE
2001
ARABIC KADLORAM
1995
ANJALI ANJALI
2010
PEN ALLA PEN ALLA