{ thinking Code }https://blog.thinkingcode.net
Think inside the block!Tue, 21 Aug 2018 05:16:22 +0000en-UShourly1https://wordpress.org/?v=4.9.93 Really Basic Reasons HTTPS is Important For Your Websitehttps://blog.thinkingcode.net/three-reasons-https/
https://blog.thinkingcode.net/three-reasons-https/#respondTue, 21 Aug 2018 05:06:20 +0000https://thinkingcode.net/?p=462HTTPS is the New Standard (for good reason too!) When I ventured out to make this website, I set up HTTPS from the start. Some would ask if that is really necessary, considering that I don’t take payments or collect user data. My answer to that (and hopefully everyone’s answer) is a resounding “Yes!” If it’s not your answer, here are three basic reasons why it matters: 1. Security –

When I ventured out to make this website, I set up HTTPS from the start. Some would ask if that is really necessary, considering that I don’t take payments or collect user data. My answer to that (and hopefully everyone’s answer) is a resounding “Yes!” If it’s not your answer, here are three basic reasons why it matters:

1. Security – Encrypt Your User’s Data

This is obviously the biggest reason that HTTPS is far superior to HTTP. When using HTTP to access a web page, anyone with a little cybersecurity knowledge and access to your network can easily see your data in plaintext! This is where enforcing HTTPS matters. The average end user probably wont be using much security other than what their OS provides by default. By enforcing HTTPS on your web server, you can “force” another layer of protection onto your users traffic. In my opinion, this is just a matter of good practice. Let’s keep our user’s secure and their data private.

3. Trust – Increase User Confidence

Source: Google Security Blog Let me get my credit card!

With the recent release of Chrome 68, websites that are not using HTTP are being labeled as “Not Secure” in the URL Bar. Google has stated that in future updates to the browser, that label will look something like the image above with bright red text to warn users of an insecure connection. Although the number of people using Chrome worldwide is estimated at about 40%, no browser comes close to dominating the market according to the federal government’s Digital Analytics Program (DAP). As an example of Chrome dominating the browser-space, W3schools.com has over 50 million views a month, and of those views 80% of users were using Chrome. With Google taking this kind of action against HTTP websites, a large portion of web traffic will see that ugly red label and lose confidence in your website’s security. Would you put your debit card information into a page labeled “Not Secure”? I know that I question the legitimacy of a website if it isn’t using HTTPS. How do you think your users will react?

]]>https://blog.thinkingcode.net/three-reasons-https/feed/0Dev Theory – CI/CD Pipeline 101https://blog.thinkingcode.net/ci-cd-pipeline/
https://blog.thinkingcode.net/ci-cd-pipeline/#respondSun, 05 Aug 2018 01:10:23 +0000https://thinkingcode.net/?p=389No (still relevant) Software Stays at Version 1.0.0 Recently a mentor of mine posted an article about how creating software is an iterative process (you can read it here), where products are released and then constantly improved. Software goes through many changes in its life cycle, and there is always room for improvement. Imagine what Amazon or Facebook would look like if everything stayed at Version 1! Any modern developer

Recently a mentor of mine posted an article about how creating software is an iterative process (you can read it here), where products are released and then constantly improved. Software goes through many changes in its life cycle, and there is always room for improvement. Imagine what Amazon or Facebook would look like if everything stayed at Version 1! Any modern developer needs a way to quickly and efficiently build, test, and deploy changes to code while keeping production environments secure and stable. There are several ways to push code out at a high-velocity, but a very common approach is through a CI/CD pipeline. So what exactly is that? And how can we apply some DevOps to get there?

CI/CD

Continuous Integration and Continuous Delivery/Deployment is a group of software development practices that build upon each other with the goal of automating and improving the deployment process. They all focus on small, very frequent commits to a common repository, as well as automating building and testing.

Some key goals of CI/CD are:

Find and address bugs quickly

Shorten the time it takes to push an update

Improve the quality of software and code

Increase developer productivity by eliminating rework

To start we begin with automating the build and unit tests….

Continuous Integration – The Foundation

Continuous Integration is the starting point for any team of developers that want to begin building a CI/CD pipeline. CI requires the developers to make frequent commits to a central repository( by frequent, I mean very frequent – often more than once a day), and to merge them to a release branch. Once a change is merged, a build management system is triggered. The build management system will build the application and start running some basic unit tests. This gives the developers a chance to catch errors sooner, and avoid spending extra time trying to rework changes so that they integrate with everyone else’s new code. After the build management system accepts a change, things can be moved on to staging manually and eventually pushed to production.

“To successfully implement continuous delivery, you need to change the culture of how an entire organization views software development efforts.” –Tommy Tynjä

Continuous Delivery – Automate!

Continuous Delivery takes the automation one step further, automating the staging phase and more testing. The staging environment needs to emulate the real world (production stack), and more tests (quality control and load testing for example) run on the changes. At this point, the entire process should be automated and developers should hopefully always have a deployment-ready build on hand. A developer than can take that build and manually push it out into the world for the end-users. All this automation allows programmers and devs to be more productive, write better code, and deliver quality updates faster.

Continuous Deployment – Automate Everything!

At this point, our development team in the diagram automated the process up until pushing to production. Why not automate that as well? Continuous Deployment takes this automation a step further, and automatically pushes the new build out to production. This lets the team get feedback from the end user quickly, and creates a perfect environment for quick and effective coding. It streamlines the entire process, so that changes (if they pass through all the testing we hope the team thoughtfully set up) get to the end user quickly and automatically.

So let’s start writing systems instead of just software! Hooray for DevOps!

]]>https://blog.thinkingcode.net/ci-cd-pipeline/feed/0FizzBuzz – Problem of the Week 1https://blog.thinkingcode.net/fizzbuzz/
https://blog.thinkingcode.net/fizzbuzz/#commentsThu, 02 Aug 2018 17:03:03 +0000https://thinkingcode.net/?p=378Fizzbuzz – You better hope you can whiteboard this one! You walk into your first programming interview ready to write some code. The manager sits you down, and says “John, have you ever heard of whiteboarding? I want you to solve fizzbuzz for me… You’ve heard of that right?” This is it. Your moment to shine. And then you step up to the whiteboard, and thankfully, you read this article

You walk into your first programming interview ready to write some code. The manager sits you down, and says “John, have you ever heard of whiteboarding? I want you to solve fizzbuzz for me… You’ve heard of that right?” This is it. Your moment to shine. And then you step up to the whiteboard, and thankfully, you read this article and know just the trick to solving it efficiently!

The FizzBuzz problem sounds pretty simple, and only requires the programmer in the interview to think it through. The problem looks like this:

Print out the numbers 1 through 100. But for every number that is divisible by 3, print out fizz; If the number is divisible by 5, print out buzz; IF divisible by both 3 and 5, print out FizzBuzz.

As for any programming problem, there are multiple ways of approaching it. For this example, I am going to stick with the simplest approach so no matter what language you like to code in, you can solve it. No fancy libraries, method calls, etc. As is the case with many of these types of problems, it sounds difficult unless you know the “magic trick”. In FizzBuzz, it is very important to have an understanding of what the modulus operator is. If you don’t, you can read about it on wikipedia or just search for it on google. The basic idea is that when used, the modulus (or modulo) operator returns the remainder after dividing two operands (it looks like “%”). So 10 % 5 would return 0, since the numbers divide evenly. With that in your toolkit, let’s start solving this common programming problem!

Let’s Get to Work!

The first thing we need is our method/function structure (I’m using c#, use whatever language you want):

So now we know how the modulus operator works, so how can we apply that to this problem? To demonstrate let’s write it out in pseudo-code:

Loop through the numbers 1 through 100...
If i divides evenly into both 3 and 5, print fizzbuzz
else if it divides evenly into 5, print buzz
else if it divides evenly into 3, print fizz
else print n

The order of that if else if matters, because if we didn’t check if the number goes into both first,it would print one thing, and exit the if block… What i mean by that is the code below would see that the number goes into 5, and would then print buzz and exit the if else if block therefore NEVER testing our other scenarios!!!

Loop through the numbers 1 through 100
if i divides evenly into 5, print buzz
else if it divides evenly into 3, print fizz
else if n divides evenly into both 3 and 5, print fizzbuzz
else print n

So lets actually convert this into code and test it!

The Result

And we did it! Solved that with no issues I hope… So now you know how to solve FizzBuzz, and how to use the modulo (or modulus) operator!

]]>https://blog.thinkingcode.net/hello-world-2/feed/1There’s a voice that keeps on calling mehttps://blog.thinkingcode.net/theres-a-voice-that-keeps-on-calling-me/
https://blog.thinkingcode.net/theres-a-voice-that-keeps-on-calling-me/#respondTue, 20 Feb 2018 19:13:45 +0000http://msmbizz.mihai1-work.cloud-press.net/?p=289Ulysses, Ulysses – Soaring through all the galaxies. In search of Earth, flying in to the night. Ulysses, Ulysses – Fighting evil and tyranny, with all his power, and with all of his might. Ulysses – no-one else can do the things you do. Ulysses – like a bolt of thunder from the blue. Ulysses – always fighting all the evil forces bringing peace and justice to all. There’s a

]]>Ulysses, Ulysses – Soaring through all the galaxies. In search of Earth, flying in to the night. Ulysses, Ulysses – Fighting evil and tyranny, with all his power, and with all of his might. Ulysses – no-one else can do the things you do. Ulysses – like a bolt of thunder from the blue. Ulysses – always fighting all the evil forces bringing peace and justice to all.

There’s a voice that keeps on calling me. Down the road, that’s where I’ll always be. Every stop I make, I make a new friend. Can’t stay for long, just turn around and I’m gone again. Maybe tomorrow, I’ll want to settle down, Until tomorrow, I’ll just keep moving on.

Hey there where ya goin’, not exactly knowin’, who says you have to call just one place home. He’s goin’ everywhere, B.J. McKay and his best friend Bear. He just keeps on movin’, ladies keep improvin’, every day is better than the last. New dreams and better scenes, and best of all I don’t pay property tax. Rollin’ down to Dallas, who’s providin’ my palace, off to New Orleans or who knows where. Places new and ladies, too, I’m B.J. McKay and this is my best friend Bear.

]]>https://blog.thinkingcode.net/theres-a-voice-that-keeps-on-calling-me/feed/080 days around the worldhttps://blog.thinkingcode.net/80-days-around-the-world/
https://blog.thinkingcode.net/80-days-around-the-world/#respondTue, 20 Feb 2018 19:13:08 +0000http://msmbizz.mihai1-work.cloud-press.net/?p=28780 days around the world, we’ll find a pot of gold just sitting where the rainbow’s ending. Time – we’ll fight against the time, and we’ll fly on the white wings of the wind. 80 days around the world, no we won’t say a word before the ship is really back. Round, round, all around the world. Round, all around the world. Round, all around the world. Round, all around

]]>80 days around the world, we’ll find a pot of gold just sitting where the rainbow’s ending. Time – we’ll fight against the time, and we’ll fly on the white wings of the wind. 80 days around the world, no we won’t say a word before the ship is really back. Round, round, all around the world. Round, all around the world. Round, all around the world. Round, all around the world.

I never spend much time in school but I taught ladies plenty. It’s true I hire my body out for pay, hey hey. I’ve gotten burned over Cheryl Tiegs, blown up for Raquel Welch. But when I end up in the hay it’s only hay, hey hey. I might jump an open drawbridge, or Tarzan from a vine. ‘Cause I’m the unknown stuntman that makes Eastwood look so fine.

Ulysses, Ulysses – Soaring through all the galaxies. In search of Earth, flying in to the night. Ulysses, Ulysses – Fighting evil and tyranny, with all his power, and with all of his might. Ulysses – no-one else can do the things you do. Ulysses – like a bolt of thunder from the blue. Ulysses – always fighting all the evil forces bringing peace and justice to all.