Unplugged – Years Without Cable

CableGuy

I had a “nightmare” the other night, I didnt wake up screaming or sweating and really wasn’t even all that scary.  I had a dream that I signed up for Direct TV! Now for you to understand the reason I call it a nightmare, you have to know that my family and I haven’t had cable TV or satellite for over 5 years now! I thought I’d share with everyone how we do it, what we use and how much we’ve enjoyed it.  I’m sure many people have given it a thought, we always complained when we did have cable that there were hundreds of channels and nothing to watch.  Now we control mostly what is on, the huge benefit to streaming your content is you can hit pause and finish it later without having a DVR set up.  The other HUGE benefit is cost, I’ll do that comparison at the end.

How we do/did it

At first we were a little worried that we’d be missing out on the new shows and news, etc.  It turns out though, we get more news from our phone/device than anything and many of the new shows aren’t that great or can be found streaming fairly soon after their broadcast, you may just have to be patient.  The most important part that we use in replacement of cable is our internet connection.  We try to find the fastest and most reliable service available for the cheapest to get the best bang for our buck.  Without it we’d be limited to just over the air TV (I’ll get to that later).  We now use a combination of different devices, apps, and services to get A LOT of content.

Netflix

Netflix

The first one we used (and the big dog in streaming) was Netflix of course.   We’ve had a Netflix account since the times when we would get the DVD’s by mail and almost streamed 0% of our content!  Boy that seems like a long time ago and I can’t imagine having to wait for the next DVD in the mail if I wanted to binge watch a TV show like The Walking Dead (I’m all caught up to the current season now).  When we first cut the cable cord we still had a lot of DVD’s mailed to us, mostly newer released movies that weren’t available via streaming.  We’ve always found the cost (currently $9 a month for streaming) of Netflix is worth the hours and hours of entertainment it provides us.  When they decided to raise the rate and split off the DVD by mail and streaming service we only stuck with the streaming.  By that time there was plenty to just stream and getting and sending the DVD wasn’t worth it.  If we want the latest release on DVD we usually just hit Redbox now so we can just return it the next day and the cost is only a couple dollars a night now for DVD.

rokuXD

Roku

The Roku was our first device we purchased to use for streaming to our main TV, it was one of the first generation Roku X D ‘s and wasn’t anything fancy.  It was all we really needed though, we only used it for Netflix and after having to set up a wireless bridge to get a decent network connection we were good to go!  The ol’ device is STILL alive and kicking, the kids now use it in the basement for Netflix….boy I’d like to see the Gigabytes of data that bad boy has served up!!!  The new ones look pretty awesome now too, I especially like the Roku 2 and Roku 3 where you can plug in headphones to the remote!!!

roku3

bunny

Over the air

We started off with a small set of bunny ears (how many of you remember trying to position those!) that we used to get at least 6 or 7 decent channels with over-the-air (OTA) TV reception.  We lived in the suburbs of Phoenix so it wasn’t too hard to get them and this was the time when all the stations were moving to Digital signals and the government even sent out gift cards for people to purchase digital TV tuners!  We actually found that most of the ‘prime time’ shows on the basic networks [ABC, NBC, CBS, PBS, FOX] were decent, and we found our favorites we watched each week.  Soon we didn’t even miss having cable at all, after all it wasn’t that often we wanted 24hr news or weather. About the only thing we missed was the occasional sporting event but that wasn’t very often.  Many times we found we could find it on OTA or stream it online even.   NOTE:  Figuring out how to connect your laptop or computer to your TV and mirror your screen comes in very handy then!

Since we’ve moved to Colorado (suburb of Denver now) we’ve upgraded from the little bunny ears to a full size house antenna.  It was only $60 on Amazon and can be mounted on the roof or in the attic.  Right now, since we’re renting, we have it on our back patio is all and it still picks up over 20 digital channels now.  We were lucky this place was wired up for satellite or cable to I just plugged it into that coaxial feed outside and now it is fed to 4 rooms inside easily!

hulu-plus

Hulu plus

A few years later now there are some TV shows that my wife and I have found aren’t available on Netflix to stream (even though my wife was ecstatic that they added Friends now!).  So we’ve now added to our ‘streaming arsenal’ Hulu Plus, there are TONS of TV content on there, including many shows current season, so if you miss it on OTA and don’t have a DVR set up then this is well worth the $8 a month it costs.

Library

We started to read a lot more when we cut the cable cord…this is one of the best benefits of doing it…READ MORE!  Read to your kids too, it is soooo important for them to learn to read and have an appetite to read more.  Every place we’ve lived we like to find the local library, first of all it is very important to keep reading books.  It is also important for our kids to get books and develop their reading as well.  We try to take them there at least once a week to pick out books etc.  Our local library here in Colorado also has an extensive selection of movies and TV shows on DVD, even some of the more recent releases (I just watch Lone Survivor and Her from the library), this is a great way to supplement your watching content for FREE!!!!

Next steps

I would love to set up a TV box set / media server running something like XBMC so that we can stream the movies we have digital copies.  I took many of our DVD’s and ripped them so we could watch them on laptop etc when traveling.  You can fit a lot more movies on your hard drive and it is a lot easier to carry than 20 DVD cases!

cost

Cost savings

When we had cable/satellite we were paying (after the silly introductory price to get ya hooked) around $150 a month!  Now we pay (Netflix, Hulu, and Internet) around $60 a month for those services.  The rest of the cost are all up-front, like the purchase of a nice big antenna.  So we’ve been saving around $90 a month for the past 5 years….that adds up to around over $5000!!!!  THAT IS AWESOME!!!!

 

Let me know if you have any questions on more specifics of how or what we do.  I encourage anyone I talk to to give it a try, we love not having that cable bill every month!!!  I’ll be more than happy to help you out with what info and ideas I’ve had.

Who is Woody??

Hi my name is Brian but long ago got the nickname Woody.  I had it long before 1995 when a certain cowboy hit the big screen in Toy Story.  I come from a small town in Nebraska and Brian was a popular name apparently because we had at least 3 in our classroom at times.  The teacher asked if he could call me Woody instead to ease the confusion and the name stuck all through my school years and beyond.  To this day I’m sure there are some people that only know me by Woody rather than my real name!

If this is the first time you’ve visited my blog, Welcome!  I started this a couple years ago to share my thoughts on technology and software.  I work in the tech field and I’m always excited when new things happen, which seems pretty often with technology!  It’s a place for me to share any exciting things like my graduation or cool projects I’ve worked on.  Among many other things, I hope to connect with other like-minded people (i.e. geeks, nerds, etc like me!) to see what their thoughts are and maybe have some interesting discussions.

Hopefully this year I’ll be able to add many more posts to my blog.  I look forward to adding to it in the coming days!

 

Update SlickGrid.js

Ran into an interesting bug at work, our developers used a third-party JavaScript SlickGrid to dynamically build CSS for a web application. This created some great looking grids that slide open/close when clicked. The problem shows up after a few grids are opened up, then the grid doesn’t fully show the data inside of it. I found where in the code the JavaScript (slick.grid.js) was failing:

function createCssRules() {
$style = $("<style type='text/css' rel='stylesheet' />").appendTo($("head"));
var rowHeight = (options.rowHeight - cellHeightDiff);
var rules = [
"." + uid + " .slick-header-column { left: 1000px; }",
"." + uid + " .slick-top-panel { height:" + options.topPanelHeight + "px; }",
"." + uid + " .slick-headerrow-columns { height:" + options.headerRowHeight + "px; }",
"." + uid + " .slick-cell { height:" + rowHeight + "px; }",
"." + uid + " .slick-row { height:" + options.rowHeight + "px; }"
];

for (var i = 0; i < columns.length; i++) {
rules.push("." + uid + " .l" + i + " { }");
rules.push("." + uid + " .r" + i + " { }");
}

if ($style[0].styleSheet) { // IE
$style[0].styleSheet.cssText = rules.join(" ");
} else {
$style[0].appendChild(document.createTextNode(rules.join(" ")));
}
}

After some intense Googling, I found that IE limits the number of CSS sheets allowed to something like 32.  What this SlickGrid was doing for each grid was to dynamically add another CSS style sheet.  How we had it implemented it had 4 grids for each user click.  The web app started off with around 8 base CSS style sheets and adding 4 per user click 32 was quickly reached.  I updated the SlickGrid code to avoid the IE max CSS sheet:


function createCssRules() {
// Original slickgrid code
//$style = $("<style type='text/css' rel='stylesheet' />").appendTo($("head"));

// IE limits # of sheets to ~31, instead of adding a new style sheet for each grid just use one
$style = $('#slickGridStyleSheet');
if (!$style[0])
{
$style = $("<style id='slickGridStyleSheet' type='text/css' rel='stylesheet' />").appendTo($("head"));
}

//TESTING
//alert("Number of sheets: " + document.styleSheets.length);

var rowHeight = (options.rowHeight - cellHeightDiff);
var rules = [
"." + uid + " .slick-header-column { left: 1000px; }",
"." + uid + " .slick-top-panel { height:" + options.topPanelHeight + "px; }",
"." + uid + " .slick-headerrow-columns { height:" + options.headerRowHeight + "px; }",
"." + uid + " .slick-cell { height:" + rowHeight + "px; }",
"." + uid + " .slick-row { height:" + options.rowHeight + "px; }"
];

for (var i = 0; i < columns.length; i++) {
rules.push("." + uid + " .l" + i + " { }");
rules.push("." + uid + " .r" + i + " { }");
}

if ($style[0].styleSheet) { // IE
$style[0].styleSheet.cssText += rules.join(" ");
} else {
$style[0].appendChild(document.createTextNode(rules.join(" ")));
}
}

You can see where I was TESTING and counting the number of style sheets.  What my updates do is instead of appending another style sheet each time it is called, it uses a style sheet object with the id of ‘slickGridStyleSheet’ then checks to see if it is empty (the first time it is added) and appends it to the head.  After the first time it just uses that same style sheet.  So it only adds one style sheet rather than 20+.

SlickGrid is a great tool that is hosted on GitHub, my next step is to submit my changes to them and see if they will use them to overcome this problem.

Another Android App

Bacon Cipher

 

I recently uploaded another Android app to the Google Play store.  I created this app for fun, it give the user the ability to create Bacon Ciphers.  Wikipedia has a good description of what those are but they’re basically secret message hidden within other readable text using something like different font or in my case lower and upper case letters to mask the secret message.  Using this app you can create and share the ciphers as well as decode any ciphers others create and send to you via this app.  This is a free app (ad supported) so I hope a few people enjoy having fun with it.

Learning jQuery

So I started learning some jQuery to make some cool things happen on websites.  I found this great place called Codecademy where you can learn new programming languages, etc.  They have an awesome built-in development environment so you can just enter code right into your web browser and don’t have to set anything up locally.  Great and quick way to start learning!

I never used jQuery before but had a need for a little of it at work recently.  So I started this and found a lot of cool ‘tricks’ you can do with jQuery to make your website pretty cool and interactive.  The one I especially like is the ability to add drag-and-drop functionality to things.  Here’s a little demo on that: http://tinyurl.com/dxtxkdk

jquery_list

It was done with an amazingly short amount of JavaScript code:

</pre>
$(document).ready(function(){
 $('#button').click(function(){
 var toAdd = $('input[name=listItem]').val();

 $('.toDoList').append('<div class="item">' + toAdd + '</div>');
 });

 $(document).on('click', '.item', function(){
 $(this).remove();
 });
 $('.toDoList').sortable();
});
<pre>

I’m going to take their course on PHP and Ruby as well!  They’re languages I’d like to pick up too.  If you’ve always wanted to start learning the basics of some programming language be sure to check out Codecademy!

Limit Text Area in JSP or HTML

Recently I had to create a website form that would limit the user input of a text area. This was because the input is eventually used in a printed form so we have some restrictions on space available. With a normal text input it is simple to set the ‘maxlength’ attribute to limit the user. However, it’s not that simple on text areas (from what I’ve read text area’s are getting the ‘maxlength’ attribute with HTML5). So I set out to write a somewhat simple javascript function to help limit the users’ input. I wanted something that functioned similarly to how the normal input ‘maxlength’ would, in that it would stop allowing input when the limit is reached but also give the user feedback to the limit. Below is pretty much what I came up with, it’s not perfect but it simple and works for the most part:

function checkMaxLength(obj, maxLength)
      {
        var length = obj.value.length;
        var id = obj.id;

        if(length > maxLength)
        {
          // alert('out of space!');
          var text = document.getElementById(id).value;
          if(text.length > maxLength)
            {
              text = text.substring(0, maxLength);
            }
          length = text.length;
          document.getElementById(id).value = text;
          document.getElementById(id + 'Counter').innerHTML = ' ' + text.length +  ' out of ' + maxLength;
        }

        var red = Math.round((length/maxLength) * 135) + 120;
        var green = -Math.round((length/maxLength) * 120) + 120;
        var blue = -Math.round((length/maxLength) * 120) + 120;

        document.getElementById(id + 'Counter').innerHTML = ' ' + length +  ' out of ' + maxLength;
        document.getElementById(id + 'Counter').style.color = 'rgb(' + red + ', ' + green + ', ' + blue + ')';

      }

One of the cool things I included was the counter to change colors to indicate to the user when the limit is reached.  The counter gradually shifts to the red the closer to the max length as the user types.

Another unique feature I had to deal with was that I had three text areas to limit so I wrote the javascript function to be able to be re-used on each.  In order to do that I named the counter for each carefully so that I could change the counter number of the specific text area.

I then call this function with a ‘onkeyup’ in the text area element:


<h:inputTextarea value="#{beanHandler.bean.comments}" id="commentsBox" onkeyup="checkMaxLength(this, 86);" />
 <div id="counter">
 <h:outputText id="commentsBoxCounter" />
 </div>

Here is a link to a live preview that uses simple HTML4 rather than any JSP.

 <textarea id="comments" onkeyup="checkMaxLength(this, 50);" >
 </textarea>
 <div id="counter" >
 <span id="commentsCounter">
 </span>
 </div>

Samsung Keyboard Bug

Samsung recently pushed out Android updates to my Galaxy S3 phone and I’ve stumbled upon a little bug that will delete most of the text you’re in the middle of typing.  I’m running Android 4.1.2, no special mods or fancy keyboards; just the standard Samsung keyboard that ships with the phone.

To recreate the bug, I start a text message and type a long list of words, then select one from the auto-complete choices, hit the backspace/delete, then select another auto-complete word.  When that last auto-complete word is selected all the text is delete and replaced with the word except the first and last words.  I don’t believe it is an intended feature either, I had it happen to me twice this past week and was very frustrating.

I did a short video, reproducing the bug also if anyone would like to see:

I’m curious if it is limited to Samsung devices only, if they changed or added their own code to the Android auto-completion.  Or if this happens on any Android 4.1.2 device.  I submitted the bug to the Android Project and will see what happens.  It is my first bug I’ve ever reported, I couldn’t find anything online of anyone else having this issue yet so if anyone out there can reproduce it I would be very excited to hear the details!

First Android App

State Postal Abbreviations

State Postal Abbreviations Icon

I recently completed my first Android Application and uploaded it to the Google Play Store.  It’s a free app that helps with determining the postal abbreviations for states.  For instance, Minnesota is MN and Michigan is MI, Mississippi is MS, etc.  It’s very simple and straightforward but also gives some basic trivia information such as population and state area also.

State Postal Abbreviation

State Postal Abbreviation screenshot

It wasn’t hard to get it uploaded to the Google Play Store either (after I figured out the size the screenshots needed to be!).  I’m really enjoying this Android Development that I’ve started to do.  I already use Java quite a bit with work and at home so it isn’t hard to learn and get started with this Android stuff.  My next step will be to make some Android apps that are more functional and graphically “prettier”.  I used mostly basic Android “building blocks” in this app such as the buttons and simple text views, eventually I want to create Android apps with neat custom graphics that are fun to use.

I’d say one of the most difficult things to tackle when it comes to Android development is supporting multiple screen sizes.  There’s no doubt that there is a plethora of Android hardware out there, when you develop an Android app it could eventually be ran on anything from a small-screen smartphone to a large 10″ tablet (unless you specify in your Android Manifest to exclude certain devices/screen sizes).

Right now Android Development is going to be a really FUN hobby for me that I pursue in my spare time.  It would be awesome to make some money developing these Android (and eventually Apple?) apps.  I started the process of making a little income from these by adding ads (using AdMob) to this free app.  It was easy to sign up and include the ad to the Android app.  I was also surprisingly impressed with the revenue generated by the ads.  My app has only been downloaded less than 10 times and with that usage the ‘estimated revenue’ is around 50 cents.  I didn’t really expect anything from this first app, just using it to learn.  Perhaps after I have a few apps published and more data, I will post some information on how much revenue I’m earning with my Android Development.  In the meantime please go download and try out my app and give it a rating/comment!  Thanks!

Future of Space Travel and Exploration

SpaceX Falcon 9

SpaceX Falcon 9

The future of space travel took another step forward Tuesday May 22, SpaceX launched their Falcon 9 rocket to deliver the Dragon space capsule to the International Space Station.  In my opinion this is a great step forward for space travel, I think the commercialization will reduce the cost of going to space.  This will open up many opportunities for both companies and individuals to venture into space for either the wonderful experience or possibly profit.  I can only think it is like when Columbus and other explorers where traveling the vast oceans with the help of kings and queens but now we can easily travel around the globe.  Some can even afford to own a vehicle that can traverse the globe.

The Launch:

It will be very interesting to watch the next few years as space exploration becomes more commercialized with private companies being used to transport goods and people to the space station and possibly beyond.  I wonder how long it could be until normal people take vacations in zero gravity.  My wife would never go but I think it could be cool, course as a kid I dreamed of being an astronaut and being involved in some sort of space travel.  I would still love to be involved (maybe on the software-side now) in a project that is involved in space exploration.  Anyone know of any open-source projects that are sending something up in space?

Rock-Paper_Scissors Java Program Finishes First!!

I updated my originial Rock-Paper-Scissors (RPS) Java program and played them again today; mine beat everyone at work!  I’m pretty proud of this, it was a little tough to find a good strategy that not only could beat other programs playing specific patterns but also versus other computer programs trying to find patterns.  I will explain more on my strategy below.  To top things off mine finished in the top spot and was one of the quickest programs to run.  My closest competitor (my one boss) beat everyone else also but his program took over 40 seconds to run (we played 10,000 ‘throws’ of RPS against 7 other players).  My program accomplished the same in less than 15 seconds and won more often!  Everyone else’s took the same time as mine or shorter but lost a lot more.

The first strategy I had was using a sort of Markov Chain to figure what would be played next.  That worked very well but not quite well enough.  I incorporated looking for the opponents’ pattern in the history of the game…this proved just as good and sometime better than the Markov Chain but took a few ‘throws’ to get history built up.  Lastly I wrote my program to look for both what my opponent had played and what my program had played (sort of when I played this, he played that); this strategy proved to play the best once again after some history is built up.  So to fill in the holes in the beginning I use all three separate strategies and make a decision in the program which to use.  If the more advance strategy doesn’t come up with a good guess use one of the other two.  It seemed to work, I won!!!!