Image for post
Image for post
In 2020 making a bet is as easy as checking Facebook

On May 14, 2018 the United States Supreme Court reversed their decision on the Professional and Amateur Sports Protection Act of 1992. Before this was overturned it was only legal to bet on sports in the state of Nevada. Since the decision was made to overturn it, 20 states have legalized sports gambling and another 6 states have passed bills that will take effect in the next few months. You might be curious at just how big is the sports gambling industry since its federal legalization? Well, experts estimate that over $20 billion has been bet so far and the numbers continue to grow as more stats ball legislation. As a software engineer though, why should we care about gambling? …


Be sure to check out more of my blogs here and follow me on LinkedIn here.

Do you ever get that spooky feeling that someone is watching you? Sometimes even listening in on your conversations? Well, I’m sure google hears everything but we’re here today to talk about how a web page can listen to everything you do. From clicking on buttons to constantly watching where the mouse is many modern websites are built to change depending on how you interact with them. This is all based on the javascript frontends of the website but relies heavily on a framework called React. Developed by the super-smart people at Facebook, React takes in all event listeners from any browser and interprets them into some simple and easy to use commands. …


Most of us have been dreaming in our sleep since we were little kids. Sometimes it’s the most wonderful out of body experiences while other times it’s dark spooky nightmares. Hopefully the good overcomes the darkness and you wake up in a good mood. That is until coding boot camp starts and you're waking up in the middle of the night in a frantic trying to remember the proper syntax for a for loop. Don’t worry you are not alone, it is a common problem for students to dream about their code when they start a boot camp. …


If you thought loops were a powerful way to iterate through your code you better strap in for these enumerables. Enumerables are built-in methods for ruby that give you the power to iterate through code and transform it in many ways. We will start by discussing the basic enumerable “each” as well as some more sophisticated ones.

Image for post
Image for post
example of .each method

.each Method

All enumerables are based around the .each method. As you would think the .each method iterates through each value in an array and executes the code between the two keywords do and end. In the example shown here, it will start with 1 which is the first value of the array. It will then assign the 1 to the variable name “number” which is inside the pipes. You can name this variable what every you would like but it’s best practice to make it representative of the data. In the simple example, it takes the “number” variable and then prints it out to the console. After this, it assigns the next value in the array to the “number” variable. It will then print out the second number and continue doing this loop until it has printed each value in the array. …


Image for post
Image for post

Growing up in the city, when someone starts talking about loops my brain immediately thinks of a highway. This helps me envision how a loop in Ruby works as well. There are many different types of loops and when you are first learning it can be difficult to understand how they work. Once you master them however you can be a mean driving Ruby machine. Using loops can help eliminate repetitive code and make complex tasks simpler.

About

Billy Helm

Full Stack Software Engineer with a background in Petroleum Engineering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store