Author: Nic Raboy
Getting Familiar With Loops In C++
In this back to the basics tutorial, we're going to be exploring loops in C++, something that you'll take with you well into your software development career, regardless of programming language. The content in this tutorial is targeted at new developers or those that would like to start learning C++.
So when might you want to use a loop? If you need to perform a repetitive task of any kind, a loop is probably going to be want you want to use.
In this tutorial we're going to explore for loops, while loops, and do-while loops using the C++ programming language.
TPDP Episode #26: Game Development With Houdini
The latest episode of The Polyglot Developer Podcast has been published and it is the first one on the show to be on the topic of game development!
In episode twenty-six titled, Game Development with Houdini, I'm joined by Ben Mears from SideFX, the company that is responsible for Houdini.
In case this is your first time hearing of Houdini, it is a system that allows you to create procedural, node-based workflows, for generating game assets and terrains. Houdini is used in many of the top rated games and significantly reduces parts of the game development time.
Read MoreConfigure Visual Studio Code For C++ Development
I mentioned a few months ago that I was going to periodically go back to the basics when it comes to computer programming and application development. Building a Hello World Example C++ Application was a first example of what I was talking about. However, in this previous example, much of our work was done in a basic text editor, then compiled and ran with a Command Prompt or Terminal. It works, but it isn't the most elegant.
In this tutorial we're going to see how to configure a more modern IDE for C++ development. Visual Studio Code (VSC) actually has really nice support for C++, so we're going to see how to configure it.
Read MoreService Workers With Workbox In A Hugo Static Generated Site
As you know, The Polyglot Developer is a static generated website that is built with Hugo. Given the nature of static generated websites, they are generally much faster than the CMS alternatives, but just because they're fast, doesn't mean they pass all of Google's tests by default.
In an ongoing effort to try to satisfy Google PageSpeed Insights and Lighthouse when it comes to search engine optimization (SEO) and other best practices, I was lead to the progressive web application (PWA) test. There are many factors that determine if something is a PWA, but one of those resides in the use of service workers. In case you're unfamiliar, service workers accomplish many things, with the most common of those things being caching.
Implementing service workers in an application is not necessarily the most complicated task, but as your applications evolve, things might become more chaotic. This is where Workbox comes in. With Workbox, you can use very clean APIs to pre-cache your static site resources as well as cache resources at runtime. We're going to see how to use Workbox to implement service workers for caching Hugo content and other resources such as images, fonts, and scripts.
Read MoreValidating Data Structures And Variables In Golang
When working with Go or any programming language for that matter, there is almost aways a need to validate the data that the user provides before you start working with it or storing it in a database. A sloppy way to validate data would be to use a series of if/else conditions, switch statements, and a bunch of regular expressions, but there are better ways to get the job done without having a disaster of a codebase in terms of maintainability.
We're going to see how to use the validator.v9 package in Golang to validate native Go data structures, their fields, and any variables that don't quite fit in.
Read MoreTrack Element Viewability With JavaScript Or Google Tag Manager
As you might know, sponsored advertisements are one of the things that are funding The Polyglot Developer and everything it accomplishes, so keeping sponsors happy and supplying them the metrics they need is very important. However, in most circumstances, more specifically when it comes to banner creatives, page views is not enough. For example if your sponsors or potential sponsors asked how many impressions each of your advertisement zones gets, you can't just list off the page views that those particular pages get because how do you know if the user actually saw the advertisement?
I've heard a few names when it comes to element impressions. Some call it element or image visibility, and some call it viewability. It doesn't really matter as they are both trying to determine if the user has actually seen the image or element on their screen.
In this tutorial we're going to take a look at tracking if users have seen a particular image or set of images using simple JavaScript as well as an alternative method that links directly with Google Analytics (GA) called Google Tag Manager (GTM).
Read MoreTwo-Factor Authentication With TOTP Using Node.js And Speakeasy
Almost two years ago I had written a tutorial around 2FA in a Node.js API with time-based one-time passwords. If you're unfamiliar, two-factor authentication is becoming the norm, which it wasn't necessarily back in 2017. If you're managing user accounts in your web applications, it is critical that you offer your users a second factor of authentication to prevent phishing and malicious login attempts.
While the previous tutorial is still valid, it uses a less popular library to accomplish the task. This time around we're going to explore using a more popular library called Speakeasy to manage two-factor authentication (2FA) within our Node.js with Express.js application.
Read More