In-depth Blog Post #4

Between now and the last post, I’ve focused more on the hands-on portion of in-depth. The first few weeks of in-depth are similar to learning phases where we dont really know what we are getting into but now, the whole process becomes more and more fleshed out. I finished the udemy course Automate the Boring Stuff with Python and started moving on to my calculator.

The calculator is a program that can be made fairly easily as a beginner. Python is a programming language that is well-versed in terms of its logical and data processing “skills”. So it’s no surprise that a calculator would be easy to make since it takes the basics of the language and makes itself into a tool that we humans can use. Some of the simplest variables are ones that define variables, add, subtract, multiply, and divide. Using almost only these variables, I can create a simple calculator:

 

def add(x, y):
return x + y

def subtract(x, y):
return x – y

def multiply(x, y):
return x * y

def divide(x, y):
return x / y

print(“Select operation.”)
print(“1.Add”)
print(“2.Subtract”)
print(“3.Multiply”)
print(“4.Divide”)

choice = input(“Enter choice(1/2/3/4): “)

num1 = float(input(“Enter first number: “))
num2 = float(input(“Enter second number: “))

if choice == ‘1’:
print(num1,”+”,num2,”=”, add(num1,num2))

elif choice == ‘2’:
print(num1,”-“,num2,”=”, subtract(num1,num2))

elif choice == ‘3’:
print(num1,”*”,num2,”=”, multiply(num1,num2))

elif choice == ‘4’:
print(num1,”/”,num2,”=”, divide(num1,num2))
else:
print(“Invalid input”)

If you put that into a program like Notepad and save as a .py file, then you can run the program; if you have python.

So it isn’t too difficult to make a calculator. Although, my calculator currently has more functions than the ones above. I also input advanced functions such as sine cosine and tangent. What makes this project difficult is the front-end. Displaying the calculator in a appealing manner in my website. As I said before in my last post, python mostly focuses on back-end, which is the brains. It’s a language that renders on the server side of a program or website. In the calculator program above, it requires you to input numbers without buttons. It works, yes, but it isn’t really aesthetic enough.

For aesthetics, I need to work on my front-end skills. My mentor suggest JavaScript and from what I can gather, learning JS can be useful not only for the front-end part of my calculator, but also my website. JS is the program that puts the add function as a button instead of a ‘choice’. For the website, it can make components of the website move and interact so it’s a seamless experience for the user. An example of this is the website ‘simplychocolate.dk’. The pages are made to look like one which just makes for a better website.

 

1. What has been my most difficult mentoring challenge so far? Why?

A challenge that we have faced is the global pandemic right now. Last meeting I had with James, we had established that on the next meeting, James would help me set up a https server. Since we can’t meet in person, we can’t do it. The plan was to just take a previous server James had made and basically just emulate that one. However, we did get through this obstacle with the power of Discord. Discord is an application much like Skype where we can video call and chat. One key component of Discord that helped us get through this is screenshare. What this allows us to do is look at the other person’s screen by sharing it.

2. What is working well? Why?

The resource that I chose, the udemy course worked well. I have finished but what makes the course especially useful is how much I can go back to it. When I first went through the course, I guess I can say I learned python. But not really. I went through the lessons and exercises, but the information didn’t really stick. It was more so an experience of learning ABOUT it. However, when the resource really shined was when I went back to it for help. Help that I needed when using python for my own lines of code (or little tests/experiments). That is where I really learned how python works, when I had no guidance. When I struggled or when a syntax error occurred, I consulted the resource and so far it has been working well.

3. What could be working better? How can you make sure this happens?

Hopefully this whole pandemic situation becomes controlled soon. It’s not only affecting in-depth but also the whole world on an unbelievable level, probably more than I think it is. But I have no control over anything but myself so I can only do what is in my control. Regarding my website, I need to learn JS and maybe also HTML and CSS for building the website. James has already sent me some resources for it and I’ve started working on them. However, there seems to be a lot more to learn that I initially thought. The first resource I will be learning from is Codecademy, which is a resource I had considered for python. I also tried finding a udemy course but most of them were pretty expensive so I opted out of that. I better get started then.

 

In-Depth Blog Post #3

I have had 2 meetings with James so far. In the first meeting, we discussed my plans for in-depth and how he could aid me along the way. I showed him my contract and we slightly altered my initial schedule. Besides the plan or how I’m going to get to my product, he said that the final goal was both challenging and doable for me. However, to get the skills of building a calculator, game, or website, I need skills that I have to build. We discussed several ways I could do this:

  • Codecademy
    • This is an online tool to learn the basics of a language or anything else related to coding.
    • Although I would learn various skill to do certain tasks, my mentor reasoned that it doesn’t teach you how to apply those skills. For example, it could teach me things like how variables work in python, but it wouldn’t tell me how to apply it in a calculator.
  • Online classes
    • I found a udemy class online and showed my mentor. He said it was a great place to get started as not only will it teach me the necessary skills to code in python, it also teaches how to apply those skills, albeit not for a calculator. But learning skills of application for something can still transfer over to something else.
    • The course is about how anyone can automate something they do on a computer. Instead of doing something repetitive for a job, the course teaches you to make a program that does it for you.
    • Right now, the course costs money but when I bought it during the holidays, it was free.
  • Books
    • We didn’t talk a lot about books since they are hard to work with. With online sources, not only do I have access to it anywhere, but it’s also much easier for my mentor to keep track of my progress. I can send him screenshots of where I am in my lessons. Also, with books, I either have to buy them or borrow from the library. They can get pretty expensive sometimes and borrowing from the library means I either have to renew it or return every few weeks.

 

My mentor helped me install python on my computer, which wasn’t too hard to do. However, he strongly recommended that I use the command prompt to practice and do exercises for whatever I learn. This is because command prompt is like the overlord of your computer. It makes looking for files very easy and it can also perform other administrative tasks on your computer. We pathed the command prompt to where I had my python program installed so I could freely use that on command prompt for easy access. He does that at work and he said that starting with this helps in the long run. We also discussed other benefits of starting with Automating the Boring Stuff with Python. Automating anything can be useful in any job. For example, if I was an accountant, there might be a lot of repetitive work I have to do with things like putting information into Excel. With python, I can program the computer to put things into Excel without me having to do anything. So this can benefit me whether or not I get into Computer Science.

So for the past weeks, I have been making my way through the udemy course, learning stuff like variables, ordered and unordered lists, file managing, all with python. I didn’t have too much trouble going through the program because it explain everything pretty clearly. I also have an ebook as a reference so that helps me as well. My mentor and I discussed in our second meeting how I was going to start my first big project: the calculator. This is something fairly simple to make but what makes it difficult is the front-end of the code, the thing that the viewer will see. Python can manage everything to do with the back-end or the thinking. For the front-end, my mentor said that I might have to learn a bit of another program to and know how to draw buttons and stuff, just to show what it happening.

A couple months ago, I was reading my mom’s psychology book. It talked about when having a discussion with someone, it is better to face the same direction they are facing than facing across from them. They are more likely to agree or see your thoughts better. This was helpful for me when talking to my mentor because it allowed for a more fruitful discussion and less contrast of conflicting ideas. Being side-by-side also made sure that he could see my computer during the meeting so that was another bonus. During the discussion, we were more so casual than formal which allowed for more candid and open discussion.  It allowed us to talk more which I think, is important. Considering that I have known my mentor for a long period time means that we have more than a mentor-mentee bond. We know each other from taekwondo so there were instances where we would talk about that in times of silence. A factor that I see impeding on our relationship in the foreseeable future is the absence of my mentor from March 27 – April 11. Sometimes, over Discord, I messaged my mentor about a small problem, usually dealing with personal preference. One example is the dir command on the cmd. In that period of time, he cannot help me. To overcome this obstacle, I can check Stack Overflow for answers. My mentor recommended this website for times when I have a question because you can see the credibility of the person who answers.

By our next meeting, I hope to have made my way through the makings of my calculator program. Next meeting, as my mentor and I discussed, will focus on inputting programs like the calculator into a https server so I use that for my base for my other projects.

 

In-Depth Blog Post #1

My in-depth project for 2020 is going to be programming. Which sounds kind of boring, I know. The idea of sitting in front of a computer for hours and writing a bunch of lines of text that most of the time don’t do anything doesn’t strike me as “exciting”, either. However, I hope that after sitting in front of the computer for a long enough time, I’ll be able to produce something exciting.

I think the reason why I was drawn to programming is the fact that it’s such a diverse topic and there could be so many products that one makes. By the end, I want to have finished about 3 or 4 of these products to show on the night of in-depth. I have a rough idea for what I want to do for these projects but what they are will depend upon what language I will be learning and my mentor.

Speaking of mentor, I have already found who that is; James is a professional programmer that I know from the Taekwondo place that I go to. I know his last name but I don’t know the spelling so I’m not going to type it up. Just in case because if I get it wrong, I’ll be disrespectful. At his workplace, James uses Python 2 for their projects. Although Python 2 is very good as a language, I want to learn Python 3. They are both very similar; however, Python 2 will not be receiving support after 2020. This is important for me because, I hope to pursue programming in the future. If I have expertise in a language that is further supported in the future rather than a dated one, it will be more useful. On the other hand, Python 2 is the language that my mentor knows best so it might be more practical. I have talked this little dilemma over with mentor and he says if I choose Python 3, it shouldn’t be a problem.

On the side, I am also going to use third party sources like YouTube and books to get information and to also learn or fix something. To get started, James recommended a website called Codecademy. In our first meeting I hope to gather information about tools I will be needing and how I can acquire them.

I will meet with James every other week on Sundays because that works with both of our schedules. We have decided to meet at the branch of the New West library on 6th Street because it’s close to where he lives and it is an easy transit for me.

Overall, I am really looking for to start in-depth for this year!