teleren/devto huggingface dataset:
Do I have to rebuild my entire JAMstack site for every new change?
Tags: jamstack, jamuary
Published: 2020-01-30 21:03:13

A recommended best practice on the JAMstack is to trigger a new site build and deploy for every new change that comes through. This ensures that sites are kept consistent across a globally distributed set of CDN servers. As you can imagine with this setup, build times increase as sites scale. In the case of data-driven industries like e-commerce where content (that significantly drives revenue) is ever changing, time is of the essence. In order to stay competitive and relevant, updates need to be instantaneous. The JAMstack approach of atomic deploys poses a challenge to larger sites like these with over thousands of pages since builds tend to be lengthy. 

A key strategy to speeding up large site builds is by building incrementally. Incremental builds is the concept of re-building only the parts of a site that changed. To accomplish this, older content that doesn't change remains cached, while modified content is regenerated and updated to the cache. This way, deployments are perceived as instant. In spite of how ostensibly simple incremental builds may seem, they are in fact a tricky business. Most notably, incremental builds require pinpointing exact changes and updating the build appropriately. Because of the complexity of incremental builds, many SSGs have yet to implement them (*without charging for them*) and this technique remains fairly inaccessible for now.

A more accessible way to achieving faster builds is to decouple dynamic content like price from the prebuilt markup itself. APIs like Commerce Layer allow you to inject content at request time while serverless functions enables you to leverage dynamic server side functionality at the edge as needed. The combination of static with dynamic means that you can stay confident that time sensitive content is always up to date. 

For more on incremental builds with regards to SSGs, [check out React Static, an SSG built for React and the only SSG that currently supports incremental builds](https://www.netlify.com/blog/2019/01/17/how-to-scale-massive-react-static-sites-with-incremental-builds/?utm_source=devto&utm_medium=incrementalbuilds-div&utm_campaign=devex) *(for free)*
Docker-based development
Tags: docker, ruby, rails, kubernetes
Published: 2020-01-30 21:03:05

Hello guys,

I want to make an announcement that I plan to start a series of articles about how to use Docker in local development processes.

First of all, I plan to explain why we are at Amoniac have chosen Docker as our main technology for local and production environments. I will show the cases when Docker helps a lot to start new development projects and optimize current processes.

In the middle, I will show how to organize the process on your laptop with Docker Compose and spend 10 minutes on new projects' environment setup.

At the latest posts, you will see how to migrate from Docker-Compose to the Kubernetes based deployments and how to optimize your Docker containers to have smaller sizes and better scalability.
How Abstraction Can Be a Useful yet Painful Concept, Especially for Beginners
Tags: beginners, discuss, computerscience, career
Published: 2020-01-30 21:02:54

We're always trying to abstract away details in software so that, well, we don't have to think about everything all the time. It reduces the cognitive load and allows us to focus our brain's processing power on the details most relevant to the task at hand.

The concept of [abstraction](https://en.wikipedia.org/wiki/Abstraction_(computer_science)) is fundamental to software engineering and it is so necessary (imagine if we all had to think about memory allocation or scheduling tasks or routing packets). Abstraction is powerful and a sign of progress in this field that we don't have to think about this stuff all the time. 

However, often we are in fact left thinking about it all the time. In a slightly different form, the thought is something like "I don't really get this or I wish I knew this at a deeper level but oh well". That lingering thought creates a psychological load of having to be okay with not knowing or not understanding something. Many of us crave details and not knowing exactly how something works is a psychological burden we subconsciously carry. 

I think this is true at all levels of experience as a software developer, even with decades of programming under one's belt there are threads they haven't had a chance to pull at to full satisfaction.  I imagine this can be especially painful for new developers. If typing some code into a browser and having a console print out 'hello world' is not satisfying to you, you're not alone. There are questions that need answering, how? why?

Things do progressively get better. As more time passes you can hope to have more foundation under your belt, you see patterns and can predict outcomes. I like keeping a log of things I want to understand deeper and try to pull at those threads when I can. This, of course, requires some discipline and some free time and motivation.

What are some concepts, abstracted away in your day-to-day, that you want to understand at deeper level?
My MVP that's PWA and SPA with just wordpress. I'm seeing 0.5s loads, would adding service workers improve performance?
Tags: wordpress, pwa, spa, serviceworkers
Published: 2020-01-30 20:39:07

---
title: My MVP that's PWA and SPA with just wordpress. I'm seeing 0.5s loads, would adding service workers improve performance?
published: True
description:
tags: wordpress, PWA, SPA, Service Workers
---

I think I'm becoming quite neurotic about speed and mobile user experience at this point for a super bootstrapped MVP I'm building but I still feel as though there's tons of opportunity, most if not all pages are loading in 0.3-0.7s with pages ranging from 237k to 437k and vanity scores of 99% / 95%, not sure if I can do anything at this point except switch to a better server (on media temple grid). But I was curious how much of an impact introducing service workers would have if any?

A little more info.
- All iconography is super optimized inline SVG, either inlined within markup or inlined in the CSS.
- No third party scripts unless on pages that allow social embedding, analytics are local.
- I'm using turbolinks for the SPA feel, I was using barba which I liked a lot better but I'm seeing better performance with Turbolinks (probably something wrong I'm doing).
- CDN is via Cloudflare.
- All scripts and style are deferred, not render blocking, and only loaded for pages they're needed on.
- My total calls are 27 at the most.
- Most if not all JS for the frontend is in a single file.
- All CSS is in a single file.
- I'm using virtually zero plugins (commenting, caching, SEO, a user registration plugin that I grossly modified and simplified)
- All animation is CSS and 60fps everywhere.
- I built the theme using underscores, but greatly simplified the source.

If service workers would help with say the core navigation and footers, does anyone know how to do that via Cloudflare? It seems less straight forward via Cloudeflare's "Workers". This project has a ton of user functionality and certain areas are pretty media / content heavy so I want things to be as light and nimble as possible.
PHP 7.4 in prod at last
Tags: php, functional
Published: 2020-01-30 20:26:29

This week we finally moved to PHP 7.4 in production at work. The upgrade has been the most anticipated (by me) since PHP 7.

The new hotness of short functions, typed properties, not to mention improved performance by file preloading, array spread syntax, null coalesce and a host of other improvements!

The only caveats we had upgrading were a few packages were fixed to PHP 7.3 (these have since been upgraded) and we require php-redis extension which is now installed with PECL.

Moving to production went fairly smoothly, to say we're still reliant on Chef and AWS Opsworks which both seem pretty outdated stacks for 2020 (hoping to move to containers soon!)

I really like the language improvements, feels like we're coming more mature as a language and taking inspiration from JavaScript, Java and others. It will be interesting to see the future development and what the future holds for PHP!

Have you upgraded yet? If so, what's your favourite new feature/improvement? If not, what's stopping you?!
Convert a class to a cache layer using just one annotation
Tags: github, kotlin, opensource, android
Published: 2020-01-30 20:17:49

Read more about generating a cache layer with annotation here :-

https://medium.com/@crypticmindscom_5258/caching-made-easy-on-android-with-kotlin-part-3-3d4cfcb57df0


Check out the repository here:-
https://github.com/crypticminds/ColdStorage
Deploying a Node application to Heroku, part 3
Tags: heroku, node, javascript, backend
Published: 2020-01-30 19:04:11

---
title: Deploying a Node application to Heroku, part 3
published: true
description: Set up continuous deployment to Heroku from GitHub
tags: heroku, node, javascript, backend
cover_image: https://ferrariwebdevelopment.s3.us-east-2.amazonaws.com/assets/20191204-heroku3-deploy.jpeg
---

## How to set up continuous deployment from GitHub

Now that our application is ready to be deployed to Heroku we can make things easy for us by setting up a system of continuous deployment from GitHub.

This means that, after a simple set up, we can just push our code to our Git repository on GitHub and have Heroku automatically detect code changes, grab the latest version of our app, and deploy it to production, without us having to take care of this process manually.

After we update our app, all we have to do is commit our changes, push the code to GitHub, and Heroku will take care of the rest.
As soon as our code is received by GitHub, it will trigger a new automatic deploy, and the production server will be restarted immediately, without our involvement.

### Setting up continuous deployment on Heroku

We first need to sign up for an Heroku account and log in.
In our Heroku dashboard, at the top, we click the button to create a new app.

![Heroku new app](https://dev-to-uploads.s3.amazonaws.com/i/g2hp9dn4nguojeyqj3iy.png)

Next we give our app a unique name (names need to be unique across the Heroku platform), and when the application is created we go to the Deploy tab.

Under `Deployment method`, we select GitHub. If it's the first time we select this option it will prompt prompt us for permission to connect to our GitHub account.

![Heroku deployment method](https://dev-to-uploads.s3.amazonaws.com/i/42uv8gvq9w8xtx3tgdxm.png)

Once the GitHub account is connected, we need to pick the repository for the application.

Since our repository may have different branches, Heroku will also ask which branch to connect, under `Automatic Deploy`.

It's convenient to be able to choose the branch to deploy since often we may have different different versions of our application, like development, staging, or production, on different branches.

Once we have chosen the branch, we select `Enable Automatic Deploys`.
From now on, when we push to GitHub, Heroku will perform an automatic deploy.

These steps set up the automatic deploy for us, but automatic deploy will be triggered only when we push new code to GitHub.
So, the very first time we set up a new application, we should make a manual deploy, which can be done in the `Manual Deploy `section in the Heroku dashboard.

---

*I write daily about web development. If you like this article, feel free to share it with your friends and colleagues.*

*You can receive articles like this in your inbox by [subscribing to my newsletter](https://cesare.substack.com).*
How I claimed lost disk space due to unused Docker images
Tags: docker, beginners, productivity
Published: 2020-01-30 18:50:28

I started using Docker recently at work. I had to build lot of docker images for my Rails app. After few days, on one fine morning I was building a brand new docker image and my laptop just froze.

![Nothing was working](https://media.giphy.com/media/5Zesu5VPNGJlm/giphy.gif)

On inspecting the disk size, I noticed that Docker was eating almost 90% of disk space. Fortunately, we can clear the unused space used by Docker very easily.

### Find out unused Docker images

Unused Docker images are basically not connected to any of the tagged Docker images. We tag every Docker image to **latest** tag and push it to Docker Hub. So if we build two images back to back, the **latest** tag is applied to the most recent one and the older image becomes untagged.
Such unlinked images just consume space and are of no use. 

In Docker parlance, such images are called **dangling** images.

We can find out such images by running this command.

```sh
docker images -f "dangling=true" -q
```

### Remove dangling Docker images

Once we find them, just destroy them without a second thought.

![Destroy dangling Docker images](https://media.giphy.com/media/XvQXEi09zfmcE/giphy.gif)

```sh
docker rmi -f $(docker images -f "dangling=true" -q)
```


In my experience, just doing this reclaimed most of the wasted disk space. But if you are still facing issues, you can list all the docker images and then selectively delete them.

![Sometimes you have to do even more](https://media.giphy.com/media/5nsiFjdgylfK3csZ5T/giphy.gif)

```sh
docker images
docker rmi <id>
```

Following this trick, I was able to rescue my laptop and use it normally with peace.
Which Post Title Would You Click On?
Tags: discuss
Published: 2020-01-30 18:47:51

There are hundreds of posts online that cover, give or take, the same thing. Some of those posts will get hundreds/thousands of views/likes/shares and others will get a few views and maybe a couple of likes. Is this because of the title and the click-bait culture that seems to have taken over the internet?

The three titles below will cover the same thing, array methods in JavaScript. The content will be, by and large, identical. But, being honest with yourself, which one are you most likely to click on based on the title alone. Is it close, or would one win hands down? What are your thoughts, do posts depend on the title or can a great post with a mediocre/simple title do well?

a) Array Methods in JavaScript Explained
b) 10 Array Methods You MUST know in JavaScript
c) 10 Must-Know JavaScript Array Methods in 2020
Take advantage of real-time notifications to automate application monitoring
Tags: php, laravel, productivity
Published: 2020-01-30 18:26:20

Hi, I’m Valerio software engineer and CTO at [Inspector](https://www.inspector.dev) .

As notifications becomes increasingly central to the way that our users stay informed about how their applications are performing, we have recently introduced Notification Channels.

My early work with small businesses showed me first-hand how hard it was for software agencies and developers to understand or avoid system crashes in their backend as they scaled — and how desperately the market needed a solution that was accessible to businesses of all sizes.

Small businesses and creators have a strong connection with their customers and tend to deliver great software, but sometimes it gets harder to maintain the practices that made them successful as the team grow with two or more developers, or if the number of projects increase.

Software development is a time consuming job, tools that can bring automation in our life are really valuable in small and medium companies.

## What are Notification Channels?
In a nutshell, Notification Channels are a new, unified way to organize and manage messages sent through Inspector to you and your team members.

## How do Notification Channels works?
Channels separate the notifications that Inspector sends into different routes, allowing users to have more control over the messaging experience. They are created and named by each service that want to send notifications to users who are part of your organization.

However, you will also have the option of activating multiple channels for different purposes — for instance, one channel for new error detected, another for every error occurrences, and a third for server side automation.
Actually we support three channels (Email, Webhook, Slack), more will be added in the next months.

![](https://miro.medium.com/max/1250/1*lMY0J2L1nwb2MVVgsg4MRg.png)

## Why Were Notification Channels Created?
This move is very much in keeping with our ongoing focus to build an autonomous monitoring tool that can bring more free time in our users' hands.
Notification Channels can be a powerful way to reach developers with urgent messages about application status and availability reducing the negative impact of software issues on application users.

## Thank you for your support
Thank you so much for reading it, if you want know more about Inspector come on our website https://www.inspector.dev . Don’t hesitate to share your thoughts on the comment below or drop in live chat! Let’s make it together.

- Homepage: [https://www.inspector.dev](https://www.inspector.dev)
- Facebook: [https://www.facebook.com/inspector.realtime/](https://www.facebook.com/inspector.realtime/)
- Twitter: [@inspector_rt](https://twitter.com/Inspector_rt)
- Contact me: [valerio@inspector.dev](https://www.inspector.dev)
Passed AWS Cloud Practitioner, preparing for AWS SAA ♥
Tags: aws, career, cpp, certification
Published: 2020-01-30 18:24:36

Hi Everyone,

I recently passed my AWS Certified Cloud Practitioner with 874.

**Resources**:

♥ [ExamPro CCP course](https://youtu.be/3hLmDS179YE) on YT (freecodecamp) by Andrew Brown
👍[AWS CCP at Linux Academy](https://acloudguru.com) by Tia Williams
👍Practice Test from the AWS CCP at Linux Academy


**Time**:

🕐 It took me 9 days to prepare for the exam.


**Tips**...
✅ Write down (not type) your notes
✅ Read those White papers!
✅ Do practice tests and quizzes for the separate sections daily

This material was enough to pass, explanations are really good by Andrew and the Practice Tests were quite good to test that knowledge. Some questions were similar to the ones in the practice tests.


🤞Preparing for the AWS Solutions Architect Associate now, by the way here is another free course that I found on freecodecamp! [AWS SAA by ExamPro](https://youtu.be/Ia-UEYYR44s).

❤Also, feel free to join the discord server [AWSCertified](https://discord.gg/4JevXU), lets learn together!
The challenges I faced and solutions of my remote work journey so far
Published: 2020-01-30 18:17:00

when I started the rollup phase in Andela, I was excited to learn. in the first first week we used to go to the office which is in around 25 km from where I live. It was difficult for me. I used to take bike two times and 2 buses and took me 2 hours taking into consideration the traffic jam and lines before you take bus. 

After session, It used to take me another 1h30 to get home, getting there tired and start working late. I would have to work for few hours because I had to wake up early so I had to sleep earlier. After one week, we started working remotely, I was overwhelmed, I did not have to wake up too early so I could work till late, I could work in a familiar environment where I am comfortable. But remember home is home, sometimes you meet challenges. 
The first challenge I met was high number of distractions; visitors who came home and they will call me to greet them, mum who call me to help her with some small chores, my brother coming and wanting to discuss, my siblings coming to visit with their children and its hard to keep a child away when I was working. How I resolved this I had a conversation with all of them about how this is important that they should take it as if I was not home. 
the second challenge was feeling isolated when things are not working as expected because you are alone, and feel like giving up. I resolved this by increasing communication with my friends from roll up and the ttl, asking questions, discussing ideas.
the third challenge was communication. first my internet was slow which affected my communication with ttl because no one wants to have a long conversation on cutting connection, keeping repeating " I can't hear you", it was discouraging. to solve this I changed the internet service provider company.
Docker vs Kubernetes vs Docker Swarm 🙅🏼‍♀️
Tags: docker, kubernetes, devops, beginners
Published: 2020-01-30 17:36:25

It seems that Docker and Kubernetes are competing technologies. But in fact, they actually complement one another to get the best out of both. 

![Docker vs Kubernetes](https://static.wixstatic.com/media/e7182f_e731e6cc034f4c8a99eb0c443eeca739~mv2.png "Docker vs Kubernetes")


In the video I show them both in the software development process and explain the differences.

![Software development process with Docker and Kubernetes](http://static.wixstatic.com/media/e7182f_fcdad6de44824ac8ab3781414f239ff2~mv2.png "Software development process with Docker and Kubernetes")


In contrast, Docker Swarm is the comparable technology to Kubernetes, which I compare in the video.


{% youtube 9_s3h_GVzZc %}

-----------------

You can follow me on [Twitter](https://twitter.com/Njuchi_) and [YouTube](https://www.youtube.com/channel/UCdngmbVKX1Tgre699-XLlUA?sub_confirmation=1).
Face Recognising Node Server
Tags: node, tensorflow, express, faceapi
Published: 2020-01-30 17:08:24

---
title:  Face Recognising Node Server
tags: #nodejs, #tensorflow, #express, #face-api
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/03j4altgvdxet8tjw9fc.PNG
published: true
---

<h1 align="center">A web server that recognises you if you are registered in the system 🔥🔥🔥</h1>

<a href="https://github.com/spoman007/face-login-website" target="_blank">Click Here</a> for github repository!!

## What is this and who is it for 🤷‍♀️
- This is a node and express based web server. It uses face api js to detect and recognise the face from the web cam feed.
If the person is registred in the system the server will recognise the face and a welcome message will be displayed. 😃 
- This is for developers who want to play around with Machine Learning but does not know python or confused about where to start (Like Me 😜😜 )


## Technologies used
![Tech logos](https://dev-to-uploads.s3.amazonaws.com/i/af1igdieedv4mhyh1ptl.png)

- <a href="https://github.com/justadudewhohacks/face-api.js/">Face Api Js</a> JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
- <a href="https://www.tensorflow.org/js">TensorFlow.js</a> Library for machine learning in JavaScript
- Express js to create a node server
- Jquery, HTML and CSS for web page

## Running on local machine 💻💻
- `npm install` To install dependencies
- `npm start` To run the server

## Credit 🤝🤝🤝
- <a href="https://codepen.io/coinoperatedgoi/pen/VrVbvX">Terminator scanning theme!!! 🆒</a>
- <a href="https://github.com/WebDevSimplified">WebDevSimplified</a>

### Author: Sandeep Poman ✍️

### License

[MIT](https://opensource.org/licenses/MIT)