My reading notes journal for Code Fellows
This topic matters because when learning some that is new and foreign to you there is always going to be struggle to understand and grasp the topic at first. The more you push yourself to study and practice the topic the more you begin to understand and comprehend it. You’ll have expanded your main through the pain and suffering and it’ll all be worth it in the end.
What’s your perspective?
I completely agree with this ideology and it has helped me get so much further in life than I was ever meant too.
Why are you doing this?
I’m doing this because my family has come from nothing but struggle. Drugs, alcohol, and gangs have plagued my family and I want a better life not just for me but for my future children. My family has only ever had no job or minimum wage jobs expect me and my little brother who chose to go to the military in order to better our lives. I want to break the cycle and elevate in life and breaking into tech would inspire my future children and I can provide them the life I never had. This extremely important to me. I want to be a father that sets the example, inspires, and provides a good life to my children that is what motivates me in life.
Do you want what comes at the end of this journey?
More than anything I want what comes at the end of this journey and I’m willing to work towards it. I’ve had to push through pain and suffering my whole life but someones gotta do it to break the cycle.
Are you doing this for you?
I’ll be honest the financially stability is a huge factor but most definitely I’m doing this for me. I’ve always been a passionate about tech but my life’s circumstances didn’t allow for this to be a possibility for me when I was younger. I 100% believe this is the career path I’m supposed to be on even when something is hard when it comes to software development I still in enjoy it so much there’s never a second I want to quit doing this I would to do this for the rest of my life. I know I shouldn’t but I think about tech all the time even when I’m sitting around doing nothing I’m think of how to fix a bug in my code that has been bothering my or another approach I could have taken to refactor my code. I almost felt like I had no purpose for the week break we had between 301 and 401 so I started taking a front-end course, and started leetcode because I’m so passionate and want to break into the field of tech. Honestly don’t feel like I’m suffering at all doing when I’m coding. I don’t make coding my whole personally when I talk to people if anything I don’t tell people at all that I’m in software development but in my subconscious mind it’s all I’m thinking about 24/7. I’m not even that good a coding but that’s only for now. There’s always people way better than me but my drive and willpower is one my strong suits and I’m going to do whatever it takes to get good at coding thats by never stopping the learning process, I’m always willing to listen, take advice, and never believing I’m above or better than anyone.
O(1) describes an algorithm that will always execute in the same time (or space) regardless of the size of the input data set.
bool IsFirstElementNull(IList
O(N) describes an algorithm whose performance will grow linearly and in direct proportion to the size of the input data set. The example below also demonstrates how Big O favours the worst-case performance scenario; a matching string could be found during any iteration of the for loop and the function would return early, but Big O notation will always assume the upper limit where the algorithm will perform the maximum number of iterations.
bool ContainsValue(IEnumerable
O(N²) represents an algorithm whose performance is directly proportional to the square of the size of the input data set. This is common with algorithms that involve nested iterations over the data set. Deeper nested iterations will result in O(N³), O(N⁴) etc.
bool ContainsDuplicates(IList
if (elements[outer] == elements[inner]) return true;
}
}
return false; }
O(2^N) denotes an algorithm whose growth doubles with each addition to the input data set. The growth curve of an O(2^N) function is exponential — starting off very shallow, then rising meteorically. An example of an O(2^N) function is the recursive calculation of Fibonacci numbers:
int Fibonacci(int number) { if (number <= 1) return number;
return Fibonacci(number - 2) + Fibonacci(number - 1); }
Logarithms are slightly trickier to explain so I’ll use a common example:
Binary search is a technique used to search sorted data sets. It works by selecting the middle element of the data set, essentially the median, and compares it against a target value. If the values match, it will return success. If the target value is higher than the value of the probe element, it will take the upper half of the data set and perform the same operation against it. Likewise, if the target value is lower than the value of the probe element, it will perform the operation against the lower half. It will continue to halve the data set with each iteration until the value has been found or until it can no longer split the data set.
This type of algorithm is described as O(log N). The iterative halving of data sets described in the binary search example produces a growth curve that peaks at the beginning and slowly flattens out as the size of the data sets increase e.g. an input data set containing 10 items takes one second to complete, a data set containing 100 items takes two seconds, and a data set containing 1,000 items will take three seconds. Doubling the size of the input data set has little effect on its growth as after a single iteration of the algorithm the data set will be halved and therefore on a par with an input data set half the size. This makes algorithms like binary search extremely efficient when dealing with large data sets.
https://codefellows.github.io/code-401-python-guide/curriculum/class-01/notes/pain_suffering
https://robbell.io/2009/06/a-beginners-guide-to-big-o-notation