Date: |
2010.01.19. |
Keyword: |
Javascript methodology kiss principles |
Today, I am tossing JavaScript for a day. I have never touched on JS programming before. In order to ensure the project progress, I tried my best to read the JS Code for half a day and started coding in the afternoon. Only then can we find that JavaScript programmers are very good at reusing code. Many seemingly complex operations have small components (What should we call the js code library ?) . So far, most of the work I need to do when using JS programming is to find or ask my colleagues online for a useful code set, and then reuse the code to implement the desired function. However, you also encountered a problem when reusing the code. Copying the sample code directly to the project code is often unavailable. In this process, you also need to use IE8 to debug the JS script to find the error point, then modify the code. The modification results are often unavailable. This process took me a lot of time and I found a good solution until the evening: I reduced the code of the routine before I took the code to be reused, wait until a minimum test code that can be run is constructed, and then post the code to the project code. Of course, this method cannot be guaranteed to succeed at one time, but after comparing the project code with the refined test code several times, we can often find the correct method of use.
The original principle taught by Lao Tzu in Moral Education
See xiaoyiming
And can also be used in programming. Think back to the Unix Design Philosophy
Keep it simple, stupid (kiss)
Yes, it is small and simple. It can make our lives more clear, and the productivity at work will also rise sharply.