-
Wait X milliseconds in JavaScript
Read moreIn many programming languages, such as C, Python, and Java, there exist functions that allow you to postpone execution of code for a specified number of seconds or milliseconds. These functions usually go by names such as sleep(). Unfortunately, in JavaScript, there is no built-in function that can do this. Luckily, by making use of […]
-
Verify a user’s age with HTML and JavaScript
Read moreTo sign up to many websites, you must meet a certain age requirement. To acquire a Google account, for example, you must be at least 13 years old. In the case you enter a birthdate that indicates you do not meet the age requirement for Google, you will be informed that you do not meet the requirement and Google will refuse to continue with registration. Some other websites such as Twitter are more relaxed. While requiring its users to be at least 13, Twitter does not ask you for your birthdate. So in theory a 12 year old could sign up on Twitter and use it, so long as they do not declare anywhere that they are not at least 13. Nevertheless, checking someone’s birthday is a good way of ensuring they meet the age requirement. While a user can lie about their birthday, it’s a good first step to ensuring your website or app is compliant with privacy laws.
-
Simple calculator program with HTML and JavaScript
Read moreIn this article, I will be walking through how to write a simple calculator with HTML and JavaScript. This calculator will take two numbers and allow the user to choose from four buttons (add, subtract, multiply, and divide) on what they would like to do with them. The answer is given via a popup box.
-
Writing a dice game in C Part 1 — The Game
Read moreWhen trying to learn a programming language, writing a basic game can really help you understand the language in depth. Writing a game requires user interaction, so it can be a great way to familiarise yourself with acquiring input and working with it. Additionally, it can improve your understanding of programming concepts such as iteration and selection, which are often used to improve the user experience.
-
How to convert denary to binary in C
Read moreA binary number is a number that represents information or data stored in a computer with a combination of 0s and 1s. Denary is the standard number system which uses 10 digits (0-9) to represent all numbers.
-
How to validate a password in C
Read moreMost websites and apps that have the option to sign up have some sort of password validation. If a website requires your password is more than 8 characters, for example, that is validation. If a website requires you use numbers in your password, that is validation. If a website wants a mixture of capital and lowercase letters in your password, that is validation.
-
The importance of ensuring your code is well-maintainable
Read moreThere may come a point where you find some code. Maybe you’re working on your own project but can’t quite figure out how to implement something, so you search it up online. Or maybe you’ve found an abandoned project on a code-sharing platform like GitHub that you want to “reboot” and improve so it works as if it were brand new. I can assure you one thing you’ll hate either way is poorly-maintained code.
-
IronPass — A password manager that doesn’t store your passwords
Read moreThe password manager is a useful piece of software. If you’re like me and into using passwords no one could easily guess, a password manager can be an easy way to store your hard-to-remember passwords behind a “master password”, a password that you will be able to remember yet others would not easily be able to figure out. Unfortunately, password managers have flaws. One such flaw is that they store your passwords on your computer. Some do not even ask for a password to access your passwords, such as the built-in ones in web browsers such as Google Chrome and Mozilla Firefox. This means that you are advised not to save your passwords when using a public computer.
-
Tower of Hanoi in Python
Read moreThe Tower of Hanoi is a mathematical game with 3 rods and a number of disks ranging from 3 to 8. The goal is to transfer all the disks from rod 1 to rod 3. You can only move one disk at a time, and you cannot place a larger disk on top of a smaller one.