Is it permissible that a C ++ programmer does not know how null-terminated strings work?

Is there any way for a C ++ programmer with 1.5 years of experience to have no idea that strings with a null character exist as a concept and are widely used in various applications? Is this a sign that it could potentially be a bad rental?

+6
c ++ string
source share
16 answers

What does he use - std::string only? Does he know about string literals? What is its take on string literals?

There are too few details to tell you if he has a bad rental, but it sounds like he needs to talk more than most.

+16
source share

Is there a way for a C ++ programmer with 1.5 years of experience I don’t know that strings with NULL trailing exist as a concept and are widely used in various applications?

Not. What did he / she do during these 1.5 years?

Is this a sign that it is potentially bad rental?

Yes. Knowledge of C should be required for a C ++ programmer.

+29
source share

Is this a sign that it could potentially be a bad rental?

Definitely, a C ++ programmer should understand what happens behind all the cool STL files.

Unfortunately, there are too many non-standard C ++ programmers on the market.

BTW: not null terminated, but null terminated.

+16
source share

IMHO, I would expect a competent programmer to have a basic curiosity to wonder how things like STL containers actually work. I would not expect that they would be ready to realize them, mind you.

But the NUL terminated string is the fundamental data type of both C and C ++. Given the chance to avoid messy parts with a container, this is a luxury. You should still appreciate what the container does for you.

+9
source share

I would say it depends on what you want to hire them for and what their purpose is in your organization.

Someone who understands C ++ but not C (which is easy to do these days) will fall into this type of category. They can potentially be a great employee. However, I would say that this is a warning, so depending on their resume, this will be one label against them in my book.

However, if they work on fairly simple projects and do not require the development and development of critical parts of your code base (at least at an early stage), they may be in order.

I would not, however, hire someone who was engaged in design or who did not work on critical systems that did not understand basic concepts like this. Any developer that I hire who will work on high-level C ++ projects should understand memory management, the basic concepts of C and C ++, templates and general programming, as well as all the basics, at least to a reasonable extent. language in which they will use.

Misunderstanding the concepts of how string literals work will be a big drawback - even if they use std :: string or the like, I want them to understand how this works under it, at least to some extent, as well as others the options are there. Understanding the concepts helps to understand the rationale for newer, more enjoyable technologies, as well as understand the trade-offs that arise when using them. It also helps to understand the design decisions made and apply them to your own projects.

+5
source share

In the work that we do in my company, and I think this is the case for many other places, you should be aware of NULL terms (or zero ends). Yes, we use C ++, and we try to use std :: string where we can. But we have code that was developed many years ago that uses C style lines, sprintf and similar things. Then you have external code and APIs, how can you even call the Windows API without knowing these C concepts?

So will it be a bad hire? Well, you don’t know what you can find out ... But this is definitely not a good sign.

+4
source share

Lines enclosed in NUL (aka ASCIIZ) are not even a C construct, I think a good programmer should at least know that there are different ways of storing a string (completion with 0, prefix with length ...).

You may never need it, but for me it looks like you are using your computer without opening it and don’t look what’s there just to understand it a little better.

I will not say that someone who does not know about this could potentially be a bad rental, but note that if you use null-terminated strings in your project, he will have to study the concept and may stumble on common mistakes in this field (without increasing the size of the array by 1 to store additional 0, etc.) that the programmer who knows about the NUL-terminal line will not.

+3
source share

not knowing that they exist - a really bad sign is unlikely to be used - IMO is not a very bad sign. Back in the days when I was programming C ++, I avoided null-terminated strings for everyone except string literals.

Used instead

std :: string (or CStrings).

+2
source share

This means that they never opened the forv file for input or output. The standard library does not have the ability to specify the file name via std :: string - you need to use the zero end.

+2
source share

It seems like a programmer who did not start programming. I took C ++ classes in college and even read several books in this language. Each book in the first three chapters will explain how a string representing an array of characters knows that it ends using the identifier "/ 0". This is basic C ++ knowledge.

This programmer sounds like a business user who wants to cut costs by learning “programming” to create software for a company without having a properly educated and experienced developer.

Sorry if this sounds harsh. I take my profession very seriously and consider it a form of art.

+2
source share

Consider coursework in any C / C ++ based coursework. There must have been a course in the data structure that it was supposed to take, and this course should have a purpose in which they needed to implement a string type from scratch. Obviously, no one expects all the functionality of std :: string, but they had to implement a class of strings, and when they did, they had to study this question in depth.

No hiring.

+1
source share

People say and do all kinds of strange things during the interview. Have you seen how this person does any coding?

1.5 years is not a lot of time, but experience means to squat, if the rental can not think properly. Therefore, I would mark this as a warning flag and dig deeper. If the interview phase is over and you have to make a decision, it sounds to me like your answer should be NO PROGRAM .

+1
source share

I would say that it depends on what you are looking for. If you are looking for relatively inexperienced (and therefore supposedly cheap) programmers that you can design to fit your organization, it might be okay. You just found out that he has no idea how C does something, and that you have to explain a lot of C ideas to him when they come.

At this point, it is important to find out if he was simply uneducated (he had never encountered a need before), or if he is a guy who will never know NEVER, he does not need it, or if he is an idiot. If No. 1, then you can consider hiring him if he knows that he can be useful. If # 2, then I would accept a pass, but maybe you can use 9-5er. If # 3, show him the door.

And I would not take C TO TOO seriously, I met people who have been programming in C for 15 years, who did not know about __FILE__ and __LINE__ . And they were good, they just never came across it until I showed them that. This guy may be the same - he only ever saw a way of STL to do something, so he knows nothing.

+1
source share

Well, I heard from a friend in German SAP that they hired someone as a developer, and then found out that he always considered 1KB = 1000 bytes. It seems they discovered this when he made some mistake. They were shocked, and then forced him to support customers.

Compared to this, your newly hired developer could be a genius. Seriously, he could only begin to make his own experience when high-level languages ​​occupied the majority of the market and simply did not view the era of low-level programming (C ++ or something else).

Does not necessarily mean that he is bad. Just belongs to a new generation of pepsi developers.

+1
source share

In your decision to hire, you should consider whether he can find out important pieces of information about whether he knows them now. A year and a half is unlikely to ever be, if it does. As others have noted, dig deeper, try to find the boundaries of your programming knowledge and try to figure out how difficult it will be to bring these boundaries out. It will depend on personal habits and character. If he is a good student and a good communicator, he is a good hire. If technical training is beyond, programming is probably not the best career for him.

+1
source share

Zero-terminated lines do not exist, so I think it can be a good rental.

Update: null sequence termination and '\ 0' termination are displayed in the C ++ standard, according to some comments. Instead of deleting my answer, I turn it into a wiki to preserve the interesting part of the debate.

0
source share

All Articles