Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27659
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2015-05-16 01:53 -0700 |
| References | (1 earlier) <bdffa5ba-4192-4112-8a5a-cce6b349aef2@googlegroups.com> <87oall1slp.fsf@bsb.me.uk> <2805604.EO7ul1Ts0Q@PointedEars.de> <f302e2cc-e93c-4901-9f74-3451814bbf45@googlegroups.com> <877fs91ndu.fsf@bsb.me.uk> |
| Message-ID | <b7795ebe-6732-41dc-8cc7-32ef9e9eb779@googlegroups.com> (permalink) |
| Subject | Re: Why does it slow down for bases above 10? |
| From | jonas.thornvall@gmail.com |
Den lördag 16 maj 2015 kl. 00:34:10 UTC+2 skrev Ben Bacarisse:
> jonas.thornvall@gmail.com writes:
>
> > Den fredag 15 maj 2015 kl. 23:24:15 UTC+2 skrev Thomas 'PointedEars' Lahn:
> >> Ben Bacarisse wrote:
> >>
> >> > jonas.thornvall@gmail.com writes:
> >> >> Den fredag 15 maj 2015 kl. 20:58:10 UTC+2 skrev jonas.t...@gmail.com:
> >> >>> http://jt.node365.se/baseconversion.html
> >> >>
> >> >> If someone can point out the bug for base above 10 in my generic
> >> >> basechanger it would be great.
> >> >
> >> > That's unlikely. The code is some of the least inviting I've ever seen.
> >> > Global variables all over the place. Functions that should return
> >> > values depositing results into globals instead. Names that carry little
> >> > or no meaning ("loop", "looptwo", "arrCompareTwo"). It's almost
> >> > impossible to follow.
> >>
> >> Add to that
> >>
> >> <http://validator.w3.org/check?uri=jt.node365.se%2Fbaseconversion.html&ss=1&verbose=1>
> >>
> >> All that is to be expected when a wannabe does "javascript".
> >>
> >> --
> >> PointedEars
> >> FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
> >> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
> >> Please do not cc me. / Bitte keine Kopien per E-Mail.
> >
> > Well i am more of a do just do it kind of programmer, if you want a
> > fully fledged optimized generic basechanger that even do
> > bignumbs. That would be a quite challenging task. Especially if you
> > want to use Javascript to it's full potential.
>
> No, that's not the aim. Your aim is simply to get the code to work but
> you've make it it too complicated for you to understand and too
> complicated for anyone else to try to understand. I suppose you might e
> able to work out what's wrong, but it seems unlikely. And if you do,
> you'll hit another bug, and another and another... because the structure
> of the code makes more bugs inevitable.
>
> <snip>
> > And it is a generic basechanger working on bignumbs afterall so it is
> > not preciely easy logic.
>
> The logic is easy if you decompose the problem into the right
> components, but you've make all the parts interlinked through globals.
>
> > I was concentrated on get it to work, and i am partially
> > there. Optimization would rather be to implement the search for
> > digitplace rather than, make the code wonderful.
> >
> > Fixing details can always be done when something working, or partially
> > working.
>
> Generations of programmers have found that this approach does not work.
> You have to get the right structure to stat with or the program just
> gets more and more impenetrable as it develops.
>
> --
> Ben.
Well it is a hobby project afterall and i think the development using a RAD like approach. The global aim for the project is to show different ways of doing highlevel arithmetic in bignumbs, and show how the format/interpretation rules of digitplaces and symbols *at highlevel* do affect the arithmetic performed at binary level, and how the computational complexity changes with the tools used.
The specific need of algorithms and functions of this project is not welldefined, so i can not make a flowchart, or an object tree model.
The functions and algorithms are developed as the need for them occur that does not mean i do not want general working code, quite the opposite there is a need for it since many functions work upon the same operand arrays.
And that is why they are global, it is not like the program is a big main with endless nested loops. It is quite welldefined functional behaviour, but i agree my comments are absent, and the variable and function naming sometimes misleading.
That is a RAD problem the full plan is not thought thru.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why does it slow down for bases above 10? jonas.thornvall@gmail.com - 2015-05-15 11:57 -0700
Re: Why does it slow down for bases above 10? jonas.thornvall@gmail.com - 2015-05-15 12:25 -0700
Re: Why does it slow down for bases above 10? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-15 21:41 +0100
Re: Why does it slow down for bases above 10? jonas.thornvall@gmail.com - 2015-05-15 14:20 -0700
Re: Why does it slow down for bases above 10? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-15 23:21 +0200
Re: Why does it slow down for bases above 10? jonas.thornvall@gmail.com - 2015-05-15 14:37 -0700
Re: Why does it slow down for bases above 10? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-15 23:34 +0100
Re: Why does it slow down for bases above 10? "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-05-16 01:27 +0200
Re: Why does it slow down for bases above 10? jonas.thornvall@gmail.com - 2015-05-16 01:53 -0700
Re: Why does it slow down for bases above 10? jonas.thornvall@gmail.com - 2015-05-16 02:18 -0700
Re: Why does it slow down for bases above 10? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-16 11:05 +0100
Re: Why does it slow down for bases above 10? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-16 17:58 +0200
csiph-web