Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.physics > #609400 > unrolled thread
| Started by | Jeff-Relf.Me <@.> |
|---|---|
| First post | 2016-12-17 12:34 -0800 |
| Last post | 2016-12-21 07:14 -0600 |
| Articles | 20 — 7 participants |
Back to article view | Back to sci.physics
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Loop(100) Jeff-Relf.Me <@.> - 2016-12-17 12:34 -0800
Command Line jockies use plenty of aliases, no ? ! Jeff-Relf.Me <@.> - 2016-12-17 21:59 -0800
Re: Loop(100) moroney@world.std.spaamtrap.com (Michael Moroney) - 2016-12-19 17:20 +0000
I don't worry about "optimizations", don't need to. Jeff-Relf.Me <@.> - 2016-12-19 10:56 -0800
Re: I don't worry about "optimizations", don't need to. moroney@world.std.spaamtrap.com (Michael Moroney) - 2016-12-20 12:30 +0000
Other people's code is hard to learn/modify. Jeff-Relf.Me <@.> - 2016-12-20 06:06 -0800
Re: Other people's code is hard to learn/modify. Peter Köhlmann <peter-koehlmann@t-online.de> - 2016-12-20 15:31 +0100
Re: Other people's code is hard to learn/modify. chrisv <chrisv@nospam.invalid> - 2016-12-20 09:04 -0600
Re: Other people's code is hard to learn/modify. Double-A <double-a3@hush.com> - 2016-12-20 13:33 -0800
Re: Other people's code is hard to learn/modify. moroney@world.std.spaamtrap.com (Michael Moroney) - 2016-12-20 15:06 +0000
What The Fuck is wrong with your peers ? ! Jeff-Relf.Me <@.> - 2016-12-20 09:59 -0800
Re: What The Fuck is wrong with your peers ? ! moroney@world.std.spaamtrap.com (Michael Moroney) - 2016-12-20 23:22 +0000
I won, bigly. Jeff-Relf.Me <@.> - 2016-12-20 16:15 -0800
AutoFormatting hides the fingerprints. Jeff-Relf.Me <@.> - 2016-12-21 02:55 -0800
Re: AutoFormatting hides the fingerprints. Peter Köhlmann <peter-koehlmann@t-online.de> - 2016-12-21 14:33 +0100
Re: AutoFormatting hides the fingerprints. moroney@world.std.spaamtrap.com (Michael Moroney) - 2016-12-22 03:21 +0000
My code is dense, and hard to read, like the Washington Post. Jeff-Relf.Me <@.> - 2016-12-22 02:36 -0800
Re: I won, bigly. Silver Slimer <.m@nsn.s> - 2016-12-21 09:09 -0500
Re: I won, bigly. benj <benj@nobody.net> - 2016-12-21 17:37 -0500
Re: What The Fuck is wrong with your peers ? ! chrisv <chrisv@nospam.invalid> - 2016-12-21 07:14 -0600
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-17 12:34 -0800 |
| Subject | Loop(100) |
| Message-ID | <Jeff-Relf.Me@Dec.17--0.34P.Seattle.2016> |
Incubus wrote:
> for (int i = 0; i < 100; ++i)
> [...]
> What is the advantage of using '++i' instead of 'i++' ?
I see no need to optimize integer increments.
My loops look like this:
wchar _T[999], *P = _T ;
Loop(3) { int Y = J ;
Loop(4) P += Str( P, L"( %d, %d )%s", J, Y, J == LLL - 1 ? L"\n" : L" " ); }
printf( _T );
Given:
#define Loop( N ) int LLL = ( N ), J = -1 ; while ( ++J < LLL )
#define StrF fwprintf
typedef wchar_t wchar ;
Output:
( 0, 0 ) ( 1, 0 ) ( 2, 0 ) ( 3, 0 )
( 0, 1 ) ( 1, 1 ) ( 2, 1 ) ( 3, 1 )
( 0, 2 ) ( 1, 2 ) ( 2, 2 ) ( 3, 2 )
[toc] | [next] | [standalone]
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-17 21:59 -0800 |
| Subject | Command Line jockies use plenty of aliases, no ? ! |
| Message-ID | <Jeff-Relf.Me@Dec.17--9.59P.Seattle.2016> |
| In reply to | #609400 |
You ( DFS ) replied ( to me ):
> > wchar _T[999], *P = _T ;
> > Loop(3) { int Y = J ;
> > Loop(4) P += Str( P, L"( %d, %d )%s", J, Y, J == LLL - 1 ? L"\n" : L" " ); }
> >
> > printf( _T );
> >
> > Given:
> >
> > #define Loop( N ) int LLL = ( N ), J = -1 ; while ( ++J < LLL )
> > #define Str swprintf // Not: StrF fwprintf
> > typedef wchar_t wchar ;
> >
> > Output:
> >
> > ( 0, 0 ) ( 1, 0 ) ( 2, 0 ) ( 3, 0 )
> > ( 0, 1 ) ( 1, 1 ) ( 2, 1 ) ( 3, 1 )
> > ( 0, 2 ) ( 1, 2 ) ( 2, 2 ) ( 3, 2 )
>
> Strange code, as always.
> You'll have to come back from the grave to maintain it.
> My loops are more traditional: [[...]]
Command Line jockies use plenty of aliases, no ? !
> alias ll='ls -l'
I'm the same, but mine are called macros (#define).
I use C code where/when most others would use a set of command lines.
[toc] | [prev] | [next] | [standalone]
| From | moroney@world.std.spaamtrap.com (Michael Moroney) |
|---|---|
| Date | 2016-12-19 17:20 +0000 |
| Message-ID | <o394s3$e6h$3@pcls7.std.com> |
| In reply to | #609400 |
Jeff-Relf.Me <@.> writes: >Incubus wrote: >> for (int i = 0; i < 100; ++i) >> [...] >> What is the advantage of using '++i' instead of 'i++' ? >I see no need to optimize integer increments. A good compiler will optimize better than you can, anyway. >My loops look like this: ... >Given: > #define Loop( N ) int LLL = ( N ), J = -1 ; while ( ++J < LLL ) A tiny example of the type of bizarre coding styles I've had to deal with that makes code difficult to maintain. This is quite minor and if I had to maintain code where this was the only strange coding example in it, I'd actually be relieved/happy. Add in a bunch of other oddball stuff and it becomes hard to follow. But for grins, I'll ask you, why not a "for (J=0; J < LLL; J++)" based construct which was designed for such loops? And what was the advantage of "J = -1; while ( ++J ..." where the intent was to go through the loop with J == 0 the first time. I see no reason other than to confuse the next guy. Maybe job security for you? A good compiler will optimize the assign to -1 away to a clear, on hardware where a clear/set to 0 is a bit faster than setting to a nonzero constant. That's irrelevant unless the loop itself was in a larger loop and the code was being squeezed for every microsecond.
[toc] | [prev] | [next] | [standalone]
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-19 10:56 -0800 |
| Subject | I don't worry about "optimizations", don't need to. |
| Message-ID | <Jeff-Relf.Me@Dec.19--10.56A.Seattle.2016> |
| In reply to | #609561 |
You ( Michael Moroney ) asked me: > why not a "for (J=0; J < LLL; J++)" > based construct which was designed for such loops? I simply don't like it, I much prefer while(), with the i++ happening _at_the_start_ of the loop. But that's just me; -- you do it your way, with your macros/aliases/definitions. Now, if you can't do that, fine, at least you're getting paid. I'm getting paid, and loving it. > A good compiler will optimize the assign to -1 > away to a clear, on hardware where a clear/set to 0 > is a bit faster than setting to a nonzero constant. I don't worry about "optimizations", don't need to; I don't have separate release/debug modes. P.S. I'm enjoying Leonard Cohen's "Boogie Street". He wrote it in 2001, after being in a Japanese Budhist monestarty for 6 years. He said the monestary was all about living with No privacy... out on Boogie Street. https://www.youtube.com/watch?v=rswKZ0PNY_0
[toc] | [prev] | [next] | [standalone]
| From | moroney@world.std.spaamtrap.com (Michael Moroney) |
|---|---|
| Date | 2016-12-20 12:30 +0000 |
| Subject | Re: I don't worry about "optimizations", don't need to. |
| Message-ID | <o3b89q$nfe$1@pcls7.std.com> |
| In reply to | #609566 |
Jeff-Relf.Me <@.> writes: >I don't worry about "optimizations", don't need to; >I don't have separate release/debug modes. I'm pointing out the maintainability issues, not efficiency. For example, your x.exe source is a mess, maintainability wise. Fortunately, nobody else will ever have to maintain it. What you do for a living, on the other hand... My earlier gig was a mess, as I mentioned. Partly due to age, partly due to "clever" code jockeys all doing their thing...
[toc] | [prev] | [next] | [standalone]
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-20 06:06 -0800 |
| Subject | Other people's code is hard to learn/modify. |
| Message-ID | <Jeff-Relf.Me@Dec.20--6.06A.Seattle.2016> |
| In reply to | #609696 |
For anything larger than "Hello World", other people's code is hard to learn/modify. My Loop() macro neither helps nor hurts that.
[toc] | [prev] | [next] | [standalone]
| From | Peter Köhlmann <peter-koehlmann@t-online.de> |
|---|---|
| Date | 2016-12-20 15:31 +0100 |
| Subject | Re: Other people's code is hard to learn/modify. |
| Message-ID | <o3bf8u$qt5$1@dont-email.me> |
| In reply to | #609706 |
wrote: > For anything larger than "Hello World", > other people's code is hard to learn/modify. Wrong. People who write code which is hard to maintain by others have no business programming at all > My Loop() macro neither helps nor hurts that. *One* such Macro might not. Your horrible code consists of *lots* of those stupid constructs. You are not a "programmer". You shit your lunatic macros all over the place
[toc] | [prev] | [next] | [standalone]
| From | chrisv <chrisv@nospam.invalid> |
|---|---|
| Date | 2016-12-20 09:04 -0600 |
| Subject | Re: Other people's code is hard to learn/modify. |
| Message-ID | <rbhi5clt51m5ns06us00kq05g7fmtjk2cb@4ax.com> |
| In reply to | #609709 |
Peter Köhlmann wrote: > Relf wrote: >> >> For anything larger than "Hello World", >> other people's code is hard to learn/modify. If the code was written by a brain-damaged sociopath, like you, sure. >Wrong. People who write code which is hard to maintain by others have no >business programming at all If someone is paying you to code, it's a *job requirement* to design the code to be maintainable by others. Failure to do so would be a breach of professional ethics. >> My Loop() macro neither helps nor hurts that. > >*One* such Macro might not. Your horrible code consists of *lots* of those >stupid constructs. You are not a "programmer". You shit your lunatic macros >all over the place Relf is one of those shit programmers who gets-off on making his code inscrutable to others. -- "(chrisv) claims (Relf's) code is shitty. Let's see him substantiate it with some facts and a code analysis." - trolling fsckwit "Ezekiel"
[toc] | [prev] | [next] | [standalone]
| From | Double-A <double-a3@hush.com> |
|---|---|
| Date | 2016-12-20 13:33 -0800 |
| Subject | Re: Other people's code is hard to learn/modify. |
| Message-ID | <9807538b-5f0c-4aca-a5e4-f0fc999c194a@googlegroups.com> |
| In reply to | #609710 |
On Tuesday, December 20, 2016 at 7:04:16 AM UTC-8, chrisv wrote: > Peter Köhlmann wrote: > > > Relf wrote: > >> > >> For anything larger than "Hello World", > >> other people's code is hard to learn/modify. > > If the code was written by a brain-damaged sociopath, like you, sure. > > >Wrong. People who write code which is hard to maintain by others have no > >business programming at all > > If someone is paying you to code, it's a *job requirement* to design > the code to be maintainable by others. Failure to do so would be a > breach of professional ethics. > > >> My Loop() macro neither helps nor hurts that. > > > >*One* such Macro might not. Your horrible code consists of *lots* of those > >stupid constructs. You are not a "programmer". You shit your lunatic macros > >all over the place > > Relf is one of those shit programmers who gets-off on making his code > inscrutable to others. > > -- > "(chrisv) claims (Relf's) code is shitty. Let's see him substantiate > it with some facts and a code analysis." - trolling fsckwit > "Ezekiel" I used to work on large mainframe assembler programs in a banking system. My team leader swore that the developers of that code must have ended up locked up! Double-A
[toc] | [prev] | [next] | [standalone]
| From | moroney@world.std.spaamtrap.com (Michael Moroney) |
|---|---|
| Date | 2016-12-20 15:06 +0000 |
| Subject | Re: Other people's code is hard to learn/modify. |
| Message-ID | <o3bhcr$d8m$1@pcls7.std.com> |
| In reply to | #609706 |
Jeff-Relf.Me <@.> writes: >For anything larger than "Hello World", >other people's code is hard to learn/modify. No, not really. I am working with a high quality code base now. Code got/gets reviewed by peers before becoming part of the code stream. Kooky macros won't make the cut, as the reviewers would respond with "WTF is that?" Most of the code is rather easy to follow.
[toc] | [prev] | [next] | [standalone]
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-20 09:59 -0800 |
| Subject | What The Fuck is wrong with your peers ? ! |
| Message-ID | <Jeff-Relf.Me@Dec.20--9.59A.Seattle.2016> |
| In reply to | #609711 |
You ( Michael Moroney ) told me: > Code got/gets reviewed by peers before becoming part of the code > stream. Kooky macros won't make the cut, as the reviewers would > respond with "WTF is that?" What The Fuck is wrong with your peers ? ! Command Line jockies use plenty of aliases, no ? ! > alias ll='ls -l' I do the same, only mine are called macros (#define). I use C code where/when others use command lines.
[toc] | [prev] | [next] | [standalone]
| From | moroney@world.std.spaamtrap.com (Michael Moroney) |
|---|---|
| Date | 2016-12-20 23:22 +0000 |
| Subject | Re: What The Fuck is wrong with your peers ? ! |
| Message-ID | <o3ceg5$9d8$1@pcls7.std.com> |
| In reply to | #609726 |
Jeff-Relf.Me <@.> writes: >You ( Michael Moroney ) told me: >> Code got/gets reviewed by peers before becoming part of the code >> stream. Kooky macros won't make the cut, as the reviewers would >> respond with "WTF is that?" >What The Fuck is wrong with your peers ? ! Nothing. This is a professional software development group. We frequently have to get into each others' code. More relevant, we have to get into code written by people long gone. We have to write knowing someday, someone else will come along to fix a bug or add a feature or whatever. We use macros all the time. Good clear macros are valuable. K00ky macros don't make the cut, nobody even tries. >Command Line jockies use plenty of aliases, no ? ! >> alias ll='ls -l' People do whatever they want in their login file. It's stuff others will have to deal with that matters. Simple, clear stuff like that definition are fine. Confusing stuff isn't. Maybe I should try to slip something like that loop macro in my next reviewed code and see what others have to say about it....
[toc] | [prev] | [next] | [standalone]
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-20 16:15 -0800 |
| Subject | I won, bigly. |
| Message-ID | <Jeff-Relf.Me@Dec.20--4.15P.Seattle.2016> |
| In reply to | #609789 |
My code was challenged by old school ( FORTRAN ) professors and young, high priced, programmers from MicroSoft's Visual Studio team. They all lost; I won, bigly. I'm not bragging, it's just true. If you can, try to use macros more.
[toc] | [prev] | [next] | [standalone]
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-21 02:55 -0800 |
| Subject | AutoFormatting hides the fingerprints. |
| Message-ID | <Jeff-Relf.Me@Dec.21--2.55A.Seattle.2016> |
| In reply to | #609799 |
You ( Mr. DFS ) replied ( to me ): > > My code was challenged by old school ( FORTRAN ) professors > > and young, high priced, programmers from MicroSoft's Visual Studio team. > > > > They all lost; I won, bigly. > > I'm not bragging, it's just true. > > If you can, try to use macros more. > > It's nice to win. What was the challenge? > Who competed? What were the rules? > What was the prize? The aforementioned people wanted shorter lines ( I like 236 columns ), auto formatted ( whitespace ), with lots of comments. I refused. I insisted on _manual_ whitespace. WhiteSpace is like a fingerprint, it's very revealing. AutoFormatting hides the fingerprints. They lost; I won, bigly. I retain control of the code; I'm still getting paid, they aren't. My code looks like this: http://Jeff-Relf.Me/Visual-Studio-2015.PNG http://Jeff-Relf.Me/Diff.PNG [ Red is the old code, Green is the new stuff ]
[toc] | [prev] | [next] | [standalone]
| From | Peter Köhlmann <peter-koehlmann@t-online.de> |
|---|---|
| Date | 2016-12-21 14:33 +0100 |
| Subject | Re: AutoFormatting hides the fingerprints. |
| Message-ID | <o3e08v$542$1@dont-email.me> |
| In reply to | #609830 |
wrote: > You ( Mr. DFS ) replied ( to me ): >> > My code was challenged by old school ( FORTRAN ) professors >> > and young, high priced, programmers from MicroSoft's Visual Studio >> > team. >> > >> > They all lost; I won, bigly. >> > I'm not bragging, it's just true. >> > If you can, try to use macros more. >> >> It's nice to win. What was the challenge? >> Who competed? What were the rules? >> What was the prize? > > The aforementioned people wanted shorter lines > ( I like 236 columns ), auto formatted ( whitespace ), > with lots of comments. > > I refused. I insisted on _manual_ whitespace. > WhiteSpace is like a fingerprint, it's very revealing. > AutoFormatting hides the fingerprints. > > They lost; I won, bigly. > I retain control of the code; > I'm still getting paid, they aren't. > > My code looks like this: > > http://Jeff-Relf.Me/Visual-Studio-2015.PNG > http://Jeff-Relf.Me/Diff.PNG > [ Red is the old code, Green is the new stuff ] And the sad reality is that you are even proud of that extremely shitty "code". The good thing is that usually "programmers" like you code only for themselves. Nobody in his right mind would employ such a dimbulb
[toc] | [prev] | [next] | [standalone]
| From | moroney@world.std.spaamtrap.com (Michael Moroney) |
|---|---|
| Date | 2016-12-22 03:21 +0000 |
| Subject | Re: AutoFormatting hides the fingerprints. |
| Message-ID | <o3fgrl$6eb$1@pcls7.std.com> |
| In reply to | #609830 |
Jeff-Relf.Me <@.> writes: >You ( Mr. DFS ) replied ( to me ): >> > My code was challenged by old school ( FORTRAN ) professors >> > and young, high priced, programmers from MicroSoft's Visual Studio team. >> > >> > They all lost; I won, bigly. >> > I'm not bragging, it's just true. >> > If you can, try to use macros more. I use macros where appropriate. I don't use stupid macros (nor could I, except in my own code). >> It's nice to win. What was the challenge? >> Who competed? What were the rules? >> What was the prize? >The aforementioned people wanted shorter lines >( I like 236 columns ), auto formatted ( whitespace ), >with lots of comments. Ewww... all that makes it so hard to follow. One statement per line, with a sane line length. Proper whitespace (including indentation where appropriate breaks things up so it's readable, a solid mass of characters. Comments tell the next guy what you are doing and why/how. Old macro code I see typically has one comment per instruction/macro call, on the right side.
[toc] | [prev] | [next] | [standalone]
| From | Jeff-Relf.Me <@.> |
|---|---|
| Date | 2016-12-22 02:36 -0800 |
| Subject | My code is dense, and hard to read, like the Washington Post. |
| Message-ID | <Jeff-Relf.Me@Dec.22--2.36A.Seattle.2016> |
| In reply to | #609973 |
You ( Michael Moroney ) replied ( to me ): > > The aforementioned people wanted shorter lines > > ( I like 236 columns ), auto formatted ( whitespace ), > > with lots of comments. > > Ewww... all that makes it so hard to follow. > One statement per line, with a sane line length. > > Proper whitespace ( including indentation where appropriate ) > breaks things up so it's readable, not a solid mass of characters. > > Comments tell the next guy what you are doing and why/how. > Old macro code I see typically has > one comment per instruction/macro call, on the right side. I'll tell you ( yet again ) what I told them: My code is dense, and hard to read, like the Washington Post; sorry, but it's _not_ like an advert, or comic strip, with lots of graphics, big fonts, color and WhiteSpace. I won the day; I retained control; I get paid -- They lost.
[toc] | [prev] | [next] | [standalone]
| From | Silver Slimer <.m@nsn.s> |
|---|---|
| Date | 2016-12-21 09:09 -0500 |
| Subject | Re: I won, bigly. |
| Message-ID | <o3e2ce$iqu$4@dont-email.me> |
| In reply to | #609799 |
On 2016-12-20 7:15 PM, Jeff-Relf.Me wrote: > My code was challenged by old school ( FORTRAN ) professors > and young, high priced, programmers from MicroSoft's Visual Studio team. > > They all lost; I won, bigly. The expression is "big league." Your future president demands that you use it appropriately. -- Silver Slimer Fingerprint: e58428b2633833a3b0c9bb7e40819166642245b7 Gab.ai: @silverslimer Proud bigot.
[toc] | [prev] | [next] | [standalone]
| From | benj <benj@nobody.net> |
|---|---|
| Date | 2016-12-21 17:37 -0500 |
| Subject | Re: I won, bigly. |
| Message-ID | <585b0432$0$28965$c3e8da3$88b277c5@news.astraweb.com> |
| In reply to | #609799 |
On 12/20/2016 7:15 PM, Jeff-Relf.Me wrote: > My code was challenged by old school ( FORTRAN ) professors > and young, high priced, programmers from MicroSoft's Visual Studio team. > > They all lost; I won, bigly. > I'm not bragging, it's just true. > > If you can, try to use macros more. > My guess is that Rolf is one of those morons who attempted to write MythTV. When ever I have to deal that that puerile, incompetent, illogical, worthless bunch of programming mush I just can't help but think of ROLF and the kind of code he must write. Why are digital nerds such morons. Rolf you are STILL a moron.
[toc] | [prev] | [next] | [standalone]
| From | chrisv <chrisv@nospam.invalid> |
|---|---|
| Date | 2016-12-21 07:14 -0600 |
| Subject | Re: What The Fuck is wrong with your peers ? ! |
| Message-ID | <fjvk5c9t7a0dcf7u4ba5679nj8qq9vt27d@4ax.com> |
| In reply to | #609789 |
Michael Moroney wrote: > Jeff-Relf.Me <@.> writes: >> >> What The Fuck is wrong with your peers ? ! > >Nothing. Typical sociopathic response. Everyone else has something "the fuck" wrong them, not Relf. >>Command Line jockies use plenty of aliases, no ? ! > >>> alias ll='ls -l' > >People do whatever they want in their login file. It's stuff others >will have to deal with that matters. Relf actually needed that explained, when the issue, here, is writing software that others can learn/modify. He's a real "smart one", that Relf. -- "What's wrong with it?" - "DFS", defending Relf's use of a #pragma to disable 17 different types of compiler warnings
[toc] | [prev] | [standalone]
Back to top | Article view | sci.physics
csiph-web