Jing Zhang

Jing Zhang

1588867800

JAMstack with Prismic and Gridsome. Score 100% on Google Page speed!

Ever wanted to know how you can use Prismic and Gridsome to make an awesome, super fast, JAMstack website? This is your chance! In this 30 minute video I give you an overview of both Prismic and Gridsome and we dive into the code to see how it all connects.

I could spend hours on going through the specifics on how to build a proper website. I might do that in a different video series, stay tuned! For now enjoy this more general overview of the tools and it should be enough to get you going!

Read more about this project on the blog: https://timbenniks.nl/writings/a-new-website/
The project is open source: https://github.com/timbenniks/timbenniks2020/

#jamstack #gridsome #prismic #javascript #web-development

What is GEEK

Buddha Community

JAMstack with Prismic and Gridsome. Score 100% on Google Page speed!
Jing Zhang

Jing Zhang

1588867800

JAMstack with Prismic and Gridsome. Score 100% on Google Page speed!

Ever wanted to know how you can use Prismic and Gridsome to make an awesome, super fast, JAMstack website? This is your chance! In this 30 minute video I give you an overview of both Prismic and Gridsome and we dive into the code to see how it all connects.

I could spend hours on going through the specifics on how to build a proper website. I might do that in a different video series, stay tuned! For now enjoy this more general overview of the tools and it should be enough to get you going!

Read more about this project on the blog: https://timbenniks.nl/writings/a-new-website/
The project is open source: https://github.com/timbenniks/timbenniks2020/

#jamstack #gridsome #prismic #javascript #web-development

Jon  Gislason

Jon Gislason

1619247660

Google's TPU's being primed for the Quantum Jump

The liquid-cooled Tensor Processing Units, built to slot into server racks, can deliver up to 100 petaflops of compute.

The liquid-cooled Tensor Processing Units, built to slot into server racks, can deliver up to 100 petaflops of compute.

As the world is gearing towards more automation and AI, the need for quantum computing has also grown exponentially. Quantum computing lies at the intersection of quantum physics and high-end computer technology, and in more than one way, hold the key to our AI-driven future.

Quantum computing requires state-of-the-art tools to perform high-end computing. This is where TPUs come in handy. TPUs or Tensor Processing Units are custom-built ASICs (Application Specific Integrated Circuits) to execute machine learning tasks efficiently. TPUs are specific hardware developed by Google for neural network machine learning, specially customised to Google’s Machine Learning software, Tensorflow.

The liquid-cooled Tensor Processing units, built to slot into server racks, can deliver up to 100 petaflops of compute. It powers Google products like Google Search, Gmail, Google Photos and Google Cloud AI APIs.

#opinions #alphabet #asics #floq #google #google alphabet #google quantum computing #google tensorflow #google tensorflow quantum #google tpu #google tpus #machine learning #quantum computer #quantum computing #quantum computing programming #quantum leap #sandbox #secret development #tensorflow #tpu #tpus

What Are Google Compute Engine ? - Explained

What Are Google Compute Engine ? - Explained

The Google computer engine exchanges a large number of scalable virtual machines to serve as clusters used for that purpose. GCE can be managed through a RESTful API, command line interface, or web console. The computing engine is serviced for a minimum of 10-minutes per use. There is no up or front fee or time commitment. GCE competes with Amazon’s Elastic Compute Cloud (EC2) and Microsoft Azure.

https://www.mrdeluofficial.com/2020/08/what-are-google-compute-engine-explained.html

#google compute engine #google compute engine tutorial #google app engine #google cloud console #google cloud storage #google compute engine documentation

Embedding your <image> in google colab <markdown>

This article is a quick guide to help you embed images in google colab markdown without mounting your google drive!

Image for post

Just a quick intro to google colab

Google colab is a cloud service that offers FREE python notebook environments to developers and learners, along with FREE GPU and TPU. Users can write and execute Python code in the browser itself without any pre-configuration. It offers two types of cells: text and code. The ‘code’ cells act like code editor, coding and execution in done this block. The ‘text’ cells are used to embed textual description/explanation along with code, it is formatted using a simple markup language called ‘markdown’.

Embedding Images in markdown

If you are a regular colab user, like me, using markdown to add additional details to your code will be your habit too! While working on colab, I tried to embed images along with text in markdown, but it took me almost an hour to figure out the way to do it. So here is an easy guide that will help you.

STEP 1:

The first step is to get the image into your google drive. So upload all the images you want to embed in markdown in your google drive.

Image for post

Step 2:

Google Drive gives you the option to share the image via a sharable link. Right-click your image and you will find an option to get a sharable link.

Image for post

On selecting ‘Get shareable link’, Google will create and display sharable link for the particular image.

#google-cloud-platform #google-collaboratory #google-colaboratory #google-cloud #google-colab #cloud

Improving google page-speed score using code-splitting

Have you ever wondered, why your app is loading slowly? or Why google page speeds score is very low even after you followed the web standards properly? [Disclaimer they do have extremely clear reports for the reasons].

I faced a similar issue while working on https://ecologi.com where even after following proper web standards our site was scoring poorly mere 22. So I started looking into the google page speeds reports and found that our Time To Load First Byte [TTFB] is extremely poor and one of the major areas to be improved.

NOTE: If you check the scores for ecologi now, they might not be good as lots of devops changes have been made recently.

I got to know about this awesome technique called _Code-splitting _- This feature allows you to split your code into various bundles which can then be loaded on-demand or in parallel [ webpack official docs ]. In other simple words, you get more fine control over the files which you want to serve and which you don’t.

Image for post


Code splitting types

Now there are 2 techniques to do code-splitting:-

1. At component level: To split your component’s code into multiple bundles. Sometimes your entire page/view’s code is quite big and complex to be delivered in 1 big chunk so you could cut it short into multiple bundles.

Though using this technique is a bit risky in itself as we have to take care of the number of network requests we are making to fetch bundles. So there needs to be a balance.

2. At Route level: To split your entire bundle into multiple small bundles based on the routes. This is generally a common optimization technique followed. But depending upon the needs you could use both as well.

Route level splitting using react-navi

Let’s see how to achieve the route level splitting. At ecologi, luckily we were using react-navi, which has inherent support to do this on route level. I am pretty sure that other popular router libraries also do have it. All the details I am about to share are _react-navi _specific but bear with me as it will be helpful to understand the core idea behind it, so you can use it for other libraries/your own custom routing solutions as well.

Before code-splitting — super slow loading speeds :(

So adding it in react-navi is very simple in fact. All you have to do is dynamically import your module and wrap it within lazy call as shown in the example.

Image for post

React navi - official example

But just a slight catch here, lazy returns a matcher object. In nutshell, a matcher is an object that creates a bridge between routes and the content/view/data, etc.

#javascript #react-navi #code-splitting #reactjs #google-page-speed #react