• Shared today on Twitter

    @gilmae @MichelePlayfair I know. I did think about it. But it was so much damn work as it was!


    @gilmae @MichelePlayfair Well, now you made me think about it, didn’t you? If I extended the jacket pattern… it’s essentially a lab coat, yeah? 🤔


    @gilmae @MichelePlayfair I hope you’re happy. This path ends with me in the park on Friday getting a disease from picking up pigeon feathers.


    @MichelePlayfair @gilmae Actually… there are a *lot* of crows around here. I could probably find ACTUAL CROW FEATHERS. 😳


    @cobusbernard I love that you found a bald beardy animated gif to illustrate this. 😂


    Blog post: Building the Oscar Contest entry form! https://t.co/LYNMdUN7Ia My first proper app built with @AWSAmplify and @reactjs. (Pro tip: @mavi888uy’s YouTube videos are a great intro if you’re new to these technologies.) https://t.co/i22hm3XF3b


    @roisinparkes @darthted @JobAdder @lightningdb Sadly, just had to change to virtual. 🙁


    @dtraub @Meetup Ugh. That’s ridiculous.


    @darkosubotica @Werner @GoHugoIO @jekyllrb @QuinnyPig And when Darko says “almost anything,” you know that Venn diagram includes a lot of pre-2000 hardware. 😂


    The sun made a valiant effort to peek through the clouds, so I figured I’d better take the opportunity to get out in it. 18.5km/11.5mi ride to Olympiapark and Luitpoldpark. I also found the 1972 Olympic Massacre Memorial, which to my surprise was only opened 4 years ago… https://t.co/d5V8G7Xgwa


    RT @graemeknows: BRING BACK SATISFYING COMPUTER POWER SWITCHES. That’s it. That’s the tweet. Thanks for stopping by. https://t.co/HrpBMQaoaY


    @LilianJamieDean It will be. Still pretty cold out there… I want proper Spring!


    RT @timothysc: I’ll admit it… Amazon has been doing better in the communities I’ve been involved with. I know I’ve given them a lot of s…


    @soganmageshwar Haha, thanks. I can’t believe I made four of them this year. Clearly the cabin fever is setting in… 😜


    @codepo8 Heh. https://t.co/h2KyzofRDO


    RT @cdkday: Big Announcement

    @mattbonig has worked with AWS so that we will have live sign language interpreters using ASL for all talks a…



  • Shared today on Facebook

    For this year’s Oscar Contest entry form, I built my first serverless ReactJS app using AWS Amplify! 🎉 If you want to see how I did it, I blogged the whole process. It was actually a lot simpler and faster than I anticipated, and I even got a CI/CD pipeline hooked up to the Github repo.

    Building the Oscar Contest entry form


    The sun made a valiant effort to peek through the clouds, so I decided to make an effort to get out in it. 18.5km/11.5mi ride to Olympiapark and Luitpoldpark. I also found the 1972 Massacre Memorial…


    Happy birthday Johnny I!



  • Building the Oscar Contest entry form

    As always, I like to use the Oscar Contest as a way to try to learn something new. This year I decided to build it using AWS Amplify, a set of tools and services that can be used to quickly build and host mobile and web apps across a range of frameworks. I’ve somehow managed to avoid touching React, so I figured I might as well use that too. Here’s the basic architecture I went with:

    Contest architecture

    I figured it might be fun to walk you through the process I used in case you’d like to try something similar. The first step (if you haven’t already) is to install the AWS CLI and Amplify CLI and get them configured with your AWS account credentials. Then I created the basic React project using this command:

    npx create-react-app oscars2021

    That will download a bunch of stuff and set up the basic project files for you.

    You can then switch into that directory and start the app to verify it’s working.

    cd oscars2021
npm start

    Running React app

    Now it’s time to hook your project up to Amplify, using this command:

    amplify init

    A wizard will walk you through setting up various parameters for your app, including your preferred code editor and the type of app you’re building. Here’s what I selected:

    Amplify configuration

    This will initialise your project in the cloud and set up some resources for you.

    Now it’s time to add storage, which in my case meant an Amazon DynamoDB table. This is where I’d be storing each entry as it came in.

    amplify add storage

    This will again kick off a wizard that will walk you through some configuration options. I selected “NoSQL Database” and then set up the columns that I wanted in the table.

    Database config

    I also selected “id” as the partition key, with no sort key, no secondary indexes, and no Lambda trigger.

    More DB config

    The next step is to add the API and Lambda function that will actually record the user’s entry. This is done with the command:

    amplify add api

    Again, a wizard will walk you through configuration. I created a REST API with the path “/entry” and created a new Lambda function using the Serverless ExpressJS template. I also gave the function permission to Create and Read from the storage (aka DynamoDB table) we just set up. I didn’t restrict access to the API, as I want anyone to be able to enter.

    API configuration

    Time to actually update the Lambda function! I went into my preferred code editor (Atom) and opened the project. The function is located in “amplify/backend/function/oscarsfunction/src/app.js”. There are some commented example methods that I deleted and replaced with the code below. This adds the AWS SDK (so I can save to DynamoDB), a method for generating random IDs, and the actual post method to save the entry. (You can download this code from my Github project here.)

    Function code

    The next step is to use Amplify to push the newly created backend storage, API, and function to the cloud! You can do this with the command:

    amplify push

    Amplify will ask you to confirm which resources you’re deploying, and then it will start the process using AWS CloudFormation. This can take a little while.

    Amplify push

    If you make any changes to the function code later, remember to push the changes to Amplify so they are uploaded to AWS! In the meantime, it’s time to install some dependencies I need for the form frontend.

    npm install aws-amplify @aws-amplify/ui-react
npm install bootstrap
npm install react-bootstrap

    Once all that’s done, you can finally edit the form! The actual React app lives in “src/App.js”. I won’t go through everything I did (you can check the code out yourself), but basically I made sure to include Amplify (so the frontend can talk to the backend) as well as React Bootstrap. I also tweaked the CSS and added a couple images. Each time you save a change, the app will recompile and update in your running browser window. I also opened the “public/index.html” file and changed the title and description of the page.

    Form code

    You can also test out the form in the browser to ensure it’s working. When I opened the AWS Console and looked in DynamoDB, I could see entries being saved correctly into the dev environment table. 🎉

    The final step is to deploy the frontend, and Amplify makes this pretty easy too. I created a new repo at Github and then pushed my code to it.

    Github create repo

    Then I went to the AWS Amplify console and clicked on my app. If you click on the “Frontend environments” tab, you’re presented with a range of options for hosting your app.

    Frontend hosting

    I clicked the one for Github and then went through the process of granting access to my Github account. Then I selected the repo I’d just created with the code for my app, and left the branch set to “master.” On the next screen, I left checked the option to “Deploy updates to backend resources with your frontend on every code commit” and created a new “prod” environment as the target. I also had to create a new IAM role for the deployment process. Once you save and deploy, Amplify will grab your code from Github, run the build script and any tests you’ve configured, and deploy the resources into your account. The build for my app takes less than 4 minutes to complete.

    Completed deployment

    The beauty of the CI/CD pipeline is that whenever I modify the code and push it to Github, the whole process will kick off automatically! The Amplify console also gives me the URL to the hosted app, which is where you can enter the contest. When I check DynamoDB now, I can see entries coming through to the prod environment table. When the contest is finished, I can shut down and remove all the app resources by simply running this command:

    amplify delete

    If you’d like to try out Amplify yourself, I can recommend a couple resources. The AWS website has a very simple, step-by-step tutorial to Build a Basic Web Application that you can work through, but it doesn’t include React or the CI/CD part. If you want to copy what I did, check out my colleague Marcia’s YouTube videos  on  building a Contact form with React and automating your CI/CD deployments, which gave me the basics of everything I needed to build the contest entry form. Thanks Marcia!


  • Photo Post

    The sun made a valiant effort to peek through the clouds, so I decided to make an effort to get out in it. 18.5km/11.5mi ride to Olympiapark and Luitpoldpark. I also found the 1972 Massacre Memorial…

    The sun made a valiant effort to peek through the clouds, so I decided to make an effort to get out in it. 18.5km/11.5mi ride to Olympiapark and Luitpoldpark. I also found the 1972 Massacre Memorial...

    The sun made a valiant effort to peek through the clouds, so I decided to make an effort to get out in it. 18.5km/11.5mi ride to Olympiapark and Luitpoldpark. I also found the 1972 Massacre Memorial...

    The sun made a valiant effort to peek through the clouds, so I decided to make an effort to get out in it. 18.5km/11.5mi ride to Olympiapark and Luitpoldpark. I also found the 1972 Massacre Memorial...

    The sun made a valiant effort to peek through the clouds, so I decided to make an effort to get out in it. 18.5km/11.5mi ride to Olympiapark and Luitpoldpark. I also found the 1972 Massacre Memorial...


  • Ew, David.

    Ew, David.

    The thirteenth (semi-)annual Web-Goddess Oscar Contest has officially launched! 🎉 And this year you can win everyone’s favourite family – the Roses of Schitt’s Creek.

    Rose Family Sock Monkeys

    No, I know they don’t have anything to do with movies. But honestly, I didn’t see many of the nominated films last year, and Schitt’s Creek brought me the most joy of pretty much any media. So that’s what I went with, and that’s what you win if you predict the most Oscar winners!

    Go here to read the rules and ENTER! Contest has now closed!

    More details on the monkeys:

    • David Rose’s outfit features a custom knit black sweater with embroidered white lightning bolts, as well as custom knit designer sneakers. The sneakers were based off the Little Converse pattern, while the sweater was made up entirely by me. He’s also wearing a pair of black framed spectacles (intended for an American Girl doll!).
    • Alexis Rose’s outfit is based off her iconic “A Little Bit Alexis” performance, including a dusty pink minidress and knee-high boots. She’s also got her iconic A necklace.
    • Johnny Rose is wearing a bespoke tailored suit, sewn by me from a pattern intended for American Girl dolls. (No joke – I paid $10 for it. 😳) He’s also got felt eyebrows for the perfect Eugene Levy touch.
    • Moira Rose is wearing an avant garde tunic dress made by me from sheer sequinned fabric and designer high heeled boots. She also has matching feather glitter earrings. And what would Moira be without her girls? You get four different wigs (attached with Velcro) to complete the whole wig wall scene.

    If you want Steve, Patrick, or any of the other Schitt’s Creek residents to recreate the scene, that’s all on you. 😂

    So go ahead and enter! The 2021 Academy Awards happen on Sunday, April 25th (California time), which is like 2am here. So I’ll cut off entries a few hours beforehand when I go to bed, and you’ll have to wait until I get up in the morning to find out who won!

    Web-Goddess Oscar Contest Sock Monkey History

    Eighteen years ago (good grief!), I thought it would be fun to run a contest and give away a sock monkey. I then kept that up for 10 years running, and you can see the history of my creations below. These days I only do it when the inspiration strikes…

    2021 – Schitt’s Creek Sock Monkeys
    2019 – Freddie Monkcury
    2013 – The Avenger Monkeys
    2012 – The Monkey with the Dragon Tattoo
    2011 – Black Swan and White Swan ballerina monkeys
    2010 – Sparkly Emo Vampire Sockmonkey playset
    2009 – Batman and Joker monkeys
    2008 – Striking Writer Monkey
    2007 – Trio of Dream Monkeys
    2006 – Gay Sock Monkey Cowboys
    2005 – Soctopus
    2004 – Plain sockmonkey
    2003 – Oscar the Sock Monkey


  • Shared today on Twitter

    I updated @ynab and our personal finance spreadsheets last night. Last year we averaged 18% of our income on “Wants.” So far this year it’s at 3.7%. 😧 Lockdown is good for the retirement savings, if nothing else.


    RT @breakthesystem: A helicopter flew on Mars! https://t.co/vSct7tyyYX


    @FuckboisOfLit Hahahahaha. 😂 I’m sorry; you’re absolutely right that that “review” is ridiculous. But it’s also hilarious. As you say, who opens a podcast with that name expecting a serious academic work?! What an idiot.


    The thirteenth (semi-)annual Web-Goddess Oscar Contest has officially launched! 🎉 And this year you can win everyone’s favourite family – the Roses of Schitt’s Creek… as sock monkeys. Yes, really. (I hope @danjlevy likes them!) https://t.co/yyq9nYaySS https://t.co/fn0iCjt6zc


    Bulgogi, cheese tteokbokki, kimchi, and beer. Damn I’m good! 🍚🍻 https://t.co/guQWqU4YUr



  • Shared today on Facebook

    The thirteenth (semi-)annual Web-Goddess Oscar Contest has officially launched! 🎉 And this year you can win everyone’s favourite family – the Roses of Schitt’s Creek…

    Ew, David.


    Bulgogi, cheese tteokbokki, kimchi, and beer. Damn I’m good! 🍚🍻



  • Photo Post

    Bulgogi, cheese tteokbokki, kimchi, and beer. Damn I’m good! 🍚🍻

    Bulgogi, cheese tteokbokki, kimchi, and beer. Damn I’m good! 🍚🍻

    Bulgogi, cheese tteokbokki, kimchi, and beer. Damn I’m good! 🍚🍻


  • Coming soon…

    It’s that time of year again…


  • Shared today on Twitter

    It’s been two years since the last one, but I think it’s just about time to resurrect something fun… https://t.co/EFIxZnAPB7




ABOUT

My name is Kris. I’ve been blogging since the 90’s. I live in Sydney, Australia, and I spent most of my career in the tech industry.

No AI used in writing this blog, ever. 100% human-generated.


search


CURRENTLY LISTENING


CURRENTLY READING


LATEST COMMENTS

  1. Woot, my knee-jerk don’t-overthink-it pub-quiz answer was Iran which seems to be [✓]. I ‘knew’ it was more populous than…

  2. My home economics teacher taught us to use “J cloths” as press cloths. (Cellulose cleaning cloths). The upside of using…


BLOG ROLL


STAY CONNECTED


Special thanks to Matt Hinrichs for the site logo!