A Journey to Self Improvement

I have a few goals I want to accomplish in the near future. Actually, I have more than a few ūüėÖ. Like many others I have an ever growing list of side project ideas that I want to explore, books I want to read, and blog posts that I want to attempt to write.

Being a competitive person I believe that I have found a way to make this backlog of goals dwindle, and achieve these goals before I miss out on being able to achieve these objectives before I die. As a result I have challenged my self to do three things each month with no excuses or exceptions allowed.

These three goals are as listed below:

  1. Write a blog post
  2. Read a book
  3. Finish a side project

To keep myself accountable I will be blogging here to keep myself accountable, and anyone who is interested updated on my journey. I have no end date for this experiment in mind, but will be reflecting on my experience throughout.

Thanks for reading, and if you are interested in keeping up to date on my progress please feel free to follow me!



Scala Basics for a Python Dev

Best Practices
  • Camel case instead of snake e.g. addOne
  • Short temporary variables
Variables
Scala

Python

Function Parameters & Return Values
Scala

Python

Functions
Scala

Python

Anonymous Functions
Scala

Python

NOTE: Just like in python you can can assign an anon function or any function for that matter to a variable and pass the reference via that variable assignment.

Multi-Line Functions
Instead of having a tabular syntax just like in JavaScript ‚Äúwhich is pretty hot right now‚ÄĚ, you can wrap any of the functions contents discussed above anon or otherwise in {}.

def times_two …

Drop your email below to get updated on my next post!

Swapping Values In Python

When swapping values in python there really is not reason to use a temporary variable. We can take advantage of tuples to initiate the swap, which allows us to do the swap without a temporary variable.

 

Below is an example of non-idiomatic swapping.

a = ‘A’
b = ‘B’
temp = a
a = b
b = temp

 

Below is an example of utilizing the power of a Python tuple.

a = ‘A’
b = ‘B’
(a, b) = (b, a)

What Is 2-Step Verification

Two-step verification (also known as Two-factor authentication, abbreviated to TFA) is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network. This is a special case of a multi-factor authentication which might involve only one of the three authentication factors (a knowledge factor, a possession factor, and an inherence factor) for both steps.[1][2][3] If each step involves a different authentication factor then the two-step authentication is additionally two-factor authentication.