473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How create algorithms

Hi,

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.

Tanks, FroxX
Jul 22 '05 #1
10 1430
FloWo3 wrote:

Hi,

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.


Paper, lots of paper.
Pencil, lots of pencil
Trying to solve the problem on Paper
and pencil. Once I can solve the problem
on paper -> repeat the whole thing and
monitor what I do.

Once you think you have an algorithm, go through
it with someone else. It really doesn't matter if
that someone understands what you are talking about.
Just having the need to express your ideas in talken
language is enough. You can even talk to a teddy bear
and it works.

--
Karl Heinz Buchegger
kb******@gascad.at
Jul 22 '05 #2
FloWo3 wrote:
Hi,

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.

Tanks, FroxX


The morning in the bed, a quarter of hour before the ring bells.
I take the problem (usually the algoritm) of the day before, and usually
I get it...
Pierre Couderc
Jul 22 '05 #3
FloWo3 writes:
how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.


My most effective tool is my sub-conscious. I try to understand what the
problem is and then go on with my life. If I'm lucky, which I quite often
am, a solution will come to me in the next few hours.
Jul 22 '05 #4
FloWo3 wrote:
Hi,

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.


I figure out how to do it by hand, keeping track of *everything* I do
and *everything* I have to remember. If you don't know how to do it
yourself, you don't have an algorithm.

--
Will Twentyman
email: wtwentyman at copper dot net
Jul 22 '05 #5

"Karl Heinz Buchegger" <kb******@gascad.at> wrote in message
news:41***************@gascad.at...
FloWo3 wrote:

Hi,

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.


Paper, lots of paper.
Pencil, lots of pencil
Trying to solve the problem on Paper
and pencil. Once I can solve the problem
on paper -> repeat the whole thing and
monitor what I do.

Once you think you have an algorithm, go through
it with someone else. It really doesn't matter if
that someone understands what you are talking about.
Just having the need to express your ideas in talken
language is enough. You can even talk to a teddy bear
and it works.


Yeah, but my teddy bear keeps correcting me..it's really annoying! :-)

-Howard
Jul 22 '05 #6
"Karl Heinz Buchegger" <kb******@gascad.at> wrote in message
news:41***************@gascad.at...
FloWo3 wrote:

Hi,

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.


Paper, lots of paper.
Pencil, lots of pencil
Trying to solve the problem on Paper
and pencil. Once I can solve the problem
on paper -> repeat the whole thing and
monitor what I do.

Once you think you have an algorithm, go through
it with someone else. It really doesn't matter if
that someone understands what you are talking about.
Just having the need to express your ideas in talken
language is enough. You can even talk to a teddy bear
and it works.


:-) This isn't as strange as it might sound to some. Since
I mostly work alone at home, I usually can't discuss problems
'face to face' with someone. When I get stuck, sometimes I'll
'consult' with my cat. Of course his only answers are "Meow"
and perhaps rubbing against my leg. But As Karl says, just
vocalizing an issue can help uncover a solution. And Kitty
seems to appreciate the attention. :-)

-Mike
Jul 22 '05 #7
Mike Wahler wrote:
[snip]
:-) This isn't as strange as it might sound to some. Since
I mostly work alone at home, I usually can't discuss problems
'face to face' with someone. When I get stuck, sometimes I'll
'consult' with my cat. Of course his only answers are "Meow"
and perhaps rubbing against my leg. But As Karl says, just
vocalizing an issue can help uncover a solution. And Kitty
seems to appreciate the attention. :-)

-Mike


My cats seem to have a one track mind:

Me: "What do you think about using multiple traversal pointers
and choosing the one or more that succeed?"
Cat:"Time to eat already! Meow!"

Me: "Is it better to use a global hash table or one for each scope?"
Cat:"Time to eat already! Meow!"

....

-Rich

--
Richard Pennington
Email: ri**@pennware.com
http://www.pennware.com ftp://ftp.pennware.com
Jul 22 '05 #8
FloWo3 wrote:
Hi,

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.

Tanks, FroxX


Recipe for Algorithm

20 parts reading
1 part inspiration
99 parts perspiration

adjust to taste
Jul 22 '05 #9
"Richard Pennington" <ri**@pennware.com> wrote in message
news:mj*****************@newssvr19.news.prodigy.co m...
Mike Wahler wrote:
[snip]
:-) This isn't as strange as it might sound to some. Since
I mostly work alone at home, I usually can't discuss problems
'face to face' with someone. When I get stuck, sometimes I'll
'consult' with my cat. Of course his only answers are "Meow"
and perhaps rubbing against my leg. But As Karl says, just
vocalizing an issue can help uncover a solution. And Kitty
seems to appreciate the attention. :-)

-Mike


My cats seem to have a one track mind:

Me: "What do you think about using multiple traversal pointers
and choosing the one or more that succeed?"
Cat:"Time to eat already! Meow!"

Me: "Is it better to use a global hash table or one for each scope?"
Cat:"Time to eat already! Meow!"


With my cat, the response is always "Why aren't you petting me? Meow!" I
think he's very intelligent, because he always has an answer for all of my
questions. I don't always understand his answers, but that's just a
communication issue. It still helps me (just as it helps Mike Wahler),
because I can have a phony conversation with my cat for a fair amount of
time before he becomes bored and walks away. :-) I figure that some people
might think I was fit for a straightjacket if they saw me doing that. If
he's not around, I wind up talking to myself, which works almost as well,
but isn't much better when witnessed by others. :-)

--
David Hilsee
Jul 22 '05 #10
"FloWo3" <fl****@aol.com> wrote in message
news:20***************************@mb-m25.aol.com...

how do you create (design) algorithms.
I'm talking about thinking about it and come to an idea.


Examine the problem in small steps. Break down each little piece into
baby steps.

Contrary to other posts, I don't use paper and pen unless I'm trying to
visualize the actions of a loop of something like that.

I start in with an editor (not necessarily an IDE, Notepad works fine)
and start by just typing in comments of the steps I think I need, like
this:
---------------------------------------
// allocate variables

// open input file

// read data from file (into struct, line at a time, or whatever)
---------------------------------------

As I'm working I fill in things I find I need, like this:
---------------------------------------
// allocate variables
// loop counter, if necc.
// line buffer
// struct for file data, or alloc as needed

// open input file

// loop to read data from file into struct one line at a time
// read a line into line buffer
// parse line buffer into struct

// close file

// do something with data struct

// deallocate as necc.
---------------------------------------

The above is more C-like than C++, but you get the idea.

I try get the full problem scoped out before writing any real code, and
if some step is very complicated I just open another notepad for that
function or class. Eventually, I find things that I can fill in as real
code, but I try to resist that as long as possible.

Some will say that you have to use paper for this process, but editors
work for me. YMMV. On the plus side of this method you end up with fully
commented code at the end. And the comments are sometimes more correct,
since they change as the design is fleshed out - before the code is
written.

--
Mabden
Jul 22 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Anders Borum | last post by:
Hello! I'm starting to dive into algorithms in general (sorting, trees etc.) and am currently reading a book from Robert Sedgewick called "Algorithms in C++, 3rd. Edition" and would like other...
17
by: silverburgh.meryl | last post by:
In STL, there is no copy_if algorithm. But how can I emulate that? I am thinking about using find_if and then a copy. But how can I pass the InputIterator (begin and end) to copy so that it knows...
4
by: Jonathan Wood | last post by:
Does anyone know why the documentation for System.Security.Cryptography.MD5.Create() seems to omit completely any description of allowed arguments. I'm trying to convert some C++ code to C# and...
26
by: vlsidesign | last post by:
I am a newbie and going through "The C programming language" by Kernighan & Richie on my own time (I'm not a programmer but I want to learn because it can save me time in my normal job, and it is...
19
by: Dongsheng Ruan | last post by:
with a cell class like this: #!/usr/bin/python import sys class Cell: def __init__( self, data, next=None ): self.data = data
3
by: arnuld | last post by:
i am looking for "algorithms in C++" book. Knuth is FULL of Mathematics, not my kind of author. i checked ACCU and got these (listing only those that are available in my country: 1. Algorithms...
17
by: Happy Man | last post by:
Truth Seeker http://www.thisistruth.org/truth.php?f=TruthSeeker No one is compelled to accept the truth, but it is certainly a shame upon the human intellect when a man is not even...
2
by: =?Utf-8?B?Q3JtTmV3Ymll?= | last post by:
Hi, 1) I want to hone my problem solving skills and be good at logic. How do I achieve this? 2) Where can I find c# puzzles or c# algorithms. 3) How do I print the values of a N X N matrix...
53
by: Vicent Giner | last post by:
Hello. I am new to Python. It seems a very interesting language to me. Its simplicity is very attractive. However, it is usually said that Python is not a compiled but interpreted programming...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.