LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Programming suggestion (https://www.linuxquestions.org/questions/programming-9/programming-suggestion-559756/)

DirkDiggler 06-06-2007 08:46 PM

Programming suggestion
 
Hey Gang,

I wanted suggestions from the programmers here. I've made the decision to go to my community college for an A.S. in programming. I am in an ongoing learning process with Linux, I am by no means an expert. Other than continuing to learn Linux, is there anything you guys would suggest I do to prepare myself? Read a particular bookn, certain exercises? I know there will be study groups, and there can be hand-holding with teachers if I have any problems. I'm pretty bright, so hopefully there won't any be any major problems. There will be problems I'm sure though. So if you guys have any suggestions, constructive criticisms or 'eye-openers', I'm open to them.

Thanks,

Brandon

trickykid 06-06-2007 09:03 PM

Moved: More suitable in our Programming forum.

DirkDiggler 06-06-2007 09:16 PM

Whoops. I didn't see the programming forum. Thanks Tricky.

Brandon

The_Nerd 06-07-2007 12:09 AM

Do you already know how to program? If not, I suggest you do a google search for C/C++ tutorials, and use GCC to try them out. Also, you may consider trying to make some programs for windows (since you will most CERTAINLY be learning that in collage), try using the Borland, Bloodshed, or free MSVC++ compiler.

Read up and understand pointers!!! I've known alot of people who simply can't understand pointers, so they never use them (and they always find very creative ways of coding without them). YOU MUST LEARN TO USE POINTERS TO BE ANY KIND OF PROGRAMMER!!!

General hardware workings are a plus. Sometimes, though not always, knowing HOW your computer works may help you avoid a nasty bug in your program.

All the rest is mostly expirience, so if you want to goto collage and blow off your teacher's socks, then start learning to program (it isn't hard)!

DirkDiggler 06-07-2007 09:00 AM

Nerd,

Currently I don't know the first thing about programming. I know what I've heard: it can be tedious and it's very logical. The logical part bodes well for me. Tedious not so much, but it's also my understading that you can make ways to streamline specific parts (commonly used commands?). I do have a pretty good idea of what each piece of hardware does, how it works and so on. Believe it or not, I believe the college I'm going to uses Unix for programming. So, I imagine Windows won't be the only OS we program for. Thanks for the advice Nerd.

Regards,

Brandon

theNbomr 06-08-2007 09:48 AM

If you believe that programming will be tedious, why would you want to make it your life's work? Or did tediousness lose its pejorative nature while I wasn't looking. Just curious.

--- rod.

IsaacKuo 06-08-2007 10:37 AM

Quote:

Originally Posted by The_Nerd
Read up and understand pointers!!! I've known alot of people who simply can't understand pointers, so they never use them (and they always find very creative ways of coding without them). YOU MUST LEARN TO USE POINTERS TO BE ANY KIND OF PROGRAMMER!!!

Try telling that to a Java fanatic. ;)

DirkDiggler 06-08-2007 12:14 PM

I meant tedious in the nicest way possible. It's my understanding that some parts are tedious, but it's something I have NO experience with. My outlook could change once I start doing it. Making the computer doing what you want by telling it to do what you want (not what someone else has created) has always made me curious. It is truly something I believe I want to do. However, plans change and so do people. As it stands, it's something I want to do.

Regards,

Brandon

1slipperyfish 06-18-2007 02:55 PM

Quote:

Originally Posted by IsaacKuo
Try telling that to a Java fanatic. ;)

i totally agree with that one i think that's why i started javaring:D
it's bad enough using refernces in perl :mad:
paul

taylor_venable 06-18-2007 03:46 PM

Quote:

Originally Posted by IsaacKuo
Try telling that to a Java fanatic. ;)

At the risk of going OT, you cannot program effectively even in Java without understanding at least a little bit about how pointers work. Java still has pointers (or "references") even though you can't see it. Try this code:
Code:

import java.util.Vector;

public class Test {
    public static void main(String[] args) {
        Vector<String> x = new Vector<String>();
        x.add("foo");

        Vector<String> y = x;
        y.add("bar");

        Vector<String> z = new Vector<String>(x);
        z.add("lolcats");

        System.out.println("x = " + x);
        System.out.println("y = " + y);
        System.out.println("z = " + z);
    }
}

Which produces this output:
Code:

x = [foo, bar]
y = [foo, bar]
z = [foo, bar, lolcats]

Because x and y are references to Vector<String> objects, assigning x to y actually assigns the reference to y, not the actual object. The result is that x and y both refer to the same object, so when you appear to add an element to y, the change is reflected in x as well (since they're the same thing). On the other hand, using the right constructor when creating a Vector object copies the elements inside the source Vector (which may or may not themselves just be references -- hence the difference between a shallow and a deep copy -- according to the documentation this "copy constructor" uses an iterator on the supplied collection, which results in a shallow copy), so adding an extra element doesn't change the original.

See how important pointers ("references") are in Java? :) But there are some languages that forbid aliasing like this.

bigearsbilly 06-19-2007 03:52 AM

programming is not tedious.
it's like mental meccano or lego.

you can create complex machines without getting too greasy
;)

chrism01 06-19-2007 05:27 AM

It's been shown that the best programmers use both sides of their brains: artistic/analytical to design code, scientific/logical to do the actual coding.
The 'tedious' part is simply attention to detail/patience, without which you'll have major issues eg debugging in particular.
As an example, error msgs do usually 'tell you' what's wrong, it's just that they do it from the SW tool's point of view, not yours... sometimes it's more like a hint. ;)
As mentioned, ptrs/references are worth knowing, although I'd start with the basics first.

bigearsbilly 06-19-2007 05:45 AM

the only tedious part is the team meetings you have to attend.

chrism01 06-20-2007 07:00 AM

There is always that of course ;)
Unless you're absolutely sure, never commit to something in a mtg, always say you'll look into it.

bigearsbilly 06-20-2007 08:17 AM

and when you are half asleep doodling on your pad and someone asks you a question
say:
"er, sorry I don't quite get what you mean there"
hopefully they'll repeat it ;)


All times are GMT -5. The time now is 03:18 AM.