Okay, hi everyone. So today is our fifth recitation and as usual I will be reviewing what we've covered last week since it's important for what we're going to cover this week. So we've mentioned that how operating system provides abstraction for the users and how it enforces boundaries between the user space and kernel space. And that we've mentioned that the user space basically nothing else but the normal mode and the kernel space is the privilege mode. We've also mentioned that the system code basically allows the user to or the user program to request services from the operating system whether it's hardware or software related. We've also went through system call step by step which is the time to scroll and from the time that the user make the syscall to the time that he or she received the results. Please note that here there is your OS 161 ships with a man pages or manual. So you can refer to that manual for all the syscalls that you need to implement. It tells you what arguments that specific syscall that you're going to implement will expect and what should it return. What are the error codes that you need to think about? So basically it has everything that you need to implement your system calls. We've also mentioned how the interruption handling process goes and we've mentioned that once an interrupt happens the kernel will basically switch or the system will enter the privilege mode or the processor will enter the privilege mode and it will record the state and then it will jump to a predefined address which is the OX 8 million and this is where 80 million and this is where the kernel space starts. We've also mentioned that there is a convention between the user space and the kernel space that need to be followed which is if the user want to pass arguments through the system calls to the kernel then he has or she has to place these arguments in the first four registers if the arguments are 32 bits from A0, A1, A2, A3 but if it's 64 bit then they should be placed aligned which means it's either should be an A0, A1 or A1, A2 it can't be an A1, A2. Also the same goes with the return values so you're going to place a 32 bit value in V0 register and the 64 value in V0, V1 and the A3 will just hold a 0 that indicates success. We've also mentioned that you have the copy and copy out functionality that you need to use whenever there is a user pointer pass to the kernel space and what it will do it basically will try to detect any kind of violation that these pointers have by checking the value that they point to. We've also summarized the system call life cycle basically what happens is the user will put the argument into registers A0, A3 and it will make a syscall through the instruction syscall at that point the hardware will step in and change the mood into the privilege mood which is the kernel mood it will save the context the kernel now will identify what kind of interrupt has happened whether it is a system call hardware interrupt software interrupt timer interrupt and then it will see that it is a system call now what will happen is the system call dispatcher will come in and check what system call has been requested by the user and it will dispatch it and execute it then it will put the return value of the result into the A0 and V0 registers and then it returns these values to the user and the user space. We've also mentioned how you should add a system call so the process goes like this first of all you need to go into the manual man page for the system call that you're trying to implement see what kind of arguments that system call receives and what arguments its return by this you need to figure out in which registers these arguments are saved and this is where in the syscall see file you have the switch statement now you need to call your for the function that you're going to implement here and for the arguments as you can see here now since the times is called received the seconds and nanoseconds then and there are 32 bits values so it knows that they are replaced in register A0 and A1 so once you check the man pages you check the argument you add another branch into the switch statement and call your function and pass these registers that come from the trap frame that we went through last time and then you need to write your function into that file which is syscall.c and just put the signature of that function into the header file this is the easy way so once you're done with one or two syscalls and you know how the procedure goes then you might want to do it the standard way which is basically what putting all this file syscalls into one file and all the processes call into another file and you follow these steps and you can it will go through and everything would just like a run fine so this is last time any questions okay so today we have a lot to cover we're going to cover the file system support part today and the process support going to be next week so we're going to cover the process model file system support file table design file handle design argument checking and console file and then we're going to go through the syscalls that you need to implement so it is recommended we always recommend to students that start with the file system calls because these are easier to implement and also that the process syscalls have some dependencies with the file syscalls so we always recommend that you start with the file system call and the deadline going to be one and a half week from today no that was just like an exception this time this is why because I think the testing wasn't ready or something that's why so please start I mean it's pretty late now so everybody I think you you are familiar with this figure which is it was in the lecture slides so basically we have the process it tells you that process contains threats and addresses space and please note if you can see here that the address space since this is a user process starts from 0x0 to 0x80 million so that mean from 0x80 million and on then we're on into the we go into the kernel space so this is the address space and what we need to implement is the file table and that's what we're going to explain now so this is basically the process model and you might want to wonder okay all this process where does it reside so it is defined and process or proc.h file so if we go here and the proc.h you can see the process structure defined here and here where you need to add stuff so or to complete that figure so as you can see we have a name we have an address space and that's it and then you need to add more materials here so you need to complete that figure which is the for example one of the things that you need to do is design the file table so let's understand how the file system support works here so we have three abstraction file descriptor file handle and file object a file descriptor is basically an integer an index to the file table to the process file table every index in that process file table refers or has a reference to the file handle that is maintained by the kernel and the file handle basically what it maintains is it stores the offset of the file so just like it should through the file handle you would know that from where you should start to read or from where you should start to write and the file handle object has a reference to the file object so the file object is basically the physical file on disk and it is mapped so as we can see here file objects are mapped by the file system to blocks on disk so as a result we have three level of indirection file descriptor through the file table points to a file handle file handle points to a file object file object points to the blocks on this or the physical file on disk why do we have three level of indirection because we need to enforce three different sharing policies so the file descriptor and the file table are private to each process the file handles also are private to each process but if you fork which means if you create another process a child the process this file handle will be copied over so it will be sure sorry it will it will not be copied it will be shared between the parent process and the child the process but as long as you don't fork the file handle is a private to that process the file object is shared system-wide so if we have more than one process that is pointing to the same file so they will be pointing to the same file object through the file handles so file descriptor as we said an OS 161 is an integer and that is the index into the file table file handle is a structure and it's a process while file matter information as we said it could be private to that process or if that process forked and create a child the process then it will be shared between those two processes or more and the file object is basically a V node the V node is basically the physical file which is implemented and ready for you to use and it is shared system-wide so now you might wonder what is a V node a V node basically is a representation of the physical file it is defined and current include V node that edge and it has a very useful operation that you might need to use for implementing your system calls like VOP read VOP write VOP is seekable which you will use with LC and VOP is basically means the V node operation so if we go through the V node dot edge this is the V node structure you don't need to go into the details you can just read the comments and as you can see we have a lot of operations that is already implemented for you to use but what you really need to care about is the read VOP read and VOP write and also VOP is seekable and these are implemented as macros so you just for example VOP read if you pass the V node and as you can see here if you pass the V node pointer and the UIO pointer that we'll talk about later it will handle the reading the file the same goes with writing and the same goes with seekable so the seekable basically it will tell you if the file is seekable or not and there are a lot more work that need to be done on your part but the reader write basically it will all read and write for you it will do everything for you so this is the V node there is another layer that is built on top of V node which is called VFS virtual file system and this is a more friendly layer that has a more friendly interface for you to use with other system calls so it provides a helbar functions on V node and it is defined in VFS.h and the useful function for you to use is just like open close change directory and get the current working directory so let's go through the VFS so as you can see here the VFS has a lot of functions that are already implemented and can be used so what you care about is VFS open VFS close you have a VFS current directory and VFS get current working directory or change directory sorry so these are already implemented for you you can use them with your system calls so this is V node and so as we said the V node is the physical file you have very helpful macros to use VFS the same thing now so you might wonder okay now since all of this is already implemented for us what should we really do so your task is basically for this part of the assignment is to design the file table design the file handle and do most of the work for argument checking so the file table design it should be basic so this is a data structure that maps the file descriptor to the file handle so since it's a data structure you can use arrays you can use a link list you can use trees depends on which one you're more comfortable with but the most simple way to do it is using arrays but you need to keep in mind that so whatever data structure you use it should be able to find the available file descriptor whenever it is requested for example once you call open that data structure should be able to locate an available file descriptor and while if you called read or write it should be able to retrieve the file handle from that data structure and also it should be able to recycle the vibe descriptor so if we close a file that file descriptor should now become available for other to use it to open another files so this is all about the file table design that you need to know any questions now we go into the part of file handle design so the file handle design basically contains a reference the major job of it is to have a reference to the file object the v-node and it has a lot of requirements first of all you need to be able to tell what is the offset on the file so for example if we have let's say two processes using that file handle they should know at now if we issue a read command or a write command at which point of the of the file I'm going to start to read or I'm going to start to write this is one of the things that you need to to store in the file handle which is the offset the other thing is it should check the privileges so for example if a process opens a file as a read only so that process should not be able to write to the file or if it if it did open the file as a write only then should not be able to read the file so that means the file handle has to keep the open mode of the file and always check whether whether the service requested from the process is are compatible with the mood that were passed through the open Cisco and it should be able to determine if it's safe to be destroyed so at some point of time you need to destroy the file handle since the file handle as we said so it could be private to the process and it could be shared between processes if we fork so that means if we have two processes using the same file handle and one of them call close then that file handle should be able to know when it is safe to be destroyed or not so how should you do this you you need to do this by tracking how many references to that file handle at the current point is so if I have three processes pointing to me then if one of them call close I should not destroy myself I should wait because I still have two other processes that are pointing to me once that counter reaches zero it's safe to destroy the file handle the other thing to consider is synchronization so you have so as we as we said that the file handle is short between civil process could be short between civil processes so if one of them tries to read the other tries to write at the same time you need to be able the file handle should be should be able to handle such situations so some people might think okay so I think here I should use read a writer luck but this is not correct why because so we have one file handle it is shared between two processes and both of them are trying one of trying to read one trying to write so whether each one of them whether it's trying to read or trying to write it's going to change the offset in the file handle and that mean basically they are writing to the file handle it's the true for example I'm reading but I'm still writing to the file handle because I'm changing a value in that file handle so that means the reader writer luck will not work with a file handle I'll basically having a lock a simple like that we've implemented we've implemented will do the work because so whenever a process tries to access the file handle should acquire the lock and then read write it will change the offset of the file once it's released the lock the other process could access the file handle as a reader write is it clear so using reader writer luck is not the solution for handling the synchronization or concurrent accesses for the file handle any question on file handle design yes the file object basically no show what happens in the file handle you're going to use the vop read vop write and those should handle everything for you they will read and write the third thing that you need to do is argument checking so you always need as we said you always need to use the copy and copy out functions with user pointers to detect any kind of violation like if the user pointer passes a null or unauthorized memory location so for example we have we will have a lot of pointers with these system calls that you need to implement like an open you have the file name and read and write you have the user buffer you also need to check if the file descriptor is valid whenever you receive an argument a file descriptor you need to check if that file descriptor is valid or not you also need to check if you are allowed to read and write as we said the privileges and this for example has to be done through the flag that is sent and open let's say the open sends flags that tells you the process needs access to that file as read only or write only or read write only and the last thing also you need to consider is the error whenever an error occurs you need to return the error code where to know this where to find this you can find it into the manual or the main pages for the system code any questions okay now we have the console the console basically is a terminal so this is here where i type or i receive input or i receive output here so the console is a special file why we call a special file because there is no concept of offset in the console so basically writing will basically append to the console file and write to the print to the on the screen and the read will basically read the user input or the keyboard so we don't have for example we can't say to the console read the first 100 byte of the user input there is no such a thing in the console and that's what makes it special whatever the user prints and enter it will get it one other thing that makes it special is that it has a fixed file descriptors so the file table index zero one and two these are reserved the zero is reserved for stdn the one is reserved for standard output and the two index two is reserved for standard error and the last thing that makes the console special is that you don't need to open it to use it so it should be opened automatically for the user process so for example the user when he writes he or she writes a program just like hello world program they won't need to open the console file to write to it so they just print f and it should print or scan if it should get it get the input from the console so that's what makes the console a special file so how should we initialize it what you need to use to initialize or open the console file is the virtual file system function open so vfs underscore open and you should pass the name as con semicolon so you should pass this as the name and the flag based on what are you trying to open are you going to try to open the standard input then it should be read only if it's standard output should be right only if it's a standard error then it should be right only so based on the what are you trying to open you need to set the flag for the vfs open so you initialize it using the vfs open so when should you initialize it there are some stuff that you need to know so the console file is only used with user thread or process it's not used by the kernel kernel basically has the k print f and that will handle the printing on screen for it doesn't need to open the console file so the console file is is only used with the user process or thread and you don't need to open it with every process so this is the common mistake that students make whenever they're trying to create a new user process they try to open the console and that will not work what you need to do is you need to open it only once and this is with the first user process created and then later on as you start forking it should be copied into the new process so the console has to be opened only once with the first user thread or the first user process created and the fork should handle copying copying it to the new file table any questions on the console okay so let's now we will now go through the system calls one by one so the first one is opens this call so here are some points that you need to consider while you implement these opens this call first of all argument checking which is you need to check if the file name is valid since it's a pointer and that's done using the copy in you need to check if the flag is valid so it would be useful if we go so here this is the manual so open now it tells you this is the name of the syscall and this is the signature so it receives a file name and also receives a flags and there is a mood also so now it describes you for example the flags what values they take so this is a read only and this is a write only and this is a read write only or read write sorry and you can also specify if you want for example you want to append to the file and if we go down it will also tell you what you need to return what does that syscall returns and also the errors that you need to handle so for example if the file name is not valid so you need to return the default which is file name was invalid pointer so as you check your argument you need also to return the correct error code for for that argument if it's not valid so as you can see the manual tells you everything if we go back so the flag we need also to check if the flag is valid so as an example what if the user sends this a flag this a flag basically tells you I want to open the file as a read only and write only and that's not valid and also in the manual it tells you that these flags has to send to be sent alone that means it's either should be read only you only you should either send read only or write only or read write you cannot just like combine both and send them as the flag for open so the other question is now you want to open a file and as you can see that the open returns an end which is the file descriptor so one of the questions would be how to find an available file descriptor and that's what we discussed which should be based on your data structure the last question is to consider is when you initialize a file handle what should be the initial offset so many of you would might want to know that or answer just like it should be zero but you need to figure out for example what if the user opened the file and you want it to append to the file that means the initial offset has to be the end of file and that's what you need to figure out how to compute it and as a hint just go through the vnode operations available to you or vfs you should find one of these that will help you just get statistics of the file and for example tell you what is the size of the file and based on that you can compute the offset or the initial offset close so for close so basically close takes a file descriptor and should return a zero on success so what it needs to check is you need to check if the file descriptor is valid and the other thing is you should think how you should recycle the file descriptor so once a file closes that file descriptor should be now available to be used with other files and you also need to figure out when it is safe to destroy the file handle and that's what we discussed with the file handle so you need to check if the file handle has only you are referencing to it or if there are others referencing to it so if it's only you then it's safe to destroy it if it's not then it's not safe now we have read write let's go through them so read receives a file descriptor and this is the file that I want to read from receives a buffer address and this is where I want to put the content or the data that I read from the file and this is the buffer size the same goes or let's say the opposite gonna go with the right which it will receive a file descriptor to write to and a buffer address that I'm going to read from and what is the size for what size I should keep reading so you need to check if the file descriptor is valid you also need to check if the buffer pointer is valid so since it's pointer then you need to use the copy in and can the user read write so whenever the read write syscalls are issued you need to check if the user of the pro or the process opened the file as a read only or write only or read write and if that process is authorized to execute that system call or not now there is it's the read write it's not as basic as you call vop read and vop write it's true that they will do the reading and writing for you but there are other stuff that you need to consider which is in order for you to use the vop read and vop write you need to initialize a uio struct what is the uio struct so that is defined in uio dot h so this is the uio struct so you need to first initialize that structure before you call a vop read and vop write because with vop read and vop write you need to pass the v note pointer and the uio into the macros so you need to get familiarized with what is inside that structure and how you need to set these values so the uio or i o vector the data block this is basically the buffer and the offset is the amount of data i think you need to this is the file handle offset and the reset is basically how much should i read and the flag is should be one of these so if it's a user code then it should be user i space if it's a data should be user space and if it's a kernel so it should be sys space so the uio rw so this is should be either read or write so am i trying to read or write and the uio space this is the address space the process address space so as an example let's say i call read system call the read system call so has an fd which is as we said an index for the file table to the file handle and the buffer and how much should i read so how would this fit here so as we said the i o victor this is the buffer and the offset this is the file handle offset and the reset is this is the buffer length sec file as we said so it's going to be user space because it's a data we're reading data and rw read write so since it's a read system call then this has to be set to uio read and uio space or the address space so this is the address space of the structure or sorry of the process or the thread calling that is called so once you initialize the uio at that point you are able to call the v o we read v o p read and pass the v node pointer and that uio to it and will do the rest read for you so this is basically telling v o e v o p read where you should read what you should read and where you should store the data that you read any questions the uio is the one that many people get confused about or don't know how to how should they set it lc so lc basically what it will it will do it will basically just change the offset of the file just change the location where i am in the file i want to go to a new location in the file so i will use the lc i will pass a file descriptor position and once so the once has several values that you can use and it will tell you how you need to compute the new offset so what you should check is one of the tricky parts of the lc as you remember in the last lecture we we've said that the lc one of the arguments that it receives is a 64 bit so that means since we have three arguments received one is 32 bit that will be put into a zero a one will be unused a one register the second the position will be sent as a 64 bit that mean it will you should put it into eight a one and a two and the once has to be on the stack pointer plus 16 so how to get the once you just get the pointer from the trap frame and add 16 to it you should get the once value the other thing is checking you need to check the file descriptor if it's valid and then you need to calculate the new offset how you should do this it's mentioned in the manual so it's here here how you should calculate it you need to check to check the once value and it tells you what you need to do change directory should be easy so change directory it will basically receive a path name since it's a pointer you need to check if that pointer is valid or not and you can use the i think vfs underscore change directory a method for it get current working directory the same it will receive a buffer and a buffer length so it works as an open or sorry as a read it will read the file name and put that file name into the buffer so since the buffer is a pointer you need to check if it's valid or not now the last syscall that you need to implement which is a little bit tricky or people get confused about it is dub two so the manual tells you that dub two clones the file handle the old file descriptor onto the new file handle the new file descriptor so if the new file descriptor names are already open then you need to close that so let me explain this so you have the file table and the process diagram or figure that we have so this is the file table and the index of this item of the file table is the fd which is file descriptor and it is pointing to a file handle so you have an old fd and you have a new fd each one of them are pointing to a separate file handle so the dub two basically will take those both two fd's and what's to do is let the new fd points to the to the file handle that is pointed to from the old fd and this is what we mean by cloning so we are cloning the file handle into the new fd but you need to make sure that if the new fd is pointing to an open file then you need to close that file first and then you need to let it point or clone that the old fd file handle into the new fd so this is what basically the dub two syscall do this is how it works so what you need to check is to check if the file descriptors are valid or not so as we can see here that dub two receives the only receives two file descriptors the old and new and again you have the errors that you need to handle so for example if the file descriptors not valid you need to return that error code now let's take an example some people ask so what's is the usage of that dub two syscall so everybody should be familiar with echo linux command basically echo whatever you give echo whatever string you give it it will just like print it for you again so if i just like run echo hi sorry sorry oh oh yeah yeah it's filling yeah so it will just like print it for you so this is what echo do so if we pass hello word it should be printed for us so let's assume that this is the minimal code for echo dot c which basically takes an argument and print it for you and this is the uh so this is your right side the right side code this is the minimal shell code which basically fork a new process and then if we are in the new process which is the child the process i will call exec v which is execute the echo command else it will wait for the child to exit so now what we want to do is let's say i want to redirect that string from the echo instead of printing on the screen i want to redirect it to be printed into a file hello dot text how should we do this without changing the echo so it's not feasible for example for you if you want to do redirection to change the user code so in order to do this uh we need a syscall something like dub 2 which basically will change the shell code and not the echo code and it will be something like this so we will fork and create a child the process and now in the child the process i will open the file hello dot text and send the right only flag to it and then the open as we know that it returns the file descriptor of that file so i will take that file descriptor and run the dub 2 on it so the file descriptor is the old fd and the standard output should be my new fd so what it will do it will clone the file handle pointed by fd into the standard output fd so whatever goes into the standard output will be redirected into that file and then i will i can close fd and here if we run the exec v which is run the echo command basically it will redirect the whatever string that you pass to it it will redirect it into the file so this is one of the usages of dub 2 command any questions okay so this is what we have for today thanks for coming and next week we will cover the processes goals and please let me know if you have any questions thank you


G'day guys, Matthew from AndrewSims.cutter.z here, proud sponsor of the all-comers four-wheel-drive class. Today, we're going to tell you about the success the New Sportage has been for us. The 38 units sold in the first 10 days since launch, we think the New Sportage represents the best value in the New Zealand motor industry today. One particular model we like is the Urban E-X. It's a two-litre up-front-wheel-drive. It includes 18-inch alloy wheels, front and rear park sensors, reverse camera, privacy glass, blind spot monitoring, lane departure warning, full leather interior, touchscreen audio, daytime running lights plus more. The retail of $39.990 plus on road costs today is still just $33.990 plus on road costs for the Tiger family.


Everybody forced here ripping 2022 NT baseball hobby four bucks full case number 16 random team style can always find the results late in sports cards calm Let's get started and you better watch out What if that explodes like the killbox at that one time she's over it is over dude What what if the clean is showing up off the ground? mop I Use only Beckett approved moisturizers My moisturizer you mean Dawn anti-bacterial hand soap and purel hand sanitizer than sure thing people don't moisturize in Florida Are you kidding me?   Well, every time I come in here something outrageous Three-color pads card Manny Margot for the raise the 25. I forget who specifically it was NWO, but yeah It's pretty dope rookie jumbo jersey Seth beard and 99 d-backs Yeah, oh, yeah, I mean Florida's so humid it does kind of it does feel like that sometimes illegal Yeah, that's for sure.  We got to get Sam in here. Don't get crazy Colossal Jersey auto for the blue J's Alec Manoa 6 of 99 this we can't hear him yelling in chat I Printing plate RPA One of one cubs.  What is this legendary signatures? City to 25 Bud ceiling Bud ceiling 24 25 that's gonna be random to everybody at the end Says Milwaukee though, that's got to be a Milwaukee card, right? It's let me see what it says in the checklist It's Milwaukee But that's not that's not a team though, right should be none Right He was VP there The checklist says none on this You send a pig to I haven't seen this yet. Let me see what See what's up with that real quick Jersey on a Magalia, or don't yes tigers of 25 checklist says no team so now I'm Matt says random to all check this is none. Yeah Yeah, that's even random to everybody. That's what we've been doing here. And so we did yesterday on the baseball channel Yep, so random that to everybody you guys want to link to the Checklist just in case You can check out the checklist. We're going by the checklist the official checklist group break checklist has it Go there click on buy team and group break team checklist view you can search bud ceiling. It's none So that's what we're going by Jersey card Braves Austin Riley 85 at a 99 Jumbo Jersey John Heasley Royals to 99 Alec Earl Averill to a five Guardians Three of ten patch auto Brock Burke Rangers Playoff star Saturday Get first game. I don't know if it's Jags or Jersey auto to 25 AJ puck A's Jersey auto one Gonzalez Guardians four of ten one gone Guardians Look at this Pirates RPA. I don't that's a crazy patch 30 of 49 with Alpo Castro Awesome patch there for the pirates his signatures cool, too Next up is a Hall of Fame signatures Tony oliva twins to 49. Yeah, well, how do we get this off? It's called super wild card weekend now, right and Clearly on the field five of 49 Clayton Kershaw Jersey auto nice card Dodgers All right guys, we got to think of a nickname for Sam. We're gonna make it stick So so far. I think Sam Burgini is the best one Because he's always zero to 100 and Sam Bucca's a good one The great Sam Bino is a decent one as well What do you guys think any ideas? Not trash something we can something we can mark it Someone can profit off of you us specifically Jersey car 1099 Jose Abreu or Brian Abreu Astros. I mean they're both Astros now Jersey car Nick Castellanos Phillies to 49 the Mad Hatter. That's a good one, too. Dude's always wearing hats They could play on his name is easy though because it's Sam. I think that's a good way to go That relic Carl Ferrillo one of ten for the Dodgers Mad Hatter is going though. I do like that He is very mad and he wears a lot of hats God triple patch auto John Rhodes six of ten Orioles, Sam Boney. Sam Boney was a good one do a Santa Slayer The great Sam Bino is what Matt suggested this patch, dude. That's a Laundry tag patch auto mark prior. That's really freaking cool actually Game worn laundry tag two of three auto mark prior cubs. You can bag this.  We have the future auto Cardinals Nolan Gorman three of 25 That's a thick process tick hard though the future auto midnight RPA D-back drew Alice 18 at 25 Nasty Alice there you go D-backs that probably same size Got a Cubs auto Ryan Sandberg to 25 shouting Sam The bullhorn we call that 18 of 99 Patrick Mazzica on the rookie Jersey auto the bullhorn is a good one Because it's like a bull in a china shop Sammy the bull Sammy the bull Sam bull and and each year. Oh, we had this same insert last case It's treasured stats the 51 mariners. It's not Vaughan Vaughan has fantastic news Did I win a lottery? I didn't buy a ticket, but did I win? Samarillo we can call that Samarillo, Texas slimy Sosa colossal Jersey card Thomas Nido for the Mets 99 Patch card rookie Curtis Terry twins for 25 Pat's talking to Mayo to keep a long term. That's good lock up Mayo Keep him around and processes of interviewing offensive coordinators next week Okay, that's amazing news They honestly shouldn't like week three or last off season Instead of hiring Matt Patricia Jersey Card Cody Belanger to 25 Dodgers Well at first ones. What's up Gavin?   I think rookie auto Jake Myers to 99 Astros Gavin, I mean and enjoy it man I'll give you a link to our website, but I mean I would recommend maybe not joining if it's the first time you're watching To be honest, you know check cards out in eBay. Look up products. Just enjoy, you know watch all the breaks You can't get info Jersey auto Matt brash mariners to 99 RPA de Bexigan, Luis Frias 5 of 10 Steve actually crazy Okay, this one a fit these fit asleep, right? Oh, that's that's pretty big printing plate patch auto Bobby wit jr. Eckler's choice One of one Wow Royals very nice Troy age congrats on the sweet card Sam Yelliet That's a really good one Samuel L. Paxton He's opening packs nice Bobby with that's going in a mag, of course Patch auto Jackson co our Royals the 49 and legendary jumbo materials the 49 Frankie Frisch Cardinals that is a jumbo game-worn Jersey Frankie Frisch Sammy Yelliet is a really good one Attaction out of the group right now And then we are gonna run in that bud ceiling guys Okay, again, we got the bud ceiling cut auto Checklist says no team check list has no team on this. I dropped a link feel free to check it out yourself bud see leg ram to everybody here Going by the checklist and they're four and two four That's two Whoever's up top after six gets the card one two three four five and six Troy H up top Troy H relics Curtis Terry Cody Ballinger Thomas Tomas Nito Carl Ferrello Nick Castellanos Brian Abreu Earl Averell John Heasley Austin Riley Roberto Alomar as a blue J Seth beer and Manny Margot as a ray Manny Margot relic book Frankie Frisch Patrick Mazzica RPA book a Clayton Kershaw Jersey auto book as well Has he signed anywhere yet? I don't know. What's up with Kershaw? Did he sign? I can't remember Sam and yellow Sam and yellow Do that one's awesome That's a good. That's really good Jackson co are Louise Frias Matt Brash Tyler O'Neill Jake Myers John Rhodes country roads there Johnny Tony Oliva Redolfo Castro Juan Gonzalez as a guardian Man AJ Puck Brock Burke Maglio Ardonias. That's a cool one Hunter Brown Alec Munoz Sam Malone Simple enough to be Sam Malone. No a printing plate patch auto Eckers Choice one-of-one Bobby Whit jr Midnight RPA drew LSD backs to 25 the future auto Nolan Gorman Cardinals Mark Pryor game use laundry tag auto two of three Cubs and printing plate RPA Cubs Greg Deekman as well That'll do it everybody number 17s coming up next


5 Concepts in Transformers 1. Look ahead mask This is one of the two types of maskings in a transformer neural network that makes sure that words cannot derive context from other words that are ahead of them. 2. Padding masks When sentences are input to a transformer, they are padded to make sure they are fixed length. The padding doesn't mean anything, and so we use the padding mask to make sure no attention is paid to these padding tokens. 3.  To make sure training is speedy, a transformer has multiple such heads in parallel. 4. Self-attention This is when words of a sentence pay attention to the other words in the same sentence. 5. Cross attention This is when words of a sentence pay attention to the words in another sentence, and this too is done to create word vectors that understand context. To build a transformer from scratch, do check out this playlist on the channel.


Thank you very much. Thank you for the wonderful introduction. Exactly how I wrote it So my name is Owen Xia and I work for a local Digital marketing agency not a design house. So I don't really consider myself as a designer not anymore I used to consider myself as a UX design or web designer But I stopped calling me myself that mainly because of three reasons the first and the most important reason is that I cut my long hair I'm not saying that all designers should have long hair, but I certainly felt a lot more credible when I looked like that and the second reason is that Nowadays my job scope entails a lot of web analytics a lot of digital marketing in advertising a lot of Search engine optimization right whenever I go for client meetings if I feel that the client is kind of difficult to handle I just start throwing out all those acronyms DMP SSP DSP Which stands for accelerated multiple pages supply site management supply site platform and the data management platform and all that But when I was a designer, I find it relatively difficult to handle clients I usually run into very tough clients and I think all of them can be divided into two groups Here are the two groups The first is those I call micromanagers. They will tell you something like you know feel free to be creative and After you submit that your design they say oh, and I love your design, but can we just make a few minor changes? They won't take much time or yours at all and then you get something like that And the second group is kind of the opposite of the first group because the first group kind of know what they wanted And the second group really has very little idea what they want at the start of the project. They will tell you I'm not sure what I want, but I'll know it when I see it and when you submit your design. They will say You know what? I love your design, but can we make it pop? I never figure out what that meant because it's really difficult to make a page pop so based on my experience the more client is involved in the design the more expensive it's going to be in terms of Investment on your part, you know time and money and strength right if I design everything you approve That's relatively easy to handle and if you want to involve your entire staff and Assist me in the design and go through all that 80 iterations. That's going to double triple even quadruple the cost nice So I usually I used to sit in a client meeting and listening to their all their feedbacks and again Until I want to shoot myself But here's the thing when it comes to design Everybody seems to have a lot of opinions Which is why when I said if I go for search engine optimization meetings I'll just talk about the latest Google algorithm and change right and if they can keep up with me I really don't know why I would be I'm there But for design whenever you put out a design you always get ample amount of feedback everybody has opinions, right so But opinions can be dangerous Since we're talking about opinions, let me get your opinion on the following website This is a car leasing website. It's called Lin's car comm It's started by this Chinese lady called Lynn and It's a car leasing website. Can I have a show of hand? How many of you like the site? Right, so we have one person how many of you don't think it has a good user experience and you don't like the side Okay, the rest of you don't have an opinion or are you just won't raise your hand Okay, so for those who do nothing has a good user experience. What would you change? Give me some response. What do you say everything? so it's it's very 1999 right and For the slightly older crowd in the room if you recall that Yahoo used to have this geo cities section where Everybody can create their own site. Well, if you're nodding, you just revealed to me your age So they used to use these really bright color pure colors and fonts are all over the place, which is kind of this If we want to use a nicer word is a retro design. Okay now How about this website? It's a it's a dating website. Don't ask me how I know it and don't ask me whether I've used it But it's a dating website. It's called plenty of fish calm. Yes, very apt So what do you think of the design? How many people like it? How many people would actually use it again? Don't ask me whether I have used it or not. How many people would actually use it? Nobody Okay What would you change? Would you like would you per how many people do you think that they actually need a redesign? Okay, very good Now the third website I want to get your opinion on is this one How many people will redesign this website? I see some of you are hesitating because why? Because a lot of you already know about this website You know that craigslist is a wildly successful website and therefore you wouldn't change a thing But if you had never heard of this website Then you probably would tell me yes, I would like to change its website. It still looks very 1996 which it does Right so Craigslist is a pretty interesting website It was started by you guessed it Craig and Craig started this website in 1996 And over the past 20 years the site remains relatively unchanged and mind you 20 years in internet years. It's like a century. Even Coca-Cola has gone through multiple revisions of their can design right and if you think about it in 20 years They haven't really changed the style of their marketing. What does that tell you? Perhaps don't fix something if anything broken All right, but so redesign can actually be very costly very risky You might have also heard of this website dick.com in 2008 it was one of the most popular websites on the internet has received huge amount of traffic in 2008 It was actually worth a hundred and sixty million dollars and two years later in 2010. They decided it was a time for revamp So what did they do they redesigned the website within the first month of redesign the traffic dropped 26% and then it went down here from there in 2012 which is two months later It was sold for guess how much It was sold for half a million So it went from one hundred sixty million dollars to half a million now I'm not saying that redesigned was the sole culprit of this There were other factors like the rise of Facebook, but I'm sure redesigned played an important part It's a redesign can be very risky Now you as a smart audience in the group already know where I'm going with this When it comes to opinions, there is more to it than meets the eye. This is Lin's car.com Business week calls it one of the best websites on the internet You know why because the whole retro so I actually watched this BBC interview of this this lady her Rationale for creating such a website is that every website was looking the same, you know Now this was a slider carousel then several sections, right? So she really wanted to attract the attention of the public was more of a public public stunt and it worked Every website was reporting this most people the audience that they attracted actually already expected to see something like this right, so it was actually part of the traffic strategy and if you Actually get past the initial reaction of what the hell is going on here? You actually discover it has all the persuasive device necessary to convert audience for example Here he says I'm Lynn. I'm from dragons den dragons then how many people you know shark tank It's this American reality show where entrepreneurs go on to TV and you know try to get investment from vcs dragons Then is UK's equivalent of that Somebody was actually trying to buy by her out and she said no I said that social proof and he says in 2010. I rented 35 million of cars so and so forth and he has these assurance device That says what happened when I press order now, you know, don't worry. You won't be charged. You do not commit He has all the right call to action. It even has Life support and all these different elements are scattered around the page I'm saying if you do not leave if you actually go through the page a lot of them will convert the website Receives millions of visitors every year and it's one of the most successful car leasing website on the internet How about the next one the site I may or may not have used? plenty of fish two years ago in 2015 the site got acquired For five hundred seventy five million dollars again. This is very interesting story. So the creator Was somebody called Marcus Freind and he was a developer in 2003 there was this new programming language called ASP net I think it was from Microsoft right as some of you would have heard of it so Marcus Freind as a developer he thought it would really good if he could add one line that says Proficient in ASP net on his resume, but he didn't really want to read books and stuff So he thought why not create a website as practice I so he just slapped on a basic website and to his surprise people were just signing up. I mean and Then before he knew it Two years later. He was making ten thousand dollars every day from Google AdSense If you haven't heard of Google AdSense is that little revenue program where you make about two dollars for every thousand impressions He was making ten thousand dollars every day now he was it got acquired for five hundred seventy five millions and the interesting thing is that because He was he wasn't really in the whole startup game by the time he figured out what VC meant venture capitalist He was he had more cash than he would ever be able to spend so he owned a hundred percent of the company till the day he got acquired And if you go to plenty of fish I'll come I think right now is pof.com You will still see a very retro design a very basic design. I so what I'm trying to say here I'm trying to say that opinions can be very dangerous If I go to a client meeting and our discussion becomes your opinions versus mine It's not very productive because I can't really tell which one is correct Either one could be correct, right? We can joke about clients all day long because I enjoy doing that But the ironic and sometimes scary thing is your client may very well be correct And you may very well be wrong. I just don't know which one again You know where I'm going with this since the title of my my presentation is analytics, right? So instead of letting opinions drive Your design decisions you really should be using what data but here's the thing most designs are driven by opinions Although we don't call it opinions. We call it experience That's just another word for opinions What's the second thing that people usually base their design decisions on it's so-called best practices Which is why nowadays you see all these similar? Bootstrapping website some of you would know the or use the CSS framework bootstrap right they pretty much look all the same in fact if you Google every freaking boots bootstrap bootstrap site ever you will see the standard bootstrap layout and Also nowadays we you see a lot of websites with the first screen above the foot It's all the slider. We call it carousel With the left arrow right arrow then some dots at the bottom which nobody clicks So you're doing that only because everybody else is doing that. That's industry best practices The third one is competition competitors again often when I go for client meetings I would hear things like, you know our competitors are ABC a is doing this. I really like it B is doing this great See can we combine all of them? I? Don't know if we can combine all of them This would work if your competitors actually know what they're doing Which is not always a case right if you blindly follow them You're gonna it's a classic case of the blind leading the blind And the fourth one is a little bit tricky. It's called hippo a hippo stands for highest paid person's opinion Which happens more often than you think? Especially if you're dealing with the boss on the other side Right, although we tend to think this we will speak our mind But in the actual in the in the actual boardroom whenever the boss opens his mouth the boss says I like blue Like I don't like yellow the website will probably become blue like the highest person's paid a person's opinion It's also very dangerous Right These are all opinions, but you should really be using data to guide your design decisions Why because as they say numbers don't lie But the problem with numbers is that numbers can also be very ambiguous Right if I tell you right now that I don't have any girlfriend in other words my girlfriend count is zero That data point you may draw the conclusion that I am a very boring and unattractive guy Which you might be very correct, but I think you should look at other factors For example, I haven't told you whether I'm married or not In fact, I am married and I have a loving wife That's all of a sudden that data point isn't so negative at all right it means that I am Law you and faithful like all the husbands in the room. I hope so When it comes to data, we'd like to talk about the framework of data inside and actions Data themselves are not worth much data. Do not have intrinsic value Or we can't really do anything about data the insights derived from the big data is what we want But then again if you derive a piece of insight you can't do anything about it. Let's say if I tell you that 56% of your users use sing-tel or use a predict startup as ISP, right? You can't really do anything about it That's a piece of insight which is not actionable So in the context analytics, that's not very useful what we want are Actionable insights derived from data and that's what analytics means to me So I think there are four main areas that analytics can help you with the first area Very simple is decision-making right if you say which version is better a version or B version here's an example Here's a website with the photo of a cute baby Now if I do not show you the heat map then I will conduct the poll I say how many of you like a version a and version B probably 50 50 Then it's opinion your opinion versus somebody else's opinion But if I show you this heat map by the way, if you do not know what heat map means It actually means a visual representation of how much attention your users are paying to every particular Element of the page so if I'm constantly looking at say top right top left corner and Everybody else does so then that particular area will be represented by a hot color such as red or yellow And if I'm not totally paying any attention to say the bottom right then that Screen part of the screen is usually marked as a cold color such as blue or white right so this is a heat map And it tracks the movement of the pupil That's the most advanced form of heat map tracking the next best thing is the track mouse click, right? But anyway, so this is a heat map. That's data inside action. So what is the data here? Can somebody tell me what you can? What do you see in this visual representation? What are the part of the screen that visitors pay most attention to the face? Actually the eyes now as humans thousands of years of evolution or you know basic social etiquette Dictates that we should look at the other person when he's talking to us So we usually instinctively look at the other person in the eye Which is also true when it comes to web design if I see somebody looking out of the screen at me I instinctively look at his eyes But we also have another instinct which is if I look at that then a lot of you will also look at that So instead of having the baby look at you where you will stare at the right at the baby and not the text You should let the baby look at the actual part of the screen where you want people to pay attention to which is the headline and the first paragraph I saw That is data Data tells us people pay attention to eyes. What's the inside the inside is? Line of sight should guide people to whichever part that it's most important on the screen Action well choose be and also in our future designs. We should also pay attention to line of sight Right well Obama does that Hillary Clinton does that so there's no reason not to do it Right so that is data inside action so for the following slide I always want to ask you to Discuss everything in this framework. Let's let's look at another example So Here's a website. How many people like it? This is no longer a trick question. They actually did redesign this website and got better response Okay, so if I look at this website, my first impression is that it's a little bit busy people things are all of the place a Lot of arrows a lot of pictures a lot of words so what we can try is Say a text-based website where you explain to me in detail what the benefits of this particular software is Or you could just use imagery you can slap on some really attractive image and Ask me to sign up, but I really don't know which might work. So Well, you let data to tell us right so they came up with two versions one text-based and one image-based in this case Which one one the image-based and I think now you can always rationalize this and derive insights. What is the inside here? data is text-based version lost to the image jury version and the interesting thing is the image jury version really doesn't have a lot of Arguments as a headline, but it's not explaining all the features and so on It's it's just very short the the text-based actually goes on and on all the information you need to make a decision Normally you would assume that the more information it gives user the more likely the user would convert not in this case What is the inside here? One of the possible insights is that Purchase is very different from trial. This is a software trial in order for me to take up this no risk trial I really only want to know the major benefit the major bullet points And a happy person I will click Trial right, but if I'm selling the software, maybe it's a different story I would hazard a guess that if I'm selling the software for 99 dollars without any trial People would respond better would respond better to the first version. Does it make sense? But there's no way of telling we always have to have to test Now the second purpose of analytics in my mind is to help you conduct user research Now I know a lot of you are UX designers and you are obsessed with UX documents like persona task analysis All these different user research are trying to help you achieve the task of finding more about the user while you can conduct primary research Survey interviews and all that but it takes time and also in focus group or in interviews People's response might be actually different from how they would behave in in real life unsupervised So the more reliable data is actually what they do on the site again. This is a heat map. What's the data here? What's the hottest part of the screen? Like these menu items so there are one two three four five six seven Or how do we usually as UX designers decide the information architecture or the manual structure? Sometimes we Conduct this exercise called card sorting. How many know have used card sorting? So basically you give a deck of cards to users with all the different Pieces and you ask them to reorganize right based on how they perceive your information architecture You would decide on the menu structure But this tells us what people pay attention to the third and fourth section of the website because They probably find it very important Right, so they should actually be the most prominent part of your navigation structure and Sometimes I also tend to see a lot of people pay attention to logo, which is not the case here but a typical failing design is that All the all the attention is given to a huge logo that occupies like two thirds of one third of the screen And people are not actually paying to attention to what you want them to pay attention to But let's say this part of the screen. It's a video Let's say you spend a lot of money producing a video and you want people to actually watch the video Then in this case, have you achieved that objective? Probably not because people are not playing the video So that's insight what action should you do probably move the video around So that's user research. Let me give you another example When you ask yourself, who are my users? What are you actually asking? What's their gender with their age? What are their interests? What kind of devices do they use like ISP some are really irrelevant some are really important What do you think are the most important traits important information when it comes to who are my users? What would you like to know if you can only know say five things? Oh tough crowd income Very good education. Okay Why income why education that actually depends on the on the website? Why would you say income is the most is pretty critical? Yes But it doesn't actually mean the richer a person is the more likely is going to buy that particular piece of software or Particular piece of particular service, but I agree. It is one of the factors that we would like to find out Which is kind of difficult to find out from analytics what we are usually what we can find out very easily is Demographic data age distribution Gender by the way, this is a screenshot taken from Google Analytics It is the most popular analyst software out there because it's free and I'm sure a lot of you have actually used it, right? so Google Analytics is divided into four sections the audience section and the content of the conversion section the behavior section and acquisition section they tell different stories one is Who are your users one is where are they coming from which is kind of a behavior? one very important is what they do on your site behavior and Technically speaking conversion is also part of the behavior, but because it's so critical They have separated out as a fourth section. All right, so these four sections all tell their own stories in the audience section We will get data on age Gender interest geo so geography. Why do we want to know these they serve many different many purposes one is Every design decision you make every content decision you make must align to their Demographic data and their interests right. Let's say most of you are in this case. We see that the The biggest group of visitors are 24 to 34 and male So probably developers Right, so if these are the demographic then maybe we can get away with making the website a little more technical Then it is but if we're looking at Pinterest Then we'll probably see a data like this and it's all women, right? So maybe you have to make The language limit a little more Emotional a flowery if you are selling a card you have to describe Ah the the seat is the the leather is taken from Italy 10 people are Supervising it if you if you touch it you will feel you will feel like in heaven or whatever If you're explaining to male audience you say Zero to 100 kilometers per hour 4.3 seconds, and it was like oh great car and Also it ties to advertising because I deal with advertising a lot right this section of the website interest Let's us target people by interest Right normally without analytics. You're just blind blindly guessing Here's another one which devices do my users use Why do I want to find out about that? Some people are still not convinced that we should always go mobile first the mobile first is the philosophy where you start The design with on a smaller screen and gradually expand on a larger screen There's still people aren't convinced because they think I'm not sure two years ago The number of mobile users had surpassed that of the desktop users, but just by how much I'm not sure But let's look at this the words are a little bit smaller, but Essentially the top 10 group almost all of them has a width of 360 370 400 320 what does that tell us it tell us the vast majority of users are browsing through a mobile device Therefore you have to rearrange the layout you have to make the words slightly bigger You have to make the call to action button slightly bigger so they can navigate and you have to really Make sure that the information texture architecture the manufacturer really elevates the most important part of the Section of the website which once again depends on the analytics right as I shown you in the previous screenshot Next question. How many people find my site useful in other words? How many people think? Yeah, we I have a good user experience What do you think is a typical trade or behavior of someone who? Enjoys my site What does he or she do spend more time so more time on site come back? I think that's very important now as a marketer. I deal with Marketing funnel every day so marketing funnel essentially says that people do not convert on the first go They go through a typical process of awareness Consideration conversion and loyalty or when they first come to your website very few people a small percentage would actually convert They will remember your site. They will probably compare you to your competitors That's a consideration stage and they then they will come back and convert So I want to know how many people are actually returning right? So this is returning users versus first time users So if I see this chunk to be really really small then I would be worried that means the vast majority of my users My visitors are not coming back Chances aren't they're not gonna convert now as the next step as inside I would actually add the so-called segments. So most analytics software let you Define your segment segment means a group of people with a much homogenous trade So I would add a segment that only takes data from first time users I want to find out exactly how many first time Users who do not return what actually convert and how many of those returning users would convert and After how many visits right Google analytics and all the other analytics software would tell you that Now the opposite side of that question is how many users do not like my site? How many users? I should think I have a terrible user experience What do they do? they never return and chances are They don't even proceed to the next page right, they come to your page and leave and we call that a bounce right as Opposed to a sticky site where they stay so if somebody comes to your web page and immediately leave It's considered a bounce so we want to find out what is the bounce rate if you have a 50% bounce rate that means right? That means you're wasting half of your traffic Because people do not proceed Then I usually get the question that Basically says how our website is the latest trend. We only have one page. It's a single page website Technically all your visits are bounces right they just land on the side and leave what should we do? Now there's something you can do instead of tracking page to page you can track different elements Which will I would talk about in the next few slides So if you really want to find out how many people are Not finding your site useful or you want to know that whether you have a terrible experience look at the bounce rate That's the first data. I would look at and as well as the time on page right one more question How do users behave on my site? That's again a broad question now as a UX designer especially for the UI designers in the room They would usually come up with all these mock-up and art board You will have screen flow right screen a flow so screen B B to C C You know diverge D1 D2 and so on. That's the ideal situation. You want people to go from say Using us an example. We want people to know who we are as a marketing agency So about us right the next step is probably services or maybe case studies because people want to know whether we're trustworthy All right, so social proof is big elements about us services Case studies and then eventually we want all of them to go to the contact page and submit a query form or you know Quote contact us. That's the idea flow, but are your visitors really following that flow? All right, so Google analytics again similar to other analytics software will show you that Where people are going from one place to another perhaps they land on the homepage first and Then most of them depending on the thickness of the bar They go to particular page and that particular page go to the next page Now if they are going all over the place, then you know that they are confused They're not following the user the screen flow that you had planned for them This will give you a rough overview of Users behavior, of course, there are other sections of the analytics that we can make use of But this is the most visual one Now that was inter-page behavior. How about on a particular page? So back to the previous question I asked if I have one page website Or if I have e-commerce website where I want to know what people are doing before they order my product I want to know how many people are adding it to the card how many people are banning in the card I can track different Elements on the screen I can track how many people have click on the quick view So that's e-commerce website where you examine the detail of the product How many people are adding it to the card how many people are removing it to the card that statistics tell me Whether my prices are setting too high whether my product description is detailed enough so on and so forth Now the third area so again the first area is to help you make design decisions second is to help you conduct user research The third one is to help you Define UX success now. We like to talk about good UX experience user experience and bad user experience all the time We say good UX bad UX, but you can't really quantify them if both sides have good user experience Which one is better? There's got to be a way that you can measure So all of us have KPI UX should also have KPI to us The ultimate goal of good UX is not to make users say wow, this is really creative. I like the color Right to us the ultimate UX goal is to generate as many money generating actions as possible So I repeat the number one goal for us is marketing agency Is to generate as many money generating actions as possible That money generating actions could be an add to cart could be Find out more Right, they all lead to the final conversion, which is a sale or trial or sign up So you got to quantify your user experience in that framework, right? You can't just say it's pretty or it's not pretty So the next question is how do we? Define our objectives. What are the possible goals that we can define as a UX designer now? if you're actually selling something if you are you e-commerce platform or if you are a Software seller then you would have sales or trials If you're an agency you would track people who are calling how many people are submitting queries Even how many people are signing up for the newsletter because newsletter's purpose is to lead nurture, right? Nurture the lead to the point that they are willing to convert So all these different goals can be tracked within Google Analytics. Now. This is the coding part How it works is that you place a piece of JavaScript code in the source code of your website And once you do that Google Analytics This will track all of your page every time somebody clicks something on your page That action will be sending a message to the Google Analytics server and Google can track all of that But then I another frequent question I get from Users is that Well, we don't sell anything. We don't even want people to call our website only serves as an information portal We have lots of pharmaceutical clients now in Singapore. They are forbidden to sell anything online So the only reason for their website is to provide information What kind of go can I set? What do you think? They don't have any sales. They don't have any phone calls. They don't have any inquiries What do you think? What can you track as the goal? If you have two designs of such website, how would you decide one version is better than the other? Engagement very good So that means the time spent on site the number pages browse right so you can set up that as well Google Analytics and other websites analytics platform allow you to do that you can define A goal to be greater than X pages or duration greater than X minutes Right. That is a simple way of quantify your UX What I'm trying to say is that every single page should have a goal. It's either a conversion or a Money-generating action that leads that contributes to another page's conversion What if you know that ten out of a hundred people who are arriving on the side are Filling out the form meaning you have a 10% conversion rate right that could be bad or that could be good depending on your historical data But that doesn't tell me how I can improve Because the form is a form right it's either removing that form or let it stay What can I do to improve the conversion rate of the form on that page? This can be achieved by Event tracking an event is Google's lingo. It basically means anything that people would interact with on the page So if I click a button if I download a PDF if I click play on a video, that's an event. That's an action Right. So if I am marketing through videos I want to show the features of my product and I want to know whether people are finishing watching the video I can track the Progress of the play right whether it's 20% 50% or 75% because that would tell me how we engage the user is or how I am doing explaining using video similarly, I can design I can assign an event to each single field of this form Why would I want to do that? because you will tell me The point where most people are dropping off now we had this client is a banking client and they had this Big-ass form right and we're getting a really low conversion rate So we what we did is to assign each form as an event then we that way We we want to know whether people are dropping off in a linear fashion if it is linear then there's not a lot you can do but if it's not linear if it's dropping like this and Reaching a certain field in the form all of them are stopped dead in their tracks And you know that particular field in that form is causing the most problems Which turned out to be the case. Can you guess which form field? Is the culprit of stopping people from converting? Any guesses age Date No, because I don't really care. Oh, you mean date of birth No, the the field in question is actually income because people are usually very private about their income even to banks I don't like to review their income So that's the data. That's the insight over the action. How would you counter this? People's natural reaction aversion to revealing their income Several ways one is not to ask them About income. The second is to explain In a way that your audience would understand what feel that it's beneficial you would explain that You are customizing the offer based on the income for example. So anyway, you have to Address that objection another example. It's a local supermarket And one of the field that stopping people dead in their tracks is actually date of birth Because people don't want to review their date of birth and it turns out that they are recording date of birth only because they Want to send out birthday gifts So if for that particular reason you don't need the year number, right? You just need the month and and the the month of the day of the month So removing year actually boost the conversion rate. So that's a micro conversion again, it's a It's that coding part of this Presentation where you can assign different fields. So some of you are should be quite technical like in JavaScript You would be able to know whether a field is blur is focused or not Whenever that field is focused you can send a message through JavaScript to Google Analyze server To tell Google that this particular field is clicked and entered information if That field is untouched then you know that people are not going beyond that form, right? so The final screenshot in this section. I want to show you is what I touched upon just now It's number of pages per session It goes back to the Statement I made earlier that data can be ambiguous So if I am telling you that I have two websites or before redesign after redesign after redesign We are getting a higher pages browse procession Your natural conclusion is that it's a good thing right people are seeking more information But that's not always the case in under which circumstances do you think that a higher Number of pages browse procession is actually a negative thing Searching for something. Yeah, very good So you could mean that people want more information It also could mean that people are not finding the information they're looking for this is especially true for support site So you can designate the support part of your website to be tracked by analytics only the support pages If you see an increase in number of pages browse, then you know that your support pages are not doing an as good job So that's the data insight. What's the action? How can you? Make sure that you're tracking this correctly Have you been to one of those software websites the documentation where at the end they say do you find this article helpful or Is your problem solved now? I can bet that on each of those buttons. They have set up event tracking every time somebody clicks I find this article helpful or My problem is solved the analytic is the back end the analytics would know that those questions are marked as solved Instead so instead of looking at the average number of pages browse, they will look at that as a conversion Okay, so the final reason for analytics and I think is the most important aspect analytics is to Constantly improve your response rate now We are a marketing agency where obsessed with performance and here's something that outsiders typically don't know Let me give you an analogy. I used to do a lot of copywriting And as copy copy writers would know this that they will try to write the most effective headline from the start But chances are they will fail because there's really no reason no way to know that To guarantee that you will have the best headline from the start or there are copywriting formulas For example a typical headline that will work. It's the how-to headline like how to Make ten thousand dollars in five weeks how to attract beautiful girls Quickly and easily even if you're ugly and short. I mean I would respond to that headline obviously, but what if If other people's response are different from mine, there's no way of telling I so the only way of constantly improving your response rate is to split test and Putting on different versions of the headline or different elements of the website and let the data speak Good marketing agencies or good copy writers good ux designers probably won't give you the best version from the start but what separates from the Average agency and the stellar agency is their ability to constantly improve right which you should always Use analytics to guide your split testing always have multiple versions. Let me go back to this this example So we now know that an image-based version outperforms the text-based version What's the natural next step? What else would you like to try? Sorry video very nice. So text Image video that's something we could try what else what else would you like to try? Everybody's drowsy because of the food so if I know that Putting on a face to the website to the software helps us convert Then maybe the next thing we could try is to try different faces right now as you can see that Michael has the biggest lift in conversion rate and John has There's really no way of telling now. I think it's a t-shirt But that might not be the actual reason the only way to tell is through analytics right let the data speak Now the next thing they could try is perhaps the headline or based on one piece that we talked about earlier is to have all of them Turning right or turning left to look at the headline. That's something we could try I we could also try the call to action now typically the elements that lead to the biggest lift in conversion are Headline image call to action beginning paragraph these four things so Let me tell you just very quickly what other tools that we use for UX improvement One is called Quantcast or similar web now Google Analytics is very good or all the analysts of are very good at Extracting insight from your own data, but what about your competitors? I saw similar web and Quantcast all these third-party website. They track almost all the major websites out there on the internet so you can almost Get insights the same way that you can get insight from your own website Google Analytics is obviously a good one, but the problem with Google Analytics is that It's anonymous all the data are anonymized because Google doesn't want people to know who the actual visitor are You can only get statistical data meaning 10 out of how many people are doing this But you don't know what a particular person is doing so kiss metrics is and several other solutions will tell you What exactly a single person is doing? John has come to the website ten times each time He's spent two minutes on the third time He converted to sign up for newsletter on the eighth time he submitted a contact form So kiss metrics and several other solutions will give you that level of detail Another one is crazy egg crazy egg gives you a heat map. It generates heat map Based on where people are clicking on the page, but that's the next best thing the real Good the really good heat map is generated by tracking the Eye movement the people movement. I think the cheapest device is like a hundred dollars Next one is called inspect let again This is their whole whole load of software that works like this how it works is it records? User screen many of you probably have used similar solutions. So basically let you observe The user's interaction with your website as if you are looking over his shoulder. So that's very good at deducing primary data and if you're selling an app or if your Business is app-based then you obviously want to use mix panel Which has a big focus on mobile analytics and app any as the name suggests it gives you the the data on the App landscape what other people are doing versus you are and if you want to improve your split testing Here are the two industry standards basically optimise Lee and visual website optimizer it lets you Concurrently test multiple version multiple elements of the page So you can conduct not just a B testing, but also a B C D E F G a testing. We call it multivariate testing All right, so these are the Types of software that we use on a daily basis So with that Let me do a quick recap. So what have I talked about today? First thing is that opinions can be risky opinions your opinions versus mine is not a very Productive discussion, so we don't know whose opinion we should rely on the only way we can Get actionable insight reliable inside is through data, but data themselves are ambiguous You have to think in terms of data inside an action always let action guide your action should be the design decisions and always let it guided by the insights user dry from numbers and Finally, we talked about the four areas where analytics and help you it will end all the debates It will help you conduct user research It helps you measure your UX success and it helps you improve your website your user experience Over time so with that I want to end my Presentation if you have any questions right now, I would like to take them You can clap questions Yes, please Hello. Yes recently I had a client who Actually had Potter in the travel advisor. This is he's the other travel agents basically they did a Social like SMO sort of like digital marketing so we help them and we targeted them and everything was you know on track what they KPI is and everything But they complain and they say that oh, there's no conversion Nobody's calling and everything like that. And so they blame us for basically that's happening Because you're not doing a good job and you're supposed to do that. So how how do we actually? Yeah, try to explain to them that is a great great question so the question is if you are doing social media marketing and Often that you observe there is no conversion from Facebook Let's say you post constantly on Facebook, but nobody is actually converting from the links there That's a typical problem. It goes back to the The product funnel the marketing funnel that I mentioned people usually go from awareness to consideration to Loyalty so we call it the top of the funnel and the bottom of the funnel Social media is typically a top of the funnel element meaning to say social media is very good at generating awareness But visitors has to go through multiple steps before they are converting now The analytics tracks in such a way that if I come from Facebook the first time and land on your site And I remember your brand ABC right the next time I search on Google ABC I either click on your ad or I click on your listing. That's no longer a social media visit That conversion will be counted towards either SEO search engine organic traffic or that will be counted towards ad Which is why across all businesses that Facebook or social media have very low conversion rate The only way to explain to them or a very effective way It's to use something called a multi-channel funnel which you can't really see on this page But some here down here some a part of Analytics down here. There's a section called conversion. You click on conversion. There's a section called MCF multi-channel funnel What multi-channel funnel is does is to analyze the entire user journey the entire path So because Google has access to everybody's cookie, right? So if the first time I came from Facebook the second time I came from ad the third time I came from organic search the fourth time is a direct Typing URL into search engine and then I convert Google will not only tell you that yes the last Direct visit resulted in a conversion, but it will also show you the entire path Facebook ad Organic direct then Google also does this statistical analysis on what the typical path is It will tell you out of all the sessions resulting in a conversion of all of these How many of them in how many of them does Facebook or social media play a role so you can actually tell your clients look Out of all these 100 conversions. You're right. Only 10 of them was the last step where Facebook played a role, but actually in 60 to 70 out of them There was this element of social media Facebook was present Throughout this entire journey throughout this entire conversion path. So that's what we usually use Any other questions? If not, you can always email me at There's another question over there like You can always email me by the way or add me on LinkedIn Let's say if a client and they are having a sale campaign and then They come to us and then they are they want to us to improve the Conversion rate right and then so how we do the testing So without without affecting the sale campaign without affecting the sales now that is So if I understand correctly, you're saying Let's test multiple versions of the website While sustaining the sales. Yes That is kind of tricky. It's more like a chicken and egg question Because if you do not test then you wouldn't know whether there's opportunity for you to improve But if you test then chances are it can go up or you can go down. So your sales would be affected That's how testing works. So you have to Let the client knows and the client can actually Decide together with you. How much of your traffic you want to test? So what typically happens to these? Multi-regional brand right MNC's they do not test with 100% of the traffic that would be very risky What they do is to test only 10% of the traffic or These big brands they will start with a particular country But let's say if yours is a smaller brand you can say let's not go crazy and test the 100% of the traffic Let's test with 20% of traffic 10 so 80 Sorry 90 and 10 Now actually you set aside 80% and you only test the remaining 20% is 10% versus 10% Then you can already see some some improvements But here's another thing I want to bring up The benefits the major benefits of working with an agency with analytics experience is not just the approach They adopt but also the insights they have gathered throughout the years Let's say that line of sight thing right most most people will not know it because they have never made such tests But if you are working with an agency with such experience then based on all the past tests that they had conducted in the past They would choose the version that is likely to result in an uplift instead of a down Downgrade in performance. So to summarize don't test 100% of the traffic go with an agency who is versed in testing Okay, no more questions. Like I said always you can always email me or at me on LinkedIn. Thank you very much