![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#2 |
|
Sexy Programmer
|
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! |
|
|
|
|
|
#3 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 748
Rep Power: 3
![]() |
There is a small factor (IMHO) relating your natural thought processes to developing algorithms, but experience is probably the main factor.
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
Anyone else have anything to add?
|
|
|
|
|
|
#5 |
|
Expert Programmer
|
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.
|
|
|
|
|
|
#6 |
|
Hobbyist Programmer
|
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. |
|
|
|
|
|
#7 | |
|
Hobbyist Programmer
Join Date: Oct 2005
Location: Melbourne, Australia
Posts: 126
Rep Power: 3
![]() |
Quote:
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... |
|
|
|
|
|
|
#8 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#9 |
|
Programmer
Join Date: Feb 2006
Location: UK
Posts: 36
Rep Power: 0
![]() |
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!
|
|
|
|
|
|
#10 |
|
Hobbyist Programmer
Join Date: Feb 2006
Posts: 214
Rep Power: 0
![]() |
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 (" ");
}
}
} |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|