Today I modified the TaskTimer script and made some enhancements on the Twitter bot.
I also spent some time reflecting on the journey. You can read what I have done and learned so far from the post linked below.
I decided to make a more robust schedule for coding. My base plan right now is:
- Read a chapter of EJS in two days. Then do the exercises on the third day.
- Do at least ten challenges at FCC every day.
- Watch a programming related YouTube video or listen to a podcast
This is just the base plan and I'm adding some "spice" to the mix. The spice can be anything that I want to do on that particular day.
I'll keep this at the beginning of my writings and change it as I see fit.
I encourage everyone to make a plan.
- Added a way to get total times for different tasks
- Added an error check so that the bot doesn't crash
Task 'TaskTimer'. Elapsed time 1 h 28 min 4 s
Task 'Twitter bot'. Elapsed time: 0 h 22 min 53 s
As I said in the study plan, from now on I'm going to watch a programming related video every day. I'll share them here so that others can watch them also.
Python if __name__
I wondered what does the Python syntax of " if __name__ == “__main__”: " mean? I found a great answer on Stack Overflow:
Given the following code, what does the
if __name__ == "__main__": do?
# Threading example import time, thread def myfunction(string, sleeptime, lock, *args): while True: lock.acquire() time.sleep(sleeptime) lock.release() time.sleep(sleeptime) if __name__ == "__main__": lock = thread.allocate_lock() thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock)) thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))
Watched this funny and educational video on sorting algorithms. The algorithms competed against each other on different races and it had the feel of a great sporting event.
The learning environment which comes with the book makes the experience ten times better. Using the word "book" is a bit misleading. There are lots of code examples that the reader can run in the browser and there are plenty of exercises at the end of chapters.
And the best part? The book is totally free!
A platform for coding challenges. I enjoyed trying it and have read some positive things about Exercism. I liked the way the problems are solved. It requires using your own IDE and the terminal which felt like I was programming like the big boys.
A great open-source resource for becoming a full-stack developer. It starts with the very basics and gets going after that. Really enjoyed it and look forward to doing more of the lessons.
Have a great day and see you all tomorrow!