MrSun's Website

A Site to Record and Share

Flex Panel with CSS and JS

Today is the third day of the Labor Day public holiday. I tried to complete another task with css and js in which if I click any one of the five internal parts, it will expand and the top and bottom text messages will come into the screen, and later if I click it again, things will be back to where they were, like this:

And I have uploaded the code to Github as well. It’s not a complicated task, but it does help me to reinforce some css and js knowledge, like flex, content/item alignment, nth-child() and javascript event listener, etc.

Only after I uploaded the code to Github and when I took a look on my Github activities did I realize it’s been already a year since I took some intensive trainings on Javascript last year when I worked on some projects by following some online tutorials and also some from books. Compared with back then when I firstly started Javascript learning, I do see some progress and I can work on some projects myself, though it’s clear to me that there is still much distance between where I am now and where I want to be. For example, some complicated web effects are still challenging to me if I don’t refer to others’ examples.

When I decided to learn coding, I thought it would not take long before I became quite professional in coding and I might even find some developer work. With this prejudice I began my study, but gradually I realized something different. Even if I have learnt and understood some concepts of the coding language, html, css or Javascript, I can never call myself professional at it. I can make something with what I have gained but it always seems there is something I don’t know or am not familiar with yet but which can make the work better. I finally accept that the learning will be a long journey but it seems the speed is not as fast as I expected. Maybe it’s because I didn’t do the calculation well, or I didn’t do the calculation at all. When I decided to start the learning, I didn’t think it just as a hobby or personal interest and I have my work which takes quite a lot of my time and energy, and I have the family and apart from these, I also have interest in some other things, like reading and fitness, and sometimes, I need time to do some trainings and learnings for personal development, like communication, management, cooperation, etc. All these things share my limited time and energy and on average I only have like 4-6 hours for coding every week. It seems I expect too much from this 4-6 hours per week.

Looking back a little bit further, I realized I made the same mistake on some other things which I wanted to do well but finally ended up with failure. There were some other reasons to each specific thing, but this mistake should be one of the biggest from my side and it should play a very important role in the failures. It might be a personal thing or maybe true to all human beings that if we want and like something, we tend to overestimate the time and effort we put on it and therefore expect much more than what we should get. This difference between what we actually get and what we expect to get will cause much more serious influence on our thinking and then our effort moving forward.

But I think I am doing it quite better now as I realized the issue and know quite well that there is something I can do to change the whole thing to make it better. Or maybe again, I am overestimating what I can do and what I can expect with what I can do moving forward…