Wednesday 30 January 2008

Lecture Review Week 3

Database --- This week started with the integrity constraints of the tables. Integrity constraints are rules for which to keep the data. Every table will require a Primary Key to ensure that the specified attribute(s) is always different. The attribute can be set to Not Null, so that no entry can be added if that attribute is empty. It can also be set to Unique, to ensure that the specific attribute does not repeats. Primary Key is essentially Unique and Not Null. The next constraints is Foreign Key, this allows the attribute to reference to other tables, and acts like pointers. The keywords to allows changes to be made in the table being referenced and then changing automatically in the referencing table are "On Delete/Update Cascade/No Action/Set Default/Set Null". The last is Check, which checks that the attribute will satisfy the given conditions as stated in the check statement.

Second half of the lesson focus on simple SQL statements. Create Table t1, creates a table, then within the parenteses put the required field of attributes for the table, with its domains and integrity constraints. Drop Table t1 deletes the table t1 created earlier. Alter Table t1 Add attribute domain will expand the table by another column. Insert Into relation_name(att, att) Values () using single quotes for the values. The att, att represents the order you want to add, can be omitted and the default order will be used. To view the whole table use select * from t1. To delete entries, use Delete From t1 where 'conditions'.



Business Law --- In the continuation of contract law lecture, there was discussion on contracts with minors - people under the age of 21, with mentally disordered and drunkards, and with companies. For minors, there could be three types of contract, first is a valid contract, which is beneficial to the minor or is necessity to the minor. Second type is voidable contract, which includes leases and partnership. Third type is void contract, which means the contract never existed in the first place. This includes money lent to minor and goods which are not a necessity to minors. For the contracts with mentally disordered and drunkards, there can only be voidable contracts.

The next part includes the terms of contracts. Conditions are the important terms in a contract, warranties are the minor term of the contract, innominate terms are the terms that you have to wait and see to see whether the breach was a breach of conditions or warranties. Exemption clauses can be included in contracts to exclude the liability of one of the party. Exemption clauses must be in contractual document and not in a mere receipt. If a person signs a contractual document, he is bound by its term even if he does not read (ignorant is not bliss). If a person is induced to sign by misrepresentation, then he won't be bound by the exemption clause. An ambiguous clause is invalid. Exemption clause made after the contract is sign is invalid, however, if there are past dealings and the person is aware that such a clause exists, then he will be bounded by it. Exemption clause does not discharge you from responsibility from death or injury. It can only exempts you from other losses.


Business Communication --- The first lecture on User Manual. It's quite instinctive to perform most of the steps. First, Analyze the users, what are the needs, who will use the software. Second, Design a task list, write out all the tasks that can be done using the softwares. Third, Develop a draft. Fourth, Review and Test the draft, and last Finalize the manual.

When writing the manual, treat the reader as an idiot of the software. Therefore when you write the step by step instructions, they must really lead to the desired outcome. Screenshots are added to aid user identify start state and end state.

The layout of the user manual should also be attractive. This are influenced by 4 factors - Alignment, Contrast, Proximity, and Repetition. Alignment makes the manual neater. Contrast between size of words shows different level of importance, different colours can be used to show that the words are related. Putting things of the same nature together makes it easier for reader to see that they are related, this is proximity, and reusing the same template for over and over again is repetition.


Artificial Intelligence --- This lecture was on more searching techniques. Choosing a search strategy depends on the problem. With more number of goals states, the problem is easier to solve. Other factors are distribution of goal states, the type of search tree (finite or infinite), repeated states, and the need for optimality.

The best first search uses an evaluation function f(n) to estimate the desirability. then order the nodes in fringe in decreasing order of desirability. Greedy Best First Search is a special case which uses a heuristic function h(n) which is an estimate of the cost from n to the goal. This search is Not Complete, Time of O(bm), Space of O(bm), and is not optimal since it doesn't explore for other possible cheaper route.

Another special case is the A* Search. The evaluation function f(n) = g(n) + h(n) where g(n) is the cost so far and h(n) is the estimated cost of n to goal. The h(n) here is an admissible heuristic function which means that the estimation is always lower than the actual cost. Therefore A* is optimal. The time is exponential and space is keeping all nodes in memory.

A recursive best first search keeps the 2nd best f-value seen so far, and backtracks when children reaches a value that exceeds the f-value. My guess for RBFS is it is complete, and not optimal


Software Engineering --- How do you draw a Use Case Diagram? First draw a stick figure of a person, and this is the actor. Then you give him a roll of what he does. A straight line represents association of actor with use case. Dashed arrow with the keyword '<>' specifies the behaviour defined for the base use case. A triangle arrow is a taxonomic relationship between a more general use case and a specific use case. Dashed arrow with '<>' gives a relationship shared between two base use cases.

Wednesday 23 January 2008

Lecture Review - Week 2

Database --- Half the lecture was spent on unfinished part of the introduction, the other half is on tables (the one that stores data). Seems like nothing much has been taught.. Headache for my project.


Business Law --- This lecture's on contract law. The two types of contract are verbal and written contract. All contracts are agreements but not all agreements are contracts. Contracts consist of three elements -

1. Offer and Acceptance,

2. Intention to create legal relations,

3. Considerations.



On point 1 -

Offer + Acceptance = Contract made

Invitation to Treat -> Offer + Acceptance = Contract made

Invitation to Treat is asking someone to make an offer to do something, examples include Goods on display for sale. When you shops, you are offering to buy the item at the stated price, and the cashier can accept or refuse to sell you, not the other way round. All news paper advertisements are also Invitation to Treat.

You have to revoke your offer before the other party accepts, no revoking after that. When there is a counter-offer to the original offer, the orignal offer is forgotten. In instantaneous contract, contract is only made when the offeror has received the acceptance while in contracts by post, contract is made when the offeree has posted the acceptance.


On point 2 -

You have intention to sue the other party in case of breach of contract. Domestic and social agreements are presume to have no intention as the agreement is based on mutual trust. After separation of husband and wife, there are intentions to sue. In commercial agreements, there are intention to make a legally enforceable contract.


On point 3 -

Consideration is some benefit accruing to one party or some detriment suffered by the other. Suffering must be after the contract is made, anything before is not counted. Consideration must be real and recognised by law (e.g. money), but need not be what the market value is. Consideration must not be for something within your own duty.



Payment of smaller sum will not discharge you from a larger debt, unless it is agreed by the creditor and consideration is made. Valid consideration is payment before due day by creditor's request, payment at different place at creditor's request, and payment with a delivery of a chattel (a movable article of personal property).



Business Communication --- Second lecture on Business Correspondence, introducing another acronym STARS standing for Specific, Thoughtful, Affirmative, Respectful, Simple.

In writing letter, you have to be thoughtful for the reader. Prevent using negative words, basically you should not put on an air when you write and while doing that, make the reader as happy as you can, and when the reader is happy, any request made will be accepted.


Artificial Intelligence --- I was so lazy to attend the lecture, so I had the webcast lecture instead. Kinda not able to concentrate well on webcast due to the many distractions at home, but lucky this lecture was on searching algorithms on trees which was taught a year ago.

The bad thing about this module is I have no idea how to do tutorial 1 which commences this week, how would I find the answer? Maybe from AIMA, the name of the recommended textbook.


Software Engineering --- Don't really understand the lecture, nonetheless I'll still try to write something about it.

It seems to me that the lecture is trying to give us an overview of what we'll be handing in for the project submission 1, and 2. Starting from the requirement, we then analyse the requirement before coming out with the design.

Requirements are what the system should be able to do. There are functional requirements which describe system services or functions, and non-functional requirements, which identify quality attributes and different constraints.

By prioritising requirements, we can separate them into 3 levels, from those that are absolutely needed, to highly desirable which means should be met, to the lowest level which could be implemented but not necessary.

The next part was on use case diagram, which comprises of all the possible interactions the user can have when performing the task.

Monday 21 January 2008

Lecture Review - Week 1

Introductory Lectures

Database --- This lecture has nothing much this week, spent more than half the time telling us what to expect. Gonna have a project in group of 5, and because I took the S-paper version of the module, we'll be preparing to give some presentations during class. The remaining time was spent on lecture 1, which unfortunately I have already watched the breeze lecture which was much more interesting and faster than the lecturer. Maybe the next lecture will be better cause I'll attend the lecture with no preparations.

Business Law --- It's a fun lecture. Interesting lecture made possible by a veteran lecturer who taught the module for 28 years... Apart from the materials in the lecture notes, learning which court you have to go to for the different amt of compensation you are demanding, she included many personal stories to share with us.

Business Communication --- This is basically just like the english lessons I used to have during secondary schools. This first lesson was about business correspondence. When you write a letter that includes good news, you jump straight to the point and breaking the good news to the intended reader. This is called the direct approach. When the letter is about bad news, you use the packaging approach, giving the bad news as little emphasise as possible. The last approach taught was the indirect approach. It's one where you used when the content is of little / no interest to the reader, and you have to try to get the reader to be interested. So you have to use the GIRO method standing for Gaining Attention, Increasing desire, Reducing resistance, Orchestrating action. Quite funny how people keep coming up with this type of acronym to help easy remembering, but which will cause lots of confusion at the same time.

Artificial Intelligence --- It seems to be another interesting module. The lecturer claimed that he is not an A.I. expert, so we can probably expect an easier paper from him. We'll be having 2 projects for this module. First is a mini-project to write an Intelligent Agent to play some chess game, on a 6 by 6 chess board. Can be done alone or in pair, so if I feel like I can do it, I'll probably be doing it alone. The final agent will be used to play against other agents done by other people, and if you win, you will score higher for that project. The final project details won't be out till later this week. Can't quite recall what was taught in the lecture, but the tutorial will be starting this week for this module, now I'll need to do some self-study again.

Software Engineering --- This is a CS module, targeting Computer Science students like myself, but this sem, there are more Computer Engineers from FoE, so the lecturer decided that the project can be done in C++ too, instead of only JAVA. Group of four, but I haven't decided who to work with. Most likely gonna be joining force with my primary school friend, Billy, once again after the project which we did in primary school some twelve years ago. The first lecture taught the different stages of software engineering.