Rise of the Hybrids

While it might sound like a good title to the latest Sci-Fi movie trilogy (or this???), I am talking about the rapid rise over the last few years in hybrid mobile technologies. PhoneGap opened up to Cordova, Ionic and Mobile Angular UI have tried to make it easier and these are just in the web realms. React and Xamarin are trying to promise a write once, use everywhere with JavaScript and C# respectively.

I have a lot of experience with using Cordova/PhoneGap, usually relying on a good text editor and the command line to do my bidding and a carefully crafted list of frameworks to get me to the environment that I am ready to develop in. Ionic and Mobile Angular UI are taking that a step further and bootstrapping my normal AngularJS libraries and set up right from the start.

I have also been able to try a major project on Xamarin as well as doing a variety of small learning exercises with it. And while I found the promise to be exciting…  (I absolutely love the C# language even when I sometimes criticize the environment it lives in) … I found rely on my Android and iOS (Obj-C in this case) experience to get the last details and touches correct. Add to this the large licensing costs… I have not really revisited the platform since last Summer.

Yet even doing a lot of mobile projects the last few years… I still feel my skills and environmental knowledge slipping. So what to do?

Well there are times in your life when timing works out well and this month I was able to line up with my goal to retry some of the stacks that I had dismissed before, get better with the ones I enjoy (mostly Cordova and Native) and try out the new frameworks and bootstrapping (Ionic and React were at the top of my list).

It all started last month, when I was prepping with my co-worker Jason, a presentation to introduce Cordova at a local Code Camp (newcodecamp.com). One thing that Jason came up with (I wish it was my idea… though I was smart enough to realize how brilliant it was when he suggested it) was to get away from the normal introduction courses that tell us developers how to build the latest recipe book or RSS feed, and instead to take a real business problem we had been given and to build the presentation around developing that app (all within 45 minutes!).

What sparked from talking to our leader at work was to take this simple but useful app that really hit on a lot of small features crucial to the base of apps we develop was to take this app design and to repeat the exercise over the next few months (and future times if/when frameworks change and new frameworks come around) across all of the mobile stacks that we were interested in.

For those curious, our current list is:

We are targeting just the Android and iOS platforms right now, because that is what we traditionally are asked to develop for clients, but I can see others being introduced as well when possible.

So where am I at? I am right now about 90-95% of the way through the Cordova version, hoping to finish up soon as time allows. Then I will be hitting the next on the list.

I am hoping if you have come across this blog and you have any suggestions or ideas for other frameworks/packages to try, please let me know in the comments or via Twitter so I can add it to the list.

Can’t wait to keep coding… (which is where I am heading now) and help to pass on my experiences as I get further along.

Scratch, Or How I Learned to Stop Worrying and Enjoy Teaching My Kid To Program

I struggle as a parent many days. Usually it involves trying to find the right balance between encouraging and getting your kids to try new things and making sure you are not forcing them to do things they really do not want to do.

There are moments where that worrying ceases, and I had one this past week. I was doing some more coding on the Cub Scout website (I know… I need to catch you all up on where that is at soon) and my oldest son (almost 8) came over to me and asked me if I could teach him how to program sometime. I was blown away. I had offered at other times but it had been a while and he never seemed interested before. Maybe the games of Robot Turtle and his new found love for Mine Craft changed that, or maybe he just wanted to see what I do all day. Either way, I was excited. It was nearly bedtime, but I promised him that we would set aside some time the next day to dive in.

When my oldest had started to really get good at reading I had started to look into kid programming tools to see when might be a good time and good tool to use if I got a chance. I checked the site that I liked the most again (http://blogs.kqed.org/mindshift/2011/05/5-tools-to-introduce-programming-to-kids/) to confirm and made sure I had everything I needed to try out Scratch with my kid the next day.

Scratch was developed by MIT and is designed to start introducing children to the basics of programming, from variables to loops and conditions. For those of you that have started to use more immersive web based IDEs to learn to code (like https://tour.golang.org or https://www.codeschool.com/), Scratch has a great series of tutorials that are easy for kids to follow to start building things right away (http://scratch.mit.edu/). Just click on the “Try It Out”. I recommend signing up as well quickly with your email address so that your child is able to save and share their programs.

We started the next day and quickly went through the first tutorial. My fears that it would be boring were quickly eased as he laughed and asked questions throughout the process. After mastering that, he wanted to know if there was a way to make an actual game. Two tutorials down was the tutorial for a pong/breakout style game. We tried it out and sure enough he was able to do that as well. That was when I could see he was hooked. He was already straying from the tutorial by picking his own sprites and values. We were also able to quickly experiment with different variables and to debug when things did not go the way he thought it would. When we were done just a short time later, I was amazed at what he had done and he could not wait to show his mom and siblings.

I definitely will recommend Scratch to anyone that has a kid interested in programming to bridge the gap from a MineCraft type building and a full fledge programming language. We are definitely going to hit up some more tutorials and maybe try to build onto some of the other examples that people have shared. From there, if the interest is still there… we might move to something else like MindStorms or Anduino. Maybe even Alice or Hackety Hack. Either way, I know it will be fun to learn together.

Podcast Recommendations

Podcasts, podcasts, podcasts.

I first got into podcasts nearly 7 years ago. I got my first iPod and had heard that there were podcasts I could listen to that had the guys from the old Screensavers. That podcast was This Week in Technology (TWiT). I listened and immediately was hooked that I could still get the great content I used to love on Tech TV.

Those podcasts were not enough and I started looking for recommendations on iTunes for more. The show that caught my attention was The Awful Show and after a few listens I was completely hooked. The guys had not only a great audio quality, but great content. It was funny, really, really funny. I even spent time going back and listening to all of the previous podcasts that I had missed (eventually I seem to do this for most podcasts that I really like, but this was the first).

Since then, I have grown and shrunk my listening list as my taste changed, new shows started, others ended, leaving me where I am today. Podcasts have become a very large part of my life and have helped boring days at work fly by, long drives seem great and tasks like dishes and mowing the lawn seem fun.


Here is my current list of what I am listening to actively now:

The Nerdist

Chris Hardwick from all of the after shows of late and @Midnight interviews different guests. I always find that the interviews that Chris does that intrigues me about almost every guest. The casual style that seems closer to friends chatting than a Larry King style interview really keeps me tuning in to the 2-3 shows a week.

The Dice Tower

A great podcast about board games. And no…  not Monopoly. Lots of humor, news and game reviews fill this great podcast.

Ludology

One of the geekiest podcasts on this list. Part of the Dice Tower network, this podcast dives into game strategy and design. It focuses less on a single game and more on genres and broad strategy types. If you have ever wondered things like why we choose what we do during Paper-Rock-Scissors, how does play testing affect game design or why different games choose the mechanics they do… this podcast is for you.

The Walking Dead Podcast

What I liked about this podcast over the scores of other TWD podcasts is that it not only covers what is happening on the AMC show, but also compares/contrasts the show direction against the comics. Being a fan of both, it is fun for me to hear other perspectives and theories about what is going to happen next.

Rooster Teeth Podcast

Originally called the Drunk Tank podcast, this is the weekly podcast from the Rooster Teeth group, the people that created Red vs. Blue, Achievement Hunter and RWBY. Lots of humor and pop culture references.

40 Going On 14

A show that is perfect for those of us that grew up in the 80s and early 90s. The group chooses a weekly topic and compares then vs. now. Topics include cartoons, tv shows, movies, breakfast cereals and more.

Security Now

From the TWiT podcasting network (the guys that used to do Screensaves on Tech TV), this show is hosted by security guru Steve Gibson and Leo Laporte. It discusses the weekly computer security news, answers security related questions and deep-dives into the world of how computers and software works. (The series on how the internet works that explains even how the different protocols work was fantastic).

The Hello World Podcast

This podcast makes me fall back in love with programming each show. The host interviews people from around the computer industry and finds the details about their first computing experience, first programming language and first job. I love listening to how others got into the programming field and what drives them to keep doing it. Makes me appreciate what I love about it myself.

Undercover Unitards

I found this show after the Awful Show ended. Joel from the Awful Show joined the show for a few years and I was hooked in the process. Fun topics from guys sitting around talking about what (some) guys talk about.

Obviously Oblivious

This show has had a few iterations, all of them great. However the latest few shows have reunited Mike, Joel and Nerraux from the Awful Show with the addition of South Philly Paul. News episodes cannot come fast enough now.

Mediocre Show

I found this show about the same time that I found the Awful Show, but it was not until the addition of Mike and Hope that I really became a regular listener of the show. Mike has since left, and Troy has joined the group full time. Listen to one of the oldest and best produced podcast out there.

The Coffin Joe Cast’s Community Call

Hosts Joel (from Awful Show and Obviously Oblivious as well as others) and Killa Wilba have a new co-host each week. They learn more about each other and their new co-host each episode. Fun listen.

This Developer’s Life

Another fun podcast for people in the software industry. Episodes explore a variety of topics about nuances in the industry (and sometimes just the ‘geek’ culture) and includes thoughtful insights from the hosts and a variety of people that they interview.

Cashing in with T.J. Miller

This is the newest podcast added to my list. Part of the Nerdist podcast network. The hosts Cash Levy and T.J. Miller already have me hooked as they jump back and forth from insightful to ridiculous thoughts about the world around us.


For those that are interested, here are some that have ended or that I have not been able to keep up with recently but I have greatly enjoyed. I encourage you to check these out as well.

  • The Awful Show
  • South Philly Paulcast
  • Galatic Netcasts

Quick Windows User Tip for Bitbucket/Git/Bash

After deving on a Mac for a few weeks, I really started loving the cached credentials that were set to on by default in Bash. Especially when working with remote repositories like Bitbucket that I needed to log into. I did not want to hardcode my username/password in however… just wanted to be able to cache for an hour or so to make push/pull/merges less painful (because we are all using 500 character random passwords right ?!?).

I pieced this together over several StackOverflow posts to get the quickest and most efficient way to do this. (You will need to be using git version 1.8.1 or later)

git config –global credential.helper cache
git config –global credential.helper “cache –timeout=3600″
git config –global credential.helper wincred

Use those 3 commands and you will have your credentials cached for an hour after using them. NOTE: 3600 is time in seconds to cache… you can change that to whatever value you find works best for your situation

Enjoy!

Adding AngularJS to GoApp Website

Before going any further… make sure that you are using a source code repository. Even if (and maybe especially) if it is just you. I cannot recommend git enough. I usually bitbucket for my business and personal use because I can do free private repos. Github is another option, especially good for open source projects. Whenever I am about to make major changes, I make a branch so that I can easily start over again if I mess up along the way and commit incrementally as I get things working. Trust me, this will save you hours and hours of work once you get used to it.

Okay… back to the main part of this post.

There are quite a few ways to get Angular JS into your app… but the easiest I found is to start with the Angular Seed base project. You can download that here: https://github.com/angular/angular-seed. However for some reason… this project, the download did not work well for me. I am not sure why, but I found myself with a lot of extra and misplaced files. I instead used the instructions in the ReadMe.md file. I cloned the repo and used NPM install. For now, I did this all in a temporary directory so that I had all of the files I needed identified.

Once this is done, I copied the files into the app folder. The files you already had in there for the GoApp should not be replaced and your base bootstrap site should still be working. Your directory should look something like below:

App Folder

To allow Angular to work correctly with all of the right folders, we need to add some more routing to our app.yaml file.

Here is what mine looked like when I was done:

application: csapack3151
version: 1
runtime: go
api_version: go1

handlers:
– url: /
static_files: webapp/app/index.html
upload: webapp/app/(.*\.html)

– url: /asset/img
static_dir: webapp/app/asset/img

– url: /asset/pho
static_dir: webapp/app/asset/pho

– url: /asset/vid
static_dir: webapp/app/asset/vid

– url: /css
static_dir: webapp/app/css

– url: /fonts
static_dir: webapp/app/fonts

– url: /js
static_dir: webapp/app/js

– url: /lib
static_dir: webapp/app/lib

– url: /partials
static_dir: webapp/app/partials

– url: /.*
script: _go_app

I took my homepage and separated the content from the header/nav and footer. I put the content html into a partial file (this one called home.html. In the place of the content in the index.html file I put the code for the ng-view there:

<!– CONTENT GOES HERE –>
<div class=”section-clear”>
<div ng-view></div>
</div>

That is really all there is for the initial AngularJS changes needed for the application. Now you can follow most Angular examples on the web. This one I found the easiest to get the multiple pages loading on the single page app, if you are not able to follow along with the Angular Seed examples: http://fdietz.github.io/recipes-with-angular-js/urls-routing-and-partials/client-side-routing-with-hashbang-urls.html

Please let me know if you have any questions thus far. Currently I was able to get a few more “pages” added to my site and a simple “Coming Soon” placeholder for a default link for all of the pages not yet implemented.

Getting Started

Where did I start?

Following up on my last post, I wanted to detail more about how I started getting the GoApp/AngularJS site going. (BTW… is there a good acronym for this stack yet?).

I started with the GoApp hello world example, since I only knew GoLang and was not particularly versed on GoApp. (You can find it here: https://developers.google.com/appengine/docs/go/gettingstarted/helloworld). I found it very straightforward and only took a few minutes after making sure I had GoApp and Python 2.7 installed (current prerequisites) it took only a few minutes to get it stood up. Currently I have been using the IntelliJ IDE (community version) with a Go plug-in for my Go needs. I am not 100% that it is the right choice… so I am open for suggestions if anyone has ones that work better (especially with the GoApp instead of just GoLang).

Once that was installed and running locally, I added in my startbootstrap.com bootstrap template. The biggest hurdle is to add in the additional folders for the Go routing so that all of the various includes and files were properly linked. It is not hard to do (but easy to forget).

That should get you all started if you are looking to do this yourself. The next thing I will be touching upon (and working on) is separating the template into a better single-page application and add in AngularJS routing.

GoLang, GoApp, AngularJS, Bootstrap 3, HTML5 and CSS3… yep I am doing it

It is not often that I get to align a side project directly with items that I am interested in. This is one of those exceptions that I love.

I have been helping (leader, committee member) for my son’s Cub Scout pack for over a year now and was thinking about the future of scouting (compared to when I was a kid) and how technology would play a part of. It was then that I realized that our Pack did not even have an actual web presence other than a few posts on Facebook.

At the same time I have been really diving into AngularJS and GoLang out of interest and trying to get my web chops up to date since most of my development has been in back-end processes (search algorithms, machine learning, data analytics) and mobile. I did some quick research and found a great post about using Go with Angular for websites (https://www.youtube.com/watch?v=CBwOuK9x5VQ), and then I was set. I would do a full website for the scouts while having fun with some new(-ish) languages (and proven!).

I found a few good BootStrap templates (http://startbootstrap.com/template-categories/all/) and started designing and building the site. Had the site stood up in no time and found it to be very responsive. So far I am loving my choice and hoping to really get going.

If you have any specific questions or thoughts, please reach out to me here or twitter (@matt_ridley). I will be posting more in the future.

If you are curious where the project is at… some of it is pushed live to: http://csapack3151.appspot.com/

Follow

Get every new post delivered to your Inbox.

Join 330 other followers