¿Sobre qué cosas estúpidas discuten a veces los programadores?
Me ha hecho reír, pero a su vez me ha hecho pensar, la pregunta What lame things do programmers often argue about? publicada en Quora.
El inicio es muy bueno:
#thecodingevolution
- //11 lines
- public String getSex(int num)
- {
- if(num==0)
- {
- return “Female”;
- }
- else
- {
- return “Male”;
- }
- }
- //1 year later. 6 lines 🙂
- public String getSex(int num){
- if(num==0){
- return “Female”;
- }
- return “Male”;
- }
- //2 years later + lazy writing, 3 lines xD
- public String getSex(int num){
- return num == 0 ? “Female” : “Male”;
- }
Deja un comentario