Are you a senior programmer? Let's challenge it !, Challenge from programmers

Source: Internet
Author: User

Are you a senior programmer? Let's challenge it !, Challenge from programmers

Basic questions:

  1. What is the name of the implicit parameter for the set method that passes in an attribute?Value. Its type is the same as that of its attribute.
  2. How to Implement inheritance in C?Add a colon after the class name and the name of the base class.
  3. C # does it support multiple inheritance?Not supported. It can be implemented through interfaces.
  4. Where can I access the property/method modified by protected?It can be accessed in the subclass that inherits or indirectly inherits from this class.
  5. Will private members be inherited?Yes, but cannot be accessed. So it seems that they cannot be inherited, but they are actually inherited.
  6. Describe the modifier protected internal.Properties/Methods Modified by protected internal can only be accessed in its subclass in the same Assembly.
  7. C # provides a default non-parameter constructor. When I implement another constructor with a parameter, I want to retain this non-parameter constructor. How many constructors should I write?Two. Once you implement a constructor, C # will no longer provide the default constructor. Therefore, you need to manually implement the non-parameter constructor.
  8. C # What is the common base class for all objects?System. Object.
  9. What is the difference between heavy load and overwriting?Overload provides the implementation of calling different parameters for a method signature. Overwriting provides the implementation of modifying the behavior of the parent class method in the subclass.
  10. What does virtual mean in method definition?The virtual method can be overwritten by the quilt class.
  11. Can I override non-static methods into static methods?No. The signature of the overwriting method must be consistent with that of the overwriting method, except for changing virtual to override.
  12. Can I override a private virtual method?No. If a method is a virtual method, it should not be defined as private!
  13. Can a class be prevented from being inherited by other classes?Yes. Use the keyword sealed.
  14. Can a class be inherited, but cannot a method be overwritten?Yes. Mark this class as public and the method as sealed. (Note: This method must overwrite a virtual method in the parent class. Otherwise, sealed cannot be used)
  15. What is abstract class )?A class that cannot be instantiated. Abstract classes generally contain abstract methods. Of course, they can also be implemented. An inherited class can be instantiated only when abstract methods of all abstract classes are implemented.
  16. When must a class be declared as an abstract class?When this class contains abstract methods, or the class does not fully implement the abstract methods of the parent class.
  17. What is an interface?Class that only contains a total of abstract methods. These methods must be implemented in the subclass.
  18. Why cannot I specify a modifier for a method in an interface?The methods in the interface are used to define the contract for communication between objects. It is meaningless to specify the methods in the interface as private or protected. They are public methods by default.
  19. Can I inherit multiple interfaces?Of course.
  20. What if there are repeated method names in these interfaces?In this case, you can decide how to implement it. Of course, you must be very careful. However, there is no problem in the compilation process.
  21. What is the difference between an interface and an abstract class?All methods in the interface must be abstract and the access modifier of the method cannot be specified. Abstract classes can be implemented by methods, or you can specify the access modifier of methods.
  22. How do I distinguish between overload methods?Different parameter types, different parameter numbers, and different parameter order.
  23. What is the difference between const and readonly?The const keyword is used to declare the compilation frequency, and readonly is used to declare the runtime frequency.
  24. What is the difference between System. String and System. StringBuilder?System. String is an unchangeable String. System. StringBuilder stores a variable string and provides some methods to modify the string.


Advanced questions:

      1. What is the difference between Thread and Process ?. NET introduces the concept of Application Domain, so what is the difference between the three of them? Will Application Domain introduce some potential problems?

A process can be understood as a container that provides process space and the memory used by the thread is allocated in the process space. Each thread has its own stack. APPDomain is equivalent to a logical concept, which is equivalent to dividing some regions in the logic in the process. Therefore, threads can access other threads across domains.

      1. What is the difference between Windows Service and common EXE during execution?

Generally, the former has no interface, and a windows Service server is responsible for maintenance, startup, and shutdown. Exe is maintained by the user and generally has an interface.

      1. What is the Windows Address Space that a process can access? Is it equal to the system's virtual memory size? What impact will these two aspects have on the system design?

A. It is related to the data bus. Generally, for 32-bit operating systems, the addressing space can reach 4 GB, so the address that a process can access is also 4 GB (but in fact, 2 GB is reserved for the operating system, 4 m is not accessible, and the remaining space is used by the process ).

B. Not equal to virtual memory.

C. The addressing space is related to the width of the Data Bus. The Virtual Memory consumes the CPU processing time. Because the conversion of internal and external memory is required.

      1. What is the difference between EXE and DLL? How should we choose to use them in system design?

A .. exe has its own process space, dll does not exist, dll can only be referenced, and the process space shared with exe can be called and run (in fact, there is also the rundll32 command to start the dll, this system command is essentially to provide process space for it ).

B. dll is also called a dynamic link library. You can put the commonly used code and resources in the dynamic link library, so that there will be only one copy in the memory, saves memory space (different processes can be located in the specified dll based on different relocation information ).

      1. What is the difference between the execution process of a common EXE and. net exe?

Normal exe can be executed directly on the operating system, but. net exe requires jit compilation in a timely manner and runs in a hosted environment (under the control of CLR ).

      1. What is a weak type and a strong type? In system design, which type should be considered first?

To some extent, the weak type allows different types of data to perform operations and operations on each other, but the strong type is not allowed, because the strong type performs the type check.

      1. What is the use of PDB files? What information does it contain?

The program database (PDB) File Stores debugging and project status information, which can be used to incrementally link the debugging configuration of the program.

      1. What is Cyclomatic Complexity? Why is it important?

Circle complexity, used to measure the number of branches of a program. In a normal method, the score should be limited to 5 or 6. If the number of branches is too large, it is best to break down the method to avoid badsmell.

      1. To create a critical section to access a variable, write a standard lock () and add double check.

If (m_Instance! = Null)

{

Lock (this)

{

If (m_Instance! = Null ))

{

// Do something

}

}

}

      1. Implements the standard Dispose mode for an object.

Class MyObject: Idisposable

{

Public void Dispose ()

{

// Do something

}

}

Is to implement the Idisposable interface, and then implement custom Structure

      1. What is FullTrust? Does assembly in GAC have FullTrust?
      1. What is the following command? Gacutil/l | find/I "system"

The Global Assembly Cache tool allows you to view and manipulate the Global Assembly Cache and download the cached content.

      1. What is this command? Sn-t something. dll

Sn.exe provides options for key management, Signature generation, and signature verification.

      1. Which port must be opened for DCOM across firewalls? What is port 135 used?
      1. Is there any way to integrate with the existing unmanaged code? What should I consider during integration?
      1. What is OOP and SOA used?

OOP is a program programming architecture that contains components, encapsulation, inheritance, abstraction, and polymorphism.

SOA is a service-oriented architecture.

      1. How does XmlSerializer work? What ACL permissions does a process need to run XmlSerializer?

The ACL access control list.

      1. When should I use try catch during system design? When should I avoid using it?
      1. What is the difference between Debug. Write () and Trace. Write? Where should they be used?

All are assertions. Debug. Write () is the Debug version, which is not executed in the release version, but Trace. Write is executed in the release version.

      1. What is the difference between Debug Build and Release Build? Is there any obvious difference in execution efficiency?

The Debug build version contains some debugging information, which reduces the execution efficiency.

      1. Does JIT occur for Assembly or Method? To explain why. NET designers want to do this?
      1. Briefly describe the GC execution process.

When the memory is reduced to a certain extent, CLR starts garbage collection, recycles the non-referenced objects, and releases the occupied memory.

      1. How should I choose abstract class or interface?

Abstract classes can be implemented without interfaces. The interface can be inherited more than the abstract class.

      1. When designing a custom Type, how should we choose whether to use Value Type or Reference Type?

The difference between the reference type and the value type is described. We can talk about the memory distribution and access efficiency.

      1. For Value Type and Reference Type, what are the default implementation methods of a. Equals (B?

The default value type is equal. The reference type is to compare whether two references point to the same object.

      1. Why does. NET not provide the default deep copy? If necessary, how to implement deep copy?

Because deep copy involves the level of the copy, it is the level at which deep copy is required. In C #, you cannot directly override the MemberwiseClone method. You can implement the Iclone interface to implement custom deep copy.

      1. Compared with. NET 1.1, what support does. NET2.0 provide to avoid excessive system overhead caused by boxing/unboxing?

Model.

      1. Is String Value Type or Reference Type? Why is the String object in. NET set to immutable?

Is a reference type. Because string objects appear frequently in the operating system, allocating an independent memory for each string will be a huge system overhead. Therefore, the string is set to immutable, which is a memory resident technology, essentially allowing the same string to access the same memory. For example, if s1 = "a", s2 = "B", both s1 and s2 are directed to the same memory block as "a". If s1 = "B" is modified ", s1 will no longer point to "a", but will open up another memory space for "B", so that s1 points to B (if there is another s3 = "B ", then s1 will point to the same "B" as s3, and s1 will no longer open up space ).


What is a required course for senior programmers?

Confirm that you really want to enter the software development field
Software development is a pure intellectual activity (now people are aware that continuous write programs that are overloaded for a long time will not increase software productivity, but will have a great negative impact on software quality, so although many programmers still work overtime for a long time, this phenomenon is gradually decreasing and will eventually disappear, so the physical requirement is not higher than that of other industries ), if you are not a person with a higher level of intelligence than the average, to be honest, software development is not suitable for you, and you are basically unable to achieve high achievements and position in the software development field, and will soon be eliminated due to age growth.
If you take the software heroes and famous hackers who develop shared software as examples, you are determined to become a member of them, like the heroes in martial arts novels. I want to pour a pot of cold water on you to bring you from fantasy to reality. First of all, the complexity and scale of the current software are far greater than before. It is basically impossible to complete a slightly larger software by one alone (although there are some special cases, but trust me, those are just special cases. Please do not think of yourself as a unique Superman or lucky guy). Secondly, no matter whether it is a software hero or a top hacker from the Jianghu, their software development skills and intelligence far exceed the average level of the software industry practitioners. Without years of accumulation and perseverance, it is impossible. In other words, to become a member of them, yes, but be a qualified software developer first.
If you are not satisfied with your current job because of the so-called "high salary" of programmers, and you have the idea of changing careers, I suggest you think about it with caution. In general, the treatment of programmers is higher than the average level, but far from high salaries. In addition, the work of programmers is actually the same, what programmers get is just as good as the average level. Competition and elimination of programmers are also cruel. The speed of technological updates is even more rare in other industries. Every programmer must keep running and keep himself out of date. So at this level, no one can stop and take a rest, the only thing that can be accumulated is your experience, but there is not much experience that can increase your competitiveness.
I did not mean to belittle it, but to tell you the real situation of the software development industry that I know, therefore, consider carefully whether you want to enter the software development field.

Back to Top

Check whether you are suitable for a programmer.
In my opinion, to be a qualified programmer, you must meet the following conditions:
1. strong curiosity and curiosity

2. The spirit of perfection

3. Good logic analysis capability

Almost all similar posts have mentioned other conditions: if you are not prepared to fight for the same purpose, teamwork is essential, I advise you to give up the idea of being a programmer without the ability to read English documents. It is essential to have a mathematical ability. If it is not an algorithm, high school mathematics is enough, but you must make a good score.
So why do I need to emphasize the three points listed above?
With a strong curiosity and desire for knowledge, you can keep up with the pace of technological development. relying only on a sense of crisis and responsibility, you will have a strong utilitarian nature in learning technology, as a result, your technical system cannot constitute a complete, self-inclusive whole, and it is difficult to have a high-level understanding and grasp of the technology.
A senior system designer I know told me that "coming out" and "Doing Well" are two concepts, and the required investment and technical level are quite different. Nowadays, many programmers in China only take software development as a means to raise a living for their families. The idea of making a fortune in the Chinese planned economy age also penetrated into the software industry. Many programmers only develop functions, we will not consider improving reusability and maintainability, or improving stability and running speed. Even code is messy and the basic coding specifications are not followed (in my opinion, such a person is not worthy of the title of "programmer". When we loudly condemn the poor software environment in China, draw project dependencies, have no quality assurance system, and the boss does not pay attention to programmers and exploit programmers frantically, should we ask ourselves, do you just stare at others?
All kinds of Software Development kits are available, all-embracing, and programming tools are extremely powerful and convenient. For the mainstream MIS Systems in China ...... the remaining full text>

Ask the details of the junior or senior programmer Qualification Examination

I graduated from computer science shortly after I joined the job. Junior programmers do not have a little bit of gold. As long as they are specialized in computer science, there is no problem with a targeted review. Senior programmers do not care much about the Enterprise. At least our teachers think so in college. However, it is better to have a certificate in your hand! As for the difficulty, it is not difficult for junior programmers. If it is intermediate, it will not be too difficult to review it. However, this does not necessarily reflect your level. Some of my college students are very good, but they cannot take the test.

This test is performed twice a year. The first half of the year is May 24 and the second half is not fixed yet, but it is estimated that it will be around November. The exam is divided into two hours in the morning and afternoon. In the morning, you can take comprehensive knowledge, including some basic knowledge about network, computer development, and programming, and a lot of things are messy. In the afternoon, all are programming questions. Here are a few questions. Which one do you choose. Some programs fill in the blanks.

The reference books for software designers are as follows (just look for one or two books and buy them at the old bookstore. Some books are just fraudulent money ):
Software Designer tutorial
Analysis of Software Designer test points and detailed explanation of real questions (Software Design and Technology)
Analysis of Software Designer test points and detailed explanation of real questions (computer and software engineering knowledge)
Software Designer Examination Syllabus

Appendix: Introduction
National Computer Software professional technical qualifications and Level Examination. This kind of examination is oriented to people from all walks of life in the society. Taking the software professional level as the testing standard, it is an authoritative examination of the Chinese Software Major. The exam is divided into two types: qualification exam and Level exam. The qualification examination is the identification of the level and ability of in-service personnel who meet the requirements for entry. It is divided into three levels: Junior programmers (technicians), programmers (assistant engineers), and senior programmers (engineers. For Junior programmers, you must be in-service personnel. For programmers, you must have graduated from undergraduate courses or served as a technician for more than two years. For senior programmers, you must have graduated from graduate students or served as a helper for more than two years. The Ministry of Personnel of the People's Republic of China issues the relevant computer software professional and technical qualification certificate. The level test does not impose any restrictions on applicants. The Level Test is divided into four levels: Junior programmers, programmers, Senior programmers and system analysts. A level certificate is issued by the National Examination Board. The qualification test and the Level Test are combined. If the qualification test meets the corresponding level standard, a level certificate is also issued.

Related Article

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.