5 programming languages to fall in love with on St. Valentine’s Day.

Saint Valentine’s Day is a holiday of love not only toward your beloved one or family, but also to things like… programming languages. We would like to outline 5 programming languages to fall in love with on St.  Valentine’s Day.

Python

The list of reasons to love Python is infinite:

  • Prevents you from writing Spaghetti code by not compiling without proper indents.
  • Very easy to get started.
  • Multiple tutorials and mobile apps to learn Python on the run.
  • Great web frameworks like Django.
  • List of powerful packages. Just anything from csv to machine learning packages.
  • Easy to install, don’t need IDE.

Scala

Scala is not new and is growing and deemed as a future replacement to Java

  • Unlike Java has a lightweight syntax
  • Is 100% JVM compatible, so you can reuse existing modules.
  • Has great web framework called Play.
  • Implements functional programming paradigm.
  • Syntaxis sugar.

Angular 2

  • Best JS framework, great support, huge community
  • A lot of technologies relying on it. (i.e. Ionic 2).
  • Great data binding.
  • Improved version of Angular 1, with a better approach (not backward compatible).

C#

Old but good language that still dominates the charts.

  • Extremely popular with tons of examples and huge community.
  • Soon to be 100% cross-platform via .NET Core.
  • Excellent business-oriented web framework ASP.NET.
  • Great ORM frameworks, test frameworks.
  • Quite backward compatible, you will not drown with legacy code.

Kotlin

  • Very fresh and lightweight.
  • 100% JVM compatible
  • Out of box in IntelliJ IDEA because…
  • Kotlin created by developers at JetBrains and that these folks know to how to master a language. Just imagine, for so many years they studied thoroughly languages like Java, Groovy, Scala, and they surely have tons of “inspiration” to come up with a good programming language.

Let us program for you in any of this language, let us know at [email protected]

Happy St. Valentine’s Day!

 

Remove duplicate lines from a file in Scala

How to remove duplicate lines from csv or txt file?

The answer is quite straightforward: you basically need BufferedReader and BufferedWriter, and this also works for large files quite well.

 

 def removeDuplicatesFromFile(fileName : String) {

    val reader = new BufferedReader(new FileReader(fileName))
    val lines = new mutable.HashSet[String]()
    var line: String = null
    while ({line = reader.readLine; line != null}) {
      lines.add(line)
    }
    reader.close

    val writer = new BufferedWriter(new FileWriter(fileName))
    for (unique <- lines) {
      writer.write(unique)
      writer.newLine()
    }
    writer.close

  }