Saturday, November 15, 2014

Impressions from Geecon in Prague - Day 2

The day 2 started earlier than the day before. A bit too early for me. While hurrying to catch the beginning of the first presentation, however, a stranger with a big suitcase passed by me in an even greater hurry, a bit confused about which way to take. I grinned to myself as I recollected the familiar face from the speakers' section of Geecon web page. Anyway, speakers are only human too...

Although latest and greatest themes in Java world these days are reactive programming, alternative languages, HTML5 and microservices, I decided to stay close to the ground at first. I chose jBMP presentation to get an update on how thinggus are moving in the old Java enterprise waters.
jBMP looks like a vivid yet mature project and it is promisingly evolving under the RedHat umbrella. In fact, the team have a strategy to focus on knowledge, business goals, their visibility and continuous improvement. Does that ring a bell? To me, that sounds quite close to what agile principles adhere to.

OK,  enough business, we all want some fun too, right? And the next presentation certainly was about how to make fun and even conquer the world with home-made devices. Guys, thank you for bringing the real 3D printer there! It was really a great introduction for a beginner to see how the thing looks like and how it works.
3Dprinter
The real 600€ 3D printer on the scene.
A wooden skeleton with a machinery visible from outside.
Two things to highlight here: a fully functional 3D printer is as cheap as 600€, and "What may fail will fail" - at least until you learn how to use it properly.
Some toolset around 3D printers:
  • 3D editors like blender, tinkercad
  • a slicer (Cura, Repetier-Host) providing more or less a functionality of missing 3D printing dialog
  • and not to forget a taft spray - very handy "tool" to improve performance of a printer when the bed is not heated, no kidding
The iBeacon did not get me yet though. These days it looks like there are many gadgets out there with great potential, but still seeking to find useful applications. iBeacon seems to fall into this category, sorry.

To let the fun continue, I switched then to the latest and greatest trends. Microservices, here I come! The idea to cut a huge system into small and focused microservices is easy to grasp. Knowing when such architecture really helps and how to design it properly is still dark waters for me. Speakers from a company based in Ostrava came to present their approach and experiences. Well, big European mobile operators under the pressure of the market tend to provide constant flow of change requests. To meet their requirements, microservices architecture seems to be a perfect match . Such systems can be maintained in distributed manner, components redeployed separately in different time-frames, failures don't pull the whole system down. Obvious drawback - transactions are hard to manage across multiple services. But as Neal pointed out, maintaining transactions can be really slow and inefficient. Designing operations as idempotent might come to the rescue - how many times have you checked an already locked door just to be sure? Certainly many times and it didn't cost much.

Later I found out why, oh my, why that app server eats so much RAM after I redeploy my applications and that there is Plumbr to aid in searching for mem leaks. Yes, classloading is really tricky even in memory consumption.
Simple rule noted down: always unregister classes you publish to anything on the app server's classpath. For the rest, almighty restart might be cheaper than the time spent on seeking leaks.

Dukescript then steered my course even deeper into the juicy modern stuff. Another attempt to bring Java everywhere, even if compiled to Javascript. Is it still Java then? Well, it seems it passes the duck test: the source code is Java, it executes in JVM, all the tooling of Java works with it. But.
The GUI is based on omnipresent HTML5, meaning that no JavaFX nor Swing components are available. Also, under the hood, the runtime obviously varies according to what different platforms have to offer - JVM where available, otherwise Dalvik on Android, RoboVM on iOS, BackToBrowser Javascript VM in modern browsers. Yes, I wrote Javascript VM. Java can really be executed even in a browser without any plugin, just plain Javascript. I have seen it working so it must be true! It still takes some time to download 2MB of scripts, but wait, this is still an unoptimized proof of concept, which already works well! It is another hit nailing Javascript to become an assembler of the web.

No more time to mention Erlang, Go, Rust, Scala, Kotlin nor Java 8. Luckily Bruce Eckel had a wonderful closing speech about all of them. Even more, he mentioned the driving forces that lead people to design new languages. Better support for parallelism, readability, even purity in design are among them. But purism proved not to be very helpful and mostly did not work. Software transactional memory has not grown to be really usable concept as well. On the other hand, inherent support of parallelism becomes a valuable selling point of modern languages, like Erlang. Even Java 8 has now support for parallel streams. Though, Java 8 stays way too boring. Maybe "Thinking in Kotlin" will be the next book by Bruce Eckel? Anyway, after all that hassle, Python stays Bruce's favourite language - no wonder, more than 20% women in the active community are and will stay another great selling point. Applause to Mr. Eckel for his insights and thank you for reading!

Tuesday, November 4, 2014

Impressions from Geecon in Prague - Day 1

Eventually, a famous Java conference came to Prague. After planning to travel to Krakow some time, it was suddenly to be here at my finger tips. As a fresh freelancer, not yet fixed to any long-term project, I decided to invest the money to inhale the atmosphere of a big conference and enjoy presence of all the people interested in Java and all the tech stack around it. So here I was to see and listen to Neal Ford - the one from ThoughtWorks, so adored for their Radar. I came alone, as freelancers often tend to, expecting to meet some familiar faces from my previous jobs. What followed was much beyond my expectations, as so many of them started suddenly popping up. Great feeling to meet so many pleasant people after 2 years spent away from Prague.

"So this is the water!" - I told to myself while Neal was talking about continuous delivery, acceptance tests and all the supportive things aiding in software development, wiring together the effort of developers, testers, operations and project managers. Warm feeling rose even higher when the very book I'm currently reading appeared on one of Neal's slides. He hit the nail again, when he stated that meta-work is more fun than real work. And it is often not productive at all, when the fun is not guided well. Damn, that is so true. Even though claiming to seek improvement in my daily work, the biggest power to drive me into my pet projects is the desire to do fun stuff to complement boring daily work. Boy, that's a relief that I'm not the only one having problems with lack of fun! But then, banks are not ACID? Again, not ACID?? Then, how the hell can I be sure to get my salary on my account at the end of the day? Wait, banks are running auditing jobs after working hours to put everything in order. ACID is slow and inefficient in real world. Eventual consistency is enough in most cases. But remember to schedule the auditing jobs, guys, just in case. Immutable database - an oxymoron, sure? No, Datomic is here to keep track of all the past changes. The SQL is dead, long live NoSQL! :) Jokes aside, now I seriously started thinking that some NoSQL solutions have really something to offer. Read NoSQL distilled if you want to know more...

Some more insights from Day 1:

"Customers want consistency. But when they find out what would they lose to get it, they tend to sacrifice consistency without a doubt." (see also CAP theorem)
   - Neal Ford

"Architecture of software projects tends to resemble structure of the organization" (Conway's Law)
"Design enough, early enough"
"Don't document things evident from the code"
"Keep a decision log to remember reasons for past decisions"
    - Janne Sinivirta

"Many companies want to be agile, but do not realize what definitely is NOT agile"
   - Katarzyna Mrowca

Afterwards, some home-baked cookies from Czech speakers - perfcake is an interesting tool to monitor throughput, memory consumption and other performance characteristics. It comes with some nice additional features like CSV reports and warm-up detection. Finally, I was looking forward to assertThat(I). understandUnitTesting(). On top of that, I've learned how NOT to write unit tests, which may be even more helpful. I've also found out that TestNG is good, because "it is much better". Maybe true, maybe not, I would suggest to the speaker to add more reasoning to be more convincing.

However, what certainly is true, is that I enjoyed the day and even more interesting sessions were to come the day after. I took a donut on my way home and headed to the train station filled with joyful emotions.