Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Programming languages

Status
Not open for further replies.

sram

Member
Hello, I touched on some programming while in university. I learned a little about C and C++, but I have some questions!

In the computer world, you have hardware and software, each is useless without the other. You design hardware and write software(You code).


1- Why create so many programming languages? Why not creat one and concentrate on it? How did programming lanuages first got invented? Somebody just wanted to tell the machine something at its level and created a way? Somebody else wanted to do the same thing, and he created his own way with its own different rules??

2- I understand that there are low-level and high-level languages..........right?Now if you wrote a program by using one of the programming languages, and somebody else wrote the exact same program by some other language, will the compiled code be exactly the same at the machine level?

3- Can any language make any program?

4- I understand that programing nowadays is made easy through some programs.......what do these programs exactly do? They memorize the rules for you, and instead of writing the actuall code, you tell the program " I want this and this" and the program does it for you in coding?

5- If -for example-I was a skilled Windows 98 programmer(I program software for windows 98), what would I need to know/change in order to program the exact same software for windows xp ?? Microsoft doesn't tell me how it coded its new OS?

6- I want to learn some programming. Usefull that is. Where should I direct myself? Should I learn C? Should I learn Java? Or Visual Basic? I want to be able to write some simple windows programs. Very simple like simple calculator with basic functions, convertors, simple games,............etc.




Discuss away and thaaaaaaaaaaaaaanks in advance.

Sram
 
There a lot of questions in your post, and if people actually read it all, its really opening a can of worms as far as different languages go.. But my 2c is go with what you know.

If you have exposure to C, then stick with it. With the .net architecture I would argue to say that Visual Basic is just as versatile as C, but has a great simplicity at the same time.

Both have a massive support network, and there are many great forums out there that are focused for each language.

I haven’t actually tried to execute programs on any machines without XP yet, but assuming you have the required run-time dll's on the PC, there shouldn’t be any issues.

Best recommendation - download VB or C development suits, they are free at the moment for the express editions. All they require is a quick email based registration, and you’re done. Play with it for the whole weekend and start with the simplest of things, and utilize other forums that specifically relate to the language you choose. Just Google them e.g., "VB 2005 Express Edition Forum"

Find the downloads here
 
Gayan Soyza said:
If you using your Programming Languages for your Electronic Projects then Your next question will be ............
“Why create so many IC’s? Why not create one and concentrate on it?

How could these be related? IC's are just complex circuits to accomplish something. This thing can be implemented here and there. You can build as many ic's as you want, each with its seperate function. However, circuit design rules are always the same. You can even use PLD to quickly build a a complex big circuit on an IC chip in an instant.

In programming languages, you want to tell the hardware to do something, why not just use one way rather than too many ways?

I mean, can a perfect(best language) be created ? This language can do everything and is the simplest to use. Put your effort into building a great compiler for it, and you will be set.

What am I missing?
 
@Sram:
A "perfect" language can't be created, because it is a matter of taste and use.

Some examples of different uses with a one language that is well-suited to do the task are :
+ Numerical simulation : matlab
+ Artificial intelligence : prolog
+ "Hitting the hardware" : C or assembler
+ GUI-oriented programs : visual basic or visual C
+ Safety-critical applications : ADA

C is quite versatile and wide-spread (from microcontrollers to massive parallelized multiprocessor machines), so my 2 cents would be to stick to it. If you want to use a "managed" (see def. below) language, Java would be my choice since it is present in lots of different platforms (I've read somewhere that there are even some microcontrollers that can run Java bytecode directly).

One thing that most of us will probably agree on, is that the best programming language is the one that suits YOU.

I also think you should consider visiting the following page to get an idea about different languages:
List of hello world programs
(you will notice that some languages are simply NOT meant for printing text on the screen - but they may be great for other things)

"Managed" language = It is a type of language with a very strong reliability emphasis (checking against programmers' mistakes, mostly) such as strong type checking, array bounds checking, detection of attempts to use uninitialized variables and automatic garbage collection.
 
Last edited:
Well explained WinterHunter!.

One thing that most of us will probably agree on, is that the best programming language is the one that suits YOU.

So often we hear that 'language is rubbish' or you 'should' be using this or that language.

It must confuse the heck out of newbies.

If a language works for you, use it, but keep an open mind on the advantages one programming technique has over another.

Regards
Eric
 
Digital computers only understand binary numbers, 1s and 0s. Its not impossable to program in binary, just difficult and time consuming. Assembly Language is easier to understand and work with, and the code produced is very close to what the CPU works with.

Compiled languages like BASIC, C, JAVA are much simpler for the programmer to read and write, but the compiled code is larger and executes slightly slower than Assembly.

Why so many languages? Does everyone on the planet speak just one language? Even in the same country? Some languages have different dielects with considerable differences, like english and british...

Does everyone using a computer, use them for the same types of work? Scientist and engineers would want a language that is more formula/equation oriented. Office jockies would want something text friendly. Graphic artist something more visual.

Oh, and MICROSOFT S U C K S, Windows takes up almost half your resources. Dread Windows Vista, it'll eventually mean I'll need a new computer, a bunch of upgrades to get enough memory and drive space for what I use my computer for. You can't avoid it for ever if you want to keep up with software updates, or better tools. One good thing, there will be computers sitting our by the curb for the trashman...
 
sram said:
1- Why create so many programming languages? Why not creat one and concentrate on it? How did programming lanuages first got invented? Somebody just wanted to tell the machine something at its level and created a way? Somebody else wanted to do the same thing, and he created his own way with its own different rules??
Ada Lovelace is said to have written/specified the first computer program, one could say she invented computer languages.

Computer languages have evolved over time. To some extent each language is geared (optimized) to the needs of its users. The needs are diverse enough to prevent the creation of a single language. There are several types of languages. The following is not exhaust but rather what comes to mind.

It starts with the assembly level languages, one for each processor core.
General purpose languages such as Ada, Basic, C, C++, C#, Forth, Java, Pascal, and PL1.
Specialized languages like COBAL, FORTRAN, LISP, PHP, and SONBOL.
There is another group of languages to do things like describe hardware, VHDL, and run CNC mills, Gcode.

Except for VHDL I have used or at least been exposed to (school) each of these languages. While a few of the GP languages seem redundant they all server a purpose.

2- I understand that there are low-level and high-level languages..........right?Now if you wrote a program by using one of the programming languages, and somebody else wrote the exact same program by some other language, will the compiled code be exactly the same at the machine level?
No they may do the same task but the actual machine code generated can be quite different.

If you take the exact same program (assume C) and compiled it with two different/brand compilers it will produce different machine code.

If you compile that same program with the same compiler but different compile time options it would produce different machine code.

3- Can any language make any program?
For a skilled programmer the answer is yes. But it will be MUCH easier to write in some languages. It will produce more efficient code in some languages.

I am out of time for now.
 
The global society is composed of individuals. The notion that one size fits all cannot survive the onslaught of innovation represented by individuals looking for better solutions. Those solutions that rise to prominence have something going for them that the also rans lack. Would you rather live in a static, stagnant universe, or one that vibrates with possibilities? We create, you decide.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top