Learning Spring Boot – 2nd edition on its way from @PacktPub

learning-spring-boot-2nd-edition-contract-headerlearning-spring-bootI just signed a contract to write Learning Spring Boot – 2nd Edition. This will nicely dovetail the Learning Spring Boot Video tutorial I’m currently recording.

The 1st edition had five chapters. The goal was to get to market, fast, and gauge reader’s reactions, so we kept it short and sweet, focused on the most critical bits. The results were a SMASH HIT! That book catapulted forward faster than my previous titles. Packt Publishing approached me a few months ago to record a video, and at the same time, discuss doing a 2nd edition. Suffice it to say, we’ve hammered out a solid lineup.

What’s the plan? The 2nd edition will be composed of ten chapters, and is squarely aimed at Spring Boot 2.0 (which comes with Spring Framework 5.0). Spring 5 will include lots of goodness including Project Reactor support for reactive data access as well as reactive Spring MVC. In this day and age, people want stuff that scales. Spring has already proven that, but as more and more people start using things like Project Reactor, RxJava, and other stuff to squeeze more out of their servers, the Spring team has stepped up to improve things once again.

learning-spring-boot-2nd-edition-chapter-hintWe’re shooting to have it out next Spring (see how I did that?). It’s not a rehash, but some of the key lessons will re-appear. For example, a Quick Start with Java is always cool. Just see one of Josh Long’s many presentations!

We’ll dive into Spring’s support for reactive web and data access that’s in motion right now. But other hot stuff is coming as well. (This is just half of the ten chapters coming)

Stay tuned!

 

learning-spring-boot-2nd-edition-signature

 

Book Review: CHANGER by @mattgemmell

I just finished a REALLY neat book by Matt Gemmell, CHANGER, and I thought I’d capture my reaction in the form of a book review.

Being a fan of both SFF as well as military/action thrillers like the Jack Reacher series by Lee Child and the Jack Ryan books by Tom Clancy, this one really tickled my fancy.

An European military task force is summoned to respond to a growing threat. A threat that hooks you in from the get-go. I started and couldn’t put it down.

Having read Schrödinger’s Kittens and The Search For Reality a few dozen times, this story really clicked for me. HINT: That book has to do with non-locality and multiple outcomes. That’s ALL I’m going to say.

So if any of that sounds interesting, then you can read the Prologue and the first three chapters for free.

Cons

As an author myself, I noticed a few things that could have been improved. For one thing, the scenes had a bit too much head hopping. I prefer for a given scene to stay with one character. And sometimes the adverbs were a bit much. If some of them had been traded in for a little more show-don’t-tell, it would have been beyond perfect.

Pros

As stated in The Irresistible Novel, the things I’m mentioning are preferences. My friend calls them MOOs (My Opinion Only). The most critical thing you can have in your story isn’t writing craft. It’s actual story that draws the reader in. CHANGER has exactly that.

Cover art

As I’ve already said, don’t skimp on the cover. Matt certainly did not. The front and back is a feast for the eyes. For fun, I’ve thrown in the full cover so you can read the back cover copy. Delicious, huh?

changer-backcover

The magic of software development

People think I have a magical talent. It’s funny seeing the difference between what I know and what others think I know when it comes to debugging stuff.

Simply put, I know how to tinker. I have clues, hunches, and insights. But that stuff is useless to a developer not willing to roll up their sleeves and engage in ten solid hours of trial and error. Often times, that is what makes or breaks a demo or a customer feature.

clock-with-a-questionDid I mention ten hours? Sorry, I meant ten days! Or sometimes it takes ten weeks to push your way through a mountain of integration, setup, and labor. Whatever it takes. But it isn’t solved by “knowing the answer” when you sit down at the keyboard.

We software devs work in the strangest field. First, we pursue a degree in either Computer Science or Computer Engineering. Ever seen a scientist and an engineer talk? Polar opposites. So what is software development? A science or an engineering trade?

My buddy Russ Miles has likened this to R&D, since there is no real sense of “can you have that ready in a month?” Building a bridge between two fixed endpoints is much easier to estimate than “can we have this website operational by next year?”

Experiment: Find your most non-technical friend, and ask them if they have a clue what you do. Then try to clarify when they say “no.” And try, and try, and try.

Solving software problems can seem foreign to both science AND engineering. On many days, it’s just tinker, tinker, tinker. And yet, our world’s dependency on it is growing.

HamletSoftware is really just organizing a set of patterns to respond to information. We need certain behaviors triggered automatically, and software is a giant stack of rules meant to handle that. As we collect more information and link more things together, the need to manage this grows.

A good visual of what software really entails is a hologram. Remember that limited-response hologram from I, Robot? We are just tinkering to put together a set of rules to better manage everything around us.

This requires tinkering, not magic. Good ole elbow grease is sometimes the best tool.

A good book cover provides incredible value

There’s an old saying: never judge a book by it’s cover. While applicable in the metaphorical sense, when it comes to actually publishing a real book, people do judge books FAST based on the cover. Having a good book cover is a must.

When deciding on a book, what do you do? If you have stepped foot inside a physical bookstore and found a section you’re interested in, you probably browse. Waltzing across the isles, I’ll guess you stop based on some snazzy title. Pull out the book, glimpse at the cover, and read the copy on the back. Whether or not you open the book and look at a single page is governed by two things: the cover and the description on the back.

Indie publishing demands a well designed cover

Listening to Steve Womack last week talk about the huge changes in the publishing industry, becoming an indie author is a popular move. But one thing you MUST do is invest some decent money in a top notch cover.
Ever publish a book through someone else? You may have learned through brutal means that you are NOT in control of the cover. Whoever is betting money on selling your story will often leave you out of the entire process. Instead, your publisher’s marketing team makes such choices.

Finding a good graphic artist

If you self publish, you are in control. Spending $100-$200 on a good graphic artist to produce a cover is money well spent. Assuming you have a decent story, you should be able to make that back.

Don’t do this the wrong way. If you think snagging a handful of images from Google Images and pasting them together will do the trick, forget about it. First of all, you are probably running into gobs of copyright violations. I’ve created decks using such means, but actual commercial work requires properly vetted sources of art.

A good graphic artist can also take stock images and blend them together, making professional grade edits (like altering hair color, facial hair, etc.) and has better access to fonts. The graphic artist also has a keen thing you don’t: artistic experience. When putting together a title’s cover, your artist will have a better feel for what fonts work, how to position the elements, and can put in the small touches you have never thought of.

If you find a good graphic artist, my suggestion is to continue going back for future projects. Your artist will grow to know you, and your titles can take on a certain signature. And of course, there’s the implicit vote of confidence if you like that artist’s work.

Keep on writing!

The value of backwards compatibility

springI was listening to Episode 6 of the Nash Dev Cast as they spoke about bitrot, of how stuff degrades as the whole Internet upgrades around you. It really reminded me of the inestimable value of Spring’s approach to backwards compatibility.

Something that is almost unnoticeable is that the Spring Framework and its entire portfolio has backwards compatibility. Bumping up the version in your project when a new release comes out is a no-brainer. They just don’t break stuff. You may get alerted to deprecated features, but the JavaDocs will kindly direct you along the upgrade path. Moving from Spring 1.2.8 -> 2.5 -> 3.0 -> 4.0 has such little cost, that people are eager to jump to the latest.

junior-devAs a junior developer, this kind of thing doesn’t really resonate. And not because you are somehow bad. No. It’s simply because you don’t have as many war stories to share over upgrading other libraries, and having major breakage. Senior developers at conferences will share a beer and discuss some crazy upgrade that got started, and a breaking change they were forced into turned a 2-day upgrade into a 3-week effort.

Even as a senior developer who recognized this feature of the Spring portfolio, it wasn’t until I joined the team and proposed changes, that I learned of the technical challenges this team faces to enforce backwards compatibility. It really rose to the surface when I heard Juergen speak about Spring 4 being “Java 8 ready” but still working with Java 6. With scrunched eyebrows, I leaned closer as he spoke during the 2013 Birds of a Feather at SpringOne how the framework would certainly support Java 8 features, but still operate on Java 6.

That perplexed me. How could a framework take advantage of things like Optional yet blink “no problem” if you used Java 6? Digging in, I learned not only how to build a JAR file with Java 6 specs but neatly keep Java 8-based API calls inside Java 8-flagged classes that were only loaded when Java 8 was the loading engine. And I learned how hard this effort was.

I already respected the Spring team and the programming model they had developed. But this level of technical expertise combined with forward thinking plans to start ten years ago and maintain to this day, was quite impressive.

So, listening to podcasts about JavaScript open source modules, sifting through and evaluating products, and getting “left-padded” at times, made me snug and comfortable in my decision to bring onboard the Spring Framework years ago. Their decisions to invest so highly in the community have paid dividends I have no idea how to tabulate.

In defense of leftpad

Given the time I’ve had to think about the whole leftpad controversy, I have to come to the conclusion that leftpad was PERFECTLY FINE with its decision to build a module with only eleven lines. (As to the brooha over unpublishing and then being forcibly republished by npm, that is a different topic.)

leftpad wrote code anyone with half a brain should be able to write

laptop_chimpThat must be the biggest sentiment I’ve heard. Blogs, podcasts, and other forums have thrown out this strong criticism of leftpad’s code. It’s best summarized as “have people forgotten how to code?”

Gee, leftpad getting unpublished broke React.js, Babel.js, and how many other systems? If those impressive projects saw value in leftpad, sounds pretty big of me to judge them all for making such a foolish decision. After all, that’s what I’m doing, right? I’m ascribing judgment for using it.

Let me be clear: I haven’t actually READ leftpad’s code. I’m not defending the physical lines of code in that module. The market spoke and accepted leftpad. I am defending the choice others made because I myself haven’t invested the time to make a better choice.

leftpad wasn’t REALLY used by React.js, etc. It was just a transitive dependency

2001This one doesn’t sit right. It’s kind of like saying, “React.js is good. The people writing it would never need something like leftpad. They just got caught by some intermediate dependency.” Can you smell the disdain?

If leftpad was used by an intermedia dependency, and that is what all the big weights used, then the transitive property applies. Not only has the market said leftpad met needs, but the intermediate dependencies are just as valuable. See what I did there? Transitive dependency, transitive value.

leftpad isn’t actually the best way to do what it did

Kaypro_in_Israel_1984Here is where it gets interesting. This is what I hear from those that have spotted the transitive link. Can’t criticize React.js, because they didn’t REALLY use leftpad. Let’s look elsewhere.

People have been singing the UNIX tune of “do one thing and do it well” as microservices arise. Defenders of leftpad point it out as a composable function, adhering to the UNIX philosophy. But if you can tear out “do it well”, then leftpad doesn’t qualify for this concept. Hence, leftpad was a badly written composable function.

Sorry, maties, but as software engineers, we seek out solutions on a daily basis. And in the land of open source, we constantly make “build or buy” decisions. Whenever someone asked me, “what is an engineer”, my answer has always been, “we find a good enough solution for the problem at hand.” We don’t seek perfect answers, because we don’t have an infinite budget.

For a LOT of people, leftpad was good enough. They could have written a better solution, but they could also have written a better solution for LOTS of other modules. Imagine the cost of perfecting every single thing you use. Or how about this: imagine the cost of tens of thousands of developers writing an equivalent to leftpad. Perhaps 15 minutes tops, but multiplied by 10,000 and your talking 2500 hours of effort. Doesn’t that defy the concept of open source?

What’s next?

imageI know people that don’t like certain tools out there. They have written their own version of things. At first glance, there’s underscore and lodash. These two libraries essentially do the same thing. But one project was not satisfied with the other project. Hence, they built a fork and whole community around it.

These are people I respect, because they took the time to evaluate the current state of affairs and write their own solution. When I go pick from one of these two solutions, I can find out the basis of one or the others. Has the bulk of the JavaScript community picked one of the other? Or is it a big split? These are factors in choosing.

I can spend all my time building everything from scratch and live under the haughty label “I know how to program. I’ll build it myself.” But we already have a term for developers like that: “Not Invented Here“. Some people will only touch code they themselves wrote.

If you actually spent the time to read leftpad’s code, then used it or decided otherwise, that’s fine. But don’t go around criticizing others for using leftpad. After all, you’re criticizing the choices of MANY others.

Good developers take breaks

Boring PresentationSomething that has become crystal clear since I joined the Spring team is how important it is to take a break. Good code happens when developers take breaks.

Of course there are times when I find myself working solid until 8:00 pm or later. But I try to make that the exception rather than the norm. Most of the time, I’m pulled away by my kids coming home from school. In fact, I’m often annoyed at stopping a minute early.

STTNG_pinballAnd yet I’m astonished at how many perplexing problems I’ve solved by simply stopping, doing something else, and **BAM**, the answer pops into my head. Sometimes within minutes, sometimes the next morning while putting shoes on one of my kids. Those are the moments when I remind myself that developers take breaks. I consider that payoff for having stopped early.

This phenomena is well know. In fact, you’ve probably heard of it. I also so it addressed keenly at a writer’s conference last year. Your subconscious is still working on the problem whether you are or not. Sometimes, when you aren’t actively trying to fix it, your noodle is freed up to look back at what you did, what you’ve read, and other things.

devnexusWhile chatting with a teammate of mine at DevNexus, he expressed that if he hadn’t taken various breaks, gone for walks and thought about the architecture he was designing, the project he was striving to build would never have happened.

HamletReflection is a critical component. My martial instructor often taught “visualize, visualize, visualize.” It’s a mechanism to put your mind on the subject, even when you’re not actively pursuing it.

The key thing is telling yourself to take that break. To pause. To stop and not burn the candle at both ends. If you work that hard, your subconscious will be on the ropes. Those extra ideas that can often succeed when you may have failed all day, may not come at all. It’s a big leap I know, but give it a try.

Looking for magic in all the right places

Having three kids, all six and under, I get pelted with all kinds of kid’s shows. Today, my youngest was having his milk while sitting in his seat, watching Sofia the First. I was working on the sofa, but somehow digested the whole episode.

CedricWhat caught my fancy was how my fantasy-writing nature digested all of the magical rules this episode put forth. The often bumbling royal sorcerer (Mr. Cedric) was forced to save the magic school from some pranksters, but was stuck in a spell that bound him and his hands to a chair. He couldn’t wave his wand and hence cast no spell.

Observing this hard magical rule of their universe, made me start mentally flipping through other magical systems, and seeing if I could spot their rules, and decide whether or not I liked them. Feels like a way to objectively look at my own magic systems and see if there are any big gaps to address.

harry-potter-wandThe first thing that came to mind is Harry Potter. I read the first book and have seen all the movies. (I promise I’ll circle back and read the other books at some time). Harry Potter appears to be a wand-only environment as well. One of the first spells you see (in the movies anyway) is Expelliarmus, the one that knocks your opponent’s wand out of their hand. More advanced casters actually manage to catch the wand.

I know what you’re thinking. What about potions and scrolls? Okay, those also exist. But it appears that in these systems, you can NOT do a spell all by your lonesome. You need a medium to help you.

doctor-strange-02-03Which brings me to my third example. Doctor Strange. As a big time collector from long ago, I am quite familiar with their system of magic. And it is QUITE different. Instead of being wand-only, they have different levels of magic. They tap magical energy from themselves, the surrounding universe, and the most powerful ones, from other dimensional entities. I have really enjoyed the conflicts and challenges this system posed. In one issue, all the “good” entities cash in, demanding Doctor Strange come to serve in exchange for having let him use their energy.

If you are going to write fantasy and have magic, you must put time and thought into it. If it’s a cornerstone of your novel (and they often are), five minutes of thought won’t cut it. But don’t view it as laborious and tortuous. Instead, the more time you invest, the better it will arise and bear fruit. I find much excitement when members of my critique group pelt me with questions.

Demo app built for #LearningSpringBoot

imageI’ve spent the last few days building the app I will use in the new Learning Spring Boot video. I was able to actually move quickly thanks to the power of Spring Boot, Spring Data, and some other features I’ll dive into in more detail in the video itself.

It’s really fun to sit down and BUILD an application with Spring Boot. The Spring Framework has always been fun to develop apps. But Spring Boot takes that fun and excitement to a whole new level. The hardest part was saying, “this is all I need. This covers the case” and stopping. While I have it mostly in place. Just a few bits left.

Having been inspired a couple years ago by this hilarious clip, I sought the most visually stunning and audacious demo I could think of: snapping a picture and uploading for others to see.

springone2gx2014_banner_speaking_125x125I created one based on Spring Data REST for various conferences and eventually turned it into a scaleable microservice based solution. (See my videos on the side bar for examples of that!) That was really cool and showed how far you could get with a domain model definition. But that path isn’t the best route for this video. So I am starting over.

platform-spring-bootOnce again, I take the same concept, but rebuild it from scratch using the same focus I used in writing the original Learning Spring Boot book. Take the most often used bits of Spring (Spring MVC, Spring Data, and Spring Security), and show how Spring Boot accelerates the developer experience while prepping you for Real World ops.

DSC05391I have chatted with many people including those within my own company, and those outside. They have all given me a consistent message: it helped them with some of the most common situations they face on a daily basis. That’s what I was shooting for!  Hopefully, this time around I can trek along the same critical path but cover ground that was missed last time. And also prune out things that turned out to be mistakes. (e.g. This time around, I’m not spending as time on JavaScript.)

fight1Now it’s time to knuckle down and lay out the scripts and start recording video. That part will be new ground. I have recorded screencasts and webinars. But not on this scale. I hope to build the best video for all my readers (and soon to be viewers).

Wish me luck!

 

Awesome pinball invitational @RavenTools last night! #pinball

Cirqus_Voltaire_pinballLast night was phenomenal! In listening to the inaugural episode of NashDev podcast, I heard word of a pinball invitational being hosted in downtown Nashville. Trekking there last night with my father-in-law, we didn’t leave until after it’s official time had long past.

Chatting with the locals was also pretty cool. And reminded me how much I missed playing pinball. Now that my kids are getting bigger, I might be finding more time to put them into action. My five-year-old will now power-on Cirqus Voltaire, pull a chair over, and start playing.

They tipped me off about other collectors in my own town, so I have started poking around to rekindle my pinball presence.

STTNG_pinballI traded stories with several of the other collectors. I had forgotten how fun it was to talk shop about my machines and hear about how others had found theirs. It also reminded me how in this day and age, where everything is on the Internet, pinball is one of those things where it’s so much fun to get your hands on it.

I signed my name on the way out, adding myself to a list of people interested in doing more pinball stuff in the future. All in all, it was an awesome time.