Browse DevX
Sign up for e-mail newsletters from DevX


Reinventing the Art of Creating Command-line Java Apps-2 : Page 2




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Determine the Need
Before you write a single line of code, you need to determine exactly what the application's needs are in terms of user input. Applications can generally be divided into two categories: computational and functional. Computational applications will take in data, feed it into a formula, and output a clearly defined result. Functional applications are slightly different. They take input from the user and perform one or more actions on behalf of the user, displaying a response when appropriate.

Determining which category your application falls into will not affect the way in which you take in the information; from a coding perspective, the syntax is the same with both types. It is, however, important to identify your application's classification because that will help you to determine the number and type of input that is required.

For instance, a computational application generally will have one or more formulas hard-coded into the source code. The only input that must be taken from the user is that which is required by the formula. With some formulas, this will vary, but these kinds of considerations will aid you in identifying what input to request from the end user.

With a functional application, the process is slightly different. You must first identify what capabilities the application will have. Does this application only perform one specific task, or several related tasks? For example, you could create an application that performed a search and replace with a specified string on a specified file. This same application could also possess two other capabilities: the option to capitalize the first letter of every sentence, and a word count which identified the 10 most common words and the number of times they were each used.

Once the scope of your application has been determined, it is simply a matter of deciding what input is required to perform the task(s) that you have outlined above. In general, the more user-friendly and forgiving your application is with the input received, the more coding is involved to handle that input. Fortunately, tools like this are used for testing, development, and general utility, so being user-friendly is rarely a top priority.

With your application's needs and scope clearly defined, you are ready to actually begin coding.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date