Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

I want to learn a programming language

Programming languages, Coding, Executables, Package Creation, and Scripting.
Message
Author
rusi_pathan
Posts: 5
Joined: 2007-11-07 00:47

#31 Post by rusi_pathan »

Gomer_X wrote:I'm not sure why you'd want to learn FORTRAN unless you really need it for engineering applications or something. I found it a lot like BASIC with some of the ugliness of BASH script thrown in. :)
FORTRAN (77) sure is ugly and a PITA. But Fortran (90/95/2003) is much simpler, elegant and more powerful.

I actually find it easier to use than Python/MATLAB (for numerical stuff). Plus the code runs anywhere from 2-100x faster. Heck the compilers can even auto parallelize parts of it to utilize those extra cores.

User avatar
garrincha
Posts: 2335
Joined: 2006-06-02 16:38

#32 Post by garrincha »

rusi_pathan wrote: FORTRAN (77) sure is ugly and a PITA.
I actually had to use a little bit of FORTRAN 77 in the early 1990s, but mostly I was working on a variant of FORTRAN called Advanced Continuous Simulation Language (ACSL) which is useful for some of the machines that are described as time-dependent, non-linear model. Now don't ask me what was the critical difference between the two programming languages because it has been over 10 years since I last dabbled in this type of programming and I'm rather rusty in differential calculus! :lol:
Maurice Green on Usain Bolt's 9.58: "The Earth stopped for a second, and he went to Mars."

GODhack
Posts: 50
Joined: 2008-05-23 18:33

#33 Post by GODhack »

Image
1956 :!: Learn how to make holes :D

GODhack
Posts: 50
Joined: 2008-05-23 18:33

#34 Post by GODhack »

Vultaire wrote: Perl, it's true, has a reputation for write-only code.
If it was hard to write, it should be hard to understand!
One-liners are so sexy:
http://www.theperlreview.com/Articles/v ... liners.pdf
http://sial.org/howto/perl/one-liner/
http://linuxgazette.net/issue84/okopnik.html
:P
You can even download youtube video with Perl one liner.

Code: Select all

perl -MWWW::Mechanize -e '$_ = shift; s#http://|www\.|youtube\.com/|watch\?|v=|##g; $m = WWW::Mechanize->new; ($t = $m->get("http://www.youtube.com/v/$_")->request->uri) =~ s/.*&t=(.+)/$1/; $m->get("http://www.youtube.com/get_video?video_id=$_&t=$t", ":content_file" => "$_.flv")'

Epimetheus
Posts: 20
Joined: 2008-07-12 20:43

#35 Post by Epimetheus »

It all depends.

For learning a programming lanaguage you could also try Java; there is an abundance of resources (and library/class inheritance) information out there including whole tutorial samples... So far whenever I didn't quite know what to write in order to make xyz happen, with Java I always had the least trouble finding some article describing some solution, and then adapting it to my needs.

Another definite go (as in easy to learn yet powerful to use) is PHP. Haven't yet used Python or Perl (should pick those up sometime in the future). What I like about PHP that you can mix & match typical OOP with other styles (I hear that's what's great about Python also). Python seems to enjoy wide support for writing your own extension to other apps (Gimp, 3d modelling tools, GIS software...); PHP & Java are very similar to C (you'll have little trouble understanding some C code if you know either of those).

Anyway there is another language which you should've seen and is immensely powerful for writing very simple & readable code: Haskell. Lazy evaluation, no (or at least fewer) restrictions on the size of data-structures (truly loooooooonnnnggggg integers, much better floating point accuracy!), and oh so beautifull to read. It's an art. It requires you to think a lot but write relatively little; thinking your algorithms through really pays off (or conversely: not doing so, and specifically ignoring compile time warning will lead to considerably lesser performance at run time). However the lazy evaluation makes it possible to operate on data structures which are (theoretically) of infinite size!

User avatar
drl
Posts: 427
Joined: 2006-09-20 02:27
Location: Saint Paul, Minnesota, USA

#36 Post by drl »

Hi.

In an article in the July 2008 of IEEE Computer abstract hereargues for a scripting language as the first language, notably ruby or python, as opposed to Java, which is currently a favorite in many college courses. The choice is made on the basis of pragmatics:
addressing more abstract social and cognitive functions of languages, situations, speakers and hearers, discourse, goals and uses, and performance
Regrettably, the article itself is not available on-line unless you are a member or subscriber.

Best wishes ... cheers, drl
["Sure, I can help you with that." -- USBank voice recognition system.
( Mn, 2.6.x, AMD-64 3000+, ASUS A8V Deluxe, 3 GB, SATA + IDE, NV34 )
Debian Wiki | Packages | Backports | Netinstall

danieldk
Posts: 151
Joined: 2004-10-05 12:02
Location: Groningen, The Netherlands

#37 Post by danieldk »

As some people have pointed out, the key point is to learn programming, not a language. This consists of learning how to convert problems to data structures and algorithms, and learning how to implement structures and algorithms in a language. Then there are many related facets, such as learning programming paradigms (e.g. OOP, functional programming, logic programming) and common things that all languages share (types, etc.).

I often advise people to start with Java. It may not be the most popular language on Unix platforms, but for learning programming it has a lot going for it:

- It uses the OOP paradigm, which is currently the most popular paradigm for general purpose applications.
- It's a safe language: common classes of errors will lead to exceptions, rather than undefined behavior (such as often the case in C/C++).
- It has static typing. Learning about types and relations between types (promotions, etc.) is important, and the explicit typing of static languages helps with this.
- It's a simple language. Arguably, generics have damaged this facet a bit, but it's still a very simple and predictable language.
- It has predictable references. In the Java world, references are comparable to pointers, sans pointer arithmetic (and automatic dereferencing). This means that you'll learn about how you can point to object instances, and use this to optimize algorithms, without falling into the trap of wild pointers, etc.

Or in summary: Java has nearly all the concept that you'd have to learn for an OO language, while protecting very well against the traps that could divert you from the main goal: learning to program.

After Java, I'd go for C/C++ and some scripting language such as Python.

danieldk
Posts: 151
Joined: 2004-10-05 12:02
Location: Groningen, The Netherlands

#38 Post by danieldk »

IronRage wrote:Seriously though, go with C or C++.
What, do you really want a newcomer to deal with 'the most vexing' parse, object slicing, etc? While C++ is my preferred 'compiled language', it's really better to start with C++ when you master most important programming concepts, have a good teacher (or book), and the time to master it.

lotr
Posts: 49
Joined: 2008-03-01 12:15

#39 Post by lotr »

JAVA best choice for me.

User avatar
s3a
Posts: 831
Joined: 2008-07-17 22:13
Has thanked: 6 times
Been thanked: 2 times

#40 Post by s3a »

I think Python is the easiest so you can be very productive with it.

johnmb
Posts: 14
Joined: 2006-11-30 13:29
Location: Bedfordshire UK

Fortran

#41 Post by johnmb »

As the others have stated, I wouldn't use Fortran unless there is a specific need for it.

Basically, Fortran has survived simply because it has the most comprehensive and fastest maths libraries of them all. It also supports complex numbers as a concrete type.

If you are new to programming, it may be an idea to cut your teeth on a language like VB.net that protects you from yourself quite a lot. C is much more of an expert language as it will let you do anything; which can be dangerous if you haven't programmed before.

Perhaps C# is worth looking at as well; as it is a logical progression from using VB.Net not in terms of the language itself but because it is based on .Net as well.

User avatar
FolkTheory
Posts: 284
Joined: 2008-05-18 23:02

Re: Fortran

#42 Post by FolkTheory »

johnmb wrote:Perhaps C# is worth looking at as well; as it is a logical progression from using VB.Net not in terms of the language itself but because it is based on .Net as well.
ahhh!! no M$ $%&@%!!!

i say go for java or python.
Image

User avatar
drl
Posts: 427
Joined: 2006-09-20 02:27
Location: Saint Paul, Minnesota, USA

Re: Fortran

#43 Post by drl »

Hi.
johnmb wrote: Basically, Fortran has survived simply because it has the most comprehensive and fastest maths libraries of them all. It also supports complex numbers as a concrete type.
Also the Fortran compiler algorithms are well-established to generate very good instruction sequences, and there are a large number of codes for engineering that are written in Fortran ... cheers, drl
["Sure, I can help you with that." -- USBank voice recognition system.
( Mn, 2.6.x, AMD-64 3000+, ASUS A8V Deluxe, 3 GB, SATA + IDE, NV34 )
Debian Wiki | Packages | Backports | Netinstall

User avatar
katofiad
Posts: 200
Joined: 2006-11-06 09:41

#44 Post by katofiad »

Learning programming concepts is always going to do more for you in the long run then any particular language will. But you will still need that practical experience writing code in a language along the way. You could do a helluva lot worse then Wirth + Python. You will discover that the more closely you can envision how the computer will handle your code and data in a literal internally mechanical sense, the more possibilities you can envision with your program, and the more realistic you can be with the computer's actual limitations. Distrust all advocations for "one true way" of doing things (eg. don't assume object-orientatedness is superior to structural programming just because more programmers might tell you it is). Likewise, Too many possibilities too quickly can be really confusing, too, and sidetrack a young programmer from the bigger picture (eg. trying to cram every data structure into the least space w/o padding or mallocing every word-sized entity individually).

Microsoft's langauges aren't technically worse then any other, it is just that the tools and usual learning pathes teach the programmer to develop an artifically blind eye to the internals of other parts of the code. The few classes I took on programming a few years ago were heavily influenced by Microsoft, including cultivating the idea that the programmer's should hide or obfuscate their code. I saw many other students with a very strongly held fictional belief that they were going to stumble upon some clever Knuthian-esque discovery in the code of their Hello, World!'s that they would have to guard jealously from prying eyes least that secret get out and benefit the world before they could carve their first house out of the side of a mountain next to Bill Gates'. Needless to say, most of them didn't even pass the final project of their first year programming class.
Even though they start with it, functions are ultimately only one third fun.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

#45 Post by ramack »

Although it's not a "language" as much as an environment, MATLAB is applicable to your engineering studies. There are are open source programs that are out there that are MATLAB clone such as Octave that are useful as well.

Good luck in your studies, which area of engineering are you going to study. Classes have probably started by now.....
Last edited by ramack on 2019-02-04 21:55, edited 1 time in total.

manuhack
Posts: 123
Joined: 2007-03-23 20:49

#46 Post by manuhack »

ramack wrote:Although it's not a "language" as much as an environment, MATLAB is applicable to your engineering studies. There are are open source programs that are out there that are MATLAB clone such as SciLAB that are useful as well.

Good luck in your studies, which area of engineering are you going to study. Classes have probably started by now.....
AFAIK octave is more a Matlab clone than Scilab.

User avatar
ramack
Posts: 499
Joined: 2008-01-28 15:31
Location: Centennial, CO
Has thanked: 6 times

Re: I want to learn a programming language

#47 Post by ramack »

Agreed. After reading my post, I see that I should have stated Octave and not SciLab. I've corrected that statement. SciLab is Python based which is useful but not really comparable to Octave. At the time of posting I got those two switched. The date stamp was almost 11 years ago, long days, long nights and I was using MATLAB, Octave and SciLab. A brain flatulence, ha.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: I want to learn a programming language

#48 Post by pylkko »

What's up with these decade old necros? like zombie attack or sometihng?

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: I want to learn a programming language

#49 Post by jalisco »

pylkko wrote:What's up with these decade old necros? like zombie attack or sometihng?
These questions about "what programming language should I learn" are like the zombie apocalypse, they don't die, they just multiple.

Locked