Author Archives: Greg Turnquist

Reactively talking to Cloud Foundry with Groovy

I’ve been working on this Spinnaker thing for over a year. I’ve coded support so Spinnaker can make continuous deployments to Cloud Foundry. And the whole thing is written in Groovy. I recently upgraded to that I can now talk reactively to Cloud Foundry with Groovy.

And it’s been a nightmare.

Why?

Groovy is pretty darn wicked. Coding Spring Boot apps mixed with Spring MVC controllers in the terse language of Groovy is nothing short of gnarly. But it turns out there’s a couple things where Groovy actually gets in your way.

Reactor + Cloud Foundry

Want a taste? The code fragment below shows part of a flow used to look up Spinnaker-deployed apps in Cloud Foundry:

operations.applications()
  .list()
  .flatMap({ ApplicationSummary appSummary ->
    operations.applications()
      .getEnvironments(GetApplicationEnvironmentsRequest.builder()
        .name(appSummary.name)
        .build())
      .and(Mono.just(appSummary))
  })
  .log('mapAppToEnv')
  .filter(predicate({ ApplicationEnvironments environments, ApplicationSummary application ->
    environments?.userProvided?.containsKey(CloudFoundryConstants.LOAD_BALANCERS) ?: false
  } as Predicate2))
  .log('filterForLoadBalancers')
  .flatMap(function({ ApplicationEnvironments environments, ApplicationSummary application ->
    operations.applications()
      .get(GetApplicationRequest.builder()
        .name(application.name)
        .build())
      .and(Mono.just(environments))
  } as Function2))

This is the new and vastly improved Cloud Foundry Java SDK built on top of Project Reactor’s async, non-blocking constructs (Mono and Flux with their operations). Every function call is an async, non-blocking operation fed to the next function call when the results arrive.

What does this code do? It looks up a list of Cloud Foundry apps. Iterating over the list, it weeds anything that doesn’t have a LOAD_BALANCER environment variable, a tell for Spinnaker-deployed apps. Finally it looks up the detailed record for each application.

The heart of the issue

What’s nestled inside several of these “hops” in this flow is a tuple structure. In functional flows like where each hop gets a single return, we often need to pass along more than one piece of data to the next hop. It’s the side effect of not using the imperative style of building up a set of variables, but instead passing along the bits in each subsequent funtion call.

cf-java-client has TupleUtils, a collection of functions meant to pack and unpack data, hop to hop. It’s elegant and nicely overloaded to support up to eight items passed between hops.

And that’s where Groovy falls flat. Groovy has this nice feature where it can coerce objects. However, with all the overloading, Groovy gets lost and can’t tell which TupleUtils function to target.

So we must help it by coercing it into the right structure. See those “as Function2”  and “as Predicate2” calls? That helps Groovy figure out the type of lambda expression to slide things into.

And it’s dragging me down!

The solution

So I finally threw in the towel and converted this one class into pure Java.

Yes, I ditched hip and cool Groovy in favor of the old warhorse Java.

You see, when something is so dependent on every character being in the right place, we need all the static support from the IDE we can get. Never fear; I’m not dropping Groovy everywhere. Just this one class.

And here is where Groovy’s interoperability with Java shines. Change the suffix of one file. Make the changes I need. And both the IDE and the compiler is happy, giving me an operational chunk of code.

I had to rewrite a handful of collections, but it wasn’t the worse thing in the world. In half a day, I had successfully moved the code. And now as I’m working on another flow, the pain of Groovy’s need for coercion specification is no longer wreaking havoc.

Cheers!

 

Dos and Don’ts of Marketing

When it comes to selling books, there are gobs of opinions out there. And there is no one way. But there are many dos and don’t when it comes to marketing. In this post, we’ll try to capture a handful of them.

Do – take advantage of every opportunity to market

Never ever EVER pass up a captive audience. When someone reads your book to the end, they will ALWAYS read the page AFTER the end of the story. (Don’t you do the same?)

Key things to include:

  • First chapter of the book’s sequel.
  • First chapter of another work if the current title isn’t a series.

After the chapter include a link to sign up for your email list. This is called “going for the ask”. It’s tough for introverts but a time tested recipe in marketing and sales.

Don’t – publish your series all at once.

“I wrote a series. Can I put it all out there at once?”

No. Don’t do this. At all.

Did you pour your heart and soul into these works? Do you want your readers to get them all? Does it give you a warm fuzzy knowing they have your complete works?

Sorry, but emotions are running rampant. I understand the excitement of wanting your audience to gobble up everything. Take a deep breath and don’t rush it. Rome wasn’t built in a day and neither can your following.

When publishing blog articles, it’s good to drive traffic to one place on your site. Don’t tweet asking people to visit two different parts of your site at the same time. Instead, lead them to a single page on your site talking about the first book. If they like it, the tail of the book can include the hook for the second followed by a buy link. Rinse/repeat.

Why? Because all of these leads to Amazon rankings. And it’s better to slam one title into the Top 50 for a given genre than working two titles into the Top 1000. Focusing all marketing on one title is key. As shown, rankings help Amazon show things like “frequently bought together”.

Do – seek a long term path with many works

There’s an old adage that quality beats quantity. That is quite true. To a certain point. If you can write a great novel, market it superbly, and build a fanbase, you’ll find that it can help sell more books. Many famous authors started that way. A quality novel can jumpstart your writing future.

But at a certain point, your ability to market may/may not do the trick. That is when quantity can overtake and leave quality in the dust. If you look at many historically famous authors, some of the most successful actually wrote LOTS of novels.

If you can publish a dozen novels, odds will stack in your favor over an author that only writes a single novel, and expects to make it big with that. The thing is, try to focus on marketing one at a time. If you try and market multiple titles at a time while building your fanbase, you may accidentally confuse your fanbase.

From time to time, I may mention my older titles, but in general, I pour all my marketing effort into the latest one.

Do – keep making updates to your site

Never forget – your website is supposed to help people discover you, find out that they like you, interact with you, and ultimately buy your wares. Make fluid adjustments to your site as things change.

  • Offering Black Friday discounts? Put a temporary banner ad at the top of your site.
  • Written one or more books? Create a page for each.
  • Written a series? Write a page talking about the series, with each title in order, linking to each title’s page.
  • Written a blog article series? Craft a menu and put it on the sidebar.
  • Give away handouts when you go to sell books at fairs? Put the handout on a page.
  • Want people to Tweet/email/Facebook? Create a /contact or /me page.

 

Don’t – post just to sell

Something a lot of people have a hard time getting to grips with is that blogging, tweeting, and facebooking shouldn’t be just about selling. In fact, it’s recommended to confine actual selling to less than 20%.

We can all smell an oily salesman. Don’t turn yourself into one.

People will read your blog articles if it carries information they are interested in, and if they find value in it. When you are pitching product, the perceived “info” drops quickly.

Do – use content you’ve written in the past in a conversation

Your website should be your main marketing tool, with Twitter and Facebook the place to put out bread crumbs. Don’t hesitate to share a page or a post pertinent to a discussion on Twitter or Facebook.

Don’t forget, this isn’t just about selling product. In fact, I recently blogged a fragment of an older book when the topic of test coverage surfaced.

I followed that Twitter conversation with a blog post, the flaws of test coverage.

Do you have any tips that has helped you market? Share them in the comments.

How I lost weight during the holidays

…and managed to enjoy myself. It’s true. This past year, I lost weight during the holidays, and it didn’t kill me.

On December 1st last year, I checked in on MyFitnessPal.com at 222.4 lbs, and at the end of the month, had dropped to 217 lbs. That’s 5.4 lbs lost. And I still munched on oatmeal scotchies, sweet minglers, fudge and other things.

Getting serious about health

That last statement may not be an accurate portrayal of things, so let’s back up. Over three years ago, I got interested in better health, so I stopped drinking soda. That was tough, but I can proudly say I’ve not had any soda except for extenuating circumstances like once having a stomach bug and Sprite being the only thing I could keep down. Another situation where I needed caffeine to drive, and the only thing available was a Diet Coke.

But my weight losing goals really got going a year and a half ago. I stepped onto a scale and weighed in at 245. Yikes! I began using MyFitnessePal.com to track everything I ate. I managed to drop about ten pounds, and then things plateaued.

I was diagnosed with sleep apnea. My doctor duly informed me that aggressively losing weight can help with apnea. (Seems like doctors will say EVERYTHING is helped by losing weight, right?) I tried and tried and tried, but it seems like I couldn’t get below that 230 lbs. floor. So I threw in the towel.

New approach to things

In March of last year, I read some new articles on health and diet. The most outrageous article pointed out that today’s typical breakfast of cereal is nutritionally equivalent to halloween candy. That one took a bit to settle in, but I realized it’s true. Our vaunted high grain, low fat diet espoused by the food pyramid is ridiculous and not grounded in real research, but is instead a huge experiment (that is failing).

Then in October, my wife was introduced by a friend to the Trim Healthy Mama plan. The second she explained it to me, I was onboard.

It incorporates several elements:

  • Eat something every three hours, because that is the time it takes your body to process. Avoids you feeling starved, and also gives you grace to fall off the plan, but get back on it without much hoopla.
  • Eat a healthy protein in each meal combined with either a good fat or a good carb, but not both. Your body processes either fat or carbs at any one time, but not both. And it favors fats, so carbs get stored.

That’s it! Doesn’t sound that hard. Well the people behind Trim Health Mama have published a ginormous recipe book and there are pinterest groups posting recipes all the time.

A major shift in our diet was to to virtually eliminate all sugar and classic flour. That’s how you move off of bad carbs and moved onto good ones. We use a lot of stevia and what’s known as “TMM Baking Blend” which is a gluten free, oat-based flour. The glycemic index of this stuff is much lower, and keeps your blood sugar from spiking.

By confining what you eat in any given time 3-hour window, your body can actually burn through things and help you start losing weight.

Old tasty stuff – gone, new tasty stuff – in

How about some real examples? Breakfast cereal, pancakes, waffles, and donuts are loaded with sugar and bad carbs. And we’re not talking just Frosted Flakes. Almost every breakfast cereal, whether it’s granola, Honey Smacks, or Bob’s Whole Grain Cereal, has about the same calories and sugar content. Off the menu. (This part makes me cry. I LOVE this stuff!!)

What are some things that are in? Try bacon and eggs. Yum!!! There is another great dish called French Toast in a Bowl. It’s a scoop of Baking Blend, an egg, a little butter, and a packet of stevia.

Other stuff to eat includes triple zero yogurt, and several chicken and beef recipes. Also look uncured meats. Uncured means they aren’t coated with sugar. (Yes, they make uncured bacon.)

We have gotten a lot of mileage out of our crock pot, making some Indian chicken dishes as well as chicken-based white chili. It’s also not hard to retool some existing recipes by swapping out sugar and traditional flour.

My absolute favorite (after bacon and eggs) includes the Trimtastic Chocolate Cake.

I learned the difference between chocolate and cocoa. Cocoa doesn’t have hardly any calories. If you combine it in a recipe with real butter (good fat), stevia (zero calorie) and almond milk (low calorie), you have the taste of chocolate without the ugly baggage.

That recipe lets you eat REAL whipped cream (made it myself) combined with dark chocolate. Mmm!!! We made one and brought it to Thanksgiving this year. My father-in-law, not on the plan, thought it was delicious.

Don’t sweat going off plan now and then

Reader: “You’re showing the same image twice.”
Writer: “I really like bacon.”

The biggest failure we all have is getting off our diet. With the Trim Healthy Plan, it’s okay to go off now and again. You can get back on three hours later. So during Thanksgiving, I didn’t try to starve myself. I just went off plan that day as I feasted on turkey, ham, dinner rolls, and sweet potato casserole. The next morning, eggs and bacon. (So good!)

When our Writer’s Group met before Christmas for a dinner party, we went off plan. No big deal!

And Christmas goodies? I was able to enjoy them without feeling guilty. Because I know there is a delicious, on-plan meal around the corner. And that’s how I lost weight during the holidays, slowly but surely. Maybe not as fast as early November, but this isn’t a sprint, it’s a marathon.

Happy New Year!

The many flaws of test coverage

Recently in a Twitter chat with a couple friends of mine, the subject of test coverage re-appeared. I rolled my eyes. Ready to start ranting, I remembered already covering the many flaws of test coverage in Python Testing Cookbook. So I thought, perhaps an excerpt would be better.

From chapter 9, Python Testing Cookbook..

****

Coverage Isn’t Everything

You’ve figured out how to run coverage reports. But don’t assume that more coverage is automatically better. Sacrificing test quality in the name of coverage is a recipe for failure.

How to do it…

Coverage reports provide good feedback. They tell us what is getting exercised and what is not. But just because a line of code is exercised doesn’t mean it is doing everything it is meant to do.

Are you ever tempted to brag about coverage percentage scores in the break room? Taking pride in good coverage isn’t unwarranted, but when it leads to comparing different projects using these statistics, we are wandering into risky territory.

How it works…

Coverage reports are meant to be read in the context of the code they were run against. The reports show us what was covered and what was not, but this isn’t where things stop. Instead, it’s where they begin. We need to look at what was covered, and analyze how well the tests exercised the system.

It’s obvious that 0% coverage of a module indicates we have work to do. But what does it mean when we have 70% coverage? Do we need to code tests that go after the other 30%? Sure we do! But there are two different schools of thought on how to approach this. One is right and one is wrong:

  • The first approach is to write the new tests specifically targeting the uncovered parts while trying to avoid overlapping the original 70%. Redundantly, testing code already covered in another test is an inefficient use of resources.
  • The second approach is to write the new tests so they target scenarios the code is expected to handle, but which we haven’t tackled yet. What was not covered should give us a hint about what scenarios haven’t been tested yet.

The right approach is the second one. Okay, I admit I wrote that in a leading fashion. But the point is that it’s very easy to look at what wasn’t hit, and write a test that shoots to close the gap as fast as possible.

There’s more…

Python gives us incredible power to monkey patch, inject alternate methods, and do other tricks to exercise the uncovered code. But doesn’t this sound a little suspicious? Here are some of the risks we are setting ourselves up for:

  • The new tests may be more brittle when they aren’t based on sound scenarios.
  • A major change to our algorithms may require us to totally rewrite these tests.
  • Ever written mock-based tests? It’s possible to mock the target system out of existence and end up just testing the mocks.
  • Even though some (or even most) of our tests may have good quality, the low quality ones will cast our entire test suite as low quality.

The coverage tool may not let us “get away” with some of these tactics if we do things that interfere with the line counting mechanisms. But whether or not the coverage tool counts the code should not be the gauge by which we determine the quality of tests.

Instead, we need to look at our tests and see if they are trying to exercise real use cases we should be handling. When we are merely looking for ways to get more coverage percentage, we stop thinking about how our code is meant to operate, and that is not good.

Are we not supposed to increase coverage?

We are supposed to increase coverage by improving our tests, covering more scenarios, and by removing code no longer supported. These things all lead us towards overall better quality.

Increasing coverage for the sake of coverage doesn’t lend itself to improving the quality of our system.

But I want to brag about the coverage of my system!

I think it’s alright to celebrate good coverage. Sharing a coverage report with your manager is alright. But don’t let it consume you.

If you start to post weekly coverage reports, double check your motives. Same goes if your manager requests postings as well.

If you and yourself comparing the coverage of your system against another system, then watch out! Unless you are familiar with the code of both systems and really know more than the bottom line of the reports, you are probably wandering into risky territory. You may be headed into faulty competition that could drive your team to write brittle tests.

****

Agree? Disagree? Feel free to put in your own opinions on the pros and cons of test coverage reports in the comments section.

How Guidance saved Christmas with Spring Boot

I hope you all have settled down with a hot cup of cocoa. Because it’s time for the most beloved Christmas tale of all. The one where Guidance Saved Christmas with Spring Boot.

Guidance the Elf had seen Santa facing new issues. It seemed like managing the list of children in addition to invoicing and warehouse inventory was harder than ever. Scaling was becoming a bug bear. Guidance was saddened at the challenges faced. But he had to report for duty in the Turnquist household.

One night, after having made his first appearance, Guidance spotted Learning Spring Boot.

“What’s this?” he thought. So he sat down and read the whole thing. (Elves can read entire books in one night, you know). Reading the book, his eyes opened wide. Spring Boot might just do the trick!

The following night, after everyone had gone to sleep, Guidance found Greg’s laptop, and fired up IntelliJ. Using the code examples from the book, he was able to draft up some new ideas.

“Wow! Wait until Santa see this!”

The next night, Guidance watched the Learning Spring Boot video, and saw even more things not covered in the first book. (Guidance used earphones so as not awake anyone while watching the video).

Using new things learned in the video, he made more changes to his demo app. He planned a demo the following night with Santa’s technical team, including how the video showed debugging in the cloud using Spring Tool Suite.

The team was impressed. They began to talk among themselves. Their technical troubles could be cured!

A few nights later on ElfSlack, the senior designer contacted Guidance. The buzz about Spring Boot had spurred him to buy copies of the book and video for the whole team. But that wasn’t what he was calling about. Instead, he wanted to share something more exciting than that.

A 2nd Edition was in progress. A newer version of the book that would include Spring 5 and Spring Boot 2, including its reactive streams-based, non-blocking, async programming model. Guidance blinked with excitement.

Guidance had already coded half a dozen sample app with eagerness. Spring Boot had changed his view of writing software. But the idea that he could seamlessly write reactive code without giving up the existing power of Spring was unbelievable.

This amazed him so much that he logged onto Amazon and pre-ordered his own copy.

He had seen more magic this year than all other Christmases combined.

So much, in fact, that he had a new idea.

“I wonder if I could convince James Watters to made a special trip to the North Pole and give a talk about Pivotal Cloud Foundry.”

The answer to that…is another tale.

Merry Christmas to all and to all a good night!

 

Building your platform – Part IV

megaphoneIn the previous post, Building your Platform – Part III, we discussed why building a mailing list is as important as building a site. In this article, we’ll dig into some advanced techniques where you can link together the key facets of your platform to push things to the next level.

Pages vs. Posts

I’m going to assume we are talking about WordPress here. Let’s also assume you have picked up the task of blogging with a certain frequency and posting links on social media channels. Blog articles are known as posts. They are typically displayed in a chronological order and also carry that sense of belonging to a certain point in time.

Pages are other locations where you can write content, but there isn’t the same sense of time. In short, pages of content should be written to be timeless. And if needed, you can update the pages over time. For example, check out my page for Learning Spring Boot.

When I started blogging, I only had one book with that title. This has now expanded to two books and a video. For marketing reasons, it’s best to pull this content under one page, and expound upon it. I have also updated LOTS of articles to point at this cornerstone content to help it rank on Google.

sara-turnquist-pages-1In general, I recommend that you create one page per book you write. (In my own case, I’ve consolidated multiple editions under one page). If you check out Sara Turnquist’s site (see the screenshot), she lists all her titles on the sidebar, and you can see their published status.

Click on the first one, and you can immediately see its status (published).

sara-turnquist-pages-4But if you look at the link in the browser, it just has the title of the book, making it easy to hand that link out to anyone. This is known as editing the slug.

BONUS: Edit the “slug” or the name of the link to be the title itself, but make the description anything you want like this and this.

For other key things you do, other pages can be quite handy.

  • A Bio or About Me page (either /bio or /about-me)
  • A Contact page (/contact) where you put a Contact Form so people can reach you without giving away your email address
  • A Mailing List signup page (/list)

This is generalized stuff. I have one friend that is writing children’s books. She has created some puzzles to print out and give away to kids at various shows. I gave her the tip to post it on a page. If you stop and look at that page, you’ll see that it’s cute, fun, and includes a little web link at the bottom so this generation’s Internet savvy children can say, “Mommy, I want the Skippy the Skunk book at mrbarklee.com.” Disney aren’t the only ones capable of product placement!

Marketing

An important thing to realize, is that your platform is fluid. It starts with one blog post and one page, but as you post more content, you come to understand that posting more stuff in more places extends your platform.

For example, visiting various Facebook groups once/week and posting new content helps get your name out there. I posted this particular meme for Learning Spring Boot on Twitter and about half a dozen groups on Facebook, and saw a meteoric burst of traffic to my site.

All the experts recommend having a schedule set up to post to various groups to keep generating interested. Don’t assume one posted graphic to one group does the trick. People come and go.

Visuals

Another tidbit: visuals are quite handy. If you look at my “Learning Spring Boot/Elf on the Shelf” image, I included a zoomed in shot of Amazon + my book, a dialog bubble indicating key content, and a link to the source at the bottom. A cute graphic to catch attention. Now it’s added to my platform.

I hope you have learned a lot more about various methods to build your platform. If there’s one thing I hope you remember it’s this: it’s not YOUR platform unless YOU own it lock stock and barrel. Building up a site with breadcrumbs on social media ensures you stay in control.

Good luck!

Building your platform – Part III

In the previous article, Building your Platform – Part II, we discussed how to integrate blogging with social media and why it’s good to write more on your own platform, while using social media as a channel to reach others. This week we are going to talk about building a mailing list and why it’s critical.

Blogging vs. Email

As we mentioned last week, blogging takes time. You can’t build a following in weeks or even months. It often takes a couple years to really establish a blogging platform. But guess what – building an email list is just as hard. And to top it off, it’s even more valuable. Why?

Because people still covet emails as more important and more valuable than articles from any other medium.

  • friday

    “Nothing but the facts, ma’am.”

    Email is more popular than social media (85% vs. 62%)

  • People guard their email accounts, making engagement higher (59% open rate vs. 31% click through rate)
  • Better return on investment ($40 return vs. $2-$17 return for every $1 spent)
  • Higher conversion rate (4.16% vs. 0.48%-2.64%)
  • A/B campaigns – battle tested way to improve

In a nutshell, when people launch a business, build some following over the years, they inevitably decide to create a mailing list, wishing they had started it sooner.

You can do that today. Several offer free options for small lists (first 2000 subscribers free at MailChimp). It’s easy to embed a MailChimp subscribe form on the sidebar of your site, on a page (http://greglturnquist.com/list), and through other various channels.

Another nugget of value – when you go pitch your book to an agent or a publisher, indicating you ALSO have nnn subscribers on top of your Twitter follows and monthly traffic only increases your position. You will appear as someone serious, because you have now covered the trifecta of platform building:

  • a blog site with traffic
  • social media channels with a following
  • mailing list subscribers with periodic newsletters

What to do and not do to build a mailing list

follow-meSometimes, having too many choices isn’t the best solution. It’s great when you go to the store shopping for goods. But when it comes to your site, avoid letting people sign up for too many different things. For example, WordPress has the option for people to sign up for new posts. This is a dated feature that precedes Twitter/Facebook.

It’s better to turn that option off and instead encourage people to follow you on social media while also signing up for your newsletter. Having another option means they might not take those preferred paths.

In other words, think of how you WANT people to follow you, and build your site to support that. (P.S. If you look at my site, you’ll find those bits of the sidebar pretty close to the top making them hard to miss.)

Go for the ask

email-askThis one is hard. Hard for many. In sales and advertising, it’s called “going for the ask”. It means, ask people to sign up to your email list.

I’m quite familiar with how a large number of writers are introverts, and going for the ask feels, evilllll. It’s not. It takes a little to overcome this, but do things like put a teeny, tiny link in your mail signature asking people to sign up. If one out of a thousand emails yields a potential signup, then it did it’s purpose.

When you have other opportunities (like the Bio in my latest tech book), consider putting a single sentence asking people to sign up. And in your next e-book, on the very next page after the last page of your story, ask people to sign up.

Those opportunities can pay back over time.

With great power…

doctor-strange-02-03When you build a mailing list, use it wisely, or it surely fall to pieces. Modern mailing lists must comply with anti-spam laws. All the mailing list platforms support this. Hence, if you do stupid stuff, like publish weekly (without telling people that) they will ditch it FAST. Publishing something quarterly may be more to people’s liking.

I subscribe to the Reacher Report from Lee Child. I think they publish no more than twice a year. It doesn’t intrude upon my life, yet provides value to me.

Hopefully, I’ve convinced you of the value in building a mailing list. In the next posting, we’ll discuss some advanced techniques to turn your platform from a cobbled together mess into a synergetic brand.

Good luck and happy writing!

Building your platform – Part II

Last week, we took a dive into Building Your Platform – Part I. We learned why it’s important to start building our own site, yesterday. Over time, a site can turn into a key part of your platform. In this post, we can see what role social media should play with our nicely built site.

Blogging…

The-Rest-of-the-StorySo you have a WordPress site. Now what? (Sounds like some self help book). In a word: write! The idea of having a site is to build a presence, and that can only be achieved by writing, writing, and more writing.

Wait a second. Isn’t that what we all do every day on Twitter and Facebook? You bet. And those companies are making millions over the content you and I write there. So in similar spirit, we must write on our sites. But about what? Not to sell!

“It doesn’t provide a place to run non-stop commercials promoting yourself and your books. A blog has to provide value. I don’t know anyone who finds commercials (even infomercials) valuable.” —Sara R. Turnquist

remote-controlIf you use your site and social media channels to sell, sell, sell, you’ll be tuned out faster than a midnight infomercial. Instead, you must write about things that excite you. Things that interest you. It can overlap with what you’re trying to sell. But in all seriousness, selling should occupy perhaps 10% of your total blogging efforts.

There are some who disagree on blogging at all. The alternative advice is to go for real writing gigs starting with published articles on web sites. If you’re goal is to become a paid, freelance writer, that makes sense. But if you’re goal is to be a novelist with several tomes under your belt, blogging is the way to build an audience.

…and socializing

peanuts-gang-worldWhen you blog, the next logical step is posting what you blogged. In short, publish links to your works on Twitter and Facebook. Turn these social media outlets where you can link up the rest of the world as a communications channel. A channel that leads people back to your site. A site you control and can tune, adjust, and optionally list relevant things (like your latest book!)

That’s not the only thing you do with social media. People will follow you if they like your material, if they find you engaging, and if you occasionally have fun links. If it’s 100% your own stuff, people may not enjoy that at all. If you build relationships on social media AND include links to stuff you’ve written, then you’ll have the ingredients for a growing platform.

Believe me, people can spot sincere relationship building on social media vs. throwing stuff over the fence.

To tweet or not to tweet

HamletThe next time you have a golden idea for a post, stop and ask yourself, “Is this enough for an article?” If so, pause and write it down on your site and THEN tweet the link. You’ll get the best of both worlds.

There is more to blogging than this. More tips and tricks. But the core bit is to invest more of your writing in your own site and use social media as the means to share it with others.

And then stick with it. It can take years to really build a following. Certainly doesn’t happen in a few weeks or months.

Next week, we’ll continue this series by discussing the value of building a mailing list. Until then, good luck and happy writing!

Just finished #LearningSpringBoot 2nd Ed’s @SpringBoot + @SpringSecurity chapter

About 1:00am yesterday morning, I sent in the text for Chapter 9, Securing Your App with Spring Boot to my publisher for Learning Spring Boot. I decided to take things to the next level in security by locking down a microservice-based solution.

I spent about three weeks working on the code. I wanted it just right. Another week was spent crafting the prose to go along with it. Instead of JUST writing a security policy, I introduced a refactoring. After all, when’s the last time YOU secured an app and didn’t have to refactor something due to unforeseen issues?

I also bring in Spring Session. When working with microservices, we need a way to smoothly share the user’s current session and this project does it with elegance.

Of course, there’s a big caveat: no two secured systems ever look identical. Spring Security can handle all your needs, but there is no way to document all permutations. So this introduces one keen solution, as general as I felt could be made. But with strong suggest that the reader delve into other books and the project’s own reference docs.

All in all, I hope my readers enjoy it. It’s the last chapter before we take the app we’ve been building to production (next chapter, Taking Your App to Production with Spring Boot).

Happy reading!

Building your platform – Part I

megaphoneSomething I run into time and again is this concept known as Building Your Platform. I’ve decided to provide some useful bits of knowledge I’ve acquired through a series of blog posts.

What’s a platform?

For starters, what is a platform anyway? When it comes to writing, your platform is the place where you can get your message out there. It includes (but isn’t limited to):

  • blogging on your own site
  • social media postings
  • public speaking engagements
  • anything else you can think of where you are in front of other people

(Like that last one?)

In this day and age, if you want to put anything out there, whether it’s a novel, a tech book, or some new fangled solution, you need a means to reach other people and share it. People are really happy that compared to ten years ago, it seems like a few platforms already exist. We all rush out and jump on Facebook or Twitter, and start broadcasting our stuff. Hoping it will pick up.

Guess what? That effort may fall flat, because it’s not the ideal situation.

“If you are not paying for it, you’re not the customer; you’re the product being sold.” —Andrew Lewis

When we use Facebook or Twitter to put our message out there, we are confined to their rules, their look and feel, their priorities, and potentially, being shut down if we do something that violates their terms. In essence, we are not in control.

google-searchThere’s another nagging issue to deal with: SEO. It stands for Search Engine Optimization. Those are fancy words for “How Google finds you when other people are searching”. Basically, if you spend five years building yourself on Facebook and THEN decide to launch a website, you have to start over. Google won’t look at all your content on Facebook when it evaluates what is on your site.

Best thing you can possibly do: start your own website. Today. Yesterday. Get it?

Start your own website. Blog periodically. Build up your name and reputation there. Then, in five years, you won’t suffer the shock of wanting to move your business off someone else’s platform onto your own.

Building a platform

So we’ve discussed what a platform is, and perhaps I’ve convinced you that it’s time to start one. What now? The next step is build your site. Not get on Facebook. Not get on Twitter. Build your site.

Why? Because at first it will look hard, and you may put it off. I guarantee that if you put it off today, you’ll do the same tomorrow, and five years will pass by. Stop what you’re doing and build that site.

But how? See those cool ads on TV for Wix? Looks real nice. Hold it there TV advertising sucker. One must heed the ancient lessons from softwareland.

“Don’t spend effort on undifferentiated heavy lifting.” –Ancient Internet Secret

What does this cryptic, esoteric expression mean? If you’re goal is to sell books or products then don’t waste your time building a website. Instead, pick the easiest, most ubiquitous option that meets your needs and get back to your product.

Translation: Don’t waste hours/days/weeks building a site with Wix or whatnot. Instead, stand up a WordPress site and be done with it.

Around-the-webWhy the venom you ask? Wix looks great on the TV ads, but if you’re spending time moving boxes around on a site, you’re not building your product. WordPress can be stood up in hours. A handful of plugins and you’re ready to go. You can pick a freebie theme today, pick another one tomorrow, and change the theme again next year. Retooling a website using anything more complicated than that is wasting time. And it will continue to waste time for years to come.

I know how to build websites from scratch. Believe me, WordPress is the bee’s knees when it comes to standing up any sort of e-commerce/blogging platform without writing code!!

Setting up a WordPress site

Okay, I could go into the process of standing up a blog site, but guess what? WordPress is so popular that every hosting service provides as a 1-click installation option. Pick the name of your site (mine is “Greetings Programs”), the URL (greglturnquist.com), and off you go.

P.S. In the same spirit as owning your site, it’s also good to own your own domain name. Domain name is the bit before the “.com” (greglturnquist for this site). Since a “.com” domain only costs about $10/year, this is totally worth it. It will be a core piece of your brand that you own. (BTW, stick with “.com”. There are other suffixes, but they can cost a lot more or be somewhat irrelevant. Find one that’s not taken and scoop it up.)

What you will need after that are plugins. And I’ve prepared a nice list for the ones I suggest key for a decent blog/e-commerce site.

WordPress plugins

I have taught a seminar on standing up a WordPress site. I recommend it for any of my friends and readers interested in becoming a writer. In short, I highly recommend the following plugins as a nice basis:

  • Akismet – filter out spam from comments (free base)
  • Contact Form 7 – create forms so people can email you (free)
  • Google Analytics Dashboard for WP – track/display traffic to your site (free)
  • Jetpack – stats, socialize, publicize, and lots more (free)
  • Thrive Leads – build your email list with A/B testing (one time cost of $67/one site or $97/unlimited sites)
  • Yoast SEO – helps you do SEO right (free base)
  • WP Simply Paypal Shopping Cart – if you want to sell any products directly from your site (free)
  • Custom Banners – create banners and groups of banners with hyperlinks (free)

The ones that say (free base) come free but with upgrade options. The base level may be hunky dory in the beginning. When you are raking in thousands every month, perhaps the upgrade options will be suitable.

There are literally hundreds of thousands of plugins, and guess what. You don’t need most of them. These are key. The rest is building good content over time. Learning the ropes.

In the next article of this series, we’ll dive into other aspects of your platform and how to tie them in with your site. See you there!