1 00:00:00,000 --> 00:00:00,912 2 00:00:00,912 --> 00:00:01,870 DAVID MALAN: All right. 3 00:00:01,870 --> 00:00:04,960 And now one final flourish, a personal touch that 4 00:00:04,960 --> 00:00:06,907 really makes CS50 Finance your own. 5 00:00:06,907 --> 00:00:09,490 Now, in addition to changing the aesthetics of the site, which 6 00:00:09,490 --> 00:00:12,590 you are welcome to do-- which is particularly easy because 7 00:00:12,590 --> 00:00:13,790 of our use of Bootstrap. 8 00:00:13,790 --> 00:00:17,340 Indeed per the specification, we point you at some alternative themes 9 00:00:17,340 --> 00:00:20,350 or templates that you can use, simply changing the Bootstrap 10 00:00:20,350 --> 00:00:22,430 URL to some other that will completely change 11 00:00:22,430 --> 00:00:25,980 the colors and aesthetics of your site in one fell swoop. 12 00:00:25,980 --> 00:00:28,970 But for this personal touch, we're looking for something functional. 13 00:00:28,970 --> 00:00:31,900 We're looking for a change to your Python code that actually gives 14 00:00:31,900 --> 00:00:34,320 the user some new feature to enjoy. 15 00:00:34,320 --> 00:00:36,830 So among the possibilities are these-- empowering 16 00:00:36,830 --> 00:00:38,729 users to change their passwords. 17 00:00:38,729 --> 00:00:40,520 So once a user is already logged in, if you 18 00:00:40,520 --> 00:00:42,710 want to empower him or her to change their password, 19 00:00:42,710 --> 00:00:44,830 probably you're going to need some kind of form 20 00:00:44,830 --> 00:00:47,077 and you're probably going to need some kind of route 21 00:00:47,077 --> 00:00:49,160 that actually handles the processing of that form, 22 00:00:49,160 --> 00:00:52,810 and specifically changes that user's table, storing not their password 23 00:00:52,810 --> 00:00:56,660 per se, but that same hash thereof, a la register. 24 00:00:56,660 --> 00:00:59,870 You can empower users to add additional cache [? to ?] [? their ?] account. 25 00:00:59,870 --> 00:01:01,578 Now, in the real world you would actually 26 00:01:01,578 --> 00:01:03,670 have to deposit physical money into a bank 27 00:01:03,670 --> 00:01:06,180 or send someone a check or some other mechanism. 28 00:01:06,180 --> 00:01:08,310 Here it suffices just to type how much more money 29 00:01:08,310 --> 00:01:11,260 you want to add to your account and, implemented as such, again, 30 00:01:11,260 --> 00:01:13,640 modifying most likely the user's table. 31 00:01:13,640 --> 00:01:16,240 But again, error checking as always, so that if you 32 00:01:16,240 --> 00:01:19,780 type in alphabetical characters or negative characters 33 00:01:19,780 --> 00:01:23,570 or anything else that isn't an actual dollar amount, odds are you're 34 00:01:23,570 --> 00:01:25,540 going to want to apologize to the user. 35 00:01:25,540 --> 00:01:28,010 You might also empower users to buy more shares 36 00:01:28,010 --> 00:01:31,410 or sell shares of stock they already own via your index route itself. 37 00:01:31,410 --> 00:01:33,160 So recall that after you've logged in, you 38 00:01:33,160 --> 00:01:37,120 see that HTML table of your entire portfolio-- all of the stocks you own 39 00:01:37,120 --> 00:01:38,380 and how much cash you have. 40 00:01:38,380 --> 00:01:42,710 But by default, we force the user to go to a buy page or a sell page, 41 00:01:42,710 --> 00:01:46,120 where they need to manually input the symbol and number of shares 42 00:01:46,120 --> 00:01:47,670 that they want to buy or sell. 43 00:01:47,670 --> 00:01:50,770 This seems logically unnecessary because you already 44 00:01:50,770 --> 00:01:53,200 know which symbols a user owns, and you already 45 00:01:53,200 --> 00:01:57,200 know how many shares he or she owns of those stocks. 46 00:01:57,200 --> 00:02:02,060 So surely, you could programmatically, on that index page, 47 00:02:02,060 --> 00:02:06,390 display for the user some hyperlinks that allow them to simply click 48 00:02:06,390 --> 00:02:08,530 or maybe [INAUDIBLE] HTML form buttons that 49 00:02:08,530 --> 00:02:13,905 allows them to click those and begin the process of buying or selling instantly. 50 00:02:13,905 --> 00:02:16,780 So we leave it to you to decide exactly how you might implement this. 51 00:02:16,780 --> 00:02:19,000 But this is arguably a better user experience, 52 00:02:19,000 --> 00:02:20,800 because it's a lot easier to buy and sell, 53 00:02:20,800 --> 00:02:23,675 and you don't have to remember the symbols yourself by typing them in 54 00:02:23,675 --> 00:02:26,110 manually, as is the default scenario. 55 00:02:26,110 --> 00:02:29,330 And then lastly, empower users with some other feature of comparable scope. 56 00:02:29,330 --> 00:02:31,980 Deliberately generally written, you're welcome to consult 57 00:02:31,980 --> 00:02:35,020 your TF or the course's heads as to what's reasonable scope. 58 00:02:35,020 --> 00:02:37,620 But in general, this should take a number of lines of code 59 00:02:37,620 --> 00:02:41,970 that actually give your website some newfound capability, some new feature 60 00:02:41,970 --> 00:02:46,180 that's compelling, that's very much in the spirit of these others. 61 00:02:46,180 --> 00:02:49,411