Category: Tech and IT

Github Copilot hyped IntelliSense or revolutionary pair programming

Somewhat of a month back I applied for GitHub copilot access, out of curiosity and I am using it since I got access around 11 June 2021. To apply for access you basically submit an application form, and after it’s reviewed you get an invite to a private GitHub repo, once you have access to that repo you can use copilot by using the VS extension and authenticate with the Github account that has access to that repo, be sure to change fast the issues watching level because it’s set to all and that will basically flood your email address with thousands of emails since it’s a very popular repo. View full article

AMP was pretty much axed

After a dreaded existence, AMP probably will fade away after June 2021, if I were to predict I’ll say it will stick around for a couple of years but its usage will decrease dramatically, and that because Google will not treat AMP preferentially anymore. That’s mostly because the new June update of the Google search engine will take into account the performance of every website and since AMP was made in order to create lightweight websites.

I never really hated AMP, though from what I’ve seen on Reddit mostly AMP was one of the most hated technologies and it was a bit funny to see so many complain, personally I even contributed to AMP source to the worker-dom / amp-script, added the scrollIntoView, and I also have in the pipeline the refactored implementation for onbeforeunload, that maybe will get merged too when the maintainer will come back to the office. View full article

Load WP post with JS Fetch

If you want to load the post faster you can use JS to fetch your post, but on modern browsers probably preloading pages will be faster, the only drawback of preloading is that you’ll consume storage for your visitors even if they don’t visit the preloaded links, also with preloading links you will consume more bandwidth and resources on the server-side.

So if you want to stick with fetching with JS here is an example, but first, as a note, the example will not use the default REST API mostly because the default API only returns the content title and other attributes of the post and, we want to add things like Yoast data(without making two API request) also, in this case, will transfer some of the article template surrounding the content. View full article

Don’t include external JS for custom content example Goodreads

On many websites, you can have content embedded from other sites and one way that most external sites will offer will be to include a script that’s hosted on their website.

But if all that script does is including some remote content there are better ways to get that, that will provide customizations and performance.

For example, the website Goodreads offers such an embed JS with a list of the latest books you read, and you must include the script where you want the content to be shown. But that has a long list of drawbacks: the script uses the old API document.write, is a script and can’t be loaded in AMP, the scripts write very old style HTML with tags like center, attributes like border which again is not valid AMP, then also that script will be loaded for every request, so you’ll have one additional request. View full article