Re: Global Variables : Where are they stored ?



On Nov 30, 11:45 am, c...@xxxxxxxx (Richard Harter) wrote:

I opine you're missing the point. If one is going to program
effectively, one should have a general understanding of how
computers work, how operating systems typically work, and the
various ways resources are allocated and managed. Without that
knowledge it is all too easy (particularly in C) to write code
that is horribly inefficient or even just plain doesn't work.



Thank you! That's my exact point. I have spent most of my time
viewing
code (mostly others' and some mine) much more than writing. My
experience has been that whenever I come across some inefficient code
(similar to the big struct I posted), the original author would
highly
unlikely know about the concept of memory layout, regardless of how
long he has been programming in C.

I still want to emphasize that the way the question being asked is
effective, at least in my group's opinion, since we would have already
explained the nature of the project. No offense to anyone here. Most
people who have "been there, done that" would likely know what the
interviewer is "really" asking. And we don't just ask the global
variable question, so we are pretty confident that we don't miss a
real good candidate :-)


BTW, our SW is not just a plain application, well most of it *is*. It
is already quite large in footprint (lots of algorithms, state
machines...), CPU (lots of signal processing) and memory (lots of
data) usage. On top of that, it is supposed to run in the background.
However, we quite often still need to develop system level stuff like
device drivers for IO, power management, timer, etc. on a large range
of OSes/CPUs. So experiences with endianess and alignment are also
important. I mentioned on somewhere else that I used to work with an
architectural level Java/C# programmer who never heard of big/little
endian.


We don't mind if the candidate can recite the C standard, but we
would
be more interested if s/he can write efficient and portable SW. We
don't want clever code, so that the *non-original-author* can debug
more easily. We don't want fancy language features so that we can
make
all our compilers happy. BTW, that's not the real hard job
requirements. It is just the way I think it should be.

One clarification: I am not sure if any of the compilers we use are
actually non-conforming. But if we use fancy language features and one
customer has an older compiler, we might have to go back and patch up.

Actually it is quite a fun job. If anyone is interested, information
is on www.broadcom.com, and look for job openings in San Jose or
Irvine, California.
.



Relevant Pages

  • Re: Article in Scientific American
    ... I.e., without an algorithm to ... proof-checker produces is not merely proof of the validity ... The point was only that using different operating systems or different ... compilers will tend to mitigate the possibility of compiler or operating ...
    (sci.math)
  • Re: Another computer algebra system : smib
    ... a list of problems caused by failures of compilers, or programmers to abide by some consistent specification. ... Certainly sometimes a bug is discovered only after a program is ported to a new environment -- a bug that existed in the old environment too, but just had not been exercised. ... Yes, principally bugs in compilers, operating systems, and programmers' understanding of compilers, operating systems, parallelism, etc. ... In the mid 1980s there were a host of multiple-processor machines, typically motorola 68020s with a shared memory bus, but also processors from MIPS. ...
    (sci.math.symbolic)
  • Re: making directories and subdirectories
    ... language in abstract at all. ... I have worked on operating systems where ... have C compilers) ... try to call a library function built with one C ...
    (comp.lang.fortran)
  • Re: C vs. C++ in pthreads...
    ... Two different machines, ... > compilers, operating systems, and processors. ... add a non default copy constructor ... ...
    (comp.lang.cpp)
  • Re: Ada Component Registry proposal
    ... > the OpenGL binding depends on AdaBindX. ... Right now I have a Requires entry that can include other projects, ... compilers, Ada versions, hardware or operating systems. ... If software has been ported to several compilers or several ...
    (comp.lang.ada)

Loading