【ENG SUB】前端自学Python一星期,能干点啥?I learned Python in a week

小雨在烦恼什么
22 Jan 202206:49

Summary

TLDRThe speaker shares their journey of learning Python in 2022, despite previous attempts and giving up. They discuss the popularity of Python, its use in various sectors like tech companies and non-software companies for tasks such as backend development, data analysis, and even HR tasks. The speaker highlights Python's simplicity, ease of setup, and rich module ecosystem, which makes it an attractive language for beginners. They also reflect on their experience writing a Python script to automate video analytics collection for their Bilibili channel, comparing it with a similar task done in Node.js. The video concludes with the speaker's realization of Python's versatility in fields like web crawling, data visualization, testing, and office automation, and its value as a second programming language for tech professionals. They encourage viewers to consider Python for its practical applications and potential benefits in enhancing productivity and employability.

Takeaways

  • 📅 The speaker started learning Python on January 11th, 2022, with the goal of expanding their skills to handle more freelance projects and to be able to read Python code for work.
  • 🌐 Python is a popular programming language widely used in the tech industry, including by big companies like Google and Facebook, and for various purposes such as backend development and data analysis.
  • 💡 The speaker emphasizes the importance of learning new programming languages to stay competitive and mentions their past company's encouragement of learning Python through free courses and learning groups.
  • 📚 Despite previous attempts and resources, the speaker struggled to find time to learn Python due to a full-time job, highlighting the challenge of learning something new while working.
  • 🚀 The speaker finds similarities between programming languages and suggests focusing on the differences when learning a new language, noting that Python and JavaScript are not too different.
  • 📈 The speaker appreciates Python's simplicity and ease of setup, as well as its rich ecosystem of modules that can be easily installed and used.
  • 🕸️ The speaker's first practical application of Python is to create a web crawler to automate the collection of video analytics from Bilibili, which was a time-consuming manual process.
  • 🤔 The speaker expresses concerns about the legality and ethics of web crawling, opting to use Bilibili's open API for practice to avoid potential issues.
  • 📈 After creating and debugging, the speaker successfully wrote a Python script to fetch video analytics, and considers building a video analytics platform for Bilibili creators.
  • 📊 The speaker also contemplates using a chart library to visualize data, aiming to create a personalized analytics tool and potentially uncovering insights into the platform's algorithm.
  • ⚖️ The speaker compares Python with Node.js, noting that while Python's script is lighter in file size, Node.js is faster in returning data for the same task.
  • 🔧 Python is presented as a good option for beginners due to its ease of use and lightweight nature, suitable for a variety of applications from web crawling to data visualization and beyond.

Q & A

  • What is the speaker's motivation for learning Python?

    -The speaker wants to learn Python to handle more types of freelance projects, read Python code for work if needed, and to potentially use it for productivity scripts in their free time.

  • Why does the speaker feel that Python is popular in the Bay area?

    -The speaker believes Python is popular because it is widely used by big tech companies like Google and Facebook for backend development, and even non-software companies use it for data analysis and report generation.

  • What is the speaker's previous experience with programming?

    -The speaker already knew Node.js and had tried learning Python in the past, but had not been successful due to time constraints and lack of motivation.

  • How does the speaker find Python's syntax different from JavaScript?

    -The speaker notes that Python does not use curly braces `{}` to segment code; instead, it uses indentation and colons `:`.

  • What does the speaker find appealing about Python's environment setup?

    -The speaker appreciates that Python is easy to set up, requiring only a download of the Python package and the use of `pip install` to add modules.

  • What is the first application the speaker created using Python?

    -The speaker created a web crawler to fetch video analytics from Bilibili, which was a task they previously found time-consuming.

  • Why did the speaker decide to use Bilibili's open API for their crawler practice?

    -The speaker chose to use Bilibili's open API to avoid legal issues and to practice without infringing on data from other websites for business use.

  • What is the speaker's opinion on Python's performance compared to Node.js?

    -The speaker found that for the same task, Node.js returned data faster, but noted that Python scripts are lighter in file size compared to a Node.js project.

  • What are some of the other uses the speaker mentions for Python?

    -The speaker mentions that Python can be used for writing tests, office automation, data science, backend development, and machine learning.

  • What advice does the speaker give about learning Python for job prospects?

    -The speaker advises researching job opportunities in one's area and understanding that becoming proficient in a field takes time, project experience, and sometimes formal education.

  • Why does the speaker consider Python a good second programming language for tech workers?

    -The speaker believes Python is beneficial for tech workers as it can be used for simple applications like data analysis and productivity tools, which can enhance daily work or life.

  • What was the speaker's final takeaway from their experience learning Python?

    -The speaker concludes that Python is a good option for beginners, as it allows one to get a feel for programming quickly and can be a valuable addition to a tech worker's skill set.

Outlines

00:00

📚 Starting Python Learning Journey

The speaker shares their decision to learn Python on January 11th, 2022, despite previous attempts and failures. They already knew Node.js but wanted to expand their skills to handle more freelance projects and potentially read Python code at work. They highlight Python's popularity, its use in big tech companies, and its application in various non-software roles. The speaker also discusses their past opportunities to learn Python and the challenges faced due to time constraints. They emphasize the similarities between programming languages and the importance of focusing on differences when learning a new one. They describe their learning process, the simplicity of Python's syntax and environment setup, and the ease of using Python modules. The paragraph concludes with the speaker's realization of Python's utility in creating a personal video analytics tool for Bilibili and their mixed feelings as a JavaScript developer.

05:01

🤔 Reflecting on Python's Versatility and Learning Curve

The speaker compares their Python and Node.js scripts, noting that while Python may be slower, it is lighter in file size and offers a quicker entry into programming for beginners. They discuss the broader applications of Python, including web crawling, data visualization, backend development, and machine learning. However, they caution that mastering these fields requires time, project experience, and sometimes formal education. The speaker advises aspiring learners to research job opportunities in their area and align their learning goals accordingly. They also mention that Python is a valuable second language for tech professionals and can be beneficial in interviews for a variety of positions. The paragraph ends with the speaker expressing satisfaction in fulfilling a New Year's resolution and thanking the viewers.

Mindmap

Keywords

💡Python

Python is a high-level, interpreted programming language known for its readability and ease of use. It is widely used in various domains, including web development, data analysis, artificial intelligence, and scientific computing. In the video, the speaker expresses their motivation to learn Python to expand their skill set and handle a broader range of freelance projects. Python's popularity is also emphasized, with mentions of its use in big tech companies and across different departments within an organization.

💡Node.js

Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside a browser. It is widely used for building scalable network applications. The speaker contrasts their familiarity with Node.js to their new endeavor of learning Python, highlighting the differences in syntax and structure between the two languages. Node.js is also used as a benchmark for performance comparison in the context of writing a script for video analytics.

💡Script Language

A script language, also known as a scripting language, is a type of programming language that is interpreted rather than compiled. They are often used for automating tasks, creating scripts for games, and building applications that require rapid development. The speaker's desire to learn another script language like Python is driven by the need to enhance their versatility in handling different types of projects.

💡Freelance Projects

Freelance projects refer to work that is done by a person or company that is not part of the regular staff of a company and is self-employed. The speaker aims to learn Python to increase their ability to take on a wider variety of freelance work, suggesting that Python's versatility and popularity make it a valuable skill for freelancers.

💡Data Analysis

Data analysis is the process of inspecting, cleaning, transforming, and modeling data to extract useful information, draw conclusions, and support decision-making. In the video, the speaker mentions that colleagues in their previous company used Python for data analysis, creating reports with visual aids for management. This application of Python showcases its utility in handling and interpreting data.

💡Web Crawler

A web crawler, also known as a spider or bot, is an automated program that systematically browses the web to create a copy of all the visited webpages. The speaker discusses their intention to use Python to create a web crawler to automate the process of collecting video analytics from Bilibili, which would otherwise be time-consuming to do manually.

💡API (Application Programming Interface)

An API is a set of protocols, routines, and tools for building software and applications. It allows different software systems to communicate with each other. The speaker plans to use Bilibili's open API to practice creating a web crawler and to gather video analytics data legally and efficiently.

💡PIP (Package Installer for Python)

PIP is a package manager for Python that allows users to install and manage software packages. The speaker appreciates Python's ease of setup and the convenience of using PIP to install necessary modules for their projects, such as those for web crawling or data analysis.

💡Code Indentation

Code indentation in Python refers to the use of whitespace to delimit blocks of code. Unlike some other programming languages that use curly braces `{}` to define blocks, Python relies on indentation to indicate the beginning and end of blocks such as functions, loops, and conditional statements. The speaker notes their adjustment to Python's syntax, particularly the absence of braces and the use of indentation.

💡Productivity Tools

Productivity tools are applications or scripts designed to make work more efficient and save time. The speaker considers using Python to write scripts that can help improve their personal productivity, such as automating the collection and analysis of video analytics.

💡Backend Development

Backend development involves the creation and maintenance of the server-side application logic that powers websites and applications. The speaker discusses the use of Python in backend development, noting that while it is part of the tech stack in many companies, it is often used in conjunction with other technologies rather than as a sole backend solution.

Highlights

The speaker decided to start learning Python on January 11th, 2022, despite previous attempts and giving up.

The speaker already knew Node.js and wanted to learn Python to handle more freelance projects and read Python code for work.

Python is popular in the Bay area and used by big tech companies like Google and Facebook for backend operations.

The speaker's previous company used Python for data analysis and reporting, and even HR used it for email automation.

The speaker's previous company offered free Python courses and learning groups, but they didn't have time to learn it at that time.

Learning a new programming language is challenging, but the speaker is motivated to learn Python when they have time.

Python and JavaScript are not too different, with the main difference being in syntax and data structures.

The speaker spent less than 14 hours learning the basics of Python and found it clean, simple, and easy to set up.

Python comes with many modules, which can be easily installed using pip and imported directly into the code.

The speaker plans to use Python to create a web crawler to automate the collection of video analytics from Bilibili.

The speaker considered the legality of web crawling and decided to use Bilibili's open API for practice.

After debugging, the speaker wrote their first Python script in over two hours to return video analytics.

The speaker suggests creating a video analytics platform for Bilibili creators using the open API and a chart library.

Python chart libraries are plentiful, and the speaker considered doing an episode comparing them.

The speaker compared Python with Node.js for writing a similar script and found Node.js faster but Python scripts lighter in file size.

Python is considered a good option for beginners due to its ease and lightweight nature.

The speaker discusses the use of Python for backend development, machine learning, and other fields, but emphasizes the need for further learning and experience.

Python is seen as a valuable second programming language, especially for those in tech, for tasks like data analysis and productivity tool creation.

The speaker shares that having Python listed as a skill on resumes is beneficial for a variety of job interviews.

The speaker is happy to have checked off learning Python from their new year's resolution.

Transcripts

play00:00

Today is Jan 11th 2022

play00:02

I decided to start learning Python

play00:04

though I gave up on it many times before

play00:08

I already knew Node.js

play00:09

but I want to learn another script language

play00:11

so I will be able to handle more types of freelance projects

play00:13

and I will also be able to read python code for work if needed

play00:16

in my free time

play00:16

maybe I can use it to write scripts to help my productivity

play00:18

Python is a very popular programming language nowadays

play00:19

when I live and work in the Bay area

play00:21

I feel like everybody knows Python

play00:23

big tech companies like google

play00:24

facebook

play00:25

use python for their backend in some ways

play00:27

some companies use python for all of their backend

play00:30

in the company I use to work at (not a software company)

play00:32

coworkers in the operation team

play00:34

use python for data analysis

play00:36

and make reports with beautiful charts for management

play00:38

even HR's use python to send emails

play00:40

and they learned it by themselves

play00:42

so as someone who loves learning new things

play00:45

I have to learn it too

play00:49

in fact I have tried learning python

play00:51

in the past couple years

play00:53

my previous company even provided

play00:55

free

play00:56

python courses and learning groups to employees

play00:57

but I didn't have time to learn it.

play01:00

it's like I just get started and then I give up immediately

play01:03

but this is not an excuse

play01:04

as someone who worked full time at that time

play01:05

to make myself learn something completely new

play01:07

is quite challenging

play01:09

people say you can always make the time for it if you truly want to do something

play01:10

but the time is spent for work

play01:13

now I finally had some time

play01:15

I will learn it when I am still interested and motivated

play01:22

I think programming languages are similar

play01:25

if you already know one language

play01:27

when you learn a new language

play01:29

just focus on finding what is different from the language you already know

play01:31

the basic stuff like data structures

play01:33

functions

play01:35

loops and things like that are similar in different programming languages

play01:36

python and javascript is not that different

play01:39

I'm not used to that there is no {} in python

play01:41

instead you would use :

play01:42

and indent to segment codes

play01:44

the difference is in the syntax

play01:46

and data structure

play01:48

in day 3

play01:49

I went though all the basics of python

play01:52

this time I'm glad I didn't give up

play01:55

up until now I spent less than 14 hours

play01:57

at this point

play01:58

i feel like python is

play02:00

a very clean and simple

play02:01

it's very easy to set up

play02:03

the environment

play02:04

just need to download python package

play02:06

and that's all

play02:07

python comes with many modules

play02:10

just use pip install to grab it

play02:11

and then you can import the module directly and use it in your code

play02:13

and make many fun applications

play02:14

like for web crawler

play02:15

you will need the request module

play02:17

for data analysis you will need to install a chart library

play02:20

then just import it

play02:21

pass the data and you will get the graph

play02:24

I feel like

play02:25

it's a bit easy to use compared to javascript charts

play02:27

now I have mixed feelings as a js developer

play02:30

now it seems like I've learned python

play02:32

but there is just one question left

play02:35

that maybe many of you are also wondering

play02:37

what can you do with python?

play02:39

for me

play02:40

when I review my videos on Bilibili

play02:42

to see if people like my content

play02:44

since Bilibili

play02:45

didn't allow us to export

play02:47

my analytics

play02:48

so I had to check each video individually

play02:51

and look at the metrics I think it's important to me

play02:53

and then put them

play02:54

on my excel template

play02:56

then I can try to analyze it

play02:59

but this is quite time consuming

play03:01

I always had to spend a whole morning to collect the data

play03:02

in order to be more productive

play03:04

I need to figure out how to

play03:05

get my video analytics faster

play03:07

instead of me having to click on each video and find it

play03:09

so I will need a crawler

play03:11

here is the problem

play03:12

I just went through the whole video tutorial

play03:13

I still don't know how to make this application

play03:15

so I had to review a bit of what I learned

play03:18

and my notes

play03:20

then I start to figure out how to write a demo of my crawler

play03:22

first thing is to figure out how to run python script in vs code

play03:25

and how to install the modules I need

play03:27

I looked at projects of other people on github as examples

play03:28

and try to write something similar

play03:30

this is the learning method I tend to use

play03:32

it's good that

play03:33

crawler is simple

play03:35

step one is to start a request

play03:38

step two is

play03:38

to format the data

play03:40

you get from the request

play03:42

the tricky part is

play03:43

whether you can find the request address

play03:45

and whether it's legal to request data from that address

play03:47

this something I've been wondering

play03:49

technically

play03:49

it's not allow to use crawler to get data from other websites for business use

play03:51

but it seems like crawlers are so common

play03:53

that everyone knows how to do it

play03:54

so to avoid getting in trouble

play03:55

I will use Bilibili's open api for practice

play03:57

after creating bug and debug

play03:59

I officially wrote my first python script

play04:02

this took me a bit over two hours

play04:04

just run these 50-lines of code

play04:06

it will return my video analytics

play04:08

now I have the data I can do anything I want with it

play04:12

for example

play04:12

there is another open api to

play04:13

get creator id

play04:15

then we can use the creator id

play04:17

and get the video analytics of that creator

play04:19

to analyze

play04:19

so we can make a

play04:21

video analytics platform for Bilibili creators

play04:23

umm that's actually a pretty good idea

play04:25

another example is that we can use a chart library

play04:27

to visualize these data

play04:29

then I will have a personalized

play04:31

Bilibili video analytics tool

play04:33

I'll find out the secret to the algorithm

play04:34

it seems like I will be closer to 100k now

play04:37

I was going to do that

play04:38

but then I researched a bit

play04:39

and find that there are so many different python chart libraries

play04:42

to avoid making this video too long

play04:43

let me know if you are interested in

play04:45

another episode

play04:46

of python chart library comparison

play04:48

I can't help to write the same script using node.js for comparison

play04:52

since it's the language I'm familiar with

play04:55

it only took 10 min

play04:56

now let's compare them

play04:57

I'm not sure if

play04:58

I made any mistake

play04:59

for the same

play05:00

node is much faster in returning data

play05:04

but the code amount is the same

play05:07

it's about 50 lines

play05:09

in terms of the file size

play05:12

python scripts are much

play05:13

light weight than a node project

play05:14

of course

play05:15

these are all based on a beginner's perspective

play05:17

it's not a tutorial

play05:19

in summary

play05:19

I think python is actually a

play05:21

good option for beginners

play05:23

although it's slower

play05:24

it's easy and light weight

play05:26

it allows you to get a feel of programming in a short amount of time

play05:29

before you run out of interest

play05:31

besides crawler and data visualization

play05:32

python is also used for writing tests, office automation

play05:35

data science, etc

play05:36

further more, it can also use for backend development

play05:38

machine learning and much more

play05:39

but don't expect to get into these fields after you learned the language

play05:41

like web frontend development, you will need to learn the framework

play05:44

it takes time to master in these areas

play05:46

and accumulate project experience

play05:47

formal education is required in some circumstances

play05:49

long story short

play05:49

it's not something you can

play05:51

go from zero experience to getting a job in a few days

play05:52

if you are interested in backend development with python

play05:55

I don't think it's a good fit

play05:57

because there aren't that many companies just use python for their backend

play05:59

for what I knew

play06:00

like the big tech companies I mentioned before

play06:02

they are only using python for part of their stack

play06:05

if your goal is to get a job

play06:06

I think it's a good idea to research

play06:08

whether there are python jobs are out there in your area

play06:10

and what you personally wants to get into

play06:12

python is great as a second programming language

play06:14

especially for people who work in tech

play06:16

some simple application of python

play06:18

like data analysis

play06:19

coding some productivity tools

play06:20

it will help

play06:21

in your day to day work or life

play06:23

when I was interviewing interns in my previous company

play06:26

in their resume

play06:26

they like to include

play06:28

data analysis in the skill section

play06:29

even though they are not interviewing a programming or

play06:31

business analysis position

play06:33

this skill is great for interviewing

play06:34

a variety of positions

play06:35

it will be a big plus

play06:37

ok that would be all I want to share today

play06:40

I'm happy to check off another of my new year's resolution

play06:42

thank you for watching

play06:43

see you next time

play06:44

bye bye

Rate This

5.0 / 5 (0 votes)

Related Tags
Python LearningScript LanguageFreelance ProjectsCoding ProductivityBay AreaBackend DevelopmentData AnalysisWeb CrawlerPersonal ProjectsNode.js ComparisonTech EducationBilibili AnalyticsCoding TutorialBeginner's PerspectiveTech IndustrySoftware DevelopmentOpen APIChart LibrariesJob MarketInternship Skills