PDA

View Full Version : FAQ: Holy Wars of Programming


LaRoza
April 14th, 2008, 02:45 PM
This thread will hold the Holy Wars discussions for reference (instead of having them in the sticky individually)

If you see a topic here, there is no reason to post it again, and there is little reason to do more than read the current thread, but you can post in them if you feel compelled to. Any threads made on the subjects will likely be moved to Recurring Discussions

If the subject comes up in a thread, just say to see the Holy Wars link in the Programming Talk FAQ.

I welcome assistance in finding the threads to link to

Why to Love/Hate C++ (http://ubuntuforums.org/showthread.php?t=765733)
Why to Love/Hat C# (http://ubuntuforums.org/showthread.php?p=5639228)
Why to Love/Hate Java
Why to Love/Hate Perl (http://ubuntuforums.org/showthread.php?t=577596)
Why to Love/Hate PHP
Why to Love/Hate Python (http://ubuntuforums.org/showthread.php?t=576690)
Why to Love/Hate Ruby
Why to Love/hate shell scripting (http://ubuntuforums.org/showthread.php?t=910779)
Vim v Emacs (and all editors) (http://ubuntuforums.org/showthread.php?t=23169) Vim is the best
GUI Toolkits for Linux (http://ubuntuforums.org/showthread.php?t=772507) Use what you want!
IDE/Editors in Linux/Ubuntu (http://ubuntuforums.org/showthread.php?t=752224) : Use what you want!
WYSIWYG Editors for Linux (http://ubuntuforums.org/showthread.php?t=787071)

Martin Witte
April 14th, 2008, 04:16 PM
here's a vi vs emacs (http://ubuntuforums.org/showthread.php?t=23169) thread

LaRoza
April 14th, 2008, 04:30 PM
here's a vi vs emacs (http://ubuntuforums.org/showthread.php?t=23169) thread

Thanks.

I was thinking of just putting a link to this site (http://www.vim.org/), as that is all one really needs to know about Vim v Emacs, but I wouldn't want to cause any trouble with the Church of Emacs.

nick_h
April 14th, 2008, 04:38 PM
This thread has reminded me of a couple of xkcd comics:

Real Programmers (http://xkcd.com/378/)
Python (http://xkcd.com/353/)

slavik
April 14th, 2008, 04:58 PM
an interesting read

http://www.pbm.com/~lindahl/real.programmers.html

Can+~
April 25th, 2008, 01:12 AM
I found a page with graphs about certain memory/cpu usage on different algorithms

http://shootout.alioth.debian.org/gp4/index.php

RIchard James13
April 25th, 2008, 02:15 AM
I have 2 questions

When I grew up and learnt programming I never fell for any sort of programming X is better than programming Y. As I am studying programming and looking for a job as a programmer I still don't understand it. So why do some people think programming X is better than programming Y?

Sometimes I feel that the people saying these things are not actually the same ones that are working with the product they are promoting. I tend to get the feeling that they are in it just for the fight. Or am I so blinded by my neutrality that I don't understand why people say programming X is better than programming Y?

lnostdal
April 25th, 2008, 02:58 AM
check this out, richard: http://www.paulgraham.com/icad.html

anyway, of the languages you know (somewhat, or reasonably well) .. are they "different enough" or just all languages within the same family?

if you've only been learning, or considering, languages that largely overlap or intersect..
http://upload.wikimedia.org/wikipedia/commons/5/56/Venn-diagram-AB.png

..you will never understand differences between languages, because, well -- you have never seen much of such differences yet

edit:
i forgot your second question ..

to be honest it doesn't matter all that much to me what others think or do .. it has no consequences for me; no hazards or benefits

.. so i guess i'm just in it for the fight .. and in a way i am just fighting myself, or maybe what seems to be previous versions of myself(#1)..

but i do use and work with the things i believe in or "promote" .. i don't see myself doing otherwise


#1: does this make any sense at all? .. ok, i can only say i understand things i myself have thought about before .. and when i'm discussing with others i'm trying to think back at what thoughts _i_ had "back then" when i thought the same way the person i'm currently discussing with seems to be thinking

samjh
April 25th, 2008, 03:47 AM
I have 2 questions

When I grew up and learnt programming I never fell for any sort of programming X is better than programming Y. As I am studying programming and looking for a job as a programmer I still don't understand it. So why do some people think programming X is better than programming Y?

Sometimes I feel that the people saying these things are not actually the same ones that are working with the product they are promoting. I tend to get the feeling that they are in it just for the fight. Or am I so blinded by my neutrality that I don't understand why people say programming X is better than programming Y?

It's human nature to be subjective and to argue in favour of the things they "like".

Part of the issue is scope. A lot of programmers only have substantial experience in fairly narrow fields: web applications, databases, games, etc. A person will judge things according to the context provided by his/her past experience.

If someone has no experience, such as a fresh graduate from university, then "first impressions" has a big influence. If they stumbled on a professor who taught C, but taught it really badly, then they'll likely come to abhor it. If they stumbled on a professor who taught Ruby really well, then they'll probably like it. If the student liked to make computer games, then he/she will probably like C or C++. If they spent time coding web pages, then they might prefer PHP.

Different people have affinity toward different modes of abstraction, logic, and problem-solving. Because programming languages offer different methods to solve software problems, some languages are easily picked up and well-liked by some programmers, while other languages will be hated.

If you asked a system administrator with 20 years experience about what his/her favourite programming language is, they'll probably pick from Perl, Shell, Python, AWK, etc. On the other hand, ask an electronics engineer the same question, and you'll probably end up with Assembly, C, C++, etc. Ask a web developer, and the likely answer will be something along Java, Perl, PHP, Python, Ruby, etc. Ask a university computer science professor, and you might end up with Haskell, Lisp, Pascal, Prolog, and so on...

For me personally, the question of Programming Language X vs Programm Language Y has no significance unless context is provided. If I'm writing DSP firmware, I'd go with C; if you want a utility script for your Linux desktop, I'd go with Python; heart-monitoring software? Ada; a personal web page? HTML with maybe Java applets (I'm experienced in all those languages). I don't like shooting flies with a shotgun, neither do I like using the wrong programming language for the wrong type of project.

CptPicard
April 25th, 2008, 05:28 AM
For me personally, the question of Programming Language X vs Programm Language Y has no significance unless context is provided.

While the "argument from pragmatism" -- "right tool for the job" -- certainly carries weight, personally I have become to believe that in general, some features in languages are just simply sort of "transcendental"... you can't have them in something like statically typed, compiled languages like C unless you essentially code the other language into your application. So yeah, anything can be coded in anything else, but some constructs just simply require a runtime environment you'd have to pretty much provide if you didn't have it. In particular the ability to conveniently formulate second-order functions and the use of closures are just very, very strong.

In particular the C crowd tends to see this the other way around... C is greater than anything else because it can (and on typical hardware, must) be used to provide these environments. Thus, the dumb arbuments for the computational power and growth-of-character benefits of handling raw pointers. They fail to understand that in the olden days there were Lisp machines that didn't run C, but actually ran Lisp on the hardware. Programming is the art of putting syntactical constructs with defined semantics together so that you solve a problem. The machine can be anything -- in the end, it's just the language definition you work with.

The usage of various different programming languages and paradigms serves a deeper purpose than pragmatism... it really alters the way you think about your problems, and the better you're able to analyze and deconstruct and understand the problem, the better programmer you are. It's all problem-driven really. And because of course ultimately all programming languages are equivalent, different languages tend to leave you with different viewpoints, that you can, with varying level of applicability, to transfer to other languages. So you become a better programmer in all languages. If you can't apply what you learned somewhere else, at least you know why... and can maybe figure out a workaround -- essentially taking a different point of view on the problem itself.

That said... all languages are not created equal in the sense that they would all just equally inhabit some niche where they dominate, so that we could just say that there is no argument.. you just pick whatever language suits the task. Some languages do encompass more of the expressiveness space than others do, and there is no way around it. Lisp is probably the most general-purpose language of them all because you really can implement pretty much any other paradigm in it rather naturally -- they just fall out of the language -- instead of C where you must implement every other paradigm, construct and idea by brute force programming...

LaRoza
April 25th, 2008, 06:58 AM
Are we going to have a flamewar about flamewars?

RIchard James13
April 25th, 2008, 07:54 AM
Are we going to have a flamewar about flamewars?

No I was just curious as to why they seem to occur in the first place. When it seems logical to me that a one sided opinion is irrational. For instance the guy who posted that thread "Poll that Python" seemed pretty clueless when I showed him some of my pathetic python code. It makes me curious to see if there are any deeper beliefs out there about programming that I somehow missed.

LaRoza
April 25th, 2008, 08:01 AM
No I was just curious as to why they seem to occur in the first place. When it seems logical to me that a one sided opinion is irrational. For instance the guy who posted that thread "Poll that Python" seemed pretty clueless when I showed him some of my pathetic python code. It makes me curious to see if there are any deeper beliefs out there about programming that I somehow missed.

There are several types of people on this forum:


Those hurt by a particular language, so they will take the time to post negative comments about the language (usually helpful, as it prevents the same mistakes being made by other people)
Those who like to argue
Blub programmers

pmasiar
April 25th, 2008, 08:06 AM
I never fell for any sort of programming X is better than programming Y. As I am studying programming and looking for a job as a programmer I still don't understand it. So why do some people think programming X is better than programming Y?

To understand your question in context of your experience: what languages you know? How big projects (KLOC) you implemented?

When I got my degree, I could write 600 lines PL/1 program which run :-) and wrote Game of Life in under 100 lines of ASM (and implemented Forth for PDP/11). Those were major accomplishments back then (when you could get 3 compile/run cycles in a week - that's why I got to PDPs). Today, on one of my jobs I worked in a group which maintained app with 1M lines of code. Let me tell you that problems you face in such project, fitting language, approach, and result, are quite different. :-)

tseliot
April 25th, 2008, 09:11 AM
The usage of various different programming languages and paradigms serves a deeper purpose than pragmatism... it really alters the way you think about your problems, and the better you're able to analyze and deconstruct and understand the problem, the better programmer you are. It's all problem-driven really. And because of course ultimately all programming languages are equivalent, different languages tend to leave you with different viewpoints, that you can, with varying level of applicability, to transfer to other languages. So you become a better programmer in all languages. If you can't apply what you learned somewhere else, at least you know why... and can maybe figure out a workaround -- essentially taking a different point of view on the problem itself.

That said... all languages are not created equal in the sense that they would all just equally inhabit some niche where they dominate, so that we could just say that there is no argument.. you just pick whatever language suits the task. Some languages do encompass more of the expressiveness space than others do, and there is no way around it.
Amen

RIchard James13
April 25th, 2008, 09:28 AM
To understand your question in context of your experience: what languages you know? How big projects (KLOC) you implemented?


Well I started with MS BASIC V 2.0 on my VIC 20. Then I learnt 6502 Assembly/ML I never did have a assembler. I got a Atari ST and another version of BASIC STOS, probably that was when my first programs broke 1KLOC. I never did grok 68K assembly.

When I went to Uni I was introduced to PC's that ran DOS. Had to program then in C in DOS with no memory protection. Also there I learnt 6809 assembly as well as some Fortran and APL both of which I forgot. I completed three units of Computer Engineering which I now look back on as probably the best thing a programmer could learn if you truly want to understand the system you are programming.

I quit Uni. Wrote larger and larger BASIC programs until I discovered Linux in about 94 - 95. Started writing in C and tried to learn C++ but because I had programmed in Procedural for a long period of time I struggled with the pardigm shift. Also around then I wrote a large program in BASIC for a PSION handheld computer for reading bar codes and storing the information to be fed later into a database.

I started many other programming projects in C/C++ but never finished them due to mental illness. I wrote an automated server controller using PERL with CGI and Apache, that was a custom job. It only did two things, let you delete items from the print queue and turn the PPP Internet connection on and off. That was written maybe in 1997.

Then this century (2002) I tried to find out why I could never complete any software by enrolling in a programming course (Diploma) at a technical college. I did not find out the answer but I did learn a lot about databases. I was taught how to program in VBA and Visual Basic. I also did some more C. Wrote more and more code that I never completed. Never completed my Diploma either.

Wrote some games for the VIC20 and totally stuffed up a project making a Role Playing Game for a MUD.

Eventually I gave up trying to program even though I always wanted to.

Got more and more mentally ill. Until my Wife decided I was going to end up killing myself and talked to my Psychiatrist about it. I got put on a different but similar medication. Then my illness seemed to disappear overnight.

I wanted to get my old job as a computer technician back but I knew I needed a qualification. So I re-enrolled in my former Diploma this time 1/4 was about getting a job and 3/4 was about finding out about the programming. So I have had to learn to do more Database programming, this time in both Java and Visual Basic .Net.

As my mind was freed from my illness I started up project after project of computer programming. Until I realised that I was not spending enough time on each project. So I set up a system where I would program on each project via rotation. Then the stopping happened again. I explored the issue and realised I had over the years built up false ideas about programmers as if they where God like. Because I had low self esteem I could never achieve that. Also I had become very much a perfectionist which was stopping me from actually completing projects. Had a big emotional outpouring and suddenly I could code again.

I have finished all my programming for Diploma ahead of time. I program on a rotational basis going through C++/python/BASIC 2.0 at the moment. With other languages thrown in like 6502 assembly. I think my largest program at the moment is my Space Invaders clone game at about 1.3KLOC in C++ My Accounting program is about 400LOC in Python (GTK&MySQL), I have a C game called ascii attack that is 1.5KLOC. I'm writing a BASIC 2.0 program to solve Survo puzzles that sits at 150LOC. I have a scientific calculator written in Javascript that won't behave at 500LOC.

Given that I have not been able to program due to mental illness. I have seen a lot of code that never got completed. OpenGL games, RTS games, hundreds of lines of 6502 code. Code for languages that have no names. Projects for doing things that seem incredibly stupid now like AI. I tried to write my own OS but failed. Visual programming languages.

lnostdal
April 25th, 2008, 11:56 AM
RIchard James13:
long interesting read .. i must say that the biggest obstacle when doing something non-trivial has always been myself .. i've failed so many times i've lost track of it

i read something that struck me once ... the title seem to indicate that this applies for lisp programmers only, but i believe it is true for many programmers (and possibly other fields also?) in general: http://www.lambdassociates.org/blog/bipolar.htm

edit:
read it and ignore the word "lisp" if you wish

edit2:
i have some more thoughts about failure etc. i'd like to rant about .. maybe later =)

lnostdal
April 25th, 2008, 11:56 AM
edit: great .. a double post .. ignore this one

pmasiar
April 25th, 2008, 02:50 PM
@RIchard James13:

Seems like you have unreasonable expectation about programmers. Sure, experienced programmer can learn **syntax** of new language in a week. It might take couple months to become familiar (learn basic types and data manipulation idioms). For most people it will take **years** to become expert, learn and understand most libraries, being able to solve obscure problems, make right decisions and be able to predict consequences.

So there are precious few who are experts in multiple languages and can competently compare them. Most people comparing languages base preferences on bias, not understanding. And most people doing the comparison are not experts enough to be aware that they are biased, and cannot tell opinion of an expert from random moron.

Result: even if most people comparing X to Y are clueless morons, it does not mean that comparison is meaningless. You just need to select who is doing the comparison. Hint: real experts are mostly too busy to hang around forums to argue with random clueless forum posters. :-) That includes me :-) but I am at least aware that I am not expert enough, and smart enough to carefully study opinions of real experts, like Bruce Eckel, Ian Bicking, Guido van Rossum, Alex Martelli, Paul Graham, Joel Spolsky etc.