JavaScript

Podcast Episode 33 – Rob Eisenberg on Aurelia.js

Rob EisenbergLast Monday, Rob Eisenberg released Aurelia.js. This was a culmination of sorts of a whirlwind of activity that was kicked off when Rob left the Angular 2.0 team at Google. A lot of people wondered what he was up to (including me!), so I asked him to be on the show to talk about what’s been going on. We talk about SPAs, why he left Google, what’s special about Aurelia, how to handle learning all of these frameworks, and much more.


Links Mentioned in this Show:
Aurelia
Rob’s Leaving Angular Post
Rob’s Twitter
Rob’s Blog
Aurelia vs Angular Round One

You can also subscribe to the podcast at any of these places:
iTunes Link RSS Feed

Thanks to all the people who listen, and a special thanks to those who have rated me. I really appreciate it.

The episodes have been archived. Click Here to see the archive page.

Fluff

Skeet “Shooting”

Last year, at CodeMash v2.0.1.4, I really wanted to get a photo with Jon Skeet. Most people who know StackOverflow know that Jon Skeet has the highest reputation on the site by far. On top of that, he is an accomplished author, blogger, speaker, and all around nerd hero.

Jon has been to CodeMash for several years and I could never get up the nerve to interrupt him and ask for a picture. Finally, at last year’s event, I did it. My friend Russell and I got a picture with him… or so I thought. While I was able to take a picture of Russell with Jon, Russell failed to get a picture of me. In fact, he didn’t notice until we were walking away and I wanted to see the picture. No photo in the gallery.

Well, I wasn’t going to go back and bug him again. I felt like I already put him out. I did get to meet him and I had a pretty good story (of Russell’s failure), so I was ready to leave well enough alone. Poor Russell had to endure a year’s worth of teasing by co-workers for being unable to operate a camera.

Fast forward to CodeMash v2.0.1.5. Russell was going to go, but I decided to skip it this year. That meant that I wouldn’t be able to try for round 2 of my Jon Skeet photo shoot. We all decided, though, that it would be funny if Russell got a picture of Jon Skeet holding a picture of me. We were mostly kidding, but we found ourselves hilarious.

Russell was determined to redeem himself, so he reached out to Jon and set it up, tracked him down, and followed through. Somehow, out of the goodness of his heart, Josh allowed himself to be roped into the adventure of stalking Jon. Josh also made sure that a picture was actually taken this time. Russell then got the photo printed out and framed for my enjoyment. So I present to you my new favorite desk adornment:

Jon Skeet and I

This is all way better than if I had just gotten the picture last year! Big thanks to Russell and Josh!

Podcasts

Podcast Episode 32 – Andy Adams on Being an Independent Software Developer

Andy AdamsAndy Adams wrote a blog post about how to price yourself as an independent software developer. It was so good that I made it a pick of the week. Andy started to see traffic from my site and we struck up a conversation. Right away, I knew that I needed to have him on the show. We talk about how he became an independent, how he sets his rates, how to find customers, some of the perils of creating your own products, and whether you even want to be an independent developer in the first place. It is a fantastic interview, check it out.

Links Mentioned in this Show:
Andy’s Company
You Can Charge More, by Andy Adams (the post that started it all)
Andy’s Twitter (genius Twitter handle! 😉 )
Ask HN: How to get started with paying side projects?
Podcast Episode 30, where I featured Andy as a pick
Podcast Episode 17, my episode on Going Independent
Gail Goodman – The Long Slow SaaS Ramp of Death

You can also subscribe to the podcast at any of these places:
iTunes Link RSS Feed

Thanks to all the people who listen, and a special thanks to those who have rated me. I really appreciate it.

The episodes have been archived. Click Here to see the archive page.

Podcasts

Podcast Episode 31 – Setting Goals for 2015

Goals2015 is kicking off with Episode 31 of the Pete on Software Podcast. In this episode, I talk about the difference between how I see “resolutions” and “setting goals”. If we all are treating our careers like small businesses, we need to make SMART goals in order to propel ourselves forward. I go over my goals for 2015 and ask for your feedback to see what you have planned.


Links Mentioned in this Show:
Forbes’ Article about New Year’s Resolutions
Dim Sum Thinking Podcast about not telling
Derek Sivers on not telling
Learn Scrivener Fast Course
John Sonmez’s Soft Skills Book

You can also subscribe to the podcast at any of these places:
iTunes Link RSS Feed

Thanks to all the people who listen, and a special thanks to those who have rated me. I really appreciate it.

The episodes have been archived. Click Here to see the archive page.

Hood.ie

Hoodie, Part 2 – Our First Custom Hoodie

Last time, we got Hoodie installed and made the first simple application. If you had done it correctly, you would have been able to add ToDo’s and then remove them by clicking them. Let’s make another application, and while Hoodie supports templates to create applications, I’m just going to have it make the default application again and we’ll replace what we don’t need.

I’m going to type hoodie new part2 and create a new application called part2. Here is the result:

Our new part2 app

If we do issue a cd part2 command, we end up inside the application folder. Let’s take a look at what file are contained in the folder by default.

  • README.md – Contains information about the application, how to get started, and even how to deploy the application
  • package.json – As you can probably tell by the installation process we had to follow last time, Hoodie applications are really just Node.js applications and Node.js apps need a package.json file. We get the name of the app here as well as the list of dependencies that it needs to keep up to date and deploy.
  • node_modules folder – Another fairly self-explanatory one. This folder is where npm actually keeps the files needed for the application. If this was regular Node.js application, we might just get the package.json file from source, and need to call npm install in order to get this folder and its contents, but the hoodie new command did that
  • data folder – This folder is our database. You actually won’t see it the first time, but instead it is created the first time you run hoodie start. If you want to easily wipe out everything for the app, renaming or deleting this folder will cause a brand new database to be created.
  • www folder – Everything for the application, asset-wise, is here. All HTML, CSS, JS, images, etc live in this folder. Treat this like any other web root, Hoodie doesn’t do anything to new files in here that would cause you to lose your work.

I’m going to leave the application intact and we are going to just make a new file inside for our demonstration. All we really need to make the HTML file we are creating “hoodie-able” is to include this script:

<script src="/_api/_files/hoodie.js"><script>

If you go digging around our directory, you aren’t going to find that file at all. The reason is because the Hoodie server serves that file up dynamically by itself. Not only is the goodness of Hoodie in this file, but it also has the front-end code required to work with any of the plugins that you’ve installed along with the app.

The first thing I’m going to do is add a new file in the /www directory called new_user.html. Here are the contents of that file:

I’m also going to create a new file in the /www/assets/js directory called new_user.js. Here are the contents of that file:

The HTML file should be pretty self explanatory. I just made a simple form that takes an email and a password. We include the hoodie script file and our own script file and jQuery. If you call hoodie start and give it a password for the application (first time only), you will get the default screen that we had before.

Our JS file shouldn’t need too much explanation, but there are some things that are likely new to you. The “use strict” is something new in ECMAScript v5 and it forces you to write better javascript. Here is some documentation if you are curious. The next line “var hoodie = new Hoodie();” instantiates the Hoodie object.

After that, we have a block of code that is wrapped inside of the jQuery document ready method. Much of the code is concerned with trapping variables and manipulating the screen, but we should be interested in the two lines that are “Hoodie-centric”.

hoodie.account.signUp(username, password).done(function (user) {checkUser();});

hoodie.account.signOut().done(function (user) {checkUser();});

Our hoodie variable that we declared earlier has an account property that accesses the account store inside of the CouchDB instance. Account has signUp(), signIn(), signOut(), changeUsername(), resetPassword(), and changePassword() methods that you can call. The signUp() and signOut() methods also allow you to provide a callback, which we did and used to manipulate the DOM. All very simple and basic, which is definitely what the Hoodie developers were trying to accomplish.

If you now go to http://127.0.0.1:6007/new_user.html (your port could vary, check the console as you start), you will see a screen like this:

Hoodie Part 2 New User Form
(ignore the symbols in the textboxes to the right, that is LastPass being helpful)

When I put in an email and password, and click register, I get logged in and greeted.

Our Filled-In Form

Signed In

Clicking Sign out gets us back to where we were:

Signed Out

So, what did we do? Did we really just create an account? Go back to the main page, for me that is http://127.0.0.1:6007, and go to the upper right hand corner, hit the drop down arrow and choose to sign in.

Main Page Sign In Button

You will be presented with a form. Put in the information that you registered with on our page.

Main Page Sign In

You will now be shown as signed in. We really did create an account.

Main Page Sign In Successful

That’s it for this time. Next time, we’ll try creating some custom objects and see how easy (or hard) that is with Hoodie.