Johnathan.org

December 9, 2016

How Long Has it Been?

Way too long. I haven’t posted anything to the site since July. I feel like I’ve neglected a child.

Many things have happened in the last year, some good, some not so much, and I want to talk about all of them over the next month.

Get ready for some deep dives, some reflections, and some life stories.

July 29, 2016

My Learn Ruby on Rails List

I’ve been meaning to write this post for a while and kept getting distracted. This evening I sat down and finally hammered it out. The goal is to share some of my favorite Ruby on Rails learning resources with the community. Let’s get started!

Ruby, is an incredibly versatile programming language and is the 6th most popular programming lanuage on GitHub. By extension, Ruby on Rails is a powerful web application framework that powers some cool sites: GitHub, AirBnB, Funny or Die, Groupon, Hulu, Square, and Urban Dictionary are a few of a pretty cool list. Neat.

If you’re interested in getting started in learning Ruby on Rails, I’ve put together a list of some of my favorite online tutorials, books, screencasts, and courses to get you closer to becoming the Ruby and Rails expert you always dreamed of being.

Books

The Ruby on Rails Tutorial

cover-web.png

Michael Hartl’s course is probably my goto resource for learning Ruby on Rails. You can read an online copy of his book for free, but buying it means you get acess to the answers guide and optionally screencats.

I’ve worked through this book when it was written for Rails 4 and I learned a lot about the basics of Rails. It covers just about everything including MVC, testing, databases, and deployment.

Coming November 2016 is a print version of the book. If you’re a fan of print material, this one should definitely be on your list.

Learn Ruby On Rails For Web Development

John Elder is a veteran programer at Codemy and his book is a killer resource for the absolute Rails beginner. Learn Ruby on Rails For Web Development covers a lot of the same material as Michael Hartl’s book, but if you can’t wait for a print version, I’d grab this one. Plus, if you’re a Kindle Unlimited subscriber, the book is zero dollars!

Learning Rails 5: Rails from the Outside In

Screen Shot 2016-07-29 at 4.31.03 PM

If you’ve ever read an O’Reilly book in your life, you’ll feel right at home with the familiar single-color cover theme and interesting animal choice. In this case, Learning Rails 5 rocks a horse-looking animal but don’t let that deter you. Mark Locklear and Eric Gruber guide you starting with the simpler components of Rails and gradually introduce you to complex topics.

Online

Code Academy

Screen Shot 2016-07-29 at 4.34.31 PM

If you’re like me, you enjoy a good online course. Code Academy provides just that with a five hour introduction to Ruby on Rails. If you learn well by doing, this might be just your thing. Code Academy teaches you the basics using various projects to highlight components of the Rails framework.

Code School

Screen Shot 2016-07-29 at 4.40.17 PM

If you’re looking for more in-depth online course learning, Code School is your answer. Each of the courses here are more in depth and cover more complex topics. Don’t worry, though. Code School covers the basics, too. You’ll find yourself spending a lot more time here, vs Code Academy.

Rails Casts

Screen Shot 2016-07-29 at 4.50.28 PM

While new videos haven’t appeared in a few years, the information is still relevant and new videos are coming soon, according Ryan, the site’s creator. To date, there’s roughly 400 videos to watch, though most require a subscription ($9/month).

Coder Manual

Screen Shot 2016-07-29 at 4.48.49 PM

While it bills itself as a coding bootcamp, I’d say Coder Manual closer to a regular online course. Coder Manual is incredibly in-depth and the videos are cut up into small chunks to make them easy to consume. You can follow along with your own project as well as get the materials used in each section.

On the flip side, beyond rails knowledge, you’ll touch on HTML, JavaScript, and even job hunting. It’s a bit on the pricey side but for the material and education you receive, I’d say it’s worth it.

Bootcamps

Coding Dojo

Screen Shot 2016-07-29 at 5.00.32 PM

If you’re looking for a more serious, structured course, a bootcamp will likely meet those needs. Coding Dojo’s 20 week program teaches you not just Ruby on Rails, but Python and Web development fundamentals. If you’re up for it, you can learn on site, too.

Bloc

Screen Shot 2016-07-29 at 5.13.18 PM

I’ve always been a huge fan of Bloc. It’s pricey, but they have financing options and the courses are some of the most in-depth I’ve found. You’ll meet with someone at least once a week as you work through the program and get the opportunity to build real applications that do what you want them to do.

Launch School

Screen Shot 2016-07-29 at 5.07.47 PM

If the idea of paying a ton of money up front doesn’t sound appealing to you, you’re not alone. Launch School offers crazy in-depth courses including front-end, back-end, APIss, and career assistance for $199 a month. If you’re like me, you spend half of that on complicated coffee drinks every month, anyway.

Did I miss anything? Let me know in the comments, below, if you have any great resources you think I should add here.

July 21, 2016

Polymail

I’m super excited to write this blog post. I’m always interested in new mail clients (I miss Mailbox). When I found out Polymail dropped for both iOS and Mac, I jumped on it. Apparently so did everyone else, which lead to some problems.

If you’ve never heard of Polymail before, don’t feel bad. I didn’t hear about it until super recently, myself. Polymail has a super slick UI that doesn’t waste space with stuff you don’t need. It features killer email delegation and reminders (remember when Mailbox let you put off an email until a date in the future?), get information about the person you’re talking to, and keep all this organized and synced between all your devices.

Triage

Let’s talk about the follow-ups, first. I’m a huge fan of triaging tasks. If it’s not time-sensitive, it doesn’t need doing right now. Granted, if there’s nothing else that needs doing, that logic doesn’t apply. This is super helpful for those with noisy business inboxes where everyone and their grandmother is clamoring for your eyeballs to absorb their textual essences. Sorry grandma, I’ll take a look at that chain letter tomorrow at 4:30 PM.

You can choose to follow up on a conversation using one of the preset dates, be super noncommittal and say “read later”, or pick an arbitrary date in the future, because you’re a master of your schedule and you know you have sixteen time slots open right now between today and Christmas 2018. Those voids of sadness need filling!

On the flip side, you can remind yourself to follow up with someone else if they don’t read your email. This is a neat feature, but be careful. You can very easily become “that person” that everyone in your office hates. You know which person I’m talking about: “hey did you get my email?”

With great power comes great responsibility. Can I trust you to not abuse it?

Following Up

When you’re writing your digital prose to the person on the other end your email exchange, knowing who the heck they are is important. It’s even more important in cases like candidate screening or figuring out if the person is real, or not. Next time you get resumes for a job application, use their information Polymail will glean about them on your behalf.

The Downside of Cloud Sync

While writing this quick review and even attempting to use Polymail, I ran into two problems that I think are worth noting.

First, cloud sync is a very dangerous territory to enter if you’re not prepared. In the case of Polymail, I don’t think they were. The sign up process requires you give them access to your email accounts, which is fine. The problem here is, they do everything through their servers. The emails don’t go straight from gmail.com or outlook.com or your O365 account to the client. Nope. That’s too easy (or hard). I found this to be true when after about six hours, Polymail claimed I didn’t have new email. If only that was *really *the case.

Hi all! 👋 Initial mail syncing may take a little longer due to high traffic right now, but we’re working on it. Thanks for your patience! 💌

— Polymail (@PolymailApp) July 21, 2016

That’s the tweet Polymail posted about the delays. Given I haven’t received more than one round of emails, I’d say it’s more than a delay.

My second problem is moving email accounts from one Polymail account to another. I wanted to use Polymail for work, too, so I created a work Polymail account. I also wanted to get my work email on my personal devices using Polymail. My routes were to use my work Polymail account everywhere else or move my work email to a personal Polymail account. I opted for the latter but ran into an issue.

My work email address is stuck in some sort of “account will be deleted” state that won’t progress. I didn’t think it’d take hours to delete an account, but I guess so. In the mean time, no work email via Polymail.

End of the Day

Originally I was pretty hesitant to jump in because of cloud syncing issues. This morning, I checked on it and everything seems to work well now and I was no longer getting the error in adding my work email account. So with all that being said, I’d definitely recommend Polymail.

You can pick up Polymail from polymail.io for the Mac and the App Store for iOS.

July 11, 2016

Live Streaming with Hardware Acceleration using a Raspberry Pi and RTMP/HLS

If you’ve been following my blog post series on the development of my ever so useful cat cam, powered by a Raspberry Pi, you’ll know I’ve made several attempts at a more stable and scalable streaming solution for my Cat Cam. As it stands today, I’ve been using Motion. While it’s a decent tool, Bandwidth has been my primary concern and I’d like to be able to stream real-time without sucking up what measly bits my ISP gives me if more than a few folks decide to show interest.

So far we’ve tried ffmpeg => ffserver and that turned out exactly how you probably thought it would. Next, I tried swapping ffserver with an Nginx-powered RTMP server. While not an entirely fruitless endeavor, there were some blockages that I just couldn’t get past.

I received a suggestion from a colleague to fire up the Raspberry Pi’s hardware encoder/decoder. Up until yesterday, I didn’t know this was a thing. Shame on me for not looking into it. So that’s what we’re going to cover in tonight’s post: taking some of what we learned from our first RTMP attempt and make the hardware do all the work. With any luck, we should see some real perf gains, possibly enough for live streams to start instantly (which would make web players happy).

Since I felt like including it here would deviate from the purpose of this post too much, I wrote up how to Add RTMP Support to Nginx if you installed it via apt-get like me. If you’re in that boat, take a moment to read over that post then come back to this one.

Setting up ffmpeg to use hardware H.264 encoding used to be a fat challenge, but they’ve since added support to the official codebase. If you followed my original ffmpeg post, you’ll have a recent enough version that includes this code, but we’ll still need to compile it.

What we’re looking for this time is the OpenMAX IL (Integration Layer) acceleration module.

[email protected]:/usr/src/ffmpeg $ sudo ./configure --enable-omx --enable-omx-rpisudo makesudo make install

That’ll take some time, as I’ve said before. You’ll have enough free time on your hands to get make something to eat. Come back in an hour or so and it should be done.

NOTE: If you run into ERROR: OpenMAX IL headers not found, then you’ll need to run

apt-get install libomxil-bellagio-dev

Thanks, lordofduct in the comments for that one!

From this point forward, we’ll be starting ffmpeg similarly to how we did it before but with a slightly different codec.

ffmpeg -i /dev/video0 -framerate 30 -video_size 720x404 -vcodec h264_omx -maxrate 768k -bufsize 8080k -vf "format=yuv420p" -g 60 -f flv rtmp://example.com:8081/hls/live

I confirmed VLC is able to play the stream, which is excellent, and there are no lag or jitter issues. It’s about 10-15 seconds behind live, which is totally fine.

I was able to set up an HTML5 player using tools from Bitmovin. I’m not entirely happy with this setup, though, as the player isn’t free and only HLS is supported, right now1. In my next post I’ll cover a new idea that came to mind when looking into the coolness of Ruby on Rails 5: WebSockets.

Update July 11, 2017: @HPGMiskin pointed out libomxil-bellagio-bin is not a thing. I’ve pulled that from the optional step for missing OpenMAX headers.

July 9, 2016

Revenant

It takes a lot for a movie to convince me to write a blog post about it. I generally don’t do movie reviews, and this isn’t one. What this is, is a reflection; a documentation of experiences and feelings. For the next few minutes, I want to pour myself out just a bit.

The Revenant was an impulse buy. I was strolling through Target and saw it on the shelf almost by happenstance. In the most ironic fashion, I quickly checked to see if it was cheaper on Amazon. To my surprise, it wasn’t, so I grabbed it. With my upcoming foray into 4K, I grabbed the 4K UHD + Blu-Ray + Digital HD combo pack for about $25 plus tax.

After grabbing some lunch to go, I promptly shuttled myself home and popped the disc into my PlayStation 4. I had heard good things about this movie and I wanted to obtain the highest quality experience I could muster with what I had. This meant grabbing my Bose noise-canceling headphones and plugging them into my PlayStation4 remote and opting to pipe all audio through them.

Best. Idea. Ever.

(some mild spoilers ahead)

From the very beginning, I knew I was going to enjoy this movie. I will quickly get enthralled with any kind of atmospheric experience and I feel The Revenant definitely delivered.

The last time I felt my emotions match that of the character on screen, I cannot recall. This film isn’t just about fur trapper in the vast and monolithic landscape that was the unexplored west of America. It’s not survival movie. Leonardo DiCaprio’s character isn’t battling nature.

This movie is a battle of man. The struggle between human nature and nature’s humans. As the song goes this land is your land, this land is my land, from California, to the New York Islands… except it wasn’t. This land was vast and untouched. Scar-free. Void of the cancers that man inflicted on it.

It’s also man versus himself. Man versus his inner corrupted soul. Man versus his desire for more at any cost. Man versus his bloodlust for alpha status.

Throughout the journey on which the film takes you, a feeling of sadness sets in and you start to feel overwhelmed with the chaos unfolding. The fight against (definitely not with) nature will take its toll on you, the viewer.

The Revenant © 20th Century Fox

When you start to feel what the characters are feeling… when you find yourself frustrated and wishing for nothing more than for Hugh to pick himself up and keep going… you quickly realize that’s not how this works.

Fighting against man is something man will do forever. Man’s mind is narrow, shallow, and full of arrogance. If they’re not careful, man will consume itself.

You’re in a battle with yourself and the world around you (in a metaphorical sense); there isn’t an endless supply of energy and motivation. There’ll come a time when you feel defeated.

That’s when you choose what’s most important to fight for. Do you fight against one or fight for another? Where do you think your real hidden strength lies?

Coming back to nature for a moment, in this context, nature is the helpless victim in this battle. Nature will fight back, but can only fight for so long. The infamous bear scene is a pure and gritty example of this. This isn’t a bear attacking the character, this is nature defending itself.

Until it can’t. Man has won… but at what cost?

[![The Revenant © 20th Century Fox](/assets/images/2016/07/revenant-gallery-14-gallery-image.jpg?resize=525%2C283&ssl=1)](/assets/images/2016/07/revenant-gallery-14-gallery-image.jpg?ssl=1)The Revenant © 20th Century Fox

Weaved into the major story is a minor story about personal loss. Imagine what it would be like to lost the ones you loved to such savagery with no way to stop it. Just watching the world around you fall to pieces is enough to make anyone lose their s–t. The commentary on this is: it’s real. Those who are closest to you have the most profound effect on you both when they’re by your side and when they’re gone.

By now you’re probably thinking I’m out of my damn mind. Being unaware of the complexities is one thing… to pretend they’re not there is another.

[![The Revenant © 20th Century Fox](/assets/images/2016/07/revenant-gallery-13-gallery-image.jpg?resize=525%2C283&ssl=1)](/assets/images/2016/07/revenant-gallery-13-gallery-image.jpg?ssl=1)The Revenant © 20th Century Fox

The larger message of this film is how man took over the land we call America. It was gritty, chaotic, violent, and selfish. The White Man was a savage beast that stopped at nothing to get what he wanted, all the while thinking the natives were the savage ones. The hubris was overflowing. The amount of blood, tears, sadness, and anger this country was built on is enough for millions of lifetimes. The expense? Heartache. Loss. Sadness.

Director Alejandro Iñárritu is a master craftsman. The visuals are pristine, as was the land before. The entirety of the film was shot with all natural light. If it’s dark, it’s dark. If it’s light, it’s light. The absence of artificial atmosphere will pull you in. You’ll be in awe of the landscapes, shot mostly in Canada and Montana. The crispness of the air, the ice-cold flowing rivers, and the crunch of the soft-packed snow will stimulate your senses.

On top of the visuals, Ryuichi Sakamoto’s soundtrack does an amazing job of hitting home the feelings described above and experienced throughout the movie. I’d be surprised if you don’t feel like you need a hug after witnessing what it’s like to be alone, clinging to life, with only yourself and what drives you to keep motivation at least sub par.

But don’t take my word for it. Don’t take my word for any of it. Go watch it, yourself. Go experience it, yourself. You’ll thank me.

Johnathan Lyman
Kenmore, WA,
United States
 
blogging, design, technology, software, development, gaming, photography