AWS

Kinesis

Posted on

Kisesis Data Streams is the real-time data streaming service that AWS provides.   AWS provides a couple of great tutorial to get accustomed with Kinesis.   If you are new to Kinesis I would start out with this tutorial: https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis-example.html create a kinesis stream make a lambda function listen on the stream put events on […]

OCP

OCP: Functional Programming in Java

Posted on

Java8 revolutionised Java programming with the introduction of functional programming. Here is a little quiz (you ‘ll find the answers below): 1 . What is the name of the abstract method of the Consumer interface? A. apply B. accept C. test D. get   2 . Which method can you call on Optional to perform […]

Python

Python fun!

Posted on

Recently dove into Python and wanted to share the fun!   Playing with the Chuck Norris API and writing chuck quotes to a file: import requests URL = ‘https://api.chucknorris.io/jokes/random’ outFile = ‘chucknorris.html’ open(outFile, ‘w’).close() with open(outFile,’a’) as o: for i in range(1000): json_response = requests.get(URL).json() o.write(‘<h4>’ + json_response[‘value’] + ‘</h4>\n’) print(json_response[‘value’])   Surrounding each line […]

OCP

Collections: Did you know ..

Posted on

Did you know: that LinkedList implements both Queue and List that this means you can remove and add items from the beginning and end of the list in constant  time that you should use  ArrayDeque instead of Stack that a Set does not allow duplicate entries that a HashSet uses hashCode() to store its entries […]