A “/uses” Update!

I have updated /uses with some minor changes:

  • Switched from VS Code Insiders to VS Code, there was a plugin that had issues and I never switched back.
  • New VS Code Plugins
    • Bracket Pair Colorizer
    • Document This
    • Git Lens
    • Import Cost
    • markdownlint
  • Removed VS Code Plugin
    • vscode-icons (natively supported)
  • iTerm 2 re-added because restarting VS Code closed all terminal sessions.

How to Get Started Changing Your Eating Habits

Take a quick read of the title of this post one more time. Did you notice that it doesn’t say “How to Get Started Dieting”? Going on a diet is fun if you enjoy dropping 15-20 pounds over a few weeks, taking some pictures and posting them on facebook and then gaining 20-25 back a few weeks later. This is about how to change your eating HABITS.

Quick note about me: I know most of my posts are very technical in nature, but, exercise and nutrition have become a passion of mine over the past five years. I spent most of my 20s fat. 5 years ago I hit 250 pounds and was shopping for size 40 jeans because I couldn’t fit in 38s any more when I decided to do something. I’m happy to say that I’m hovering around 180 and size 32 now and have been for over a year! This is my advice to anyone who honestly asks how I did it:

Phase 1: Write

Supplies you’ll need: a notebook and a pen.

Write down everything you eat and drink. Seriously. Just write it down. Don’t change anything yet. Even on the weekends. Even the beers/wine you have. Write. It. Down.

Stay in this phase for at least a week, two would be better to get into a habit.

Phase 2: Weigh and Measure

Supplies you’ll need: a “food scale” and measuring cups from Amazon.

Now that you are in the habit of logging your foods, let’s take it a step further and start measuring what you are eating. Log the weight or amount next to your food in your notebook. If you aren’t able to measure a particular meal (like dining out or just pure laziness), make a rough guess, the more you start measuring, the more you’ll know the sizes of things.

Do this for a week. Don’t change your diet YET! I know you’re dying to, but just wait.

Phase 3: Go Digital

Supplies you’ll need: a phone.

Sign up for MyFitnessPal (MFP) and replace your notebook with the app. Log your foods and amounts in the app. The first week will be the worst because you’ll have to learn how to look up foods and scan them. Luckily, we are creatures of habit and once we find the foods, they will be there in our recent foods to find more easily.

This could be done for a couple more weeks, but I’m sure you’re probably ready for changes now. Just make sure everything is still getting logged.

Phase 4: Change Your Foods (Slightly)

Supplies you’ll need: nothing.

Now, time to set a goal in MFP. Whether you are trying to lose or gain weight, set a very low goal and start following the calorie intake requirements. By now, you know how many calories each of your foods is costing you and it will be easier to make adjustments (more chicken, less mac and cheese, if you’re me). You’ll probably notice that you dine out less because it is just easier to calculate at home when you’re in control of the kitchen.

Do this for as long as it takes to hit your initial goal. Keep setting new goals until you get bored!

Phase 5: Experiment

Now that you’ve got the hard parts down, you can try out different plans or just stick with a maintenance plan. You can switch to tracking macros (what I’m currently doing) or try a keto based diet. Notice I did say “diet” there. It wasn’t a mistake. Feel free to try different diets out now, but once you are done, go back to tracking your regular meals so that you don’t lose progress.

Cheat

Seriously. Cheat. Don’t log during weekends if you don’t want to. Eat crappy foods. Enjoy them. That’s the thing, if you don’t, you’ll be miserable and want to just binge all your progress away.

You can even take weeks off from logging if you want. I haven’t for a while, but I could tell you a pretty close estimate of what my intake has been for the day just because I used to log so much.

 

I hope this helps you on your journey. Feel free to reach out on twitter or in the comments!

My Photo Backup Solution

A few friends have asked about how we handle our family’s photo safety. Since I have two kids, a wife and a DSLR, we naturally have TONS of photos. If anything were to happen to those photos, you know who would take the full blame of the loss! This is the system we’ve come up with.

The Inputs

  • My iPhone
  • My Wife’s iPhone
  • The family DSLR

(Since we are both on iPhones, we make use of the Apple ecosystem. If you have an Android, Blackberry, PalmOS, WindowsCE device, YMMV.)

Software

We each run Photos.app on our MacBooks. We do this so our iCloud Photo Library will automatically sync and download to the MacBook. DSLR photos are downloaded to Photos.app on my wife’s machine. (I wish we could put both photo libraries on one machine, but I haven’t found a way to get iCloud Photos to sync to two different accounts and iPhoto libraries)

Backups

iCloud: Both my wife’s phone and my phone are using iCloud Photo Library. We aren’t using the same account though. They are tied to our iTunes accounts. The bad thing about that is, we don’t have access to each other’s photos. We also pay the extra space fee on both of our devices (which stinks because the $2.99 plan on hers would easily cover the $0.99 one on mine). The good thing is that our photos are almost instantly backed up to all our devices. (http://www.apple.com/icloud/photos/)

Google Photos: I’ve also installed Google Photos on our phones and laptops. We’ve chosen the free unlimited size plan that downscales your photos a bit. I figured this was acceptable as a redundancy solution. Better to have a lower quality photo than no photo at all. (https://photos.google.com/)

Shoebox: I just recently started using them as yet another redundancy option. It works the same as Google Photos. I just have the app on our phones automatically upload as new shots come in. (https://shoeboxapp.com/)

Backblaze: In addition to an online photo service, we also backup our MacBooks via Backblaze. Backblaze creates online disk images of your machines and allows you to restore them or even have a thumb drive mailed to you if the machine dies. This backs up our local iPhoto libraries. (https://backblaze.com/)

Hope this helps out! Would love to hear your comments or concerns about our setup. Also, if you know how to get two iCloud accounts syncing to one iPhoto library, let me know!

My Favorite VS Code Extensions (June 2016)

I’ve written a bit about my usage of Webstorm in the past, but I haven’t lately. There’s good reasoning behind it, I’ve switched to Visual Studio Code! I’ve really been enjoying using it, especially since I started working in Typescript. It seems like more and more people are enjoying it too! With that expanded audience, comes community written extensions for VS Code. These are my current favorite ones:

Do you have an extension that you love that you think I will too? Reach out to me on twitter and let me know! @AdamWeeks

 

Creating a Barcode Scanner with Ionic 2 in 15 Minutes

One of my most popular posts is Ionic Framework Introduction – Barcode Scanner. Apparently, people like making barcode scanners! Who knew!?!

Today, we’re going to do a little update to that post and get our Ionic 2 on! Since the previous app was so basic, I’m not going to actually upgrade the code, we’ll just start from scratch. Since we only have “15 Minutes” (YMMV) let’s get going!Read More »

Angular Blackjack: Converting to Webpack

It has been a while since I’ve touched my Angular Blackjack project. When I first started working on it, I created a build process that used gulp-concat to simply merge all our application files into one. Let’s bring our application into 2015, ES2015 that is, with a modular loading system.

For this exercise I decided to use Webpack. I could’ve easily used jspm or browserify, but Kent C. Dodds‘s series on Egghead.io was easy to follow and very informative: https://egghead.io/series/angular-and-webpack-for-modular-applications

For a quick TL;DR, you can see the pull request of all the changes made: https://github.com/adamweeks/angular-blackjack/pull/2/files?w=1

Read More »

Angular Directive Isolate Scope Binding with Parameters

(First off, sorry for the long winded post title. It is basically what I google every time I’m trying to remember the functionality.)

Let’s say you have a directive that allows a user to enter data. When that user is done entering data, the directive processes the data, then sends the result back up to the parent. If we were to do this with two-way data binding, we’d have to set up watchers to know when the values were changed. There is a way to do it without the watchers though. We can use the parent scope binding type: “&”.

Read More »

Angular Service Template for Webstorm

In keeping with my previous posts about my Webstorm templates, this is my template for creating a new Angular Service.


(function() {
'use strict';
angular.module('${moduleName}', [])
.service('${serviceName}', [${serviceName}]);
function ${serviceName}() {
var service = this;
}
})();

Previous Posts:

Emoji Eater – An AngularJS Game for Ionic Framework

Emoji Eater

A few months ago I starting playing around with the idea of making a mobile game using Angular and Ionic. I didn’t want to use any game frameworks, just a basic game to play.

The game I ended up creating was Emoji Eater. It has gameplay that is very similar to the old Windows Mobile game called Jawbreaker. The only real difference is the “levels” where you have a certain amount of turns before the combination amount goes up. (I found it quite difficult to pass level 6!)

Now, I’m certainly no designer and definitely not a game designer, so please pardon the crudeness of the game. It is definitely not a “released” product, but it is playable.

If you’re interested in checking out the source behind it, I’ve posted it up on Github.

Enjoy!