Sunday, May 9, 2021

085400100005001 Programming standard IO INPUT interface

 085400100005001 Programming standard IO INPUT interface


I did a frame for powershell to have an interface to control a powershell script (the program)

It use internet explorer.exe and it's comobject to display buttons, input and results in 3 frames in interne explorer.

It's not the best interface, but it's an example for this blog to how to dynamically use a program to build the interface, use it, and display results

Here is the article and the code about this interface:

https://www.experts-exchange.com/articles/27219/PowerShell-dynamic-web-interface.html




085400100005 Programming standard IO

 085400100005 Programming standard IO


IO stand for input output

With your client at the table, you should define what will enter the program and what will exit the program.

Draw some data inpur screen on paper if you need to. The show it to the client. He will change it! But if he change it at this phase in the project, you will not have to reprogram all your interfaces ;)


085400100005001 Programming standard IO INPUT interface

Control buttons on left (or on right on a phone so the thumb can access it)

Try making your control button with a list (array) dynamically. 

So when the client ask to add a new buttons, you do not have to rework the whole interface. Mouse editing an interface is the old way to do an interface. Programmers can make a loop to build each buttons of the control interface easily. I don't even know a language that cannot do it.


085400100005002 Programming standard IO PROCESSING

Try making a log, and erase log older than 40 days. When the client call with a bug, you will be able to read the log and know where the program crashed. (or where is was headed before crashing)

Always trap all error

Dont put more than 1 instruction in a try catch (error trapping)

If you do, you will never know where the bug was...


085400100005003 Programming standard IO OUTPUT

Html report mostly (the pagesetup in html will justify everything for you in the output)

Excel file, PDF file.


085400100004 Programming standard ANALYSIS

085400100004 Programming standard ANALYSIS


Analisys is the pre program analysis. 

If the program exist on the market and do exactly the same thing your program will do, there is a chance wou will suggest your client to buy it.

You can also search of a library can help you to program the program.

So you really want to reinvent for 10 000$ a frame that can edit database content when there is so many on internet for half the cost?

Unless your client have a very special need, and is willing to pay for a personalised interface, buying or finding a module is faster and most cost effective.

Almost nobody build their own engine is 3d games. Most poeple buy it.

This might be the same for forms to edit and modify database

But not for reporting. All the reporting module i see, are so complex and demand so much editing, that a simple web report can replace them all... With a little CSS and html page setup for printing. A html file can do the job for reporting. The html will do almost all the job you need for the header, footer, pagesetup. And it will not even cut the extra text of a long field. Of course you will have to learn a bit about html and css. But  it will be in this blog.






085400100003 Programming standard DOCUMENTATION

085400100003 Programming standard DOCUMENTATION


Documentation is the document about the program

Table of content, images, sometimes diagrams, version of the document and path where to find it whe you only have a hardcopy.

Most poeple document after the program is done, but it is a bad idea because most of these poeple dont have the time or the budget to do it after. (or the will power)

So you have to document as you program. To do that, start the main document the first day you start writing code. The document will be very strange and full of things you will not need later. Because of this, lt's assume the first docuement is a log of what the program do, or what you intend to do with the program. Kinda of a log of your actions and plans.

When you are at the step of doing the real document, you will have this first document as notes to compose the real thing.

The document is not the the program diagram. It's something everyone can read to use the program.

So first, it will have a small definition of the words needed to understand the document (computer science is not known to everyone, use regulard language as much as you can)

I know some poeple will not agree with using common words to explain complicated stuff, thoses poeple, ignore them, no one understand them anyway.

So if you are about to say use the term "DB" in the document, then use database. And if you use database, then define it in the first part of the document as "a serie of tables related to each others with some identification number".

Some will now say my definition of database is not the right one. Well, they might have to learn that not everyone is a programmer. Just as they might not understand the mecanic repairing their car. Everyone have a domaine of knowledge in wich they excel more. And know more. The person reading your document might not know all the terms invented recently by internet.

Try to do short sentences. If there is too  much text, no one read it. It's called pollution of information. A polluted document is not readable or very long to read.

Add images of the screens from the program. I know, images are big! So what? Some poeple like visual input. It's hard to find the button "options" when the person doing the documentation forgot to say it's in the edit menu. The image will show that.

Checklist:

1. Table of content, version, path to document

2. Word definitions for computer science words. example: database.

3. Short sentences. Do not pollute the information.

4. Images for the menus and sub menus.

5. Start your document at the first line of code or else you might never do it.


085400100002 Programming standard REQUIS

085400100002 Programming standard REQUIS

Requis is short for requirements

For this standard, you require:

085400100002001 To know how to read, 

085400100002002 Have internet access (the first time at least)

085400100002003 To have a basic understanding of procedural programming language (we might go in objects programming too, but for the standard to apply, the language cannot be for example: LISP. Lisp is more a "flow" language than procedural.

085400100002004 To have access to a computer, keyboard, screen; to practice this programming (you can do it in your head, but eventually you will have to apply is to a practical application)


085400100001 Programming standard Nomenclature

Programming standard

This programming standard can apply to any language, it will have example mostly in powershell and csharp.

Document managing
Nomenclature / Managing documents for this blog

Let's use 3 digit for identifying stuff. All from 000 to zzz (case being not important)

The first 3 digit is the client identification. Numbers and alphanumeric, from 000 to zzz
The client being myself, let's say I am number 085 (wildboy85 being my easily identifiable internet nickname)

085 Clave 
Will be the client name (the name clave come from, a cloud in a cave, meaning my cloud is in a basement)

400 TIC_Informatique
Will be the main sector number for TIC (information technology and communication)

100 Programming
The sub sector will be programming


001 Programming standard
Project number and name, sequential, so 001 is the number for "programming standard" project


001 Nomenclature
Numerotation, names. Made so we can find and replace easily. Also eays to refer to. Also have an order of things.

002 Requis
Requirements of the program. Do you need a database? A special module? A library from somewhere?

003 Documentation
Documents about the program (no, it will not be at the end, and be forgotten :P)

004 Analysis
This is a phase of the project

005 IO
Inputs output design, what go in, processing and what goes out
What screens are the inputs, wich fields? What reports or screens are the outputs?

006 Database diagram
How many tables? What are the relations? What are the keys? What are the restraints?

007 Processing diagram
Drawing of the input, output and processing. At the macro level (1) or more detailed. (up to 10)
Note: doing a diagram level 10 is the same thing as programming the whole program visually

008 Database diagram

So, the id:
085400100001005 will be:

Company:
085 Clave

The sector, computer science (informatique):
400 TIC_Informatique

The sub sector, programmation
100 Programming

The project, establising a programming standard:
001 Project about programming standard

The first phase of the project, the analysis:
004 Analysis
etc.

This nomenclature will allow us to find any section with a simple search very fast
It will also allow to easy referencing
It will allow us to identify a document with an id that have a meaning


Sunday, July 5, 2015

Starting a program with Wildboy85 standard - Information and requirements

1. The requirements

Comments at the start of the program that will tell the programmer what was used to make this program work

First, i know i could make a XML file with tags, to describe each section of a program,
requirements, diagram etc. Or a visio or word document.
It would be better, but we have a time constraint and a tool constraint.

Tool constraint
You could be in notepad programming some PHP or windows script, or vb.net or Delphi, or ladder
Finding a common way to describe your program, it's requirements and it's structure is of course what is called documentation. You would have to run Visio (for a diagram), word editor, for a description, another word editor, for troubleshooting the interaction of your program with other softwares (windows, web browser etc.)

Time constraint
Also, your boss want the program "soon" so you do not have time to update your documentation and your program at the same time

In conclusion, we will use comments in the program to do almost everything (a user guide can be done later in a document)

There will be a few levels to the standard
The first one to include things in the header

1.1 The name of the program
1.2 Revison of the program
1.3. The author of the program
1.4. How to communicate with the autor (I suggest you make a blog for each program)
1.5. The function of the program
1.6. The software used to make the code (visual studio, notepad aka, text editor)
1.7. The platform used to interact with the user (windows, a panel view, a Mac)
1.8. The requirements (inplements, include, imports, libraries that will be used by the program. Usually come from the platform)

'=== outlook addin model 01
'=== 2015-07-05 start program
'=== by Serge Fournier, 2015-07-05
'=== sergefournier @ hotmail.com (remove space before sending)
'=== this program is a outlook addin model to make more outlook addins
'=== program used: visual studio 2013
'=== Platform: windows 7 sp1
'=== require .net 4.5, outlook 2013