Re: Is PERL good for a linguist new to programming?



p.podmostko@xxxxxxxxxxxxxx wrote in
news:3fe30943-ea67-48eb-98ed-1c52f97a3f3f@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

On May 25, 5:06 pm, "Uri Guttman" <u...@xxxxxxxxxxxxxxx> wrote:
"pp" == p podmostko <p.podmos...@xxxxxxxxxxxxxx> writes:

  pp> Right now for example im racking my brains how to sort several
pp> words alphabetically using only if, for, else, and several
pp> variables.
....

that is a classic part of the knowledge scaling i mentioned. sorting
is one of the core areas taught in every algorithm class. i won't
give you a fish but you want to learn the bubble sort. it is the
easiest sort to code up but one of the slowest to run. but the speed
doesn't matter for short data sets and it is very educational to know
how to code it up and learning WHY it is slow.

....

Im aware of something like "sort" but i just a wanted to make it a
challenge to myself and use only the resources that i know at this
stage :)

Exactly. That is why Uri recommended you try to implement the Bubble
Sort algorithm. It is easy to implement (it was a demo that came with my
ZX Spectrum 48K back in 1982 ... written in Basic and read from cassette
tape -- In fact, after almost 20 years of continuous beeping first from
cassettes then from modems whenever I tried to do something useful, I
find the quiet that comes with today's internet access quite
disturbing). OK, that was not relevant but neither is drumming ;-)

Do you guys write out algorithms very often before sitting down to
programming?

No. I steal other people's algorithms.

Now, if you were asking about thinking about what to write, how to
organize it, how things fit together etc, yes, always. All the time.
Every time.

Sinan

--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
.



Relevant Pages

  • Re: "Sorting" assignment
    ... algorithm such as tbe bubble sort should be given a free pass because ... I would tailor which algorithm to start with by how the student thinks ... If you only learn the beautiful side of programming, ...
    (comp.programming)
  • Re: sort functions in python
    ... bogo sort and bozo sort are worse, but bubble sort is still ... It's rather like any divide-and-conquer sorting algorithm being called quicksort. ... The conventional wisdom for low-level languages like assembly and C doesn't necessarily hold for high-level languages like Python. ...
    (comp.lang.python)
  • Re: "Sorting" assignment
    ... algorithm such as tbe bubble sort should be given a free pass because ... Learning bubble sort can teach you a lot about algorithms. ... I'd say that the students have the right to start ...
    (comp.programming)
  • Re: puzzle
    ... >> Christopher Barber wrote: ... >> or understanding among programming professionals. ... > algorithm "close to" O. ... bubble sort, it is almost always acceptable to use an interchange sort: ...
    (comp.programming)
  • Re: Bubble Sort in C
    ... They'll either use a selection sort or an insertion ... Give a programming newbie a computer, however, and tell them to write ... and they may well end up with bubble sort as their ... The earliest program I can remember writing implemented an algorithm ...
    (comp.lang.c)