Thursday, January 31, 2008

DPS912 Lecture 5

Review Unix Sockets

High level calls (putchar getc etc) need a FILE*, read/write are low level and need a file descriptor
File pointers are different from a file descriptor.

Internet Sockets

Sockets which can communicate over networks. Does not use file names instead...
instead use : IPaddress Port Number

Interesting way in which an ipaddress is made eg 1.2.3.4 =
1 * 256^3 + 2 * 256^2 + 3 *256 + 4
Use AF_INET

Network Byte Order
- a standard order in which bytes are put onto the network. May or maynot be the same as your machine order (big-endian, little-endian). There are conversion functions to convert from host byte order to network byte order
- htonl : host to network long
- htons
- ntohl
- ntohs

Network Addressing
convert ascii ipaddress to IP address in network byte order
- inet_pton("127.0.0.1") (also inet_addr or inet_aton)

real usage
inet_pton( AF_INET, "127.0.0.1", &address.sin_addr);


Using hostnames
x = gethostbyname("zenit.senecac.on.ca");
getaddrinfo("zenit.senecac.on.ca", NULL, NULL, &addrinfo_var);

use setsockopt to set the SO_REUSEADDR option so that you can reuse a socket right away after closing.

IO Multiplexing

use select to wait for activity on multiple file descriptors
select simply checks to see if a read(or whatever) will be non-blocking
Manipulate File Descriptor sets via
FD_ZERO - initialize a set (an fd_set structure)
FD_SET - put a file descriptor into the set
FD_CLR - remove an fd from the set
FD_ISSET - check to see if a filedescriptor is now unblocking

Wednesday, January 30, 2008

DPS906 Lecture 7

The problem with A* Search is that the search space grows exponentially. Even the A* has too many branches for normal sized worlds.

Another method called Iterative Deepening A* Search
- set a threshold for search = to a minimal estimate (cannot over estimate)

eg
Arad to Bucharest - 366 (crow flies distance) is minimal estimate THRESHOLD
A->Z = 75 + straight line from Z->B (374) == 449
A->S = 140 + S->B (253) == 393
A->T = 118 + 329 == 447

all checks are bigger than threshold... so set new threshold (smallest of previous checks)
A-S = 393 THRESHOLD
A->S->O = 140 (A-O) + 151(S->O) + 380(O->B) == 671
A->S->F = 140 (A-O) + 99(S-F) + 178(F->B) == 417
A->S->R = 140 (A-O) + 80(S-R) + 193(R->B) == 413 THRESHOLD

etc

The idea is that you keep making your threshold bigger until you can prove that your trip is the threshold.

Tuesday, January 29, 2008

BTS830 Lecture 5

Financial methodologies are rooted in traditional “captital budgetting decisions”
long term & depreciable
- machinery facilities, IT and management expertise

Breakeven analysis
- comparison of quanitiable costs and non quantifiable benefits

Steps
1.calulate value of costs
2.calculate value of quantifiable benefits
3.calculate Net Present Value of costs/benefits
4.determine non-quantifiable benefits and subjectively consider them in the analysis


Payback Period Methodology
- every payback period has a cutoff period (it ends in X years)

Accounting Rate of Return (book rate of return) : book value=cost-depreciation
- memorize the ARR calc

Friday, January 25, 2008

DPS906 Lecture 6

Heuristic functions for searches must
- work fast
- cannot overestimate

The tree the heuristic analyzes is a binary heap

Reviewed Binary Heaps (see btp500 notes)

As an array
root=array[0]
leftchild for node i = 2i +1
righchild for node i = 2i + 2
parent for i = (i-1) / 2

LSO230 Lecture 3

Karl Marx
- single most important person of the past 200 years
- 100 million dead from marxism ideas
- born 1818
- at 25 became radical and journalist
- was supported by Engels
- a bit of a deadbeat

Ideas
Before, things were OK, but not good
  • Lived in the country
  • most people are bakers, farmers etc
  • people specialize a little at what they do
  • they trade as equals
  • landowners are the wealthy. the rest are not rich. Everyone is equally poor
Marx things that things are ok because
- good work. work contributes to who they are
- good communities

Things changed because capital came along. (not just money)
During the industrial revolution, captial changed to be owned by factory workers rather than tradespeople.

Capital divides into haves and have nots (bourgeoisie vs proletarians).

Two classes
Proles: sell their labour, work for a living, earn small wages in exchange for work
Bourge: do not sell labour, own capital, receive profits from others work

Peasants lose good work -> work in factories -> factories are more successful -> more peasants lose work -> more peasants work in factories -> drives down wages -> factories are more successful

Bourg invest money to get better technology which makes labour have poorer jobs with worse pay. More profits for the Bourgies.

Middleclass gets squeezed.
Proles work gets easier and easier, worse and worse. In 1818 half of the cotten mill workers were children under the age of 10.

Inevitably the proles get poorer and of greater number
the Bourgies get fewer and richer

Response - There has not been one big crisis. Why?
Destruction of productive forces
Conquest of new markets.

BTR820 Lecture 5

White Papers (2 types)
-promotional (majority)
-professional

Promotional papers are meant to capture an audience who have a problem and want discussion on solutions from suppliers

Structure SBFO
header info (to:from:re:etc)
Summary - so you dont have to read the whole thing
Background - history - Past
Facts - current situation - Present
Outcomes - actions to take - Future

White Papers should use a modified SBFO format.

Parts of a WhitePaper
  • Intro
  • Market Drivers
  • Problems
  • Historical Approach
  • Solution
    • Define
    • Benefits
  • Specific Advantages
Exercise: Whitepaper structure on the current state of spam
Definition: cutting edge info (image spam)
Market Drivers: case studies (humber servers crashed and cost them $1M to fix)
History: Trends, Spam Evolution
Solution: Present Trade Marked names of filters
- present technologies that filters rely on (whitelist, bayesian, reporting)
- CBA
Outcome : Pimp a specific technology and filter

Thursday, January 24, 2008

Libpcap

I spent the evening fooling with libpcap. Ive found something strange on my leopard machine that is interesting because it is different from the documentation I am reading.

What is interesting is the pcap_open_live function. When I use a value of 0 for the timeout value parameter, it takes a very long time to capture packets, and I capture them all in a big burst.

eg. when running a descr = pcap_open_live(dev,1,0,0,errbuf); followed by pcap_dispatch(descr,-1,my_callback,NULL);
my program seems hung

When I change to
pcap_open_live(dev,1,0,1000,errbuf);
I capture all the packets that occur in 1 second.

It seems like the timeout value of the pcap_open_live is some sort of polling to some sort of system-level network packet buffer.

I can live with this purpose for my little experiments. However it is noted that top shows higher level of CPU usage when the "polling" value is lower.

DPS912 Lecture 4

Review over the first 2 weeks lectures & labs

Client Server Review

A simple server works on one request at a time and cannot accept new requests until the previous one is done
bad if multiple clients must do stuff... use fork to solve this problem

Sockets
Unix Sockets - local sockets... similar to named pipes must be on the same local machine
Sockets are bidirectional
can use most file descriptor functions like write/close/read/write (NOT open)

Socket descriptors
- use integers like file descriptors
- when using sockets use 2+ descriptors
- - 1 descriptor is just to establish connections
- - 2 descriptor is for actual data transfer
- - more descriptors for more simultaneous clients

Basic functions
  • socket - used to create the socket
  • bind - used to name a socket SERVER FUNCTION
  • listen - used to create a listen queue SERVER FUNCTION
  • accept - used to accept a connection from a client socket SERVER FUNCTION
  • connect - used to connect to a server CLIENT FUNCTION
  • read - or recv
  • write - or send
  • close
Error Handling
Important to check for errors in C
the return value of a function says "error occured" but that is all
use errno to get the exact error description
error codes are stored in errno.h
can use strerror(errno) to get the english representation of an error number

Wednesday, January 23, 2008

DPS906 Lecture 5

Path Searching

Efficient searching
How do you eliminate parts of the search 'universe?'

Uniform Cost Search
- always finds the optimal solution if a solution is found
- sacrifice to these benefits is the cost of getting to a state is minimized
- - G is used a cost function
- - in our example it is total cost of travel from beginning to current position
- expand the search based on smallest total cost
- to stop: a)no more nodes to consider b)goal reached & cost of others is > goal cost

Greedy Search
- Use a heuristic to guide search
- not guarenteed to be optimal
- estimate remaining cost (call the function which does this h)
- guide search by minimizing h
- can get stuck

A*
Best first search : one can find the optimal solution to a search with A*, rather than greedy
searches which cannot be proven to find the most optimal solution to search needs
can be used for path finding, and also other searches
Basically build a tree and apply the A*
- best of greedy + uniform cost

A* uses the same algorithm as the other two
- uses cost & heuristic
- heuristic must be valid estimate of cost
- - cannot overestimate straight line distance is good

To represent a graph
- sparce matrix - quicker, lots of RAM
- adjecency list - less ram, slower

http://en.wikipedia.org/wiki/A*_search_algorithm

Tuesday, January 22, 2008

BTS830 Lecture 4

Chapter III: Decision Making Methodology

Economics of Infomation

Theories involving scarcity of resources, and unlimited desires in relationship with design devel manufacture and delivery.

Transaction cost theory (difference between cost of IT transaction vs size of firm).
eg transactions are very expensive for small firms; transactions are cheap for large firms

Agency theory: as the firm grows the number of people that act as agents for the firm increases. as the business grows the cost:hire ratio becomes 1:1.

Why measure IT performance?
Allow you to assess the business value.

Measures of IT Business Value
financial performance - count dollars
business performance - efficiency
strategic performance - comp advantage

Business Value
1: identify the objectives of IT investments
2: select measures to assess each objective (more than 1 is better)

Slides have measures for financial/business/strategic

BTR820 Lecture 4

Grammar: Ideally you can read only the headings and get the gist of the whitepaper. I does hate on grammer!

More review

Passive Voice
Sounds pompous, hides the subject.

In English, we put our most important words at the front of the sentance, passive voice mixes up normal english "I need to go to the bathroom" vs "The bathroom needs to be gone to by me."

Passive Voice Rules
passive voice is very formal (used by scientific papers)
use we or our which is semi-formal and good for most purposes
sometimes use I which is informal and is sometimes suitable

Wretched
  • Got
  • Affect
  • Utilize
  • Accept
  • Then / Than
  • Supposed to
  • Used to
"The effect, an affect."

Jargon
define jargon once per chapter
Do so the first time you use the acronym
"Voice Over internet Protocol(VoIP) is a radical ..."
"Digital Rights Management (DRM) is ..."
avoid defining well known acroynms (IBM)

avoid computerese
nouns used as verbs (trash the files, boot the computer, firewalling would help)
uncommon words
telephony, connectivity
anything like lol, :), ROFL, u, i, etc.

If it can be said in smaller shorter words, do it. Brevity is the soul of wit.

Academic dishonesty
Very, very bad.

Kinds
copying answers
lying about the work you did
plagerising
Representing someone else's words/ideas as your own
  • writing
  • words
  • ideas
  • research
you do not need to cite common knowledge

types of plagiarism
- word for word
- summary
- citation

Saturday, January 19, 2008

DPS906 Code

We got our assignment for DPS906 yesterday, and found out that Cathy will not be releasing the source of the screen rendering code; though she is releasing the source of the basic game. Cathy instead gave us borland compiled .obj files instead of 2 source files. This is unfortunate.

Cathy isn't releasing the sources because they are the 'answer key' to several difficult 3rd semester courses, and teachers of the 3rd semester would not be happy if she released them.

Luckally, I have code which has an api nearly similar to cathy's code (my answer to the 3rd semester questions in fact... they differ slightly from the answer key in that my code has more functionality and I use references and keep the dynamically allocated data under control by my library rather than letting the programmer do it).

I spent all night and a few minutes today (slaving for 8h pulling my hair out on a small data setting matter, 5minutes today with a eureka moment) to get cathy's game engine running with my ncurses/conio library. Now I have all the source I need to compile with gcc/cl etc.

Perhaps I should release this source code to the rest of the class (technically they should already have it).

Friday, January 18, 2008

Communist Manifesto Chpt 1 & 2

My thoughts

Sometimes I wonder if Marx & Engels are arguing for or against the bourgeois, "The bourgeoisie, wherever it has got the upper hand, has put an end to all feudal, patriarchal, idyllic relations," isnt an end to patriarchal feudalism bad, and were they really idyllic?

I have a post-industrial mindset towards this text, and I am constantly thinking about "who are the bourgeois of our society; who are the Proletariat?" Am I the bourgeois, & am I soon to become a member of the meritocracy elite?

I find it incredibly interesting that I can relate to this document still. The words "The history of all hitherto existing society is the history of class struggles" are true.

Telekinetic Dreams

"Telekinesis
To dream that you are telekinetic, represents a higher level of awareness and consciousness. You are not utilizing your full potential and need to start putting your stored energy levels and mental abilities to use. In other words, your dream may imply that you need to put your thoughts into action. For some, dreams of telekinetic powers may indicate your latent paranormal abilities."

Interesting since almost every dream I have involves me having telekinetic powers. It reaffirms my belief that I have supernatural powers, Heroes is about me baby!

DPS906 Lecture 4

We went over the Assignment Specs

Alpha-Beta Pruning
Root Node: Initially our minimum value is neg-infinity. Our max value is infinity
keep going down each node having -+infin until we hit leafs

When we hit our first leaf (assume parent is maxinode) the value of Alpha is set, and we set for each leaf. ... our alpha and beta will be exactly the same for the first pass [6,6]

When you walk up from this, (now at a mininode) alpha beta of this node is [neginfi,6] we walk down (maxinode to leaf) to the very first leaf and see that the value is 8, this means that at a minimum our maxinode will be 8... it might be more, but it doesn't matter at this point.

describing w/o pictures is very difficult.

Thursday, January 17, 2008

BTR820 Library Tutorial

Step 1:
Broad Subject area -> mozilla
Topic winin that subject area -> firefox cross-platform abilities

Step 2: How can I port mozilla firefox to other platforms?

Step 3:
keywords. mozilla, firefox, platform

Step 4:
keywords. compile, cross-platform, port, portable

Because of the uniqueness and cutting edge nature of the topic, I didn't find any relevant info on the libraries.

BTR Assignment 1

I handed assign1 in only to realize that I spelled Ivy with an e Ivey... DOH.

Hopefully the prof doesn't notice.

Macbook Battery Update

I have received the battery apple has sent me. Going through the long calibration process now.

BTS830 Lecture 3

What is Needs Analysis

A needs analysis is determining tech, software, and human resources to achieve strategic goals

Whats in a needs analysis
- a needs report

Determining IT Processing
- personnel
- hardware maintenance
- warranty
- communication

Alternative IT Investments
- continue as is (run the system into the ground until the wheels fall off)
- Reorganize system
- upgrade existing system
- replace the existing system

What is IT Outsourcing?
IT outsourcing can be defined as the process of using outside companies or vendors to perform internal organization IT tasks
Estimated that 1/4 US IT jobs will be outsourced by the year 2010

The person who could find out what the customer wants, and conceptualize this and outsource the actually coding is the one who will get the most money.

- subcontracting limited work assignments
- subcontracting project assignments
- total outsource assignment

Benefits to IT Outsourcing
- technology improvements
- financial gains
- reduces budgets
- Productivity improvement
- tax benifits
- enhances core business activities
- facilities management
- management planning

Problems with IT Outsourcing
- failure to achieve client needs
- poor service quality
- failure to meet timely objectives

Barriers to IT Outsourcing
- questionalbe past and observed performance
- a lack of experience with outsourcing in general
- organization resistance to change
- inadequate preparation and planning

DPS912 Lecture 3

Pipes

A form of IPC (interprocess communication). When fork is used, there is no longer a connection between parent and child, you need IPC to share data between the processes.
  • Pipes are local to one machine
  • Pipes are one way
Process Pipes

popen() is like the system() call. Should only be used for quick and dirty programming. popen is different from system in that system is a blocking call.

pipe() creates two file descriptors (you pass it a 2 element array of file descriptors to make). popen uses pipe, fork, and exec internally. Array element 0 is input. Array element 1 is output.

default file descriptors
0 - Input from keyboard
1 - Output to screen
2 - Output to screen

When you fork a process with file descriptors, the child 'inherits' the file descriptors
Pipes are blocking and are therefore automatically synchronizing.

There should be a 1:1 relationship between pipes (although it is possible to have 1:n... it creates reading problems... pipes are read only once and data is deleted once read)

Using Pipes as STD I/O
dup() and dup2() duplicate the file descriptor with a new fd. You want to

Named Pipes (FIFO) - First in First Out

Can be accessed by any local process
mkfifo() -
IMPORTANT (will lose marks in assignment if we dont do these three things)
- Put FIFO in /tmp
- Use $$.something to make the FIFO unique
- delete the FIFO when finished (unlink)

Wednesday, January 16, 2008

DPS906 Lecture 3

Review So far
- A game tree is a method for evaluating who will win a game
- top node is a max node, next is min node, next is max, etc
- lots of what if -> get score.
- score is determined by what the children's score is unless terminating node
- if we cannot fit every terminating state in RAM, we need some sort of Evaluation function
- Evaluation function is a heuristic to determine the "value" of the board
- Eval must be fast, predictive, and have a known range
- Move Generation (does the MGH (move gen heuristic) come before or after the generation of the Node)

Transposition Tables Zobrist Keys
- idea is that a board's state may be identical although they are generated from multiple different paths.
- record the scores of boards you've already encountered, so that if you encounter them again, you dont have to re-calculate them.
- how do you remember? Use a hash tables
Zobrist Key
- create a matrix of random integers (on startup)
- - size = number of players * number of squares in game board * number of piece types
- - - eg tic-tac-toe = 2 * 9 * 1 = 18
- assign each value in the matrix a binary value (bigger randomness is better 1-100 > 1-10)
- Xor the tables to get a value... the final number is the zobrist key
- application for hash table tricks.

Two types of collisions
- two different boards have same zobrist key
- normal hash table collision (isn't bad - handle as normal)

Alpha Beta Pruning
- alpha beta is the same result as non-alpha beta... but is faster.

BTR Assignment 1

TO BE SHOWN LATER

I have completed 6 of the 8 topics. I need to do 2 editorials and add "finishing touches (proper citation etc)"

BBC Podcast on Poverty

Adam has asked us to listen to a Podcast on Poverty from the BBC

Kenya - Isaah - Small house, sleeps on rugs. Cooks on open fire (dangerous for children). Has Cows. Looks after grandchildren, 8ppl all together. They find it difficult to get food. 1 acre of land which he grows maize. Poor harvest because land is bad. Sells Tea, but makes nearly nothing (Kenya has famous tea too)... Monthly income is < $6... he has debts to meet (fertilizer). Co-Operatives are collapsing, while the wealthly people are getting richer. Must have a uniform for going to school which costs $3. No free medical. Had a child die from malaria, a net could protect the family but they cannot afford one. Things are getting worse than 20 years ago.

Josen Casseco - prices are changing daily, and no one can make plans because of this. The Government is dishonest.

Francis Imbuya - better off than Isaah, has mosquito net for himself, and an animal. Not enough money to get net for children. Just takes water from the river for drinking. No electricity. Wife does mechanical things fixing bicycles, making bricks etc, when husband is selling Maize in market. Makes enough money to buy sugar. He makes about $2/day. Government gives loans to people... but the interest is too high. Also thinks that thinks are getting worse because people have less land.

Population depends on agriculture. Population is growing, but the land is not. Francis thinks that Kenya needs population control. Francis wants people to see how Kenya is with their own eyes, that way people know themselves how they can help. When Kenya gets money from Western Nations... the wealthy people get the money, not the poor people.

Josen - Lots of money invested in Kenya, but people have not had significant changes. The projects haven't involved the poor people. Managers are aloof from the target group. Need radical examination of the design and implementation of the projects to stop poverty. People need to get right to where the poverty is so that they can see what is really needed to do.
2015 poverty goals are unrealistic if things do not change.

Tuesday, January 15, 2008

I want me a Tata Nano

An Indian car manufacture has released a vehicle for the whopping final price of $2,500.00!!! In a country like India which has high levels of poverty this new vehicle can be the gateway towards a new middle class entry point.

I think the Nano is a terrific innovation because of its low cost, and its small sleek design is very cute. I want one!

A Response to Andrew Smith's GPL Blog posting

In Andrew Smith's blog posting "GPL Quicker Upper" andrew explains a process by which a developer can wrap the contents of a GPL licenced library in a service oriented application and use STDIO between it an a proprietary application (much like a SOA webservice). This allows a proprietary piece of software to benefit from the work of Open Source applications, hence making the GPL just as open to exploitation as the BSD licence.

My opinion on this matter derives from my understanding of why and how the BSD licences differ from GPL licences. From what I understand, the BSD licence is completely free, including the freedom to be exploited; whereas the GPL licence is more communistic (read community oriented rather than evil red menace) which states something akin to "if you play with us, you play by our rules."

I feel that the GPL library wrapper idea posited by Andrew violates the spirit of the GPL and is a flaw. While the flaw technically adheres to the GPL and treats the use of software libraries the same way a web browser treats a web server - a web browser [eg IE7] need not follow the GPL simply because the web server it connects to [eg apache] is GPL - I feel that the essence and spirit of the GPL is violated. When applying a GPL licence to source code, a software copywrite owner is telling the world "I am software that can be used by all, you can derive new works from me, or modify me to make me better. All I ask is that things derived from me, and any modifications to me must be as equally free as I am."
  • BSD - My Ideas; anyones rules
  • GPL - My Ideas; my Rules
Andrew is stating that companies can bypass the "keeping code as equally free" clause by using a technical semantic difference to library operation with the intention of showing us that GPL is an inferior software licence. Because Andrew is 'angry' I must believe that he is intending to show us that the core beliefs behind the GPL are as flawed as the GPL itself. I am of a different opinion.

I believe Andrew has pointed out a flaw which should be explicitly fixed in the next revision of the GPL, and that the principals that the GPL stands for are just. To explain this I use the examples of FreeBSD (a BSD licenced OS) vs Linux (A GPL licenced OS). FreeBSD (which is said to be more secure) is better than linux in certain activities, and Linux (which is said to have better driver support) is better than FreeBSD is certain activities; I am unable to say one is overall better than the other however, i am not writing to incite a flamewar.

Certain developers are attracted to the near-infinite freedom BSD licence allows and have created great works of software which are used in both proprietary and open source software (Mac's XNU uses FreeBSD) while other developers are attracted to Linux & the GPL, with the knowledge that a Company like Apple cannot just use the developers hard work as a form of free labour.

Linux is a good piece of technology that developers flock to because they feel protected from exploitation when they give their labours to the community (think Open Software as a form of charity). This feeling of protection must be maintained to ensure that labour continues to be invested into the GPL community, thus the flaw Andrew has found must be closed with the next iteration of GPL.

BTR830 Articles

Adam has asked us to read some whitepapers but we have to find them first

For those of you interested in finding these white papers. Search for Info-Tech on ebooks @ the seneca online library and look for the 2005 book of papers. You'll then be directed to books 24x7.

Managing the PC Lifecycle–Total Cost of Ownership.
This paper is about applying some TCO formula towards PM issues (stuff we learned in BTS730), on things like downtime etc. Didn't read to deep

Spyware–A Serious Threat to Business Security
This paper is on spyware in the business environment (duh!). Didn't read too deap.. just skimmed the headings.

Both these papers are an example of what Adam was discussing in class (the block formatting , the correct use of headings/subheadings etc).

BTS830 Lecture 2

January 15th, 2008.

Productivity Paradox - absense of a positive relationship between spending on IT and productivity.... spending more doesn't necessarily mean more productivity.

What is the best IT eval method.. sometimes about money, sometimes about productivity, etc.
different ways to pick best

IT investment can be defined as the investment decisions of allocating all types (human, money, physical) of resources to a MIS
Personnel -> Appl. Software -> System Software -> Hardware

Competitive Advantage - poor investments can be a competitive disadvantage
Physical Risk - Equipment (
Managerial Risk - Goals (does it achieve the needs)


Strategic planning -> Tactical planning -> Operational Planning
Strategic - senior manager
Tactical - department heads
Operation - Supervisors
There are 9 steps to the planning
Page 11-20 in the text
  1. - PEST -external
  2. SWOT -internal
  3. overall corporate strategic planning
  4. MIS functional area strategic planning
  5. - process and system engineering
  6. configuration and functionality analysis
  7. IT sys evaluation
  8. - IT system Imp
  9. Post implement analysis
Answer the Review Terms (multi choice) & Discussion Questions (short answer).

DPS912 Lab 1: Corrections

The lab wording has been changed. I submitted successfully.

BTR820 Lecture 3

January 15th, 2008

"Look it up, don't make it up."

Formatting and structure are different things
  • Formatting - Making it look nice (font, layout, etc)
  • Structure - ideas in the right place... using evidence
White papers accept the liberal use of:
  • whitespace
  • have giant titles
  • no indentation
  • 'full block' formatting
  • can/should use much smaller paragraphs
  • bullets are used (and stylized)
  • colour (headings)
  • headings
subheadings mean that you are talking about a small element of a greater topic

Bad example:
  • Why is the text in two different colours?
  • why is there two types of bullets?
  • why 5 colours
Full Block
- straight down the left hand side, space btwn paragraphs (see slides for rules)
- looks pretty boring
- 2 spaces after paragraph
- 1 space after headings

Business writing differs from Essays
- business not double spaced
- in headings

Headings
  • Use 2 or 3 per page (by rule)
  • they mark off major and minor divisions
  • should be descriptive and unique
  • Some readers use only headings to get a feel for the paper
    • Even with subheadings
Headings serve the purpose
  • Navigation
    • Reader knows where she is
    • can easily find sections
  • Content
    • Scanning the doc
Distinguish 1st - 2nd - 3rd level headings some way

Headings should be descriptive and unique
- Introduction, summary, and experiment are bad headings
- Emerging VOIP companies, Why we need to replace DES, Cracking DES are good headings

Mistakes
  • Non-parallel headings (differing grammatic)
    • RAID data recovery
    • recoving data from PCs
  • Stacked headings
    • You need some text between first and second level headings
    • Do not jump straight into a list
  • You can drop 'A' and 'The' from headings
Descriptive Unique 2-3/page

Lists
- lists should be used when things get boring (comprehension is difficult)... OR where you need the reader to do something (step by step). Lists do not necessarily be one line long

Every list must have a stem sentence

Monday, January 14, 2008

Chapter 1s

Ive read the chapter 1 for all of my text books (the ones I have... waiting for amazon on 1 text).

BTR Text is basically a prep-talk about why you want to create white papers, rah rah sort of thing. Use white papers to get ideas to decision makers etc.

BTS text (on RFPs) talks about what problem the RFP is trying to solve. An RFP opens a communication line between suppliers and buyers for a non trivial problem that requires creative solutions. Basically its a way to decide what to buy when you 'kinda' know what your requirements are (eg a business needs to procure some sort of solution to their accounting needs; they need to buy some sort of software; they need some sort of training; they need someone to administrate the accounting;etc). An RFP lets a buyer tell potential suppliers with their needs.

DPS912 - Read chapter 8 which is basically a bunch of functions and what they do... better description than man pages, but relatively the same thing... perhaps you could think of the chapter as a user guide to the functions. Chapter 8 discussed fork, exec(), etc... same things we covered in class.

DPS906 - Read the Game tree notes.... I think I understand better what alpha beta pruning means now. In BTP500 I didn't really understand, when I created a game solution to the critical mass program, the non-alphabeta solution kept beating the alpha-beta solution.

Sunday, January 13, 2008

DPS912 Lab 1

I've Started the Lab

Doing stuff on my Mac first... then scp up to matrix; I just want to see what happens

problem 1: ps on mac doesn't want to show itself as a process
problem 2:
"12. Modify
process3.c so that instead of sleeping for 5 seconds, the parent waits for the "ps" child to terminate.
13. Compile the program and run it. You should see the zombie "ls" proces again in the output of the first "ps". The second "ps" should show that the second "ps" process itself became an orphan, adopted by PID 1, and that the zombie process is gone."


When I use waitpid for the "PS" child, the PS child should not become an orphan (because we are specifically waiting for it). I think the author meant to say " ... the parent waits for the "ls" child to terminate.

I'll ask about this on Tuesday... until then we pause.

Saturday, January 12, 2008

Big Update!

Well, if you are a regular to mikemoz (actually I don't have any regulars), you will notice a change to the site. I've put up my calendar, and put up lots of widgets like my photos, favourite sites, and labels. You will also notice that I am using this blog for more than just my open source class (since Im not taking open source this semester, I have to use this site for something:) )

Enjoy

Macbook Pro Battery Crappiness

So for the past 3 days my battery "health" has gone from 90% to 13%. Where on tuesday I had 3h of battery life, now I have about 5 minutes. Something is wrong here!

Im currenly on hold (been 20minutes total) with Apple Support hoping that they will replace my battery (or tell me of some setting which is f'ing up the power settings or something so that I can use my battery for a normal amount of time...

Holy crap, I've spent $400 for apple protection for being on hold for half an hour.... Im pretty disappointed with apple right now.... [Edit: actually thats not bad - I thats pretty awesome actually]

After 30minutes a nice fellow named Scott took me through the System Profiler and determined that apple should send me a new battery. Easy peasy, 15minutes total talking to him and I'll have my new battery in 5-7 business days.

Thanks Scott, you were very professional and deserve a raise [edit: or at least whatever money you are getting paid]

Friday, January 11, 2008

DPS906 Lecture 2: January 11, 2008

Because Chess and Go have such large game trees from top to bottom, modern computers cannot fully 'brute force' a game tree. You must have some way to cut the game tree off before terminal state, and search for the best possible result some other way. This requires and Evaluation function - "score the board."

A good eval function is never as good as going deeper into the tree. eval needs to be quick.

Eval function Criteria
  • fast
  • predictive
  • lose < score < win
Move Generation
- Some heuristics to throw away terrible moves, only sensible moves
-

LSO230 Lecture 1: January 11, 2008

Professor: Adam Norman
Class: S2172
Website: http://www.lso230.com/

What will we do
Cover Modern Social and Political Thought
Scope cut down (Adam's interests :P)... past 10years

Internation Trade
International Devel
Corporate excess
Hegemony

We will start with interational development
Bono is friends with Jeffery Sachs

Jeffery Sachs
  • One of the worlds most important economists (though not necessarily the best)
  • Likely to win a Nobel Prize for Something
  • Is concerned with human necessities and reasons why some countries are rich and some are poor
  • Some people think that he is somewhat unrealistic
His book is titled "The End of Poverty"
idea is that for the first time every we can actually end real poverty

What is Poverty?
Three types of poverty
  • absolute - Unable to meed basic needs (calories, clean water, education, health care, shelter, clothing) Perhaps make $1/day
  • moderate -
  • relative
PPP - Purchasing power parity... what can you buy in USA for $1
Roughly $1.25CND... so $1.25 is what 1.1 Billion people earn every day. (1.5billion 1981)

Jeffery Sachs says we can end this type of "absolute" poverty. Things are getting better.

Poverty is growing most and fastest in Sub Saharan Africa - doubling in 20 years

In East and South asia the poverty rate has fallen by roughly a half.

Moderate Poverty
$2/day PPP (1.6 billion people live in moderate poverty)

The world has always been worse than what it is now. We live better than kings did 200 years ago.

Our income is roughly $24,000/year... 200 years ago $1,200/year.

What Jeff wants to do
  • Cut poverty in half by 2015
  • End absolute poverty by 2025
  • ensure that every country is progressing by 2025
  • to this with the financial help that has long been promised by rich countries
How do people get rich? Save -> Invest -> Profit -> Save -> etc
People who are in absolute poverty cannot save... thus they cannot invest thus no profit. What we need to do is help them save and/or invest.

We've helped people like this before (Europe/Japan after WWII) - Marshall Plan ($130Billion)

US Gave food, fuel, equipment, raw materials (to fight communism) ... worked like a charm
"The most unsordid act in history" Winston Churchill

Poverty Trap
Some people are too poor to invest for themselves... they are incapable of helping themselves.

eg
Congo
  • Destroyed by exploitation, war, and dictatorship
  • 4 million dead by famine and war
  • rampant corruption
  • one phone for 30 people
  • huge population growth (double every 20 years)
To help Congo, we must fix everything at once... not just little by little.
small investments wont work need a really big shove.

Need to do these things with big push
  • fix machinery
  • get people to work (including women)
  • get everyone into education
  • investment
  • improve technology
  • Agriculture must improve
  • reduce disease
  • enforce the rule of law

BTR820 Lecture 2: January 11th, 2008

Re-description of the course.

Need to prove a thesis, small topic w/ strong opinion.

Sources Goals of American Library Association
What we need sources for are:
  • Data can be combined with original research to produce new information.
  • identify the purpose and audience of resources
  • differentiate between primary and secondary sources
  • make decisions on broadening the information seeking process beyond local resources.
Eg. A topic
Beta testing cusomters (ie Google Mail)
Thesis Topics:
  1. Using beta testing on paying customers is not cost effective
  2. Using paying customers for beta testing can lead to consumer backlash
  3. Using customers for beta testing can be profitable under certain circumstances.
Which thesis of topic is best? Adam thinks the third because it is more specific, the first two are too generic.

Where to begin with sources
We are looking for a mix of Primary and Secondary Sources. (primary is research you do yourself, secondary is data you get from someone elses work)

Poor info include 'grey' tertiary popular or commercial research (not peer reviewed). Poor info is what you normally read (popular press). Newspapers are not good sources for most things, because the 'data' has been digested already (there are exceptions).

Primary : Number gathering, experiment, observation
Secondary: reported by another person, analyzed by another person

Primary is not better than secondary, secondary is not better than primary, we need some other method of judging the data that we see.

Avoid relying on encyclopedias, textbooks, and cheap books (because these sources are "older" and not as advanced/cutting edge as good whitepapers need to be)

Note: Wikipedia is biased, and though cutting edge isn't as reliable.

What is the academic press
Written by PHd for people with PHds... peer reviewed.
1 Journals like: (very expensive)
  • Nature
  • British Computer Society
  • AI
  • The computer Journal
As a rule : The less it costs, the less its worth.

2 Trade Press:
Written for and by professionals, sometimes quite scholarly, sometimes very popular
  • IEEE Magazine
  • HR Magazine
3 Popular Press:
  • Scientific American
  • Wired
  • Business Week
  • Business 2.0
  • Macworld
  • ZDNet
  • PC World
Popular Press
- for Joes
- - speedy reading, not accuracy
- - littler reward for insight
- - more rework for access and scoops

Trade Press
- for Pros
- - Accuracy and timeliness
- - some reward for insight
- - some reward for access and scoops

We will want to use the Steacie Library & Scott Library & Toronto Reference Library @ Yonge/Bloor.

Thursday, January 10, 2008

CS 162 Lecture 1 : January 10th, 2008

Professor: John Kubiatowicz
Class: Internet & My desk
Website: http://www.cs.berkeley.edu/~kubitron/courses/cs162-F06/ + iTunesU
Text: Operating System Concepts, 7thed

Intro to Op Sys... and why people should study it.

Why study op sys?
Computers getting more powerful, computers are becoming ubiquitous. Gordon Moore says 18mon-3yrs computing power doubles (Moore's Law)
2002 - Moore's law stopped... business panic.
with lots of transistors on a chip, must "tame the forest" of transistors with Op Systems
Cool things like Mars rovers can be done, but they are complex and require lots of transistors thus need an OS to control them.

Pentium 4 processor is small part of IO 'chain' lots of other transistors than just the processor.

If every programmer had to worry about every transistor in each application they create, the complexity is way to large... op systems are needed to abstract the complexity of the hardware so that we avoid this. Mars Rover has unique requirements.

Every Computer is different, each has different gpu/cpu/memory type/etc. Must abstract the specifics about the groups of hardware inside machines... programmers dont want to know specific knowledge of how much RAM, or CPU model number. Single programs should not have to do everything.

Virtual Machine Abstraction
layer an operating system over the hardware in order to:
  • Get the operating system to 'fake' the hardware to the applications (ie virtual memory, flash drives access the same as hard drives)
  • Give Programmers convience/reliability/security etc... make the "machine" easier to write programs for... make things easier on the programmer... programmer doesn't constantly have to re-do work (not everyone needs to write the graphics driver). Make it easier so that more people write more things.
  • Security. Some users shouldn't access vital pieces of hardware
  • If more programs run on more hardware, hardware gets cheaper.
  • Reduce Bugs
The "instruction set" is the 'line' between the hardware & software. Instruction sets (like x86) are the way they are because of history functionality, bugs(and fixes)

Virtual machines provide, software emulation of abstract machine, programming ease, fault isolution (one program doesn't crash another program or another machine), and portability.

Class will use "Nachos" which is 'simulated hardware' can debug easier using it rather than a real OS.

Projects:
  1. Build a threading system
  2. Implement Multi-threading
  3. Cache & virtual memory
  4. networking and distributed systems
An Operating System is:
  • Coordinator - manages resources, prevents errors
  • Facilitator - provide libraries (gfx) window systems, make things easier and faster
  • Memory Management
  • IO Management
  • CPU Schedule
  • Communication
  • Multitasking
  • More (file system? multimedia support? user interface? browser?) maybe, maybenot
Definition: The one program running at all times on the computer - the kernel

All the MS operating system did was read the program and put it running into memory... program did everything else.

Address Translation : Translation Map used so that program A doesn't abuse program B's data/code

Kernel Mode vs User Mode : Kernel can do certain things the user cannot

Self Learning: John Kubiatowicz's CS 162 Class: iTunes U a reality?

John Kubiatowicz has put up a CS class to iTunes U. I've listened to the introduction and am hooked, Im going to keep listening. I then did some googling and found this (presentation slides etc) I *think* (but am not sure) that I can get pretty much get everything I need to sort of "take the course," except that I actually have no one to ask questions to, I do not have a group for the work.

What Prof Kubiatowicz and UC Berkeley have done with this sort of "independent learning" using iTunesU, is create an "Open Source" like class; akin to Prof. Humphrey's class I took last semester. Where John talks about Operating Systems, Dave et. Mozilla Devs talk about Firefox/Mozilla, Dave does not have audio of himself, but he does have videos of mozilla devs talking about subjects like debugging, XPCOM and Extensions.

Dave also taught about the "process of open source," where a programmer uses tools like wikis, irc, and blogs to strengthen the learning and development process (a practice I will continue to use for my classes, with the exception to IRC)

Could I take Kubiatowicz's class like I was a student with severe mobility imparement and unable to go to class "in the flesh?" Lets see. Over the course of my last semester here at Seneca, I will also attempt to treat Kubiatowicz's lectures/homework/assignments like my other classes lectures/assignments I'll even attempt to fairly administer the midterm/exams to myself (if I fail... I'll lie and tell you I did great :P). I'll blog, keep work on the wiki, and listen to lectures 2ce a week (I have time on wednesdays & mondays).

Perhaps people will read my blogs and we can form some sort of work group?

Anywho. There are risks involved here, I'll look pretty silly if I start doing a class and stop doing it because I have too much other work. I also have 5 other "real life" classes which will demand serious time and effort to get assignments and projects complete. We shall see I guess.

Note: I lack some of the prerequisite knowledge for his class this may cause me to stumble in later situations
"C, Java, and data structures (at the level covered in CS 61B/61C), have done some MIPS assembly language programming, and that you know about series and products, logarithms, advanced algebra, some calculus, and basic probability"

Note 2: Im going to give this a few weeks before I buy the text.

BTS830: January 10, 2008

No lecture today.

DPS912 Lecture 2: January 10, 2008

Lecture 2: Processes

A program that is loaded into memory and ready to run. One program runs per CPU, all other processes are waiting. UNIX uses timeslices to determine which process gets to run.

Learning about PS (ps afux on matrix)
- PID process identifier
- PPID parent process identifier

In C programming we want to use some process stuff
getpid() - gets the PID of the process
getppid() - gets the PPID of the process
system() - runs a unix command in via string ie system("clear"); DO NOT USE

exec() - starts a new program running within the current program... in fact it replaces it.
- execl - specify the path
- execlp - do not need to specify path if program is on $PATH
- execle - same as execl but pass a new environment variables
- execv - execvp - execve -
- exec never returns except for errors
exec by itself doesn't make much sense, you will always probably use it with fork

fork() - fork allows us to spawn a new child
- new process is identical in almost every way
- inherits the file descriptors, sockets, etc!
- not connected, as separate as any other two processes (although one is child of other)
- watch for concurrency issues because of file desc, sockets

wait()
- makes a parent process wait for the child to finish
- needed to prevent zombies and orphans
- waits for all children, and is blocking

waitpid()
- we can make waitpid non-blocking
- waits for a specific child

Wednesday, January 9, 2008

DPS906 Lecture 1: January 9th 2008

Professor: Catherine Leung
Class: S215249
Website: http://cs.senecac.on.ca/~leung/gam671.html
Text:
  • Artificial Intelligence A Modern Approach (second edition) Russell, Stuart J. and Norvig, Peter
Going to be looking at two specific topics in this class. Physics and AI.

AI (see notes)

CS majors dont like the term AI... they are trying to push the term Autonomous agents. Many different fields of AI...
  • Natural Language Processing
  • Machine Learning
  • Knowledge Representation
  • Expert Systems
When applied to games, AI represents (and means) the way in which the computer controls NPC (non-player characters). The agent acts giving information about the "world" and makes decisions on its own.

First thing we will look at are Classical Game Trees. (we use tic-tac-toe to explain)
Trees are used to organize data, we want to use this organized data

In a game tree, we want to get to a "terminating state" (the game is over). To do this we build the tree from the root notes and make "what if" child notes. (Root: I put X in the middle, I put O in the corner...I put X "there" and the game is a tie). For each terminating state, we give a "score"

The agent wants to get the highest score possible, but it must assume that its opponent wants the agent to get the lowest score possible... This is called mini-maxing.

Cathy then showed us an example of tic-tac-toe

Tic-tac-toe is a perfect knowledge game... you have the ability to draw the game tree

At the end of class Cathy and I had a bit of an argument about whether Chess is a "perfect knowledge" game. Cathy says chess is not a perfect game because a computer cannot fully draw a game tree of it (not enough resources on current computers). I say Chess IS a perfect game because the game itself is not based upon computational "realities." Since you can see every piece in the game, given enough time and resources every "terminating state" can theoretically be determined.

http://en.wikipedia.org/wiki/Perfect_information

Tuesday, January 8, 2008

BTS830 Lecture 1: January 8th, 2008

Professor: William Letterio
Class: S2152
Website: http://my.senecacollege.ca/
Text: (2)
  • Information Technology Investment, Decision Making Methodology, By Marc Schniederjans et al, World Scientific Publishing ISBN 981-238-695-5
  • Request For Proposal, A Guide To Effective RFP Development: By Bud Porter-Roth, Pearson Education, ISBN 0201775751
Tuesday is Bill's lecture time, Thursday students will lecture to the class. We can use whatever educational style fits (activities)

This class is about justifying technology expenditures to financial managers.

DPS912 Lecture 1: January 8th, 2008

Professor: Les Czegel
Class: T2108
Website: http://cs.senecac.on.ca/~lczegel/
Text: Advanced Programming in the UNIX Environment

Most difficult course in school, most interesting. Today we just did a basic overview of the course.
Marks: look here Assignments (2 worth 10% each), Labs (10 worth 1% each), Test (30%) Exam(40%)

BTR820 Lecture 1: January 8th, 2008

Professor: Adam Norman
Class: S2173
Website: http://www.BTR820.com
Text: Writing White papers, Michael A. Stelzner

Description:

Students think they know how to research but don't, and overuse internet resources. Journals are underused, books as well.

In this class we will write a white paper (big, heavy and sorta fun).

White papers are cutting edge papers on an emerging technology or business solution. To persuade someone to make a purchase. In this class we will not be making an "advertisement" paper.

White papers Have:
- A thesis
- Research
- - Methodology
- - Sources
- Documentation
- Very nice formatting

Thesis:
- *Point you'll prove
- *Opinion about a topic
- the opinion will be proven through
- - facts (research via experimentation and previous facts)
- - argumentation
- The thesis should appear in
- - the title
- - the abstract
- - the introduction
- - the conclusion

A thesis must be provable!

Ways to come up with a good thesis:
- combine two topics (slashdotting vs small business)
- criticize a developed school of thought/philosophy (chop off small section and attack those viewpoints)
- do original research and data gathering (won't be able to do very much... very small area)

Some Whitepaper topics:
- VMWare is not cost effective for small businesses
- Amazons S3 Service is best suited for short term storage of large files
- An AMD-based Toshiba notebook is a good choice for a medium-sized business
- Linux on the desktop is ready for non creative academics

Then ...
Good Papers prove the opinion with:
- Data (eg 75% of all email is spam)
- Opinions (the percent will continue to increase
- Methodology (found this by surveying traffic at three ISPs, sampling 2000 emails over 31 days)

What we do in the class:
Two large papers (25pgs) on an *IT* topic of some sort... can be political, academic,

Sunday, January 6, 2008

School tomorrow: No wait!

I do not have school tomorrow, nor do I have school on any monday.... hahahahahaha!

Saturday, January 5, 2008

Tuesday, January 1, 2008

What have I been doing?

In short, nothing.

I've been playing video games nearly 24/7, attempting to work them out of my system before school starts again. Its actually working, Im getting pretty bored.