Collections in Scala (Part-2) | Set

Reading Time: 4 minutes Collections in Scala systematically distinguish between mutable and immutable collections. In the previous blog, we had covered – An Overview of Collections and its types in Scala (Im)Mutability in Scala You may go through the Collections And (Im)Mutability in Scala (Part-1). So, In this Blog we will discuss Scala Set in detail. Set – Scala Sets are iterables that does not contain any duplicate element. Continue Reading

Understanding Java enums

Introduction to JAVA COLLECTIONS

Reading Time: 2 minutes In this blog we will understand basics of JAVA Collections framework. What are JAVA Collections and Why do we need them? The Collection in Java is a framework that provides an architecture to store and manipulate the group of objects. Collections are like containers that group multiple items in a single unit. For example, a jar of chocolates, a list of names, etc. Collections are used in Continue Reading

Java: back to basics.

Java Stream API tutorial

Reading Time: 3 minutes Java Stream API was one of the major features released with Java 8, that let you code in declarative style. It supports function-style operations on streams of elements, such as map, filter and various other transformations. Streams vs Collection It is a myth that Java Stream API have replaced Collections in Java. Most of the collections are a main source for the stream to work Continue Reading

Are you using Scala Collection efficiently?

Reading Time: 5 minutes In this blog, We will be going to explore how we can use scala collections efficiently . Though, we are taking care of immutability but still something more can be done to make your code more readable and faster. List vs Vector: Vector is a collection with good random access. List is indeed a linked list with very fast append-first operation (::), but the links Continue Reading

Scala Map

Reading Time: 6 minutes Scala Map is a collection of Key-value pair. A map cannot have duplicate keys but different keys can have same values i.e keys are unique whereas values can be duplicate. Maps in Scala are not language syntax. They are library abstractions that you can extend and adapt. Scala provides mutable and immutable alternatives for maps. Class hierarchy for scala maps is shown below:   Image Continue Reading

Effective Programming In Scala – Part 1 : Standardizing code in better way

Reading Time: 4 minutes A language is a set of standards. One has to follow them in order to avail benefits from the language. In order to maintain these standards, code in Scala has to be written in order to minimize the errors whether they are related with the concepts like redundancy of operations, use of properties of language those not supported by ScalaStyle or ScapeGoat or other checkers. Continue Reading

Parallel Collections in Scala

Reading Time: < 1 minute As multi-core becomes a standard, writing code which can harness the power of the cores remains a formidable challenge. The following KnolX session, tried to decode how scala is trying to give us an advantage by providing us parallel collections. It also discusses, which scenarios lend themselves to parallel processing and discusses the pitfalls of others.