Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #425480 > unrolled thread
| Started by | fr314159@gmail.com |
|---|---|
| First post | 2017-08-02 11:14 -0700 |
| Last post | 2017-08-06 22:37 -0700 |
| Articles | 20 on this page of 83 — 14 participants |
Back to article view | Back to comp.os.linux.advocacy
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.
Re: FizzBuzz: an Interview Question ( for programmers ). fr314159@gmail.com - 2017-08-02 11:14 -0700
Re: FizzBuzz: an Interview Question ( for programmers ). owl <owl@rooftop.invalid> - 2017-08-02 20:19 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). owl <owl@rooftop.invalid> - 2017-08-02 21:06 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-02 21:37 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). owl <owl@rooftop.invalid> - 2017-08-03 01:46 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-03 04:32 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). owl <owl@rooftop.invalid> - 2017-08-03 05:01 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-03 05:06 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). owl <owl@rooftop.invalid> - 2017-08-03 05:15 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-04 05:02 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). owl <owl@rooftop.invalid> - 2017-08-04 13:52 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-04 14:00 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Marek Novotny <marek.novotny@marspolar.com> - 2017-08-04 12:56 -0500
Re: FizzBuzz: an Interview Question ( for programmers ). Steve Carroll <fretwizzer@gmail.com> - 2017-08-04 11:03 -0700
Re: FizzBuzz: an Interview Question ( for programmers ). Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-04 18:05 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Steve Carroll <fretwizzer@gmail.com> - 2017-08-04 11:08 -0700
Re: FizzBuzz: an Interview Question ( for programmers ). Snit <usenet@gallopinginsanity.com> - 2017-08-04 11:23 -0700
Re: Marek Novotny is a command line jockey. Marek Novotny <marek.novotny@marspolar.com> - 2017-08-04 14:24 -0500
Re: Marek Novotny is a command line jockey. Snit <usenet@gallopinginsanity.com> - 2017-08-04 12:45 -0700
Re: This is better, no ? Marek Novotny <marek.novotny@marspolar.com> - 2017-08-04 15:24 -0500
Re: Marek Novotny is a command line jockey. Snit <usenet@gallopinginsanity.com> - 2017-08-04 12:38 -0700
Re: My code is twice as fast as Owl's. owl <owl@rooftop.invalid> - 2017-08-03 03:12 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). "F. Russell" <fr@random.info> - 2017-08-02 23:04 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). "F. Russell" <fr@random.info> - 2017-08-02 23:25 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). owl <owl@rooftop.invalid> - 2017-08-03 01:50 +0000
Re: Fabian's code is always slower. owl <owl@rooftop.invalid> - 2017-08-03 04:41 +0000
Re: Fabian's code is always slower. owl <owl@rooftop.invalid> - 2017-08-03 05:17 +0000
Re: What's easier to read/maintain ? owl <owl@rooftop.invalid> - 2017-08-03 05:57 +0000
Re: Fabian's code is always slower. fr314159@gmail.com - 2017-08-03 08:21 -0700
Re: Fabian's code is always slower. Steve Carroll <fretwizzer@gmail.com> - 2017-08-03 09:24 -0700
Re: Fabian's code is always slower. owl <owl@rooftop.invalid> - 2017-08-03 18:41 +0000
Re: FizzBuzz: an Interview Question ( for programmers ). Snit <usenet@gallopinginsanity.com> - 2017-08-03 13:49 -0700
Re: 4 lines, 4 states. Snit <usenet@gallopinginsanity.com> - 2017-08-03 22:11 -0700
Re: 4 lines, 4 states. Snit <usenet@gallopinginsanity.com> - 2017-08-03 22:47 -0700
Re: 4 lines, 4 states. Snit <usenet@gallopinginsanity.com> - 2017-08-03 22:52 -0700
Re: Mozilla ThunderBird. Steve Carroll <fretwizzer@gmail.com> - 2017-08-04 08:54 -0700
Re: Mozilla ThunderBird. Snit <usenet@gallopinginsanity.com> - 2017-08-04 10:43 -0700
Re: FizzBuzz is a trick question. Snit <usenet@gallopinginsanity.com> - 2017-08-04 11:47 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Snit <usenet@gallopinginsanity.com> - 2017-08-04 12:51 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. fr314159@gmail.com - 2017-08-04 12:57 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Steve Carroll <fretwizzer@gmail.com> - 2017-08-04 13:02 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-04 20:02 +0000
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Steve Carroll <fretwizzer@gmail.com> - 2017-08-04 13:11 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-04 20:17 +0000
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Steve Carroll <fretwizzer@gmail.com> - 2017-08-04 13:42 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. "F. Russell" <fr@random.info> - 2017-08-04 23:06 +0000
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Melzzzzz <Melzzzzz@zzzzz.com> - 2017-08-04 23:32 +0000
Re: I'm the best c coder here. Snit <usenet@gallopinginsanity.com> - 2017-08-04 14:03 -0700
Re: I'm the best c coder here. "F. Russell" <fr@random.info> - 2017-08-04 23:15 +0000
Re: I'm the best c coder here. benj <benj@nobody.net> - 2017-08-04 19:35 -0400
Re: I'm the best c coder here. "F. Russell" <fr@random.info> - 2017-08-05 16:08 +0000
Re: Fabian seldom writes code, much less test it. owl <owl@rooftop.invalid> - 2017-08-05 03:09 +0000
Re: 2 lines, 2^2 states, easily modified to 3^2 states. owl <owl@rooftop.invalid> - 2017-08-05 05:42 +0000
Re: Who'd use "x++", in a loop, to find FizzBuzzGoozKaaz ? owl <owl@rooftop.invalid> - 2017-08-05 07:30 +0000
Re: 2 lines, 2^2 states, easily modified to 3^2 states. Marek Novotny <marek.novotny@marspolar.com> - 2017-08-05 10:19 -0500
Re: 2 lines, 2^2 states, easily modified to 3^2 states. Steve Carroll <fretwizzer@gmail.com> - 2017-08-05 10:13 -0700
Re: 2 lines, 2^2 states, easily modified to 3^2 states. owl <owl@rooftop.invalid> - 2017-08-05 17:33 +0000
Re: Fabian seldom writes code, much less test it. Marek Novotny <marek.novotny@marspolar.com> - 2017-08-04 22:24 -0500
Re: Fabian seldom writes code, much less test it. "F. Russell" <fr@random.info> - 2017-08-05 13:37 +0000
Re: Fabian seldom writes code, much less test it. "F. Russell" <fr@random.info> - 2017-08-05 14:25 +0000
Re: I'm the best c coder here. owl <owl@rooftop.invalid> - 2017-08-05 03:22 +0000
Re: I'm the best c coder here. Marek Novotny <marek.novotny@marspolar.com> - 2017-08-04 22:35 -0500
Re: I'm the best c coder here. owl <owl@rooftop.invalid> - 2017-08-05 04:08 +0000
Re: I reduced Owl's 43 lines to 5. owl <owl@rooftop.invalid> - 2017-08-05 07:25 +0000
Re: Owl's FizBuzGozKaz branches 5 times more often. owl <owl@rooftop.invalid> - 2017-08-05 15:40 +0000
Re: I'm _still_ the best c coder here. owl <owl@rooftop.invalid> - 2017-08-05 06:12 +0000
Re: I'm _still_ the best c coder here. moroney@world.std.spaamtrap.com (Michael Moroney) - 2017-08-05 22:16 +0000
Re: I increment things at the _start_ of a loop. Steve Carroll <fretwizzer@gmail.com> - 2017-08-06 11:04 -0700
Re: I increment things at the _start_ of a loop. moroney@world.std.spaamtrap.com (Michael Moroney) - 2017-08-07 03:24 +0000
Re: I increment things at the _start_ of a loop. Snit <usenet@gallopinginsanity.com> - 2017-08-06 20:35 -0700
Re: "while ( x++ < 100 )" isn't "obscure". moroney@world.std.spaamtrap.com (Michael Moroney) - 2017-08-07 04:59 +0000
Re: I'm the best c coder here. chrisv <chrisv@nospam.invalid> - 2017-08-07 06:59 -0500
Re: I'm the best c coder here. Steve Carroll <fretwizzer@gmail.com> - 2017-08-08 10:23 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. DFS <nospam@dfs.com> - 2017-08-04 17:56 -0400
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. "F. Russell" <fr@random.info> - 2017-08-04 23:04 +0000
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Snit <usenet@gallopinginsanity.com> - 2017-08-04 16:09 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. fellatiohornblower@renlott.org - 2017-08-04 20:13 -0400
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. "F. Russell" <fr@random.info> - 2017-08-05 13:50 +0000
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. "F. Russell" <fr@random.info> - 2017-08-05 15:23 +0000
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Snit <usenet@gallopinginsanity.com> - 2017-08-05 10:06 -0700
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Doomsdrzej <.m@nsn.s> - 2017-08-05 11:52 -0400
Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. Snit <usenet@gallopinginsanity.com> - 2017-08-05 09:55 -0700
Re: Fabian's code is always slower. Takuya Saitoh <taka0038@gmail.com> - 2017-08-06 22:37 -0700
Page 3 of 5 — ← Prev page 1 2 [3] 4 5 Next page →
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2017-08-04 13:02 -0700 |
| Subject | Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. |
| Message-ID | <eff1f250-ad7b-406d-ae53-79f8d54f3773@googlegroups.com> |
| In reply to | #425770 |
On Friday, August 4, 2017 at 1:57:56 PM UTC-6, fr31...@gmail.com wrote: > On Friday, August 4, 2017 at 3:31:42 PM UTC-4, Jeff-Relf.Me wrote: > > > > > ... are c programmers. > > > > How many times do I have to say it before you brain-dead clowns > get the message? > > Programming is NOT coding. Agreed. > Programming is the analysis and > solution of problems through the application of computer science > principles. It does not and cannot depend on any language. No question. > Coding is a SECONDARY activity that takes place AFTER the problem > has been analyzed and solved. > > But I am wasting my breath. You jerks cannot learn. Nah... I'm still scratching my head over Relf's comments.
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <Melzzzzz@zzzzz.com> |
|---|---|
| Date | 2017-08-04 20:02 +0000 |
| Subject | Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. |
| Message-ID | <om2jt7$ogs$1@news.albasani.net> |
| In reply to | #425770 |
On 2017-08-04, fr314159@gmail.com <fr314159@gmail.com> wrote: > On Friday, August 4, 2017 at 3:31:42 PM UTC-4, Jeff-Relf.Me wrote: > >> >> ... are c programmers. >> > > How many times do I have to say it before you brain-dead clowns > get the message? > > Programming is NOT coding. Programming is the analysis and > solution of problems through the application of computer science > principles. Yeah, sure. Do you do that? >It does not and cannot depend on any language. Bullcrap. Be it functional solution or OOP is orthogonal different program. -- press any key to continue or any other to quit...
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2017-08-04 13:11 -0700 |
| Subject | Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. |
| Message-ID | <cfcf2dfd-074a-4410-8a87-4e31e5b7554b@googlegroups.com> |
| In reply to | #425772 |
On Friday, August 4, 2017 at 2:02:50 PM UTC-6, Melzzzzz wrote: > On 2017-08-04, fr314159@gmail.com <fr314159@gmail.com> wrote: > > On Friday, August 4, 2017 at 3:31:42 PM UTC-4, Jeff-Relf.Me wrote: > > > >> > >> ... are c programmers. > >> > > > > How many times do I have to say it before you brain-dead clowns > > get the message? > > > > Programming is NOT coding. Programming is the analysis and > > solution of problems through the application of computer science > > principles. > > Yeah, sure. Do you do that? I'm betting you do it, too. > >It does not and cannot depend on any language. > > Bullcrap. Be it functional solution or OOP is orthogonal different > program. True, but even that doesn't negate his overall point.
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <Melzzzzz@zzzzz.com> |
|---|---|
| Date | 2017-08-04 20:17 +0000 |
| Subject | Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. |
| Message-ID | <om2knv$ogs$2@news.albasani.net> |
| In reply to | #425773 |
On 2017-08-04, Steve Carroll <fretwizzer@gmail.com> wrote: > On Friday, August 4, 2017 at 2:02:50 PM UTC-6, Melzzzzz wrote: >> On 2017-08-04, fr314159@gmail.com <fr314159@gmail.com> wrote: >> > On Friday, August 4, 2017 at 3:31:42 PM UTC-4, Jeff-Relf.Me wrote: >> > >> >> >> >> ... are c programmers. >> >> >> > >> > How many times do I have to say it before you brain-dead clowns >> > get the message? >> > >> > Programming is NOT coding. Programming is the analysis and >> > solution of problems through the application of computer science >> > principles. >> >> Yeah, sure. Do you do that? > > I'm betting you do it, too. > >> >It does not and cannot depend on any language. >> >> Bullcrap. Be it functional solution or OOP is orthogonal different >> program. > > True, but even that doesn't negate his overall point. Well both oop and functional programming are based on computer science principles, that's true. But that does not means that programming language does not greatly influence solution. -- press any key to continue or any other to quit...
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2017-08-04 13:42 -0700 |
| Subject | Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. |
| Message-ID | <43cb51cf-dc2d-4f91-92a3-9d6da23cb031@googlegroups.com> |
| In reply to | #425774 |
On Friday, August 4, 2017 at 2:17:05 PM UTC-6, Melzzzzz wrote: > On 2017-08-04, Steve Carroll <fretwizzer@gmail.com> wrote: > > On Friday, August 4, 2017 at 2:02:50 PM UTC-6, Melzzzzz wrote: > >> On 2017-08-04, fr314159@gmail.com <fr314159@gmail.com> wrote: > >> > On Friday, August 4, 2017 at 3:31:42 PM UTC-4, Jeff-Relf.Me wrote: > >> > > >> >> > >> >> ... are c programmers. > >> >> > >> > > >> > How many times do I have to say it before you brain-dead clowns > >> > get the message? > >> > > >> > Programming is NOT coding. Programming is the analysis and > >> > solution of problems through the application of computer science > >> > principles. > >> > >> Yeah, sure. Do you do that? > > > > I'm betting you do it, too. > > > >> >It does not and cannot depend on any language. > >> > >> Bullcrap. Be it functional solution or OOP is orthogonal different > >> program. > > > > True, but even that doesn't negate his overall point. > Well both oop and functional programming are based on computer science > principles, that's true. But that does not means that programming > language does not greatly influence solution. Hmmm... that's true, for example: Would you choose C to do front end web programming? No, you'd probably use that red headed step child, JavaScript. Feeb's main point is valid on a certain level, though.
[toc] | [prev] | [next] | [standalone]
| From | "F. Russell" <fr@random.info> |
|---|---|
| Date | 2017-08-04 23:06 +0000 |
| Subject | Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. |
| Message-ID | <om2umj1ceo@news4.newsguy.com> |
| In reply to | #425774 |
On Fri, 04 Aug 2017 20:17:03 +0000, Melzzzzz wrote: > But that does not means that programming > language does not greatly influence solution. > Only in your bullshit area of application. For REAL problems that need REAL analysis by REAL programmers the language is completely and unequivocally irrelevant. But that's not you and never will be. You are just a code monkey.
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <Melzzzzz@zzzzz.com> |
|---|---|
| Date | 2017-08-04 23:32 +0000 |
| Subject | Re: Michael Glasser, Steve Carroll, Marek Novotny, Branimir Maksimovic, etc. |
| Message-ID | <om306p$qmh$1@news.albasani.net> |
| In reply to | #425814 |
On 2017-08-04, F. Russell <fr@random.info> wrote: > On Fri, 04 Aug 2017 20:17:03 +0000, Melzzzzz wrote: > >> But that does not means that programming >> language does not greatly influence solution. >> > > Only in your bullshit area of application. > > For REAL problems that need REAL analysis by REAL programmers > the language is completely and unequivocally irrelevant. Obviously you know too few languages.. -- press any key to continue or any other to quit...
[toc] | [prev] | [next] | [standalone]
| From | Snit <usenet@gallopinginsanity.com> |
|---|---|
| Date | 2017-08-04 14:03 -0700 |
| Subject | Re: I'm the best c coder here. |
| Message-ID | <D5AA2F2C.AEB69%usenet@gallopinginsanity.com> |
| In reply to | #425772 |
On 8/4/17, 1:48 PM, in article Jeff-Relf.Me@Aug.4--1.48pm.Seattle.2017, "<Jeff-Relf.Me @.>" <> wrote: > > I'm the best c coder here, I think. > > Fabian optimized something he shouldn't have; > the I/O is thee only limiting factor, not "x%3". > > Also, he failed to test the code he wrote, > and _failed_ to compare it with mine. > Usually, he fails to write _any_ code, much less test it. > > Owl failed to write concise, readable code; > instead, he foolishly optimized the wrong thing. Owl does WEIRD things like, to avoid picking colors manually for his terminal program, he creates something like 52K launchers which are all the same EXCEPT for their color... then picks them based on MANUALLY PiCKING A COLOR! If it works for him, great... but just weird. > Marek Novotny's c was better than Owl's or Fabian's, > but it wasn't as concise|readable as mine, I think. > Initially, he chose bash, not c. > -- Personal attacks from those who troll show their own insecurity. They cannot use reason to show the message to be wrong so they try to feel somehow superior by attacking the messenger. They cling to their attacks and ignore the message time and time again. <https://youtu.be/H4NW-Cqh308>
[toc] | [prev] | [next] | [standalone]
| From | "F. Russell" <fr@random.info> |
|---|---|
| Date | 2017-08-04 23:15 +0000 |
| Subject | Re: I'm the best c coder here. |
| Message-ID | <om2v602ceo@news4.newsguy.com> |
| In reply to | #425772 |
On Fri, 04 Aug 2017 13:48:29 -0700, Jeff-Relf.Me wrote: > <PRE Style='Font-Family: OCR A, monospace !important;'> > I'm the best c coder here, I think. > Yeah. Just like your expertise in physics, you think. Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha! If any of your employers/clients could see the moronic gibberish which you post on sci.physics, they wouldn't want to come within TWENTY MILES of your "code." > > the I/O is thee only limiting factor, not "x%3" > The I/O can easily be separated from the decision process by using some sort of index (either an array or bit fields). Then, _my_ DIVISION-LESS algorithm will surpass all others. But the problem is exceedingly trivial. It is a sign of stupidity to dwell on it.
[toc] | [prev] | [next] | [standalone]
| From | benj <benj@nobody.net> |
|---|---|
| Date | 2017-08-04 19:35 -0400 |
| Subject | Re: I'm the best c coder here. |
| Message-ID | <598504ad$0$60192$c3e8da3$66d3cc2f@news.astraweb.com> |
| In reply to | #425816 |
On 8/4/2017 7:15 PM, F. Russell wrote: > On Fri, 04 Aug 2017 13:48:29 -0700, Jeff-Relf.Me wrote: > >> <PRE Style='Font-Family: OCR A, monospace !important;'> >> I'm the best c coder here, I think. >> > > Yeah. Just like your expertise in physics, you think. > > Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha! > > If any of your employers/clients could see the moronic > gibberish which you post on sci.physics, they wouldn't > want to come within TWENTY MILES of your "code." > >> >> the I/O is thee only limiting factor, not "x%3" >> > > The I/O can easily be separated from the decision process > by using some sort of index (either an array or bit fields). > > Then, _my_ DIVISION-LESS algorithm will surpass all others. > > But the problem is exceedingly trivial. It is a sign of stupidity > to dwell on it. > Which is obvious so why dwell on it?
[toc] | [prev] | [next] | [standalone]
| From | "F. Russell" <fr@random.info> |
|---|---|
| Date | 2017-08-05 16:08 +0000 |
| Subject | Re: I'm the best c coder here. |
| Message-ID | <om4qhr02i7r@news3.newsguy.com> |
| In reply to | #425818 |
On Fri, 04 Aug 2017 19:35:08 -0400, benj wrote: >> >> But the problem is exceedingly trivial. It is a sign of stupidity >> to dwell on it. >> > Which is obvious so why dwell on it? > Which is why you bothered to jump in here. Ha, ha, ha, ha, ha!
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-08-05 03:09 +0000 |
| Subject | Re: Fabian seldom writes code, much less test it. |
| Message-ID | <szbagi03.ab@rooftop.invalid> |
| In reply to | #425816 |
In comp.os.linux.advocacy Jeff-Relf.Me wrote:
> You ( Fabian ) replied ( to me ):
> > > [ FizBuz's ] I/O is thee only limiting factor, not "x%3".
> >
> > The I/O can easily be separated from the decision process
> > by using some sort of index (either an array or bit fields).
> > Then, _my_ DIVISION-LESS algorithm will surpass all others.
> > But the problem is exceedingly trivial.
> > It is a sign of stupidity to dwell on it.
>
> Forget this "DIVISION-LESS algorithm" bullshit, the answer is just:
>
> int x = 0, F, B ;
> while ( x++ < 100 ) printf("\n"), F = !(x%3), B = !(x%5), printf(
> F && B ? "FizBuz" : F ? "Fiz" : B ? "Buz" : "%d", x );
>
> 3 lines, 4 states, done.
>
Because nothing says "readable" and "maintainable" like a bunch of nested
ternary operations.... Try it with four values, where your state count
goes to 16. See how "readable" that is with your approach.
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-08-05 05:42 +0000 |
| Subject | Re: 2 lines, 2^2 states, easily modified to 3^2 states. |
| Message-ID | <azb32.b904ta@rooftop.invalid> |
| In reply to | #425845 |
In comp.os.linux.advocacy Jeff-Relf.Me wrote:
> You ( Owl ) replied ( to me ):
> > > int x = 0, F, B ;
> > > while ( x++ < 100 ) printf("\n"), F = !(x%3), B = !(x%5), printf(
> > > F && B ? "FizBuz" : F ? "Fiz" : B ? "Buz" : "%d", x );
> >
> > Because nothing says "readable" and "maintainable" like a bunch of nested
> > ternary operations.... Try it with four values, where your state count
> > goes to 16. See how "readable" that is with your approach.
>
> How about ? :
>
> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
>
> 2 lines, 2^2 states, easily modified to 3^2 states.
Better, but you're still hard-coding values. And 2^3 will need an 8-member
array and 2^4 will need 16. See my other post showing 2^4.
> Full Answer: http://Jeff-Relf.Me/FizBuz.HTM
>
> The I/O is the limiting factor, not "x%3", so:
>
> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
>
> 2 lines, 2^2 states, easily modified to 2^3 states:
>
> 4*!(x%3) + 2*!(x%5) + !(x%7)
>
You're still limited by just having printf() pointing into an array
of strings. I use an array of function pointers so that you can do
something other than printf() -- or in addition to printf() --
for different combinations.
For example, here a match on all four values calls zenity to
display a dialog alerting on a match:
http://imgur.com/a/rHRmP
/*void onetwofoureight(int x){printf("FizzBuzzGoozKaaz\n");}
*/
void onetwofoureight(int x)
{
char cmd[100]={0};
printf("FizzBuzzGoozKaaz\n");
sprintf(cmd,"zenity --info --text=\"Found a FizzBuzzGoozKaaz at %d\"",x);
system(cmd);
}
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-08-05 07:30 +0000 |
| Subject | Re: Who'd use "x++", in a loop, to find FizzBuzzGoozKaaz ? |
| Message-ID | <az9093r.4h9@rooftop.invalid> |
| In reply to | #425869 |
In comp.os.linux.advocacy Jeff-Relf.Me wrote: > You ( Owl ) replied ( to me ): > > "Found a FizzBuzzGoozKaaz at %d", x ); system(cmd); > > Who'd use "x++", in a loop, to find FizzBuzzGoozKaaz ? > With a PopUp window ? ! > Who wouldn't? The three-bies can go in a database; the doubles can get emailed to Hillary; and the singles can be a ping count against eharmony website.
[toc] | [prev] | [next] | [standalone]
| From | Marek Novotny <marek.novotny@marspolar.com> |
|---|---|
| Date | 2017-08-05 10:19 -0500 |
| Subject | Re: 2 lines, 2^2 states, easily modified to 3^2 states. |
| Message-ID | <es2dnUvp0MqXfxjEnZ2dnUU7-TnNnZ2d@giganews.com> |
| In reply to | #425869 |
On 2017-08-05, owl <owl@rooftop.invalid> wrote:
> In comp.os.linux.advocacy Jeff-Relf.Me wrote:
>> You ( Owl ) replied ( to me ):
>> > > int x = 0, F, B ;
>> > > while ( x++ < 100 ) printf("\n"), F = !(x%3), B = !(x%5), printf(
>> > > F && B ? "FizBuz" : F ? "Fiz" : B ? "Buz" : "%d", x );
>> >
>> > Because nothing says "readable" and "maintainable" like a bunch of nested
>> > ternary operations.... Try it with four values, where your state count
>> > goes to 16. See how "readable" that is with your approach.
>>
>> How about ? :
>>
>> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
>> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
>>
>> 2 lines, 2^2 states, easily modified to 3^2 states.
>
> Better, but you're still hard-coding values. And 2^3 will need an 8-member
> array and 2^4 will need 16. See my other post showing 2^4.
>
>
>> Full Answer: http://Jeff-Relf.Me/FizBuz.HTM
>>
>> The I/O is the limiting factor, not "x%3", so:
>>
>> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
>> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
>>
>> 2 lines, 2^2 states, easily modified to 2^3 states:
>>
>> 4*!(x%3) + 2*!(x%5) + !(x%7)
>>
>
> You're still limited by just having printf() pointing into an array
> of strings. I use an array of function pointers so that you can do
> something other than printf() -- or in addition to printf() --
> for different combinations.
>
> For example, here a match on all four values calls zenity to
> display a dialog alerting on a match:
>
> http://imgur.com/a/rHRmP
>
> /*void onetwofoureight(int x){printf("FizzBuzzGoozKaaz\n");}
> */
> void onetwofoureight(int x)
> {
> char cmd[100]={0};
> printf("FizzBuzzGoozKaaz\n");
> sprintf(cmd,"zenity --info --text=\"Found a FizzBuzzGoozKaaz at %d\"",x);
> system(cmd);
> }
It reminds me of a time when I was writing a script to determine the
distro type the user was using. It grew and grew and I kept looking for
better ways to determine it in many different distros. It's a lot easier
if I know for a fact that every user is RHEL and Ubuntu. If not ...
FizzBuzz reminds me of this issue. Right now, you know there are four
outcomes. Just the number, Fizz, Buzz and FizzBuzz. So no matter what it
simple to write almost anything that will solve that. But then the
question comes up, what if there are 8 things or 16 thing or 256
things...
I scripts I started to use arrays, even if for one item. My thinking is
that if I need to expand it to two or more, the array is already there.
So I tend to like that kind of thinking. I'll play with FizzBuzz some
more.
I was reading another question that comes up about 25 horses and on
YouTube I think the guy saying the answer has it all wrong. There are a
bunch of tech questions that can come up. Obviously I know programmers
but don't wish to ask for their help and I don't wish to look for the
answer online. I'd rather fail and learn from that failure. I think
writing programs and utils is a process. You start simple and then once
you have an answer, even a bad answer, you can then ask yourself how to
make it better.
Who hasn't looked at code they wrote 6 months ago or a year ago and
didn't think it was crap? There was this one guy doing a lecture and he
was going on and on about how awful this code was. And then he realized
he wrote it years ago. It was his own code. He just didn't recognize it anymore
because he got better and better and started adopting better thinking.
It all has to start from somewhere.
The first array I wrote in a shell script looked something like this:
array[1]="hello"
array[4]="good bye"
And believe it or not, there are some pluses to doing it this way. I
absolutely control the specific placement of the element in the array.
But obviously, most will simply do this:
array=("hello" "goodbye")
As silly as that was I still appreciate it. If I were you, I wouldn't
worry too much what others opine about your code. Consider their point,
decide if you agree or disagree and do whatever you think is best.
--
Marek Novotny
https://github.com/marek-novotny
[toc] | [prev] | [next] | [standalone]
| From | Steve Carroll <fretwizzer@gmail.com> |
|---|---|
| Date | 2017-08-05 10:13 -0700 |
| Subject | Re: 2 lines, 2^2 states, easily modified to 3^2 states. |
| Message-ID | <d3459cd7-8892-4b81-9236-a659725f7204@googlegroups.com> |
| In reply to | #425926 |
On Saturday, August 5, 2017 at 9:19:45 AM UTC-6, Marek Novotny wrote:
> On 2017-08-05, owl <owl@rooftop.invalid> wrote:
> > In comp.os.linux.advocacy Jeff-Relf.Me wrote:
> >> You ( Owl ) replied ( to me ):
> >> > > int x = 0, F, B ;
> >> > > while ( x++ < 100 ) printf("\n"), F = !(x%3), B = !(x%5), printf(
> >> > > F && B ? "FizBuz" : F ? "Fiz" : B ? "Buz" : "%d", x );
> >> >
> >> > Because nothing says "readable" and "maintainable" like a bunch of nested
> >> > ternary operations.... Try it with four values, where your state count
> >> > goes to 16. See how "readable" that is with your approach.
> >>
> >> How about ? :
> >>
> >> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
> >> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
> >>
> >> 2 lines, 2^2 states, easily modified to 3^2 states.
> >
> > Better, but you're still hard-coding values. And 2^3 will need an 8-member
> > array and 2^4 will need 16. See my other post showing 2^4.
> >
> >
> >> Full Answer: http://Jeff-Relf.Me/FizBuz.HTM
> >>
> >> The I/O is the limiting factor, not "x%3", so:
> >>
> >> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
> >> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
> >>
> >> 2 lines, 2^2 states, easily modified to 2^3 states:
> >>
> >> 4*!(x%3) + 2*!(x%5) + !(x%7)
> >>
> >
> > You're still limited by just having printf() pointing into an array
> > of strings. I use an array of function pointers so that you can do
> > something other than printf() -- or in addition to printf() --
> > for different combinations.
> >
> > For example, here a match on all four values calls zenity to
> > display a dialog alerting on a match:
> >
> > http://imgur.com/a/rHRmP
> >
> > /*void onetwofoureight(int x){printf("FizzBuzzGoozKaaz\n");}
> > */
> > void onetwofoureight(int x)
> > {
> > char cmd[100]={0};
> > printf("FizzBuzzGoozKaaz\n");
> > sprintf(cmd,"zenity --info --text=\"Found a FizzBuzzGoozKaaz at %d\"",x);
> > system(cmd);
> > }
>
> It reminds me of a time when I was writing a script to determine the
> distro type the user was using. It grew and grew and I kept looking for
> better ways to determine it in many different distros. It's a lot easier
> if I know for a fact that every user is RHEL and Ubuntu. If not ...
>
> FizzBuzz reminds me of this issue. Right now, you know there are four
> outcomes. Just the number, Fizz, Buzz and FizzBuzz. So no matter what it
> simple to write almost anything that will solve that. But then the
> question comes up, what if there are 8 things or 16 thing or 256
> things...
>
> I scripts I started to use arrays, even if for one item. My thinking is
> that if I need to expand it to two or more, the array is already there.
> So I tend to like that kind of thinking. I'll play with FizzBuzz some
> more.
>
> I was reading another question that comes up about 25 horses and on
> YouTube I think the guy saying the answer has it all wrong. There are a
> bunch of tech questions that can come up. Obviously I know programmers
> but don't wish to ask for their help and I don't wish to look for the
> answer online. I'd rather fail and learn from that failure. I think
> writing programs and utils is a process. You start simple and then once
> you have an answer, even a bad answer, you can then ask yourself how to
> make it better.
>
> Who hasn't looked at code they wrote 6 months ago or a year ago and
> didn't think it was crap? There was this one guy doing a lecture and he
> was going on and on about how awful this code was. And then he realized
> he wrote it years ago. It was his own code. He just didn't recognize it anymore
> because he got better and better and started adopting better thinking.
>
> It all has to start from somewhere.
>
> The first array I wrote in a shell script looked something like this:
>
> array[1]="hello"
> array[4]="good bye"
>
> And believe it or not, there are some pluses to doing it this way. I
> absolutely control the specific placement of the element in the array.
> But obviously, most will simply do this:
>
> array=("hello" "goodbye")
>
> As silly as that was I still appreciate it. If I were you, I wouldn't
> worry too much what others opine about your code. Consider their point,
> decide if you agree or disagree and do whatever you think is best.
Good advice.
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-08-05 17:33 +0000 |
| Subject | Re: 2 lines, 2^2 states, easily modified to 3^2 states. |
| Message-ID | <sab3abzx003.a@rooftop.invalid> |
| In reply to | #425926 |
Marek Novotny <marek.novotny@marspolar.com> wrote:
> On 2017-08-05, owl <owl@rooftop.invalid> wrote:
>> In comp.os.linux.advocacy Jeff-Relf.Me wrote:
>>> You ( Owl ) replied ( to me ):
>>> > > int x = 0, F, B ;
>>> > > while ( x++ < 100 ) printf("\n"), F = !(x%3), B = !(x%5), printf(
>>> > > F && B ? "FizBuz" : F ? "Fiz" : B ? "Buz" : "%d", x );
>>> >
>>> > Because nothing says "readable" and "maintainable" like a bunch of nested
>>> > ternary operations.... Try it with four values, where your state count
>>> > goes to 16. See how "readable" that is with your approach.
>>>
>>> How about ? :
>>>
>>> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
>>> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
>>>
>>> 2 lines, 2^2 states, easily modified to 3^2 states.
>>
>> Better, but you're still hard-coding values. And 2^3 will need an 8-member
>> array and 2^4 will need 16. See my other post showing 2^4.
>>
>>
>>> Full Answer: http://Jeff-Relf.Me/FizBuz.HTM
>>>
>>> The I/O is the limiting factor, not "x%3", so:
>>>
>>> int x = 0 ; char *Say[4] = { "%d\n", "Buz\n", "Fiz\n", "FizBuz\n" };
>>> while ( x++ < 100 ) printf( Say[ 2*!(x%3) + !(x%5) ], x );
>>>
>>> 2 lines, 2^2 states, easily modified to 2^3 states:
>>>
>>> 4*!(x%3) + 2*!(x%5) + !(x%7)
>>>
>>
>> You're still limited by just having printf() pointing into an array
>> of strings. I use an array of function pointers so that you can do
>> something other than printf() -- or in addition to printf() --
>> for different combinations.
>>
>> For example, here a match on all four values calls zenity to
>> display a dialog alerting on a match:
>>
>> http://imgur.com/a/rHRmP
>>
>> /*void onetwofoureight(int x){printf("FizzBuzzGoozKaaz\n");}
>> */
>> void onetwofoureight(int x)
>> {
>> char cmd[100]={0};
>> printf("FizzBuzzGoozKaaz\n");
>> sprintf(cmd,"zenity --info --text=\"Found a FizzBuzzGoozKaaz at %d\"",x);
>> system(cmd);
>> }
>
> It reminds me of a time when I was writing a script to determine the
> distro type the user was using. It grew and grew and I kept looking for
> better ways to determine it in many different distros. It's a lot easier
> if I know for a fact that every user is RHEL and Ubuntu. If not ...
>
> FizzBuzz reminds me of this issue. Right now, you know there are four
> outcomes. Just the number, Fizz, Buzz and FizzBuzz. So no matter what it
> simple to write almost anything that will solve that. But then the
> question comes up, what if there are 8 things or 16 thing or 256
> things...
>
> I scripts I started to use arrays, even if for one item. My thinking is
> that if I need to expand it to two or more, the array is already there.
> So I tend to like that kind of thinking. I'll play with FizzBuzz some
> more.
>
> I was reading another question that comes up about 25 horses and on
> YouTube I think the guy saying the answer has it all wrong. There are a
> bunch of tech questions that can come up. Obviously I know programmers
> but don't wish to ask for their help and I don't wish to look for the
> answer online. I'd rather fail and learn from that failure. I think
> writing programs and utils is a process. You start simple and then once
> you have an answer, even a bad answer, you can then ask yourself how to
> make it better.
>
> Who hasn't looked at code they wrote 6 months ago or a year ago and
> didn't think it was crap? There was this one guy doing a lecture and he
> was going on and on about how awful this code was. And then he realized
> he wrote it years ago. It was his own code. He just didn't recognize it anymore
> because he got better and better and started adopting better thinking.
>
> It all has to start from somewhere.
>
> The first array I wrote in a shell script looked something like this:
>
> array[1]="hello"
> array[4]="good bye"
>
> And believe it or not, there are some pluses to doing it this way. I
> absolutely control the specific placement of the element in the array.
> But obviously, most will simply do this:
>
> array=("hello" "goodbye")
>
> As silly as that was I still appreciate it. If I were you, I wouldn't
> worry too much what others opine about your code. Consider their point,
> decide if you agree or disagree and do whatever you think is best.
>
We can't let sc be left out in the cold.
http://imgur.com/a/14HAV
anon@lowtide:~/code/sc/fb$ cat fb.sc
set numeric extfun craction = 1 color colorerr
format A 23 0 0
color 6 = @green;@black
color a1:a100 6
leftstring A1 = @if(a1=0,"",@if(!(A1%3),@if(!(A1%5),"fizzbuzz","fizz"),@if(!(A1%5),"buzz","")))
yank a1:a1
pullcopy a2:a100
fill b1:b100 1 1
yank b1:b100
goto a1
pullmerge
erase b1:b100
goto A1 A0
anon@lowtide:~/code/sc/fb$
Or just leave it empty and have it do it as you type:
http://imgur.com/a/XiVsZ
anon@lowtide:~/code/sc/fb$ cat bf.sc
set numeric extfun craction = 1 color colorerr
format A 23 0 0
color 6 = @green;@black
color a1:a100 6
leftstring A1 = @if(a1=0,"",@if(!(A1%3),@if(!(A1%5),"fizzbuzz","fizz"),@if(!(A1%5),"buzz","")))
yank a1:a1
pullcopy a2:a100
goto A1 A0
anon@lowtide:~/code/sc/fb$
[toc] | [prev] | [next] | [standalone]
| From | Marek Novotny <marek.novotny@marspolar.com> |
|---|---|
| Date | 2017-08-04 22:24 -0500 |
| Subject | Re: Fabian seldom writes code, much less test it. |
| Message-ID | <o_KdnffLa-HPpxjEnZ2dnUU7-amdnZ2d@giganews.com> |
| In reply to | #425816 |
On 2017-08-05, Jeff-Relf.Me @. <Jeff-Relf.Me@> wrote:
><PRE Style='Font-Family: OCR A, monospace !important;'>
> You ( Fabian ) replied ( to me ):
>> > [ FizBuz's ] I/O is thee only limiting factor, not "x%3".
>>
>> The I/O can easily be separated from the decision process
>> by using some sort of index (either an array or bit fields).
>> Then, _my_ DIVISION-LESS algorithm will surpass all others.
>> But the problem is exceedingly trivial.
>> It is a sign of stupidity to dwell on it.
>
> Forget this "DIVISION-LESS algorithm" bullshit, the answer is just:
>
> int x = 0, F, B ;
> while ( x++ < 100 ) printf("\n"), F = !(x%3), B = !(x%5), printf(
> F && B ? "FizBuz" : F ? "Fiz" : B ? "Buz" : "%d", x );
>
> 3 lines, 4 states, done.
>
> You seldom write code, much less test it.
> And you obsess over things that don't matter, e.g. "x%3".
I actually contemplated using bitwise first but decided against it.
--
Marek Novotny
https://github.com/marek-novotny
[toc] | [prev] | [next] | [standalone]
| From | "F. Russell" <fr@random.info> |
|---|---|
| Date | 2017-08-05 13:37 +0000 |
| Subject | Re: Fabian seldom writes code, much less test it. |
| Message-ID | <om4hn801hfk@news6.newsguy.com> |
| In reply to | #425816 |
On Fri, 04 Aug 2017 18:20:59 -0700, Jeff-Relf.Me wrote: > > And you obsess over things that don't matter, e.g. "x%3". > Don't matter? Ha, ha, ha, ha, ha, ha, ha, ha! Write some code to evaluate the following polynomial: y = c4 * x^4 + c3 * x^3 + c2 * x^2 + c1 * x + c0 where c4, c3, c2, c1, c0 are constants. Show us what your idiotic answer will be.
[toc] | [prev] | [next] | [standalone]
| From | "F. Russell" <fr@random.info> |
|---|---|
| Date | 2017-08-05 14:25 +0000 |
| Subject | Re: Fabian seldom writes code, much less test it. |
| Message-ID | <om4kgn02epk@news3.newsguy.com> |
| In reply to | #425816 |
On Fri, 04 Aug 2017 18:20:59 -0700, Jeff-Relf.Me wrote: > > obsess over things that don't matter, e.g. "x%3". > Don't matter? Heee, hee, hee, hee, hee, hee, hee, hee, hee! Jeff-Ass knows shit about uprocessors. Check out the instruction tables put together by Agner Fog: www.agner.org/optimize/instruction_tables.pdf By all measures of throughput and latency, ADD beats DIV. ADD not only beats DIV, it whips its ass. So only a brain-dead, cretinous, imbecilic idiot would NOT use ADD in place of DIV where it is feasible. But that's Jeff-Ass. Ha, ha, ha, ha, ha, ha, ha, ha!
[toc] | [prev] | [next] | [standalone]
Page 3 of 5 — ← Prev page 1 2 [3] 4 5 Next page →
Back to top | Article view | comp.os.linux.advocacy
csiph-web