Announcing @SpringSocial @Ecobee 0.1.0.RELEASE

Greetings Spring community,

Spring Social Ecobee is a community project lets you connect to your Ecobee Smart Thermostat. Right now, it has a handful of functions like looking up all your thermostats, getting sensor readings, and posting status messages to your thermostats. Ecobee’s REST API has a plethora of functions such as overrides, programming, home/away settings, and more. Support for these will be added to Spring Social Ecobee as time progresses.

Releases are published to maven central. Visit the project site if you need details to work with snapshots.

Project page:  https://github.com/gregturn/spring-social-ecobee
Discussion: https://gitter.im/gregturn/spring-social-ecobee
CI: https://travis-ci.org/gregturn/spring-social-ecobee
Version: 0.1.0.RELEASE

Sign up for my newsletter!

Happy coding!

Darklight joins @pinterest

I recently got excited about Pinterest. My wife put together a great board for her debut novel, that is being published in July. I had a small set of pictures related to Darklight, so I took the plunge and signed up. To the right is a link to my board. I had a couple images based on my thoughts. But most of all, I spotted a woman decked out with a style that perfectly looked like the Snitch I have been writing about since 2010. Enjoy!

Follow Greg’s board Darklight on Pinterest.

If you’re interested, be sure to sign up for the Darklight newsletter.

It happened just like this…

Last night’s night’s writing prompt:

* * *

Manager dropped the problem in my lap. I look up at my screen start typing. Hmm. How do you do that? I look over at my book shelf. My finger runs across the six books I have. I fish one out, flip to the chapter that has that stuff, and spot the nugget of code I need. Problem solved. Next day, I run into a weird issue. Trying to remember the function, I scan my repertoire of books. None of them cover that. Scratch that. I need to stop by the book store and get another one. Imagine that process day after day for some time. Then suddenly, this new website pops up. I hear people in the hallway chatting about it. “What the heck is a Google?” someone asks. I go back to my desk and type google.com. This plain old white page with the word “Google” appears at the top with an empty box in the middle of the screen. What is this? Why is everyone talking about this? I type in “array comprehension” and the Python reference manual pops up with a dozen links to blog articles showing how to use it. The next day, I find myself constatntly pulling it up. Nothing will be the same again.

World building can be a bugbear

medieval-townIt’s always entertaining to see how different authors handle world building. In case you didn’t know, any story needs to paint a backdrop. The closer the world is to our own, the easier this can be. Adventures on alien planets with alien beings wielding alien artifacts can be the worse.

I have been reading The End of Eternity the past few days by Isaac Asimov. It’s one of his titles that isn’t so well known, and hence never found in bookstores. It is only in this digital era that I stopped to buy an e-book version. The story is incredible. The world is very different, but as always, Asimov paints just enough world to pull me in. And he leaves just enough out to surprise me along the way.

Fantasy books often dig into this arena. The risk is that by slowing down to describe the physical surroundings, the rules of magic, the history of the people, and everything else, you will slow down the action of your story. In an interview with George Lucas, he clearly fires a shot at prior science fiction movies as wasting too much time “showing off” their world. After hearing this, I’m convinced he was thinking directly about 2001: A Space Odyssey.

2001In that movie, they clearly show off the future when a space-aged flight attendant walks around with velcro shoes, when a ship does the “waltz” of aligning itself with the landing platform, and when Dave Bowman runs through the centrifuge of the ship to exercise. These bits did little to advance the story, but instead focus on world building. Us geeks dig it, but when I talked my wife into watching this movie, she found it BO-RING!

Regarding Darklight, I have a detailed collection of notes with the backstory of every character. I have a detailed history of where this world came from, where the relics and magic come from. And how these things are intertwined with each other. But I can’t just lay it in the reader’s lap. Instead, it is up to me to release bits and pieces at the right spots, using the context and understanding of the characters at hand. This is truly a challenge and something I have edited MANY times. My goal is to have an exciting canvas to paint this story and many more across. I didn’t realize there were a couple dozen sub-gre

Happy writing!

Editing Darklight left and right

undergroundersIt is about three weeks from the Clarksville Writers Conference. My wife and I are signed up. As part of this endeavor, I have pledged to complete a top to bottom edit of Darklight.

It is tough. I have been writing this novel for about five years. The last big push was about two years ago when I finished it. I sent it out for feedback from a couple beta readers and slowly waited for comments. Since then, I haven’t been real active on processing it. First of all, I got engaged in writing Learning Spring Boot, which took a big bite out of everything. Next, editing can be real boring. You aren’t creating but instead polishing.

Well, I finally got things in gear when the Clarksville Christian Writers group was formed several months ago. We’ve been meeting weekly and it has been a fantastic opportunity to critique each other’s work. I hunkered down and started editing one scene at a time. And I realized how dreadful some of my writing was! I have gotten a lot smarter on POV, show-don’t-tell, simplified tenses, and the overuse of adverbs. What seemed challenging to notice before now stands out like a sore thumb.

I have been hacking away at my story, but then decided I wanted a polished up manuscript to take it to the conference in case an opportunity presents itself. At the time, I was on page 30 of a 122-page manuscript. The math didn’t line up, so I have stayed up late almost every night to knock out 3-5 pages. Last night, I hit page 66. Still don’t know if I can make it, but I sure am punching a bigger hole in this problem. I feel like every scene gets tightened up and more compelling. I have boiled away words without losing the meaning. Side effect: better. Much better.

Happy writing!

We won’t own our own information until we do

Not a week goes by when I hear some story about people displeased with how their own content has been misused. People gripe that entering stuff into Facebook no longer belongs to them. Other people copy-and-paste such stuff into other places. Things go “viral”.

I chuckle at how so many politicians act like we are still in a pre-YouTube era. They say and do stupid things in front of small crowds. Someone inevitably grabs a clip with their phone, posts it to YouTube, and it blazes across the twittersphere. Or someone makes an accusation or promise, and in minutes, a video interview from fifteen years surfaces and gets re-posted to the interwebs.

The truth is, there should be some sense of ownership of our content. If I post something, somewhere, I understand people’s desire to hold onto it and have the last word. Unless you speak it in front of someone else, and they make an independent copy, it makes sense that you should be able to effectively delete your posting. What you said and the repercussions thereof are your own issue to deal with.

The truth is, we can’t “own” anything we write anywhere unless we can wrap it using encryption technology. Essentially, if every blurb you posted was an encrypted bundle, people would have to come to you to decrypt and read it. Throw away the key, and that blurb is gone forever. For certain avenues, like everything I write on Facebook, I can understand retaining a hold on it. And if someone wanted to copy-and-paste it, it would be really nice is the encryption traveled with it. Copy it 1000 times, as long as the wrapper is in place, and you still control it.

But there in lies the rub. Encryption technology has proven far too difficult for mass consumer adoption. Just now, the web is headed towards moving all web traffic from HTTP to HTTPS to prevent intermediate snooping. This should have happened years ago. But the next big leap would be encrypting all email traffic. With people losing laptops and thumbdrives, lots of security breaches have happened. If ALL email was wrapped in encryption, privacy would be a much stronger concept. But the process of doing that is arduous. Exchanging keys, keeping your private key secure, and then entering passphrases all the time is a hassle.

Take that concept and apply it to every other medium in which you write something. Even this blog entry! It’s safe to say, such a concept won’t come to pass until it becomes effortless to prove on a terminal you are who you say you are, and to lock and unlock keys suitably. Seeing the web move to SSL is a good sign. I just hope we can migrate along these paths faster than we can figure out to integrate stuff together smoother. We must own the pipes and the traffic our data rides along.

I woke up alone in the middle of the woods with only this note…

Last night’s writing prompt:

***

You have made a grave mistake. And this is your punishment. You will find up ahead nothing more than a small cabin. Enter it, and you will discover a rug. Move the rug and you will see a trap door. Open the trap door and enter. Because that is the only way you can find everything needed to discover your way home. There may be challenges. There may be danger. Don’t believe everything you hear or see. If you don’t make it, then justice will have been served. But if you can surmount all the obstacles and find twenty treasures, you will have redeemed yourself. You will be granted freedom to leave this wretched place. Good luck.

–the Zork tribunal

Today is “Day against DRM”. My fine friends @PacktPub are offering a 24-hour flash sale. #AgainstDRM

I have written three books for Packt Publishing over the past five years (Learning Spring Boot being the latest). They have supported me well. Many of you are aware of DRM (Digital Rights Management). That is coder speak for “wrapping content you bought with controls left in the hands of supplies”. I don’t dig DRM. I cheered it when free market competition brought out DRM-free music from certain vendors.

I believe in paying for content to support creators, but also having the freedom to put content I purchased on any of my devices. It’s another reason I like Packt. Their e-books have been DRM-free since Day 1 (2004). That is über cool.

Whereas I would leap for joy if you bought a copy of my book, I sincerely ask that you search their vast list of titles and pick out something you enjoy.

Happy reading!2015 Banner

 

Welcome to my blog…

I provided last night’s writing prompt: Welcome to my blog, ___________. I want to tell you about….

***

Welcome to my blog, How to Write A Best Seller

I want to tell you about how to make money, and make it FAST! You only have to write one biggie to make it. Worried about your grammar skills? Don’t worry. That isn’t critical. Sentence fragments never stopped Lee Child from winning TWO prizes for his debut Jack Reacher novel. Some of the best writers out there get away with murder. Head hopping getting you down? New Yorks Times best selling authors use it. J.R.R. Tolkien uses it. Why shouldn’t you use it? Verb tenses getting muddled up by your editor? Verb tenses never slowed William Faulkner down. By the way, here at How To Write A Best Seller, we love adverbs. 1960s Sci-Fi is cool and they used ’em. You can too. Just sign up below and join our fantastic mailing list with 100’s of thousands of others, and you will be on your way.

Continuous Integration, or What doesn’t kill us makes us stronger /cc @ewolff

I have gotten onboard with using Travis CI for several projects. It is really cool. You can see some badges listed here:

  • Spring Social Ecobee Build Status
  • Issue Aggregator Build Status
  • Drone Aggregator Build Status

(You can go ahead and click the icons to see more)

Having a constant indicator of something passing or failing is incredibly handy. But upon reflection, I remembered having built just such a system over fifteen years ago.

A long time ago, in a cubicle far, far away

Back in the dawn of my career, I wasn’t granted the privilege of coding features. Instead, I wrote tests for other people’s features. This was a time that predated automated testing and developers being on the hook for their own stuff. Instead, test teams were employed to attack the code with a battery of written procedures. To warm me up to the system, I unit tested other people’s stuff. I had cute test cases that would print out the code’s outputs and my own expected outputs. (Why I didn’t make the final link and simply assert those two values being same I’ll never know). But my tactics of having visualize printouts where these two values would appear right next to each other on the console inspired others to do the same. I spotted another tester quickly adopt my technique. First instance of professional flattery I can remember. It goes to show that when you have to do testing all day, you come up with ways to check off the box faster when values match. (Again, no idea why I didn’t let the test compare the values. Newbieness?)

I shared a cubicle with another junior developer. His job was to run handle the CM process. At the time, our application took ten HOURS to build. You heard that right. Thank you ADA. We also used an ancient form of version control. I call it “one dimensional” version control, because there was no such thing as branching off of master. There was a single, monotonic set of version numbers. When people needed to check out a copy of the system, they came to my cube mate to clone the baseline, which was really what people today might call a version snapshot. That’s because copy the entire baseline from a version snapshot and doing a first, clean build, took ten hours. No senior developer’s time was worth it to do that process themselves. (Incidentally, this is the reason features were HUGE and took weeks or months to complete. If it was going to take ten hours to cut a new workspace, might as well cram as much functionality as possible into it, ehh?)

That which you support you may one day take over

The side effect of sharing this cubicle was that i became his backup. So, I learned how to do his job. Perhaps you can see where this is going? I ended up taking over his job. He moved on. Granted, he had graduated from college with a degree in English and truly sought a career as an author. This was just his daytime job. So he took the path of least resistance. I had a different thought process. I strove to speed up everything possible.

One of our processes involved moving up the “stable” version of things. We had a weekly meeting where my manager would review completed features, and essentially give the green light for to move the “master” position of things. FileX.ada would move from version 4 to version 8. FileY.ada would move from version 15 to version 19. You get the idea. Very expensive and subject to MANY errors. I hated this process. So I sought to fix.

My first Continuous Integration system

Being the script junky that I was (still a bit premature for “test-bitten”), I used that spare time of watching ten hour builds spin their wheels to craft some PERL scripts. I knew how the current batch of scripts operated. What if I kicked off the same build process, only automatically at midnight against the “master” snapshot? What if I captured the outputs in a log file? That way, everyday at 10 a.m., I could review the latest build and spot any errors. After a little chat with a sys admin (I was using a SUN box at the time), I crafted my first CRON job.

It took a few iterations of coming in and seeing if my job launched. Translation: I wrote a CRON job and came in the next morning to see if it ran. At all. Failure? Tweak the job and wait until tomorrow. Several days later, I had the job working great. I could peruse the results and alter the format of the output. Now that i was reviewing this daily report, I started to alter its format. There were key things i skimmed through to spot. To make the reading easier, I prefixed them with “!!!!!”. After a few weeks of this fine tuning, I started to filter the report to ONLY look for this tag. Finally, I added the feature that if there were no “!!!!”, then the build was a success.

By the way, this wasn’t running my test suite and verifying the code. I was too green to see that. Instead, this was simply COMPILING the code and seeing if it passed. But once I had this report in place, I crafted some queries to look at who had submitted what today we might call a “pull request”. My scripts would look at the newer versions of the files, create a snapshot copy with those changes, and do the build job. I would see the outcome at 10 a.m. If it passed, my new copy became the new “master” snapshot. If not, I chucked it and instead focused on what broke. I would take this feedback to the relevant parties and let them sort it out.

Manager’s delight

When I presented all of this to my manager, she was delighted! Pretty soon, those weekly integration meeting vanished. I had figured out a way to continuously build the system with the latest changes and upgrade things. I could start the day with running my test suite against a newer version of things. Yee-hah!

The management team extended my time on this project twice. I was clearly kicking butt and taking names in the land of integrating completed features. But I wanted to build the systems myself, not simply maintain what other had done. So the third time they asked for an extension, I turned them down. I moved on to other projects my company was hosting. But I had cut my teeth on what today everyone knows as continuous integration. Picking up skills in CRON jobs, understanding the core mechanics and ramifications of version control and change management, and seeing the benefit of automating the heck out of things had paid me back with dividends throughout my career.

Seeing tools arise that make it easier and easier to seek higher quality in software warms my heart. Create your repo on GitHub,. Link it up to Travis CI and fiddle with a few settings. Have it deploy automatically to production on Cloud Foundry. Plugin a Chat Channel (gitter). It feels like ten years ago, we were working in the stone ages. I just wonder what things will be like ten years from now.