Sunday, July 24, 2016

MLP - MultiLingual Programming Language full localization is finally here

There two great news for MLPL users.

First thanks to the help and hard work of my friend and colleague Ivan Stamenković the newly finished MLPL web site has beautiful modern design. You can access the site here. On the web site you can download the latest implementation of MLPL interpreter for all supported platforms. You can also find the comprehensive documentation of the MLPL. Now all the information you need regarding MLP can be found on the web site.

Second the new version of MLPL is finally finished. New 0.3.0 version which finally brings full localization has been completed. In this version, besides keywords, all messages returned by the MLPL interpreter have been localized. Now users are not only able to write code on the language of their choice all the messages they receive while they code is being executed will be in their chosen language.

I am hopeful that these latest improvements and resources will greatly increase the effort new users need to invest in MLPL and help kids start coding faster.

If you wish to build MLPL yourself or contribute to the project he code is available on GitHub.

Thursday, May 5, 2016

MLPL - MultiLingual Programming Language version 0.2.0 is out

This last couple of weeks have been busy for me. Trying to organize a repo of MLPL and make life easier for potential contributors, speaking with one of my friends about the design for the web site.

But I managed to add a little bit of new functionality to MLPL that was lacking. As I wrote in the previous post MLPL started as a close copy of TINY. What TINY and previous version of MLPL lacked was string support. Only type that you can use in your code was integer.

Integers are still the only type that you can manipulate with MLPL, and that probably won't change for a while, but I added support for printing string. Now you can print a message in you code before you request an input from user. You can also print a message prior to printing the result of your computation.

I hope this will greatly increase the usefulness of MLPL as a teaching tool.

There is still a lot of work before we reach version 1.0. Some features need to be added and some bug I discovered need to be fixed. But that will have to wait until I complete a website which will allow users to download an interpreter and get documentation on the language.

Hopefully you will not have to wait for long.

Monday, April 25, 2016

MLPL - MultiLingual Programming Language version 0.1.0 is published.

Multilingual Programming Language, MLPL, is envisioned as an introductionary programming language for children.

A problem with majority of programming languages in use today is that they require some knowledge of an English language and alphabet. Children from non-English speaking countries therefore have a higher barrier for entry than children whose native language is English.

Idea behind MLPL is to create an interpreter for a language with very simple syntax that can be easily localized. A programmer would beside source code file provide a file that contains all the keywords localized to programmer's native language. Thus, children from non-English speaking countries can start programming at much earlier age.

I created MLPL with hope to enable kids to start to learn programming as soon as they are able to read and write in their language. This also enable kids to make their own language and write code in it. The 0.1.0 version is the first version available to public. There are still a lot of work ahead.

This version on MLPL is a very close replica of TINY programming language developed by Kenneth C. Louden and available on TINY didn't have some features that I would like to include into MLPL, like printing string messages, and had some features that I would like to change, semicolon is not allowed on the last instruction of the block.

Besides this I need to create a web site where people can download a built version of the MLPL interpreter for their operating system as well as get documentation on writing programs using MLPL.

All feedback from you are also highly welcomed. I am hoping MLPL will help kids start their journey so if you have ideas on how I can improve MLPL please let me know. Or better yet clone the official repo and start contributing.

Sunday, April 24, 2016

Starting Java web development with Maven and Spring

When beginner asks seasoned Java developer about Java web development you will get a lot of positive feedback. Great mature tools and framework. Big community. Great job opportunities. Cross platform support. One plus after another.

 But want you won't hear is that starting can be pretty hard if you want to do it right.

"How would I start building a simple web application?" you would ask.

"Simple." for some reason it always starts with simple. "Just use maven to create an webapp project. Set up Spring and other dependencies in pom. Import it in [insert his/hers favorite IDE here] and just start coding.

If you are a person completely new to this you can spend weeks reading documentation, trying and failing until you manage to set up everything together before you can even get to a part you were interested in the first place. Coding the actual application.

I know this because I was the one doing the asking years ago. And this was the answer I got. The answer people still get. And they get it because after spending a lot of time learning all these things and building a lot of project we simply forget that all of that looks alien to somebody new.

A former colleague asked me how to set up a simple java web application. And his reason is not because he wants build a web application. Its because he wants to practice writing test. He is a QA engineer and a rather good one, but he didn't spent years doing Java web development.

I decided to try to answer a question in a different way. By creating a fully setup boilerplate application that he can compile and deploy right away. That way he has something that is already working and can just start adding to without too much trouble. Later as he learns he can start to replace bit by bit until he knows how to do all by himself.

In this blog I will give a short introduction to spring demo, a java boilerplate application that has spring, spring security, junit and logging set up with maven and that should be a good starting point for beginners. You can download the application on my github repo here.

This post assumes you have good Java knowledge. If you don't I recommend one of many Java book. This application might be little to advances for you if you never coded in Java.

This post assumes you have java and maven and a java web server installed on your machine. For web server I recommend Apache Tomcat because it is simple to set up and use.

If you miss any of these things you can download them from the internet and find instructions how to set them up.

How to get the application to Work


Once you download it open the console and go to the root folder, the one that contains the pom.xml file. This file is used by maven to build your application and set up all dependencies. More on that later. Once you are in the root folder enter maven clean install. This will create a target folder that will contain springdemo.war file. This is your application. Deploy it on your server, google how for the server you have. Start the server and go to http://localhost:8080/springdemo/ with your browser. You should see a login page.

Explaining the application structure


Application follows the standard maven structure. You can read more about it and how to use maven on official maven site. Pom file contain spring, spring security, junit and logging dependencies. It has also stuff needed for Eclipse, IDE I use, but you should be able to use an IDE with it.

Application has Spring context file in /src/main/resources/, test context file in /src/test/resource/, servlet context file and spring security setup file in /src/main/webapp/WEB-INF/. If you are unfamiliar with spring, spring security and junit go to official sites. I may write some posts on each but adding explanations here will make this post too long and will dilute the purpose of making explanation simple. Tests are in /src/test/java/ and application code is in /src/main/java/.

If you don't want to bother to much you can just add application code to /src/main/java/ updated the /src/main/resources/applicationContext.xml with your new classes and update /src/main/webapp/WEB-INF/aplicationContext-security.xml for new pages you added.

Final notes


This boilerplate app is just a starting point. It is meant to save you time in the beginning and get you to coding part faster. In order to get where you want to go you will have to possess some knowledge about java web programming, spring, spring security and other technologies you will use.

I hope this application will help people get to java development with spring and maven faster. If you have, question, comments, complaints, suggestion please leave them in the comment section.

Happy coding.