Coding Again

programming dude

Hi guys, welcome here. This is Vasanth Kumar, returning to coding after almost 3 months.

I am working as a Digital Specialist Engineer at Infosys since August 2021. I am on the bench for 3 months. I recently got the project. I didn't even open my laptop these 3 months. I did some courses but didn't code anything. Somehow I stumbled upon my GitHub profile which doesn't have any contributions this year. This hurt me severely. I don't want to waste this year the same as the previous where I didn't learn anything new apart from working with ReactJS.

Today I didn't do anything in the morning => just slept until 1 PM => and scrolled through youtube shorts for almost 3 hrs straight after lunch.

But after 5 PM I created a repository to have my programming notes in one place. I decided on learning

  1. Rust

  2. Flutter

  3. Data Structures

  4. Algorithms

  5. Haskell

  6. React JS

  7. Tailwind CSS

  8. Databases

  9. Cloud

So I created a folder for each topic. The plan is to add notes while learning them in the markdown format with the README file. I also want to contribute to the open source this year.

Today I learned the basics of markdown because I need it to take proper notes while learning. This is my today's learning notes

Notes

Learning markdown from markdown tutorial.

Italics
_word_ => word

Bold
**word** => word

Bold and Italic
**_word_** or word => word

Headers
use # in front of headers, the number of hashes represents the type of heading

Header one

Header two

  • you cant make a header bold but can italicize

Header three

Header four

Header five
Header six

Links
[text to display](URL) => google

Images
![alt text](image URL) =>

A pretty tiger

BlockQuotes
\> Paragrah =>

I am quoted text

Lists
* list1
* list2 =>

  • list item 1

  • list item 2

1. order item 1

2. order item 2 =>

  1. order item 1

  2. order item 2

Ident tab space with the * or number if you want to add depth or nested lists as below

  • level 1

    • level 2

      • level 3

        1. level order 4

Paragraphs
add 2 keyboard space for new line

cheat sheets from markdownguide

And I also wrote one python script to dump every topic notes into root level README file. I never thought python scripting is this simple, only few lines of code with 3 google searches I achieved what I want.

it goes as follows =>

import os 
with open('README.md', 'w') as outfile: # to write into README outfile
    for folders in os.listdir('./'):  # lists directory at that level
        if os.path.isfile(f'./{folders}/README.md'): 
        # checking if README.md file exists inside that folder
            with open(f'./{folders}/README.md') as infile: 
                outfile.write('**'+folders+'**\n')
                filedata = infile.read()
                filedata = filedata.replace('(../images/','(./images/') # image relative path update 
                outfile.write(filedata)
                outfile.write("\n\n****\n\n")
# reading the inner README files and writing them into outer README file with folder name on the top and <hr /> seperating each file content.

References:

https://www.geeksforgeeks.org/how-to-iterate-over-files-in-directory-using-python/

https://www.geeksforgeeks.org/python-program-to-merge-two-files-into-a-third-file/

https://www.freecodecamp.org/news/how-to-check-if-a-file-exists-in-python/

Thank you.