Machine Learning for Software Development
In this post we look at how we could teach a software robot to build a simple data driven website using machine learning.
Can we teach a software robot to build a simple data driven website using machine learning? That would be cool. This is an exploratory post. Most of our daily work is blocking and tackling, managing projects, writing code, writing user requirements, understanding a client’s strategy.
It is fun to take a break and talk about the future.
How could we program a software robot to build a site? And what does that even mean? Sometimes machine learning seems more like intelligent design than actual learning. Unless you are talking about identifying cats. That example is pretty clear.
In this post let’s start with the end in mind. What goals do we have with a software robot that can create websites on the fly?
First let’s start with the type of product we want the software robot to create. And then we’ll look at what parts have to be learned and automated.
End Deliverable: For this post, the client wants to build a site where users can sign up, fill out a form and submit it. On the admin side, the admin wants to have different security roles and be able to manage the users and forms submitted. This type of data driven web app is needed all the time. Register a user, submit data, and manage the data.
So we could build this from scratch. We would work with the client to write out the requirements. Then we would design the database. Then we would send the requirements to our developer to code.
So what parts should the software robot develop? And what does it mean to learn? Can we throw in nuances that the software robot will have to accommodate?
Could the software robot architect and develop the entire site? When I think through scenarios often it seems like I am thinking about creating a template. Where does the learning happen?
Our machine learning program could have a user interface. This is where the analyst would fill out information about the app including the database requirements, navigation and design. The software robot needs some direction. It can read the analyst’s mind, yet.
Let’s start with the database in this post. In later posts we will address the controller and view.
The requirements written by the business analyst could require the application to have the following entities involved: user; form; admin.
The user would have the following fields: userid, name; email address.
The form would have the following fields: Question #1; Question #2; comments, userid.
The admin would have the following fields: Name; email address.
So where is the learning? As the analyst is filling out the user interface screen, it would list that the user would have these fields. The analyst could fill out a form with this information. That would become a table. The software robot could auto suggest ideas, like should this user have a userid field? Or would the email be enough?
On the user interface it would list the table, which would change as the fields change. Then the analyst would work on the next table, the form. Once again the analyst would fill out the fields, or questions in this case. It would automatically add a unique identifier. Then it would auto suggest if it should connect to the customer table.
The same could be done with the admin link. Because it is the admin table, the software robot would auto suggest if there should be different security roles: super admin; admin; employee? It could support an infinite number of admin roles.
So now there are three tables on the user interface. In an MVC architecture this would be the model part where the classes define the database. The software robot would then take these tables and design them in the application automatically.
Would this be something unique? What is the main value the software robot is providing? It seems the learning would be making auto suggestions for how to design the database. In theory we could feed the software robot thousands of examples of how databases are connected. But how would we actually teach it to know how to design the database? Is that impossible?
Next, if we decide to take this further, we can talk about the view and controller part of the application and how that process can also be automated.