Homepage | About | Codes Used | Research ππ ΄π Ώπ Ύππ Έππ Ύππ
ππ ΄π ΄π Ίπ »π ππ ΄π ΅π »π ΄π ²ππ Έπ π ΄ π Ήπ Ύπππ ½π °π »
Week 1: Introduction with Scratch
What is
Scratch.mit is an online programming language and community created by MIT Media Lab to help young people and beginners in programming to have a good jumpstart. We used it on our first day to have a fun introduction with the activity called βHello Worldβ.
It is a good way to understand how Object-Oriented_Programming (OOP) Python works. It is because the sprites that are used to build in Scratch represent the objects in Python. Scratch is an example of visual programming which helped me understand how an object handles functions and data.
What is Visual Programming?
Visual Programming is a programming language that uses graphical components and elements such as buttons, symbols and icons to develop a program. One of the examples is Scratch where you click and drag the available buttons to create a workflow of the program.
What are some of the programming principles that you have discovered?
Below are some of the programming principles that I have discovered yet need to be fully understood.
- DRY (Donβt Repeat Yourself) - donβt use duplicate code, instead Abstraction ** Itβs important not to abuse it, duplication is not for code, but for functionality.**
- Open Closed Design Principle - βClasses, methods, or functions should be Open for extension (new functionality) and Closed for modification.β The key benefit of this design principle is that already tried and tested code is not touched which means it wonβt break.
- Encapsulate What CHanges - the only constant thing in this world is the word change they say, therefore, encapsulate the code you expect or suspect to be changed in the future. The benefit of this OOP Design principle is that Itβs easy to test and maintain proper encapsulated code.
- Single Responsibility Principle (SRP) - there should not be more than one reason for a class to change, or a level should always handle single functionality. The key benefit of this principle is that it reduces coupling between the individual component of the software and the Code.
- Liskov Substitution Principle (LSP) - methods or functions which use superclass type must be able to work with the object of subclass without any issue. If a class has more functionality than subclass might not support some of the functionality and does violate LSP.
Can you share your favourite Scratch project that you have made or remixed?
I am more than happy to share my first-ever project. Hope youβll like it.
Project is not showing? Please click the link. Hello World in Scratch.
ππ ΄π ΅π »π ΄π ²ππ Έπ Ύπ ½:
The first day of school was both exciting and nerve-wracking.Β I am excited because itβs the start of a new learning adventure, meeting new people and making friends, but at the same time, nervous because I donβt have any background about the course Iβm taking. Will I be able to make it? Is it going to be difficult?
Encountering Scratch for the first time is a bit challenging. I followed the instructions and tried to work my way. Itβs funny and a shame when I asked my kids if they know what Scratch is all about to which they all said yes.Β They explained to me that itβs a site used by those who want to learn about programming. MyΒ second son showed it to me and explained some basic navigation. He reminded and reiterated to me watch the tutorial to make it easy for me.
Learning:
To be able to copy the respondentβs answer, set the variable and concatenate. I set the variable name = answer. The tutorial showed how I can create a background which is easy as I only have to choose from the options provided. I learned that you can add a sprite (character) to make an animated conversation which I tried.
I was able to make my first βHello Worldβ project.Β I thought to myself, I can handle it so I looked forward to making it to the next session.
Reference:
Programming Principles from 10 Coding Principles Every Programmer Should Learn