Urban75 Home About Offline BrixtonBuzz Contact

Beginning Programming - Advice Required

ive not seen any compression algorithms in java, it would be too slow.
device drivers are really only coded in c.
 
In what Java is written? Can a language write it self? With high propabilty that compression algorithm is written in C. Java only provides a higher level interface to it. Device drivers like a grahics cards are maybe written in C or even some kind of assembler language palying around with fancy inside stuff. OpenGL provides a higher level interface for developers who don't need to worry about every graphics card model or manufactor.

For me it's still amazing that everything works, writing code on a PC/Mac/Sun/Linux box doesn't matter, all compiles very nicely and runs on any kind of machine/server. When an appliaction is getting too big architects split them and run them on different boxes without need to change any underlying code.

I'm not a fan of Java, it has many flaws and is very static in developing terms. Not so much programming, keeping all that files/classes under control can be very challenging, setting them somewhere, getting them back again and always trying, catching and throwing, very odd
 
cybotto said:
I'm not a fan of Java, it has many flaws and is very static in developing terms. Not so much programming, keeping all that files/classes under control can be very challenging, setting them somewhere, getting them back again and always trying, catching and throwing, very odd
this doesn't make sense and is irrelevant to the thread anyway
 
cybotto said:
In what Java is written? Can a language write it self?
I'm not sure about java, but the delphi IDE and compiler is written in delphi. The same can be said for the C/C++ stuff. Java IDEs are generally written in java.
With high propabilty that compression algorithm is written in C. Java only provides a higher level interface to it.
no, the zip stuff in native to java. You're suffering from the misconception that java is inherently slow.
 
as far as i have understod, and i may be wrong here, the java jvm's are usualy writen in c and that accounts for the platform dependent part of java. the rest of the platform is writen in java. but i think there is a java os as well and there are jvm's that have been burnt striaght onto chips to speed up j2ee servers so i asume they are done in mashine code.
 
The point is that all low level design/implementation is hidden away from a programmer, it can be written in anything and maybe with the next upgrade it will be written in something more efficient, but we don't know and don't care.

IDEs are always written in that language which they represent, can you imagine a CEO from Pepsi has to use a vending machine from coca cola?

Yeah core of 2jee burned on new generation of sparcs, sure it's sun who sells these processors, I'm not sure but Opterons, but could have them as well on them somewhere. Next generation will handle XML like it is written in machine language.

Java is slow, but chip in more processors, ram and viola. 4CPUs with 16GB of ram are standard and rock solid. Than it only looks like is fast.
 
this doesn't make sense and is irrelevant to the thread anyway

It makes sense since there are different kind of programming styles, in PHP is possible to hack away and in a second see the result. In Java everything has to validated, compiled, or best after typing a dot looking which methods are available, writing helper classes etc.. It's not that efficient when you only want to keep going and play around. It's static since it is intended to be like this, to keep hackers out, it's just a different additude towards it. Some people like to think for hours and see their beautiful creation compiling and working and some just want to see as many permutations as possible in shortest time as possible.
 
cybotto said:
IDEs are always written in that language which they represent, can you imagine a CEO from Pepsi has to use a vending machine from coca cola?

Um... Nope. For example the perl/php IDE Komodo isn't written in Perl. I've known Java IDE's not to be written in Java. And the Visual Basic one. Not in Visual Basic. IDEs *may* be written in the language they are for.

cybotto said:
Java is slow, but chip in more processors, ram and viola. 4CPUs with 16GB of ram are standard and rock solid. Than it only looks like is fast.

Java is slower than C/C++ but the development time is faster. Depends what is more important - a faster program, or a program written faster.
 
cybotto said:
It makes sense since there are different kind of programming styles, in PHP is possible to hack away and in a second see the result. In Java everything has to validated, compiled, or best after typing a dot looking which methods are available, writing helper classes etc.. It's not that efficient when you only want to keep going and play around. It's static since it is intended to be like this, to keep hackers out, it's just a different additude towards it. Some people like to think for hours and see their beautiful creation compiling and working and some just want to see as many permutations as possible in shortest time as possible.

If you use a good IDE then about most of the template code is produced for you. (Which is part of the point about using a good IDE). I don't think you've used Java much. And if you are a halfway decent programmer then you should know which methods are available. (Which is why you shouldn't learn programming using an IDE -- it will do all the legwork and suggest methods to use. That won't help you learn)
 
cybotto said:
Can a language write it self?
For compiler designers, this is usually the Holy Grail ... to write the compiler in the language itself, and to compile it using the compiler. It's called 'bootstrapping' the compiler (as in 'to lift oneself up by one's bootstraps' - the verb 'boot' comes from the same phrase, is short for bootstrap).

The GNU C Compiler can do this... and Tiny C can compile itself... dunno of other examples but there will be some.

Course the problem is, to bootstrap it you do need to first write the compiler in another language ... so it's a duplication of effort in a way, but a 'bootstrapped' compiler is regarded as being 'purer' if you get my drift :)
 
Velouria said:
to bootstrap it you do need to first write the compiler in another language

You need to have a compiler written in another language, but it can be minimal - just enough to compile a minimal compiler, in fact :) Then you expand it to include everything else (beyond input parsing, simple code generation and saving object code to a file): linking, optimisation, switcherama and so on.

There's a bloody good security reason for having a compiler that compiles itself, which is that the people using it have the skillset to see precisely what it does. The ultimate Trojan Horse would be one inserted by the compiler. Can't remember who wrote the classic papers on this, but I'd not be surprised if it were Kernighan and/or Ritchie.
 
vic20.jpg
 
Velouria said:
For compiler designers, this is usually the Holy Grail ... to write the compiler in the language itself, and to compile it using the compiler. It's called 'bootstrapping' the compiler (as in 'to lift oneself up by one's bootstraps' - the verb 'boot' comes from the same phrase, is short for bootstrap).

The GNU C Compiler can do this... and Tiny C can compile itself... dunno of other examples but there will be some.

Course the problem is, to bootstrap it you do need to first write the compiler in another language ... so it's a duplication of effort in a way, but a 'bootstrapped' compiler is regarded as being 'purer' if you get my drift :)

The classic examples:

LISP: having been developed as a notation for writing assembler, someone notices that you can write in LISP a program that will execute all of LISP. Then they translate it to assembler, and the first LISP (1.5) is done.

PASCAL: see the reports

FORTH: most of this language is implemented on top of a core of about 20 words. There are definitions of those words in FORTH,allowing you to check the implementation.
 
laptop said:
The ultimate Trojan Horse would be one inserted by the compiler. Can't remember who wrote the classic papers on this, but I'd not be surprised if it were Kernighan and/or Ritchie.
No, it was Ken.

"Reflections on Trusting Trust", IIRC.

Ken f#d the C compiler and the Bell Unix kernel.

The gist of the f# was that:

when the kernel was compiled, it inserted Ken's login so he had root on the kernel if required

when C was recompiled, it inserted the kernel hack and the hack of the C compiler.

Neither hack was visible in the source code.


Way f#in cool.
 
If you are just starting out you may wish to learn a .net compatible language.
C# is just one of many possibilities. Personally I think "C++/CLI" is the best.




As far as wacky languages are concerned, I like Brainfuck, a Turing-complete programming language consisting of only eight different commands.

This is the BF sourcecode for the famous "Hello World" program:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.




Whatever language you opt for, just make sure it does not have the COME FROM language construct.
:D
 
gurrier said:
But it's not a programming language :confused:

There are loads of reasons why learning to program with a microsoft product is a very bad idea. Not that their stuff is particularly terrible, just that when you want to learn to program, you want as much transparency as possible - the opposite of the microsoft coding philosophy.

Everybody knows that real coders learn to code with transistors anyway. If you can't construct an arbitrary Turing machine from J-K flip-flops, you're not worth it. :p

There's always .net assembler:

.assembly extern mscorlib {}
.assembly hello {}
.method static public void main() cil managed
{ .entrypoint
.maxstack 1
ldstr "Hello world!"
call void [mscorlib]System.Console::WriteLine(class System.String)
ret
}
Yep, using ILASM.EXE that really does compile and link.

:cool:
 
TAE said:
If you are just starting out you may wish to learn a .net compatible language.
Stop pimping. Really.
As far as wacky languages are concerned, I like Brainfuck, a Turing-complete programming language consisting of only eight different commands.
Eight is six too many. All you need is increment, and decrement-with-branch
At least till you need I/O.
 
TAE said:
Personally I think "C++/CLI" is the best.
:D

Yes... This is the language I was taught most of the basic principles in. After C++ (and then C) I fould most other languages a breeze. Start of hard thnn get easier and that way you won't have any nasty suprises...
 
rich! said:
Stop pimping. Really.
Lighten up. Really.

jæd said:
Yes... This is the language I was taught most of the basic principles in. After C++ (and then C) I fould most other languages a breeze. Start of hard thnn get easier and that way you won't have any nasty suprises...
Lol. Actually I started with C64 Basic and after a few months of frustration quickly moved to 6510 Assembler and then learned 68000 Assembler. Then I learned C.
 
cybotto said:
Academic concepts and good practise don't work well in real world anyway.

Interesting point, but I am not sure that I agree with that - certainly in the OO Software Engineering world I think there is starting to be more and more overlap between industry best practices and Academia.

I kinda understant what you are saying from the point of view of things like re-implementing red/black aglorithms, or whether O^n is preferable to Ologn because this has been done for us and implementation are provided by core API's - am thinking of Collections API for example with Java.

However there are topics that are of interest to both academia and industry. I would quote patterns or refactoring, Intentional Programming, Apect Orientated Programming and many more.

And on the subject of what to learn, how about COW?
 
cybotto said:
It makes sense since there are different kind of programming styles, in PHP is possible to hack away and in a second see the result. In Java everything has to validated, compiled, or best after typing a dot looking which methods are available, writing helper classes etc.. It's not that efficient when you only want to keep going and play around.

That may be so for just playing, but for any real work I couldn't disagree more. I find with using Eclipse for writing Java I can get a program working relatively quickly because of Java's strong typing and Eclipse's hinting, whereas in PHP I have to spend ages hunting down the mistyped scalar names and array indexes.
 
And to go back to the original point of the thread, I started out in Cobol which I would not recommend to anyone. Ever.
 
gnoriac said:
I find with using Eclipse for writing Java I can get a program working relatively quickly because of Java's strong typing and Eclipse's hinting, whereas in PHP I have to spend ages hunting down the mistyped scalar names and array indexes.

Use an IDE to write PHP as well... Will avoid these problems and forces you to organise things in a more structured manner. Once I started using an IDE for Perl/Php/Python m productivity went up by 100%. As I've said... Professionals use IDEs. Dabblers use text editors.
 
boicy said:
However there are topics that are of interest to both academia and industry. I would quote patterns or refactoring, Intentional Programming, Apect Orientated Programming and many more.

Um... I'm already using those already, and its been a requirement that its needed for most jobs... :confused:
 
jæd said:
Use an IDE to write PHP as well... Will avoid these problems and forces you to organise things in a more structured manner. Once I started using an IDE for Perl/Php/Python m productivity went up by 100%. As I've said... Professionals use IDEs. Dabblers use text editors.

Which do you recommend? I currently write it with Dreamweaver which at least has syntax highlighting.
 
Back
Top Bottom