Posts

Showing posts from February, 2019

Drive, Chapter 6: Purpose

The Purpose Motive There has to be a bigger idea than just profit.  For many profit is less important that having a reason for doing the things you do.  Profit is nice and necessary to stay in business but giving your employees a purpose might be even more important.  Employees with purpose, autonomy and mastery will make your business even more profits, more than likely. I have seen this in my own life.  I stayed at a job I loved, even  though i could have made more money somewhere else, because I had all three of these things. Goals Tom's shoes is a company that donates a pair of shoes for every pair it sales.  This is an example of what some businesses are becoming.  Places where profit is important but having a goal other than just maximizing revenue. Having a goal that is not just about money, can really help you and your employees find a purpose that will give them more meaning in their job. Words Words matter.  If you want to s...

Progressive Web Apps With React: Chapter 2, Getting Started with Webpack

Image
Our project structure So far we have been cheating, we have added script tags to get our code to run.  As our project grows this will become unwieldy and maintenance nightmare.  Let us introduce Webpack. Welcome to Webpack We have one goal in this section, take our JavaScript out of index.html and use Webpack to bundle and inject it.  Create a src folder, add an index.js file to it, add some code to that file  and run the following command node_modules/.bin/webpack src/index.js public/bundle.js Note there is no space between node_modules, and .bin.  I made that mistake when typing it it in. This command tells Webpack to take everything in the first file, and copy it to the second file.  The magic sauce here is that it takes all the dependencies required to make the first file run, and copies them also.  Now it's as simple as including that file in our index.html file, and it should work Bundling files Using webpack to b...

Progressive Web Apps With React: Chapter 1, Creating Our App Structure

This chapter opens up with the argument for Progressive Web apps (PWA).  Building an app in React does not necessarily make it a PWA, and building a PWA does not have to be done in React exclusively.  There are several sections upcoming, that while they sound exciting, really have almost nothing to do with the programming in any form or fashion.  The author uses a story of a friend who wants you to build an app, and will pay you lots of money for it.  I would skip the following sections: Setting the Scene The Problem The Other Problem Beginning Work A PWA consists of several parts.  Building an app that will work reliably from poor internet connections, to incredibly fast ones.  And secondly, they need to install fast, and be small. Why Progressive Web Apps? We need PWA's because JavasScript based apps, bcan be become very large and complex.  This leads to performance challenges.  We want the app to load as fast as possible, over the w...