CSE4 - CSE5
programming logic and needs
when a new programming problem arises a best practice is to write down what has been understood and what is wanted, and best case to have examples.
variable types
(since this book is designed with the idea that zero to how to create a system
if basics are known skip this part
Let's put some basic concepts into play
->variables matter in the sense of 2+2 = 4 if the type is numbers but if it's something else '2'+'2'='22'
a simple way to get this is if you add book + ' ' + cover = book cover)
->conditionals
from the simple logic of keeping selected items from a list of items to controlling the flow of the whole solution
->loops
displaying all the data from the database, and adding a counter
->arrays
accessing the data structure called an array, answering the question? how to deal with it
->exceptions
store the value element1 to the variable array in its first location (0)
array[0]=element1
display the value of the first array location
echo array[0];
->methods
with a bit of try and error, it's not difficult to put whatever repeated code under a name and call it when needed
basic example
sum($a,$b)
return ($a+$b)
Those are only the basics, this book is not designed to produce code programmers.
Let us return to our payment example, and will use all the above concepts.
here let's use CSE5-4-3
Payment (accounting related)
let's create an interface (that takes the client's inputs), that allows the client to enter his/her payment data since the Database was created in CSE3, and now let's create the programming backend
after the database is created, now let's create variables to store all the necessary SQL commands
$variablename = "the SQL commands";
$variablename = "connection";
//etc setting all the basics that the solution needs to run
getting all the data from the database
using a while loop to display or use all the data, as an easy approach the data should be stored in an array,
then using a normal display command (cout, print. echo) any report can be produced.
and to close our example with the basics of the payment movement is payment to accounts can be + and if it + to display income in the place of +.
and to get the related data from the user's table using the user id in the payment table using a method that takes the user id, then within the method gets the needed data. it's better with the local scope.
things that can be learned or added
-> program naming
-> recognizing errors
(white paper list)
-> always back to the fundamentals
-> if you can use any code more than two times, create it as a method/function
-> global and local variable scope declaration
-automation
2 codes
1→ to do the matter
2→ to allow the system to do it
~code remodel
~code reuse
~code copy paste logic
~compilers
+code syntax tree (position := initial + rate * 60.)
+code optimization
_-data structures
_data types, operators, control statement, string,
how to write an algorithm
function
object
files
math functions
time and date functions
~Memory management
~file control
~distributed
~network
~linux vs window vs mac
application system
front end
what the user sees
components system
back end
what works
any system got any factors that need to be looked upon
requirements capturer
system architect
designer
implementer
tester
project manager
installer
customer
end-user
file's extension clone
backup and recovery
index
client / server
constraints
start
storage, memory, processes
error types
- internal processes
- feature
- interface
- define the system environment (application, bustiness, middleware, system software )
- system consists
- degree of use
- unit-testing
- system training timeline
- system supporter
- rest over time (the system that goes 5 years what will happen)
disclaimer
As the first project is done since this book is based upon the fact that it's about the minimal value solution to be delivered so as more and more experience gain more advanced logic and programming concepts might be used, keep in mind to change the level with each solution.
---------------------------------------------
Last updated