Self-teaching how to code with Python, part 3: Program designing

in #python6 years ago (edited)


Designing our own software

Why does this matter?


The first that thing have to be done when creating a software is to elaborate a clear workflow that issues the main problem or task that the software will take care of. Coders have to ask themselves the right questions and by answering those questions a program workflow will arise.

In order to do that, creating a wish list of what the program is expected do is a common first step when designing new software. Also, some feedback is required from potential users for possible problems and bottlenecks identification.

Identifying the problem


The first step when designing a program is to identify the task that is required to be carried out by the program. That task adresses a specific need that no current programs satisfy in a convenient way, it may be a repetitive and rutinary series of actions that can be optimized by well thoughts lines of code or it could be very complex implementations for which there currently no implemention. Also, it is important to establish the users to whom the software will be handled, and the operating system that the users will be using. This will narrow the scope of different possibilities.

The back-bone framework


The framework could be established by answering these simple questions:

  1. What do we want the program to do?
    We have to write a brief and specific description of the actual tasks that the program will have to perform (i.e. printing some messages, calculating some quantities, search and classify information and so on).

  2. Who will be the end user of the program?
    The knowleadge level of the users, the interaction frequence, and its core interest towards the solution that the program provides are quite important parameters to take into account when developing a program. This will clarify how the program should be presented to end users.

  3. What operative system will the end user use the program on?
    Whether or not it is expected to have users simultaneously running it on Windows, Mac, and other operative systems is a crucial fact to establish the required degree of program portability. Also, it is necessary to determinate if it is possible to use standard board and mouse configuration or a more customized configuration.

Creating the Wish list

We have to depict and analyze the procedure required to perform the task more deeply. In order to do that, we should ask potential users who they currently perform the task that we are planning to optimize with our program. Useful questions are: which variables users would like to control? What is the current workflow for carrying out the task and which parts of it could be readily implemented?

More detailed information can be gathered with a survey, this might include how the users expect the program to behave? What file formats they expect to use to read the information? The more detailed the survey, the more clear the horizon to start the design journey.


Crafting a Solution

Program designing is a process where the output from one stage is the input for another, also the output from one or more stages usually should be fed back through a loop of parts of the process. There are occasions where even the process as a whole should be repeated several times. When this happens within some program code is called recursion

Understanding the problem

Once the problem has been identified, we have to be certain that we had covered all the subtleties because otherwise, we will have to return to this stage repeatedly. Some features look quite straightforward when written in natural language but require further clarification when you come to turn them into programming language.

Rising awareness about what the software needs to do

The actions that we require the program to carry are called functional requirements, examples of this actions are printing messages, sending emails, text imput by the user, or fetching some date on the internet.

Other needs or limitations are labeled as nonfunctional requirements, they are software qualities related to accessibility, usability by the end users, cost-effectiveness, compatibility with several operative systems, security, privacy, and overall performance.

In this stage it is also recommended to depict the expected result of the program execution. It might be just roughly sketched, but it will provide with useful insights about the desired results from each part of the program.

Considering maintenance

Any software that has to be executed more than one time require some sort of maintenance. Also, upgrades are a constant part of software development and a mechanism that allows seamless integration between newer and current versions should be taken into account. Furthermore, it is recommendable to write the code and the documentation in such a way that allows third parties to make contributions.

Let's add all of this into a simple example


Wish_list.txt
Problem: Get the computer to add 2 plus three and print the result.
Target users: Me
Target System: Microsoft Windows
Interface: Cmd
Functional requirements: Add two numbers, print the result, input some numeric data.
Testing: Simple run-test -expecting the result of a sum to appear.
Maintainer: https://steemit.com/@joelsegovia


To be continued on a next post of the series Self-teaching how to code with Python


Previous work

Basic Concepts. Part 1

Basic Concepts. Part 2

Sources:

  • Learning Python, Mark Lutz. O'Reilly, 4th edition
  • Python Para Todos, Raúl González Duque. (Licenced under Creative Commons Attribution ShareAlike 2.0)
  • Python 3 for absolute beginners, Tim Hall and J-P Stacey. Apress
  • Python for Software Design, Allen B. Downey. Cambridge University Press

Sort:  

You got a 19.75% upvote from @bid4joy courtesy of @joelsegovia!

You got a 5.88% upvote from @joeparys! Thank you for your support of our services. To continue your support, please follow and delegate Steem power to @joeparys for daily steem and steem dollar payouts!

You have gotten a vote courtesy of @joelsegovia!
They have enlisted the help of the @alliedforces!
We gladly answer your call!
(@alliedforces is a collaboration of witnesses @jatinhota & @enginewitty)
Have you supported your favorite witnesses?

Thank you so much for using our service! Congratulations! This round earned an ROI of 52.83% with total bids of: 0.607$

You just received 12.26% upvote from @onlyprofitbot courtesy of @joelsegovia!

Want to earn more with us? Our APR can reach as high as
15% or more!

More portion of profit will be given to delegators, as the SP pool grows!

Comment below or any post with "@opb !delegate [DelegationAmount]" to find out about current APR, estimated daily earnings in SBD/STEEM

You can now also make bids by commenting "@opb !vote post [BidAmount] [SBD|STEEM]" on any post without the hassle of pasting url to memo!

* Please note you do not have to key in [] for the command to work, APR can be affected by STEEM prices

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by joelsegovia from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

BOING! You got a 3.70% upvote from @boinger courtesy of @joelsegovia!

Earn daily payouts by delegating to Boinger! We pay out 100% of STEEM/SBD!

Great post!
Thanks for tasting the eden!

You can use Utopian-io for your tutorials...

Posted using Partiko Android

You got a 16.23% upvote from @ptbot courtesy of @joelsegovia!
Delegate STEEM POWER and start earning 100% daily payouts ( no commission ).
Visit https://ptbot.ga for details.

You got a 1.77% upvote from @moneymatchgaming courtesy of @joelsegovia! Please consider upvoting this post to help support the MMG Competitive Gaming Community.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63315.26
ETH 2668.31
USDT 1.00
SBD 2.79