HarpJs to Amazon s3 workflow

December 13, 2017

This is an update to a previous post where I explained how I used the Mac OS app, Automator, to upload a static site to s3

I just recently found out that the aws-cli contains commands for s3, including sync.

So after a bit of hacking on it, here’s my new harp-to-s3 workflow:

  1. Once you’re done with local changes in harp, open a terminal and cd into the root directory of your site
  2. Run harp compile
  3. Then cd www (the directory where harp places the compiled html)
  4. Here’s where we use the AWS command line tool. The sync command has a few flags you can use, but the two that are pertinent here are --include and --exclude. Those can be used together to get the results you need.

    By default the sync command syncs all files in the directory, unless you flag them with exclude. So to sync the whole directory, here’s what I use: aws s3 sync . s3://www.jorgepinon.com --exclude "*.DS_Store" --dryrun — I like to exclude those dumb .DS_Store files and use the --dryrun flag first to see what would be uploaded.

    If you want to instead sync a single file, like say your main.css file, you have to first exclude everything and then include only that file: aws s3 sync . s3://www.jorgepinon.com --exclude "*" --include "/css/site.css"

    You can sync multiple files by adding extra includes as needed: aws s3 sync . s3://www.jorgepinon.com --exclude "*" --include "/css/site.css" --include "/js/main.js" --include "/img/new-header-image.jpg"

  5. If you use the dryrun flag and the results look correct, then rerun the same command without dryrun.

  6. Confirm live changes by pointing your browser to your site.

Automated deployment

It would of course be ideal if I could automate this somehow. And since I also save the site files in a git repo, I looked into Bitbucket and found that they do indeed have an automated tool to upload to s3.

The problem is that I’d rather not upload the entire site each time, only new or updated files, but harp compile generates an entire new static site which effectively destroys any chance of automated syncing.

I’ll look into something else if I ever do get sick of this, but for now it’s up to me to know which files I edited and should be uploaded.

Link to this post

Basic Rules for Managing Creative Teams

November 1, 2017

In-house creative teams are usually either underused or devalued when they could instead be a valuable team within a corporation. A good manager should step up for the team and advocate for it within the organization.

I’ve worked in a few such teams in my career and seen others from the outside and rarely has the team’s potential been something the organization strives to improve. A lot of thought goes into optimizing the sales team, because, well, bottom line, but a thriving creative team does as much to build and improve your busines as any other group, and that includes contributing to your financial success.

It’s up to the team’s direct manager to create an environment for each team member to thrive and promote that as a strength to be deployed by the business at large. Managing creatives (and I’m including both visual and technical here) can be similar to managing other teams, but if goals and deadlines aren’t supplemented with other concerns, your team will be wasted and your business will suffer.

What other concerns? I just have a few basic ideas for managing creatives that may be different than other disciplines:

1. Learn individual strengths and weaknesses

A person identified as a “Creative” (or a “Developer”) can mean wildly different things and it should be the manager’s job to understand where best to position a designer, and what tools to provide, for them to produce their best work. This may mean sometimes jumping from one project to another, but that’s a good thing for creatives and will be beneficial to the organization.

2. Learn and encourage individual aspirations

Just like other teams’ employees may be eyeing bigger and better things, so do creatives and developers. There is always a lot of room to grow as a designer or developer, so keep in mind that few people want to make web graphics for very long. Find out what they want to do next and how you can provide the opportunity.

3. Define project stages

For most projects to succeed, they require some kind of work in these areas: ideation, focusing, refinement, and execution. If at all possible include all team members in the ideation and focusing parts, and then decide which employees are best suited (and would be most interested) in executing. A manager should lead the team from one stage to another decisively to keep the project on track and to be able to communicate it to other stakeholders.

4. Create a supportive work environment that encourages criticism

Creative and coding work is full of personal opinions and preferences, and disagreements can be bad for team unity. But opinions and preferences are important and will lead to team growth. Designers and developers need to feel they can share and defend their ideas and preferences and that (constructive) criticism is just part of the workflow.

Link to this post

Ev Williams on Ad-Driven Media

January 20, 2017

Medium laid off about 50 employees, mostly in the ad revenue group. Ev Williams, the CEO, published a blog post about it that explained that their ad-driven revenue model—the same model that drives most media sites on the web—is broken and unsustainable to run a business.

Upon further reflection, it’s clear that the broken system is ad-driven media on the internet. It simply doesn’t serve people. In fact, it’s not designed to. The vast majority of articles, videos, and other “content” we all consume on a daily basis is paid for — directly or indirectly — by corporations who are funding it in order to advance their goals. And it is measured, amplified, and rewarded based on its ability to do that. Period. As a result, we get…well, what we get. And it’s getting worse.

I’m sure there are people out there looking to solve this problem, but until anything better comes along, publishers are going to keep failing on the business side if all they’re going to hope for is ad revenue to sustain it. Add to this scenario the users—a small, but nevertheless significant enough group—who installed ad blockers on their desktops and laptops, and then finally on their phones, too, and the environment looks hopeless.

In a world with only—or mostly—programmatic ads, the winners are the click-baiters and sensationalists, and we as consumers suffer for it. Better publishers must move to a subscription model, with ads making up a smaller part of the revenue, just like sports teams rely on season ticket sales to provide a stable revenue base.

I worked on a team that ran a high-traffic blog, of which the revenue model was based solely on programmatic ads. It was depressing at times watching the revenue team squeeze every penny of revenue from those ads like blood from a stone, while the user experience suffered and the daily visitor numbers stagnated or shrunk.

One positive thought is that when subscriptions become more accepted by mass audiences, it'll be the better publications that will earn those dollars and the others will become online tabloids battling our ad-blockers.

Link to this post