Contemporary Design Issues in Programming Languages

Engineers have developed variety of programming languages until the invention of computer based technologies. At the beginning there were binary code languages then they've started to code higher level of languages that are more easy to have abstraction of real time actions. In addition, still engineers continue to develop new languages respected to their needs in computer field. Thus, what is the reason behind designing new languages instead of using existing ones and what are the issues behind developing modern programming languages.


1- Development on hardware technologies;
Since the developing hardware technologies, programmers are able to give some new instructions to the machines to do more complicated processes in faster ways.
For example, with the development on the multi core systems, programmers want to be able to share program actions on different cores so new programming languages gives new tools to be used on multi core systems. Java threating and C/C++ libraries are good example that support multi core processes. Joint Java also another language that was developed from Java to have concurrency support. However these popular languages are not sufficient to cover all advantages of multi-core processing. Erlang and occam-ฯ€ are also good examples with different syntaxes to support multi-core. Erlang is good in this area by its nature of being functional language. Occam-pi also is a imperative language.

As can be seen one or two programming language is not enough to have fully capable language that uses all advantages of hardware so according to your priorities you have different languages or you can create your own.

2- Simplicity and performance trade off.
There are also two concepts, simplicity and performance in design of language that are conflicted. Simpler language means slower processing and more detailed languages are faster but more tricky to be used. Thus, the programs that are coded with assembly languages or directly binary codes are really fast programs but they have millions of lines codes so there are also variety of languages that goes lower level to higher level. For example C programming language is like the bridge between assembly and high level languages, thus it is used commonly in OS's designs, compiler designs and hardware drivers. However, we sometimes do not need such complicated languages to code a basic calculator for instance so we have more simpler languages like Java or there are some languages that are called script languages (Ruby Python, Lua, Perl) to have the ability code complicated tasks with really simple codes and attach these codes to host languages such as c++, Java. Ruby is popular script language to have web applications that have database systems, Python also a popular language in web field and also it is used in executable programs, Perl purposes to give easy manipulation on text files and it is used in server side programming language in web applications. These script languages aims to support your main language with huge libraries and they generally have the interpreter systems instead of compilers so they make our tasks simple but slower since the dynamic interpretation.

3- Usage Area
There are lots of languages that supports different computer fields. For example, there are web languages such as, PHP -server side programming-, JavaScript โ€“ Browser side programming-, SQL -Database manipulation-. But most popular languages c/c++ and Java generally used for executable programs although they can be used in web by CGI programming. In addition, COBOL is a good example that is specified for data processing language especially for business application or MATLAB is designed for mathematical calculation and graphing tool, Lisp is most popular language that is functional one for AI programming.

4- Potability
Another issue to have portability in your application and sure, Java is the most common example in that way. It can be used in any environment that have Java interpreter. It can be used in web as applet, or in Linux, windows machines. It is really powerful language in that way but the problem is, Java cannot use the all power of the computer to have portable feature. Therefore, again we have the trade of between portability and performance.

5- Variety of Project's Design Patterns
There are lots of different approaches to design a software system so there are also different languages to support such patterns. Today's most common design approach is Object Oriented programming that is supported with popular languages; C++ (Multi-paradigm support), Java and the others; Eiffel, Smalltalk, Ruby, C#. There are also different paradigms such as Structured Programming Languages (C, ADA ,Pascal), Procedural Programming Languages (BASIC, FORTRAN), Logic Programming (LISP).

6- Safety and security
Safety and security are other concerns about programming languages. In that way the level of the language is really important since low level languages are hard to maintain and code safe codes since you need to consider detailed things so using high level ones give the developer to code more safe codes and gives more maintainable codes. For instance it is hard to code a program with C instead of Java because in C you need to deal with low level structures like pointers, addressing, garbage collection but in Java these facts are handled by the language itself. Nevertheless, again we have performance trade off. Dealing with low level language gives efficient performance.

There are lots of programming languages and there will be more of them since the requirements always change in the way of software structures and hardware structures so it is not possible to meet all these need with a single language.


Today, I was working on constructing a dynamic web page that allows user to add new paragraphs or links dynamically.

Here the basic way to add new elements to the webpage dynamically.

//we create a new paragraph element
newParag = document.createElement('p');
//we create a new text node
newText = document.createTextNode("Here the new paragraph");
//we add the text node inside the newly created paragraph element
//Assume we have a division that has id 'content' and we
//call the 'content' division and add new paragraph to it

That's all. Have a good life... see you:)


To Determine the Size Of a Division Dynamically

I just add a option to my Google Extension that user can set the size of the application while he is using it. Here is the my work and the way to have this ability in my appli.

First assume we have a element in html that have the attribute " id = 'map' ".

First we add a new division to have three radio buttons to be selected for setting size.

<div; id="options">
<input; type="radio" name="size" onchange="setSize(400px, 600px)">400x600
<input; type="radio" name="size" onchange="setSize(600px, 800px)">600x800
<input; type="radio" name="size" onchange="setSize(100%, 100%)">FullScreen

We call setSize(--) function when we select one of the radio button. Then it is the time to define the setSize(--) function.

function setSize(h,w){
document.getElementById("map").setAttribute("style","height:"+h+"; width:"+w+";");

that is all...


Solution against file_get_contents(url) restriction in host server!

$content= file_get_contents("http://blabla");
echo $content;

If you need to use such php code for your purpose such as cross domain xmlhttprequest, there can be a problem depends on you hosting company. They could disable the opportunity to have contact with external files because of security reasons. Thus, here is the solution.

$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, "http://blabla");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);

// display file
echo $file_contents;

Take care!


Here My New AJAX Project "BusStop Editor"!

It is my one of the recent project and I think I've done well. But I guess there are some flaws at the moment because of the browser and database differences. I've done it specifically for Google Browser and PostGreSQL database but currently I converted it to MySQL database and make some changes to be available in my webhost and the other bowsers. It is working on IE now but not in FireFox and for best performance use Google Chrome.By the way this application is Turkish learn some Turkish first. ๐Ÿ™‚



My Basic Solution For Cross Domain XMLHTTPRequest

As I told in my last post, I was working on the problem of cross domain XMLHTTPrequest and now I have a solution. I think it is easy to use and really basic implementation. Here the solution.

First we have a php that takes the content of the specified URL.
(I am using this to use the googleMAP reverse geocoding.)


$content= file_get_contents(",30.6897222&sensor;=true");
echo $content;

Then we have a basic XMLHTTPRequest JavaScript;


This is an example implementation. Maybe you need to change some part of the program but this example is to get the idea behind the solution.

Take Care:)


Today's gain is about XMLHTTPRequest to other server.

Today I was working on parsing a XML document that is coming from one of the Google servers. I wanted to use one of the datum in my map processing program and I was really happy since I could get such info. from Google server. However, suddenly and sadly ๐Ÿ™ I realized that XMLHTTPRequest the my most trusted tool cannot talk with another server beside mine because of the security reasons. Thus, I started to search about this problem on internet as a Google oriented computer engineer and I found three solution. I will give some little explanations not all implementations. If you wan to get more please ask to internet.

1-)(most common one) The best approach is having a server-side proxy that receives Ajax requests, and in turn, sends HTTP requests to other servers. This should be carefully implemented by sanitizing input and whitelisting the types of requests that are sent, and the servers that are contacted.
2-)If you are using apache server, configure your server to be able to give permission for such connection
3-) What you can do as a third is dynamically create a SCRIPT tag and reference an external address

choose one and search it... good luck ๐Ÿ™‚