project product - university of torontomashiyat/csc309/lectures/project-product.pdf ·...
TRANSCRIPT
![Page 1: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/1.jpg)
Project Product
1 Thanks to Nilesh Bansal for material in these slides
![Page 2: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/2.jpg)
REAL WORLD
2
![Page 3: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/3.jpg)
Core Difference
• Project – You define the problem statement
3
![Page 4: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/4.jpg)
Core Difference
• Project – You define the problem statement – You are the primary user
INPUT DATE: 03 / 06 / 2010
4
![Page 5: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/5.jpg)
Core Difference
• Project – You define the problem statement – You are the primary user – OJen technically challenging and novel
5
![Page 6: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/6.jpg)
Core Difference
• Project – You define the problem statement – You are the primary user – OJen technically challenging and novel
• Product – Solving someone else’s problem – Someone else is using the product – OJen simple solu:ons to complex problems
6
![Page 7: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/7.jpg)
Overview
• Usability
• Security
• Reliability
• Performance
7
![Page 8: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/8.jpg)
USABILITY
8
![Page 9: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/9.jpg)
Usability
• Most important, but oIen overlooked – Very difficult task
9
![Page 10: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/10.jpg)
Usability
• Most important, but oIen overlooked – Very difficult task – Silently observe user
Make common easy, and uncommon possible
10
![Page 11: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/11.jpg)
Google Search
11
![Page 12: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/12.jpg)
Google Search
12
Make common easy, uncommon possible
![Page 13: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/13.jpg)
Google Search
13
Make common easy, uncommon possible
![Page 14: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/14.jpg)
Reasonable Defaults
14
• Customizable interface – But 90% users do not customize – They use what system provides by default
![Page 15: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/15.jpg)
Features vs Solu:ons
• People are inherently lazy – They do not want to use your product
• But people have real life problems – And they want the easiest way to solve the problem
• If a “feature” is not easy to use, it does not exist
15
![Page 16: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/16.jpg)
Google+
16
![Page 17: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/17.jpg)
Facebook always had lists
17
![Page 18: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/18.jpg)
Affordance: Knobs are for turning
18
A quality of an object that allows an individual to perform an acZon
![Page 19: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/19.jpg)
BuVons for pressing
19
![Page 20: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/20.jpg)
Is This Really Necessary?
20
![Page 21: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/21.jpg)
Affordance
21
![Page 22: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/22.jpg)
Affordance
22
![Page 23: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/23.jpg)
Affordance
23
![Page 24: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/24.jpg)
Typography and Content Display
• More important informa:on in bigger font – Progressively move down – Use bold / yellow backgrounds to highlight
24
![Page 25: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/25.jpg)
Layout
• Toronto Weather
25
![Page 26: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/26.jpg)
Layout
• Toronto Weather
26
![Page 27: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/27.jpg)
Typography / Text
27
Name: Marshall Mathers User Id: eminem LocaZon: Detroit Bio: I am not afraid Url: h]p://twi]er.com/eminem Picture:
![Page 28: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/28.jpg)
Typography / Text
28
Name: Marshall Mathers User Id: eminem LocaZon: Detroit Bio: I am not afraid Url: h]p://twi]er.com/eminem Picture:
![Page 29: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/29.jpg)
Consistency
• Consistent terminology – Login or Sign In? Pick one. – Do not mix Logout and Sign Out.
• Different terminology User Se`ngs User Preferences Account Se`ngs Account SeZngs
29
![Page 30: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/30.jpg)
Example: Delete / Undo
30
• Confirma:on boxes are intrusive
![Page 31: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/31.jpg)
Example: Delete / Undo
31
• Provide an Undo op:on
![Page 32: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/32.jpg)
Aesthe:cs
• Beauty maVers.
• Direct correla:on to sales – Clients will buy a sleeker looking soJware over one with more features
32
![Page 33: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/33.jpg)
Please, do not design like this
33
![Page 34: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/34.jpg)
SECURITY
34
![Page 35: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/35.jpg)
ALWAYS think about security
• Sony Playsta:on Network – Personal data of 77 million users stolen
• Lots of bad guys out there – IBM monitors 150,000 security events per second – Mostly automated, exploit common flaws – Want to use your server as a bot
• Anonymous, LulzSec and others
35
![Page 36: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/36.jpg)
XSS: Cross Site Scrip:ng
• AVacker injects a script into web page
Contents of index.php: <input value=“<? echo $_GET[‘name’] >” /> Request: index.php?name=“/><script … • Escape HTML from all dynamic content before displaying – Java has StringEscapeUZls.escapeHtml(…)
36
![Page 37: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/37.jpg)
SQL Injec:on
SELECT login_id, full_name FROM table WHERE email = 'x' AND 1=(SELECT COUNT(*) FROM table);';
• Always escape strings – Use PreparedStatement (in Java)
37
![Page 38: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/38.jpg)
Other Security Issues
• Always store passwords using one-‐way encryp:on – Can not be decrypted
• Check for user privileges – Specially when including or redirecZng to other files
• Keep base system secure – Stop unnecessary services – Update regularly for security patches – Use firewalls
38
![Page 39: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/39.jpg)
RELIABILITY
39
![Page 40: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/40.jpg)
Up:me
• Near-‐100% availability is important – System is always operaZonal
• No data loss – Backups and disaster recovery
• Remember – Failures are correlated – Human errors are common cause
40
![Page 41: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/41.jpg)
Redundancy
• Hot Failover – AutomaZc switch from failed to available system
• Hardware Redundancy – RAID 10 – mirror all data – Two network switches, two Ethernet cards, two power supplies, two HBA (host bus adapter) controllers etc..
• Redundant Infrastructure
41
![Page 42: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/42.jpg)
Simplified Infrastructure Example
42
Apache HTTPD Use of virtual IP to make sure the user is always directed to the server that is available. Apache acts as front-‐end proxy to redirect the request to backend Tomcat.
ApplicaZon Server Tomcat is commonly used Java app server. Most code runs on this machine. Apache HTTPD Load Balancer and Proxy Pass module are used to provide failover and redundancy.
Databases Master – Slave replicated database servers. ApplicaZon server maintains the sate of each server to provide reliability. All writes must happen on master.
![Page 43: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/43.jpg)
Monitoring
• Open Source – CacZ – Nagios
• Custom – Internal System Check module
• Paid Hosted – Site 24x7
43
![Page 44: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/44.jpg)
PERFORMANCE
44
![Page 45: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/45.jpg)
Performance and Scalability
• Don't op:mize un:l you need to – Make code readable – Use Profiler (for Java, Netbeans is great and free)
• Common tricks – Cache – Pre-‐compute – Sample – Parallelize
• Using mulZ-‐core • To different machines
45
![Page 46: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/46.jpg)
Scalability, Consistency, Reliability
• You can only easily have two of the three – Consistency: among mulZple replica of data – Reliability: conZnuous operaZonal – Scalability: growing with increase in number of users
46
reliability
consistency scalability
![Page 47: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/47.jpg)
Caching and Pre-‐compu:ng
• User queries are correlated – Caching is most common opZmizaZon – Must be willing to sacrifice some consistency
• Fully or par:ally pre-‐compute – Every night, create useful staZsZcs (e.g., a staZsZcal histogram of word frequencies in search services)
• Sample – Approximate results are fine
47
![Page 48: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/48.jpg)
CPU Op:miza:ons
• Mul:-‐thread – Java has package to manage Executors – Pay a]enZon to thread safety
• Use op:mized collec:ons – CERN Colt, GNU Trove to save memory
• Use a Profiler
48
![Page 49: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/49.jpg)
Code Quality vs Performance
• KISS – Keep It Simple Stupid
• KIWI – Kill It With Iron – Upgrade your hardware (more disks, more memory, etc.)
49
![Page 50: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/50.jpg)
CONCLUSION
50
![Page 51: Project Product - University of Torontomashiyat/csc309/Lectures/project-product.pdf · CoreDifference • Project% – You(define(the(problem(statement – You(are(the(primary(user(–](https://reader031.vdocument.in/reader031/viewer/2022022506/5ac006a87f8b9aa15e8eaf98/html5/thumbnails/51.jpg)
Ques:ons?
51