So here's the context.
Python was my first language, 💙 It's been a while since I've picked up a new language.
On encountering a problem, I've always thought of these using these two if possible.
It was all fine and good, but then one day my mentor asked me to write a simple local web crawler within bounds that a layman could use.... No, you don't get it, he wanted an .exe file 🤯 !!! which made me think... 💭 All these languages I know need an environment to run on.
A lot of solutions that I've developed are not very end used friendly. they'll either need this node environment, or this Python binary or some random GitHub dependency hiding deep within...
Development times with c++ are straight out Astronomia with me. cause i'm dumb 😐
While you can try to transpile and compile these languages (python and JS) it's just not practical at times.
So I set out on a short journey into google searches, and came out with go.
✅ It's got a short name. a very short name.
✅ It's got this sick concurrency model which is 🔥 once you think about it.
✅ It's multi threaded. via go routines, you can multiplex your routines on a single thread or spread them over multiple threads by default if you want.
✅ It's easier to read than some other languages. cough c++, cough java
✅ It compiles down to byte code if you want. Just a binary. no environment needed. Combined with the easy syntax. thats's 🔥 if you ask me.
✅ I've got a friend who knows Go, so I can go cry to him about my problems and he will help me... probably
My approach to learning GO.
Instead of learning the syntax and sematics of the language, then slowly gradually understanding about the inner workings of the language.
I did a pro-gamer move, I just dove deep in the Design of the language. The thinking behind the structure and what problems was go intended to solve.
I'll be honest, I did not expect this to work as great as it did. I am fairly comfortable with writing Golang code with my ongoing internship, and i'm also looking forward to contribute to projects that use it.
Takeaway here is,
If you feel that the language syntax is easy, and this is not your first language, maybe you could skip to the fun stuff.
and I'm going to follow this technique of first understanding how a language work for future languages as well.
Some Pointers when trying to learn the way I've been learning.
- Look at the problems the language tries to solve.
- Look at the Design Principles the language expects to be followed. Eg: Java is easier with an Object oriented approach, elixir expects a Functional approach.
- Look at concurrency patterns inside the language.
- Look at the restrictions language puts on you, this will be crucial in future when you have to decide on the wheter to use that language or not in future.
- Look at the Language community as well.
- Watch talks in conferences about the Language. This is sooo under-rated!!! I've learnt so much with just two or three talks. It is an amazing way to share learning.
Resources I've used
Great explainations about why go is the way it is.
Take the GO tour
Awesome resource in general to study from.
This is so crucial! I'll admit I did not know the difference in meaning earlier. 😅 Concurrency means multiple computations are happening at the same time. One piece of code will be executed at a given time.
Parallelism is running multiple things at once. this usually means that we more than one pieces of code being executed at any given time.
Go playground . Awesome tool, enough said
It's so easy to do this, it's filthy. and I did not value this enough while doing JS but, being ably to just play around with code and not worry is sooo soo beneficial to learning
Great talk worth watching. trust me. It's advice that's going to help you in languages other than JS as well.
IMO all gophercon conference talks are awesome. I've just not had enough time to watch them...
Go lang blogs Legit Goldmine of knowledge.
If you got any great resources you'd want to share, drop'em in the comments!
But it's not all rainbows and sunshine, I'll talk about the cons it later tho. I don't want people to shy away from learning this awesome language.
alright see ya..
I gotta go
The pun potential is strong with this one.
Okay seriously, end of the blog now... 😬