Good Programming Language

In the previous post, I mentioned the thought of picking the best programming language for the job. The process for deciding one is q daunting and difficult task. Researchers at MIT have developed a ‘Language Evaluation Criteria’. They propose the 4 main characteristics for switching over to a new language. They are readability, writeabilltiy, reliability, and cost. I attempt to explain each below.

Readability, the biggest of the four for me. It is important but ultimately it will save a lot of time and money down the line (think maintenance) Before the 1970’s, languages were designed for computers in mind, not programmers. While it was close to the machine, it did not do a good job communicating to the writer as a language in the literal sense. In the early 1980’s, language designers began making strides in this direction. A language is considered readable if it prospers in simplicity, orthogonality, syntax design, and data type design.

Simplicity is crucial because it makes it easier for programmers to pick up the language. The fewer constructs the simpler it is in general. Othorganility is all about using primitive features to construct advanced ones. Data types of programming languages need to be intuitive as possible. An example below:

time_out = 1 ; vs time_out = false;

While they both convey the same meaning, the data type on the right is much more clear to the user.

To Be Continued. Part 2 and 3 will be up shortly. ūüôā

 

Benefits of Program Language Design

There are a few benefits of having a great deal of knowledge on program language design. When a programmer learns the ins and out’s of language design, they are able to learn new languages effortlessly. There has been literally hundreds of programming languages since the late 1940s however they can be categorized into 3-4 types of languages all with the same design. Looking at 2016’s top 5 programmings languages (Java, C++, Python, JavaScript, and C#), once can see they are all imperative languages based off of C. Therefore they provide similar features such as for-loops, if-statements, data types and sub-functions except in slightly different syntax. A programmer from one language would simply just need to acquire syntax and quirks from the language based on the concepts he learned in programming language design.

Another added benefit is the programmer is able to better decide which program language would be best suited for the project. Most programmers only learn a few languages on their own or through an in-house training. This results in the professional programmer to continue to use the language even when is it not best suited for the job.

 

Dissecting ToDos Part 1

As mentioned in the previous post, I completely love the ToDosMVC project. For such a simple project, the programmers/contributors put a lot of effort into making clean readable code. It really is a great resource to learn off from by studying it.

In today’s post, we’ll go straight to the code and get our hands dirty of the jQuery function.

http://todomvc.com/examples/jquery/

Actually before diving straight in, please give yourself 10 minutes to mess around with the features. The first step into learning off of anyone’s code is to get a picture of how the program works.

ToDos List Main Functionalities:
1) Delete
2) Modify
3) Add

If you have taken an algorithm course, you might understand that either delete or add functions are the simplest. In this case, I chose to analyze the delete function because it seemed the easiest.

Using google chrome’s developer tools, locate the delete function and simply run through it line by line.


destroy: function (e) {
this.todos.splice(this.indexFromEl(e.target), 1);
this.render();
}

Hurray, we found the delete function! Let’s go through this line by line.

destroy: function (e)
An event interface is passed through the destroy function

this.todos.splice(this.indexFromEl(e.target), 1);
We can assume [this.todos] is an array because splice is a method only used for arrays. If you’re not familiar with how splice operates, refer to MDN but basically it’s often used to remove an element from an array. However, you must know the index is located in.

Which we then run to an unknown method, “indexFromEl”. Luckily, for Chrome we can step into the function and check it out.

We will look through indexFromEl in the next post.

 

October Round-Up

Every month, I round up a small list of resources/links I believe every web developer should give a read. I’m not going to spam your bookmark list with endless articles to read but I’ll put up I will put 2-3 of the hottest reads in the industry. I will also share with the world some useful resources

Articles to Read:

How it is like learning JS in 2016 РA great fun read that sums up the industry.
The path of software development craftsmanship¬†–¬†Don’t be a framework chaser.
Chrome Dev Tool Tips –¬†Absolutely useful.

General Resources:

Dribbble¬†–¬†Easily the best spot for UI inspiration.
Python Tutor¬†–¬†Helps you visualize code (works with non-js languages too).
Hyper Dev¬†–¬†Online IDE that is actually good.

Sorry, for the short post today. Been working way too hard on a ToDo list application that I simply do not have time for anything. Enjoy and see you all tomorrow.

 

 

 

 

UI/UX: Neighbor Hoods App

Every 2 weeks, I participate in a community project called Code for San Jose. A bunch of coders come together to solve problems the community might have. I’ll go into detail in a future post but I have been to 2 meetings and I absolutely love it. I have always been one for helping out the world through coding. Today’s project was proposed by the founder, Kalen, to create a web app for neighborhood associations. Enjoy below.

Project background and description: Interest for neighborhood association app  was growing in the community of San Jose.  However, members of the community complained that while the community was interested in such events they do did not know their neighborhood association.

We propose a website with the ability to look at the map, click on their neighborhood shape, and learn more about the Neighborhood Association is best (ie. website, Facebook page, Twitter account, meeting location, meeting dates). To summarize our v1 requirements are:

  • browse map of San Jose with neighborhood overlay
  • it should pop up information when neighborhood is clicked
  • it should display all of neighborhoods in full list view

web

Mobile Version:
A large percentage of the world browse the web through their phones so I felt a need to design a strong responsive web app. App condesnses when viewed on smaller resolutions

mobike