<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Madusudanan.B.N</title>
    <description>The latest articles on Forem by Madusudanan.B.N (@bmadusudanan).</description>
    <link>https://forem.com/bmadusudanan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F11847%2FT52XdpKA.jpg</url>
      <title>Forem: Madusudanan.B.N</title>
      <link>https://forem.com/bmadusudanan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bmadusudanan"/>
    <language>en</language>
    <item>
      <title>The state of Java and the JVM ecosystem in 2017</title>
      <dc:creator>Madusudanan.B.N</dc:creator>
      <pubDate>Mon, 06 Nov 2017 07:14:09 +0000</pubDate>
      <link>https://forem.com/bmadusudanan/the-state-of-java-and-the-jvm-ecosystem-in-2017-bna</link>
      <guid>https://forem.com/bmadusudanan/the-state-of-java-and-the-jvm-ecosystem-in-2017-bna</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Java was initially developed in 1995 and it has come a very long way. Many of you might already have experience with Java, but here is a fun short film to get started.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/E3418SeWZfQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;It was part of a conference, so ignore the promo at the end if you want to.&lt;/p&gt;

&lt;p&gt;Java has been a subject of praise, criticism, rants and what not. But recently there has been a very quite a few interesting developments regarding both the language and the JVM ecosystem. I see these changes as a massive turnaround to how Java/JVM was being developed and it could change the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recent updates 
&lt;/h2&gt;

&lt;p&gt;1) Moving Java faster&lt;/p&gt;

&lt;p&gt;This blog post caught my eye - &lt;a href="https://mreinhold.org/blog/forward-faster"&gt;Moving java forward faster by Mark Reinhold&lt;/a&gt;. Mark is the chief architect in the Java Platform Group at Oracle. &lt;/p&gt;

&lt;p&gt;Some key takeaways of the blog post.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JDK release cycles are set to become shorter. Six months for major versions.&lt;/li&gt;
&lt;li&gt;Long term support for major releases. Initial plan is for three years.&lt;/li&gt;
&lt;li&gt;Quarterly update releases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You might wonder that six months is still quite slow but for a language/platform this massive, it is very impressive if achieved.&lt;/p&gt;

&lt;p&gt;I encourage you to read the article in its entirety.&lt;/p&gt;

&lt;p&gt;2) Oracle plans to open source its JDK&lt;/p&gt;

&lt;p&gt;To the folks who are new to Java or have not programmed in it. There are multiple JDKs that you can use to develop. Oracle JDK, Open JDK and a few other ones. The &lt;a href="https://en.wikipedia.org/wiki/Java_Development_Kit"&gt;wikipedia&lt;/a&gt; page maintains a list of them.&lt;/p&gt;

&lt;p&gt;Until recently, Oracle announced that they will be open sourcing their JDK - &lt;a href="https://www.infoq.com/news/2017/10/javaone-opening"&gt;https://www.infoq.com/news/2017/10/javaone-opening&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is big news since it was always a confusion among the community on which one to choose. Open JDK is mostly preferred, but there was this conundrum that Oracle JDK had better features and gets updates faster. All that is going to change and in due course of time, Oracle JDK will be merged with Open JDK.&lt;/p&gt;

&lt;p&gt;3) &lt;a href="https://sdtimes.com/industry-spotlight-java-ee-finally-gets-rebooted/"&gt;Java EE gets a reboot and is donated to Eclipse Foundation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Java EE was in a very poor state, partly because feature updates were very slow and it was largely ignored. Not only that it will be a reboot/change, it also moves to the Eclipse Foundation which is a much better and more open developer community.&lt;/p&gt;

&lt;p&gt;4) Java 9 and new enhancements&lt;/p&gt;

&lt;p&gt;Java language is in version 9 now. Java 8 brought a lot of features, this version has even more. &lt;/p&gt;

&lt;p&gt;Quick feature rundown - &lt;a href="http://www.baeldung.com/new-java-9"&gt;http://www.baeldung.com/new-java-9&lt;/a&gt;&lt;br&gt;
Official doc from Oracle - &lt;a href="https://docs.oracle.com/javase/9/whatsnew/"&gt;https://docs.oracle.com/javase/9/whatsnew/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Java has a REPL now and a lot of cool functional programming features got added such as Closures and Lambda expressions.&lt;/p&gt;

&lt;p&gt;5) JVM - Improved GC algorithms&lt;/p&gt;

&lt;p&gt;Even though some might disagree that Java is a good choice for a language, the JVM on the other hand is perhaps the most stable cross platform run time as of today. In Java 7, we didn't have much choices regarding GC optimization and tuning. Java 8 brought G1 GC among others. Java 9 made G1GC as default as it was found to be much better than parallel GC for many use cases.&lt;/p&gt;

&lt;p&gt;Apart from that, there are two other algorithms that are coming up. One is the &lt;a href="https://www.infoworld.com/article/3235391/java/zgc-large-heap-java-garbage-collector-may-go-open-source.html"&gt;ZGC&lt;/a&gt; for multi-terabyte heaps and the other is &lt;a href="http://openjdk.java.net/projects/shenandoah/"&gt;Shenandoah&lt;/a&gt; for low pause GC. We might see them sooner since JDK development is set to move faster now.&lt;/p&gt;

&lt;p&gt;There is always a good GC algorithm that you can choose depending upon your use case.&lt;/p&gt;

&lt;p&gt;6) More interesting projects lined up&lt;/p&gt;

&lt;p&gt;There are many interesting projects as part of Open JDK, but two that caught my eye were &lt;a href="http://openjdk.java.net/projects/valhalla/"&gt;Project valhalla&lt;/a&gt; and &lt;a href="http://openjdk.java.net/projects/amber/"&gt;Project Amber&lt;/a&gt;. They collectively bring in Value types, local variable type inference, improved generics etc ., &lt;/p&gt;

&lt;p&gt;This could change the way we use Java and has great impact on other languages in the JVM.&lt;/p&gt;

&lt;p&gt;7) JVM languages&lt;/p&gt;

&lt;p&gt;Features part of JVM gives a boost to languages that run top of it, since they don't have to do a lot syntactic sugar which means more work for the compiler.&lt;/p&gt;

&lt;p&gt;Scala, Kotlin, Clojure , Eta , Groovy are some of the famous languages.&lt;/p&gt;

&lt;p&gt;Of these Scala and Kotlin stand out. Some might even think that Kotlin might replace Scala(they are not comparable). More on that below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speculation &amp;amp; Opinions
&lt;/h2&gt;

&lt;p&gt;This section I present some of my opinions which could be wrong. Feel free to disagree and discuss in the comments.&lt;/p&gt;

&lt;p&gt;&lt;b&gt; On Kotlin's future &lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Kotlin seems to be a wonderful language from the folks at Jetbrains. It has official support for Android in mobile development, Spring framework has Kotlin support. But the language at its core is more like syntactic sugar over Java. Currently it is much better than Java due to its advanced features, but considering that Java language by itself is coming up with many modern syntax and features, it could catch up. And beyond a point, the differences might be even negligible. This and also there is a lot less Kotlin developers when compared to Java.&lt;/p&gt;

&lt;p&gt;This is exactly opposite of what is going on in the industry right now i.e Kotlin is gaining more popularity, but then again it is my opinion.&lt;/p&gt;

&lt;p&gt;&lt;b&gt; On choosing a language &lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Groovy seems to be the least popular. It was a good language but its activity is steadily on the decrease. If you were to choose a language I would consider the below points.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Java if you are an Object Oriented Programming shop.&lt;/li&gt;
&lt;li&gt;Scala if you prefer Functional Programming(FP) + OOP.&lt;/li&gt;
&lt;li&gt;Eta lang if you prefer purely functional and/or a Haskell enthusiast.&lt;/li&gt;
&lt;li&gt;Clojure if you like dynamically typed FP languages.&lt;/li&gt;
&lt;li&gt;Kotlin if you are into Android and you need something better than Java but not the one that requires a huge learning curve.(This might change as I suggested above)&lt;/li&gt;
&lt;li&gt;Groovy is currently used as a scripting language.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Closing Notes
&lt;/h2&gt;

&lt;p&gt;That's all I have for the updates. I have never been more interested and optimistic about Java and JVM as I am now. There is no better time to be a developer on the JVM platform.&lt;/p&gt;

&lt;p&gt;P.S : Do point out any typos or if anything can be improved.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>java</category>
      <category>jvm</category>
    </item>
    <item>
      <title>A Beginner's guide to the Scala Programming Language</title>
      <dc:creator>Madusudanan.B.N</dc:creator>
      <pubDate>Thu, 11 May 2017 13:29:10 +0000</pubDate>
      <link>https://forem.com/bmadusudanan/a-beginners-guide-to-learn-scala</link>
      <guid>https://forem.com/bmadusudanan/a-beginners-guide-to-learn-scala</guid>
      <description>&lt;p&gt;I have been dabbling with scala for some time now and most of the questions that I get from my friends/colleagues/random people is that &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why scala is hard?&lt;/li&gt;
&lt;li&gt;How to learn scala in an easy way? &lt;/li&gt;
&lt;li&gt;Is learning scala worth it?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article I present the learning path that I took, the mistakes I made along the way and what I learnt.&lt;/p&gt;

&lt;p&gt;I will focus mostly on a path for java developers since they are the majority, but other devs can also learn a lot from this article.&lt;/p&gt;

&lt;h4&gt;Little bit of background&lt;/h4&gt;

&lt;p&gt;The history of scala is summed up pretty well in the &lt;a href="https://en.wikipedia.org/wiki/Scala_(programming_language)" rel="noopener noreferrer"&gt;scala lang wikipedia&lt;/a&gt; article. Main motivation behind creating scala was to create a multi paradigm programming language which is functional,object oriented which runs on the JVM. We all know that many languages now target the JVM for its performance,widespread usage etc.,&lt;/p&gt;

&lt;p&gt;Some of the other languages targeting the JVM are &lt;a href="https://clojure.org/" rel="noopener noreferrer"&gt;clojure&lt;/a&gt;, &lt;a href="https://ceylon-lang.org/" rel="noopener noreferrer"&gt;Ceylon lang&lt;/a&gt;, &lt;a href="https://kotlinlang.org/" rel="noopener noreferrer"&gt;Kotlin&lt;/a&gt;, &lt;a href="http://groovy-lang.org/" rel="noopener noreferrer"&gt;Groovy&lt;/a&gt;, &lt;a href="http://eta-lang.org/" rel="noopener noreferrer"&gt;Eta lang&lt;/a&gt;  etc., besides java of course. But scala is unique in its own way.&lt;/p&gt;

&lt;h4&gt;Scala as the first programming language&lt;/h4&gt;

&lt;p&gt;This mistake is often because of &lt;a href="https://twitter.com/thepracticaldev/status/721716958769635328?lang=en" rel="noopener noreferrer"&gt;buzzword first design&lt;/a&gt; mindset. Scala is definitely not a beginner friendly language and it does not try to be. Not that it can't be, but it does not make sense to cram in so many things into a single language. The result will be a horrible mess of everything. &lt;/p&gt;

&lt;p&gt;Well that's not encouraging right, but don't be disheartened. Contrary to the popular myths out there, scala can be learnt with moderate effort. If you are a beginner with no programming experience then there are several MOOCs which can teach you basic programming. One of the best that I know of is &lt;a href="https://cs50.harvard.edu/" rel="noopener noreferrer"&gt;CS50&lt;/a&gt;. You can then learn little bit of python and then progress to java.&lt;/p&gt;

&lt;p&gt;In theory any OOP language would do, such as Python/Ruby/C#.&lt;/p&gt;

&lt;h4&gt;Learn the OOP side first&lt;/h4&gt; 

&lt;p&gt;Now you are all set to take on scala. The next big mistake people would normally do is to learn the functional side of it and get overwhelmed by it. Scala is not to be blamed. We should blame what we have been taught in our undergraduate courses. Almost all of the college undergraduate curriculum do not teach foundations of functional programming. As a result our style get fixed to an imperative/OOP paradigm which is very hard to get across.&lt;/p&gt;

&lt;p&gt;It is very much possible to do object oriented/imperative style programming in scala as well. This multi-paradigm style makes it perfect to learn functional programming without losing too much of your hair. I would highly recommend to learn the object oriented side of scala and convert small coding snippets/algorithms from java to scala.&lt;/p&gt;

&lt;p&gt;Since scala runs on the jvm, it can very much use java libraries with very minimal changes. Try consuming java libraries in it. The interesting part is that resulting code in scala will already be more concise/shorter due to the programming syntax of scala. &lt;/p&gt;

&lt;p&gt;Do this step before trying core scala libraries, as they embrace functional programming more. The developers of scala didn't develop equivalent imperative/oop library equivalents of what is there in java such as spring/hibernate/gson etc., since you can use their java counterparts directly in scala. Language interoperability is a huge benefit and we must take full advantage of it rather than using core scala libraries just for the buzzword or being cool.&lt;/p&gt;

&lt;h4&gt;Getting familiar with the ecosystem&lt;/h4&gt;

&lt;p&gt;Many people underestimate this step. It is very important that you should be comfortable with the tools/ecosystem because that can frustrate you even more. Since scala works on top the jvm, the major difference from java would be the compiler obviously and then a different IDE perhaps.&lt;/p&gt;

&lt;p&gt;Most scala programmers use &lt;a href="https://www.jetbrains.com/idea/" rel="noopener noreferrer"&gt;Intellij&lt;/a&gt; + Scala plugin,&lt;a href="http://scala-ide.org/" rel="noopener noreferrer"&gt;Eclipse&lt;/a&gt; as their IDEs. If you are an text editor fan there is something called &lt;a href="http://ensime.org/editors/" rel="noopener noreferrer"&gt;ensime&lt;/a&gt; which supports major text editors.&lt;/p&gt;

&lt;p&gt;We can use the traditional &lt;a href="https://maven.apache.org/" rel="noopener noreferrer"&gt;maven&lt;/a&gt; build tool for projects, but it is recommended to use the &lt;a href="http://www.scala-sbt.org/" rel="noopener noreferrer"&gt;scala build tool&lt;/a&gt; or sbt for short. Sbt offers a more simpler way to deal with dependencies and you can learn with very minimal effort to get started.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://scastie.scala-lang.org/" rel="noopener noreferrer"&gt;Scastie&lt;/a&gt; is a handy tool to share code snippets. Kind of similar to jsfiddle.&lt;/p&gt;

&lt;h4&gt;Approaching functional programming&lt;/h4&gt;

&lt;p&gt;Since scala combines OOP and FP at a fundamental level, we can resort to lazily include FP style in our codebase. From my personal experience I would take the following route.&lt;/p&gt;

&lt;p&gt;Java -&amp;gt; Scala OOP (gradual migration- since they can inter-operate)&lt;br&gt;
Scala OOP -&amp;gt; Scala FP (can be gradual/complete refactor based on the project requirements)&lt;/p&gt;

&lt;p&gt;IMO this what makes scala shine since at each stage of development/refactoring, it can be done part by part without breaking the regular development cycle if done properly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkbfqem10vfmoj51sxtgt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkbfqem10vfmoj51sxtgt.jpg" alt="Functional programming"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Why learn scala?&lt;/h4&gt;

&lt;p&gt;So why learn a language which is hard to learn and takes so much of your time? Many people generally tend to learn new technologies/languages for career growth/getting a break into the industry and for this scala is perfectly fine. But apart from this functional programming can genuinely make you a better programmer even if you don't use it in your day to day work. It makes you think in ways you have never thought before and the decision to use it for practical purposes lies with you since you can program in OOP style as well.&lt;/p&gt;

&lt;p&gt;It is also preferred in,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Machine learning (Apache spark mllib)&lt;/li&gt;
&lt;li&gt;Big data (Apache spark, Apache kafka)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.scala-js.org/" rel="noopener noreferrer"&gt;Front end development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;It also has a &lt;a href="http://www.scala-native.org/" rel="noopener noreferrer"&gt;native runtime&lt;/a&gt; now, so you are not restricted to the JVM and can take advantage of native programming libraries. Scala native is in early stages btw.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have written an article on &lt;a href="https://madusudanan.com/blog/why-scala-will-be-the-next-big-thing/" rel="noopener noreferrer"&gt;why scala will be a language that you should consider&lt;/a&gt;. Do give it a read.&lt;/p&gt;

&lt;h4&gt;Materials to learn scala&lt;/h4&gt;

&lt;p&gt;Unlike many other languages, scala does not have a standard learning path that fits experienced functional programmers/novices alike. I have categorized materials based on their format.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgflip.com%2F1otzzy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgflip.com%2F1otzzy.jpg" alt="I should learn scala"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;MOOC&lt;/cite&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.coursera.org/specializations/scala" rel="noopener noreferrer"&gt;The functional programming specialization in scala&lt;/a&gt;. I wouldn't call this beginner friendly but very comprehensive nonetheless coming from the founders of scala themselves&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;cite&gt;Books&lt;/cite&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.scala-lang.org/documentation/books.html" rel="noopener noreferrer"&gt;Scala lang books&lt;/a&gt;. This is pretty much the list that you want. All these books are very detailed and well crafted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;cite&gt;Blogs&lt;/cite&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://danielwestheide.com/scala/neophytes.html" rel="noopener noreferrer"&gt;The Neophyte's guide to scala&lt;/a&gt;. This is easily one of my favourites on many core functional programming topics.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.lihaoyi.com/" rel="noopener noreferrer"&gt;Haoyi's blog&lt;/a&gt;. Creator of scala js.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.scala-lang.org/blog/" rel="noopener noreferrer"&gt;Blogs from scala lang authors themselves&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://madusudanan.com/tags/#Scala" rel="noopener noreferrer"&gt;Scala tutorial series&lt;/a&gt;. I am writing a blog series aimed at learning scala in the exact same way I described above. But I am no perfect writer, YMMV. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Difficulty in learning something is highly subjective. Some folks find math easy and some don't. The best way is to decide for yourself keeping in mind what people have already gone through.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6tu0z4b0h9al59iwi6cd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6tu0z4b0h9al59iwi6cd.jpg" alt="Yoda much to learn"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please do point out any mistakes/typos/anything that can be improved in this post.&lt;/p&gt;

</description>
      <category>scala</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Hi, I'm Madusudanan.B.N</title>
      <dc:creator>Madusudanan.B.N</dc:creator>
      <pubDate>Thu, 11 May 2017 08:54:55 +0000</pubDate>
      <link>https://forem.com/bmadusudanan/hi-im-madusudananbn</link>
      <guid>https://forem.com/bmadusudanan/hi-im-madusudananbn</guid>
      <description>&lt;p&gt;I have been coding for around 6 years now.&lt;/p&gt;

&lt;p&gt;You can find me on Twitter as &lt;a href="https://twitter.com/BMadusudanan" rel="noopener noreferrer"&gt;@BMadusudanan&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I mostly program in these languages: Scala,Java,Python.&lt;/p&gt;

&lt;p&gt;I am currently learning more about machine learning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://madusudanan.com" rel="noopener noreferrer"&gt;My personal website&lt;/a&gt;&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
