Mafia Games Monday (MGM) – Game Security
For those of you new to programming (as well as those who are not), you should be made aware that security is a vital component to a game to ensure its success. Why is this the case you ask? Well, we just have to remember the golden rule of security: never trust a user’s input.
Yes, that means EVERY user!
You never know what kind of text a user will put in, so you really have to be aware of this problem. As a game owner, you no doubt have to account for the user’s input; otherwise, who knows what will happen to your website!
There are many other things you have to look out for, like SQL injection, JavaScript injection, and many other security problems. With all of these different things spinning around in your head, you’re ready to tear your hair out, right?
Well, don’t you worry, there are some things that you can do in order to ensure that your game doesn’t get compromised! Here are a few:
- Make sure input is of the correct datatype – Very simple and the easiest way to ensure your game’s security. So, for example, if you want them to input a number, make sure that what they put in is in fact a number! You can do this in PHP with ctype_digit().
- Make sure input does not contain any SQL text – Again, something that certainly has to be done! In PHP, you can use mysqli_real_escape_string() (as mysql_real_escape_string() is deprecated!).
- Make sure input falls under any specific guidelines you set – This basically means that if for example, you want a number greater than zero, that you ensure that the number is greater than zero! It is something that can be easily checked, but if you fail to do this, it could break your code and cause major headaches. That would be bad news!
This all sounds very simple (and it is), but ignoring these validation checks can really change a game that would be fantastic into a game of misery and emptiness.
I will be talking in more details about this in a later blog post, so stay tuned!
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Bedridden Yet See The World
So on this snowy Thursday (at least it is here haha), we may get stuck at home sometimes, not really able to do a whole lot. Whether that is because of weather or because of a medical circumstance (like being bedridden), there are plenty of reasons why something like this can happen. Maybe even because you’re just simply too lazy.
Well, for those who cannot get out of the house (for reasons beyond their control – no, being lazy is not one of those reasons!), there is some new technology that will allow someone to be able to see the world! Pretty amazing, isn’t it?
Anyways, it is called Beam. It looks like the picture below:
Kinda looks like something we have seen before though, doesn’t it…?
Anyways, this is something that could really change the world for many people who are stuck at home for one reason or another. Below is the official Beam website if you are curious as to exactly what all it does:
: https://www.suitabletech.com/beam/
Do you think this is beneficial or harmful?
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Mafia Games Monday (MGM) – Spring Break Approaches…
Hello all!
So, for those of you who are in college in the USA, it is getting close to that time of spring break. What plans do you have for spring break? Well, for me, I will be working, but hey, that’s the life of a programmer haha.
At any rate, during spring break (or any kind of break for that matter), we all decide to not really do much, which could be a good or bad thing depending upon how you manage your time. It’s a fantastic opportunity to procrastinate, which if you have any kind of deadlines for projects, then that is a big problem! That can lead to things like rushing to get done, which is what I’ve talked about in several of my previous blog posts. Rushing around to get stuff done, especially programming something, can lead to a lot of bugs and other problems! Simply don’t do that people!
I’ve personally had an experience with someone who decided to rush to get stuff done not too long ago. Their programming work was adequate at best, no attention to design, and there were many bugs, most of which I had to fix because of his “lack of time” to do anything else! They did not get any form of payment based off of the sale because of these issues, which if you do not take your time to program things with care, that may happen to you as well. So slow down, take a deep breath, and make sure you program your features right because otherwise, you might not only see a lack of payment (if you are a freelancer), but you may also lose your reputation as a programmer or an owner, which is something that takes a long time to get back!
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Social Media – Friend or Foe?
Hi all!
Social Media can be great..but can it also ruin some great opportunities? For most of you, I’m sure you know the answer to this one already…yes, yes it can! If you are irresponsible on social media, which EVERYONE can see, it may impact your love life, your career, and even your criminal record.
The New York times recently posted an article about some of these cases:
: http://www.nytimes.com/2015/02/15/magazine/how-one-stupid-tweet-ruined-justine-saccos-life.html?_r=0
Those are the extreme cases of course, but there are many others whom you have never heard of that have had their marriages turn into divorces over social media, which of course may have been caused by other underlying issues, but still.
The point of the matter is: be careful what you post on social media because you never know who is seeing your Facebook, Twitter, or Instagram. They may be a potential employer, and if they see you in a bunch of drunk pictures and arrogant tweets or posts, that will lead you to not getting that job of your dreams.
There are many sources that consider stepping back for a second to think about what you’re going to post, and I agree with that concept. Here are a few articles with those tips:
: http://www.relevantmagazine.com/culture/tech/5-questions-ask-posting-social-media
: http://www.thegospelcoalition.org/blogs/kevindeyoung/2014/06/10/think-before-you-post/
What are your thoughts on social media?
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Mafia Games Tuesday? – Designs
Happy Tuesday all!
Yes, I’m fully aware it is Tuesday instead of Monday like usual, but a combination of writer’s block plus being sick did not really help me create this blog post this week.
Anyways, why are some text-based games very popular? Is it for their functionality? Well, of course functionality plays a role, but what else do these games have? Great designs!
That’s right, they look good! It seems pretty obvious, doesn’t it? Yet, why are some designs look like they were made in the 90s? Does that make sense to you?
Here’s an example of a lovely 90s design:

Blocky, a little difficult to read, not much color contrast…this is what things looked like in the 90s. I’ve seen some games that look just like this, yet the owners are expecting to make a lot of money off of it! How? With the advances of technology that we have now, this is no longer deemed as appealing.
A modern design has the following qualities:
- Great color contrast
- Sleek formatting – not blocky
- Colorful images and text
Usually these designs take quite a while to create, which is perfectly fine! Take your time with creating a design that will really “wow” your users because the last thing that they would want is something that is just appalling and turns them away from your game.
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Mafia Games Monday (MGM) – Parent/Child Classes
Happy Monday all!
A little while back, I introduced an object oriented programming (OOP) structure known as a class. If you did not read that post or do not know what a class is, check that post out here.
So, what else can you do with classes? They’re pretty nice to have, but don’t they feel just a little bit limited? If you have a generic person class, what if you want to create a class specifically for a farmer? Or maybe an athlete? You would have to create two distinct classes, one for person and one for a farmer. The farmer class will have all of the properties of the person class because a farmer is a person, right? Yes, although some of you may think that a farmer is very “different”, a farmer IS a person!
See, a farmer is a person! Anyways…
To just show an example of what that would look like, I’ll be using the person class from a previous post:
class Person
{
public $sex;
public $hand;
public $hstyle;
public function _construct($mf)
{
$sex = $mf;
$hand = "right";
$hstyle = "straight";
}
}
And then here’s the farmer class:
class Farmer
{
public $sex;
public $hand;
public $hstyle;
public $numcows; // NEW - number of cows
public $numtractors; // NEW - number of tractors
public $numland; // NEW - number of acres of land
public function _construct($mf)
{
$sex = $mf;
$hand = "right";
$hstyle = "straight";
$numcows = 0;
$numtractors = 0;
$numland = 0;
}
}
The variables that I added I noted above next to comments.
Anyways, that just seems like a pain doesn’t it? Don’t you remember the OOP concept of “Don’t Repeat Yourself” (DRY)? (If you don’t, check out my last post here). You’re not supposed to do that in OOP! It’s just WRONG!
Well, good news! There is a way to follow DRY while also having classes like this. This is called inheritence. See, there is a parent/child relationship here (in programming terms all!). The person class is the “parent”, and the farmer class is the “child”. Why is that the case? Well, the farmer class has all of the same properties of the person class, but also has its own properties (or variables) to more uniquely identify itself.
Pretty neat, isn’t it? But, how does that look like in code?

Well, in PHP and other languages that utilize OOP (including Java), they utilize the extends keyword. What does that mean? Well, the farmer class will “extend” the person class, which will allow the farmer class to utilize the base properties of the person class while also having its own. How does this look in code? Here is the person class again:
class Person
{
public $sex;
public $hand;
public $hstyle;
public function _construct($mf)
{
$sex = $mf;
$hand = "right";
$hstyle = "straight";
}
}
And below is the new and improved farmer class:
class Farmer extends Person
{
public $numcows; // NEW - number of cows
public $numtractors; // NEW - number of tractors
public $numland; // NEW - number of acres of land
public function _construct($mf)
{
parent::_construct($mf);
$numcows = 0;
$numtractors = 0;
$numland = 0;
}
}
Whoa, what is that parent::_construct() doing? Well, that is calling the constructor of the parent class, which is Person. That is the main rule of using child classes: the parent class must be constructed before the child class can be used. So, to ensure that the parent class does exist, its constructor is called to construct and set its properties.
Classes are a very useful tool when you know what you are doing with them. What classes have you written? Have you used a child class before?
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Mafia Games Monday (MGM) – Maximize Game Development Efficiency
Hello all!
So for many game owners, you also dabble in the development of your game one way or another. Whether you are involved in the ideas, design, or the actual code, there is still something very important with development that can help you maximize your development time.
A while back, in one of my blog posts (check here to read the blog post) I introduced the term adaptive management. Adaptive Management is basically to provide solutions to problems that will work into the future rather than just for an immediate problem. So how does this term relate to development you ask?

Well, this idea can also be applied to development! Development, you say? But this is a management term, so how would this apply?
In terms of development, you want to provide solutions to problems that will work throughout the future. That’s a big part of successful programming, which is that your solution covers many different scenarios as well as built for proper expansion. Many developers are caught in a mindset of providing a solution for an immediate problem or need, but fail to also account for potential scenarios that might occur in the future! This is something that I have noticed as a developer myself not only with mafia game developers, but with developers in industry too! That flexibility is just simply not there, which forces the developers to keep developing on the same solution over and over again to fix problems that if more flexible they would have not occurred.
Okay, so with that in mind, what can you do as a mafia game owner to assist with fixing this dilemma?
Well, here a few tips for you in order to counteract this problem:
- Write out the problem in detail – This sounds very simple, but you would be surprised at how little this is done! Simply writing out the problem in detail can show you exactly what is the problem and what the potential pitfalls may be that will have to be addressed in the given solution.
- Talk through the problem – Again, a rather simple tip, but very useful! Talk out the problem with the person experiencing the problem as well as others who will be assisting in the development of said solution. Make sure that those who are developing have a full understanding of what the problem is rather than “this is broken, fix it” kind of mindset.
- Go through all of the possible scenarios when testing – When testing the solution, go through ALL of the possible scenarios, even those that would be extremely unlikely. Testing all of the possible scenarios can really show where the holes may be in the developed solution so that those holes will not be there when the solution is live.
- Have someone outside of the development team test it – When you are part of the development team, you may not see all of the scenarios. This is something that is a mindset of a creator of anything really has, which is the inability to see all of the possible scenarios. Having someone else test it out could really show where the holes may be in the solution.
- Look for possible expansion – What expansion opportunity does this solution have? Will it provide the ability for easy expansion without having to re-do it all? If it would require a complete re-do to expand this solution, then this solution is probably not the solution you want for the problem.
There are of course many other things you can do in order to maximize game development efficiency, which I will discuss in a later blog post. What are your thoughts about the tips covered? Do you have any tips to share?
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Data Breaches – The New Norm?
Hello all!
Hearing about the latest data breach (Anthem) getting compromised, it really feels like the same wheel keeps spinning over and over in regards to some cyber attack compromising customer data. The ones you hear on the news are simply just the big ones. You don’t hear about the smaller companies having this problem, but nevertheless some of them do (just not as important as the bigger companies). These companies (shown below) are the few of the bigger companies who have been breached that have been shown in the news:


So really, what can be done in order to ensure your information is 100% secure? Well, let’s get the obvious out first: your information is never 100% secure. Pretty shocking, isn’t it? Well, it is the truth. The top cyber security experts in the world will tell you this fact. How is that possible you may ask? Well, it is because of the environment of cyber security. It is extremely difficult for cyber security experts to be proactive in regards to new attacks that are being created. In most cases, it is only possible for these very new attack methods to be reactions to information being compromised somehow through an unknown vulnerability. However, even with this daunting news, there are some things you can do to at least help:
- Strong passwords – This is probably something that will be discussed in more depth in a different blog post, but many hackers will just try to compromise your information the easy way, which is by getting through your username and password. So, to counteract this, just create a strong password (10+ characters, including numbers, uppercase, and symbols). Make it difficult for a hacker to easily get your information.
- Check credit card and bank statements – Keep an eye on your money! This is probably an obvious one, but you would be rather surprised at how many people just don’t look at their statements. It’s shocking to me for sure! So, just keep tabs on your money, and if you see something that looks off to you, contact the bank or the credit card company.
- Check your credit report – If your identity was in fact compromised, they will most likely be getting credit cards from your name or attempting to make a large purchase. Your credit report will note ALL of these things, so keep an eye on it (you really should anyways, though).


Sounds pretty simple, and it really is; however, getting your identity stolen is no laughing matter. Keep yourself vigilant, and hopefully in the future, these cyber security attacks will no longer feel as normal as going to a grocery store or eating your favorite meal.
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Sitting Too Long Will Kill You
Hi all!
I know, a very daunting title for my blog post today, but it is rather important to all of you who sit most of their day like myself. For those of us who sit in front of the desk all day as well as those who sit in front of the tv all night, this is a really big problem!
Sitting too long will kill you. How? How is this possible?
Well, several studies have been done to show that those who sit too long pose at a much greater risk of illness as their bodies slowly lose their ability to fight infections.

Not only that, but your brain doesn’t have as much critical thinking as someone who is active.
Here is an article talking about the effects of sitting:
http://www.cnn.com/2015/01/21/health/sitting-will-kill-you/index.html
ASAPScience also did a great video about the effects of sitting:
https://www.youtube.com/watch?v=uiKg6JfS658
What can you do in order to counteract the effects of sitting too long? Well, ASAPScience (or ASAPThought in this case) has a video for that too:
https://www.youtube.com/watch?v=4K_ENbRgywY
Keep yourselves active, and you will have a much healthier, happier life. 🙂
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
Mafia Games Monday (MGM) – What is DRY?
Hello all,
So, a couple of weeks ago on MGM, I went into a basic overview of what OOP is. If you don’t know what that is or want to refresh your memory on that, the blog post is here.
Anyways, so today, I’m going to talk about one of the major goals of using OOP: the DRY principle.
What does DRY stand for?
It stands for “Don’t Repeat Yourself”. Basically, DRY means that you do not want to repeat code of which you’ve already written on a different page or even repeat code on the same page.

Why is DRY important? Well, to answer this question, let’s look at an example.
Suppose you have the following code on one page:
$number = 10;
$multiplier = 2;
$answer = $number * $multiplier;
echo $answer;
And this code on another page:
$number = 7;
$multiplier = 4;
$answer = $number * $multiplier;
echo $answer;
So, with this code in mind, let’s propose that now you want to do subtraction instead of multiplication. So now, you have to update both of those pages to subtract instead of multiply. I know, a very simple example here, but just imagine if you have 100+ pages each with 700+ lines of code, and you have to find and fix all of these. Pretty daunting now, isn’t it?
Well, with DRY, all we have to do is create one function in order to handle a change like this. So, let’s create a function!
function domath($number1, $number2)
{
$result = $number1 * $number2;
return $result;
}
Very simple function above. So, the pages using this function will look like this:
$number = 10;
$multiplier = 2;
$answer = domath($number, $multiplier);
echo $answer;
And the other page:
$number = 7;
$multiplier = 4;
$answer = domath($number, $multiplier);
echo $answer;
So, let’s suppose the scenario above: you decide to subtract instead of multiply. Well, all you have to do is adjust the code on the function! The function will now look like this:
function domath($number1, $number2)
{
$result = $number1 - $number2;
return $result;
}
And that’s it, you’re done! That’s the DRY principle in effect!
So, how exactly does this apply to OOP? Well, that’s one of the major points in using OOP: not repeating yourself. Classes are a great way in order to only have to change code in one place instead of having to change code in MANY different areas.
That is DRY for you: Don’t Repeat Yourself, and you will have much more bliss as a programmer.
That’s all for now, until next time…keep that tech gear ticking.
~Goliath7470
