Categories
Coding People

How The Hacker Who Saved The Internet Redeemed Himself

I read a fascinating story in Wired about Marcus Hutchins, a hacker who used lessons from years of writing malware to save the Internet from WannaCry, only to come to terms with his past misdeeds at the height of his success. This is how the story begins –

At around 7 am on a quiet Wednesday in August 2017, Marcus Hutchins walked out the front door of the Airbnb mansion in Las Vegas where he had been partying for the past week and a half. A gangly, 6’4″, 23-year-old hacker with an explosion of blond-brown curls, Hutchins had emerged to retrieve his order of a Big Mac and fries from an Uber Eats deliveryman. But as he stood barefoot on the mansion’s driveway wearing only a T-shirt and jeans, Hutchins noticed a black SUV parked on the street—one that looked very much like an FBI stakeout.

The Confessions of Marcus Hutchins, the Hacker Who Saved the Internet | WIRED

The article seems to be well researched, and worth reading.

Categories
Blogs and blogging Coding Design Education People Tutorials

How Wes Bos built his new site

I’ve followed Wes Bos for a couple years now. I bought several of his courses, and look forward to when I have time to do his Beginner JavaScript — Learn JavaScript from Scratch course. He recently rebuilt his personal site using Gatsby.JS, and published both a post and a video explaining how he did it:

The details of his site are pretty technical, and the code is available on GitHub if you want to fork the repo, and take a closer look yourself.

I don’t see myself reproducing what he’s done, and building a new site for myself in the foreseeable future. That said, I have tremendous respect for Wes Bos, and how he approaches his work.

He shares openly, offers pricing for his courses that make it much more affordable (I especially appreciate that), and he produces really good quality content.

If you’re interested in how to build a really fast, static site using the Gatsby.JS framework, definitely take a look at his post and video tour. If you’re interested in learning how to code in JavaScript and JavaScript frameworks like React, check out his courses.


Featured image credit: Wes Bos (I took this version from his GitHub repo).

Categories
People Photography Travel and places

Serendipitous discovery leads to David Tewes photographic exhibition

Your Shutter bug

Chris Finke, a colleague at Automattic, discovered a box of slides that were taken by the late David Tewes, Chris’ father-in-law’s cousin while Chris and his wife were going through his late father-in-law’s things.

According to MPR News

On a spring day three years ago, Chris and Christina Finke were clearing out a building on the hobby farm near Mayer. It belonged to Christina’s dad, Doug Tewes, who had died a few years before.

“We’re deciding, you know, what stuff is going to go to Goodwill? What are we going to try and sell? What are we going to get rid of?” Chris Finke recalled.

Then he spotted something different on a shelf, in the back of the attic, where the roof met the wall. It was a hard-sided case. Inside were hundreds of old photographic slides.

Hidden for decades, work of Minnesota photographer gets its own museum exhibit | MPR News

Chris’ discovery prompted him to scan the slides, and publish them on a website, David Tewes, Shutterbug – The Mid-Century Photography of David Tewes, where the staff at the Minnesota Marine Art Museum in Winona noticed them, and reached out to Chris about exhibiting them.

The collection is a wonderful series of snapshots of mid-20th century America.

This collection appeals to me because it’s a wonderful reminder about the importance of preserving our memories as we travel through this life.

It also reminds of of my goal of digitising my late father’s slides. My Dad’s photography may not be exhibition-worthy, but they contain priceless memories from my family.

Chris has licensed the photographs under a Creative Commons Attribution 4.0 International (CC BY 4.0) license:


Shutter Bug by David Tewes is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at https://davidtewes.com.
Categories
Coding

Couples who code together

My talented wife has been learning to code. Specifically, she’s been learning front-end web development, starting with HTML and CSS.

One of her projects as part of a coding bootcamp she joined is to build a basic site with the HTML and CSS she’s learned. She experimented with a CSS-powered dropdown menu on her project site, and hit a snag with it, so I took a look at it last night.

In the process of working out a solution, we found something new we can do as a coding couple … submit and merge pull requests (no pun intended there ).

Categories
Applications Coding Tutorials

The missing piece in my Python scripts

My quest to automate parts of my workflows usually involves writing Python scripts to streamline some of my tasks as a Happiness Engineer.

One output has confused me for far longer than it should have, and I was shown the light today (in the form of a pretty simple solution).

My dilemma

Many of my scripts generate template documents. These include meeting agendas, hangout notes, and team reports. These documents include a couple components that I’ve largely automated using Python, such as –

  • Calculating dates and times in reports (sometimes including timezone conversions);
  • Taking inputs I provide in response to command line prompts, running calculations, and adding those to fields in my reports; and so on.

Many of my documents have a static list of team members that I ping much like Twitter mentions when I publish them as posts on internal blogs (we use internal blogs quite a lot, as you can imagine). Those lists each need to be updated manually every time there’s a change in the team composition, in each of the documents the list appears in.

Although the team composition doesn’t change frequently, I often find myself re-using a script for a team report, or hangout agenda, for example, in another group I work with. This means another set of documents where I need to manually create a list of people, and maintain that.

An example could be something like this:

Pinging: @john-doe, @maryjacobs, @davesmith, @janestuart, @tomwright, @steverobinson

The solution

Currently, the first part of generating this sort of list of people is creating a .csv file that looks something like this:

first_name,last_name,username
John,Doe,john-doe
Mary,Smith-Robinson,maryjacobs
Dave,Smith,davesmith
Jane,Stuart,janestuart
Tom,Wright,tomwright
Steve,Robinson,steverobinson

I was planning on using Python Classes to do this, but quickly realised that I don’t understand Classes nearly well enough to using this feature for this aspect of my documents.

I realised that there’s actually a simpler solution using .csv files and the csv module available in Python instead, after watching Corey Schafer‘s tutorial on this, here:

As an aside, Schafer’s tutorials are wonderful!

I was able to borrow from Schafer’s solutions to write a script that produced a list that looks something like this:

Pinging: ['@john-doe', '@maryjacobs', '@davesmith', '@janestuart', '@tomwright', '@steverobinson']

My script looked like this:

import csv

with open('people.csv', 'r') as csv_file:
    csv_reader = csv.DictReader(csv_file)

    members = []

    for line in csv_reader:
        wpuser = f"@{line['wp_user']}"
        members.append(wpuser)

print(f'Pinging: {members}')

I couldn’t work out how to just generate a list of usernames separated by spaces. I ran into a similar issue with other scripts where I similarly loop over a list of items to produce some sort of list-generated output.

In other words, I couldn’t figure out how to output the list of usernames without the []' characters you see in my initial output.

So, I asked for help on reddit where JohnnyJordaan pointed me to this StackOverflow post that includes a couple solutions to a similar question. I had searched for a solution to my challenge, but didn’t come across this answer (or anything like it).

Clearly, I need to work on my Googling skills when it comes to finding solutions to my coding challenges.

Anyway, the solution that JohnnyJordaan suggested is pretty simple. Instead of using something like print(f'Pinging: {members}'), I could rather join the items in the list with a statement like this:

print(f'Pinging: {", ".join(members)}')

As I suspected, the solution is pretty simple. It just eluded me, completely. So thank you to JohnnyJordaan for the pointer!

I also like the * that came up in one of the StackOverflow solutions, but it doesn’t work with the f strings that I tend to use. Still, there are other ways to use them. Trey Hunner has an interesting post about these operators here (if you’re interested).

Categories
Photography Travel and places

Pretty sunset yesterday

A pretty sunset in central Israel

I thought I’d capture our sunset yesterday evening, as a panorama. It was pretty!

Categories
Writing

Summoning demons in Word

Ah, yes, MS Word, my old nemesis

Source: Meredith Ireland

Categories
Blogs and blogging Business and work Creative expression

Build a membership site with recurring payments

We launched a new Recurring Payments feature for self-hosted WordPress.org sites (powered by Jetpack) or WordPress.com sites today. It’s an awesome new way for anyone with a paid WordPress.com plan to earn money through their sites.

Our new Recurring Payments feature for WordPress.com and Jetpack-powered sites lets you do just that: it’s a monetization tool for content creators who want to collect repeat contributions from their supporters, and it’s available with any paid plan on WordPress.com.

Let your followers support you with periodic, scheduled payments. Charge for your weekly newsletter, accept monthly donations, sell yearly access to exclusive content — and do it all with an automated payment system.

A New Way to Earn Money on WordPress.com — The WordPress.com Blog

The model is similar to Patreon in that you can give your fans a way to support you with recurring payments. This is a great way to build an income through your site.

Here are a few things you can do with this new feature (borrowing from our announcement post):

  • Accept ongoing payments from visitors directly on your site.
  • Bill supporters automatically, on a set schedule. Subscribers can cancel anytime from their WordPress.com account.
  • Offer ongoing subscriptions, site memberships, monthly donations, and more, growing your fan base with exclusive content.
  • Integrate your site with Stripe to process payments and collect funds.

One reason I really like the Recurring Payments feature is that it gives anyone with a paid plan (whether it’s a WordPress.com Personal plan, or a higher plan) a way to create a membership site that can help them grow a following, and a new income stream.

Ad revenue is a popular way of earning money through your site (we offer a WordAds ad platform, for example), but ad revenue really depends on substantial numbers of visitors to turn into meaningful income.

On the other hand, receiving recurring payments from a smaller group of passionate supporters just seems to be more sustainable, and meaningful.

It’s hard to be creative when you’re worried about money. Running ads on your site helps, but for many creators, ad revenue isn’t enough. Top publishers and creators sustain their businesses by building reliable income streams through ongoing contributions.

This new feature empowers creators, bloggers, knowledge workers, <insert your title here> to share something of value with your audience, and build a sustainable business in the process.

Find out more here: Recurring Payments — Support — WordPress.com.

Featured image by Nicholas Green