Thread: Second year paper.

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    6

    Lightbulb Second year paper.

    Greetings,

    I'm currently studying a computer science degree here in the UK and for one of my assignments I'm to write a paper about something that interests me with regard to computing. I'm looking at the importance of language - not that I'm wanting to get into language wars or anything - but particularly the psychology of language: why do people think that the syntax is more important than the underlying programming principles and logic?

    If anyone has any opinions about this then please feel free to contact me, you may do so anonymously if you like.

    Also, here's a simple 'Hello World' program in Java:

    Code:
    public class Hello
    {
    	public static void main (String [] args)
    	{
    	char [] letters={ 'H','e','l','l','o',32,'W','o','r','l','d','!','0' };
                    // Zero used as terminator
    	String s$="";
    	int eye=0;
    	while (letters[eye]!='0')
    		{
    		s$=s$+letters[eye];
    		eye=eye+1;
    		}
    		System.out.println(s$);
    	}
    }
    Surely this would be easy to convert to C/C++? Apparently, some people don't think so.

    Regards,

    Shaun.
    Last edited by Shaun_B; 03-29-2011 at 05:48 AM.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    >>Surely this would be easy to convert to C/C++? Apparently, some people don't think so.

    Anyone with any knowledge of C++ can convert that. I'm not going to though, just in case this is an elaborate trick to get some simple homework done for free. Not saying that's the case, but its amazing what things that some lazy, pathetic, bottom-feeding students do to get things done without effort. Good luck with the paper though...

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    6
    Don't worry Fordy, no trickery here - and in any case, why not just:

    Code:
    System.out.println ("Hello World!");
    anyway? I'd be worried if I was on the second year of a degree programme and my homework was so simple :-)

    Some background to this. I met with some third year students whom were studying software development, and seemed worried about not covering any C++ because "that's what the industry wants" apparently. What have they been doing for the last three years if they're unable to transfer their skills and knowledge from Java to C, C++ or any other problem-orientated language? It made me wonder, which is why I decided to write a paper about it.

    Regards,

    Shaun.

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    In that case dont bother asking on boards - you will more likely get a bias position depending on what board you ask on. And as this is a C++ board and everyone knows that Java a weak-arsed knock-off for people that cant control resources then you might not get the answers that would help from here.

    A good place to start is here - Comparison of Java and C++ - Wikipedia, the free encyclopedia

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    6
    Quote Originally Posted by Fordy View Post
    In that case dont bother asking on boards - you will more likely get a bias position depending on what board you ask on. And as this is a C++ board and everyone knows that Java a weak-arsed knock-off for people that cant control resources then you might not get the answers that would help from here.

    A good place to start is here - Comparison of Java and C++ - Wikipedia, the free encyclopedia
    But that's exactly the sort of answer that I want to hear to be honest. The paper is based on the psychology of programming languages, I'm not interested in the languages themselves as such. Don't worry, your opinion of Java being for dumb people will be entered into my paper anonymously :-)

    Regards,

    Shaun.

  6. #6
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    The syntax of the language, in my view, plays a minimal role in user preferences. The syntax is conditioned by the language semantics and rules, where the real decision whether one "likes" or "doesn't like" a language eventually takes place. And this process is largely unconscious.

    I'm discarding here any user who simply decides to not like a programming language at first sight, or users whose decision is founded only after intensive use and study. I'm talking about the generality of programmers; the majority that eventually dabbles in another programming language and decides whether they like it or not. Those other two groups don't particularly interest me. The first group is populated by the ignorant and may serve other type of studies, probably not this one. While the second group is small enough and their opinions specialized enough for their opinion to matter little. Although it is exactly this group and their opinions, that after being properly misinterpreted, eventually influence the decisions of others.

    Anyways, the decision whether someone likes a language or not shouldn't ever give rise to a debate on whether that language is better than some other. And this is where the problem lies. Not that people prefer a certain language, but that people insistingly connect their liking of things to those things being better than other things. (Particularly, on the field of technology, this has a tremendous negative impact on innovation, in my opinion. But that would be another debate). This happens, in my opinion, because of a natural tendency to justify our likings to ourselves; to give them some kind of validity that can be measured somehow.

    The liking or not liking of a programming language is at the very best no more than a freudian process. It's what makes us tick. There's nothing particularly special about it that can't be answered the same way if we ask someone what color they like more. What's perhaps more interesting is to try and understand why, at the face of so much evidence that about all programming languages have their specific domain where they excel as tools, and that most languages generally perform their duty on most other domains, perfectly sane, intelligent, technology-able programmers insist on connecting their preferences with such terms as "this is better than that", "that is a toy language", "that is a useless language", "this is the best language".
    Last edited by Mario F.; 03-29-2011 at 07:25 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #7
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Shaun_B View Post
    not that I'm wanting to get into language wars or anything - but particularly the psychology of language: why do people think that the syntax is more important than the underlying programming principles and logic?
    Maybe you should read Mario's post above and carefully decide if you really think this is something that merits a university paper. Consider that you will find ZERO serious sources on this topic, and most likely no sources at all beyond absurd discussion board threads.

    Also, I cannot see how you would approach this in a way that is not completely arbitrary and subjective, or how you are going to make it seem in any way relevant.


    Surely this would be easy to convert to C/C++?
    Surely it would be.

    Apparently, some people don't think so.
    I suppose that depends on what you mean by "convert". If you mean it has to accomplish the same task, it would be ridiculous to say it could not. If you mean it has to create a method for a Java class, obviously you cannot do that in any language except Java. In between those two answers you will find a range of answers that are begged by how exactly you ask the question.

    Begging the question - Wikipedia, the free encyclopedia

    "Why do people think that the syntax is more important than the underlying programming principles and logic?" is almost certainly a question that begs. I think you have some kind of point you are trying to prove -- eg, that people choose what language to use because they like the syntax. Hard to prove or disprove, and in any case it does not really make any sense to oppose this to the concept of "underlying programming principles and logic" unless what you are really trying to say is:

    "Some people obviously prefer syntax to logic. Why?"

    Hard to see how you are going to answer that without just saying "because they are wrong-headed and don't know any better", which means you are not asking a question at all, you're involved in marketing style rhetoric ("Why would someone drive a car that is not a Ford?"). Maybe an okay commercial, but as a term paper I would say you would be lucky to find a passing grade in this.

    Quote Originally Posted by Shaun_B View Post
    The paper is based on the psychology of programming languages, I'm not interested in the languages themselves as such.
    Have you discussed it with your professor?

    You have a very bad idea. Please don't do this. It is so close to meaningless the only thing you can do with it is just ramble on for a few pages making up opinions. I seem to recall that writing papers in uni is suppose to demonstrate certain skills...
    Last edited by MK27; 03-29-2011 at 07:46 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Fordy View Post
    >>Surely this would be easy to convert to C/C++? Apparently, some people don't think so.

    Anyone with any knowledge of C++ can convert that. I'm not going to though, just in case this is an elaborate trick to get some simple homework done for free. Not saying that's the case, but its amazing what things that some lazy, pathetic, bottom-feeding students do to get things done without effort. Good luck with the paper though...
    LOL... Translation: It's amazing how much work people will do to avoid working.

  9. #9
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by MK27 View Post
    [...]
    Been a while, MK. Where have you been man? Hope all is well.

    Not that I have any reason to miss you, you jerk. But I did
    Last edited by Mario F.; 03-29-2011 at 08:03 AM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #10
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Mario F. View Post
    Been a while, MK. Where have you been man?
    Hiding, and preparing my revenge

    Not that I have any reason to miss you, you jerk. But I did
    I really like this place too for some crazy reason xP
    Last edited by MK27; 03-29-2011 at 08:15 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  11. #11
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Well, it's good to see you.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #12
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    Well, I'd have to disagree with pretty much everything Mario says for the same logic he presents as his base.

    *shrug*

    Seriously though, discounting the same groups he has, I'd say the decision comes more from the facilities the language and standard library provides than from the syntax.

    I can easily see the unaffiliated programmer going for C# over C++ when the need is largely GUI related or Haskel over C when the need is for crazy list processing.

    And I'm using those examples because I think the syntax for all of them suck.

    Soma

  13. #13
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Shaun_B View Post
    But that's exactly the sort of answer that I want to hear to be honest. The paper is based on the psychology of programming languages, I'm not interested in the languages themselves as such. Don't worry, your opinion of Java being for dumb people will be entered into my paper anonymously :-)

    Regards,

    Shaun.
    I've been language shopping quite a bit of late and I do not base my opinions of various languages on syntax .. that's a learning challenge, not an obstacle.

    Having worked in C for about 6 years at this point there are 3 things that will make me jump ship in a heartbeat...
    1) Native strings ... not C++'s disastrous strings class... REAL native strings.
    2) Access to the "low level" libraries in Win-API.
    3) Documentation that doesn't end up complicating the learning curve.

    In other words, I look at what it can do, what I can do with it and how hard it's going to be to make the transition...

    That said, I have rejected a couple of languages because of silly syntax ...
    Although it's a bit dated there are a whole mess of syntax examples here...
    Examples of programs in different programming languages

  14. #14
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Shaun_B View Post
    Don't worry Fordy, no trickery here - and in any case, why not just:

    Code:
    System.out.println ("Hello World!");
    That line can be written in C with:
    Code:
    fprintf((FILE*)((void*)"out"),"Hello World!"); // Print a greeting to the system output constant
    You'll have to of course, include the appropriate header, that is:
    Code:
    #include <stdio.h>

  15. #15
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_O

    Yikes. That is some kind of ugly.

    Which platforms does that work on?

    Soma

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 02:20 PM
  2. Issues and questions about queues
    By Nazgulled in forum C Programming
    Replies: 36
    Last Post: 12-13-2007, 02:03 PM
  3. Calendar Problem
    By wordup in forum C Programming
    Replies: 7
    Last Post: 10-29-2002, 03:36 PM
  4. error with code
    By duffy in forum C Programming
    Replies: 8
    Last Post: 10-22-2002, 09:45 PM
  5. cant get code to work
    By duffy in forum C Programming
    Replies: 13
    Last Post: 10-20-2002, 05:23 AM