Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: A binary search algorithm that searches for an element similar tothe key

Reply
Thread Tools

Re: A binary search algorithm that searches for an element similar tothe key

 
 
88888 Dihedral
Guest
Posts: n/a
 
      12-27-2011
Seebs於 2011年12月28日星期三UTC+8上午4時13分54 寫道:
> On 2011-12-27, 88888 Dihedral <(E-Mail Removed)> wrote:
> > I love those jobs that ordinary low paid programmers can't do
> > that is how I got paid well.

>
> If your code and writing is any indication, this is a terrifying concept.
>
> > It is not the language used but just
> > the difficulties and talents required to complete tough tasks
> > to get the rewards must be rare.

>
> Huh. I would much rather put the hard work into building a robust and
> maintainable design such that the skills needed to keep it running aren't
> rare.
>


We don't have to argue about chief technical officer's views
and chief financial officer's views.

CTO and CFO normally think quite differently.





> The goal here is not to show off, it's to do the best work possible.
> Maintainable code is better than flashy code.
>
> -s
> --
> Copyright 2011, all wrongs reversed. Peter Seebach / (E-Mail Removed)
> http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
> http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
> I am not speaking for my employer, although they do rent some of my opinions.


 
Reply With Quote
 
 
 
 
88888 Dihedral
Guest
Posts: n/a
 
      12-27-2011
Seebs於 2011年12月28日星期三UTC+8上午4時13分54 寫道:
> On 2011-12-27, 88888 Dihedral <(E-Mail Removed)> wrote:
> > I love those jobs that ordinary low paid programmers can't do
> > that is how I got paid well.

>
> If your code and writing is any indication, this is a terrifying concept.
>
> > It is not the language used but just
> > the difficulties and talents required to complete tough tasks
> > to get the rewards must be rare.

>
> Huh. I would much rather put the hard work into building a robust and
> maintainable design such that the skills needed to keep it running aren't
> rare.
>


To keep of the workers on a factory to chunk out profits
for the employers is different from controlling those machinares
and techniques to install the assembly lines.

> The goal here is not to show off, it's to do the best work possible.
> Maintainable code is better than flashy code.
>


I agree with you for the requirements of workers
on the mass production factories.





> -s
> --
> Copyright 2011, all wrongs reversed. Peter Seebach / (E-Mail Removed)
> http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
> http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
> I am not speaking for my employer, although they do rent some of my opinions.


 
Reply With Quote
 
 
 
 
Seebs
Guest
Posts: n/a
 
      12-27-2011
On 2011-12-27, 88888 Dihedral <(E-Mail Removed)> wrote:
> We don't have to argue about chief technical officer's views
> and chief financial officer's views.


> CTO and CFO normally think quite differently.


This has nothing to do with anything.

I think at this point I'm obliged to give up. You've not yet made a lucid
comment about C that I'm aware of. You went on at some length about needing
a "division library" for ARM, but are apparently completely unaware of how
actual compilers for ARM handle division. You regularly advocate taking
perfectly functional code which can be easily maintained and will work on any
known computer, and mangling it into something harder to maintain which works
on only some computers and isn't even demonstrably faster. You appear to have
permanently fixated on the state of the art in compilers in the 1970s, and
you constantly brag about being well-paid and in charge of things and how you
want your skills to be rare.

This is the opposite of competence.

Good software development should not be focused on trying to show off or
impress people, but on making software that actually works and does its job
well.

It should not be focused on offering vague and irrelevant platitudes, talking
at great length about irrelevant trivia and pretending they're highly
significant, and trying to impress everyone with how much more money you earn
than other people. Who CARES?

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
Seebs
Guest
Posts: n/a
 
      12-27-2011
On 2011-12-27, 88888 Dihedral <(E-Mail Removed)> wrote:
> Seebs??? 2011???12???28????????????UTC+8??????4???13???54?? ??????????
>> Huh. I would much rather put the hard work into building a robust and
>> maintainable design such that the skills needed to keep it running aren't
>> rare.


> To keep of the workers on a factory to chunk out profits
> for the employers is different from controlling those machinares
> and techniques to install the assembly lines.


This is again illucid.

>> The goal here is not to show off, it's to do the best work possible.
>> Maintainable code is better than flashy code.


> I agree with you for the requirements of workers
> on the mass production factories.


This has nothing to do with workers in factories. This is how you turn
software development from a bunch of prima donnas who don't actually do good
work into a career worthy of some degree of respect.

Flashy code *does not actually work better*. Fooling around with stuff like
that is okay recreation, but if someone's paying me for software, I try to
deliver something which does its job, not something that shows off why I'm
an IOCCC judge.

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / (E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      12-27-2011
88888 Dihedral <(E-Mail Removed)> writes:
> Keith Thompson於 2011年12月22日星期四UTC+8上午5時37分25 寫道:


Are those Chinese ideographs? Be aware that most users aren't going to
be able to read them.

>> 88888 Dihedral <(E-Mail Removed)> writes:
>> [...]
>> > A program in C code within 20 lines should be coded in assembly easily
>> > for professionals in any 32 bit cpu easily.

>>
>> But why on Earth would anyone want to waste the time doing so?

>
> I love those jobs that ordinary low paid programmers can't do
> that is how I got paid well. It is not the language used but just
> the difficulties and talents required to complete tough tasks
> to get the rewards must be rare.


If you're not going to answer my question, please don't post your
ramblings as a followup to the article in which I asked it.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
88888 Dihedral
Guest
Posts: n/a
 
      12-27-2011
Seebs於 2011年12月28日星期三UTC+8上午6時14分23 寫道:
> On 2011-12-27, 88888 Dihedral <(E-Mail Removed)> wrote:
> > We don't have to argue about chief technical officer's views
> > and chief financial officer's views.

>
> > CTO and CFO normally think quite differently.

>
> This has nothing to do with anything.
>
> I think at this point I'm obliged to give up. You've not yet made a lucid
> comment about C that I'm aware of. You went on at some length about needing
> a "division library" for ARM, but are apparently completely unaware of how
> actual compilers for ARM handle division.


Are you kidding about Keil C-compiler that was bought by ARM ?

You can mix assembly with C from the products of the same company in ARM7-9-10-11 and 8051.

Because many general instructions in many CPU are actually executed by slow
micro-codes especially in 8051 and 8052 of the 196X AB register architecture , therefore the slowest part of the instructions might need to be optimized by professionals in applications of various parameters.

The integer division in the x86 family does improve a lot in these years.






 
Reply With Quote
 
Seebs
Guest
Posts: n/a
 
      12-28-2011
On 2011-12-27, 88888 Dihedral <(E-Mail Removed)> wrote:
> Are you kidding about Keil C-compiler that was bought by ARM ?


No. I'm not talking about it at all. There is no reference in any way to
that.

I am talking about the fact that there is NO NEED WHATSOEVER for a "division
library" for ARM, because whether or not any given CPU has a divider, *the
C compilers already take care of this*.

> Because many general instructions in many CPU are actually executed by slow
> micro-codes especially in 8051 and 8052


This sounds almost meaningful, but I'm coming to think it's just word salad.

You seem deeply obsessed with the notion that you can somehow hugely improve
things by outsmarting compilers, but the net result is that so far as I can
tell you're less able to produce an actual program which does a thing than
the average second or third year CS student.

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / (E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
88888 Dihedral
Guest
Posts: n/a
 
      12-28-2011
Seebs於 2011年12月28日星期三UTC+8上午8時09分12 寫道:
> On 2011-12-27, 88888 Dihedral <(E-Mail Removed)> wrote:
> > Are you kidding about Keil C-compiler that was bought by ARM ?

>
> No. I'm not talking about it at all. There is no reference in any way to
> that.
>
> I am talking about the fact that there is NO NEED WHATSOEVER for a "division
> library" for ARM, because whether or not any given CPU has a divider, *the
> C compilers already take care of this*.
>
> > Because many general instructions in many CPU are actually executed by slow
> > micro-codes especially in 8051 and 8052

>
> This sounds almost meaningful, but I'm coming to think it's just word salad.
>
> You seem deeply obsessed with the notion that you can somehow hugely improve
> things by outsmarting compilers, but the net result is that so far as I can
> tell you're less able to produce an actual program which does a thing than
> the average second or third year CS student.
>


Could you do RSA 1024 bit encoding and decoding in arm7 without checking
the possibilities to improve by assembly with C ?

If you are selling compilers , then I'll post some problems
with a specified platform for you to recommend the compiler to
be tested here.









 
Reply With Quote
 
Seebs
Guest
Posts: n/a
 
      12-28-2011
On 2011-12-28, 88888 Dihedral <(E-Mail Removed)> wrote:
> Could you do RSA 1024 bit encoding and decoding in arm7 without checking
> the possibilities to improve by assembly with C ?


This is a question which has nothing to do with the assertion I was
criticizing.

And really, this is why I'm gonna go ahead and killfile you. You are illucid.
You can't respond to a question or assertion; you sort of wander off in a haze
of buzzwords and unrelated assertions.

The assertion you made was that we needed a division library for ARM because
the chip doesn't have a divider. In fact, that doesn't mean we need a
"division library", it just means that the compiler vendors have to do
something behind the scenes to make division work.

> If you are selling compilers , then I'll post some problems
> with a specified platform for you to recommend the compiler to
> be tested here.


I'm not selling compilers.

I'm not even asserting that it is in general impossible to gain a benefit from
hand-tuning things; I'm just asserting that you seem to leap to it as a course
of action without a moment's thought as to the costs and benefits.

-s
--
Copyright 2011, all wrongs reversed. Peter Seebach / (E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      12-28-2011
On Dec 21, 12:36*pm, 88888 Dihedral <(E-Mail Removed)>
wrote:

> I wrote a binary search in assembly in 386 20 years ago.


oh goody.

> This is trivial. There were EAX, EBX, ECX, EDX and ESI, EDI which are 6
> 32 bit general registers and a stack that can be pushed and popped.


the tricky bit is the algorithm. Once you have the algorithm why not
code it in a HLL? A version written in C might actually run quicker
than your 20 year old assembler code because modern CPUs aren't 386s
and optimisers have got very good.

But trying to talk you out of your machine code obsession is simply a
waste of time.

<snip>

> A program in C code within 20 lines should be coded in assembly easily for
> professionals in any 32 bit cpu easily.


why bother?

> I'll warn *any programmer that *dare to use *any lousy name of any variable
> to be a pointer witout ptr* or p* in the name *under my *supervision.


we would part company pretty quickly. Next thing you'll go all
hungarian on me.

> Then I'll ask the programmer to convert the program into a specified assembly
> to *prove the programmer is not stealing codes form others and faking to be
> his own works.


this is just stupid

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Re: A binary search algorithm that searches for an element similar to the key Ben Bacarisse C Programming 8 12-22-2011 07:24 PM
Binary tree search vs Binary search Bogdan C Programming 22 10-21-2010 09:46 PM
Does ModelSim or any simulator software have a function similar tothe standard function any logic analizer has? Weng Tianxiang VHDL 7 09-11-2009 04:47 PM
Key generation algorithm and Cipher algorithm Ahmed Moustafa Java 0 11-15-2003 06:35 AM



Advertisments