Interview experience and experience of a senior student

Source: Internet
Author: User
Tags comments
As a senior student, I interviewed a lot of units, there are successes and failures, but for me all of the failures in a sense is a success, especially I wrote the following, writing this article, I have signed a software company in Nanjing, But think of the February 21 this year I interviewed the experience of the IT company in Suzhou, Taiwan, we are now learning how to program some of the situation I really have feelings, this interview makes me deeply understand the failure but also harvested a lot.


What I'm going to say will be divided into three parts,
1. It's my interview details.
2. It's from the interview.
3. What I should do now.
Of course these words are to a large extent my personal opinion, can not completely get everyone's approval, so in some points of view, if any friend feel that with my big discrepancy, please do not mind, do not attack me, when I did not say, welcome and I contact together to explore these issues. My email:wutao8@263.net.

1. Interview Pass
About a year ago, I received the interview notice of the Suzhou Company in Realtek, Taiwan, notified me of the February 21 interview in Suzhou Industrial Park, and the days after receiving the interview, I have reviewed some specialized courses, especially C + + and data structure, because I have been studying these aspects for several years. Plus through the Senior Programmer's exam, for some commonly used algorithms I have almost reached the point of the chest, the feeling is that if asked me these aspects of the problem I should be no problem.

21st I was scheduled for the 4:30 interview, a technical person to give me a separate interview, after asking some simple questions, he gave me a programming topic, the topic is this:

(because of the specific interview topic more cumbersome, I will be the core of the idea to extract the decomposition into ...) Garbled

1 Write a function to calculate the value when the parameter is n (n very Large) 1-2+3-4+5-6+7......+n
Hum, my heart sneer at a sound. Unexpectedly so simple, I am a little nervous mood immediately relaxed.
So I soon gave my solution:

LONG fn (long N)
{
Long temp=0;
int i,flag=1;
if (n<=0)
{
printf ("Error:n must > 0");
Exit (1);
}
for (i=1;i<=n;i++)
{
Temp=temp+flag*i;
Flag= ( -1) *flag;
}
return temp;
}

Get. When I looked at the interviewer with expectant eyes, he smiled and told me that there was no problem with the results. But when N was big, I had a very low execution efficiency, in the development of embedded system, the running efficiency of the program is very important, it is good for the CPU to execute a command, he let me see what can be changed in this program, and optimize the program. After listening to these words, my mood changed a bit heavy, did not expect his strict requirements, and then I have a rigorous analysis of the procedures, gave an improved program.

LONG fn (long N)
{
Long temp=0;
int j=1,i=1,flag=1;
if (n<=0)
{
printf ("Error:n must > 0");
Exit (1);
}
while (j<=n)
{
Temp=temp+i;
I=-i;
i>0?i++:i--;
j + +;
}
return temp;
}

Although I am not sure that this algorithm is optimal, but compared to the previous program, I have all the statements involving multiplication instructions to execute the addition instruction, both to meet the requirements of the topic and shorten the operation time a lot. And the price is simply to add an integer variable. But my confidence has gone down a bit, and I'm skeptical of the interviewer, and he smiles and says, "Yes, the program does improve efficiency." "I have a anxi in my heart. But he went on to say that the program still failed to meet his requirements and asked me to give a better plan. Oh, my God. There is also optimization. I was really a little broke up, and after a while, I asked him to give him his plan. Then he gave his procedure very readily.

LONG fn (long N)
{
if (n<=0)
{
printf ("Error:n must > 0");
Exit (1);
}
if (0==n%2)
Return (N/2) * (-1);
Else
Return (N/2) * ( -1) +n;
}

Funny, I was dumbfounded, did not think he is this meaning, such a simple code I really can not write, but why I did not think in that respect. He said nothing wrong, in the N very big when the three program running time difference is simply different. When I was just about to say something, he said first: "Do not think that the CPU speed of all the problems are pushed to do, the programmer should optimize the code, we can do in no way to let the CPU to do, because the CPU is for the user Service, not for our programmers to serve." "What a wonderful language I don't want to say anymore." Then came the second question:
He asked me to use a technical programming method to implement the function of two functions with a function N for example:

FN1 (n) =n/2!+n/3!+n/4!+n/5!+n/6!
FN2 (n) =n/5!+n/6!+n/7!+n/8!+n/9!

Now implemented with a function fn (int n,int flag), when the flag is 0 o'clock, realize the FN1 function, if flag to implement FN2 function for 1 o'clock. His requirements are efficiency, efficiency and efficiency. To be honest, if I am in a good mood, I should be able to give a better algorithm, but I really have no mind to think again,
I scribble some formulas like 6!=6*5! on paper and tell him straight out that he has his answer. The interviewer didn't say anything, giving his ideas:
Define a two-dimensional array float t[2][5] deposit [2!,3!,4!,5!,6!},{5!, 6!, 7!,8!,9!] And then give a loop:

for (i=0;i<6;i++)
{
Temp=temp+n/t[flag][i];
}

Finally, the calculated value is obtained. Oh, a typical space to change the time algorithm.
It took a total of 50 minutes and 10 minutes to chat with him casually, talking about programming and life issues, and I was relaxed because I knew there was only one outcome: failure. 5:30 the interviewer asked me to wait for the notice, so I left their company. This is the whole interview.

2. The thought of the interview

It's really a failure. I remember the day under the great rain, the temperature is very low, I walk and think, from 5:30 to 7:30, the whole body is soaked, cold and hungry, but I just walked, the brain is full of doubt, I also want to let the rain to wake himself up. See some of the friends here may feel that those interview topics are not what if you can do it all right, I certainly believe you, because I have never doubted the ability of Chinese programmers, I think China has the best programmers in the world, I have never considered myself a master, So I can't do it. Does not mean that Chinese programmers are worse than programmers in Taiwan or elsewhere,
From my point of view, what I have seen, I want to talk about some thoughts:

Good programmers all over the world, China is no exception, but I wonder whether China and Taiwan or abroad, the proportion of good programmers is how much. Taiwan I do not know how many of the 100 programmers in China are excellent? I am not at all, and the performance from above is enough to explain everything. is 1. 5 A. 80 Yuan. 50 A. This number I do not dare to guess, fear by netizens a scolding, then how many people in our country to learn computer. Take our school, computer 97 level 4 classes, 98 Level 5 classes, 99 level 10 classes, 2000 level 17 classes, more people, how to do the teacher. Our school's practice is to let the postgraduate class, then. Make-up a catch a lot, a lot of make-up fee fell into the school's pocket, but also said that the current study of the
Health quality low. It's funny, I don't even know what the school is doing to train a lot of programmers at home. Can the students really learn computer knowledge? Well, I dare say, learning programming students and excellent programmers in our school (note that I mean excellent, the proportion of people who can only make up a few bad programs is 100:0.1. In this proportion although we have a lot of people learning to program in China, think about how many people can really contribute to the development of China's software industry, How many people can really write good program name overseas.

I learned from the programming, whether self-study or teacher guidance, has always been to solve the problem, the process of compiling the line, my doubts are: we have a real emphasis on the efficiency of the program, the quality of the program. We have carefully analyzed what we have written, to see if there is any room for improvement, to see if there are any simple ways to achieve the same goal. I asked myself, I found that I had never optimized the program I had written, most of which was a detailed test and then debug, but that was enough. These days I occasionally find a game that I've written about one year as a member of the time, feeling like I should get something out of it and spend one weeks writing it. The program is not complex,
but the use of a lot of data structure of things, but also used some wonderful algorithms, coupled with Windows interface and game play, after writing received a lot of praise, I really admire myself. But now look: without a comment, a lot of ugly function names such as: void Chushihua (), a lot of unnecessary variables, you can use simple statements to complete the work I use the gorgeous algorithm, a large number of use of global variables ..., say not to listen, more than 600 lines of the program in addition to running The
is a piece of crap. If I could have heard some negative comments a year ago, I probably would have been a little early on, but since the original code was posted on the website, it was a compliment, and no one asked me for an improvement, which explains what the problem was. Well, it's worth thinking about.

There is another doubt: what we say and do is really the same. When I was in school, I had been assigned to a computer contest by the College, please a teacher out of the final question, mainly some algorithms, the teacher is probably the only teacher I have admired since the university, from the program debugging to scoring, for each program is careful analysis of its time efficiency and space efficiency, and then integrated scoring, 40 of people's papers, the teacher from three o'clock in the afternoon to debug until the evening 10 o'clock, in some of the wonderful statements added after the annotation. I am so glad to meet such a teacher and do some in-depth communication with him, but in hindsight, but an unpleasant thing happened, in the contest to get a second student found me, said he program all debugging success should give him full marks, and should be first, I said but he, finally pulled up his original program and first name of the original program contrast, wrong , two programs are running very well, at this time, the classmate said: "My program to write very simple and clear, just a few lines on the completion of the topic requirements, but he wrote a lot of, why give him more than my points." "I was very angry at that time, if the teacher is not responsible, then the position of the first and second is really going to be mutually tuned, please, not the number of lines of the program less the higher the quality of the program, I remember talking to him about this reason, and finally persuaded him. Haha, but I, can only say that, I do not know how many people like, said up, but the heart has never paid attention to it.


3. I'm going to do that.
In fact, the day I thought of much more than that, but I do not want to say, because I guess the netizen that read this article probably all have full of feeling, full complain, borrow this article vent is not I want to achieve the goal, in above I scold the worthless also not to belittle oneself, but in some respects I really did wrong , or deviated from the right direction, now is the time to correct the direction and rally, as I said before, I believe that China has the best programmers in the world, I also believe that my level will not always remain the status quo, I will now pick up the real work of discontent. It's really a coincidence that when I wrote here I occasionally found this handbook on the Internet, I don't know what it indicates, but I think if I follow this basic principle to do it all the time, I will realize my ideal---an excellent software designer!

(below these words is not my original, is I occasionally found on the internet, I am really very lucky to see these, this article also with the following text and end, I sincerely hope you can be inspired from this article, this article welcomes everyone to reprint.) )

Author: Kingdee Middleware company CTO Shangong Hillock

Unknowingly do the software has been done for ten years, there is the joy of success, but also the pain of failure, but always dare not to call themselves a master, because and my mind in the real masters of the comparison, is still too far. The world is not a shortcut to become a master, but some basic principles can be followed.

1. A solid foundation. Data structure, discrete mathematics, compiling principles, these are the basis of all computer science, if not master them, it is difficult to write high-level procedures. As far as I can see, people who study computer science are better able to write high quality software than other majors. The program is written by everyone, but when you find it difficult to improve, you should consider whether you should go back and learn these basic theories. Do not learn oop at the outset, even if you are proficient in oop, you may be helpless when you encounter some basic algorithms.

2. A rich imagination. Do not rigidly adhere to the fixed way of thinking, when encountering problems to think of several solutions to the problem, try other people never think of methods. Rich imagination is based on a wealth of knowledge, in addition to the computer, more than other disciplines, such as astronomy, physics, mathematics and so on. In addition, it is also a good way to watch more sci-fi movies.

3. The simplest is the best. This is perhaps one of the principles that all science follows, and the complex principle of mass-energy interchange is a simple formula in Einstein's eyes: e=mc^2. Simple methods are easier to understand, easier to implement, and easier to maintain. When you encounter a problem, you should prioritize the simplest solution and consider complex scenarios only if the simple solution does not meet the requirements.

4. Not a dead alley. When you encounter obstacles, may wish to temporarily away from the computer, look out the window scenery, listen to light music, and friends to chat. When I have a problem, I will play games, and it is the kind of violent fighting game, when the game is responsible for the part of the brain cells extremely excited, the responsible for programming part of the brain cells have been fully rested. When I get back to work, I find that these problems can be solved now.

5. The thirst for answers. The history of human science is a process of longing for answers, even if only a small part of the answer is worth paying. As long as you firmly believe that you must find the answer to the question, you will devote energy to explore, even if the final answer does not get, in the process you will learn a lot of things.

6. Communicate more with others. Three-person line will have my division, perhaps in a casual conversation with others, you can burst the spark of inspiration. More on the Internet, to see other people's views on the same issue, will give you a lot of inspiration.

7. Good programming style. Pay attention to develop good habits, code indentation choreography, variable naming rules should always be consistent. Everyone knows how to exclude errors in the code, but often ignore the error of the annotation. Annotations are an important part of a program that makes your code easier to understand, and if your code has clearly expressed your mind, you don't have to annotate it, which is even worse if the comments and code don't match.

8. Toughness and perseverance. This may be the biggest difference between a "master" and a general programmer. A good programming is weat and 1ffee. Masters are not geniuses, they are in countless days and nights honed out. Success can bring us great joy, but the process is extremely boring. You might want to do a test, find a list of prime numbers within 10000, copy them all down, and then check them three times, and if you can do this work uninterrupted, you can satisfy this one.
 
These are a few years of my programmer's career experience, I hope to be able to help. L

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.