Very professional ethics

Source: Internet
Author: User

See http://thedailywtf.com/forums/65091/ShowPost.aspx for more information

Below is the code written by the kind-hearted programmer. I have translated the comments of the Code into Chinese, which is very ethical.


/*
* This code is very bad. It's really bad. I sincerely admit that my code is very bad. If you are an intertrode communication company
. I am very sorry that you have to maintain this code. I plan to rewrite this code tomorrow, but I am very forgetful. I often
* Forget the code I wrote. For example, this code is the product of my amnesia.
*
* The ins and outs of things are like this. I cannot remember why the value of accountid (account number) is not set.
* I checked the code again. I just don't understand. Now I have to leave. Fortunately, I found that the debugging record (debugging
* Log) to capture the accountid. Maybe the problem is solved in this way. Find out when accountid is cleared
* It's up to you, dude.
*
* Finally, please accept my sincere apologies again
*/

1 If (accountid = NULL) | (accountid = "") |
2 (serversesion ["accountid"] = NULL) | (serversesion ["accountid"] = ""))
3 {
4 // open session logs
5 filehandle file = f_open (log_path + "\ sessionlog-" + log_file_date + ". log", 1 );
6 While (file! = NULL)
7 {
8
9 tstring line = f_readline (File );
10
11 // look for IP and changereg
12 if (Sfind (line, remote_addr )! =-1) & (Sfind (line, "changereg ")! =-1 ))
13 {
14 // 0000-00-00/accountmaint/changereg /? Accountid = 123456 255.255.255.255.255
15 //*
16 accountid = substr (line, 52, 6 );
17}
18
19 if (f_eof (File) {f_close (File); file = NULL ;}
20}
21
22}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.