Programming Languages

Discussion in 'Programming & Software Development' started by Infest, Sep 3, 2004.

  1. titan

    titan Member

    Joined:
    Dec 28, 2001
    Messages:
    2,887
    Location:
    Leichhardt, Sydney
    Cheers. You could also replace "University" with "Employer" :)
     
  2. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    Spaces are better because tabs seem to get screwed up when moving stuff around and opening in different editors or printing. Hence why you should use spaces over tabs.
     
  3. SouthernMunk

    SouthernMunk Member

    Joined:
    Dec 27, 2002
    Messages:
    669
    LOL, I can't believe I asked that question!

    I've always had very readable code in terms of layout (I'm getting better with commenting also). I still can't believe I asked that question. I know I'm a n00b, but I'll blame it on lack of sleep! ;);)
     
  4. OP
    OP
    Infest

    Infest Member

    Joined:
    Aug 26, 2004
    Messages:
    4,692
    Location:
    Northside, Brisbane
    Always blame it on the sleep ;)

    --Infest
     
  5. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    This is something they really hammer you on at uni. But from my experience no one does it at my work. Its a pain in the arse too because there will just be a version code and a comment to say where it started and where it ended. Nothing that actually says what was done and why. If you want to know you have to dig out the specifications if you can find them and still that doesn't tell you what that particular piece of code does but more what the whole mod is supposed to do.
     
  6. 76864984

    76864984 New Member

    Joined:
    Mar 4, 2002
    Messages:
    118
    Location:
    Perth
    Learning Java and Haskell

    Im doing computer sci in melb uni year1.
    We learnt some basics in C. and currently learning haskell, a functional language, which i dont like pretty much...
    I also do some Java in spare time...
     
  7. SouthernMunk

    SouthernMunk Member

    Joined:
    Dec 27, 2002
    Messages:
    669
    Yeah, I used to comment every line of code when I was first starting, but it just took too much of a toll on productivity. I'm trying to get into the habit of only commenting the main points for each function prototype (e.g. parameters, return value, and a basic description), and the difficult to understand sections of the actual function definitions.

    Still, it's area which I need to improve upon.
     
  8. mark|

    mark| Member

    Joined:
    Jun 27, 2001
    Messages:
    1,701
    As long as you use reasonable names for variables/methods/classes etc, most code is self documenting. Someone else should be able to read it as if it were a book. A few lines before each method is generally good (what it does any why it does it), and commenting the 'tricky' stuff is also solid practice. Over commenting annoys the hell out of me.

    Could be better:
    Code:
    a = 3;    // set acceleration to the maximum value of 3
    
    Better:
    Code:
    acceleration = 3;   // maximum acceleration
    
    Even better:
    Code:
    acceleration = MAXIMUM_ACCELERATION;
    
    So simple when you think about it. Of course, some people won't agree with it at all. One thing I'll add is that you should never view documentation (specifically, comments in code) as a chore or loss of productivity. When it's been more than a few months since the last time you've viewed the source and you have a client wanting a change within an hour, you'll understand why you put the effort in the first place.
     
  9. OP
    OP
    Infest

    Infest Member

    Joined:
    Aug 26, 2004
    Messages:
    4,692
    Location:
    Northside, Brisbane
    yO Guys...

    What is C# ???

    --Infest

    Is it related to C++???
     
  10. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    C# is 'C Sharp'.

    I havn't used it but from what I can tell its another extension of C (like c++) but is more like VB sort of code.

    EDIT: I was wrong. Read the post below.
     
    Last edited: Sep 14, 2004
  11. xsive

    xsive Member

    Joined:
    Jun 29, 2001
    Messages:
    4,343
    C# is basically Microsoft Java.
    It's like Managed C++ but nicer to use.
     
  12. OP
    OP
    Infest

    Infest Member

    Joined:
    Aug 26, 2004
    Messages:
    4,692
    Location:
    Northside, Brisbane
    Is it harder to use???
    What can I use when I've learnt it???

    --Infest
     
  13. BAC :S

    BAC :S Member

    Joined:
    Dec 26, 2001
    Messages:
    1,385
    Location:
    Melbourne
    Weird, I'm 1st year Computer Science at Melbourne and we got told to use tabs instead of spaces for indentation and our lecturer is a commercial programmer?

    Just use good ol VIM anyway, you can set the tab size to 3 spaces anyway :)
     
  14. OP
    OP
    Infest

    Infest Member

    Joined:
    Aug 26, 2004
    Messages:
    4,692
    Location:
    Northside, Brisbane
    C# is it harder than C++???
    What can I use C# for???
    Is C# worth learning???
    Is C# a morethan 1 year commiment to learn fully???

    --Infest
     
  15. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    Yeah I just set the tab to 3 spaces in the program i am using normally.

    Cept at work it is a shit dev environment so its all spaces. The tab key doesnt even work.

    Infest what was your question? reword it
     
  16. OP
    OP
    Infest

    Infest Member

    Joined:
    Aug 26, 2004
    Messages:
    4,692
    Location:
    Northside, Brisbane
    C# is it harder than C++
    What can I use C# for as in making programs etc...
    Is C# worh learning (can i use it in my future)
    Is C# a more than 1 year commitment to learn fully (Does it take over a year to learn)

    --Infest
     
  17. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane

    I think C# is easier to learn.
    C# is used in alot of Microsoft products from what I have seen.
    Its worth learning.
    I dont know how you think to how long it would take you to learn.

    Basically dude. If your asking these questions because you want to learn a programming language I'd say get some books and learn JAVA. Its a good base and there is alot of free guides and tutorials out there to help.

    Once you have one language learnt you will know about the underlying programming. Basically all languages are similar just you have different rules and syntax. Once you learn 1 language you will pick up other languages much quicker. It took me 3 subjects to pick up java at uni. It took 6 weeks for me to be able to program in C after learning java. Ditto for C++.

    While your learning just stick to console applications. GUI's just waste time when your learning.

    If you really want I can send you my uni lecture notes from my first year java subjects. You can go through them at your own pace and do the tutorials and stuff. Let me know if your interested.

    I also have C++ lecture notes as well and I think I still ahve a copy of the online text book.

    I have the C notes as well but they would probally be over your head as they taught that subject very quick because they knew we had an understanding already so there was no hand holding.

    But yeah if you want my Java subject powerpoint slides and other stuff pm me and I will try and dig them up for you.
     
  18. OP
    OP
    Infest

    Infest Member

    Joined:
    Aug 26, 2004
    Messages:
    4,692
    Location:
    Northside, Brisbane
    Dude if you could send me the C++ and JAVA notes that would be great!

    At the moment I'm learning C++ but it would be good to learn 2 languages at a time.

    If you need my email address I'll send it through a PM.

    Thx Heaps.

    --Infest
     
  19. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    I will upload the notes I have to my webspace when I get home for you. I will put up the tutes for you as well and if I have the solutions so you can test yourself.

    I'm sure if you have any problems people on here would be willing to help because you seem to be willing to put in the effort. If you do get stuck though. Especially with JAVA search google because there is alot of help for java online.
     
  20. OP
    OP
    Infest

    Infest Member

    Joined:
    Aug 26, 2004
    Messages:
    4,692
    Location:
    Northside, Brisbane
    Thx a Bunch I'll be looking forward to the email :)

    --Infest
     

Share This Page

Advertisement: