Code colleagues agricultural drying out of a piece of code! Friends laugh artist's why you become a programmer

Point of attention, do not get lost; continually updated Java-related technologies and information architecture thermal paper! ! !

Sharp-eyed friend may also see this blog page upper left corner there are surprises yo

Code is the computer language that is used to carry out a symbolic software development, the purpose is to use it to make a variety of software products, but the role of the code just the way it? In some ways, the code the programmer is a "toy", because they come up from time to time to show a show, and sometimes also to play some tricks, such as code comments to a very artistic, which play more advanced a. Of course, sometimes only for ridicule, some companies have standardized certainly will not allow them to do so.

在这里插入图片描述

But then again, code for a variety of tricks, tricks comments just looked at have more artistic sense, but not necessarily the efficiency Gaobu Gao, Gao Bugao readability is difficult to say, recently a programmer prior to drying out after friends of his colleagues piece of code, it will make people unconsciously cheer up, really shines after reading ah, to see this code, I not only want to spit up a bad programmer they project the words: "! project took over a 60% code that exposed the yellow line, if the judge wrote, like climbing stairs", read the following piece of code, presumably most people "climbing stairs" more profound experience of the word it, take a look at this "stairs" is not quite fancy a patchwork of symmetrical beauty, for such a code, let's take a look at how users who are evaluating it!

A netizen : I am beginning to understand, and then fainted.

I : Can people see faint, indicating the code readability is not high ah.

User two : that he has a widescreen display

I : Yes, if it is vertical screen display that is estimated look at the code and had to keep to the left and right will scroll, looked quite strenuous, and some ide a vertical bar tool set seven points (7 points is visually) with most of the code even more than that vertical lines are not very standardized.

User three : master, master, this man is a master

Author : Estimated name of friends standing artistic point of evaluation.

网友四:功底深厚,套这么多厚还能保持逻辑清醒也是一种能力,换作是我,套4层我脑子就会晕

笔者:这样的代码,对看代码的人的思维逻辑有一定的挑战,如果意志力不够强,可能会在中途迷失在楼梯间出不来。

网友五:哈哈,你同事明明是个艺术家,奈何却沦为一个程序员,只能在代码里面施展行为艺术了。

笔者:一名追求艺术感的程序员。不知道他的同事会不会写那种比较艺术的注释。

网友六:很工整很nice,就是看的有点眼花。

笔者:眼花就对了,看着不眼花的人应该位数不多啊。

网友七:工整,整洁,一目了然。严谨中透着一丝俏皮。

笔者:能从代码中看出俏皮,但是对一目了然的说法不敢认同啊,因为看着真的没有那么轻松,数了一下,已经10层楼梯了,一般体力的人,估计爬着挺吃力。

网友八:板式新颖,值得学习。

笔者:这名网友被带歪了,如果学会了这个风格,估计要晕倒多少同事呀。

其实,上面这段代码从视觉上能给人一种冲击,甚至有一种美感,有一丝丝艺术的氛围,不过,话又说回来,这样的代码可读性真的不是很高,从网友的评论中就能看出来,有的说看的眼花,有的说看着有点晕,这就是正常人的反应啊,这就是典型的可读性不高,就不说效率高不高了,代码虽然是给机器看的,但是也需要给人(程序员)看啊,除非是最底层的那种代码,根本不需要人去维护了,那么为了追求效率或者美感,可读性低一点也是未尝不可的,然而,作为上层代码,特别是业务性的代码,对代码的可读性要求是很高的,甚至代码的可读性的地位要排在代码效率地位之上,只有可读性高的代码维护起来效率才能更高,另外,这样的代码并没有很好遵守编码规范,在平时写代码中不建议写这样的代码!如果只是为了调侃,交流,提升一下编码的兴致那就随便了。

以上所有图片均来之互联网

大家好,我是“Java_No01”。如果你有什么好的看法或者观点可以在评论区展现你的才华,互动交流,如果想进一步了解我,那就关注我吧!

Guess you like

Origin blog.csdn.net/Java_No01/article/details/90673630