diff options
| author | Paul Buetow <paul@buetow.org> | 2024-08-24 19:42:38 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-08-24 19:42:38 +0300 |
| commit | e1ef1b5f3e21e84fcca29bedee6d1af154d61169 (patch) | |
| tree | d3873e7e9fb474c99dc2a71ed9bc90f82cba4481 /gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html | |
| parent | 1891cb99a0eff5fd497edb44c435acdcaf5d8299 (diff) | |
Update content for html
Diffstat (limited to 'gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html')
| -rw-r--r-- | gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html b/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html index 498bdb5c..30a24079 100644 --- a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html +++ b/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html @@ -8,7 +8,7 @@ <link rel="stylesheet" href="style-override.css" /> </head> <body> -<h1 style='display: inline' id='RelearningJavaMytakeaways'>(Re)learning Java - My takeaways</h1><br /> +<h1 style='display: inline' id='relearning-java---my-takeaways'>(Re)learning Java - My takeaways</h1><br /> <br /> <span class='quote'>Published at 2022-12-24T23:18:40+02:00</span><br /> <br /> @@ -26,13 +26,13 @@ <br /> <span>At my workplace, as an SRE, I don't do Java a lot. I have been reading Java code to understand the software better so I can apply and suggest workarounds or fixes to existing issues and bugs. However, most of our stack is in Java, and our Software Engineers use Java as their primary programming language.</span><br /> <br /> -<h2 style='display: inline' id='StuckatJava14'>Stuck at Java 1.4</h2><br /> +<h2 style='display: inline' id='stuck-at-java-14'>Stuck at Java 1.4</h2><br /> <br /> <span>Over time, I had been missing out on many new features that were added to the language since Java 1.4, so I decided to implement my next Pet Project in Java and learn every further aspect of the language as my main goal. Of course, I still liked the idea of winning a Pet Project Prize, but my main objective was to level up my Java skills.</span><br /> <br /> -<h2 style='display: inline' id='RelearningupskillingtoJava18'>(Re)learning & upskilling to Java 18</h2><br /> +<h2 style='display: inline' id='relearning--upskilling-to-java-18'>(Re)learning & upskilling to Java 18</h2><br /> <br /> -<h3 style='display: inline' id='EffectiveJava'>Effective Java</h3><br /> +<h3 style='display: inline' id='effective-java'>Effective Java</h3><br /> <br /> <span>This book was recommended by my brother and also by at least another colleague at work to be one of the best, if not the best, book about Java programming. I read the whole book from the beginning to the end and immersed myself in it. I fully agree; this is a great book. Every Java developer or Java software engineer should read it!</span><br /> <br /> @@ -42,30 +42,30 @@ <br /> <a class='textlink' href='https://dev.to/kylec32/series/2292'>Kyle Carter's 90-part Effective Java Series </a><br /> <br /> -<h3 style='display: inline' id='JavaPubHouse'>Java Pub House</h3><br /> +<h3 style='display: inline' id='java-pub-house'>Java Pub House</h3><br /> <br /> <span>During my lunch breaks, I usually have a walk around the block or in a nearby park. I used that time to listen to the Java Pub House podcast. I listened to *every* episode and learned tons of new stuff. I can highly recommend this podcast. Especially GraalVM, a high-performance JDK distribution written for Java and other JVM languages, captured my attention. GraalVM can compile Java code into native binaries, improving performance and easing the distribution of Java programs. Because of the latter, I should release a VS-Sim GraalVM edition one day through a Linux AppImage ;-).</span><br /> <br /> <a class='textlink' href='https://www.javapubhouse.com'>https://www.javapubhouse.com</a><br /> <a class='textlink' href='https://www.graalvm.org'>https://www.graalvm.org</a><br /> <br /> -<h3 style='display: inline' id='JavaConcurrencycourse'>Java Concurrency course</h3><br /> +<h3 style='display: inline' id='java-concurrency-course'>Java Concurrency course</h3><br /> <br /> <span>I also watched a course on O'Reilly Safari Books online about Java Concurrency. That gave an excellent refresher on how the Java thread pools work and what were the concurrency primitives available in the standard library.</span><br /> <br /> -<h3 style='display: inline' id='ReadalotofJavacode'>Read a lot of Java code</h3><br /> +<h3 style='display: inline' id='read-a-lot-of-java-code'>Read a lot of Java code</h3><br /> <br /> <span>First, the source code is often the best documentation (if programmed nicely), and second, it helps to get the hang of the language and standard practices. I started to read more and more Java code at work. I did that whenever I had to understand how something, in particular, worked (e.g. while troubleshooting and debugging an issue). </span><br /> <br /> -<h3 style='display: inline' id='ObservedJavacodereviews'>Observed Java code reviews</h3><br /> +<h3 style='display: inline' id='observed-java-code-reviews'>Observed Java code reviews</h3><br /> <br /> <span>Another great way to get the hang of Java again was to sneak into the code reviews of the Software Engineer colleagues. They are the expert on the matter and are a great source to copy knowledge. It's OK to stay passive and only follow the reviews. Sometimes, it's OK to step up and take ownership of the review. The developers will also always be happy to answer any naive questions which come up.</span><br /> <br /> -<h3 style='display: inline' id='TookownershipofaroadmapJavaproject'>Took ownership of a roadmap-Java project</h3><br /> +<h3 style='display: inline' id='took-ownership-of-a-roadmap-java-project'>Took ownership of a roadmap-Java project</h3><br /> <br /> <span>Besides my Pet Project, I also took ownership of a regular roadmap Java project at work, making an internal Java service capable of running in Kubernetes. This was a bunch of minor changes and adding a bunch of classes and unit tests dealing with the statelessness and a persistent job queue in Redis. The job also involved reading and understanding a lot of already existing Java code. It wasn't part of my job description, but it was fun, and I learned a lot. The service runs smoothly in production now. Of course, all of my code got reviewed by my Software Engineering colleagues.</span><br /> <br /> -<h2 style='display: inline' id='Thegood'>The good</h2><br /> +<h2 style='display: inline' id='the-good'>The good</h2><br /> <br /> <span>From the new language features and syntaxes, there are many personal takeaways, and I can't possibly list them all, but here are some of my personal highlights:</span><br /> <br /> @@ -86,7 +86,7 @@ <li>Lambdas are much cleaner, shorter and easier to read than anonymous classes. Many Java libraries require passing instances of (anonymous) classes (e.g. in Swing) to other objects. Lambdas are so lovely because they are primarily compatible with the passing of anonymous classes, so they are a 1:1 replacement in many instances. Lambdas also play very nicely together with the Java functional interfaces, as each Lambda got a type, and the type can be an already existing functional interface (or, if you got a particular case, you could define your custom functional interface for your own set of Lambdas, of course).</li> <li>I love the concept of Java records. You can think of a record as an immutable object holding some data (as members). They are ideal for pipe and stream processing. They are much easier to define (with much less boilerplate) and come with write protection out of the box.</li> </ul><br /> -<h2 style='display: inline' id='Thebadandtheugly'>The bad and the ugly</h2><br /> +<h2 style='display: inline' id='the-bad-and-the-ugly'>The bad and the ugly</h2><br /> <br /> <span>There are also many ugly corners in Java. Many are doomed to stay there forever due to historical decisions and ensuring backward compatibility with older versions of the Java language and the Java standard library. </span><br /> <br /> @@ -100,7 +100,7 @@ <li>Being a bit spoiled by Golang's Goroutines, I was shocked about the limitations of the Java threads. They are resource hungry, and you can't just spin up millions of them as you would with Goroutines. I knew this limitation of threads already (as it's not a problem of the language but of how threads work in the OS), but still, I was pretty shocked when I got reminded of them again. Of course, there's a workaround: Use asynchronous sockets so that you don't waste a whole thread on a single I/O operation (in my case, waiting for a network response). Golang's runtime does that automatically for you: An OS thread will be re-used for other tasks until the network socket unblocks. Every modern programming language should support lightweight threads or Coroutines like Go's Goroutines. </li> </ul><br /> <br /> -<h2 style='display: inline' id='Conclusion'>Conclusion</h2><br /> +<h2 style='display: inline' id='conclusion'>Conclusion</h2><br /> <br /> <span>While (re)learning Java, I felt like a student again and was quite enthusiastic about it initially. I invested around half a year, immersing myself intensively in Java (again). The last time I did that was many years ago as a university student. I even won a Silver Prize at work, implementing a project this year (2022 as of writing this). I feel confident now with understanding, debugging and patching Java code at work, which boosted my debugging and troubleshooting skills. </span><br /> <br /> |
