Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 28th, 2006, 7:26 PM   #1
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Creating algorithms-> talent or experience?

Now whenever i'm working on a algorithm it seems that I take a lot longer than other people around me working on the same algorithm. I can't explain why.

Do u think that with practice creating algorithms i'll be more efficient creating them, example: faster creation time/ less debug time? or do u think that there's a certain point where talent far outweights experience?

Maybe an experienced programmer can answer.
Eric the Red is offline   Reply With Quote
Old Feb 28th, 2006, 7:42 PM   #2
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
yeah, it will be very effective! I, myself, talk from experience! And as for talent outweighing experience...I don't know about that, You gain experience as you go along on what ever you wish to do continuously. Experienced programmers far beat out newbies in a matter of knowing what they are talking about and having to dealt with that knowledge/something for some time versus a newbie new to something and haven't full something's potential. It's true that people can acceleration in something faster than others but what if they are missing out on something that while learning that something. Example, experienced drivers versus teens with their permits. It's all about experience in this matter just like how the world is today. Experience drivers have driven a lot more than that teen even if the teen gets the hang of it in a shorter time period than the experienced driver did when he/she was first driving. Who cares who learn what first or faster, its all about experience and having to deal with it for extended time period!
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Feb 28th, 2006, 7:46 PM   #3
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 748
Rep Power: 3 Jimbo is on a distinguished road
There is a small factor (IMHO) relating your natural thought processes to developing algorithms, but experience is probably the main factor.
Jimbo is offline   Reply With Quote
Old Feb 28th, 2006, 9:20 PM   #4
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Anyone else have anything to add?
Eric the Red is offline   Reply With Quote
Old Feb 28th, 2006, 10:05 PM   #5
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 707
Rep Power: 4 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
Exerience usually seams to increase speed. For example, as a young adult (old teen), I wash dishes. When I started I was slow. I've been there for a while now, and I'm in charge of the new people, and from who I've worked with throughout the entire restraunt, whether it be a cook, a dishwasher, a bus boy, etc, the longer they've worked, the faster they are at it.
thechristelegacy is offline   Reply With Quote
Old Feb 28th, 2006, 10:38 PM   #6
Navid
Hobbyist Programmer
 
Navid's Avatar
 
Join Date: Feb 2005
Location: Canada
Posts: 187
Rep Power: 4 Navid is on a distinguished road
Send a message via MSN to Navid
Well how do you come up with your algorithms? The way I solve algorithms is broken down into steps:

1. I ask myself in pure English: "What is it that I want my program to do exactly?"

2. I get a sheet of paper and a pencil and figure out how I'm going to do that (it comes along with experience).

3. Translate it to the computer.

This might not look helpful to some people, but you'd be surprise how many people sit there trying to code something when they don't even know what they want themselves.
Navid is offline   Reply With Quote
Old Mar 1st, 2006, 1:45 AM   #7
bivhitscar
Hobbyist Programmer
 
bivhitscar's Avatar
 
Join Date: Oct 2005
Location: Melbourne, Australia
Posts: 126
Rep Power: 3 bivhitscar is on a distinguished road
Quote:
Originally Posted by Navid
2. I get a sheet of paper and a pencil and figure out how I'm going to do that (it comes along with experience).

Hell yeh, I can't even think about a complex problem unless I write it out old school. You end up going round in circles and hitting dead ends otherwise.
__________________
it's ironic considerate rarity patron of love higher knowledge engulfs me...
bivhitscar is offline   Reply With Quote
Old Mar 1st, 2006, 2:53 AM   #8
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
Quote:
Originally Posted by Eric the Red
Do u think that with practice creating algorithms i'll be more efficient creating them, example: faster creation time/ less debug time? or do u think that there's a certain point where talent far outweights experience?
I think talent certainly gives you a head start, but experience becomes increasinly relevant as time progresses. Programming is the art of dividing a problem into (preferably reusable) smaller pieces. It takes practise and experience to know the best way to achieve that. A certain level of intuition helps, but I believe there's nothing in the field of programming that is innately unlearnable, so intuition can be substituted with continued practise.
Arevos is offline   Reply With Quote
Old Mar 1st, 2006, 6:22 AM   #9
.TD
Programmer
 
.TD's Avatar
 
Join Date: Feb 2006
Location: UK
Posts: 36
Rep Power: 0 .TD is on a distinguished road
Making sure the problem is well defined in your head as well as where else it maybe defined (and that these definitions match) is vital, without knowing exactly what you are trying to solve then you probably won't get a solution to it!
__________________
Go away before I replace you with a very small shell script.
--
Get FireFox!
.TD is offline   Reply With Quote
Old Mar 1st, 2006, 8:22 PM   #10
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Here's the algorithm that took me an hour. Which probably takes you guys like 30 mins. Look at the output if you want.

// The "CompContest1" class.
import java.awt.*;
import hsa.Console;

public class CompContest1
{
    static Console c;           // The output console

    public static void main (String [] args)
    {
        c = new Console ();
        int strlength, x, spacecounterinc, spacecounterdec, spacecounter;
        int countchar = 0, looplength;
        int answer = 1 ;
        //c.println ("Would you like to start the word app (type '1' for yes '0' for no");
        //answer = c.readInt();
        answer = 1;
        while (answer != 0)
        {
            c.println ("Please enter a word enter '0' to quit");


            countchar = 0;
            String str1 = new String ();
            str1 = c.readString (); // user input
            strlength = str1.length ();
            //c.print (strlength);
            // set a var to hold the length of the vertical amount of lines required
            looplength = (strlength * 2);
            //
            spacecounter = strlength;


            for (int i = 0 ; i <= strlength - 1 ; i++)
            {
                spacecounterdec = strlength; //
                while (spacecounterdec >= 1)
                {

                    spacecounterdec = spacecounterdec - 1;
                    if (spacecounterdec != countchar)
                    {
                        c.print (" "); // testing for space
                    }
                    else
                    {
                        c.print (str1.charAt (countchar));

                    }
                }

                spacecounterinc = 0; // the spacecounterinc++ defaults to 1 fortunately
                while (spacecounterinc <= (strlength - 2))
                {

                    spacecounterinc++; // assigns to length of string must be 1 due to the fact the dec loop used the print location already
                    if (spacecounterinc != countchar)
                    {
                        c.print (" "); // testing for space
                    }
                    //else if (spacecounter == strlength)
                    else
                    {
                        //c.print ("countchar = " + countchar);
                        c.print (str1.charAt (countchar));
                        //countchar++;
                    }
                }
                if (countchar != strlength - 1)
                {
                    countchar++; // next char after for loop is done
                }

                c.println (" ");
            }


            spacecounter = strlength;
            countchar = strlength;

            //looplength = (strlength * 2);
            //
            spacecounter = 0;
            countchar = (strlength - 2); //the last character in strlength

            for (int i = 0 ; i <= strlength - 2 ; i++)
                //for (int i = strlength ; i >= 0 ; i = i - 1) don't use 4 sure
                {
                    spacecounterdec = strlength; // the spacecounterinc++ defaults to 1 fortunately
                    while (spacecounterdec >= 1)
                    {

                        spacecounterdec = spacecounterdec - 1; // assigns to length of string must be 1 due to the fact the dec loop used the print location already
                        if (spacecounterdec != countchar)
                        {
                            c.print (" "); // testing for space
                        }
                        else
                        {
                            //c.print ("countchar = " + countchar);
                            c.print (str1.charAt (countchar));


                        }
                    }

                    spacecounterinc = 0; //
                    //c.print ("part4");
                    while (spacecounterinc <= (strlength - 2))
                    {

                        spacecounterinc = spacecounterinc + 1;
                        if (spacecounterinc != countchar)
                        {
                            c.print (" "); // testing for space
                            //c.print (" Spacecounterinc " + spacecounterinc + " cchar" + countchar + ": ");
                        }
                        //else if (spacecounter == strlength)
                        else
                        {
                            c.print (str1.charAt (countchar));
                            //c.print ( " cchar in else" + countchar + " Spacecounterinc " + spacecounterinc);
                        }
                    }
                    if (countchar != 0)
                    {
                        countchar = countchar - 1; // next char after for loop is done

                    }

                    c.println (" ");




                    //countchar = countchar + 1; // back to default
                    /////////// remove /////////
                    //spacecounter = 0; // including

                    //for (int i = 0 ; i <= strlength - 2 ; i++)
                    //{
                    //countchar = (strlength - 2);



                }
            c.println (" ");
        }
    }
}
Eric the Red is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:14 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC