Page 3 of 4 [ 53 posts ]  Go to page Previous  1, 2, 3, 4  Next

0_equals_true
Veteran
Veteran

User avatar

Joined: 5 Apr 2007
Age: 41
Gender: Male
Posts: 11,038
Location: London

17 Nov 2007, 8:22 am

ion wrote:
I suggest Java or PHP.
Both have really good documentation: Java manual, PHP manual.

Hmm :?

I wouldn't suggest PHP. Yes it is easy to learn, however it is an example of a very scrappy language. It doesn't exactly encourage good practice. Try reading somebody else's php script. Not great.

I'm not sure Java is the best choice either, though it replaced pascal as the common first language in schools for some reason. That era would be over.



CompSciMan
Hummingbird
Hummingbird

User avatar

Joined: 3 Nov 2007
Gender: Male
Posts: 22

17 Nov 2007, 2:33 pm

Fuzzy wrote:
, but most of the work should be done as high level as possible;


Most of what work? The problem is the higher the level and abstraction of the language, the slower and bigger the program. If you want a fast program, you'd sure as heck better not want to use Java or any other high-level language that makes things easy. Why do you think they don't write resourse-intensive games, or heavy computation programs, or time-critical, or safety-critical or, or, or ... in Java or a similar high-level language?

I understand it would be nice to be able to write everything as high level as possible, but most real-world situations dictate that such is not the case. If it were, we would all use Java for everything because it's very very easy to learn, fully portable, with a huge set of ever-expanding libraries to help you do just about anything.



-Main
Yellow-bellied Woodpecker
Yellow-bellied Woodpecker

User avatar

Joined: 10 May 2007
Age: 34
Gender: Male
Posts: 69

22 Nov 2007, 12:43 am

By that logic, assembly language is the only way do do anything, ever.

But of course it isn't. C++ offers much more to the programmer, like functions and classes, and the code the compilers generate is almost as good as hand-tuned assembler. So most coders sacrifice a little bit of execution speed in order to get the program written some time this year, and the code down to a manageable size. Well, if you sacrifice a bit more speed than that, you can have your program written in a few weeks, and the source code will be really short, highly readable, and also easy to understand and modify.

For some areas, this trade isn't worth making - like games, which need to be as fast as possible, and are optimized in assembly. But for most programs, it's more important to have a feature now than to have it go fast, when and if the coder manages to force the logically simple ideas into the few basic low-level abstractions the language provides.

I've coded in Lisp and having to repeat myself in C# sucks. I really hate having to do it. Any time a piece of code looks almost the same as any other, I start itching to write a macro - only to realize that I can't, because C# is too low-level for that. I actually have to type out the code more than once, if it's not something a function could abstract - like the separate code to read and write my XML format. Both have a doctype, then the main tag, then a loop for the item tags, then a data sub-loop inside that - but I can't abstract out that pattern easily. I really don't care that it's a bit faster in C#, and I'd write the project in lisp except I already have a few thousand lines of C#, and I'm still learning lisp.


_________________
I need to find an avatar.


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

22 Nov 2007, 2:11 am

CompSciMan wrote:
Fuzzy wrote:
, but most of the work should be done as high level as possible;


Most of what work? The problem is the higher the level and abstraction of the language, the slower and bigger the program. If you want a fast program, you'd sure as heck better not want to use Java or any other high-level language that makes things easy. Why do you think they don't write resourse-intensive games, or heavy computation programs, or time-critical, or safety-critical or, or, or ... in Java or a similar high-level language?

I understand it would be nice to be able to write everything as high level as possible, but most real-world situations dictate that such is not the case. If it were, we would all use Java for everything because it's very very easy to learn, fully portable, with a huge set of ever-expanding libraries to help you do just about anything.


I'm afraid you are missing the point. those games still get written high level to prototype it, then the functions and other bottle necks get rewritten in asm. even if at the very end of things, its mostly assembler code, it just makes sense to prototype.

Java isnt a generation above the C family, its part of it. I am sure that some will claim it is, but its still recognizable as related,

My good friend nellos pointed out a new language that his neighbour uses. its purely graphical, and you draw a flowchart that shows what must be done(I think he said it had a telecommunications application). This.language output assembly code which was then optimized as needed. The end result was tight, fast, tiny code, and C/C++ was not needed for the equation. Its abstract, its high level, and it is more intuitive. Its a new generation language. Very much a real world application.

The game makers do this too. Maxis has an in house live compile language which is used to create items and characters in their sims games. You dont have to recompile the main application to make changes, and you dont need a version that is different to the public release, which cuts down on bug fixes and a lot of work tracking differences.



MeshGearFox
Sea Gull
Sea Gull

User avatar

Joined: 31 Dec 2006
Gender: Male
Posts: 243
Location: NYC

22 Nov 2007, 12:25 pm

Hm. I'm not a programmer. I would like to learn. The best I can manage is an Excel Macro. Yet I find this discussion very interesting, if not fascinating. Good stuff. Thanks.

Hey Fuzzy: awesome avatar. I still have a "Don't Blame Me, I Voted for Bill and Opus" t-shirt!



funkfisk
Raven
Raven

User avatar

Joined: 1 Nov 2007
Gender: Male
Posts: 123

22 Nov 2007, 1:24 pm

lonelyLady wrote:
can you recommend one (i.e. a good book)?

funkfisk wrote:
Then I went into learning how the CPU and such worked (there are good books on that),


The book I used was "Programming 80486", but that was like 10 years ago. Many new good books may have arrived. That book I mentioned is gold if you're a beginner with CPU-programming. Windows programming doesn't really let you to access the CPU in a way I want, because you have to rely on drivers and such. Damn those restrictions :P MS-DOS was almost haven, you could even hack the graphics card if you wanted :)



Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 51
Gender: Male
Posts: 5,223
Location: Alberta Canada

22 Nov 2007, 4:03 pm

MeshGearFox wrote:
Hm. I'm not a programmer. I would like to learn. The best I can manage is an Excel Macro. Yet I find this discussion very interesting, if not fascinating. Good stuff. Thanks.

Hey Fuzzy: awesome avatar. I still have a "Don't Blame Me, I Voted for Bill and Opus" t-shirt!


Ack! tthhbbptt!



Kiski
Yellow-bellied Woodpecker
Yellow-bellied Woodpecker

User avatar

Joined: 31 Dec 2007
Age: 34
Gender: Male
Posts: 57
Location: Galifrey

02 Jan 2008, 6:32 pm

I recommend that you try learning Python. It is very beginner friendly, but also powerful enough for experienced users. The syntax is very simple (compared to other languages such C or Java)

You can find more information at python.org.

There's a good beginners tutorial available called Byte of Python.


_________________
Human knowledge belongs to the world, like Shakespeare or Aspirin.