Link to home
Start Free TrialLog in
Avatar of Jenn3
Jenn3Flag for Åland Islands

asked on

Designing a Good Consumer Software with little Resources

Hello. This the first set of questions in a Series of 3 or 4, which i hope to learn from everyone. I appreciate any pointers and sharing of experience.

Situation
----------
Of late, i have been thinking of how a single (or maybe 2) developer(s) design and develop a desktop based software for home users. The team i work with normally has 12 core developers with additional people for other things. I am interested in the processes and thoughts of single developer working on a project.

Question
----------
When developing a Desktop based software for home user...
[1] How do you begin designing the software product?
[2] What language and technology do you use?
[3] What tools do you use?
[4] What concern you most?


Appreciate all the ideas and considerations. Thanks.
Avatar of MilanKM
MilanKM

Hi Jenn3,

I’m a Software Developer & till date have done around 10-12 successful Software & Web projects for various clients. As I’m a student I don’t have any team & I have done all those single-handedly & that’s why I’m attracted to answer.

Whenever I do start a new project, I do following points in my documentation.

1> Introduction/ Objectives

2> System Analysis
     - Identification of Need
     - Preliminary Investigation
         i. Questionnaires
         ii. Interviews
         iii. Observation
         iv. Sampling

3> Feasibility Study
     - Technical Feasibility
     - Economical Feasibility
     - Operational Feasibility

4> Software Paradigm Used *

5> Software & Hardware Requirement Specifications

6> Testing & Test Reports

7> Training & Implementation

* I have used RAD model in first 2-3 of my projects but later I moved to Incremental Model as with this model customers can start using the software (surely not with all requirments) much earlier then RAD and it also helps me to track the bugs out and fixed it with the next increment.


Now, ur second question: “What language and technology do you use?”
Well, for software projects with small to medium transaction I use Visual Basic as front-end & Access as back-end. But, for projects that deal with larger data, I use MySQL.
Where as for web-based, project ASP & Access/ MySQL.
But now I’m trying to move to VB.NET (PHP & ASP.net for web-based project), but may be for lack of time (As I’m a student), I think it will take time.


Tools: Exactly what tool ur asking for. By the way, I always like to use any Microsoft tools. For web based graphics I use Macromedia tools e.g. Fireworks for static graphics.


Finally the concerning fact, well I think always it's customer satisfaction & user friendliness. Whenever I do start a project, I always keep one thing in my mind that I’ve to provide such an interface that can be easily handled by a very new PC user after a 2-3 days training. To provide the best possible interface, I always use my own standards of designing & developing.

----------------------------------------------------------------------------------------------------
** To end with one point I can’t resolve, that I can surely declare it that you are already a master (as I read almost all of you posts here at EE) on the discussed area, but why u are with such a question. May be ur dealing with big projects or anything else?
----------------------------------------------------------------------------------------------------

:)
----------------------------------------------------------------------------------------------------
Here is the coding standard I do use in my case. Actually, the following standard of coding was written by me and was published in Asia's #1 Software Technology Magazine DeveloperIQ in April 2004 issue. (pg. 74-76).
----------------------------------------------------------------------------------------------------

It’s better to say useless, when a work doesn’t follow a very significant word of dictionary - “RULE” or “STANDARDS”. Unlike any other job may it be not related to our very context, VB has its own standards of coding. I don’t know how many developers follow these sorts of standards or follow after reading this article.

Here in the following section you can find basic coding standers for Visual Basic.
Initial Standards:

• In a Visual Basic project there are numbers of forms, modules, class files, resource files etc. Firstly all these files must be stored in the same folder, including the main project file (.vbp) with a related name and proper prefix.

• Related name means the “customer details” form should not be saved as “abc” it must be as “custDet”. A Proper prefix must be attached such as “customer details” form should be saved as “frmCustDet”. Below a list of prefix for various VB source files.

File Type              Prefix      Example
----------           -------               ----------
Project               prj                    prjMyProject
Form               frm                    frmCustDet
MDIForm               mdi                    mdiMain
Class               cls                    clsAdd
Module               mod                    modUser
Resource File      res                    resIcon
Property Page     ppg                    ppgText
Data Report        dsr                    dsrCust
User Control       UCtl                    UCtlTree
User Document   UDoc              UDocInfo

• Must use naming convention for variables, controls etc. (Discussed in Previous issue Mar’04 ‘Give A Professional Touch to Your VB Application’)

• Suitable project title must be there with every project alone with proper version information, company name, file description, legal copyright & product name.

• Must specify a project icon, later after compilation it would be the icon for the .exe file.

• Always use a resource file to store icon, images etc. required for the project. It saves the memory in a huge extent by decreasing the size of the main application. It stores those media files separately in a file with .res extension.
To make a resource file go to ‘Add-Ins’ menu & click the ‘Add-In manager’ option. Then select VB6 Resource Editor & in the Load Behavior option select Loaded/ Unloaded.
 
After this go to ‘Tools’ menu & click ‘Resource Editor’. Then from the menu icon of ‘Resource Editor’ IDE add required icons, images or other files.
 
Here you’ve to put separate ID for each file. Suppose a background image is stored in the resource file and the ID is 101, then you’ve to write following codes to call that image.

Private Sub Form_Load()
imgBck.Picture = LoadResPicture(101, vbResBitmap)
End Sub

• The “OPTION EXPICITE” statement must be there in all source file. By using this statement you must have to declare each variable you need in your project. It stops any unused variable declaration & helps while debugging.
To declare this statement automatically while coding, go to ‘Tools’ menu and select ‘Options’. Then in the ‘Editor’ tab select ‘Require variable declaration’.
 
• Menu name must have a ‘mnu’ prefix. e.g. mnuFile.

• Menu separator must be used when there are logical breaks in the menu items. e.g Suppose in the ‘File’ menu ‘New’, ‘Open’, ‘Save’, ‘Page Setup’, ‘Print’ and ‘Close’ are the menu item. Then a separator must be used after ‘Save’ menu item & another before ‘Close’.

• Shortcut keys for menu items must be used as Windows. Such as we ‘Ctrl+C’ for copy, ‘Ctrl+X’ for cut & ‘Ctrl+V’ for paste.

• Every main menu must have an accelerator key. Such as ‘Alt+E’ for ‘Edit’ menu.

Coding Standards:

1. Variable Declarations
---------------------------  
• Variables must be declared explicitly. Option Explicit should appear at the top of all modules and forms.

• Use the ‘Dim’ keyword for from level variables, but for module level variables ‘Private’ or ‘Public’ keyword should be used.

• Local variables should be called at the top of the procedure, not in the body section.

• Variables must no be declared ‘As New’ without proper requirement. Declaring as ‘As New’ has a scope of Creating Objects which may lead to over processing.

• ‘As’ keyword must be used while declaring a variable. ‘As’ keyword affirms a particular sort of data type. e.g. Dim strName As String.

• One variable should be pointed for a particular task, instead of several unmatched tasks.

2. Procedure Declaration
----------------------------
• Procedures must have a defined scope of such as ‘Public’, ‘Private’.

• Procedures must contain a clear exit code to clean up when they are not in a live role.

• Parameters in the procedure must be with a perfect data type.
e.g. Public Function chkNM(ByRef nm As String)

• Parameters should be declared as ‘ByRef’ for performance reason, when they are being not to be changed use ‘ByVal’.
Passing by values (ByVal) the procedure gets an exact copy of the passed argument.
Passing by reference (ByRef) the procedure gets a direct access to the passed arguments memory address.

3. Error Handling
-------------------
• Each and every function & procedure must have a error handler.
• ‘On Error GoTo’ statement should be use for an unwanted runtime error. Before & after the Error statement ‘Exit Sub’ should be used.
e.g.  
On Error GoTo errMsg
Coding Begins
------------
------------
Coding Ends
Exit Sub
errMsg:
Msgbox “Error Message”, vbCritical
Exit Sub

• ‘On Error Resume Next’ statement should be placed correctly, as when a error occurs it immediately jump to the next line of code by ignoring the error. While using this kind of statement, the raised error must be trapped using Err.number statement and take a necessary step.
e.g. Suppose you are executing a particular exe file. Then the code should be as follow by using ‘On Error Resume Next’ Statement.
On Error Resume Next
Call Shell("C:\filename.exe")
If Err.Number = 53 Then
    MsgBox "File not found", vbCritical
End If

• ‘On Error goto 0’ statement should not be use when you are not sure for a possible error. It skips the error trapping within a particular procedure.

4. Coding Structure
-----------------------
• Use a single statement per line.

• Avoid writing long codes in a single line; continue in next line using ‘_’ operator when a line goes over 80-85 characters of code.

• Never use a single line ‘If___Then’ statement & this statement must be end with an ‘End If’ statement.

• Proper indentation is a vital fact in coding. By default indent setting for ‘TAB’ key is 4 spaces. Indentation should be as follows…………………..

If myStr=”” then
      statement1;
else
    if myStr=”myname” then
             statement2;
    End If
End If

Nested ‘If______Then’ or ‘Do_______While’ or ‘For______Next’ statement must be intended properly level wise.

• A ‘Comment’ to a code tell us the purpose of that particular piece of code. And when it’s a group project comment is a very essential part. On the other hand it would be helpful for us while debugging & we editing or updating a code after a long time.
Comment must be intended as the same level of the concerning code.

5. Performance
------------------
• It is a must to clean up the used memory when the application comes to an end. Following table shows you how to retrieve used memory.

Type of Variable                      Code to Retrieve Used Space (Memory)
-------------------                        ---------------------------------------------
Form                                      Unload frmFormName / Unload Me
String                                      strStringName=vbNullString
Variant                                      varVariantName=Empty
Object                                      Set objObjectName= Nothing

• Must avoid dead codes. As dead codes are no longer needed by the application, it unnecessarily absorbs some memory & increase the size of the main application. While debugging many developers use just a comment mark before the dead code instead of erase that out.

• If possible use ‘Image Box’ instead of ‘Picture Box’, as it loads a picture much faster.

• Must not use any static variable. As static variables are reside in the memory for the entire execution time. On the other hand dynamic variables are more efficient, because dynamic variables are created when the procedure is on a run & killed immediately as the procedure ends.

• Fixed length variables engage more memory compared to variable length variable. So, if possible must declare variable length one to make your memory less occupied.

• For inserting blank spaces do not use ‘Chr$()’, as it decreases the performance. As a substitute use ‘vbTab’ statement for a better performance.

• If possible, always use the ‘Private’ keyword in procedures. As it will make that declared variable available only in that particular module, which improves the performance.

• For faster performance use ‘Compile to Native Code’. although it needs more memory. For faster optimization use ‘Optimize for Fast Code’, although it needs more memory.

On the other hand ‘Optimize for Small Code’ avoids unnecessary access to virtual memory of local disk, but in the running situation it absorbs physical memory in a huge.

6. Others
-----------
• Never use a fixed full file address when using ‘Open’ or ‘Close’ statement, as it differs computer to computer; rather use any path using system function. Such as app. path or use GetSysDir().

• Every file must be opened with a particular file name (e.g. Open …………#1) & while closing use the related file number after the Close statement.

• ‘+’ operator should not used while concatenating two strings. In this case ‘&’ operator must be used.

• Always use an affirmative ‘Boolean’ variable. e.g. You want to declare a Boolean variable for checking null values; in this is use ‘blnIsNull’ instead of ‘blnIsNotNull’.

• The ‘GoTo’ statement should be avoided except ‘On Error GoTo’ as it may cause unwanted skipping of important.

:)
-----------------------------------------------------------------------------------------------------
Here's some simple points extractacted from another article published on the same magazine on  March 2004 issue. (pg. 58-61). I use all the followings to improve user interface & friendliness.
-----------------------------------------------------------------------------------------------------

2. Validate Numeric Fields
------------------------------
When in your application there are some numeric inputs such as telephone no., salary, age etc then you should use a field level validation. You can use the following code on the KeyPress event of a TextBox.

Private Sub txtPhno_KeyPress(KeyAscii As Integer)
    If Chr(KeyAscii) = vbBack Then Exit Sub
    If KeyAscii = 46 Then Exit Sub
    If Not IsNumeric(Chr(KeyAscii)) Then
       KeyAscii = 0
    End If
End Sub

In this concern you must remember to allow user the BackSpace key, // Chr (KeyAscii) =vbBack then Exit Sub // On the other hand if this numeric field is not a telephone number or such a field where we’ve to allow the decimal (.) then same as above we’ve to write If KeyAscii=46 then Exit Sub; where 46 is the Ascii Value of (.) operator. You may rewrite above code as a function.

3. Error Trapping
--------------------
• Whenever applicable use field level validation. If not possible in every cases then use form level validation. With a simple example you can easily differ between field level & form level validation. Suppose, in the customer details form there are several fields where phno. is a field and user can only enter numeric values (0-9). Now you can validate this field in 3 ways. On the KeyPress event (see code-1) / LostFocus event of that TextBox or on the Click event of the save or update button. Here first two are field level validation & the 3rd one is form level validation.

• In some cases users often make a mistake of opening the application twice, when the program is already running. This may cause several problems- such as unnecessarily it absorbs some memory, malfunctioning. For a database project it may causes error messages such as connection already open. It is necessary to keep this little fact in mind. Following lines of simple codes will help you prevent your application form executing twice at a time. Remember to place these codes below in the load event of you main form (e.g. MDI Form)

Private Sub Form_Load()
If App.PrevInstance = True Then
‘This code finds if this program is already running or not.
MsgBox "Application Already Open", vbCritical
Unload Me
End If
End Sub

• Error with NULL value is a very common problem in database projects. Where almost every database has a support for NULL value; but in VB, controls such as TextBox can’t store a null value. That’s why while displaying data in TextBox or Label or any other control, a runtime error occurs (Err.No. 94) & displays the message “Invalid use of null”.
This error occurs mainly when data is being displayed via a query. Suppose in a TextBox (txtBalance) we want to display the ‘custBalance’ field from ‘transaction’ table. Then the code will be as follows, when ‘rs’ is the recordset & ‘con’ stands for active connection.

rs.open "Select custBalance from transaction WHERE Name='Milan';", con
     txtBalance.text=rs!custBalance
rs.close

Now if the customer balance is NULL for any reason, there will be a runtime error. To terminate this particular sort of error use the following function.

Public Function vErrNull(vVal As Variant) As Variant
If IsNull(vVal) = True Then
    vErrNull = ""
Else
    vErrNull = vVal
End If
End Function

Just pass the above function like this – txtBalance.text=vErrNull(rs!custBalance). It will definitely vanish your problem. In every case you may use this function as this function will simply pass the value if it is not a NULL value. You can also use this function in reverse cases while storing, such as rs!custBalance =vErrNull(rs! txtBalance.text)

Convert your ENTER key in TAB
---------------------------------------
You can see in many popular softwares, where user can easily move from one field to another quite easily by pressing the ENTER key. In visual basic application by default we can do that with TAB key. But user always prefer to move between one field to another by pressing the ENTER key. So, we’ve to convert the ENTER key into TAB. Following code will show how to make it possible.

Change the back color of the active control
-------------------------------------------------
It would be helpful for the users if he/she can easily watch the active control. In some 16-bit application you may see that the field where a user is entering some data is in a different color compared to other fields. In brief just change the back color when a control got focused. In this context, if I ask to solve this problem, most will answer- just change the color on the gotFocus event and on the LostFocus event retain the previous color. It is o.k., when your application contains 4-6 control; but if there are 10 child forms in your application and each form contains about 8-10 controls then it must be a bulky & rough task.

:)
Dear Jenn3,

That's all I do apply on my projects. Last 2 comments posted is as it was before editing, and sorry for the word "you", as appears almost everywhere in my previous posts.

Thank you,
Milan

:)
Avatar of Jenn3

ASKER

God! I just love you guys!!! :)

Let me try reading everyone's ideas and methods a few times and digests... then ask more question in another post.
Thank u SIR..., by the way it's about 02:25 A.M. at out local time, so sorry & I'll back tomorrow.

Thank U

:)
Avatar of Jenn3

ASKER

To answer the question of "Why" i am asking these questions, i would have to say:

Firstly
-------
I don't know enough as my brain sits only in 1 tiny square foot of real estate. Sometimes, it is nice to share apartments and get different perspectives of the same space.

Secondly
----------
Some of the most amazing work i have seen over the years are done by single developer who are multi-skilled and with the tenacity and focus on perfection within the initial project objectives.

My work has always been usually with a team and the work is always heavy. I hope to learn about how single developer manages and deals with software development cycle.

I have met enough people to know that i don't know enough.


I appreciate all your thoughts and suggestions.
Avatar of Jenn3

ASKER

I have read the above posts and thank you. The above is well understood and we follow them pretty closely.

What i am more interested is, is in the broader question of Strategy... maybe your own development requirements you add-on above the client's requirements.

ASKER CERTIFIED SOLUTION
Avatar of MilanKM
MilanKM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jenn3

ASKER

Thank you for the time and effort. Appreciate it. :)
I love how this gets translated:

2. System Analysis
----------------------
2.1. Identification of Need
------------------------------
"Our client is a dealer of several four wheeler, tractors, power tiller etc. "
translattion: customers sells farm vehicles

"They provide post sale free and paid service with retail parts & consumable goods."
translation: and they havea  'Parts & Service" department.

"This is one point of discussion upon which they are opting to keep a track on. "
translation:  John Boy, the boss's kid who runs the "Parts Department,"  wants to know what's in stock with one click of his mouse at the counter, or, if anyone is taking parts without telling him.

It's pretty good though.  I forget who wrote the national one first,  GM, Ford, or AC Delco, maybe John Deere?

About that "tabbing" with the "enter key," that's because the study has shown them to be mostly righthanded and there is not TAB key on the right of a so-called standard keyboard.

Interesting to review it though.  thanks milanKM

Sorry about types, some idiot in programming thinks that 10 points should show up as 6 points on a screen.  He's not  going to last long in "Software Development."




Sorry GinEric, I couldn't understand ur review. Can u plz explain what u want to say by "how this gets translated" and "some idiot in programming thinks that 10 points should show up as 6 points on a screen.  He's not  going to last long in "Software Development."

Thank U
"how this gets translated" is simple American English; it means, basically, that the specification is a little fancy when common sense shows that the flowery description is not really necessary.  In fact, most of the customers, farm equipment type hardware stores out in farm areas, will view it with great skepticism.

If you were to walk into one of those stores, or the "Combine Dealer" backlot where they keep all their models for sale [they don't "display" available models, what you see is what you get], they would have nothing like the type of software specified.

They would, in fact, have software such as already exists in nearly all hardware stores and parts departments.  One is written by hardware distributors and the other is written by General Motors.

A quick visit to any Ace Hardware, Home Depot, or Lowe's will show you what they use, as will any quick visit to any Auto Parts chain store show you the inventory control software they use by GM and AC Delco.

Not only do these programs do inventory, they are an adjunct to the overall chain store business software; usually provided by the major distributor or manufacturers of such products.

For the most part, they have been sort of commandline looking, green screen programs, that do, in fact, use the old method of the "Enter" key to navigate the DOS 'Window.'

And the "6 points thinks it's 10 points" is about very bad assumptions by web page designers and others who set a default character point size to 10 points, then the browser displays it as 6 points because the webdesigner forgot that he or she is using a 19 or 21 inch screen, while everyone else is using a 15 or 17 inch screen, i.e., the character size specified is not the character size displayed.