2018 Goals and Habits

Last year I focused mainly on my weight. I developed healthy habits around diet and exercise and I plan to continue those through 2018, and hopefully for the rest of my life.

My overall focus for 2018 is going to be creativity. I have lists of unstarted ideas and folders full of unfinished projects. I have ideas for books, websites, a tabletop game, screencasts, and other programs. I always said I would get back to these some day. This year, I’m going to find “some day.”

My secondary focus for 2018 is learning. Some of my ideas will require me to learn some new skills. I plan to use my creative projects to reinforce and grow my abilities in Python, data science, and machine learning.

I’m over half way through Python for Data Science and Machine Learning on Udemy. After that I’m either going to work through Practical Deep Learning for Coders on fast.ai or enroll in Andrew Ng’s Machine Learning Coursera Course. If I have time I might do both.

I truly believe that data science and machine learning are the future. I got lucky and learned Ruby on Rails at exactly the right time to make web development my career. I hope to catch the AI wave before it passes me by. Not that I think Ruby on Rails is going away any time soon.

So my goal for 2018 is to develop habits around writing, both prose and code, and learning via online classes and books. Carving out time for these new habits might be a challenge, but hopefully I can work on something creative every week. I’ll continue to work on the good ideas and scratch out the bad ones. All while continuing to learn and grow as a developer.

Looking Back on 2018

As we move forward into 2018, I can’t help but reflect on the previous year. So much has changed in our country and in society in general. It seems like there’s so much negativity in the world, but I try not to dwell on those things. Instead, I’d rather talk about a few positive things that I personally accomplished last year.

NaNoWriMo

In the month of November I wrote 21,288 words of a novel. That’s far short of the 50,000 word goal, but it’s over twenty-one thousand words I didn’t have in October. I started the month pretty strong, but then struggled and didn’t write at all around the Thanksgiving holiday. Even with the missed days I averaged over 700 words per day. Writing at that rate every day, I would have over 250,000 words by the end of this year.

Health

Starting in March 2017, I decided to finally get back in shape. I started counting calories and tracking my weight in the [Lose It!] app. I also started walking on the trail behind our house every day. I track my steps and daily workouts on my Apple Watch.

Doing this, I averaged about 10 pounds of weight loss per month for the first few months. By the end of the year I was eating around 1,500-1,600 calories and jogging 2-3 miles per day. Since March I’ve lost 65 pounds. I’ve continued counting calories and exercising for at least 30 minutes every day and don’t plan on ever stopping.

Habits

Most people that hear about my weight loss say I must have amazing willpower, but I don’t think that I do. Instead of mentally forcing myself to exercise every day, I made it a habit. It’s just something that I do every evening, usually right after dinner.

So much of what we do in life is based on what we’ve always done before. If you sit around and play video games every evening or watch Netflix, then you’ll probably continue to do those things. Trust me, I know.

One day I just decided to go for a walk instead of goofing off. I didn’t walk for very long, but I felt good afterwards. I kept going for walks every evening. Soon, I started seeing results. I could walk a bit farther each time. More importantly, I started losing weight. That’s very motivating.

This also explains why I failed at NaNoWriMo. I never really made it a habit. Instead of scheduling time for writing every day, I tried to squeeze the writing into my free time. Once my free time started getting shorter, I stopped writing. I hope to avoid making this mistake again this year.

You Are the Product

I’m becoming more disillusioned with social media every day. I recently came across this article on the London Review of Books thanks to Longform.org. It does a great job of capturing and reenforcing many of my thoughts. Here are a few choice quotes:

… anyone on Facebook is in a sense working for Facebook, adding value to the company. In 2014, the New York Times did the arithmetic and found that humanity was spending 39,757 collective years on the site, every single day.

Everyone actively using Facebook provides content. Facebook makes money by selling ads next to content.

Since the Facebook button is pretty much ubiquitous on the net, this means that Facebook sees you, everywhere.

Search for something on Amazon, then visit Facebook. But maybe the targeted ads don’t bother you or you feel that it’s worth it to stay in touch with friends and family.

… researchers found quite simply that the more people use Facebook, the more unhappy they are. A 1 per cent increase in ‘likes’ and clicks and status updates was correlated with a 5 to 8 per cent decrease in mental health.

So, in an effort to maintain my mental health, I did this:

If you can’t join me, it might already be too late for you…

» You Are the Product

Chris Cornell

What a tragic loss for music fans everywhere. Especially fans around my age.

Here’s an acoustic performance by Chris Cornell of the U2 song One while he sings the lyrics from the Metallica song One. Amazing.

I came across this video while browsing some of the live tributes to Chris Cornell performed by other bands. Unfortunately, most of these are low-quality bootlegs, but he obviously touched and inpired a lot of other musicians.

The Vanishing Middle Class

A few days ago Jason Kottke linked to this review of a new book on the growing economic divide.

As someone who worked full time through college and financed classes and books with the help of my wife and our credit cards, I can relate. Passages like this bring back memories:

Here, the world of possibility is shrinking, often dramatically. People are burdened with debt and anxious about their insecure jobs if they have a job at all. Many of them are getting sicker and dying younger than they used to. They get around by crumbling public transport and cars they have trouble paying for. Family life is uncertain here; people often don’t partner for the long-term even when they have children. If they go to college, they finance it by going heavily into debt. They are not thinking about the future; they are focused on surviving the present. The world in which they reside is very different from the one they were taught to believe in. While members of the first country act, these people are acted upon.

Thankfully, that was almost 14 years ago and my family has moved on. For others, the situation is only getting worse.

I believe there are those in the “first country” who are willing to help (I like to think I’m one of them), but the current political climate makes this almost impossible.

» America is Regressing into a Developing Nation for Most People

Interesting Reads

I’m paid to spend my days staring at a softly glowing LCD. In the midst of writing code and attending meetings, I also browse the web. Most people would consider me an old-school web surfer. I still follow blogs and read posts in an RSS reader (Feedly if you must know).

I realize that long-form writing has mostly fallen out of favor, but I still enjoy it. As a matter of fact, I frequently come across articles that I feel need to be shared with the world. In the past, I’ve posted these articles on Facebook or Twitter, but I find that the less time I spend in the social media cesspool, the better I feel.

Having said all that, I plan to start adding links to articles that I particularly enjoy to this site. I’ll probably include a pithy comment along with a qoute or two. My interests are fairly varied — I still read a lot about programming, but trending towards more Python for data science and machine learning. I’m also interested in the current political situation and its effect on economics and the world.

If your interests overlap mine, you might enjoy some of the same articles. If not, feel free to keep on scrolling.

Hello Jekyll

If you’re reading this, then the migration from WordPress to Jekyll is complete. WordPress is a great blogging platform, but it just doesn’t fit the way I work anymore. I spend my days using git and GitHub and everything I write is plain text in Markdown.

With Jekyll I can write posts using Markdown in my favorite text editor, Byword on iOS or Atom on everything else, then commit to GitHub to update the blog. Hopefully this will result in more frequent updates, but no promises…

Where Are The Comments?

I’m very grateful for all of the awesome comments I’ve received over the years. Unfortunately, comment spam is still a big problem. Even with tools like Akismet to filter comments, some manual labor is still required. Here are the numbers for my blog as of today:

Wordpress Spam

That’s right – there are 123 comments on the site and 170,348 were blocked as spam. There are also 94 comments that might be spam. Those need my attention. I exported all of the non-spam comments from the old WordPress blog. Those may come back someday, but probably not. In the mean time, you can find my contact information at the bottom of every page.

Unfollowing Users

A few readers have also asked me to add an Unfollow button for the sample social network in Rails Crash Course. Here’s how I made that happen:

I created a new branch called unfollow-user and added the Unfollow button.

Here are the steps I followed:

  1. Update config/routes.rb to include a route for unfollow_user. Since this removes a row from the database, I used the DELETE HTTP verb.
  2. Add an unfollow! method to app/models/user.rb, similar to the follow! method.
  3. Add an unfollow action to app/controllers/users_controller.rb, similar to the follow action.
  4. Add a Unfollow button to the view at app/views/users/show.html.erb. I also added some logic to show the correct button.

The changes are in this commit: 29fa67a

Hope this helps!

Destroying Comments

A reader asked if I could add the destroy action to CommentsController for the sample blog in Rails Crash Course. The changes are summarized below.

I created a new branch called comments-destroy and then added the destroy action.

Here are the steps I followed:

  1. Update config/routes.rb to include a route for comments destroy
  2. Add a destroy method to app/controllers/comments_controller.rb
  3. Add a Destroy link to the comment partial at app/views/comments/_comment.html.erb

The changes are in this commit: f410496

Note this is the same as Exercise 3 at the end of Chapter 5. The answers for all exercises are in the back of the book.

Hope this helps!

No “Getting Started” Tonight

The Getting Started with Ruby on Rails workshop has been cancelled due to lack of signups. That’s a shame, I was really looking forward to this one. Obviously I didn’t do the best job of getting the word out about this event.

Let me know if you were also looking forward to it and I’ll see if I can set up another session in the future. Another alternative might be something like a screencast or Google Hangout.