Log of what of Shuyi Zhou has learned at Techie Youth
Thu. Aug. 11, 2022
PHP Fundamentals
Today I learned the basics of PHP language, its concept and syntax are very similar to Java, their if statement, switch, while loop, declare a function, and math operator are the same. But there are still some differences between them. Below are the codes that are different from Java.
- Use PHP language on HTML have to add <?php ..... ?>, the PHP code write inside of it
- Display something on the screen has to add echo in front of the code
- Uppercase a string: strtoupper(string), lowercase work the same way
- Declare a variable: $viriableName
- Input and display value format: <form action="website url" method="get">
Name: <input type= "variable type" 'name="name">
<input type="submit">
</form>
<br>
<?php echo $_GET[“name”] ?>
- Declare array: $arrayName = array(values separated by comma)
- Declare associated array: $arrayName = array(“value”=> “mapping value”), so when echo the value, screen will display the mapping value.
Tue. Aug. 9, 2022
How to improve life quality?
1. Time management
- Schedule everything even the small thing
- Turn off phone notifications so you would not distract
- Priority do the thing that you don’t want to do the most and want to procrastinate about
- Take a break to clear your mind so that you would be more focused
- Avoid multitasking to increase productivity
- Use the planning tool
- Get help from others when you can’t solve the problem
- Reward yourself with the things that make you feel relax
2. Health
- Sleep a reasonable sufficient amount each night
- Be physically active
- Eat healthy and eliminate junk food
- Exercise
- Having a pet will make you live longer
- Meditate
- Interact with people who you enjoy spending time with
3. Stress management
- Don’t let others control you, stay calm when someone tries to make you mad
- Lower your expectations, not everyone is perfect, accept your weakness would make you feel more comfortable
- Find your value, you can do the things that make you feel better about yourself and make the world better.
Mon. Aug. 8, 2022
Python Fundamentals
Today I learned the basics of python, the principle of programming is similar to JavaScript, but its syntax is somehow different. For example, declaring a variable in Java is like: var variableName = value; but in python it’s like: variableName = value. The main difference in syntax is that the developer does not require to write the type of variable and semicolon in python.
Code:
- input value: variableName = input (‘question’)
- Convert variable type: variableType(variableName)
- Print characters of a string: print(variableName[indexStart:indexEnd])
- Length of a string: len(variableName)
- Uppercase a string: variableName.upper()
- Find index of a character: variableName.find(‘character’) //return -1 if can’t find
- Math operators: 10//3 means 10 divided by 3 get integer 3; 10/3 means 10 divided by 3 get 3.33333; 10**3 means 10 to the power of 3; 10*3 means 10 multiplied by 3.
- Math function: round(x), abs(x), etc. (Find more in python 3 math module)
- If statement:
if condition:
command code
elseif condition:
command code
else:
command code
- While loop is similar to if statement and it can use with else statement
- For loop example: for item in range(4)/for item in [0,1,2,3], it will iterate 4 times, each iteration item will store the number value.
- There are a lot of methods included: variableName.count(), variableName.append, variableName.insert(), etc.
- Debug:
try:
command code
except Error:
command code
- declare a function: def functionName(parameter):
code…
class className2(className1):
pass
Fri. Aug. 5, 2022
JavaScript fundamentals
JavaScript is the most common language used in the front-end. JavaScript was initially designed to run only in browsers to build interactive web pages, but now it can use to build games, networking apps and mobile applications.
JavaScript variable rules:
- cannot be a reserved keyword
- should be meaningful
- cannot start with a number
- cannot contain space or hyphen
- are case sensitive
- constant variable cannot reassign.
Javascript Code:
var variable;
let variable;
const variable;(cannot reassign)
let object = {
Variable: value,
Variable: value
…
};
- Change properties of an object:
object.variable = value;
object [‘variable’] = value;
function functionName() {
command code
…
}
Wed. Aug. 3, 2022
How to make a website with Wordpress and What is SQL?
We can make a website without coding by using Wordpress.com, but there are downsides: -your website could be deleted
- can’t monetize with ads;
- can’t upload plugins;
- can’t upload customize theme;
- do not own your domain name (website address ends with “.Wordpress.com”).
If you don’t want these downsides, then use Wordpress.org.
I learned how to make a website by watching “how to make a WordPress website step-by-step”. This video talks about how to use Wordpress in detail, such as steps to change a theme, to choose non block-based custom font, to insert images and videos, to customize the webpage and so on.
What is SQL?
SQL stands for structured query language that is used for communicating with relational databases. Today I learned the fundamentals of SQL from NCLab and own a certification. I think NCLab is really helpful. Here are the basics that I have learned:
- Display whole table: SELECT * FROM tableName;
- Display specific column: SELECT columnName From tableName;
- Display specific row: Limit _;
- Sort data: ORDER BY _;
- Sort data in reverse order: ORDER BY _ DESC;
- Display data with condition: WHERE (condition) AND/OR (condition);
- Select row that contains specific words: where rowName like ‘%words%’;
- Select row that begin with specific words: where rowName like ‘words%’;
- Select row that end with specific words: where rowName like ‘%words’;
Tue. Aug. 2, 2022
How to host your own website?
Host website with platform:
1. Netlify(free)
2. HostGator(charge)
Host website with windows:
xampp:
- Start Apache and MySQL
- Delete all files in xampp-htdocs
- Create a text file and name it “index” to code a website
- Save the text file as index.html(type: all files)
- Create a “noip” account and download it so that anyone with the web link can access it.
SSL ensures that data sent between a browser and your web server is secure.
Domain name is a human-readable address that is an alias for the IP address pointing to your website, such as “.coms" and names ending in .org, .net, .co.uk, and many other TLDs.
Mon. Aug. 1, 2022
Code that I have learned today for making a website
Padding: Add space inside the block
Margin: Reduce block space
Divide block: display: inline-block;
Row or Column: flex-direction: row;/flex-direction: column;
Remove bullet point: list-style-type:none;
Round the pic corner: border-radius: num%(50% circle);
Shadow: box shadow: color horiz verti px;
Responsive Design (making website fix on any device):
@media screen and (condition) {
}
Fri. Jul. 29, 2022
How to learn to code efficiently?
Bird’s eyes view
- understanding what computer science, web development, and software engineering are;
- understanding each word related to programming.
Find learning resource
- Youtube
- Google
- MDN documentation
Build while learning
- “Knowing without taking action is not knowing”
- build micro-project
- repeat building
Learn well
- learn slowly to make sure fully understand
- focus on one language
Don’t quite
- stay with the problem longer when encountering a challenge
Thu. Jul. 28, 2022
How to manage your finances?
The best way to manage finances is to make a budget. Budgeting allows you to clear how much you spend and save each month so that you can adjust the spending plan and achieve your financial goal.
The second way is to consider before purchasing, such as whether the item is necessary, whether there are cheaper equivalents, and if the item can be resale at a reasonable price.
The third way is to buy less because small daily expenses can accumulate into a considerable amount of money.
The fourth way is to invest when you have excess money.
Wed. Jul. 27, 2022
How to get hired?
1. Create a Linkedin account
- must have an appropriate photo;
- post work experiences, education, skills, etc;
- enter the headline and summary that best describes you.
2. Create a resume
- name and contact information;
- list experience, skills, activity, awards, and education that are related to the position you apply for.
3. Cover Letter
- tell the hiring team why should they hire you, and what makes you become the best candidate.
4. Prepare the interview
- fully clear the job description;
- research the company;
- practice the interview with someone you are familiar with.
Tue. Jul. 26, 2022
How To Be An Entrepreneur
Today I explored the topic of entrepreneurs. There are two types of entrepreneur, one is SME represents small medium enterprise entrepreneurship that serves in the local market, the cash flow will be linear growth; the other type is innovation-driven entrepreneurship that looks for the global market, it needs a lot of capital so the cash flow will be negative initially and then grow exponentially. There are three things that encourage a person to be an entrepreneur which is technology, idea, and passion. Leadership skills are necessary for an entrepreneur because a business is not an individual, a team is involved, and they have to manage the business and lead the team.
Mon. Jul. 25, 2022
Knowledges That I Have Learned
Today I learned the benefits of remote working, how to find remote jobs on various websites, and some interview skills.