User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 392,326 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,756 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser:
Views: 4618 | Replies: 31
Reply
Join Date: Jun 2005
Location: Troy
Posts: 1,277
Reputation: Rashakil Fol has a spectacular aura about Rashakil Fol has a spectacular aura about 
Rep Power: 7
Solved Threads: 36
Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Salamander Man

Re: Why are there so many languages?

  #31  
Apr 21st, 2006
Originally Posted by Lord Soth
1.An algo can't have both constant time and O(n^2).
2.There is no such thing as O(n^2 + <something>)

The time the algorithm takes is a function of more than one variable, so O(n^2 + <something>) is perfectly reasonable notation.

Originally Posted by Soth
3.Time complexity of an algorithm is independent of PL, OS or anything at all. Even if you have hardware quick sort on your machine it is still O(n log n) (Worst case O(n^2))

You're missing the point. I'm talking about development time; every serious language has the same time complexities. For any given task, some programming languages take less economic resources than others. You wouldn't use Delphi to code a supercomputer, would you? If you're writing a MacOSX application, Objective C would be the language of choice, no? If you're a scientist doing some numerical calculation, you'd use Matlab or something like it, no? They're the cheapest tools for their respective jobs, and you'd be wasting money/time otherwise.



4.I still have no idea about what is the algorithm we debate on its time complexity.

You can derive a closed form of the summation by simplifying the relation

sum_from_1_to_K(x^n) - sum_from_1_to_K((x-1)^n) = K^n

iteratively or recursively. The algorithm implements this and then evaluates the closed form of the expression.
Reply With Quote  
Join Date: Jul 2005
Posts: 244
Reputation: Drowzee is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Drowzee Drowzee is offline Offline
Posting Whiz in Training

Re: Why are there so many languages?

  #32  
Apr 24th, 2006
To quickly answer the original query (though this is an interesting discussion)

There are many languages because well, people needed code systems that could do some process. They were abstracted up from machine language, and at the lowest levels, they do mostly the same things, but:

Some languages have better optimizations and implementations of a program.


I'd say you should pick up the fundamentals of programming first. Figure out what you want to do with a program, the abstracts of data structures and operation automation, then find a language and figure out how to do things in that language. Once you know how to think, picking up any language is pretty simple. But to learn the language, you've got to work at it and figure things out by doing increasingly complex operations.

There are still a fair number of old mainframes and systems out there that run code written in the 70's and 80's, but you should probably go with a more recent language. The level of abstraction will be higher, and you'll be able to find more help... from, for example, people on DaniWeb.
Explainer of control logic and some basics.
"If you seek to drink from a fountain of knowledge, make sure your cup is big enough."
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Computer Science and Software Design Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Computer Science and Software Design Forum

All times are GMT -4. The time now is 11:05 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC