The 10 rules are intended to eliminate certain C coding practices that make code difficult to review or statically analyze.

Here’s what NASA has to say about these rules:

The rules act like the seat belt in your car: Initially they are, perhaps, a little uncomfortable, but after a while, their use becomes second nature — and not using them becomes unimaginable.


Do you want to wait hours to upload a React, Next.js, Gatsby, or Nuxt.js project? We hope you don’t and are looking for fast and easy solutions!

https://unsplash.com/photos/DZe1jK6pk5c

Introduction

S3 Deployment is a CDK module from AWS (currently “experimental” during June 2021 at the time of writing)that allows populating an S3 bucket with the contents of .zip files from other S3 buckets or from a local disk.

TLDR

  • You should use S3-Deployment only if you need to upload under 100 files
  • Never use S3-Deployment if you need to upload more 100 files/pages, this will be most of the time the usual case for people.

Quick Example to see the main issue

This is what happens under the hood:

  1. When this stack is deployed (either via cdk deploy or via CI/CD), the contents of the local website-dist


🧹 Cleaning your local machine and keeping only current branches leads to free space on your disk and fewer problems due to old stuff

https://unsplash.com/photos/MAYEkmn7G6E

Why should I clean/delete them locally?

Cleaning your local branches ensures:
1. Using less space on your device
2. Prevent Errors when sending local branches to remote(you won’t push to the remote old branches from months ago you forgot)
3. You can clearly visualize which are the branches you are working on.
4. You keep the central git repository as the source of all possible active branches( if it sounds risky maybe you just need to have a backup of the branches off your git hosting provider )

Delete all local branches except for “main

git branch | grep -v "main" | xargs git branch -D

Explanation:

  • 🛒 Get all branches (with the exception…


Reading from a public google sheet document is easy and can help you bootstrap your data fetching for prototypes

https://github.com/riccardogiorato/node-sheets-demo

Install Dependencies

yarn add node-sheets dotenv

Create Google API Key

You will need to have a Google API Key that you can get for free with a gmail/gsuite account with these steps:

  1. Register here with your Google account and create a new project “Google Developer Console”


Set up event triggers to call webhooks for specific events that occur in the DB within a few minutes

Woman holding shopping bags
Woman holding shopping bags
Photo by Jacek Dylag on Unsplash.

TL;DR: Spend less time building custom triggers or watchers! Spend more time on the core of your app or ideas thanks to Hasura events and simple GraphQL mutations!

In this tutorial, we will discover how to use Hasura events to store a user’s preferences/wishlist and send a triggered email from this event. We will also cover the creation of a React app connected to a Hasura Cloud instance to fully make it work.

You can try the application on your own. The complete application is available on GitHub.

1. Set Up Your Hasura Account With Hasura Cloud

The first step will be to configure your Hasura server. My preferred…


Minimal and curated choices for each team at Apple — 2020

https://unsplash.com/photos/ktWur2xM1hs

Apple engineers have always focused on one person when they build software — the person who will use it.

source: https://www.apple.com/jobs/us/teams/software-and-services.html

Apple has a dozen if not hundreds of various development teams.
In the main development “groups” we have picked up different roles from hundreds of open positions for each team to let you discover some technologies or methods used inside Apple.

Please enjoy and feel free to explore all Apple Careers!

Apps and Frameworks

Apps and Frameworks people create every Apple application, including built-in apps such as Calendar and Maps, productivity apps such as Keynote and Pages, and media apps like Final…


Yet another state library for React? Mutable global state for React

https://github.com/pmndrs/valtio (Image source: Author)

Who Created This?

This was made by Daishi Kato. He is the creator of:

Why This Library?

As you have seen, the creator already created incredible projects to simplify flux or atomic states, and the only missing piece of the three types was proxies.

This library was made to reduce MobX/Immer/proxy state down to its very core: an object, you mutate any part of it, the component reacts.

What Is a Proxy State?

A JavaScript proxy can observe a nested object for changes made to it. That means there’s none of the traditional selecting or diffing.

State is the data that…


Create a JavaScript project with PurgeCSS to remove unused styles and keep it all small

Man using leafblower
Man using leafblower
Photo by Callum Hill on Unsplash.

Why Next.js?

It’s one of the best React frameworks supported by the huge React community.

Why Tailwind CSS?

Because it’s the simplest and most modern way to structure CSS classes for your components and layouts.

Why PurgeCSS?

Because you will need to keep your compiled Tailwind CSS file light and tiny.

The Setup Process

  1. Let’s start with an empty Next.js project or just open up your already-set-up project:
npx create-next-app
# or if you use yarn
yarn create next-app

2. Then we will add Tailwind and PurgeCSS.

“PurgeCSS reduces the file size by scanning your HTML and removing any classes that aren’t used. We only want this in production because…


Are Next.js 10’s built-in image component and automatic image optimization an alternative to Gatsby images?

Colorful picture frames on a wall
Colorful picture frames on a wall
Photo by Markus Spiske on Unsplash.

Since version 10.0.0, Next.js has a built-in Image component and automatic image optimization.

The image component, next/image, is an extension of the HTML <img> element that has been evolved for the modern web.

What Does next/image Do Under the Hood?

  1. Automatically serves the images in modern image formats like WebP, which is about 30% smaller than JPEG, if the browser supports it.
  2. Optimize images on demand. Build time won’t change.
  3. Lazy-load the image inside the page only when a certain threshold is reached while scrolling the viewport.
  4. You can decide to use it with Vercel’s internal CDN or other providers like Cloudinary or Akamai.
  5. You can specify…


Your database will be almost useless in the future if you keep only single state values. You need a time series

Numbers
Numbers
Photo by Nick Hillier on Unsplash.

Data has been the gold mine of the last decade, and big data is growing faster every year than the previous one thanks to all other related fields like machine learning and IoT.

Getting more data from your users is valuable. You can study their behavior, discover patterns, and even more that you can’t imagine right now. But in the future, it will all be possible with your data.

Time Series Era

You will be able to analyze the past, the present, and the future! What has changed from the old ways to keep the latest states of your data only?

You are…

Riccardo Giorato

XR Developer and Photogrammetry Artist https://riccardogiorato.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store