Skip to main content

Posts about #100DaysOfCode (old posts, page 8)

A Hundred Days of Code, Day 041

Started to very slowly do the Mega Flask Tutorial.
This real world project-cum-tutorial, should let me learn more real-world-esque Python and expand beyond the tiny vocabulary, I have.

Setup my environment today and created a baby flask app.
Even that had something to teach me.
I could not quite wrap my head around decorators, the first time I read about them and this tiny app uses routes in the form of decorators.
Which meant, I had to go read about them and understand them first.

Routes are paths.
And decorators are something (a function/class) that take your existing code and enclose it, whilst giving it extra functionality.

In my case, my code just printed a line.
And the route decorators, in my case, took that code and assigned it to a web page of my choosing.
Right now the home page is assigned to that line.
And if I choose to, I could assign any other url to that same line.
This was hard, but fun.

Looking to do more of this slow steady work over the coming weeks.


A Hundred Days of Code, Day 040

Done with the Talk Python course.
And now to shift to low intensity Python learning while I ramp up studies for the 12th exams.
Will probably learn Flask with Miguel Grinberg.


A Hundred Days of Code, Day 036

While the storm passed us by, it bought upon us a day of no power.
So I just deciced to make the most of it and read a book, I’ve wanted to, for quite a while.

Finished Jon Stokes’, “Inside the Machine”.
This book is like a 5000 feet, overview on how the CPU inside a computer works.
If you’re curious like me, and don’t want to delve into the nitty-gritties of Computer Science, this is just the book for you.
Starting with a fictional CPU and then racing through the Intel/AMD (x86, IA-64, x86-64) and AIM (Apple, IBM, Motorala - PowerPC) line of CPUs, this is a wonderful exposition of how the brains in your computer work.
(spoiler, they are really dumb and plenty fast!)

This was a wonderful, wonderful, book!
I cannot wait for the new edition to arrive!


A Hundred Days of Code, Day 034

Ok, back from hiatus, much earlier than expected :)
Need to take care not to burn myself out now.
I need to do this slowly.

Done with a tiny program, Kushal asked me to write.
If you download a log from the DGPLUG log archive and then run the program and give it the filename, it’ll spit out a list of how many nicks, spoke how many words.

The code is here, Gitlab and Github

I’ve written this program before, and this time I wanted to use Regular Expressions in the program.
I went and learnt Regex.
And then came and found out all I needed, was such a teensy bit of what I learnt XD

However, the combination of Python and Regular Expressions is quite compelling to me.
And I have a ton of more important work, suddenly.
So the plan, now going forward is to first finish up the Talk Python course and then to practice Python and Regex, until I am comfortable.
If I feel like writing something whimsical in the middle, I sure will.

The important part, I realise, is to do this slowly and steadily.
I commit to working two hours a day, five days a week.
No use burning myself out again.

P.S. Forgot to add, that the hundred days of code for me, is now a hundred and sixteen days :)


Short Hiatus on A Hundred Days of Code

I fell sick, and now I seem to have personal issues because of quarantine.
So a bit of hiatus. But I’m not abandoning it this time.
Will add all the days I missed and keep going, once I am back.
Which I really hope, is soon.

A Hundred Days of Code, Day 033

Done with an introductory Regular Expressions book.
Picked up an advanced one.

My physio used keep to telling me, that we needed to loosen and pry my hips open to expand my range of motion.

These past few days have been the same, with respect to pattern matching using Regular Expressions. These lessons have been prying my brain open to a new way of thinking about words and characters.

From the way things are going, I think I will be spending the better part of next week on Regular Expressions too.
It’s still hard work, but it’s getting to be enjoyable hard work now.
I need to pace myself better and slow down.
I burnt myself out this week.

Onwards …