From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!news2.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mart van de Wege Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Wed, 09 Feb 2011 11:28:23 +0100 Message-ID: <86oc6lqz7c.fsf@gareth.avalon.lan> References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <8r86vgFc3uU1@mid.individual.net> <19fh1chm74f9.11cws0j5bckze.dlg@40tude.net> <4d4ff70e$0$6886$9b4e6d93@newsspool2.arcor-online.net> <737a6396-72bd-4a1e-8895-7d50f287960e@d28g2000yqc.googlegroups.com> <4d5008a5$0$6879$9b4e6d93@newsspool2.arcor-online.net> <4d5031fe$0$6765$9b4e6d93@newsspool3.arcor-online.net> <1f229967-d3cf-42b6-8087-c97ee08652f3@i40g2000yqh.googlegroups.com> <4d51169e$0$7657$9b4e6d93@newsspool1.arcor-online.net> <1bnp0pw1c8r5b$.guxc48qweiwe.dlg@40tude.net> <8662stskn8.fsf@gareth.avalon.lan> <1dr5g15dsh9jz$.2ljktj6j900v.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net h+a3DKyT00jNhEdPUPCa1gqBuEjN1JIrZ+dOrruFqYX1HT/Exx X-Orig-Path: gareth.avalon.lan!not-for-mail Cancel-Lock: sha1:y5zylVUwVmc+JDN1O9MYE5qhQgw= sha1:VSha176yqhBVD6PCI/uP3fhk3JI= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Xref: g2news2.google.com comp.lang.ada:18054 Date: 2011-02-09T11:28:23+01:00 List-Id: "Dmitry A. Kazakov" writes: > On Wed, 09 Feb 2011 08:59:55 +0100, Mart van de Wege wrote: > >> "Dmitry A. Kazakov" writes: >> >>> On Tue, 08 Feb 2011 11:30:51 -0700, Jeffrey Carter wrote: >>> >>>> The problem with this is it violates Dijkstra's adage that we have small brains >>>> and must do our work with them. Few of us can keep all the code for the entire >>>> project in his head, and there are times when what one remembers is incorrect. >>>> And so, eventually, in any real project, even the best of developers make errors >>>> under such circumstances. >>>> >>>> So, when talking to a C coder, "You said int, so negative values should be OK" >>>> isn't considered a valid argument. The response will be that you are supposed to >>>> have read the code and realized what would happen if you called it with a >>>> negative value. If you then go ahead and do so, you get what you asked for. >>> >>> Three candidates in a row I have interviewed for a C/C++/C# position could >>> not answer the question how to test the 3rd bit of a byte in C. All three >>> had 3+ years of programming "experience." >> >> I'm not much of a programmer at all, and I don't know the exact >> construct in C, but isn't that simply a question of doing a bitwise AND >> with 0x04, assuming counting from the RHS? > > Yes it is. There must be something awfully wrong with the software > engineering industry and education. 20 years ago such a question would > offend the candidate. Which is why I asked my question. It seems so completely obvious to me, that I can't understand that someone with a formal education in the field wouldn't know about it. I must admit that I learned programming about 30 years ago doing hardware stuff on a C64, so bit-banging and masking to read register bits are easy for me. And I agree with your general gist, the current crop of programmers is not very good. My real job is managing and integrating their stuff, and I found out quickly why sysadmins tend to dislike developers. Mart -- "We will need a longer wall when the revolution comes." --- AJS, quoting an uncertain source.