Lua Math Library

This section is more of a reference to how to use the math library in Lua. We aren’t going to go too into depth for each function. The math library can be divided up into several different classes of functions. We have rounding, trigonometrical, etc.

Math Constants

ConstantDescription
math.hugeInfinity
math.maxintegerThe biggest integer
math.minintegerThe smallest integer
math.piA constant for Pi

Math Functions

Conversion and Rounding

FunctionDescription
math.abs(
Read the rest

A Introduction to the OSI Model

The Open Systems Interconnection Model or OSI Model is an ISO (International Organization of Standards) conceptual model to standardize the communications of systems. It aims to remain agnostic to the underlying architecture or technology as much as possible. OSI can be viewed as an abstraction of networking from the physical layer all the way up to the end user application. Many networking and system administration certifications reference, or at least build off of, the OSI Model since it provides a way to approach networking which is clear and concise without focusing on the actual technology being used.… Read the rest

Improving Code Documentation

The debate between whether to use comments or to write self-documenting code has raged on for ages. Both approaches are equally valid, but each has its own advantages and disadvantages depending on the circumstances. Comments can be as much of a hindrance as a help in the wrong conditions, and self-documenting code can be opaque and unwieldy in others.

Self-documenting code tends to be quicker, but comments add clarity for usage and intention.… Read the rest

Project Engineering: The Basics of Planning A Project

Starting a new project can be nerve-wracking. You have to account for what the project is, who has to do what, what the timeline looks like, and how to make it all a reality. It doesn’t stop there, you also have to account for changes in scope, bugs, things not working as expected, budget changes, and more. The entire process can be insane even with a plan.… Read the rest

The Basics of Big O Notation

Big O notation expresses how an algorithm grows relative to the input and extrapolates the input out to something arbitrarily large or even infinity. This gives us how long an algorithm takes to run in best case and worst case scenarios.

This isn’t going to tell us exactly how long it takes to run an algorithm (for reasons we’ll get into in a bit), but gives a way to rank and compare algorithms as a whole, and gives you a scale of how big it will be.… Read the rest

Expanding Lua Functions

This article is an extension of our previous article on functions. We’re going to learn a few new tricks and see how they can be applied. It also will expand on classes just a little bit.

We’re going to cover passing a variable number of arguments to a function, and how to use functions as variables. Lua has a special construction for passing an arbitrary number of functions without using a table as: an array or a hash table (both are technically tables).… Read the rest