How I learned to code... in less than a week | And how you can, too.
Programming is something that greatly complements my obsessive-compulsive tendencies; cross all Ts, dot all Is, and close all parentheses... so very me.
"We teach you how to code. Period."
In a computer science course I took as an elective in college, our professor said something that was, albeit a little too bragging, unforgettable. He said (literally verbatim), "Here in the Institute of Computer Science, we don't teach you how to code in Java. We teach you how to code. Period."
It was an object-oriented programming (OOP) course, with Java as the main programming language, and it was difficult and extra-challenging. But I guess, like what that professor said, it wasn't all about the language.
It was all about how you execute it.
My undergraduate thesis was a huge block of Fortran code. It took up 18 whole pages of my thesis manuscript.
Learning Python.
If there is a programming language that I can say I excel at, it was Fortran. You probably haven't heard of it or you already probably did, but it's basically a programming language that scientists like me find helpful. It is perfectly built for numeric and scientific purposes, but hey, you can also code simple games using the language. Not as flexible as OOP languages, but still good enough to create interactive games.
But science is an ever-evolving field.
Soon after graduating, I realized that in this cruel world, Fortran is hardly ever used... in fact, I'd never used it for work.
What everyone seemed to be using was this programming language I only ever heard of, but never really have got my hands on: Python.
Learn it, quick!
On my first day in my first ever work, I quickly realized that I had to learn how to code with Python as if I speak it, if I want to be of any help in the organization at all. And just like that, in less than a week, I learned to code in Python... although not speak it, but hey, that was a start!
Here's how I learned how to code in Python in less than a week... and how you can, too.
1. Read about it.
The internet is truly a blessing. Everything is literally at the palm of your hands. A quick search about Python taught me a lot of things all too quickly. From books to interactive forums to repositories, learning even the simplest thing about the Python programming language is one click away.
A quick Google search will give you millions of results with a single click.
2. Start simple.
The best thing about programming is getting your script to actually work. A simple print("HELLO WORLD!")
was enough to make me so happy. And yes, a simple 'HELLO WORLD!' is always a good start.
Start simple, then play around with it!
3. Think it through.
Wikipedia defines algorithm as an "unambiguous specification of how to solve a class of problems."
Your script isn't just a chunk of code. It carries solutions to your identified problem. Write pseudo-codes that lay out how you want your program to work. You don't even have to know the proper syntax, or how to write it Python-wise. You can think about the code itself later on.
4. Write down your codes.
When I got the hang of how coding with Python works, I started randomly writing down scripts on my notebook. It didn't matter that I probably got some of the code wrong, but soaking in it and writing down everything you know will make everything you know about the topic transparent to you.
If it had to get down to it, solve equations. Write down problems. Jot down algorithms. Tattoo even just the little things in your brain and believe me, soon, they will just bleed out, almost automatically.
I had to learn data mining and deep learning along with Python at work. I literally studied backpropagation (both the concept and the algorithm) a whole 3 days, and writing down equations, algorithms, and pseudo-codes helped heaps.
5. Play.
Programming is really challenging, but it is, at most, exhausting. I found it helpful to divert my attention from learning to code into playing. One really awesome game that you can enjoy and yet still work your brain out is Brain Wars. It's pretty addicting, and you might decide that playing it is way better than slaving yourself with learning to code in Python. 😉
Whispers, "YOU'LL FREAKING ENJOY THIS GAME."
6. Don't stop.
It will get hard. And harder. And even harder. But learn not how to code in Python, but learn how to code.
And yup, those are two different things. 😉
Enjoy
Famous last words: enjoy programming. Love it. Speak it. Make it your baby. Sometimes you'll just suddenly sprawl on the ground and complain, "This is so hard, why am I even doing this?" and believe me, I've done that countless of times. But where there's a will, there's a way. Make the most out of it.
Same here! I studied Python because its a requirement in my job. Your step by step process is amazing. Reading the documentation helps too! I keep a separate notebook for all the new functions that I learn and read it from time to time. There are some youtube channels that are great in explaining basic python (check out sentdex). I hope your post helps a lot of people. :)
Thank you @rigi! 😊 Those are definitely points to remember (that I missed in this post). And good point about the documentation, how could I have missed that?! 😅
I believe the best way to learn programming is to do it by ourselves. There are two ways, I guess:
I learned Fortran using the latter. :)
Mukhang madali ha. :D :P
Yakang yaka. HAHAAHHAHA CHOS joke lang hirap na ko sa liiife. 😂
Super inspired, I studied accounting but said bye bye to this field about six months ago. Started learning coding, started with HTML, CSS and learning javascript nowadays. It's an OOP too and since Friday, I haven't been able to fully understand the function thing :D
My interest in coding started with HTML, too! Then my interest slowly branched out to other languages, and I'm sure it will do with you as well. :) OOP can be really tricky; I get lost in between instances and methods and all other possible OOP jargons you could think of quite too often. XD So I stuck with the scientific/mathematic side of things, and am now exploring deep neural networks (you might find this interesting, too!).
Thank you for dropping by, @ghulammujtaba! :D
Amazing, followed you to keep myself updated with your posts, may be poke you on steem.chat or on Discord, you are there, right?
Thank you! And yes, I'm on both, although I'm not as active on chat as here on steemit. 😅
Hi Aira, wow this is a level up. my vision blurs looking through those codes, no clue at all. anyway, thanks for the advance tip, i will look back on it soon (~ graphics + codes = awesome game!) i hope i got it right, lol. its really interesting to know about it. :-)
YES! Data science in particular has been in my bucket list to learn in 2017, and I'm happy to cross it out. Graphics + codes = awesome game indeed. 😁
I really have to work on my obsolete and rusty coding skills. :((
Yesss. :((
it is hard to learn coding for me, I do not have computer science or math background. Anyway thank you for sharing your experience :)
Thanks for dropping by @happyphoenix! It's true that without a computer science or math background, coding could be hard, but with enough practice, you'll get through it. :) It's worth a try; your brain will be exercised ;)
Among all programming languages, I loved learning Python the most. It is beautiful.
That is so true! In the small time I've been working with Python, I fell in love with it. Simple, easy to learn, but very flexible. Thanks for dropping by, @usmangabol!
Oh no.... Coding! Coding!! Warning! Dizzy........
😂