Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #73976 > unrolled thread
| Started by | Alla _ <modelling.data@gmail.com> |
|---|---|
| First post | 2015-10-27 09:52 -0700 |
| Last post | 2015-10-31 01:14 -0700 |
| Articles | 20 on this page of 174 — 20 participants |
Back to article view | Back to comp.lang.c
Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 09:52 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 10:06 -0700
Re: Problem with the function that should display new letter John Gordon <gordon@panix.com> - 2015-10-27 17:16 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 11:28 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 10:09 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 10:12 -0700
Re: Problem with the function that should display new letter Barry Schwarz <schwarzb@dqel.com> - 2015-10-27 13:12 -0700
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-10-27 13:23 -0700
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-27 13:49 -0700
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-27 21:27 +0000
Re: Problem with the function that should display new letter Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-10-27 18:00 -0400
Re: Problem with the function that should display new letter glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-28 02:53 +0000
Re: Problem with the function that should display new letter Robert Wessel <robertwessel2@yahoo.com> - 2015-10-28 00:43 -0500
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 06:08 +0000
Re: Problem with the function that should display new letter glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-28 08:44 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-28 09:26 +0100
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 08:44 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-28 10:40 +0100
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-10-28 06:44 -0700
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-10-28 06:35 -0700
Re: Problem with the function that should display new letter "D. Aaron Sawyer" <aaron@110.net> - 2015-10-27 13:40 -0400
Re: Problem with the function that should display new letter "D. Aaron Sawyer" <aaron@110.net> - 2015-10-27 13:47 -0400
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 11:38 -0700
Re: Problem with the function that should display new letter "D. Aaron Sawyer" <aaron@110.net> - 2015-10-27 16:46 -0400
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 11:39 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-27 18:20 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 11:36 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 12:09 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 11:51 -0700
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-27 19:25 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-27 12:27 -0700
Re: Problem with the function that should display new letter Ian Collins <ian-news@hotmail.com> - 2015-10-28 10:07 +1300
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-28 00:50 -0700
Re: Problem with the function that should display new letter Ian Collins <ian-news@hotmail.com> - 2015-10-28 21:04 +1300
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-28 01:13 -0700
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 10:40 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 11:02 +0000
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-28 11:28 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 11:57 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 12:53 +0000
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-28 13:33 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 08:35 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 10:59 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 11:04 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 11:38 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 11:43 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 12:10 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 12:58 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 13:55 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 14:02 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 15:01 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 15:44 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 16:22 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 16:26 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 16:44 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 18:45 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 19:26 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-28 20:44 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-28 22:59 +0100
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 22:48 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-29 01:14 +0100
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-29 01:07 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-29 14:07 +0100
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-29 13:57 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-29 16:22 +0100
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-10-29 08:38 -0700
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-29 17:25 +0100
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-10-29 12:46 -0700
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-30 09:03 +0100
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-29 19:19 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-30 09:54 +0100
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-30 12:20 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-29 21:36 +0000
Re: Problem with the function that should display new letter Ian Collins <ian-news@hotmail.com> - 2015-10-30 10:47 +1300
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-29 22:25 +0000
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-30 09:59 +0100
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-30 10:07 +0100
Re: Problem with the function that should display new letter David Brown <david.brown@hesbynett.no> - 2015-10-28 16:25 +0100
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-28 16:01 +0000
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-28 09:50 -0700
Re: Problem with the function that should display new letter glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-10-28 21:57 +0000
Re: Problem with the function that should display new letter Geoff <geoff@invalid.invalid> - 2015-10-28 18:25 -0700
Re: Problem with the function that should display new letter Geoff <geoff@invalid.invalid> - 2015-10-28 18:23 -0700
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-29 01:44 +0000
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-28 07:07 -0700
Re: Problem with the function that should display new letter Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-30 07:07 -0700
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-30 09:08 -0700
Re: Problem with the function that should display new letter Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-30 14:29 -0700
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-30 16:10 -0700
Re: Problem with the function that should display new letter Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-30 20:27 -0700
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-31 12:40 -0700
Re: Problem with the function that should display new letter Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-02 02:16 -0800
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 03:36 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 10:46 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 03:56 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 04:00 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 11:02 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 04:05 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 11:14 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 04:14 -0700
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-29 11:26 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 11:26 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 05:29 -0700
Re: Problem with the function that should display new letter James Kuyper <jameskuyper@verizon.net> - 2015-10-29 09:23 -0400
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 07:44 -0700
Re: Problem with the function that should display new letter James Kuyper <jameskuyper@verizon.net> - 2015-10-29 11:39 -0400
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 09:52 -0700
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-29 16:02 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 09:56 -0700
Re: Problem with the function that should display new letter James Kuyper <jameskuyper@verizon.net> - 2015-10-29 13:41 -0400
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 17:46 +0000
Re: Problem with the function that should display new letter Udyant Wig <udyantw@gmail.com> - 2015-10-30 00:14 +0530
Re: Problem with the function that should display new letter raltbos@xs4all.nl (Richard Bos) - 2015-10-29 19:30 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 22:08 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 22:28 -0700
Re: Problem with the function that should display new letter Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-30 08:10 -0700
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-10-30 08:56 -0700
Re: Problem with the function that should display new letter Tim Rentsch <txr@alumni.caltech.edu> - 2015-10-30 13:18 -0700
Re: Problem with the function that should display new letter Ian Collins <ian-news@hotmail.com> - 2015-10-30 09:11 +1300
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 01:21 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 04:04 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 11:11 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 04:19 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 11:24 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 05:26 -0700
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-29 08:31 -0700
Re: Problem with the function that should display new letter James Kuyper <jameskuyper@verizon.net> - 2015-10-29 09:42 -0400
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 08:31 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-29 10:17 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-29 17:36 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 01:18 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 08:36 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 08:38 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 02:26 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 09:32 +0000
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-30 13:39 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 03:59 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 11:18 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 06:24 -0700
Re: Problem with the function that should display new letter James Kuyper <jameskuyper@verizon.net> - 2015-10-30 14:18 -0400
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 06:34 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 13:39 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 06:57 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-11-01 09:06 +0000
Re: Problem with the function that should display new letter Keith Thompson <kst-u@mib.org> - 2015-10-30 08:49 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 10:18 -0700
Re: Problem with the function that should display new letter Barry Schwarz <schwarzb@dqel.com> - 2015-10-29 11:48 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 01:23 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 01:42 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 09:13 +0000
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-30 10:17 +0000
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 10:23 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 06:39 -0700
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 06:45 -0700
Re: Problem with the function that should display new letter Richard Heathfield <rjh@cpax.org.uk> - 2015-10-30 13:55 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-30 07:05 -0700
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-10-30 23:29 +0000
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 01:14 +0000
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-10-31 17:02 +0000
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 18:05 +0000
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-10-31 23:46 +0000
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-11-01 08:46 -0800
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-11-01 23:43 +0000
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-11-01 16:05 -0800
Re: Problem with the function that should display new letter Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-01 21:41 +0000
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-11-01 22:46 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-31 18:22 +0000
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-10-31 23:57 +0000
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-10-31 17:20 +0000
Re: Problem with the function that should display new letter Bartc <bc@freeuk.com> - 2015-10-31 13:38 +0000
Re: Problem with the function that should display new letter supercat@casperkitty.com - 2015-10-31 11:28 -0700
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-11-01 00:06 +0000
Re: Problem with the function that should display new letter Steve Thompson <stevet810@gmail.com> - 2015-10-31 17:58 +0000
Re: Problem with the function that should display new letter Alla _ <modelling.data@gmail.com> - 2015-10-31 01:14 -0700
Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9 Next page →
| From | Bartc <bc@freeuk.com> |
|---|---|
| Date | 2015-10-29 11:26 +0000 |
| Message-ID | <n0svl0$ko$1@dont-email.me> |
| In reply to | #74155 |
On 29/10/2015 11:14, Alla _ wrote:
> On Thursday, October 29, 2015 at 3:02:45 PM UTC+4, Richard Heathfield wrote:
> My goal is to check if the argv[1] is a word, i.e.
> there are only letters in it. If there are some, or all,
> non-alphabetical characters, the program should return 1.
>
> To do that, I iterate through each character in argv[1]
> to check if it is an alphabetical character.
>
> for (i = 0; i < argv_len; i++)
> {
> for (j = 0; j != '\0'; j++)
> {
> if (!isalpha(argv[i][j]))
> return 1;
> }
> }
>
It might help to add some structure even in this simple test. For
example, create a function called is_word(), then the contents can be
isolated from anything else, such as obtaining command-line arguments.
This is a simple version:
/* Take a string s and return 1 if all the characters in it
are letters. No white-space is allowed. Return 0 otherwise.
s must not be null. An empty string "" returns 0.
*/
int is_word(char *s) {
return 1;
}
But it doesn't work perfectly because it always returns 1 even when s
doesn't contain a proper word. That's for you to fill in.
(Here, there is no length provided, so you need to call strlen(), or you
can scan the string s without knowing the length in advance because you
know it always ends with a 0 character.)
It might be used like this (after validating argv):
if is_word(argv[1]) ....
--
Bartc
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-10-29 11:26 +0000 |
| Message-ID | <n0svl0$a3$2@dont-email.me> |
| In reply to | #74155 |
On 29/10/15 11:14, Alla _ wrote:
<snip>
> Please, let me repeat it here, followed by a correct
> part of the code:
>
> for (i = 0; i < argv_len; i++)
> {
> for (j = 0; j != '\0'; j++)
Please let me repeat it here:
for(j = 0; argv[i][j] != '\0'; j++)
That's three times I've fixed the same bug. Please, please, please don't
make it four. Thanks.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | Alla _ <modelling.data@gmail.com> |
|---|---|
| Date | 2015-10-29 05:29 -0700 |
| Message-ID | <2691455d-556c-4174-bec9-ec12286fe646@googlegroups.com> |
| In reply to | #74159 |
On Thursday, October 29, 2015 at 3:26:35 PM UTC+4, Richard Heathfield wrote:
> On 29/10/15 11:14, Alla _ wrote:
>
> <snip>
> > Please, let me repeat it here, followed by a correct
> > part of the code:
> >
> > for (i = 0; i < argv_len; i++)
> > {
> > for (j = 0; j != '\0'; j++)
>
> Please let me repeat it here:
>
> for(j = 0; argv[i][j] != '\0'; j++)
>
> That's three times I've fixed the same bug. Please, please, please don't
> make it four. Thanks.
Oh! I see it now: it has to be argv[i][j] != '\0',
because j is an index, and '\0' is an actual value,
or character, to which j indicates.
I apologize for this.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2015-10-29 09:23 -0400 |
| Message-ID | <n0t6h2$prp$1@dont-email.me> |
| In reply to | #74162 |
On 10/29/2015 08:29 AM, Alla _ wrote:
> On Thursday, October 29, 2015 at 3:26:35 PM UTC+4, Richard Heathfield wrote:
>> On 29/10/15 11:14, Alla _ wrote:
>>
>> <snip>
>>> Please, let me repeat it here, followed by a correct
>>> part of the code:
>>>
>>> for (i = 0; i < argv_len; i++)
>>> {
>>> for (j = 0; j != '\0'; j++)
>>
>> Please let me repeat it here:
>>
>> for(j = 0; argv[i][j] != '\0'; j++)
>>
>> That's three times I've fixed the same bug. Please, please, please don't
>> make it four. Thanks.
>
>
> Oh! I see it now: it has to be argv[i][j] != '\0',
> because j is an index, and '\0' is an actual value,
> or character, to which j indicates.
I'm curious - could you explain why he had to correct that mistake three
times? What exactly were your thought processes the first time that you
read argv[i][j] != '\0', and made the decision to ignore it? What were
you thinking the second time that you read that, and decided to ignore
it again? Whatever led you to do that, I'd recommend trying to figure
out how to stop it.
I can understand being uncertain what that expression means, uncertain
why it's necessary, or uncertain why your original version was wrong,
and asking corresponding questions. You're new to C, it's normal to not
understand things. What I don't understand is simply ignoring it.
--
James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Alla _ <modelling.data@gmail.com> |
|---|---|
| Date | 2015-10-29 07:44 -0700 |
| Message-ID | <9e79611d-aa7f-4716-8257-09064f62a224@googlegroups.com> |
| In reply to | #74168 |
On Thursday, October 29, 2015 at 5:24:00 PM UTC+4, James Kuyper wrote:
> On 10/29/2015 08:29 AM, Alla _ wrote:
> > On Thursday, October 29, 2015 at 3:26:35 PM UTC+4, Richard Heathfield wrote:
> >> On 29/10/15 11:14, Alla _ wrote:
> >>
> >> <snip>
> >>> Please, let me repeat it here, followed by a correct
> >>> part of the code:
> >>>
> >>> for (i = 0; i < argv_len; i++)
> >>> {
> >>> for (j = 0; j != '\0'; j++)
> >>
> >> Please let me repeat it here:
> >>
> >> for(j = 0; argv[i][j] != '\0'; j++)
> >>
> >> That's three times I've fixed the same bug. Please, please, please don't
> >> make it four. Thanks.
> >
> >
> > Oh! I see it now: it has to be argv[i][j] != '\0',
> > because j is an index, and '\0' is an actual value,
> > or character, to which j indicates.
>
> I'm curious - could you explain why he had to correct that mistake three
> times? What exactly were your thought processes the first time that you
> read argv[i][j] != '\0', and made the decision to ignore it? What were
> you thinking the second time that you read that, and decided to ignore
> it again? Whatever led you to do that, I'd recommend trying to figure
> out how to stop it.
> I can understand being uncertain what that expression means, uncertain
> why it's necessary, or uncertain why your original version was wrong,
> and asking corresponding questions. You're new to C, it's normal to not
> understand things. What I don't understand is simply ignoring it.
> --
> James Kuyper
James,
Please, do not be so upset with me. I did not ignore
a word Richard has ever written, and I am sure Richard knows it,
and I have explained that many times. I will never be able to
find enough thankful words to Richard, you, Keith, Ben, Barry,
Bart, Ian, and all other people who are helping me (please, forgive
me that I don't name everyone). Once again: without this precious
help I would not reach the state I am at now. I realize that for
professionals it's hard to understand how difficult it is for a person
like me to learn what I have already learned thanks to the help here.
I am not here to give any advices, and I wouldn't dare to do so
usually; therefore the following is not an advice but, say,
a soft and full of good intentions admonition (I am not a Native
speaker, so I hope it's a correct word): before blaming a person,
please, if interested in helping, take a second, or a minute, to
think of the reasons of what you might consider to be an intentional
wrong doing; there are many many reasons why people don't do what
we think they ought to do, because we are all different, and, more
importantly, circumstances might differ a lot :) You don't even need
that minute or second: I find it helpful to think that everyone does
something under best intentions, and if I don't understand why it
looks different, than it is the problem of my perception.
I usually do not write on topics outside C programming :)
I do apologize once again for that issue with argv[i][j]:
I simply did not see it; I did not see that part.
I have a problem with computer, which I can't solve now.
I am working on MacBookPro, end 2011, that has already obsolete
OS.
I had a huge issue with Apple on that, because I have purchased
what was considered to be the most powerful professional machine
at that time.
It never lived up to that notion. Now, when I run Safari, Firefox,
Virtual Machine, Terminal, Xcode at the same time, the machine
freezes, it takes hours to download things, I have to shut down
programs, etc. Given huge amount of effort I need to invest into
understanding even simple C issues, I also have to fight with
these technical problems. I know I had to change OS, but that is
not possible now. I am waiting for a better time.
Therefore, I do hope that once I master at least basics of C and
CS, I will feel much more comfortable, and will be able to solve
all issues described above, or at least be more comfortable in
finding other ways.
Also, I didn't yet follow advice on switching from Google groups,
which also cause troubles, to more professional platforms, simply
because when I have checked all suggested sites, I have not understand
a word )))) Yes, I am that, well... illiterate, to use a soft word )))
I decided to postpone, to save the effort for C and CS.
Enough of venting, which has never actually been part of my proclivities.
Thank you everyone for patience, and, please, bear with me )))
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2015-10-29 11:39 -0400 |
| Message-ID | <n0tegb$s4b$1@dont-email.me> |
| In reply to | #74172 |
On 10/29/2015 10:44 AM, Alla _ wrote: ... > I do apologize once again for that issue with argv[i][j]: > I simply did not see it; I did not see that part. Then that's what you need to deal with. Here's then entirety of his first message mentioning that expression: On 10/29/2015 07:02 AM, Richard Heathfield wrote: ... > Again, you're not thinking it through. What do you want this test to do? > > My educated guess is that you are intending to ensure that you don't > overstep the bounds of argv[i], so you are looking for the null > terminating character of argv[i]. You can do that like this: > > while(argv[i][j] != '\0') I don't see how he could possibly have given "argv[i][j] != '\0'" a more prominent place in his response than he actually did. If, despite that, you "did not see that part", then you were reading it far too quickly. Slow down, and actually think about what you're reading. This fits in with the more general advice Richard's been giving you. Slow down, don't try to do so many different things at once. Get the first, simplest things working firs, and make sure you understand why they work. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Alla _ <modelling.data@gmail.com> |
|---|---|
| Date | 2015-10-29 09:52 -0700 |
| Message-ID | <b19aeccb-5bbd-4de4-9757-84c998ab84dc@googlegroups.com> |
| In reply to | #74177 |
On Thursday, October 29, 2015 at 7:40:08 PM UTC+4, James Kuyper wrote: > On 10/29/2015 10:44 AM, Alla _ wrote: > ... > > I do apologize once again for that issue with argv[i][j]: > > I simply did not see it; I did not see that part. > > Then that's what you need to deal with. Here's then entirety of his > first message mentioning that expression: > > On 10/29/2015 07:02 AM, Richard Heathfield wrote: > ... > > Again, you're not thinking it through. What do you want this test to do? > > > > My educated guess is that you are intending to ensure that you don't > > overstep the bounds of argv[i], so you are looking for the null > > terminating character of argv[i]. You can do that like this: > > > > while(argv[i][j] != '\0') > > I don't see how he could possibly have given "argv[i][j] != '\0'" a more > prominent place in his response than he actually did. If, despite that, > you "did not see that part", then you were reading it far too quickly. > Slow down, and actually think about what you're reading. > This fits in with the more general advice Richard's been giving you. > Slow down, don't try to do so many different things at once. Get the > first, simplest things working firs, and make sure you understand why > they work. > -- > James Kuyper James, I hoped I have explained that my computer was freezing, and thus this whole issue has nothing to do with the pace with which I read, rather study, messages. Yes, you are right that I have to understand things, and only then move further. This is exactly what I am doing. Thank you for understanding and your help :)
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2015-10-29 16:02 +0000 |
| Message-ID | <87lhalhdd1.fsf@bsb.me.uk> |
| In reply to | #74172 |
Alla _ <modelling.data@gmail.com> writes: > On Thursday, October 29, 2015 at 5:24:00 PM UTC+4, James Kuyper wrote: <snip> >> I'm curious - could you explain why he had to correct that mistake three >> times? <snip> > I do apologize once again for that issue with argv[i][j]: > I simply did not see it; I did not see that part. This is very common. Don't worry about it. You should, however, try to train yourself to look differently. For example (to borrow and old proof-reading trick), you could try reading the code backwards (i.e. from right to left) as well as forwards. That can reduce the chance of just seeing what you expect to see. My mother could open a broadsheet newspaper, scan over it for a few seconds, and start to point out the typos, whereas I can stare at just a single line of English text without being able to see even the most obvious errors. (I bet there will be a few typos here, as there are in most of my posts). Fortunately, I seem to be able to spot programming errors (the simple typo sort, I mean) with ease -- they just seem to jump off the page and I suspect that lots of people here have that skill. That's probably why James was so puzzled. The difference between the lines of code would have seemed so obvious, just as my mother was always baffled by how I could write "thier" and not notice it. The good thing is that I suspect that, to a large extent, it is a learned skill. I certainly remember a time when I'd have to study a line of code to see an error that would, today, leap out at me. <snip> -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Alla _ <modelling.data@gmail.com> |
|---|---|
| Date | 2015-10-29 09:56 -0700 |
| Message-ID | <81c30f6a-3633-438f-bfd9-d1bc7ef38ffb@googlegroups.com> |
| In reply to | #74181 |
On Thursday, October 29, 2015 at 8:02:47 PM UTC+4, Ben Bacarisse wrote: > Alla _ <modelling.data@gmail.com> writes: > > > On Thursday, October 29, 2015 at 5:24:00 PM UTC+4, James Kuyper wrote: > <snip> > >> I'm curious - could you explain why he had to correct that mistake three > >> times? > <snip> > > I do apologize once again for that issue with argv[i][j]: > > I simply did not see it; I did not see that part. > > This is very common. Don't worry about it. You should, however, try to > train yourself to look differently. For example (to borrow and old > proof-reading trick), you could try reading the code backwards > (i.e. from right to left) as well as forwards. That can reduce the > chance of just seeing what you expect to see. Thank you very much! > > My mother could open a broadsheet newspaper, scan over it for a few > seconds, and start to point out the typos, whereas I can stare at just a > single line of English text without being able to see even the most > obvious errors. That is wonderful. Have you ever asked her how did she do that? Had she trained herself to read like that, or is it a natural habit of looking at letters, and a love for language?
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2015-10-29 13:41 -0400 |
| Message-ID | <n0tlkb$r5m$1@dont-email.me> |
| In reply to | #74184 |
On 10/29/2015 12:56 PM, Alla _ wrote: > On Thursday, October 29, 2015 at 8:02:47 PM UTC+4, Ben Bacarisse wrote: ... >> My mother could open a broadsheet newspaper, scan over it for a few >> seconds, and start to point out the typos, whereas I can stare at just a >> single line of English text without being able to see even the most >> obvious errors. > > That is wonderful. Have you ever asked her how did she > do that? Had she trained herself to read like that, or > is it a natural habit of looking at letters, and a love > for language? I can do the same thing as his mother - I'll briefly scan an entire page of text, and many (though not all) of the typos will just pop out at me. I've no idea how I acquired this ability - other than spending five decades doing a lot more reading than the average person. Incidentally, this ability is almost useless on my own writing. If I commit a typo, I'm unlikely to notice the typo with a quick scan - since I know what I intended to say, my mind reads the typo as if it were the intended text. Only a slow, careful scan allows me to catch my own mistakes, and not even all of those. The same thing applies to checking my own code. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-10-29 17:46 +0000 |
| Message-ID | <n0tlsu$s9j$1@dont-email.me> |
| In reply to | #74187 |
On 29/10/15 17:41, James Kuyper wrote: > Incidentally, > this ability is almost useless on my own writing. If I commit a typo, > I'm unlikely to notice the typo with a quick scan - since I know what I > intended to say, my mind reads the typo as if it were the intended text. As I have discovered, the trick is to re-read it *after* hitting Send. > Only a slow, careful scan allows me to catch my own mistakes, and not > even all of those. The same thing applies to checking my own code. Typographically speaking, I catch most of my errors at the typing stage. This is automatic - I realise that I've stopped typing and that my finger is reaching for Backspace, so I look at the screen to find out why, and there, staring at me, is the typo. I wish I could fix my program bugs so easily! -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | Udyant Wig <udyantw@gmail.com> |
|---|---|
| Date | 2015-10-30 00:14 +0530 |
| Message-ID | <877fm5h5uw.fsf@rudiments.goosenet.in> |
| In reply to | #74188 |
Richard Heathfield <rjh@cpax.org.uk> writes: > Typographically speaking, I catch most of my errors at the typing > stage. This is automatic - I realise that I've stopped typing and that > my finger is reaching for Backspace, so I look at the screen to find > out why, and there, staring at me, is the typo. There _has_ to be a way to acquire/teach this. -- Udyant Wig
[toc] | [prev] | [next] | [standalone]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2015-10-29 19:30 +0000 |
| Message-ID | <563273ae.5896468@news.xs4all.nl> |
| In reply to | #74189 |
Udyant Wig <udyantw@gmail.com> wrote: > Richard Heathfield <rjh@cpax.org.uk> writes: > > Typographically speaking, I catch most of my errors at the typing > > stage. This is automatic - I realise that I've stopped typing and that > > my finger is reaching for Backspace, so I look at the screen to find > > out why, and there, staring at me, is the typo. > > There _has_ to be a way to acquire/teach this. There is. Experience in rapid touch-typing. _Lots_ of it. Learn not to hunt'n'peck, and your fingers'll learn to feel when they're not where they should be on the keyboard - digital proprioception. Richard
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-10-29 22:08 +0000 |
| Message-ID | <n0u583$rhp$1@dont-email.me> |
| In reply to | #74195 |
On 29/10/15 19:30, Richard Bos wrote: > Udyant Wig <udyantw@gmail.com> wrote: > >> Richard Heathfield <rjh@cpax.org.uk> writes: >>> Typographically speaking, I catch most of my errors at the typing >>> stage. This is automatic - I realise that I've stopped typing and that >>> my finger is reaching for Backspace, so I look at the screen to find >>> out why, and there, staring at me, is the typo. >> >> There _has_ to be a way to acquire/teach this. > > There is. Experience in rapid touch-typing. _Lots_ of it. Learn not to > hunt'n'peck, and your fingers'll learn to feel when they're not where > they should be on the keyboard - digital proprioception. Not only that, but you'll be approximately twice as productive at the keyboard. Earlier this year, just as an experiment, I found one of those online typing tests, and compared my touch-typing speed with my hunt-n-peck speed. I'm not slow at hunt-n-peck by any means, and I managed... well, I forget the exact number, but for some reason 37wpm rings a bell. But, by touch typing, I was able comfortably to exceed 70wpm. I have watched professional people - doctors and so on - typing. Almost without exception, they are hunters and peckers. These are supposedly intelligent people, but they can't see that three weeks spent learning to touch type will pay for itself in saved time within three months, and after that it's all profit. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | Alla _ <modelling.data@gmail.com> |
|---|---|
| Date | 2015-10-29 22:28 -0700 |
| Message-ID | <bbb125f3-8407-4abb-8319-624b6389ccd0@googlegroups.com> |
| In reply to | #74210 |
On Friday, October 30, 2015 at 2:08:17 AM UTC+4, Richard Heathfield wrote: > On 29/10/15 19:30, Richard Bos wrote: > > Udyant Wig <udyantw@gmail.com> wrote: > > > >> Richard Heathfield <rjh@cpax.org.uk> writes: > >>> Typographically speaking, I catch most of my errors at the typing > >>> stage. This is automatic - I realise that I've stopped typing and that > >>> my finger is reaching for Backspace, so I look at the screen to find > >>> out why, and there, staring at me, is the typo. > >> > >> There _has_ to be a way to acquire/teach this. > > > > There is. Experience in rapid touch-typing. _Lots_ of it. Learn not to > > hunt'n'peck, and your fingers'll learn to feel when they're not where > > they should be on the keyboard - digital proprioception. > > Not only that, but you'll be approximately twice as productive at the > keyboard. > > Earlier this year, just as an experiment, I found one of those online > typing tests, and compared my touch-typing speed with my hunt-n-peck > speed. I'm not slow at hunt-n-peck by any means, and I managed... well, > I forget the exact number, but for some reason 37wpm rings a bell. But, > by touch typing, I was able comfortably to exceed 70wpm. > > I have watched professional people - doctors and so on - typing. Almost > without exception, they are hunters and peckers. These are supposedly > intelligent people, but they can't see that three weeks spent learning > to touch type will pay for itself in saved time within three months, and > after that it's all profit. > > -- > Richard Heathfield > Email: rjh at cpax dot org dot uk > "Usenet is a strange place" - dmr 29 July 1999 > Sig line 4 vacant - apply within This is very interesting! I was sure that in US and in some European countries people acquire the skill of touch typing from early childhood. I was taught this skill at high school, not in US. We were taught on typing machines; maybe this is why I still like to hear the sound of "hitting" on the keyboard :) Interesting to know that doctors do not use touch typing: with the amount of typing they require to do almost daily, it would seem to be a natural habit.
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2015-10-30 08:10 -0700 |
| Message-ID | <kfnmvv09yti.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #74189 |
Udyant Wig <udyantw@gmail.com> writes: > Richard Heathfield <rjh@cpax.org.uk> writes: >> Typographically speaking, I catch most of my errors at the typing >> stage. This is automatic - I realise that I've stopped typing and that >> my finger is reaching for Backspace, so I look at the screen to find >> out why, and there, staring at me, is the typo. > > There _has_ to be a way to acquire/teach this. For some (perhaps most) people, yes; but not for all. Some people (I have known at least one) have "spelling blindness", in analogy to color blindness, and just will never be really good at spelling. And such people can still be outstanding software developers (yes, even in C).
[toc] | [prev] | [next] | [standalone]
| From | supercat@casperkitty.com |
|---|---|
| Date | 2015-10-30 08:56 -0700 |
| Message-ID | <7102d20c-93b2-4ecb-a3ad-5a0f523efb24@googlegroups.com> |
| In reply to | #74311 |
On Friday, October 30, 2015 at 10:10:58 AM UTC-5, Tim Rentsch wrote:
> For some (perhaps most) people, yes; but not for all.
> Some people (I have known at least one) have "spelling
> blindness", in analogy to color blindness, and just
> will never be really good at spelling. And such people
> can still be outstanding software developers (yes, even
> in C).
I wish language designers would use the following rule with regard to case-
sensitivity:
1. All identifiers must be specified with casing that precisely matches the
point of declaration.
2. The declaration of any identifier will shadow any other identifiers with
the same usage class that differ only in casing.
3. A special form of declaration can be used to import an outside identifier
which differs only in case from another visible in the same scope.
For people reading code verbally, or for people whose reading process
involves converting words to sounds, it can be difficult to distinguish
between identifiers that differ only in case, especially if they don't
know what identifiers might need to be distinguished from it. If e.g.
there happens to be a global identifier woozleHashcode (somewhat contrived
example) in an outer scope and a function has an automatic variable named
woozleHashCode, it would be very easy for a programmer to accidentally
mistype the identifier as woozleHashcode in some spot and consequently use
the wrong variable, without any sort of compiler mistake. Some people may
be able to spot such an error easily, but others might have a much more
difficult time. If a language were to complain that "woozleHashcode" was
not defined within the function, then a programmer could either:
1. Fix the identifier to woozleHashCode if that's what was intended.
2. If woozleHashcode was intended, replace all occurrences of woozleHashCode
with something more distinctive.
3. If woozleHashcode was intended but #2 is unpalatable, add a directive so
that anyone reading the code would know that they needed to be on the
lookout for both identifiers.
Such a rule would not need to forbid the use of similar identifiers in
contexts where only one would be legal anyhow, or where their effects would
be synonymous. For example, something like
typedef struct WOOZLE { ... } Woozle;
Woozle woozle;
woozle.fnord+=4;
would not pose a problem because given "struct WOOZLE hey;" neither Woozle
nor woozle would be a candidate; in C++, for the second line, both "WOOZLE"
and "Woozle" would be candiates but they'd be synonymous so there's no
problem. In the third line there would be no problem unless (in an
object-oriented language) "Woozle" had both static and instance members
with names that--ignoring case--would match "fnord".
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <txr@alumni.caltech.edu> |
|---|---|
| Date | 2015-10-30 13:18 -0700 |
| Message-ID | <kfnsi4s860c.fsf@x-alumni2.alumni.caltech.edu> |
| In reply to | #74330 |
supercat@casperkitty.com writes: > On Friday, October 30, 2015 at 10:10:58 AM UTC-5, Tim Rentsch wrote: >> For some (perhaps most) people, yes; but not for all. >> Some people (I have known at least one) have "spelling >> blindness", in analogy to color blindness, and just >> will never be really good at spelling. And such people >> can still be outstanding software developers (yes, even >> in C). > > I wish language designers would [...] Do you know the aphorism that starts "If wishes were horses, ..."?
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2015-10-30 09:11 +1300 |
| Message-ID | <d9fcs8F2lrhU2@mid.individual.net> |
| In reply to | #74188 |
Richard Heathfield wrote: > On 29/10/15 17:41, James Kuyper wrote: >> Incidentally, >> this ability is almost useless on my own writing. If I commit a typo, >> I'm unlikely to notice the typo with a quick scan - since I know what I >> intended to say, my mind reads the typo as if it were the intended text. > > As I have discovered, the trick is to re-read it *after* hitting Send. > >> Only a slow, careful scan allows me to catch my own mistakes, and not >> even all of those. The same thing applies to checking my own code. > > Typographically speaking, I catch most of my errors at the typing stage. > This is automatic - I realise that I've stopped typing and that my > finger is reaching for Backspace, so I look at the screen to find out > why, and there, staring at me, is the typo. > > I wish I could fix my program bugs so easily! Use TDD! I'm hopeless at spotting my own typos (as some of posts here show!) which is one reason I found writing code to pass tests such a boost to my productivity. Unless I make the same mistake in two places, which isn't unheard of, the tests catch the typos as I make them. If you have the opportunity, pair programming takes this a step further: two people seldom make the same silly mistakes. We also tend to be better at spotting the mistakes of others than our own. -- Ian Collins
[toc] | [prev] | [next] | [standalone]
| From | Alla _ <modelling.data@gmail.com> |
|---|---|
| Date | 2015-10-30 01:21 -0700 |
| Message-ID | <0620fc1d-d37b-4ccd-8a8f-095d93653bf7@googlegroups.com> |
| In reply to | #74187 |
On Thursday, October 29, 2015 at 9:41:44 PM UTC+4, James Kuyper wrote: > On 10/29/2015 12:56 PM, Alla _ wrote: > > On Thursday, October 29, 2015 at 8:02:47 PM UTC+4, Ben Bacarisse wrote: > ... > >> My mother could open a broadsheet newspaper, scan over it for a few > >> seconds, and start to point out the typos, whereas I can stare at just a > >> single line of English text without being able to see even the most > >> obvious errors. > > > > That is wonderful. Have you ever asked her how did she > > do that? Had she trained herself to read like that, or > > is it a natural habit of looking at letters, and a love > > for language? > > I can do the same thing as his mother - I'll briefly scan an entire page > of text, and many (though not all) of the typos will just pop out at me. > I've no idea how I acquired this ability - other than spending five > decades doing a lot more reading than the average person. Incidentally, > this ability is almost useless on my own writing. If I commit a typo, > I'm unlikely to notice the typo with a quick scan - since I know what I > intended to say, my mind reads the typo as if it were the intended text. > Only a slow, careful scan allows me to catch my own mistakes, and not > even all of those. The same thing applies to checking my own code. > -- > James Kuyper This is indeed interesting. You are right: reading a lot is the best way.
[toc] | [prev] | [next] | [standalone]
Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9 Next page →
Back to top | Article view | comp.lang.c
csiph-web