Categories
Foundations of Programming

FIT9017: Week 10

Week 10’s lecture by Judy started with an example of why code format convention are important if software is to be supported, extended, corrected, maintained, ported, adapted and re-used.

The focus then turned to 2 code important concepts of code quality:

  • Cohesion – Each component must contained related and well defined task, high cohesion is good.
  • Coupling – Each component must rely on as little data from other components as possible, low coupling is good.
    • Explicit Coupling – public Room northExit; (public fields should be changed to private and accessor/mutator methods added
    • Implicit Coupling – Call get/display methods instead of have 2 hard coded copies of information used in more than one class.
    • Not included was an explanation of normal coupling where a constuctor/mutator needs parameters.

Finally we covered some java commands from prompts for compiling and running:

  • compile:  javac class1.java
  • run: java class1
  • run jar: java -jar somthing.jar

We submitted our class diagrams and test strategies for Assignment 2 in the tutorial. I am lacking some understanding of the requirements for the test plan and how to present it so I will have to review this… there is not much info in the text book or lecture slides.

Categories
Computer Technologies and O/S

FIT9018: Week 10

Week 10’s lecture was a continuation from Week 9’s introduction to shell scripting. The tutorial this week was closely correlated to the lecture material for weeks 9 and 10.

Ubuntu Shell

Pearl of the Week: Test function in shell scripts. + /dev/null (trash bin for script outputs)

if [ $var1 = $var2 ]
then
echo var1 and var2 are the same
else
echo var1 and var2 are different
fi

We had a chance to make some scripts based on the constructs and operators that we learnt from the lecture:

[To be uploaded]

A basic but detailed guide to shell scripting: http://www.freeos.com/guides/lsst/

An advanced guide to shell scripting:  http://tldp.org/LDP/abs/html/

Categories
Database Technology

FIT9019: Week 10

Week 10 saw us move away from the more technical SQL and Indexing topics to ‘Database administration, Transaction management and Concurrency Control’.

Responsibilities of DBA:

  • Control of redundancy
    • Use of standards for modelling
    • Maintaining data dictionary
    • Ensuring sufficient normalization
    • Managing sharing of data  between multiple applications
  • Control of Integrity Constraints
    • Defining appropriate integrity constraints
    • Ensuring applications meet with the impose constraints
    • Ensuring applications cannot subvert constraints
  • Control of central data security
    • Provision relevant user views
    • Issuing passwords
    • reviewing physical security
    • design and monitoring of back up procedures

Also important duties are:

  • Query Optimization
  • Clusters, Indexes

Manoj then continued into the nature transactions, crashes and concurrency control. A quick summary below:

  • Transactions
    • A single or number of processes involving database accesses that constitutes one single logical action (i.e. bank transfer). Atomic (indivisible, can’t separate processes), Durable (upon completion, stored permanently).
    • Transactions can be committed or aborted (rollback, utilizing before-image log)
    • Checkpoints are periodic (usually 15-20mins) batch writes of transactions to disk.
  • Soft Crashes
    • I.e. Power failure, where system resets but no physical damage.
    • After soft crash, secondary memory data is loaded, then transaction log is referred to and transaction missing from secondary memory are either:
      • Redone (REDO), if the transaction was completed and can be re-completed this will be done
      • Undone (UNDO) if the transaction was not completed (committed) in the log then it must be undone (transactions are atomic).
source: week 10 lecture notes

Categories
Systems Analysis and Design

FIT9030: Week 10

Week 10 saw David get into the Object Oriented methodology for the Design Phase.
The key documents to come from the design phase (OO methodology) are:
  • Design Class Digrams
source: week 10 lecture notes
  • Interaction (Sequence Diagram / Collaboration Diagram)
source: week 10 lecture notes
 

Categories
Foundations of Programming

FIT9017: Week 9

Program, Design testing a program. We had some overlap this week with the Systems Analysis and Design subject as we looked at some program design methodologies.

New topics covered were:

  • CRC (class, responsibilities collaborators)
  • Testing strategy evolved from testing classes in isolation to testing use cases and scenarios

The tutorial was focused on giving us an idea of how to design our classes for assignment 2. I think the plans that we discussed were to simplistic however and there should be more classes than we covered in the program. The text book seems to have no section on this topic and I have found the index to be terrible… D:<

I will cut this post short as I need to finish the class diagrams for stage 1 of assignment 2 due tomorrow. Finding it a bit difficult as cohesion and coupling seem to work against each other in some instances.

Categories
Computer Technologies and O/S

FIT9018: Week 9

Week 9 saw Andy delve further into utilizing the Unix shell followed by a tutorial on setting up the Apache HTTP server.

www.apache.org

On the unix shell, we explored shell scripts. The basics that we covered:

Pearl of the week – Common shell script errors:

[-z “$x”] error : no space near the [ ]’s
[ “$x”=”abc“ ] error : no space around =
y = 20 error : extra spaces around =

  • # -> comment character
  • x=y -> assign vaiable (no space)
  • shell keys words stored in .profile
  • Standard variables:
    • $$ the process id of the shell
    • $0 the name of the shell script (if applicable)
    • $1…$9 $n refers to the nth command line argument
    • $# contains the number of arguments
    • $* a list of all the command line arguments
    • $? Exit status (more on that shortly)
  • ; -> End of line
  • if, then, else, for, for in, if-then-elif, while, until, break continue, case, trap.

Categories
Database Technology

FIT9019: Week 9

A very busy lecture this week with Manoj introducing some index structures including:

  • ISAM – Indexed Sequential Access Mechanism
  • Binary Tree – Suseptable to ‘lopsidedness’
source week 9 lecture notes
  • B – Tree – Normalized but inconsistent lookup times.
  • B+ Tree – Normalized, all keys in leaf nodes.  Used by Oracle.
source: week 9 lecture slides
Categories
Systems Analysis and Design

FIT9030: Week 9

Quick review this week with a number of assignments still on the ‘to-do’ pile.

Week 9 -> Structured Design.

We jumped out of the Object Oriented development methodology to take a look at the Design phase in the eyes of a traditional Systems designer. What we saw:

  • System Flowchart – Need system boundaries in Design phase.
source: week 9 lecture slides
  • Structure Chart – Describes processes in the System Flowchart in more detail using transaction analysis.
source: week 9 lecture slides

Categories
Foundations of Programming

FIT9017: Week 8

Judy returned to present lecture 8 this week, focussing on Encapsulation and Scope. The coverage of each aspect was quite introductory so I am just going to list through the points covered very breifly.

A graphic illustration of the encapsulation of Objects
  • Public Interface – public method and constructors are the objects/class’s interface
  • Encapsulation enables information hiding, a key point of object oriented development and code re-use
  • Local Variables – Scope limited to within a method
  • Field – attribute of an object, shoudl be private
  • Final – cannot be changed

Pearl of the Week:

  • Static vs Final – a good explination here

Short post this week, recently got Visual Studio 2010 so will look at trying out some C# in the next couple of weeks assuming I don’t get to addicted to SC2.

Categories
Computer Technologies and O/S

FIT9018: Week 8

Week 8’s lecture returned to the UNIX shell for some more in depth analysis. The tutorial was dedicated to Squid Proxy Server and how to run it from shell.

 First off, the lecture on Shell Scripting:

What happens when you type a command in shell