Finding Your Passion

I recently watched a video by Sean McCabe about finding your passion (seanwes tv: How to Find Your Passion). In the video Sean says ‘we shouldn’t think of trying to find what you passion is as going off in another direction from what you are currently doing, but instead think of it as a starting line where exploring each idea is like moving forward from that starting line’.

He continues to say by moving forward off this starting line and exploring an idea that you feel might be what you are passionate about, you are discovering what really is your ‘passion’. You may find that after a while this new thing isn’t what you are passionate about, you may not like it, but at least you’ve explored the idea.

This idea really resonated with me because for the last few months I’ve been trying to decide whether to stick with the ‘technology stack’ I’ve been using for the last few years (Angular, Ionic and general front-end development) or explore the world of NodeJS, but the thing that has been holding me back is if I starting getting into a new stack, it might mean that the work opportunities open to me suffer.

As a contractor the amount of experience you have in a technology helps. When clients are looking for someone with x amount of experience and you don’t have that many years it does mean that you can’t be put forward for the role, the recruitment agency won’t put you forward for the role as they see you don’t have the require amount of experience. Even though you maybe the most knowledgeable developer on a new stack that you have only been using for the last year. CVs get scanned through every quickly and if you only have a few months experience you could find your application doesn’t go any further.

But I am really fascinated with NodeJS, I think the types of projects you can do with Node is amazing, (web, mobile, desktop, server side, even robots). The NodeJS community looks amazing, so helpful and welcoming to new Node developers.

Anyway after watching Sean’s video it made me think that by learning Node I’m not going off in another direction from what I’ve normally been doing, what I’ve been making my living off. Instead I learning, I’m moving forward.

I may find I don’t like building sites/apps with Node, I may also find that it makes me a better developer, it gives me more opportunities and more experience. Experience I can bring back into the mainstay of my career.

So if you have something you want to try, but you feel it is moving away in another direction from what you normally do, remember it really is just moving forward.

Nice ngClass tip

This is a useful thing I found while working on a Angular project, making a small note here in case I come across the need for something like this again.

I’m working on a project where I have to loop through a list of items and display them in a table. Pretty straight forward stuff. One requirement is that if a row contains an item with a certain name, then a Class needs to be added to this row so the front-end developer can style this row differently.

After doing some research into this I found out that using ngClass this is really easy to do.

Using ngRepeat I looped through the data creating the table, then on each row using ngClass you can check the matching value like this:

Ng-class=“{‘className’: value === ‘titleToMatch’}

What’s happening here is if the value matches the titleToMatch then the className is applied to the row.

Ng-class is really flexibile and it’s well worth looking into what you can do with it.

Ionic 2 links

I’m starting to look into learning Ionic2 (and Angular2) so here are some links to articles and resources I’ve been reading about Ionic 2:

Here are some great videos:

These are just a few of links I’ll add to them as I find more. I’d also recommend the Building Mobile Apps With Ionic 2 book from Josh Morony

Directives in Angular

As part of my reading up on Angular, I’ve spent a bit of time looking at directives. These are my notes from what I’ve found out, mainly this post is for my own benefit.

– Four ways to clarify a directive

– Element =

– Attribute =

– Class =

– Comment = <!—directive:person —>

The restrict attribute in a directive will set what the directive can be loaded as

– E = Element

– A = Attribute

– C = Class

– M = Comment – These were setup as a way to get around the problem in early versions of Angular where the browser restricted how many directives could be created

Replace:true means that the template in a directive will replace the HTML element of the directive. So if a directive called contains a element with two input boxes for first name and last name. When the output HTML source is viewed the tag is replaced by the input fields.

Directives that manipulate the DOM usually use the link option to register DOM listeners as well as updating the DOM:

– The link function contains functions that effect the DOM

– Functions that can run against the $scope

– The link function takes in 3 scope, element, attr

– Link functions should have a $destroy event to clear up directives

Isolated scopes are defined in a Directive as scope: ‘=‘. An isolated scope is an object that is specific to that instance of a directive. So for example if you have a directive that has a template containing two input boxes that will show a list of users first names and last names. This directive allows the user to edit the names in a list. So each directive have access to its own scope and they aren’t all using the same scope object. You create an isolated scope so each version of the directive has it’s own scope.

All this information I found on the AngularJS site in the Developer Guide a great resource.

 

 

Using SQLite instead of LocalStorage with Ionic

For the last few Ionic apps I’ve built I’ve used Local Storage to save data, usually app settings or a list of names. Generally a small amount of data so it was fine in local storage.

Now on the app I’m building for myself I need to use a better data storage solution, one of the possible options is SQLite. Searching on the internet I found Nic Raboy’s great introduction on how to set up and insert data into an SQLite database in your Ionic app.

Use SQLite Instead of Local Storage in Ionicframework

This is a great intro, the one thing I did find was I was running my app in the Chrome emulator and the SQLite database wasn’t being created. So I have to build my app and get it running the iOS emulator, which with the power of the Ionic framework takes only 3 lines to do:

  1. $ ionic platform add ios
  2. $ ionic build ios
  3. $ ionic emulate ios

This launches the iOS emulator loading your Ionic app. Then if you open Safari and go to the developer tools you can use the inspector to look at what your app is doing  (Develop > Simulator) any console logs you have in your code will appear in the console.

With a combination of Nic’s article and using the Web Developer tools in Safari I’m able to get SQLite up and running in my app and move away from local storage.

It is fun to learn

I’ve just read Dan Davies article “It’s fun to learn” it’s a great article where he talks about how he is a self taught web developer and over the last year he has really pushed his jQuery skills building demo sites and projects. It’s a great post and well worth checking out.

While reading I was reminded about that initial fun you get when you start out learning new technologies. Like Dan I’m a self taught developer, who has picked up new skills as I’ve gone along. For me learning a new technology has recently felt like it’s something I have to do. For example as a contractor if I want to earn so much a day then I need to have a particular set of skills (not the set of skills that Liam Neeson has in Taken). Which has lead me to looking to pick up the next thing that is popular.

Really I have  a lot of experience and a good set of skills, and I could easily stick with what I know, but this leads to stagnation and a feeling that you are going nowhere in your career. This takes the fun out of the job.

Dan’s post has reminded me to not learn something cause it’s popular and may increase contract opportunities, but to learn something that I find fun. And the best way to learn a new technology is to build demo sites as Dan lists in his post.

For me I’ve recently been interested in NodeJS (yes I know it is very popular at the moment, but it’s something I want to learn). As a web developer I like the web frameworks that Node supports, the one I am interested in is ExpressJS. So that’s what I’m going to start learning and have fun doing it.