When learning a new programming language
Speaker: Greg Weng
Slides: https://tinyurl.com/y7ebvyu2
Talk
I love programming languges
- I've learnt Java, ruby, python, Elm, Go, Haskell
Show the diagram from a simple statement
- My mind map whien learning a new programming language
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- If language doesn't have
Maybe
or Optional
feature you'll get NullPpoin
feature
Program = symbls = macro (LISP one)
- |Looks like | Symbols |
|f x = x + y | [=,[f,[x]],[+,[x,y]] |
- Every thing you write and read is from symbols
Walls in any language without LISP macro
- No way to easily and freely implement AOP, decorator, runtime analytic tools, and etc
- Need language natively support them
- Another way to workaround this issue is binary hack
- Language…
Program = symbols run on a logic machine
-
Looks like |
The machine does |
f x = x + y |
1. Find + in symbol table |
|
2. Find & get value of x |
|
3…and etc. |
Implicit type info = how it can be used > what it is
- Dynamatically typed language
- Statically typed language
No strong type inference = explicit
Generic, or duplicated code + casting
- Don't repeat yourself and don't do the machine's jobs
State management
- Program = symbol + type + value
- Value is the state of a program
- Immutable = Channing input/output
Mutable = Changing black box
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Effect management = why <something> can be here
-
One simple thing |
Become multiple purpose |
request.send() |
perf.start("send request") |
request.await() |
…and etc |
- Become multiple purpose with reasons + language support at type level
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Parallel or Async or Concurrent computing
-
Serial |
Parallel |
Async |
Concurrent |
|
|
|
|
Recall of the knowledge of learning a new language
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
By writing a toy program…
- You pratice both high-level and low-level features of the language
- You don't need to dive into some super complicated or difficult program
- You usually avoid any topic with heavy infra dependency (e.g. write a distributed database)
- You figure out how to create API, read/write from the network, filesystem, and database
- You learn how to split fuctions into files, modules, and how to pack them as a installable package
- You re/organize your program by functions, state keepers, shared or specialized units
- You try several popular solutions by the language's community
- Don't need to ask whether it is meaningful to create and extends the program!
I choose ChaCha20 for practising new any language
- Start from MVC ChaCha20, then…
- ChaCha20 –> Modularized –> Parallel/async –> IO, network –> Streaming, as API, Database –> Packing
Q & A
-
Q: How to choose a language to learn?
A: For you compancy, You could choose the language with the support from a big company or good community.
|
-
Q: When you run into a problem you cannot solve, how do you get around the block?
A: Choose another implementation or negotiate the requirements according to benefit and cost.
-
Q: Which is your favorite language?
A:
-
Q: What's your motivation of learning a new language?
A: I love to realize the design of a language