To really feel comfortable learning any language there are four main areas you need to start with.
1. Data and Data Types
What types of data can my variables be, how do I declare the variable? What operators are available to do mathematical and boolean operations with my variables?
What collections are available to group my data like arrays, objects, maps, tuples, etc.?
2. Control Flow
How can I make conditional code? (ifs, switches, ternary)
How can I repeat code? (while and for loops)
3. Functions
How can we encapsulate code into a function I can call when needed?
How do I pass parameters to that function?
How does that function return a value, what if it doesn't?
What's a pure vs impure function?
4. Object-Oriented Programming
How can I encapsulate data and functions into a class (if possible)?
How can I define what occurs when an instance of the class is created and destroyed? (constructors/destructors)
How can a new class borrow the structure of a class already created? (inheritance/polymorphism)
How can I alter the structure from the borrowed class into the new class? (overriding)
Practicing
Once you learn these concepts it is just a matter of applying a particular language's nuances and syntax to these concepts. Below is a coding exercise that will help you practice all the above.
Exercise
- Create a fighter class
- each fighter should have a name, health, strength and defense attribute
- each fighter should have an attack method and defense method
- use randomization to set each fighter's stats and to randomize the effects of the attack and defense methods
- instantiate two fights
- create a loop in which the two fighters will fight till one's health is depleted
repeat this exercise for each language you learn.
Learn languages
below are playlists I've made teach the basics for several programming languages:
GO -> https://www.youtube.com/watch?v=LpRGrjKmOFs&list=PLY6oTPmKnKbZbFOW6r6YulR1_9SCrdyOZ
Clojure -> https://www.youtube.com/watch?v=QUaZOprIaLs&list=PLY6oTPmKnKbarM5X9VpYCVtPH85rsunv0
Python -> https://www.youtube.com/watch?v=zd4Z8pjVCf0&list=PLY6oTPmKnKbaTvgXqNCRXcKnqbO5j2oQn
C# -> https://www.youtube.com/watch?v=Qz-4d_HH0lY&list=PLY6oTPmKnKbaQfi5KyW7IexlIsIKD1Oqb
Dart -> https://www.youtube.com/watch?v=BTn36FhprnM&list=PLY6oTPmKnKbZaOObALdHSgGTZhne6Q-yJ
Elixir -> https://www.youtube.com/watch?v=MQYHu2GuRfU&list=PLY6oTPmKnKbYZhj8LsQ3yq1vn-HwlpkkS
Swift -> https://www.youtube.com/watch?v=ctughz7bbnQ&list=PLY6oTPmKnKbYn60pD3UYfYw7BzxGY2Do0
Kotlin -> https://www.youtube.com/watch?v=N5z2RDR9sk0&list=PLY6oTPmKnKba9Xg06DR67IxdppdKsQZ_s
Ruby -> https://www.youtube.com/watch?v=4yMGIgXcJJM&list=PLY6oTPmKnKbZp8Kh6jS5A6j-6H2kGY12e
PHP -> https://www.youtube.com/watch?v=scsmssXd47U&list=PLY6oTPmKnKbbLnwRkrCDhOl94iaibHwBJ
Javascript -> https://www.youtube.com/watch?v=yF-AdLnhj3I&list=PLY6oTPmKnKbZDZ9cRrRby4Wnr4GIJj5O3
Bonus for WebDev
HTML/CSS/JS -> https://www.youtube.com/watch?v=qrM2dKRDN-E&list=PLY6oTPmKnKbbeAFC_F_f6jBKU4Xfu24sX
CSS/SASS -> https://www.youtube.com/watch?v=urFkrlRGnDI&list=PLY6oTPmKnKbZXeMjA3ngkpE_4puPstrLT
Full Stack with Express -> https://www.youtube.com/watch?v=SZxyYKhAvQQ&list=PLY6oTPmKnKbZeKlNGxOrL2Crl-tm1bxbJ
Full Stack with Koa -> https://www.youtube.com/watch?v=8_aWw7lfKKI&list=PLY6oTPmKnKbbF4t0Y9DcUVYi7f4kix7Qj
Full stack with FoalTS -> https://www.youtube.com/watch?v=mvoBeTdMFUE&list=PLY6oTPmKnKbY6v7zR9h1INfywh-qFLSQ_
Full stack with Laravel -> https://www.youtube.com/watch?v=3eWGqdyMJ5Y&list=PLY6oTPmKnKbZ5TgZKeh0uKT6d1DenRmx1
Full Stack with NextJS -> https://www.youtube.com/watch?v=ES0luPNdbRs&list=PLY6oTPmKnKbZBfml7eZ-ubwCEMC4EjdTN
Vue -> https://www.youtube.com/watch?v=_EwtLQ7BZkc&list=PLY6oTPmKnKbbsEAIDfFAlhAVbSCIt2Bxx
Angular -> https://www.youtube.com/watch?v=_EwtLQ7BZkc&list=PLY6oTPmKnKbahNK_YUsjTzP5U-FkGA544
React -> https://www.youtube.com/watch?v=_EwtLQ7BZkc&list=PLY6oTPmKnKbba6LlpF7kcnsyWdlwePt_V
Stencil -> https://www.youtube.com/watch?v=btQ7Whq8xcU&list=PLY6oTPmKnKbazpUTMcGmvMtgU5sr0Ip-V
Svelte -> https://www.youtube.com/watch?v=Cu-JVd8MKaU&list=PLY6oTPmKnKbZpyj6WhUsjri1Tw_BO-obP
Gatsby -> https://www.youtube.com/watch?v=_EwtLQ7BZkc&list=PLY6oTPmKnKbZgxwVjSuk-SkgoFNuMBWL_
Bonus - Computer Science Concepts
https://www.youtube.com/watch?v=QwnFW-Wf10Q&list=PLY6oTPmKnKbbfwjU1ToZlUWCinxmFqlIp
Top comments (0)