Skip to content

Latest commit

 

History

History
925 lines (710 loc) · 51.1 KB

100 Days of Code Journal Part 0.md

File metadata and controls

925 lines (710 loc) · 51.1 KB

Day 0

Monday, 8 August, 2022

When I decided to complete the 100 days of code challenge, I had previously tried to complete the HackerRank List Comprehension coding challenge and quickly got stuck. I had been running into a lot of that with my coding efforts of late, and I hated the idea. I knew that getting stuck was going to be an inevitability, but I was not prepared for the number of dead ends I was running into, and the only paths I was not hitting dead ends on, were ones that were not stretching me.

So, despite not feeling ready to make the leap, I went ahead and jumped into the 100 days of code challenge. I first went back to the File Extension project I started in connection with the HarvardX CS50’s Intro to Python class I am taking via EdX, but still ran into a dead end on that one. I technically got a little farther (which was cool) but it was not enough.

So, I went back to the last HackerRank challenge I tried to start and actually got it completed! While I now understand List Comprehensions a lot better, I do not like the sacrifice I have to make in code readability to accomplish it. I feel that if I were ever to have to go back to it, then I would likely have to start from scratch at trying to understand what is happening. Perhaps that might change down the road, but right now, I think I want to stick with more readable code than shorter code.

Day 1

Tuesday, 9 August, 2022

Yesterday, I struggled a lot with the list comprehension and had a hard time conceiving of even a strategy to use to solve the problem with. Today, when I first got started, I ran into the same problem, and like yesterday, I looked at what others had done to solve the problem and tried to dissect that. From there, I stopped and asked myself, "Seeing how these people solved the problem, how could I have figured it out?" From there, I immediately had ideas flowing into my mind for how I could have solved the problem and created a solution that I did not see in the discussion board for the problems. To me, this is a huge win because it means that I am starting to learn what I believe is the most important part of learning programming, specifically problem solving.

Day 2

Wednesday, 10 August, 2022

Today was a first for my HackerRank challenges. I did not have to look at the solutions that others thought of first to figure out how they completed it, I thought of a solution simply from things I had previously done. After writing this, I still plan to look and see what others did for their solutions, simply because I feel the alternate perspectives is valuable for learning, but I am happy to see my growth in programming skills and especially my increased problem solving skills. I am really loving this 100 day challenge. I wonder how my coding skills will have improved by December of 2023 when I will actually stop my coding challenge (assuming I have a job by then at least).

One thing I learned from today's coding is the importance of both stopping to carefully read the challenge and (as I think this will help) using psudocode to outline what I plan on doing. My first 2 attempts at checking what I thought was completed code, were wrong because I had not paid close enough attention to what was required in the challenge.

Day 3

Thursday, 11 August, 2022

Today, I spent a few hours watching videos trying to learn a bit more about python dictionaries. I might not have had to spend as much time learning if I had not been working at the time, but it was the best time I had so I am happy I did it. In the end, I found a video on Youtube that walked you through the problem and I realized that I was way over complicating it, and that in many ways, all I needed to do was to treat the dictionary like a list and that would have solved the problem.

Day 4

Friday, 12 August, 2022

Today, I found that some of the HackerRank challenges are terribly worded. I also got to where I wanted to know more about how functions worked, as I felt that was holding me back, so I decided to resume working ahead in my next class and was able to get two whole assignments completed. In the second of those programs (called discount.py) I even found a place where it just made sense to write functions. We have not actually gotten to where they have taught us how to write functions yet, but I have had enough exposure to them, that I know the basics. I also know just how valuable functions will be in programming, so I am happy to see that I am starting to see the benefit of using them.

Day 5

Saturday, 13 August, 2022

Today, I practiced working with files, while loops and if statements. I added data to a text file for the first time, which was cool. I am doing a better job at not over complicating things. Tomorrow, I am looking forward to stopping and worshipping.

Day 6

Monday, 15 August, 2022

Today, I practiced with creating functions. Specifically, I practiced with creating the whole program within various functions. And connected with that, I practiced with using one function inside of another. One good rule of thumb I learned that I want to remember is to try to avoid having a function longer than 20 lines of code. I would imagine that if it is getting that long it is likely better to just create a separate function.

Day 7

Tuesday, 16 August, 2022

Today, I practiced more with functions. Before I started this journey, functions were something I was just starting to experiment with, and in many ways, was uncomfortable with them, but now, I am getting ready to not only write my own functions, but to use an existing library of functions in such a way that would have left me intimidated before. I am also seeing the advantage of using notes to outline your program. The coding work I have been doing the past few days, has been work that will be due as part of a class I will be taking in September. I chose to start working on it now, because I realized that my lack of knowledge about functions was holding me back and I did not like that idea. I think that while I will still have a lot to learn, after the work I am planning on doing tomorrow, I will be happy with where I am at on functions. I will likely keep working ahead in my class, because I like that idea. I am really happy I started this 100 days of code journey.

Day 8

Wednesday, 17 August, 2022

Some days are just going to be busier than others I guess. Today was one of those busy days, but I still got my coding in. I practiced more working with functions, both writing my own and working with existing functions and libraries. Today, was a lot of deciphering code and libraries. I am trying to build a Python program that will draw and image, and this will be my first program that does not run exclusively in the terminal. It is wonderfully complex and enjoyable. I did not get the program done, but I am learning a lot more on this one so I am fine with that. The goal is not to complete a project every day, but to spend an hour coding, and while it was not all spent writing code, a lot of it was spent trying to decipher code and translate it into my needs, but I learned a lot and feel happy with the work I did.

Day 9

Thursday, 18 August, 2022

Today was another busy day, but I still got my coding in. It took some dedicated work, but I got my coding in. I practiced more with functions and learned about ways to make code more reusable.

Day 10

Friday, 19 August, 2022

I got a few hours in today. I watched two whole lectures on coding from Harvard's CS50 class (via YouTube) and a bunch of shorter videos. During my actual coding time, I practiced more with functions and with for loops. I ran onto a bug with the for loop I was working with, I got the first iteration to work but nothing after that seemed to work and I am not sure why. So tomorrow, I will be trying to do some troubleshooting.

Day 11

Saturday, 20 August, 2022

I really love mornings! I spent an hour coding in the morning and made a lot of progress. I finally got the forest generating properly. Next, I want to generate three mountains, and the edge of a cliff that I want to put into the scene, giving the user the feel of standing on the edge of a cliff overlooking a mountain valley on the way to 3 big mountains.

The problem I had with the loop is that I was not properly handling the incrementation of the loop. I had the line of code that would increase the position of where the program was trying to draw the tree inside of the if statement that was being used to decide if a tree would be drawn, instead of at the end of the for loop itself, which meant that the position of the tree was never incremented and so the program was just drawing 30 trees right in the same position.

Day 12

Monday, 22 August, 2022

I got the program I have been working with done, or at least I got it close enough. There is technically a bug with it as the mountain in the center is supposed to have snow on it, and does not, but I am ready to move on to learning new things and I can always come back to this later. I have spent enough time on this project and I am ready to start learning new things, so that is what I plan to do.

Day 13

Tuesday, 23 August, 2022

Today, for a bit, I did not feel like practicing coding, but then I reminded myself of my dream and had a lot of fun coding. I practiced working with local and global variables as well as troubleshooting code.

Day 14

Wednesday, 24 August, 2022

Today, I worked more with functions, and iterating through lists. Following the assignment given in the week 4 Team activity for my next programming class (which I am working ahead in) I built a program that will calculate the storage and cost efficiency of different can sizes. I wanted to go one step farther and have the program display the can type with the highest storage efficiency and best cost efficiency but I ran out of time. Either way, I am happy with how the program turned out. I do need to get better at leaving notes in my code.

Day 15

Thursday, 25 August, 2022

There is certainly a lot more opposition to trying to find an hour to code every day than I ever imagined there would be. While I did not get as much time as I wanted, I still am happy with the time I got in, so I will count today as a success. I completed a few coding challenges on an app I have on my phone.

Day 16

Friday, 26 August, 2022

Today, I went back to my 04 Prove assignment and worked out a few bugs, along with getting the program set up to be more dynamic and scalable.

Day 17

Saturday, 27 August, 2022

I finished my 04 prove project. It took a lot of work and fine tuning but I am happy with it. The only thing I would love to fix is to get the sun into a more stable position when you adjust the size of the scene. From this experience, one of the biggest things I learned was about how much tweaking it can take to draw things with code. .

Day 18

Monday, 29 August, 2022

Today, was my first day of working with pytest and building code to test functions. I likely did more learning than I did coding but I have to start somewhere. One of my first take aways about testing functions is the realization of just how much work and code it takes to build a test for a function. While for classroom examples that are kept deliberately simple, it might seem like writing code to test functions is not worth it, I can see the value in it when you get to where things are much more complex. I remember a "adventure game" program I wrote that would have been so much easier to test if I had written it in functions and then just wrote code to test the functions. I can also see why people may not like to write code to test their functions. A question that is already running through my mind is how could I improve the process of testing functions? That makes me happy, because that means I have found at least one area I am interested in within the coding world.

Day 19

Tuesday, 30 August, 2022

Today, I worked with two different programs, one of which had problems with it, that I needed to write tests for. The specific challenge was to first figure out what the program was supposed to do based on the documentation and then build a test for it to find where the problem might be, and then use the test results to fix the problem. I quickly learned about the value of making sure you code everything right. There were a few bugs I ran into from errors I made when writing the test code. This lesson also taught me a lot about the value of documenation; as without proper documentation within the code, it would have been a lot harder to build tests for it.

Day 20

Wednesday, 31 August, 2022

While I did not get much in the way of coding done today, I feel the work I did was valuable. The work I was doing involved a lot of things that we were just told to do without any kind of explanation to how it worked and to me, it felt too much like a tutorial that I was following and so I decided to stop and dig a little deeper. I have more I will be studying tomorrow because I just want to know, but that is alright because this journey is about developing my skills, and sometings that requires stopping to learn and not just practice.

Day 21

Thursday, 1 September, 2022

Today was another day focused mostly on learning. I ended up watching two harvard lectures and got my code outlined a little better for what I will be doing tomorrow.

Day 22

Friday, 2 September, 2022

Between time spent actually coding and time spent learning coding, I spent close to 9 hours of time on coding today. Tomorrow, I am ready to dive headfirst into more programming.

Day 23

Saturday, 3 September, 2022

I got my hour of coding in first thing in the morning and then planned to do more after I got a few things done, but the day got crazy and I never got back to it.

Day 24

Monday, 5 September, 2022

Today, I went back to HackerRank and completed another challenge. Specifically, I completed the HackerRank Lists challenge, fond here. In the practice I have done over the past few weeks working ahead in my class, I figured out a few questions I had about some of the things I was seeing at HackerRank like for example the header they populate in (if name == "main":) I now know that allows for you to do things like unit test your code without actually running the full program and is meant to be put before the main function. It also allows for you to use your code in other programs via importing them. From there, I practiced more with pull requests on Github and completed my second pull request.

Day 25

Tuesday, 6 September, 2022

I went to try another HackerRank problem but when I ran into something that I could not find an answer to and that everyone I found online simply took for granted, I got annoyed and went back to working ahead in my class. I figured out the problem I ran into last night and found another one, then fixed it. I also got more practice with completing pull requests, reviewing code, and tracking problems. I am actually enjoying this process.

Day 26

Wednesday, 7 September, 2022

Today, I spent most of my time figuring out how to create issues in Github from my VS code. I want to get familiar with the tools and with the process of learning how to use new tools as I feel that will help set me up for when I actually get a programming job. I also figured out two simple projects I want to build to add to my portfolio. I got the idea from a video Andy Sterks that linked to a wonderful Github repository. The first two projects I want to make are an Expense Tracker and a Weight Tracker App.

Day 27

Thursday, 8 September, 2022

Today, I completed a few challenges on codewars. I needed something relaxing to counter the stress I have been under, but still wanted to do my coding.

Day 28

Friday, 9 September, 2022

Today, I went back to some of the code I previously completed and tightened it up a bit and added better documentation. It was simple, but I enjoyed the practice of refining my code.

Day 29

Saturday, 10 September, 2022

Today, I officially started my CSE111 Programming with functions class. As I found the Syllabus and most of the assignments online and used that to start working ahead, I have just taken the formal start of the class to go back and review and polish up my code. I did that yesterday and today. I rather enjoy reviewing my code. I learn a lot from doing it.

Day 30

Monday, 12 September, 2022

I formally decided today to adjust my classes for this semester. My programming with functions class is now a block class that will be completed at the end of October and then right after that, I will start my JavaScript Language class. I wanted to take the JavaScript class earlier because I want to have more time to get used to it so I can start building programs in both JavaScript and Python, which I feel will be better for my job prospects. For programming, I learned what refactoring is (or at least got a brief introduction to it) and so to use proper terminology, I spent my day refactoring code I previously wrote before submitting it. I have now submitted weeks 1 through 4 and just have the code I wrote for week 5 and the first part of week 6 to refactor and then turn in. I rather like going back and reviewing and polishing up my code. I find ways to make it better and more efficient. In some ways, I think I learn as much looking back at code I previously wrote and fixing it as I do writing code.

Day 31

Tuesday, 13 September, 2022

Today, I spent several hours diving through the Pytest documentation and spent some time refactoring some old code. I have now turned in my work through lesson 5 and just have a little bit to do on Lesson 6 and then I will be back to writing new code. The reason I am taking my time is to make sure that I got it all right.

Day 32

Wednesday, 14 September, 2022

Today, I worked a bit more on my sentences program and got the next part built into it. I now need to build the tests for the two new functions I wrote and then add a bit more to the program to be formally done. Tomorrow, I will write the tests for the functions I wrote today.

Day 33

Thursday, 15 September, 2022

I was planning on writing some test functions, but forgot that I had a meeting with my programming group. Today, I taught my new programming group about writing functions and lead a group discussion on building a program to meet the qualifications of an assignment we were given.

Day 34

Friday, 16 September, 2022

I had a hard time getting anything done today. I have struggled to get enough sleep the past few days and it caught up to me today. I got a little done. I would have rather gotten more, but I did my best, so I am happy.

Day 35

Saturday, 17 September, 2022

Yay! I finally got my week 06 Prove assignment done. Right now, I have only gotten the core requirements done, but I do not care. This has been a rough week and it took everything I had to just get what I have completed done. So I am calling this good and moving on with the rest of my assignments.

Day 36

Monday, 19 September, 2022

Today, was the first day of my new programming blog. I have been toying around with the idea for a bit and then on Twitter when @Wraytheon_ asked for links to people's Programming blogs, I just decided to take the leap and start my blog. Here is a link to my video for today. Today, I ran through several programming examples that all went into how Python handles lists when working with functions. In the process I got an insight into how memory management works in Python, and I really enjoyed it.

Day 37

Tuesday, 20 September, 2022

Today was my second video of my learning programming series. I started work on a program to iterate through complex lists. And quickly got in over my head. I need to go back through the preparation material to figure a few things out. Tomorrow, I need to figure out how to iterate through complex lists. I have part of what needs to happen, I just need to turn it into a loop. The link to my video is here.

Day 38

Wednesday, 21 September, 2022

Today, I worked on the 06 Team Assignment. I first got it written and working, and then I broke it down into functions. From there, I ended up introducing a few bugs that stopped it from calculating the score properly, but I ran out of time for the day before I was able to find or fix it. I am certain that part of the problem was with calculating the scores on the negative questions. One thing I want to check first thing is to make sure I have the right questions mapped to each function. Initially, after converting the program to use functions, I found that it would run through the questions multiple times when running the program in debug mode. I was able to fix that simply by streamlining the code a bit. The video for today's coding can be found here.

Day 39

Thursday, 22 September, 2022

I went back and reviewed my W06 Team assignment (the esteem.py program) and figured out what was wrong with it. I discovered that the indentation for the return statement was too far in, which made Python treat it was part of the for loop that it was underneath, which in turn made it so that the program only looped through the code once and then returned the score it calculated from that one time through. Which means that I spent almost an hour trying to find an error caused because I had the indentation wrong. I used the debug mode in VS code to step through the code line by line to figure out what was happening, but it still took a while to figure out what the problem was. I ended up also spending some time taking tests demonstrating what I have learned about functions and lists, but I did not want to record that as I am certain my school would frown on me recording and broadcasting their quiz all over the internet. Note for the future, when something is not behaving right, check to make sure I have followed the rules before trying to rewrite the code. Here is the video for today.

Day 40

Friday, 23 September, 2022

Today, I got a lot done, in large part because of just how much confidence and focus I have gained thanks to recent events. I completed the 08 Prepare and Practice, the 08 Checkpoint, and I completed the core requirements in the 08 Team Activity. Lesson 8 is about working with dictionaries and functions. I ended up pulling data out of one dictionary and printing it out for the user, and then I pulled data from two dictionaries and combined it to display info for the user. The video of my work can be found here.

Day 41

Saturday, 24 September, 2022

I have quickly started to love the growth day app. It gives me the boost I need to get my day started strong and the focus I need to keep going strong, along with a bit of time to reflect at the end of the day, allowing me to ready for the next day. Here is a link to a free trial for anyone interested. For coding today, I finished up my 08 team assignment and my 07 team assignment. I ended up finding an insight into how python handles the print statement in different ways and plan on going back and running a test to see what that insight says about efficiency while running the code. I ended up having to deal with a few distractions that made my coding take a lot longer, but I had fun so I don't care. Here is a link to the video from today.

Day 42

Monday, 26 September, 2022

I do not feel like I got a lot done today, but I got my hour in and that it what counts. There was just a lot of stuff that came in and pulled my attention away from coding, which will happen. What counts is I did my best to keep my focus where it counts and that I am determined to keep going despite the challenges. Here is the video for today.

Day 43

Tuesday, 27 September, 2022

I had a short coding session today, but I got my program done and debugged. It turns out that the problem was that python was trying to split a tuple with how I was trying to iterate through the list. Once I figured that out, it was a quick fix. Here is the video for today.

Day 44

Wednesday, 28 September, 2022

I am not enjoying this week. I feel stretched to my wits end. I am enjoying coding, just everything is trying to get me to stop coding. That just means I need to try harder. Here is a link the video for today.

Day 45

Thursday, 29 September, 2022

Today, I finished the 09 Checkpoint assignment and started looking at the 09 team assignment. I learned what I kept doing wrong when iterating through lists, it was a small formatting change in how I wrote the loop. I am happy I got a solid amount of programming in today. It felt good. I am still a little tired but I took tomorrow off, so I can both catch up and get ahead. Here is the video for today's coding session.

Day 46

Friday, 30 September, 2022

Got my first coding session in today. The video can be found here I am quickly beginning to see why many coders will so often look to see what has already been done, or even what they have previously done. So often there is something so close to what you want to do, that to find that it speeds up what you are trying to do. I will be doing multiple coding sessions today, trying to catch up from the hectic week. In my first coding session I completed the prep work on the 09 Team Activity: CSV Files assignment, where I built a dictionary to store and look up student information, pulling the data from a previously existing CSV file. And now, I have completed my 09 Prove assignment where I did more with working with functions and dictionaries. Here is the video for that coding session.

Day 47

Saturday, 1 October, 2022

Today, I got introduced to error handling and got to both experiment with code that handled errors and write code to handle errors. Here is the video for my coding session today.

Day 48

Monday, 3 October, 2022

Today, I was hoping to get the whole of Lesson 10 prove done, but that did not happen. Unless, I happen to get with my reading sooner than I expect, then I will likely not finish my lesson 10 prove. I ended up having to purchase a new mouse because mine started to go on the fritz. This lesson focused on working with functions and dictionaries. I still need to build some error handling into the program and then I will be done. You can see the video for today here

Day 49

Tuesday, 4 October, 2022

Today, I felt massively out of sorts. I got in my hour of coding, but did not get much done.

Day 50

Wednesday, 5 October, 2022

I finally finished the requirements for my Receipt program! This was the first program I wrote using error handling. It was a huge challenge to learn and a lot of fun. I can see the benefit of using error handling. A few areas the assignment wanted us to use error handling for, I would rather have changed the code so it would not have been needed, but for learning purposes, I can see the need to learn about it.

Day 51

Thursday, 6 October, 2022

Today I got to play with the map function for the first time. In the process, I learned that with how python handles the map function, it seems to store all of the data you are mapping in memory behind the scenes, until it has finished processing everything. Only after it has mapped all of the requested data, will it assign the data to the variable in question. I look forward to playing with that more over the next few days.

Day 52

Friday, 7 October, 2022

Today, I planned out what will likely be one of the biggest programs I have ever written. Once my instructor approves it, I am looking forward to getting started.

Day 53

Saturday, 8 October, 2022

I did more planning for my big project today. I got the file created and started planning out what I will actually do. It is a lot of work to plan a big project out.

Day 54

Monday, 10 October, 2022

Today, I spent about a few hours trying to learn about different options to build GUI's in Python. I did not get a lot of actual coding completed, but I learned a lot.

Day 55

Tuesday, 11 October, 2022

Today was another day of mostly learning. I will likely be using pysimpleGUI for my project instead of tkinter. It seems a lot easier to figure out.

Day 56

Wednesday, 12 October, 2022

Today was another day spent mostly on learning code. Tomorrow I will get a few hours of programming in which I am looking forward to. I did learn the very simply markdown syntax and went back and implemented that in my coding journal. I plan on keeping it up now that I see just how simple it is.

Day 57

Thursday, 13 October, 2022

Procedural Programming
A programming paradigm where the focus is on the steps needed to accomplish the task.

''' {

# Procedural Programming Example

def main():
    numbers = [87, 95, 72, 92, 95, 88, 84]
    total = 0
    for x in numbers:
        total += x
    average = total / len(numbers)
    print(f"average: {average:.2f}")'

# Call main to start this program.
if __name__ == "__main__":
    main()

} '''

python procedural_example.py

average: 87.57

Declarative Programming
A Programming Paradigm that focuses on the output you want rather than the steps needed to achieve it. SQL is a declarative language. In declarative programming, we only tell the computer what to do, not how to do it. Python's handling of memory management would be an example of declarative programming.
Functional Programming
A Programming Paradigm that focuses heavily on functions. Functions in programming has a similar process to what you would find in using formulas in mathematics and involves a focus on functions, avoiding shard state, mutating state and side effects in the process.
  1. We can pass a function into another function.
  2. A nested function is a function defined inside another function.
  3. A lambda function is a small anonymous function.

''' {

# Functional Programming Example

from functools import reduce

def main():
    numbers = [87, 95, 72, 92, 95, 88, 84]
    func_add = lambda a, b: a + b
    total = reduce(func_add, numbers)
    average =  total / len(numbers)
    print(f"average: {average:.2f}")

# Call main to start this program.
if __name__ == "__main__":
    main()

} '''

python functional_example.py

average: 87.57

Object-Oriented Programming
A Programming Paradigm that focuses objects that contain both data and functions (known as methods). Methods are functions within objects that allow you to do different things with the objects. A list is an example of an object and the pop, append, and insert commands are examples of methods which are used via the dot operator.

Day 58

Friday, 14 October, 2022

Today, I completed the L12 Checkpoint: Using Objects and created the fruit.py program. For the assignment, they had us work with lists to give us practice with object oriented programming, which they introduced yesterday. While I think that object oriented programming is far more extensive than just working with lists, by using lists, they can use a concept we are familiar with to make a bridge into a larger world. The next class in the series I am taking is programming with classes and to introduce object oriented programming at the end of this class is a wonderful idea. For this particular assignment we learned about the dot operator.

''' {

# 12 Checkpoint: Using Objects
# Found at https://byui-cse.github.io/cse111-course/lesson12/check.html

def main():
    try:
        # Create and print a list named fruit.
        fruit_list = ["pear", "banana", "apple", "mango"]
        print (f"original: {fruit_list}")

        # Add code to reverse
        fruit_list.reverse()
        # Print fruit_list
        print (f"reversed: {fruit_list}")

        # Add code to append "orange" to the end of fruit_list
        fruit_list.append ("orange")
        # print the list
        print (f"append orange: {fruit_list}")

        # Add code to find where "apple" is located in fruit_list 
        apple_index = fruit_list.index ("apple")
        # insert "cherry" before "apple" in the list 
        fruit_list.insert (apple_index, "cherry")
        # print the list.
        print (f"insert cherry {fruit_list}")

        # Add code to remove "banana" from fruit_list
        fruit_list.remove("banana")
        # print the list.
        print(f"remove banana: {fruit_list}")

        # Add code to pop the last element from fruit_list
        fruit_list.pop()
        # print the popped element and the list
        print(f"pop orange: {fruit_list}")

        # Add code to sort and print fruit_list.
        fruit_list.sort()
        print(f"sorted: {fruit_list}")

        # Add code to clear and print fruit_list.
        fruit_list.clear()
        print(f"cleared: {fruit_list}")

    except IndexError as index_err:
        print(type(index_err).__name__, index_err, sep=": ")

if __name__ == "__main__":
    main()

} '''

The goal of this assignment was to see how much the dot operator can do and how it works in different situations. I wanted to try to break everything into functions but I realized that it would just be inefficient in this situation, so I just put it all in main. The one thing I did not think about at first, was adding the try and except functions. We just barely learned about it, and when I looked at the sample code after I finished my code, I realized I had left that out, so I went back and added it into my code to get myself in the habit of adding them in. While this code really did not have a chance of having an error, in real code, there could be a possibility of things beyond my control as a programmer happening and writing code defensively is a good habit to get into.

Day 59

Saturday, 15 October, 2022

LAMBDA Functions
A one time use function that does not have a specific name. You create a LAMBDA function through use of the lambda keyword in Python, which must be typed in lower case. You will assign a lambda function to a variable to allow for you to use the data elsewhere. The syntax for a lambda function is variable_name = lambda argument: expression. For example if you wanted to create a lambda function that would add 5 to any number you feed into it then you might do the following. add_five = lambda x: x + 5. You could then call print(add_five (10)) and have it return 15.

For me personally, while I like knowing about lambda functions, right now, I think I prefer just calling a function the regular way. Lambda functions definitely seem like they have the ability to save time in coding which is certainly a draw to them, but to me, they do so at the cost of readability. Obviously, as I get more experienced in coding, that will likely change, but for now, I think I like the idea of writing a fully defined function.

After I finished working with my assignment on lambda functions, I ended up working with an assignment using tkinter. I have a lot more to learn on that subject. I only need to do one version of it, but on Monday, I plan to go back and do a few other versions because I want to get more comfortable with tkinter. Additionally, I have a big assignment do next Saturday that I want to get ready for.

Sunday, 16 October, 2022

Scheduled day off of coding

Day 60

Monday, 17 October, 2022

I spent two hours coding today. Part of me does not think that I made much progress, but this is my first time working with pysimpleGUI. I ended up deciding to go with that because it was the easiest to figure out and let me get moving on the rest of my program. I have spent far too much time trying to figure out the gui of my program and far too little time working on the actual program. The next things I need to do is to figure out how to assign text entered by a user to a variable that I can use and how to force a player to both select a gender and enter a user name to then exit out of the function

Day 61

Tuesday, 18 October, 2022

I spent about a half hour coding this morning and another half hour coding tonight and got a little farther. I ended up creating one issue and then spent most of the rest of my time solving it. I went to our last team meeting for the class and found that I have a better understanding of tklinter than I thought I did. I was actually able to explain a lot of it to my teammates. Or at least a lot of what we have worked with in class.

Day 62

Wednesday, 19 October, 2022

I was able to figure out how to get input via pysimplegui assigned to a variable using the key command. I then spent about an hour trying to figure out how to figure out which radio button is selected and assign data to a variable in pysimplegui. All together, I spent about 2 hours both coding and learning today.

Day 63

Thursday, 20 October, 2022

Yay! I finally got my radio buttons to work. I also got it so the player has to enter a name and choose a gender for the text adventure game. I did not get a whole lot of coding done today, but now that I got that part done, I can start working on the rest of my program and hopefully make some real progress.

Day 64

Friday, 21 October, 2022

I got one issue resolved today. I figured out how to implement my third user created text option for my game. I have a little more work to do on it, but I am happy with the progress. I was a little on the tired side today so I did not get as much done as I would have liked, but tomorrow, will be a nearly all day coding marathon. I have 10 pages I will be reading for my other class, and then the rest of the time will be spent coding. I am looking forward to that.

Day 65

Saturday, 22 October, 2022

I spent nearly 11 hours coding today. It was by far the longest coding session I have ever done. I obviously took breaks throughout the 11 hours. I will be putting in at least 2 hours a day, likely three on Monday, Tuesday and Wednesday. Then I will be done with my functions class. I need to get as much of my text_adventure game completed as possible and turn in a few other assignments before I finish. I have learned a lot from this class. The only thing that is a little annoying is that I need to reconnect my CSE 111 folder to my github. I was playing around a bit and accidentally messed up the connection.

Sunday, 23 October, 2022

Scheduled day off of coding

Day 66

Monday, 24 October, 2022

Spent 3.5 hours finishing a few functions and then trying to figure out how to get the buttons working to allow the player to make the next choice. I narrowed down the problem to the idea that I was not properly mapping the next function back to the current scene option.

Day 67

Tuesday, 25 October, 2022

Last night before going to bed, I had a flash of inspiration that I thought was going to make this easy, but when trying to implement it, I quickly found it was a lot harder than I thought. More specifically, I found that it created a whole new set of errors. I just barely figured out one of them, I had apparently forgotten quotes around a dictionary item I was referencing, but I am still no closer to actually getting the buttons to work. I have some good tools and a few ideas to run with. And worst case scenario, I have put my best effort in so I am happy.

Day 68

Wednesday, 26 October, 2022

I finished my last assignment for my CSE 111 Programming with functions class. I technically did not actually finish the program, but I got far enough to turn it in, and I still got a 97.5% on it so I am really happy, and I learned a lot in the process. Tomorrow, I formally start my JavaScript class. My plan for that class is to do twice the work and try to code everything in both JavaScript and Python. I'll find out how realistic that plan is.

Day 69

Thursday, 27 October, 2022

Today was mostly a day of studying and getting introduced to JavaScript. I played with code that was broken in several ways and had to fix it. In the process, I learned about how constants in JavaScript work, how JavaScript handles addition between strings and number, how it handles multiplication of numbers and strings. I got to work with declaring variables, modifying variables, and both reading and understanding errors before fixing them.

Day 70

Friday, 28 October, 2022

I spent the day learning and practicing how to debug in JavaScript. It is quite interesting to learn and to see the similarities between how JavaScript and Python work.

Day 71

Saturday, 29 October, 2022

While I am nowhere near the level of comfort I have developed with Python, I can see how all the study and practice I did has helped get me ready to learn JavaScript. There are quite a few similarities between JavaScript and Python, and there are quite a few differences. Right now, I am slowly diving into the depths of JavaScript as I get ready to start programming in JavaScript. My goal is to get comfortable enough with learning new languages that the process becomes second nature for me, and I think I can do it, I just have to take a bit of time to explore my curiosity a bit.

Sunday, 30 October, 2022

Scheduled day off of coding

Day 72

Monday, 31 October, 2022

Today was mostly spent learning about JavaScript, learning about debugging in Java Script, and preparing for an interview tomorrow.

Day 73

Tuesday, 1 November, 2022

Completed my week 1 Assignments in my JavaScript Language class. Tomorrow, I expect I will get more into actual coding with JavaScript. I am looking forward to it.

Day 74

Wednesday, 2 November, 2022

Learned about and practiced with Operators and DOM manipulation in JavaScript.

Day 75

Thursday, 3 November, 2022

Practiced more with JavaScript Operators and DOM manipulation.

Day 76

Friday, 4 November, 2022

I was feeling a bit under the weather today so I did not get much actual programming in, but I still got my hour so that is what counts.

Day 77

Saturday, 5 November, 2022

I started to work on my 02 Prove assignment and quickly found myself under prepared so I started going deeper into the You Don't know JS book that my class uses found here https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/get-started/ch2.md I finished off in the section "Arrays And Objects" As I was going through the chapter, I made sure to experiment with any code examples they talked about in the book.

Sunday, 6 November, 2022

Scheduled day off of coding.

Day 78

Monday, 7 November, 2022

Today I learned how to use the document.querySelector function and practiced more with variables and arrays. Other than updating a picture I have almost completed my first project.

Day 79

Tuesday, 8 November, 2022

Today, I studied about and practiced with arrays in JavaScript.

Day 80

Wednesday, 9 November, 2022

Today I studied about Arrays and the DOM process along with Algorithms.

Day 81

Thursday, 10 November, 2022

Today, I studied a lot about Algorithms and cleaned up some old code.

Day 82

Friday, 11 November, 2022

Today I practiced with arrays, troubleshooting code, and studied algorithms.

Day 83

Saturday, 12 November, 2022

Working with the getElementByID function. We were given base HTML and a challenge to declare an array in a JavaScript file and then map that to a variable inside of the HTML code we were provided. I got part of it working perfectly but when I try to get the rest working, it errors out. If I cannot figure it out by Monday, I will ask for help. Also watched part of MIT's 3rd lecture on Algorithms.

Sunday, 13 November, 2022

Scheduled day off of Coding.

Day 84

Monday, 14 November, 2022

Still working with the getElementById function. Ran into some errors with my code that I have now asked for help with. Found a bit more about the error. Found some similar code that I can get working like I want, but still not sure what is going on with my assignment.

Day 85

Tuesday, 15 November, 2022

I finally figured out what was wrong with my code. It had nothing to do with the JavaScript but the HTML part I was provided. The call for the script came before the variable I wanted to attach it to which was causing it to come back as null. I will have to remember that for the future.

Day 86

Wednesday, 16 November, 2022

Today, I practiced more with arrays. In addition to a lot of study, I built a program to convert letter grades to a GPA score and average them together. I am slowly starting to translate how Python works to how JavaScript works. It is rather interesting, in some ways, I feel like I am starting over learning programming, but in other ways, I feel like I have a much better head start than I did before.

Day 87

Thursday, 17 November, 2022

I finally finished studying the arrays portion of my week 3 code and started working on studying and practicing with DOM management and manipulation.

Day 88

Friday, 18 November, 2022

I finished all the assigned practice for week 3. Tomorrow, I will be reviewing everything and then completing the prove assignment. The professor already showed everyone part of the assignment which will be really helpful. I am not happy with the foundation of knowledge I have in JavaScript. I want a much deeper foundation than I currently have. I know that part of what I am lacking is going to be found in learning about algorithms, but I think I will need more.

Day 89

Saturday, 19 November, 2022

I think I am finally getting the hang of JavaScript! Today, I built a simple calculator that added, subtracted, multiplied, or divided two numbers, and that iterated through an array several different ways.

Sunday, 20 November, 2022

Scheduled day off of Programming.

Day 90

Monday, 21 November, 2022

Today was mostly a day of studying. Just starting to learn about functions in JavaScript.

Day 91

Tuesday, 22 November, 2022

Today, I reproduced code the professor showed us in a short video and reproduced a simple tic-toc-toe game. It was a lot of fun to see the differences in how Python and JavaScript work. I like how clean Python is and how direct in its distribution (ie a web browser) JavaScript is.

Day 92

Wednesday, 23 November, 2022

Today was a deep dive into functions and objects in JavaScript. Tomorrow will likely be another day of mostly study and then from there, Friday, will likely be back to coding.

Day 93

Thursday, 24 November, 2022

Today, I studied about and practiced with functions. I started to build a program to calculate gpa from entering comma separated letter grades.

Day 94

Friday, 25 November, 2022

Finished building the gpa.js program. I ended up using the solution they provided to build it and then walked through the program in debugger mode to figure out what was happening. A few things I learned are as follows:

.toFixed()
Converts numbers to a string format. By putting a number in the parenthesis tells JavaScript how many points to include after the decimal point.
.map()
iterates through an object, like an array or list, and performs the requested function on it. Syntax will be as follows objectToBeIteratedThrough.map((individualElement) => functionToProcessIndividualElement(individualElement))
if/else if
This functions the same way the if/else statements do in Python. The Syntex works very different. To use the if/else statements, you start by stating if, then place your comparative statement inside of a parenthesis (comparativeStatement) then place what the happens if the comparative statement is met between squiggly braces {whatHappensIfConditionsMet}. You follow the same format for the else if statement.

Day 95

Saturday, 26 November, 2022

Finished my 04 Prove assignment. Built a profile page based on assigned tasks. Assigned values to and iterated through arrays, displayed text from variables, arrays, and lists to a webpage.

Sunday, 27 November, 2022

Scheduled Day off.

Day 96

Monday, 28 November, 2022

Studied about modules in JavaScript today.

Day 97

Tuesday, 29 November, 2022

Today, I practiced with importing modules in JavaScript.

Day 98

Wednesday, 30 November, 2022

Today, I followed a tutorial to build an app that pulled data from a website, via json, then converted that data to something JavaScript could use, and finally displayed it to the user. In the process I assigned multiple pieces of data to HTML code elements to display it to users and iterated through lists of unknown size using the forEach JavaScript function.

Day 99

Thursday, 1 December, 2022

While today, I just practiced with sorting arrays, it is also the end of my first 100 days of coding. Tomorrow, I will be starting my second 100 days. I Have grown a lot from this journey. I look forward to my second 100 days.