Sign in to follow this  
Eng. Mumin

Programming Languages

Recommended Posts

I prefer to start Discussion about some programming languages.

 

such as:

Visual Basic

Active Server Pages(ASP)

VB.NET & ASP.net

 

so please let me know your ideas about this...

Share this post


Link to post
Share on other sites

what would you like to discuss? If you are learning i would suggest:

C++ - for general purpose programming

python - for scripting

prolog - for thinking

 

VB, ASp and .NEt are all microsoft centric, so they will limit your learning, it's like becoming a microsoft engineer rather than software, so if your just starting out, i'd suggest something more generic like the ones i listed. and think of it this way, learn c++ and it'll take you about 20 mins to pick up the basics of almost all procedural languages that have succeeded it, like java and .net ;)

Share this post


Link to post
Share on other sites

what would you like to discuss? If you are learning i would suggest:

C++ - for general purpose programming

python - for scripting

prolog - for thinking

Brother i not learning, but i know these langueges well that is why i wish to discuss.

 

instead of C++ get VB.NET for general purpose programming(Object Oriented Programming).

 

but can you give me more explanation about 'Prolog' or 'LISP'. I think it is used for Artificial Intelligence Programs.

Share this post


Link to post
Share on other sites

hi eng.

first i am not very familiar with the .net framework, i've used it to see how to use and but have not developed anything worthwile with it. The reason of c++ is that a lot of the programming i do is not application orientated, it is mainly back end stuff like algorithms. However, i think we have to differentiate between a programming language, i.e. the syntax/semitics it offers and an API.

 

In this context the value of the language is the richness/flexibility of the constructs you can create with it, while an API is more highlevel and

valued for the number of commonly-used functions it offers. This distinction is important in many ways.

 

So for example if you've ever written code for a network stack in c/c++ compared to a more API orientated languages like .Net/java/python you'll notice its the difference between writing +500 lines of code compared to ~20 lines calling the API and bit of graphics for fun.

However I cant think of another language that is capable of a feature template meta programming in c++ (i.e you code gets executed at compile time, and at runtime u just collect the result).

 

anyhow ... lisp and prolog are declarative* rather than procedural languages . The difference between the two is that:

 

+ A procedural language defines solutions, ie.

 

code:

class fruit {

colour = null;

isEdible();

}

class apple: public fruit {

colour = green;

edible = true;

}

class orange: public fruit {

colour = range;

edible = true;

}

class poisonBerry: public fruit {

colour = red;

edible = false;

 

}

so here you've defined a set of fruit objects with their properties and now you want to make use of it. i.e. what colour is an apple, or is a poisonberry edible? and you would do

 

code:

 colour whatColourIs(fruit) {

return fruit.color;

}

 

edible isEdible(fruit) {

if(fruit.edible)

return true;

else

return false;

}

....

here u've defined a world and solutions to queries that ppl might pose to its content

 

+ A declarative language however doesn't define solutions, but describes a problem (*actually declarative languages are engines which run propogation algorithms in the background on your definitions but lets ignore this for the moment). Anyway the same example in prolog would be

 

code:

/* facts about the world */

fruit (apple)

fruit (orange)

fruit (poisonBerry)

 

/* facts ie. apples are green */

colour(apple, green)

colour(orange, orange)

colour(poisonBerry, red)

 

edible(apple)

edible(orange)

 

/*rules that hold in the world*/

isEdible(X):-

edible(X)

--

so here we have defined facts and a rule and we then ask it questions (note that this is not done in the code but outside during the interaction bit) like what colour is an apple in the form of:

 

code:

? colour(apple, X)

> yes /* the answer*/

or what fruits are edible or what colour are non-edible fruits? ... and etc

 

code:

? isEdible(X).

> apple /* the answers*/

orange

 

? colour(X (not isEdible(X) ))

> red

wrt AI, the example prolog i gave is the start of an expert system. without going into too much detail, declarative programs are based on first order logic of some sort (if your interested in the detail let me know and i'll send you stuff). and their aim is to prove a piece of logic is true, i.e;

for all x given edible(x) isEdible(x)

 

so their quite handy for a certain type of reasoning, i.e. when you can describe the world with a finite (pref. small) set variables/states with a firm logical contraits. however this is not always (well more often than not) possible, and there are other methods for reasoning if this is the case....

 

so as u can see its a different style altogether and they both have different strengths and weaknesses...

 

shite .. i've just realised how much i've written, sorry if i waffled, back to wrk

Share this post


Link to post
Share on other sites

no problem eng.

stricly speaking, prolog is not a compiler but an engine, i.e. it doesnt produce byte-code. It has a paser that does syntax checking i.e. to see all the terms that you are proposing are valid, but not further. The engine is a theorem prover, and once the statements have been made (the facts and rules) nothing more happens untill a question is asked.

 

When a query is made, it checks whether the proposition in the query is true given the facts about the world and the rules that can be applied to these facts, and it fails by negation - i.e. if its not true then it must be false. technically this is strictly valid. So for example the query about the colour of non-edible fruits. in the example that returned 'red' but we all know that not all red fruits are inedible, but the rules dont state that so we could either go for possibly unsatisfiable (ifinite) loop by trying to determine what we dont know or just fail, and say what can be infered from the data set - this is called failiture by negation.

 

coincidently this is the backbone of classical logic and validation. ie. given a hypothesis, how we check it? well the theory says if you cant disprove it must be true.

Share this post


Link to post
Share on other sites

I started programming after 3yrs without programming and i am finding Java interesting better than C++ which i started as first language.

 

What was your first programming language to start with ?

Share this post


Link to post
Share on other sites

Hi Captain,

Although, it depends your choice and interest, but it is better to understand programming concepts before you begin writing code. You need to understand what an object is, what a class is, how objects and classes are related, and how objects communicate each other. At this point you can simply get what Object Oriented Programming (OOP) is.

Java is robust, but firstly I have learned C and C++, now I am preparing my self to study Java.

Share this post


Link to post
Share on other sites

Originally posted by Eng. Mumin:

Hi Captain,

Although, it depends your choice and interest, but it is better to understand programming concepts before you begin writing code. You need to understand what an object is, what a class is, how objects and classes are related, and how objects communicate each other. ....

^^ mr dark-side, exactly as the eng. said, when you understand the principles, the choice of a language becomes a convinience. its just a way of expressing the principles..

 

also try as many different languages as u can. for some problems you want object orient. stuf, in others you need procedural, others functional and so on, so just play with them and you'll understand and learn faster. an example is u guys and java, having mastered the dark arts of pointer manipulation in c++, java is just easy ;)

 

also, if you want to learn to program, i'd say get yourself decent OS that exposes you to variety and lets you experiment easily, its like u're tools of the trade, if you learn on an substantard tool, u cant compete smile.gif

Share this post


Link to post
Share on other sites

Engineer and Milk-man thanks for the that advice..

yeah i have spent first 5 lessons about Object Oriented concepts.

 

mr Milk-man speaking of decent OS are you reffering to non-MS ?

 

one more thing are most programming job's being outsourced to china & india.. ?

 

salaam,

Captain Shadow

 

// end of reply

Share this post


Link to post
Share on other sites

Personally, my first programming language was, GW-Basic, a very easy language to learn, can help with the basics, (very basics), like understanding the flow of the program, with different types of branching Goto (obsolete),Select Case,If.

 

then i went on to visual Basic 5.0, sorry havent upgraded to vb6.0 or .Net quite yet. Then i had enough with the Basic family, not enough power !.

 

Assembly(TASM),C/C++ quenched my thirst, i could do anything with pointers,registers etc.

 

Milk man a correction, the only compiler that produces byte-code is the java compiler, hence making it truly, any-platform language.(from your explanation compiler vs. Engine)

Share this post


Link to post
Share on other sites

^^ the dark side, by a 'decent OS' i gues i'm baised for the linux/unix/bsd based systems. I dont argue that you can play your latest video-game and the next generation quadruble buffered 2ghz graphics cards the make you computer hover are supported, but .... they make it easy for you to write the code for them if you wanted smile.gif

 

Essentailly the underbelly of the OS is more accesible, and the systems are alsways experimental which means u have to spend a bit more time thinking about what the hell you need to do to get this thing working .. consequently learning.

 

As far as programming languages go, these os's are designed for the programmer, rather than the user so more languages, features and headaches thatmight onedayget you out of a tight spot ;) .

 

wrt to job oportunities, first there is always a job for a good programmer (well i hope anyway and i've seen lousy ones get jobs), second if you think of it as a building project, u can be a better architect if you know how bricks behave under different conditions. So having the understanding and competence gives you far more opportunities.

 

bush man, yep your right about the bytecode was trying to highlight the lack of some instrucion set that the os executes. Anyhow i could neva get my head around assembly, would u a write simple tutorial for the thread pls smile.gif

Share this post


Link to post
Share on other sites

^^ milk-man good point but i still am windows loyal being using it since Win 3.1 era...tried linux but since i am not prgrammer.. didnt care about development tools.

 

for me personaly in OS Compatibilty is must... :cool:

unlike linux where is too much uncompatibiltu :(

 

 

// another reply

Share this post


Link to post
Share on other sites

Hi All,

This is a commentary clarification of what compiles do…

 

The languages like C, C++, VB, ASP compilers are used to translate the source code into machine language or machine understandable code (i.e. 0 o 1). These languages are platform dependent i.e. they are designed to run on a specific microprocessor architecture or operating system like Windows, Linux etc.

 

Java compiler is not like that (does not translate to machine language) it produces Bytecode. Java Virtual Machine (JVM) converts java bytecode into machine language.

By using this approach, source code can be run on any platform once it has been compiled and run through the virtual machine. Bytecode files generally have a .class extension.

 

The .NET Framework (VB.NET and ASP.NET and C# etc) is also platform independent; Microsoft had used Common Language Runtime (CLR) instead of Virtual Machine for Sun Systems. Common Language Runtime, a runtime environment that manages the execution of .NET program code and provides services such as memory and exception management, debugging and profiling, and security. The CLR is a major component of the .NET framework. CLR also is known as the Virtual Execution System (VES).

 

Also there is Scripts, is a list of commands that can be executed without user interaction. A script language is a simple programming language with which you can write scripts that does not need compiler.

 

--------

Thanks,

Share this post


Link to post
Share on other sites

Salaan All

 

Been away for some time and we have some programmers/developers, even our own little place on SOL smile.gif .

Its interesting to see there are people out there still using prolog, I remember covering a semester doing prolog - if i am completely honest can't remember much about it - did the homework and got the grade :D .

I am currenly working exclusively on c# and although I do think that c# is better incomparison to VB.net in terms of performace, it really comes down to individual choice depending on requirements.

I personally prefer the syntax.

 

As for jobs being outsourced(china,india..) i must say its the only logical solutions for most companies. As we all well aware a good programmer requires a decent salary companies will be looking into ways to reduce the cost, why not start with the programmers; also with technology advancing projects can be worked on & delivered from any part of the world. A modular approach is something most companies will be looking into(so be a little less greedy and stop damanding so damn much lol... ;)

 

salaama

btw Nice to meet U all.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this