Interview questions to assess Linux C programmers [closed] - c

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm not quite a C programmer and I'm going to interview a guy with 3 years experience in C in linux. In his CV, he says he is quite experienced with C programming.
So my question is if you are going to interview this "C linux" guy, what question or questions would you ask to make sure that this guy is competent? By the way,
I expect you give me the answer as well :-).
Thanks in advance.

If the candidate really knows his stuff (C Linux programming) he'll catch you pretty quickly, but anyway, here are a few pointers to topics you should investigate to prepare questions:
POSIX concepts
Standard C library (libc), ANSI C
Debugging and profiling tools: gdb,
valgrind, strace, etc
Linux/UNIX system calls: sbrk,mmap,fork,etc
Threading
(Insert your favorite pointer question here)
The GNU toolchain: gcc,ld,as,automake,autoconf, etc.
Classic Linux utility C/C++
libraries: glib,qt, etc.

Don't simulate knowledge you don't have. This will get noticed and this is the image of your company that you are playing with. Candidates may want to find better oportunities.
Be honest with your level of C and ask him open questions about what he finds wonderful in C and Linux, and what he thinks are drawbacks. Let him tell you what were his previous experiences.
Appreciate not his knowledge but his passion.

To be honest I think your best bet is to get someone who is a C programmer in the interview with you to ask questions, you can only really judge competences you have yourself.
If that isn't possible I'd say you should be askind questions that test their knowledge of pointers. an obvious example is to write string manipualtion functions such as strcpy

Favorite:
Ask him where the strenghts of C are...and why he would recommend to use it...maybe you can give him a project example. He has to clarify why C is the right Language for that Job from his point of view.
From my point of view it is very important to know if a Language is really fitting to a project. Not because its your favorite Language...
It is an easy question...

If all you are trying to do is assess his knowledge of a specific language, and you don't know that language, you're gonna fail at evaluating him.
Can you instead evaluate "can this guy program and is he a good communicator" and be up-front with him about your knowledge? Give him a basic question to start with, fizzbuzz or whatever, and ask him to code it in C and give you a C tutorial as he does it. Then do something more complex but C-ey (see other answers for ideas) but still in the context of, "teach me what you know and how this works".
If you frame the question as, "I know (for instance) python and Java, but not C, please teach me" you could end up with a very informative interview. But don't give the poor guy a quiz, you won't be able to give him hints, and he could ace it or flub it with very little correlation with his actual skills.

Related

Looking for a good GUI library for C [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
As the title says, I am looking for a good library for the C Programming Language.
The GUI library should be really popular. I'd also appreciate if there are popular forums on the Internet where I can ask professionals for help. And I definitively need a good book about the library. If it's possible it should be cross-platform but I can live without that... I guess ;)
The only library I know for C so far is GTK. It sounded really well to me but neither did I find any good book (I've actually seen only one book about GTK and I don't know if it's good or bad cause nobody posted a review) nor did I see anyone using it except 2 guys on You-tube with their impressing amount of 2 videos! >.< .
The really important thing for me is that it should be popular... I don't want to sit here, learn how to use this library and in a year or two nobody uses it any more.
I hope you guys can help me finding a library :)
GTK+ is hugely popular and is used extensively. It's the best choice if you want cross-platform GUI development in C alone. There are plenty of books around, though they're a bit outdated (but most of it still applies). You can find up to date tutorials and full API documentation at the GNOME project website.
GTK is the most popular GUI library in C you can find.
Have you tried amazon? There're plenty of books. It's hard to believe that all of them are bad.

How to start building a programming language in C? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I really would love to go through the experience of building a compiler, lexer, and so on using C, however I havn't found a single resource on creating one. I've read the book about creating your own language using Ruby, but it just talks about how C is the best option, and won't tell you where to go from there.
Is their any nice resources for building a language using C? I don't care how long it is, I just want to know how to build one.
One of the nice things about compilers/interpreters is that it doesn't really matter what language they are written in. In the final stage they will just be an executable on someone's machine.
That being said while writing my compiler (something I am currently doing) I have used several books that have been extremely helpful:
Compiler Construction by Niklaus Wirth
Compilers Principles, Techniques, and Tools by Jeffrey Ullman, Alfred Aho, Ravi Sethi
The Wirth book will walk you through all the stages of creating a compiler for a language called Oberon-0. It also has the entire source code for his finished compiler, so you can play around with it on your own machine. The compiler itself was written in Pascal (something else that Wirth created).
The Dragon Book has really good information and examples in C! This may be what you are looking for, but as I said above, the language you write the compiler in isn't all that important.

Game programming in C, where do I get started? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I started programming about 6 months back and have a decent knowledge in how to code in C. I have mainly used it to implement elementary algorithms or solve Project Euler questions (reached 50 now :) )
What I really want to learn since a long time is game programming. Ie make simple 2D games like snake, or pocket tanks. By simple, I no way mean the amount of work or effort it's going to take to make these games
I've tried searching the net but have had no luck with that. Could anyone point me in the right direction?
What exactly will I need to learn? Where do I start?
Game Programming requires a lot of Computer Science stuff on top of creativity. By Computer Science stuff I mean Algorithms, Data Structures, Computer Architecture, Computer Graphics, Operating System Internals, Artificial Intelligence & at least basic familiarity with Mathematics & Physics + experience on playing Games + Passion for Games. As you seem to be a good Algorithmic coder (Coding problems on Project Euler) so it should not be very difficult for you.
Now coming to your question one simple way to start is: Microsoft XNA (which lets you just go into game programming without having too much knowledge on above areas, ofcourse having it will be an advantage for you in longer run). Check it out: http://en.wikipedia.org/wiki/Microsoft_XNA
You can also check out this book: http://www.amazon.com/Beginning-Game-Programming-Michael-Morrison/dp/0672326590/ref=pd_sim_b_4
I have read the above (It's in C/C++/Win32) and it is really a good resource on implementing basic games which will give you a very good start to jump to XNA as a next step.
You could go with graphics.h. I am saying this because, when I were in your stage, I began with Worm and nibbles game, a very easy game, which can be constructed with drawPoly function. I used drawPoly as my implementation, but you could use you won.
In addition to that, graphics.h will provide many user-defined functions, to draw lines,rectangles,polygens. It also provide functions to color them in many different ways.
So, When you want to start gaming in C, I would suggest graphics.h as a good starting point.

What does good, modern c code look like? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm primarily a c#/.NET programmer, but the hobby project that I am about to take on will involve coding in c.
I know that there is a ton of c code out there, but its very hard to separate a well structured c project from a badly structured project if you did not "grow up" with the language. Can anyone point me toward a newer, non trivial (but not enormous) project that is considered a good example of how to structure c code?
Edit
If you cannot find a project, feel free to discuss in words how you think a c project should be structured.
Dave Hanson's C Interfaces and Implementations is a very well-crafted library of about 7000 lines of code. The book is great if you can afford it.
The implementation of the Lua programming language and libraries is about 17,000 lines of C code and is very well done but quite sophisticated in places—compilers and garbage collectors are not so easy to understand without background in those fields. But the code is beautifully engineered.
Git is over 125,000 lines of code. I can't recommend that anyone study it as an example of how to engineer C code. Just the design and public interfaces, let alone the implementations, are hard to understand—which is why there are so many git tutorials.
Check out git source code: http://github.com/git/git/tree/master
I consider Steve Dekorte's IO language implementation to be a good example for clean and pragmatic modern-day C.
This is completely anecdotal, but I've heard that the SQLite project is considered good code.
How about:
"The C Programming Language", 2nd edition, Kernighan and Ritchie
Answers to Exercises
http://users.powernet.co.uk/eton/kandr2/
The following book (with code examples) could ease your paradigm shift a bit:
Stephen Kochan
Programming in C, Third Edition
http://www.kochan-wood.com
The SVN project is written entirely in C and it is well maintained: consistently styled, good comments, low code smell. I recommend perusing it.
C: A Reference Manual contains a variety of example code usage, with implementations centric to Standard C; A definite document to look into, perhaps along with the C Std.

Great C tutorial? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I really want to learn C. What would be a good tutorial?
The C Programming Language (often referred to as "K & R") is almost universally considered to be the best resource for learning C.
While "The C Programming Language" is certainly a great book and a very good introduction to the C language, it has several drawbacks:
It is somewhat dated, the 2nd edition (the last one) covers only C89 which is now 20 years old. While C99 (the current Standard) isn't universally supported, there are a number of features from it that are supported by many implementations and exposure to them is useful.
It isn't comprehensive. It doesn't cover many of the standard library functions in any detail and certain intricacies are not explored in depth.
The text assumes you are already an experienced programmer and has a very terse style which doesn't work well for everyone.
If you are looking for a more beginner-friendly, comprehensive, or up-to-date book, I would strongly recommend C Programming: A Modern Approach, 2nd Ed. It covers every aspect of the language and the standard library in depth, including C99, and is extremely well-written. While the list price is rather high, it usually isn't difficult to find a copy for around $60 USD.
The Official GNOME Developer's Guide: http://oreilly.com/catalog/9781593270308/
Tutorials might be semi useful at first, but I always learned a language by actually developing useful code.
I'd recommend you check out some of the Gnome Love Projects.
They are generally smaller tasks for people who are interested in joining the gnome development community. They will help you get used to the dev environment, and submitting patches and the style & conventions they use. Most will teach you something you didn't know about C also.
The C book is a good and free ebook.
Here is one resource. http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/
You may refer C Programming Notes meant to supplement K&R.
It's more a faq than a tutorial, but it is quite useful: C - faq.
Concerning Gnome programming: Gnome guidelines
And here are some tools every C programmer needs:
gcc
gdb - debugger
Valgrind
gprof - Profiler
Always avoid tutorials (written by kids, for kids)
Read KR
I would seriously advice you to check out Bruce Eckel's freely available "Thinking in C", which is a flash-based introduction to the C family of programming languages:
A Flash-based audio-visual seminar to introduce you to the fundamentals of the C language which will help you move on to C-based languages like C++, Java and C#.

Resources