From b7ff77b1b3cd271944661d6adfeed4b9ccdc8a10 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 3 Dec 2022 14:16:25 -0500 Subject: Add captions --- ...-and-org-table-formulas--daniel-gopar--main.vtt | 1739 ++++++++++++++++++++ 2022/info/realestate-after.md | 584 +++++++ 2022/info/realestate-before.md | 31 +- 3 files changed, 2353 insertions(+), 1 deletion(-) create mode 100644 2022/captions/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.vtt diff --git a/2022/captions/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.vtt b/2022/captions/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.vtt new file mode 100644 index 00000000..ba11db44 --- /dev/null +++ b/2022/captions/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.vtt @@ -0,0 +1,1739 @@ +WEBVTT captioned by tom + + +00:00:00.000 --> 00:00:05.453 +Hey, I'm Gopar and this is the + +00:00:05.454 --> 00:00:07.639 +Real Estate and Org Mode Table Formulas talk. + +00:00:07.640 --> 00:00:09.879 +Not very creative, but it is what it is. + +00:00:09.880 --> 00:00:13.051 +Now I just want to say that everything I talk about here + +00:00:13.052 --> 00:00:15.902 +is in the Org Mode in the Emacs manual. + +00:00:15.903 --> 00:00:17.909 +I posted a link to the web version, + +00:00:17.910 --> 00:00:20.479 +but it should be inside of Emacs as well. + +00:00:20.480 --> 00:00:25.096 +Now before I start, I want to showcase the end goal. + +00:00:25.097 --> 00:00:26.806 +That way you know if you guys want to + +00:00:26.807 --> 00:00:28.739 +actually see the talk or not. + +00:00:28.740 --> 00:00:30.491 +So I always think that's pretty cool to see + +00:00:30.492 --> 00:00:31.517 +what you're actually going to build + +00:00:31.518 --> 00:00:32.679 +before you start building it. + +00:00:32.680 --> 00:00:34.285 +Alright. So let me start off with the goal, + +00:00:34.286 --> 00:00:38.762 +the end goal. Here we have a simple table formula + +00:00:38.763 --> 00:00:42.613 +and we have some constants, some values inside the list-- + +00:00:42.614 --> 00:00:44.639 +inside the table, I'm sorry, + +00:00:44.640 --> 00:00:47.672 +and some other stuff that we will get to, + +00:00:47.673 --> 00:00:49.279 +but for now... I don't want to spoil too much. + +00:00:49.280 --> 00:00:50.327 +I just want to give you a demo + +00:00:50.328 --> 00:00:51.799 +of how it actually works. + +00:00:51.800 --> 00:00:56.094 +We have a few values. Let me first go over the constants. + +00:00:56.095 --> 00:00:57.581 +We have PMI, which stands for + +00:00:57.582 --> 00:00:57.590 +private mortgage insurance, + +00:00:57.591 --> 00:01:00.536 +so it's insurance that you'll have to pay + +00:01:00.537 --> 00:01:03.639 +depending on how much money you put into the deal. + +00:01:03.640 --> 00:01:06.067 +The property tax, which is self-explanatory, + +00:01:06.068 --> 00:01:09.316 +the tax that you owe for owning the property, + +00:01:09.317 --> 00:01:11.106 +and then home insurance, + +00:01:11.107 --> 00:01:13.439 +and the interest rate at the loan that you get. + +00:01:13.440 --> 00:01:15.666 +So, here we have a few columns. + +00:01:15.667 --> 00:01:17.411 +The first one is called House, + +00:01:17.412 --> 00:01:20.623 +which I usually just put a description of the house + +00:01:20.624 --> 00:01:21.126 +with the link of the posting, + +00:01:21.127 --> 00:01:22.493 +the price of the house, + +00:01:22.494 --> 00:01:26.189 +the percentage down payment (this I play around with + +00:01:26.190 --> 00:01:27.473 +to see how much the deal will be structured), + +00:01:27.474 --> 00:01:30.528 +the down payment (which is calculated from + +00:01:30.529 --> 00:01:31.754 +the previous two columns), + +00:01:31.755 --> 00:01:34.144 +the monthly mortgage (which is calculated as well), + +00:01:34.145 --> 00:01:37.995 +and then the tenant income (which is what I suppose + +00:01:37.996 --> 00:01:41.005 +would be an example of the tenant income + +00:01:41.006 --> 00:01:42.752 +that I can potentially make off the property, + +00:01:42.753 --> 00:01:45.539 +the 1% rule and the ROI. + +00:01:45.540 --> 00:01:47.707 +I'll quickly go over the last two columns. + +00:01:47.708 --> 00:01:49.200 +So first is the 1% rule. + +00:01:49.300 --> 00:01:50.879 +The 1% rule is essentially + +00:01:50.880 --> 00:01:53.588 +a "rule," in quotes, that says that + +00:01:53.589 --> 00:01:56.277 +if a property matches this specific formula, + +00:01:56.278 --> 00:01:58.319 +it is a good deal to look into. + +00:01:58.320 --> 00:02:00.889 +So for example, the first two pass, + +00:02:00.890 --> 00:02:02.676 +and the last one does not pass. + +00:02:02.677 --> 00:02:04.104 +The last one, at a quick glance, + +00:02:04.105 --> 00:02:05.471 +we can just ignore it and say, + +00:02:05.472 --> 00:02:06.476 +"hey, that's not going to fly," + +00:02:06.477 --> 00:02:07.999 +we'll just ignore it. + +00:02:08.000 --> 00:02:09.890 +I won't go too much into details. + +00:02:09.891 --> 00:02:11.519 +That's just a brief summary. + +00:02:11.520 --> 00:02:14.148 +So now the ROI is the return on investment. + +00:02:14.149 --> 00:02:17.599 +So it says "how much of a return am I getting + +00:02:17.600 --> 00:02:18.959 +on the amount that I invested?" + +00:02:18.960 --> 00:02:21.167 +So let's say you put in $12,000, + +00:02:21.168 --> 00:02:23.455 +and at the end of the year, you cashflow $6,000. + +00:02:23.456 --> 00:02:26.126 +So if you calculate the ROI off of that, + +00:02:26.127 --> 00:02:28.476 +you get a 50% return on investment. + +00:02:28.477 --> 00:02:30.085 +In two years, you'll make your money back, + +00:02:30.086 --> 00:02:31.733 +which is pretty good. + +00:02:31.734 --> 00:02:32.718 +Then all the rest of the years, + +00:02:32.719 --> 00:02:34.347 +you'll just slowly be reaping in all that, + +00:02:34.348 --> 00:02:36.639 +all the excess cash flow. + +00:02:36.640 --> 00:02:40.039 +But yeah, that's it in a nutshell. + +00:02:40.040 --> 00:02:42.269 +So let me demo it real quick. + +00:02:42.270 --> 00:02:44.258 +So for example, I'm going to change the down payment, + +00:02:44.259 --> 00:02:45.744 +but I want you to pay attention + +00:02:45.745 --> 00:02:48.213 +to this column [down payment] + +00:02:48.214 --> 00:02:49.839 +and the monthly mortgage column. + +00:02:49.840 --> 00:02:51.726 +So right here [down payment] is $25,000, + +00:02:51.727 --> 00:02:53.472 +and here [monthly mortgage] is around $1,200, + +00:02:53.473 --> 00:02:55.179 +a little under $1,300. + +00:02:55.180 --> 00:02:57.349 +So what happens if I say, you know, + +00:02:57.350 --> 00:02:58.795 +what I'm going to change the down payment + +00:02:58.796 --> 00:03:00.948 +to 5% instead, because I just + +00:03:00.949 --> 00:03:02.559 +don't want to put 10. + +00:03:02.560 --> 00:03:04.125 +So let's just put say 5. + +00:03:04.126 --> 00:03:06.274 +Then I tab out of here, and voila - + +00:03:06.275 --> 00:03:08.522 +you see it updated to half of $25,000. + +00:03:08.523 --> 00:03:09.946 +So now it's $12,000, + +00:03:09.947 --> 00:03:10.689 +and this [monthly mortgage] went up + +00:03:10.690 --> 00:03:12.233 +over actually $1,300, + +00:03:12.234 --> 00:03:14.783 +and then this [1% rule] hasn't changed at all + +00:03:14.784 --> 00:03:17.679 +and the ROI is there. + +00:03:17.680 --> 00:03:19.147 +So one thing that I should mention is + +00:03:19.148 --> 00:03:20.193 +everything that I'm putting here + +00:03:20.194 --> 00:03:21.279 +is just example numbers, + +00:03:21.280 --> 00:03:25.634 +should not be taken into literal real estate advice. + +00:03:25.635 --> 00:03:26.859 +I just want to put that out there. + +00:03:26.860 --> 00:03:28.367 +These are just examples to show you + +00:03:28.368 --> 00:03:30.519 +how you can potentially make it on your own, + +00:03:30.520 --> 00:03:32.239 +do the formulas on your own. + +00:03:32.240 --> 00:03:35.650 +Alright, so another cool thing that I did was + +00:03:35.651 --> 00:03:37.737 +if there is no tenant income and I tab, + +00:03:37.738 --> 00:03:40.048 +it says "Enter Tenant Income". + +00:03:40.049 --> 00:03:41.032 +So if I don't put anything, + +00:03:41.033 --> 00:03:42.399 +it will automatically tell me, hey, + +00:03:42.400 --> 00:03:44.919 +I can't calculate without the tenant income. + +00:03:44.920 --> 00:03:46.607 +I can also do this right here [ROI field], + +00:03:46.608 --> 00:03:48.475 +say the same thing, Enter Tenant Income, + +00:03:48.476 --> 00:03:50.563 +but I just didn't put it for whatever reason, but + +00:03:50.564 --> 00:03:53.812 +after this video, you should be easily able to + +00:03:53.813 --> 00:03:57.399 +put it without much struggle. + +00:03:57.400 --> 00:04:00.130 +Alright, so if that's something you're interested in, + +00:04:00.131 --> 00:04:02.239 +then keep watching. + +00:04:02.240 --> 00:04:05.239 +So let's go over the basics first. + +00:04:05.240 --> 00:04:07.399 +So, how do we create a table? + +00:04:07.400 --> 00:04:10.368 +Well, we can do M-x org-table-create. + +00:04:10.369 --> 00:04:14.301 +If we run that it, will prompt us in a minibuffer. + +00:04:14.302 --> 00:04:16.892 +It says table size, columns times row. + +00:04:16.893 --> 00:04:18.177 +Usually it's rows times columns, + +00:04:18.178 --> 00:04:19.502 +but it is what it is. + +00:04:19.602 --> 00:04:20.465 +So let's just leave + +00:04:20.466 --> 00:04:24.959 +the default of 5 times 2, and voila, we get this. + +00:04:24.960 --> 00:04:26.399 +Beautiful. Awesome. + +00:04:26.400 --> 00:04:29.510 +So the other way is using the magical C-c C-c + +00:04:29.511 --> 00:04:32.401 +in Org Mode, which basically is context-aware + +00:04:32.402 --> 00:04:36.053 +and does anything, does the right thing like, + +00:04:36.054 --> 00:04:38.599 +almost 100% of the time, which is pretty amazing. + +00:04:38.600 --> 00:04:42.431 +Alright, let's just say I write a pipe, some words, + +00:04:42.432 --> 00:04:44.679 +and then another pipe, Gopar, and then + +00:04:44.680 --> 00:04:47.268 +another pipe. Let's just say we're trying to + +00:04:47.269 --> 00:04:50.599 +write it out via text, because in Org mode + +00:04:50.600 --> 00:04:51.546 +everything has text. + +00:04:51.547 --> 00:04:53.379 +There's nothing fancy about it. + +00:04:53.380 --> 00:04:57.672 +If I do C-c C-c, Org mode should automatically be + +00:04:57.673 --> 00:04:59.839 +context-aware that this area is a table. + +00:04:59.840 --> 00:05:04.294 +So, C-c C-c, boom. So if I press enter, another column. + +00:05:04.295 --> 00:05:06.963 +If I press tab, it should automatically move me. + +00:05:06.964 --> 00:05:09.391 +So yeah, so that's pretty much it. + +00:05:09.392 --> 00:05:11.919 +That's how you get started into the column. + +00:05:11.920 --> 00:05:15.591 +So, I'm assuming most of the people here already know that. + +00:05:15.592 --> 00:05:17.959 +This is just the primary basic review. + +00:05:17.960 --> 00:05:19.807 +So, let's first go... + +00:05:19.808 --> 00:05:22.819 +Let's go dive right into our first formula. + +00:05:22.820 --> 00:05:24.766 +So I copied some values over here, + +00:05:24.767 --> 00:05:27.696 +just to save time, and the columns. + +00:05:27.697 --> 00:05:29.163 +So, let's go ahead and say that + +00:05:29.164 --> 00:05:30.749 +we have single family house, + +00:05:30.750 --> 00:05:33.018 +and the price is a hundred thousand. + +00:05:33.019 --> 00:05:34.163 +And, Let's say that I want the price, + +00:05:34.164 --> 00:05:36.431 +the down payment that I want to put is 10%. + +00:05:36.432 --> 00:05:40.527 +Right. Alright. 10%. Now if I tab + +00:05:40.528 --> 00:05:42.393 +or go to the next column, nothing happens. + +00:05:42.394 --> 00:05:43.879 +Why is that? Well, it's because + +00:05:43.880 --> 00:05:44.984 +(you probably guessed it) + +00:05:44.985 --> 00:05:47.755 +we haven't written or tied any table formulas. + +00:05:47.756 --> 00:05:49.563 +So we're saying, alright, enough talk. + +00:05:49.564 --> 00:05:50.440 +How do we do that? + +00:05:50.540 --> 00:05:52.093 +Well, the answer is very simple. + +00:05:52.094 --> 00:05:54.983 +We do a pound sign (#), if I can find it. + +00:05:54.984 --> 00:05:58.712 +#+ and then we do TBL for table + +00:05:58.713 --> 00:06:01.119 +and then FM for formula. + +00:06:01.120 --> 00:06:03.428 +So, table formula, and the column. + +00:06:03.429 --> 00:06:04.934 +So this, you're already halfway + +00:06:04.935 --> 00:06:07.063 +to writing your first table formula. + +00:06:07.064 --> 00:06:09.171 +So let's say we want to automatically, + +00:06:09.172 --> 00:06:10.978 +Let's just, for exercise, + +00:06:10.979 --> 00:06:13.189 +we want to put the down payment, + +00:06:13.190 --> 00:06:14.615 +just put some type of value in there, + +00:06:14.616 --> 00:06:16.382 +just to make sure that it's working. + +00:06:16.383 --> 00:06:20.992 +So the way Org Mode refers to columns is, + +00:06:20.993 --> 00:06:24.140 +we start with the dollar sign ($) and then + +00:06:24.141 --> 00:06:26.868 +we put the number that the column is. + +00:06:26.869 --> 00:06:29.113 +Indexes start with one, not a zero. + +00:06:29.114 --> 00:06:31.623 +As most of us watching are programmers, + +00:06:31.624 --> 00:06:33.792 +we're probably used to starting with zero, + +00:06:33.793 --> 00:06:34.959 +but it starts with one. + +00:06:34.960 --> 00:06:38.330 +So one, two, three, four, five. + +00:06:38.331 --> 00:06:39.654 +So down payment is the fifth column, + +00:06:39.655 --> 00:06:42.303 +we say five, and then we say equal to, + +00:06:42.304 --> 00:06:44.288 +let's say Gopar. + +00:06:44.289 --> 00:06:47.937 +Then we do C-c C-c to evaluate it, + +00:06:47.938 --> 00:06:50.545 +and the table is automatically updated. + +00:06:50.546 --> 00:06:50.857 +Look at that. + +00:06:50.957 --> 00:06:55.862 +So when you do just this, dollar sign ($) 5, + +00:06:55.863 --> 00:06:57.706 +it updates every single column. + +00:06:57.806 --> 00:07:00.679 +There is a way to specify that this cell only and + +00:07:00.680 --> 00:07:03.224 +this cell only but this is out of scope and it's + +00:07:03.324 --> 00:07:05.639 +not that hard it's just not in this video. + +00:07:05.640 --> 00:07:08.774 +I would recommend, I commend you, or, actually + +00:07:08.874 --> 00:07:12.999 +I recommend that you go check out the manual for that. + +00:07:13.000 --> 00:07:17.624 +All right so, let's say we want to do some basic + +00:07:17.724 --> 00:07:19.224 +arithmetic we want to do some list values + +00:07:19.324 --> 00:07:20.390 +instead of just putting in text. + +00:07:20.490 --> 00:07:21.440 +So how do we do that? + +00:07:21.540 --> 00:07:24.457 +Well, we have to pull the expression that we want + +00:07:24.557 --> 00:07:25.007 +to put in. + +00:07:25.107 --> 00:07:27.859 +So, for example, if we want to add we'll do 20 plus + +00:07:27.959 --> 00:07:31.357 +20 and if we do C-c C-C to evaluate it, it should + +00:07:31.457 --> 00:07:34.224 +update every single column, the entire column, + +00:07:34.324 --> 00:07:38.540 +the fifth column I mean and, tada, it does. + +00:07:38.640 --> 00:07:41.799 +Cool! So now let's say we want to do a little bit + +00:07:41.899 --> 00:07:42.556 +more advanced. + +00:07:42.656 --> 00:07:44.907 +Let's say we want to add the previous column to + +00:07:45.007 --> 00:07:47.007 +this column, so how do we refer to this one? + +00:07:47.107 --> 00:07:50.890 +Well, 1-2-3-4 is the fourth column, so we would + +00:07:50.990 --> 00:07:55.831 +just simply do $4 and this should automatically + +00:07:55.931 --> 00:07:58.057 +be referring to this column (% DP). + +00:07:58.157 --> 00:08:02.190 +So we'll do 10 + 20, it's going to be 30 over here, + +00:08:02.490 --> 00:08:04.174 +and let's do C-C C-c. + +00:08:04.274 --> 00:08:07.024 +Ooh, error, what happened? + +00:08:07.124 --> 00:08:08.874 +Oh my god, oh my god. + +00:08:08.974 --> 00:08:11.719 +Well, this seems scary but no worries. + +00:08:11.720 --> 00:08:14.077 +This is where debugging comes in pretty handy, + +00:08:14.078 --> 00:08:16.740 +which is actually our next section as you can see. + +00:08:16.940 --> 00:08:19.324 +So, what happens if we do, if we go into the + +00:08:19.424 --> 00:08:21.340 +debugging section, what is the first step? + +00:08:21.440 --> 00:08:24.790 +Well, the first step is to try out, is to enable + +00:08:24.890 --> 00:08:26.416 +formula debugger. + +00:08:26.516 --> 00:08:31.294 +So, if you do C-c {, it will turn on a minor mode + +00:08:31.394 --> 00:08:35.509 +that whenever you evaluate a table formula, + +00:08:35.510 --> 00:08:38.290 +the debugger will be enabled, + +00:08:38.291 --> 00:08:39.357 +will automatically kick in. + +00:08:39.457 --> 00:08:41.073 +And if you want to disable the debugger, + +00:08:41.074 --> 00:08:43.774 +you just run the command again, and it will turn off. + +00:08:43.874 --> 00:08:46.607 +So, let's go ahead and run it. C-c {. + +00:08:46.608 --> 00:08:48.790 +As you can see in the mini buffer, it says, + +00:08:48.791 --> 00:08:51.441 +"formula debugging has been turned on". Awesome! + +00:08:51.541 --> 00:08:53.157 +So if we go back to our table + +00:08:53.158 --> 00:08:58.400 +and we try to run this, and see what's going on, we see... + +00:08:58.500 --> 00:09:00.440 +Oh, first off, before we look + +00:09:00.441 --> 00:09:01.390 +at the buffer that just opened, + +00:09:01.391 --> 00:09:02.490 +look at the mini buffer, + +00:09:02.491 --> 00:09:04.974 +it says "Debugging Formula. Continue to next?" + +00:09:05.074 --> 00:09:07.874 +So if you have multiple or a series of formulas, + +00:09:07.974 --> 00:09:09.690 +it will say, "hey, do you want to debug this one + +00:09:09.691 --> 00:09:10.374 +or the next one?" + +00:09:10.474 --> 00:09:11.958 +So this is just saying, "hey, do you want to go + +00:09:12.058 --> 00:09:13.090 +into the next formula?" + +00:09:13.190 --> 00:09:14.990 +And since there's no next formula, + +00:09:14.991 --> 00:09:16.057 +debugger will just exit out + +00:09:16.058 --> 00:09:18.199 +and leave you with the other buffer to see. + +00:09:18.299 --> 00:09:19.949 +For now, we'll just click no. + +00:09:20.049 --> 00:09:22.590 +Right now, it doesn't matter if you click yes or no + +00:09:22.591 --> 00:09:23.540 +because there's only one formula, + +00:09:23.640 --> 00:09:26.072 +but we'll just click no, and let's go ahead and + +00:09:26.172 --> 00:09:27.657 +pay attention to the new buffer. + +00:09:27.757 --> 00:09:29.807 +Well, over here it might seem a little confusing, + +00:09:29.808 --> 00:09:32.390 +but don't worry, we're just going to ignore most of this. + +00:09:32.490 --> 00:09:33.890 +The first thing that we're going to pay + +00:09:33.990 --> 00:09:35.457 +attention is to the original. + +00:09:35.557 --> 00:09:38.067 +So it says, okay, this is the original, so we have + +00:09:38.167 --> 00:09:41.124 +a quote expression, which is just trying to add the + +00:09:41.324 --> 00:09:41.740 +fourth column. + +00:09:41.840 --> 00:09:42.840 +And if we go over here + +00:09:42.841 --> 00:09:44.207 +once everything is finalized, + +00:09:44.208 --> 00:09:47.107 +it says "hey, we're trying to add this 10, + +00:09:47.207 --> 00:09:50.240 +but it's actually a string 10, and added to 20. + +00:09:50.340 --> 00:09:52.325 +So of course it's going to be an error, so now we + +00:09:52.425 --> 00:09:53.999 +know what the error is. + +00:09:54.099 --> 00:09:56.090 +So you're saying all right cool, awesome, now how + +00:09:56.190 --> 00:09:58.840 +do we transform that string into a number? + +00:09:58.940 --> 00:10:02.607 +Well, Org Mode formulas have these flags + +00:10:02.608 --> 00:10:05.674 +that you can use, and essentially a flag looks like this. + +00:10:05.774 --> 00:10:10.257 +It's a semicolon (;) followed by some letter + +00:10:10.258 --> 00:10:13.270 +or some identifier + +00:10:13.370 --> 00:10:16.490 +that will let Org mode know that hey, + +00:10:16.590 --> 00:10:18.290 +this should be turned into a number + +00:10:18.291 --> 00:10:20.207 +or this should be turned into whatever. + +00:10:20.307 --> 00:10:22.724 +There's different ones for alpha literal + +00:10:22.725 --> 00:10:23.863 +and for a bunch of... + +00:10:23.963 --> 00:10:25.274 +I think there's even "i" for "integer", + +00:10:25.474 --> 00:10:26.819 +so it depends what you want. + +00:10:26.919 --> 00:10:28.202 +So for now we're just going to put "number" + +00:10:28.203 --> 00:10:29.490 +because it's a real number. + +00:10:29.590 --> 00:10:33.699 +If we do this and the debugger is still on, + +00:10:33.707 --> 00:10:35.274 +(remember because it automatically + +00:10:35.374 --> 00:10:36.374 +stays on until we turn it off), + +00:10:36.474 --> 00:10:41.540 +if we reevaluate the the formula, + +00:10:41.640 --> 00:10:43.624 +we should be able to see it. + +00:10:43.724 --> 00:10:47.379 +But first, before I do that, let's check step two. + +00:10:47.479 --> 00:10:52.240 +I'll now rerun formulas with C-c * and table, + +00:10:52.340 --> 00:10:54.639 +which calls org-table-recalculate. + +00:10:54.640 --> 00:10:58.507 +To do this, you actually have to be inside the table. + +00:10:58.607 --> 00:11:02.354 +Otherwise, Org mode will try to do some other stuff + +00:11:02.454 --> 00:11:04.325 +because it is context-aware, so depending on + +00:11:04.425 --> 00:11:06.324 +the context it might do something else. + +00:11:06.424 --> 00:11:09.124 +So if we do C-c *... + +00:11:09.224 --> 00:11:12.724 +As you can see the debugger has kicked in, + +00:11:12.824 --> 00:11:14.102 +says, "Do you want to continue to next?" + +00:11:14.202 --> 00:11:17.580 +Let's press yes (y), and it has been applied. + +00:11:17.680 --> 00:11:20.971 +So as you can see, it only updated one column-- + +00:11:21.071 --> 00:11:22.977 +I'm sorry, one row--and the thing is, + +00:11:23.077 --> 00:11:28.007 +when you run this, the recalculate, it will only + +00:11:28.107 --> 00:11:30.361 +run for the current row that you're in. + +00:11:30.461 --> 00:11:32.785 +If you want to run for the entire table, + +00:11:32.885 --> 00:11:36.240 +you're going to do C-u C-c *. + +00:11:36.340 --> 00:11:38.407 +Before I do that, let me turn off the debugger + +00:11:38.507 --> 00:11:40.807 +since we no longer are in need of it. + +00:11:40.907 --> 00:11:44.977 +So C-c {, and debugging has been turned off. + +00:11:45.077 --> 00:11:50.807 +Now let me do C-u C-c * and as you can see + +00:11:50.808 --> 00:11:54.320 +the other rows also calculated, updated as well. + +00:11:54.420 --> 00:11:54.924 +Beautiful! + +00:11:55.024 --> 00:11:58.507 +So as I mentioned, feel free to look / browse the + +00:11:58.607 --> 00:12:00.107 +documentation for more flags + +00:12:00.108 --> 00:12:02.640 +because each flag has its own special meaning + +00:12:02.641 --> 00:12:07.139 +and will do different things, which is pretty cool. + +00:12:07.140 --> 00:12:08.124 +All right, cool. + +00:12:08.224 --> 00:12:10.007 +We're done with debugging and we fixed it. + +00:12:10.107 --> 00:12:12.075 +So there, now we know how to create formulas + +00:12:12.076 --> 00:12:14.207 +and how to debug them whenever they break, + +00:12:14.307 --> 00:12:15.040 +which is awesome. + +00:12:15.140 --> 00:12:18.324 +All right, but remember how I said that you can + +00:12:18.424 --> 00:12:23.659 +only debug... Whenever you run recalculate, + +00:12:23.660 --> 00:12:25.340 +It will only run the first formula? + +00:12:25.440 --> 00:12:28.439 +Well, let's say you want to have multiple formulas? + +00:12:28.539 --> 00:12:30.807 +This is completely valid, except the bad thing is + +00:12:30.907 --> 00:12:34.090 +that you have to do C-c C-c C-c on each each one, + +00:12:34.190 --> 00:12:39.457 +because C-u C-c * won't recalculate everything. + +00:12:39.557 --> 00:12:40.350 +It won't. + +00:12:40.450 --> 00:12:41.557 +Sadly, it doesn't do it. + +00:12:41.657 --> 00:12:44.189 +There is a way that you can do it, + +00:12:44.289 --> 00:12:46.459 +which is hacking together some elisp. + +00:12:46.460 --> 00:12:47.474 +You can probably find it + +00:12:47.475 --> 00:12:48.707 +or you can probably make it yourself + +00:12:48.807 --> 00:12:51.107 +if you look around, but that's out of scope for this. + +00:12:51.207 --> 00:12:57.099 +So now, how do we... We can write all the formulas + +00:12:57.100 --> 00:12:59.007 +we want in one single line. + +00:12:59.107 --> 00:13:01.740 +There's a way to to distinguish + +00:13:01.741 --> 00:13:03.340 +when one ends and one begins + +00:13:03.341 --> 00:13:04.707 +and that is the double colon (::). + +00:13:04.807 --> 00:13:07.607 +So right there, and a new formula will begin. + +00:13:07.707 --> 00:13:08.374 +So for example, + +00:13:08.474 --> 00:13:12.224 +let's say for the seventh column we say "gopar". + +00:13:12.324 --> 00:13:17.407 +If I do C-c C-c, it'll run every single thing + +00:13:17.507 --> 00:13:19.226 +so that... "gopar". Tada! + +00:13:19.326 --> 00:13:20.624 +There, awesome. + +00:13:20.724 --> 00:13:22.440 +But this is going to get very annoying if you're + +00:13:22.540 --> 00:13:25.007 +simply trying to edit formulas like this, right? + +00:13:25.107 --> 00:13:26.933 +So that's where the nicer debugging, + +00:13:27.033 --> 00:13:28.790 +nicer editing section comes in. + +00:13:28.890 --> 00:13:32.299 +So, yes, just like as mentioned, table calls + +00:13:32.300 --> 00:13:33.507 +only the first formula. + +00:13:33.607 --> 00:13:36.349 +So what's the step onto this nicer editing section? + +00:13:36.449 --> 00:13:40.424 +Try out "C-c ," or `org-edit-special'. + +00:13:40.524 --> 00:13:44.557 +So let's go back to the table formula and call it... + +00:13:44.657 --> 00:13:47.590 +oh my god, look at that, + +00:13:47.690 --> 00:13:49.890 +a new buffer just for editing, + +00:13:49.990 --> 00:13:52.599 +and each formula is in its own line to make + +00:13:52.699 --> 00:13:54.624 +it easier, which is beautiful! + +00:13:54.724 --> 00:13:58.715 +So, let's just say I want to do another calculation. + +00:13:58.815 --> 00:14:02.607 +Let's do eight times eight, which should be 64, + +00:14:02.707 --> 00:14:04.740 +and we have no need of putting this flag + +00:14:04.741 --> 00:14:07.440 +because the flag only affects it on the input coming in. + +00:14:07.540 --> 00:14:09.074 +I should have mentioned that earlier. + +00:14:09.174 --> 00:14:10.774 +Only input coming in. + +00:14:10.874 --> 00:14:13.174 +There is ways to affect the output, + +00:14:13.274 --> 00:14:16.474 +which we'll also cover in this topic later on, + +00:14:16.574 --> 00:14:19.131 +but for now, you can either leave the end flag + +00:14:19.231 --> 00:14:21.990 +or leave it out. It will still work fine. + +00:14:21.991 --> 00:14:23.507 +Let's just leave it out for now. + +00:14:23.508 --> 00:14:26.624 +Let's just do C-c C-c to make sure + +00:14:26.625 --> 00:14:28.774 +that everything is working. + +00:14:28.874 --> 00:14:30.690 +64. Beautiful. + +00:14:30.790 --> 00:14:33.066 +So there you have it. You can have multiple formulas + +00:14:33.166 --> 00:14:34.778 +just stacked up into one line, + +00:14:34.878 --> 00:14:36.390 +and whenever you need to edit it, + +00:14:36.391 --> 00:14:38.257 +just go into that into that line + +00:14:38.357 --> 00:14:41.024 +and "C-c ,", and tada! + +00:14:41.124 --> 00:14:44.350 +You have this ready, good to go, and for editing. + +00:14:44.450 --> 00:14:45.824 +Oh and if you want to exit out, + +00:14:45.825 --> 00:14:48.940 +also just do "C-c ," again and you're back. + +00:14:49.040 --> 00:14:51.890 +I did not mention that. Sweet! + +00:14:51.990 --> 00:14:54.774 +So now we know how to have + +00:14:54.775 --> 00:14:57.006 +a better editing experience. Sweet! + +00:14:57.106 --> 00:15:00.240 +So now comes the formatting section which I talked about. + +00:15:00.340 --> 00:15:01.874 +So what's the first step? + +00:15:01.974 --> 00:15:05.507 +Well for formatting, Org mode uses + +00:15:05.508 --> 00:15:08.574 +the printf function from C. + +00:15:08.674 --> 00:15:10.374 +So those who are familiar with C, + +00:15:10.375 --> 00:15:12.823 +you'll feel right at home because the way you format it + +00:15:12.923 --> 00:15:13.940 +is exactly the same way. + +00:15:14.040 --> 00:15:16.557 +So for example, this will print off + +00:15:16.558 --> 00:15:18.873 +a floating number with two decimal points. + +00:15:18.973 --> 00:15:21.540 +As you can see here, this is how you will use it. + +00:15:21.640 --> 00:15:26.324 +It will be after the semicolon and it will be "%.2f". + +00:15:26.424 --> 00:15:28.157 +So let's go ahead and test that out. + +00:15:28.158 --> 00:15:30.590 +Actually, let's go ahead to our latest function-- + +00:15:30.690 --> 00:15:32.340 +I mean, to our latest formula. + +00:15:32.440 --> 00:15:33.840 +Let's go ahead to the nicer buffer + +00:15:33.841 --> 00:15:39.207 +and let's do, Ctrl... Let's enter the semicolon, + +00:15:39.208 --> 00:15:45.324 +and then let's put the percent sign, we do 2f. + +00:15:45.424 --> 00:15:49.174 +Actually, let's make it five + +00:15:49.175 --> 00:15:52.590 +just to differentiate from the formula, and let's see. + +00:15:52.690 --> 00:15:57.174 +Let's run it, and tada! + +00:15:57.274 --> 00:16:00.179 +So yeah, as you can see, five decimal points. + +00:16:00.180 --> 00:16:01.857 +and if we want zero decimal points, we can also + +00:16:01.957 --> 00:16:04.957 +just move point zero, and tada! + +00:16:05.057 --> 00:16:06.124 +Just like that. + +00:16:06.224 --> 00:16:08.774 +We can also just leave it as is how it was before, + +00:16:08.874 --> 00:16:10.874 +because before, we didn't even actually need it, + +00:16:10.875 --> 00:16:13.014 +but yeah, just an example. + +00:16:13.114 --> 00:16:15.090 +And just a reminder, there are + +00:16:15.091 --> 00:16:17.357 +plenty more ways of formatting, + +00:16:17.358 --> 00:16:19.640 +just look at the documentation. + +00:16:19.740 --> 00:16:21.724 +There will be more. Basically every single thing + +00:16:21.725 --> 00:16:25.574 +that you need, just use the documentation as reference. + +00:16:25.674 --> 00:16:28.340 +Cool! So now we know how to debug, + +00:16:28.341 --> 00:16:29.774 +how to write formulas + +00:16:29.775 --> 00:16:32.824 +and how to get a better, nicer editing buffer + +00:16:32.825 --> 00:16:35.124 +for the formula so we don't have to do it all + +00:16:35.125 --> 00:16:36.240 +in a single line. + +00:16:36.340 --> 00:16:38.657 +So, what about conditional prompts, like I was + +00:16:38.757 --> 00:16:43.390 +showing in the first table in the end goal? + +00:16:43.490 --> 00:16:47.299 +Well that's actually pretty simple because we already + +00:16:47.300 --> 00:16:48.324 +know how to do this. + +00:16:48.424 --> 00:16:51.133 +Yes, if you think about it for a second, if we are + +00:16:51.233 --> 00:16:54.221 +able to pull lisp s-expressions, then we are able to + +00:16:54.321 --> 00:16:56.290 +basically do it already. Here's an example. + +00:16:56.390 --> 00:17:01.807 +We're saying if the second column is empty, is zero-- + +00:17:01.907 --> 00:17:04.619 +so actually, this should be with the N flag + +00:17:04.620 --> 00:17:06.940 +because we will transform empty values as zero, + +00:17:07.040 --> 00:17:08.819 +and that's how Org mode will read those. + +00:17:08.820 --> 00:17:12.424 +It's saying if the second flag is zero, + +00:17:12.425 --> 00:17:16.952 +then I want you to put "Enter the values." + +00:17:17.052 --> 00:17:20.440 +And if it's not empty, we're going to put + +00:17:20.540 --> 00:17:22.190 +"Values entered." We're going to recognize. + +00:17:22.290 --> 00:17:24.240 +So let's go ahead and actually do this. + +00:17:24.540 --> 00:17:28.990 +So let's grab this, and let's type it in. + +00:17:29.090 --> 00:17:36.457 +So let's go ahead. "Enter the values," because it + +00:17:36.557 --> 00:17:37.390 +doesn't have any. + +00:17:37.490 --> 00:17:42.440 +So let's go ahead and say "Hello EmacsConf" + +00:17:42.441 --> 00:17:47.224 +and let's go ahead and run it again. + +00:17:47.324 --> 00:17:48.457 +Since there are values, + +00:17:48.458 --> 00:17:51.574 +it's going to overwrite what's here and put value entered. + +00:17:51.674 --> 00:17:53.398 +So let's go ahead. + +00:17:53.498 --> 00:17:55.690 +Tada, so there you go. + +00:17:55.790 --> 00:18:00.524 +So that is pretty much how you do conditional props, + +00:18:00.624 --> 00:18:01.940 +which is pretty straightforward + +00:18:01.941 --> 00:18:02.724 +once you think about it + +00:18:02.725 --> 00:18:05.440 +because if you are able to insert Lisp expressions, + +00:18:05.441 --> 00:18:08.240 +then you are able to just do that check + +00:18:08.241 --> 00:18:11.074 +and do the conditional check yourself. + +00:18:11.174 --> 00:18:13.540 +So, custom formulas. + +00:18:13.640 --> 00:18:15.324 +Yeah, you'll see what I mean. + +00:18:15.424 --> 00:18:19.924 +We want to be able to put our own custom functions, + +00:18:20.024 --> 00:18:23.890 +and you probably have an idea how to do this already. + +00:18:23.990 --> 00:18:27.059 +Yes, we also know how to do this already. + +00:18:27.060 --> 00:18:30.357 +Before I continue, I'm going to say that I already + +00:18:30.457 --> 00:18:31.940 +have some formulas that I use + +00:18:31.941 --> 00:18:33.374 +which are not part of this talk + +00:18:33.375 --> 00:18:37.390 +because they're just functions that calculate some stuff. + +00:18:37.490 --> 00:18:39.990 +So for example, they calculate the monthly mortgage, + +00:18:40.090 --> 00:18:43.257 +the monthly PMI, property tax, homeowners insurance, + +00:18:43.357 --> 00:18:44.757 +so a bunch of other stuff. + +00:18:44.857 --> 00:18:49.729 +I have these functions already and they are a bit off, + +00:18:49.829 --> 00:18:52.212 +but for this example, they're doing everything. + +00:18:52.312 --> 00:18:54.390 +It's close enough, so don't worry too much. + +00:18:54.490 --> 00:18:56.824 +Just an example, you can have your own function + +00:18:56.924 --> 00:18:59.213 +that does something else like calculate + +00:18:59.313 --> 00:19:01.540 +a REI B rental or something like that. + +00:19:01.640 --> 00:19:03.219 +So you can do whatever you want. + +00:19:03.220 --> 00:19:04.724 +As long as you can call via Lisp, + +00:19:04.824 --> 00:19:07.899 +you can call it in Org mode, in the table formulas. + +00:19:07.900 --> 00:19:11.337 +So let's exit out of there. + +00:19:11.437 --> 00:19:13.807 +Now that we know how to do everything, + +00:19:13.808 --> 00:19:20.924 +let me go back to the original table and go from there. + +00:19:21.024 --> 00:19:26.524 +Let me close all these out actually. + +00:19:26.624 --> 00:19:29.524 +Now let's go back and revisit this table, + +00:19:29.624 --> 00:19:31.619 +since we'll be much, much more familiar + +00:19:31.620 --> 00:19:35.418 +except for one thing, which I will explain. + +00:19:35.518 --> 00:19:38.040 +So we have the constants right there + +00:19:38.041 --> 00:19:39.690 +and we have the house prices + +00:19:39.691 --> 00:19:42.499 +and we have everything just like I mentioned before. + +00:19:42.500 --> 00:19:44.023 +The main part that we want to look at + +00:19:44.123 --> 00:19:45.024 +is the table formula. + +00:19:45.124 --> 00:19:47.474 +So let's open up our special editing buffer, + +00:19:47.574 --> 00:19:49.674 +"C-c ,", + +00:19:49.774 --> 00:19:52.390 +and as you can see, I have some right here. + +00:19:52.490 --> 00:19:53.524 +So, the fifth column I'm saying, + +00:19:53.624 --> 00:19:55.824 +"Hey, we're gonna call this function + +00:19:55.924 --> 00:19:58.557 +rei-calculate-down-payment, and I'm gonna + +00:19:58.657 --> 00:20:00.757 +pass in the third column and fourth column + +00:20:00.758 --> 00:20:02.339 +and I'm going to pass in t." (true) + +00:20:02.340 --> 00:20:05.874 +I believe this is just to normalize, + +00:20:07.174 --> 00:20:12.057 +to convert to the proper decimal place, + +00:20:12.157 --> 00:20:14.079 +so let's not worry too much about that. + +00:20:14.179 --> 00:20:16.690 +Then for the sixth column, we're going to say + +00:20:16.790 --> 00:20:18.045 +"I calculate the monthly mortgage." + +00:20:18.145 --> 00:20:20.124 +We're going to pass in the third column + +00:20:20.224 --> 00:20:21.339 +the INTEREST_RATE, which we have + +00:20:21.439 --> 00:20:22.979 +defined over here in the constants. + +00:20:22.980 --> 00:20:26.274 +The 30, I believe this is for 30 years, + +00:20:26.374 --> 00:20:29.323 +PMI, the PROPERTY_TAX and HOME_INSURANCE, + +00:20:29.423 --> 00:20:30.774 +and then the fourth column. + +00:20:30.874 --> 00:20:33.824 +Then everything is going to be accepted as numbers, + +00:20:33.924 --> 00:20:35.074 +and we're going to have two decimals + +00:20:35.174 --> 00:20:36.174 +at the end of the place. + +00:20:36.274 --> 00:20:37.507 +So, what else? + +00:20:37.607 --> 00:20:40.074 +Over here is where we have our conditionals. + +00:20:40.174 --> 00:20:42.274 +We're saying, "hey, if the seventh column is 0, + +00:20:42.374 --> 00:20:44.302 +press 'Enter Tenant Income'." + +00:20:44.402 --> 00:20:48.407 +Over here as well, if the seventh column is zero, + +00:20:48.507 --> 00:20:51.724 +we're going to press 'Enter Tenant Income' + +00:20:51.824 --> 00:20:53.605 +and for this one we're going to say, + +00:20:53.705 --> 00:20:55.940 +"Hey, we're going to normalize the price." + +00:20:56.040 --> 00:20:59.240 +I believe this is a 1% rule. + +00:20:59.340 --> 00:21:01.390 +This could have been extracted into a function, + +00:21:01.490 --> 00:21:03.939 +but I just did the calculation right here. + +00:21:04.239 --> 00:21:07.890 +This, I believe, is the ROI, 12 months. + +00:21:07.990 --> 00:21:11.007 +This is just calculating the cash flow. + +00:21:11.107 --> 00:21:14.907 +This is a very rudimentary function or formula. + +00:21:15.407 --> 00:21:16.732 +Do not use this because there is way more + +00:21:16.733 --> 00:21:18.840 +to go into calculating the cash flow + +00:21:18.841 --> 00:21:21.499 +and also, it differs from person to person. + +00:21:21.599 --> 00:21:23.774 +Some people are more conservative, + +00:21:23.874 --> 00:21:26.959 +other people are way more liberal, so it just + +00:21:26.960 --> 00:21:28.874 +depends how you want to calculate it. + +00:21:28.974 --> 00:21:34.240 +As you can see, we have the N flag for numeric number + +00:21:34.241 --> 00:21:36.090 +and then we're saying we're formatting + +00:21:36.190 --> 00:21:37.694 +to one decimal place. + +00:21:37.794 --> 00:21:43.207 +The %% sign is just to input a percent sign as itself. + +00:21:43.208 --> 00:21:45.419 +Otherwise, Org mode is going to think + +00:21:45.420 --> 00:21:47.940 +it's some type of a formatter, which it's not. + +00:21:48.040 --> 00:21:49.140 +If you do... As I mentioned, + +00:21:49.240 --> 00:21:51.690 +if you've used the printf function in C or C++, + +00:21:51.790 --> 00:21:55.507 +then you probably know how to use it. + +00:21:55.607 --> 00:22:01.824 +Okay, so this is pretty much everything in a nutshell. + +00:22:01.924 --> 00:22:04.970 +So, one thing that I do want to say + +00:22:05.070 --> 00:22:06.379 +is the last section, + +00:22:06.479 --> 00:22:07.774 +which is automatically updating, + +00:22:07.874 --> 00:22:10.174 +which is the part that blew my mind + +00:22:10.175 --> 00:22:11.457 +when I realized that Org Mode can do this. + +00:22:11.557 --> 00:22:12.477 +So how do we do it? + +00:22:12.577 --> 00:22:14.659 +Well, you probably guessed just from looking at + +00:22:14.660 --> 00:22:18.324 +at the first table that we have right now. + +00:22:18.424 --> 00:22:20.774 +We add a column at the beginning + +00:22:20.874 --> 00:22:22.857 +of the table with a percent (%)-- + +00:22:22.957 --> 00:22:24.857 +I'm sorry, with the pound sign (#) + +00:22:24.957 --> 00:22:28.457 +or hashtag as the younger kids call it. + +00:22:28.557 --> 00:22:31.045 +So this is what we do. + +00:22:31.145 --> 00:22:32.819 +We added a column at the beginning of the + +00:22:32.820 --> 00:22:34.984 +table, we do pound sign (#). + +00:22:35.084 --> 00:22:35.790 +So this is what it's for. + +00:22:35.890 --> 00:22:38.839 +This lets Org mode know that "hey, + +00:22:38.840 --> 00:22:41.140 +I want the values, the table formulas, + +00:22:41.240 --> 00:22:43.957 +to automatically run on each tab change." + +00:22:44.057 --> 00:22:46.240 +Now I believe that you can make it so that + +00:22:46.340 --> 00:22:49.123 +it changes, so that it updates on every keystroke. + +00:22:49.223 --> 00:22:51.024 +I think that's too much. + +00:22:51.124 --> 00:22:53.007 +And then you can also make it so that + +00:22:53.107 --> 00:22:56.019 +only certain rows update or certain columns. + +00:22:56.020 --> 00:22:58.219 +There's a plethora of things that you can do. + +00:22:58.319 --> 00:23:00.924 +You should definitely read up on the documentation, + +00:23:01.024 --> 00:23:03.425 +because you will probably make a way better talk, + +00:23:03.525 --> 00:23:06.974 +a way more advanced talk than I on this one, + +00:23:07.074 --> 00:23:09.574 +so I'm looking forward for that. + +00:23:09.674 --> 00:23:12.459 +But this is essentially how you build + +00:23:12.460 --> 00:23:15.507 +a Org mode table formula that will help you know + +00:23:15.508 --> 00:23:17.125 +if a property is correct. + +00:23:17.225 --> 00:23:22.340 +So, let's go ahead and as a final out to this demo, + +00:23:22.440 --> 00:23:25.419 +let's go ahead and enter a new column. + +00:23:25.420 --> 00:23:30.174 +Org-mode automatically puts the pound sign (#), + +00:23:30.274 --> 00:23:35.440 +which is awesome, and let's just say 'Emacs House', + +00:23:35.540 --> 00:23:39.590 +and let's say it is 100k. + +00:23:39.690 --> 00:23:44.339 +So 100k, and as you can see it's already trying to + +00:23:44.340 --> 00:23:46.040 +calculate the monthly mortgage, + +00:23:46.140 --> 00:23:47.090 +but we'll see about that, + +00:23:47.190 --> 00:23:49.879 +and let's just put 10% down. + +00:23:49.880 --> 00:23:53.057 +So 10% of 100k should be 10,000. + +00:23:53.157 --> 00:23:56.407 +So 10,000, correct, and the monthly mortgage is that + +00:23:56.408 --> 00:24:00.090 +and let's just say the tenant income is, + +00:24:00.190 --> 00:24:01.657 +as you can see right here, + +00:24:01.757 --> 00:24:05.874 +tenant income is, let's say 1500. + +00:24:05.974 --> 00:24:07.274 +Is it passing the 1% rule? + +00:24:07.374 --> 00:24:09.424 +Yep! What's my ROI? + +00:24:09.524 --> 00:24:13.879 +118%, which is kind of cool actually. + +00:24:13.880 --> 00:24:14.707 +That's a nice deal. + +00:24:14.907 --> 00:24:17.657 +So this is a rudimentary way of + +00:24:17.757 --> 00:24:20.319 +calculating deals in Org mode. + +00:24:20.419 --> 00:24:44.380 +I hope you found it interesting, and yeah, that is it. diff --git a/2022/info/realestate-after.md b/2022/info/realestate-after.md index 4375089a..911020e8 100644 --- a/2022/info/realestate-after.md +++ b/2022/info/realestate-after.md @@ -1,6 +1,590 @@ + +# Transcript + +[[!template new="1" text="Hey, I'm Gopar and this is the" start="00:00:00.000" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Real Estate and Org Mode Table Formulas talk." start="00:00:05.454" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Not very creative, but it is what it is." start="00:00:07.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Now I just want to say that everything I talk about here" start="00:00:09.880" video="mainVideo-realestate" id="subtitle"]] +[[!template text="is in the Org Mode in the Emacs manual." start="00:00:13.052" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I posted a link to the web version," start="00:00:15.903" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but it should be inside of Emacs as well." start="00:00:17.910" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="Now before I start, I want to showcase the end goal." start="00:00:20.480" video="mainVideo-realestate" id="subtitle"]] +[[!template text="That way you know if you guys want to" start="00:00:25.097" video="mainVideo-realestate" id="subtitle"]] +[[!template text="actually see the talk or not." start="00:00:26.807" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So I always think that's pretty cool to see" start="00:00:28.740" video="mainVideo-realestate" id="subtitle"]] +[[!template text="what you're actually going to build" start="00:00:30.492" video="mainVideo-realestate" id="subtitle"]] +[[!template text="before you start building it." start="00:00:31.518" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Alright. So let me start off with the goal," start="00:00:32.680" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the end goal. Here we have a simple table formula" start="00:00:34.286" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and we have some constants, some values inside the list--" start="00:00:38.763" video="mainVideo-realestate" id="subtitle"]] +[[!template text="inside the table, I'm sorry," start="00:00:42.614" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and some other stuff that we will get to," start="00:00:44.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but for now... I don't want to spoil too much." start="00:00:47.673" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I just want to give you a demo" start="00:00:49.280" video="mainVideo-realestate" id="subtitle"]] +[[!template text="of how it actually works." start="00:00:50.328" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="We have a few values. Let me first go over the constants." start="00:00:51.800" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We have PMI, which stands for" start="00:00:56.095" video="mainVideo-realestate" id="subtitle"]] +[[!template text="private mortgage insurance," start="00:00:57.582" video="mainVideo-realestate" id="subtitle"]] +[[!template text="so it's insurance that you'll have to pay" start="00:00:57.591" video="mainVideo-realestate" id="subtitle"]] +[[!template text="depending on how much money you put into the deal." start="00:01:00.537" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The property tax, which is self-explanatory," start="00:01:03.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the tax that you owe for owning the property," start="00:01:06.068" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then home insurance," start="00:01:09.317" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and the interest rate at the loan that you get." start="00:01:11.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, here we have a few columns." start="00:01:13.440" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The first one is called House," start="00:01:15.667" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which I usually just put a description of the house" start="00:01:17.412" video="mainVideo-realestate" id="subtitle"]] +[[!template text="with the link of the posting," start="00:01:20.624" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the price of the house," start="00:01:21.127" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the percentage down payment (this I play around with" start="00:01:22.494" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to see how much the deal will be structured)," start="00:01:26.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the down payment (which is calculated from" start="00:01:27.474" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the previous two columns)," start="00:01:30.529" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the monthly mortgage (which is calculated as well)," start="00:01:31.755" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then the tenant income (which is what I suppose" start="00:01:34.145" video="mainVideo-realestate" id="subtitle"]] +[[!template text="would be an example of the tenant income" start="00:01:37.996" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that I can potentially make off the property," start="00:01:41.006" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the 1% rule and the ROI." start="00:01:42.753" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I'll quickly go over the last two columns." start="00:01:45.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So first is the 1% rule." start="00:01:47.708" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The 1% rule is essentially" start="00:01:49.300" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a "rule," in quotes, that says that" start="00:01:50.880" video="mainVideo-realestate" id="subtitle"]] +[[!template text="if a property matches this specific formula," start="00:01:53.589" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it is a good deal to look into." start="00:01:56.278" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So for example, the first two pass," start="00:01:58.320" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and the last one does not pass." start="00:02:00.890" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The last one, at a quick glance," start="00:02:02.677" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we can just ignore it and say," start="00:02:04.105" video="mainVideo-realestate" id="subtitle"]] +[[!template text=""hey, that's not going to fly,"" start="00:02:05.472" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we'll just ignore it." start="00:02:06.477" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I won't go too much into details." start="00:02:08.000" video="mainVideo-realestate" id="subtitle"]] +[[!template text="That's just a brief summary." start="00:02:09.891" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So now the ROI is the return on investment." start="00:02:11.520" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So it says "how much of a return am I getting" start="00:02:14.149" video="mainVideo-realestate" id="subtitle"]] +[[!template text="on the amount that I invested?"" start="00:02:17.600" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's say you put in $12,000," start="00:02:18.960" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and at the end of the year, you cashflow $6,000." start="00:02:21.168" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So if you calculate the ROI off of that," start="00:02:23.456" video="mainVideo-realestate" id="subtitle"]] +[[!template text="you get a 50% return on investment." start="00:02:26.127" video="mainVideo-realestate" id="subtitle"]] +[[!template text="In two years, you'll make your money back," start="00:02:28.477" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is pretty good." start="00:02:30.086" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Then all the rest of the years," start="00:02:31.734" video="mainVideo-realestate" id="subtitle"]] +[[!template text="you'll just slowly be reaping in all that," start="00:02:32.719" video="mainVideo-realestate" id="subtitle"]] +[[!template text="all the excess cash flow." start="00:02:34.348" video="mainVideo-realestate" id="subtitle"]] +[[!template text="But yeah, that's it in a nutshell." start="00:02:36.640" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So let me demo it real quick." start="00:02:40.040" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So for example, I'm going to change the down payment," start="00:02:42.270" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but I want you to pay attention" start="00:02:44.259" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to this column [down payment]" start="00:02:45.745" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and the monthly mortgage column." start="00:02:48.214" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So right here [down payment] is $25,000," start="00:02:49.840" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and here [monthly mortgage] is around $1,200," start="00:02:51.727" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a little under $1,300." start="00:02:53.473" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So what happens if I say, you know," start="00:02:55.180" video="mainVideo-realestate" id="subtitle"]] +[[!template text="what I'm going to change the down payment" start="00:02:57.350" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to 5% instead, because I just" start="00:02:58.796" video="mainVideo-realestate" id="subtitle"]] +[[!template text="don't want to put 10." start="00:03:00.949" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's just put say 5." start="00:03:02.560" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Then I tab out of here, and voila -" start="00:03:04.126" video="mainVideo-realestate" id="subtitle"]] +[[!template text="you see it updated to half of $25,000." start="00:03:06.275" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So now it's $12,000," start="00:03:08.523" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and this [monthly mortgage] went up" start="00:03:09.947" video="mainVideo-realestate" id="subtitle"]] +[[!template text="over actually $1,300," start="00:03:10.690" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then this [1% rule] hasn't changed at all" start="00:03:12.234" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and the ROI is there." start="00:03:14.784" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So one thing that I should mention is" start="00:03:17.680" video="mainVideo-realestate" id="subtitle"]] +[[!template text="everything that I'm putting here" start="00:03:19.148" video="mainVideo-realestate" id="subtitle"]] +[[!template text="is just example numbers," start="00:03:20.194" video="mainVideo-realestate" id="subtitle"]] +[[!template text="should not be taken into literal real estate advice." start="00:03:21.280" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I just want to put that out there." start="00:03:25.635" video="mainVideo-realestate" id="subtitle"]] +[[!template text="These are just examples to show you" start="00:03:26.860" video="mainVideo-realestate" id="subtitle"]] +[[!template text="how you can potentially make it on your own," start="00:03:28.368" video="mainVideo-realestate" id="subtitle"]] +[[!template text="do the formulas on your own." start="00:03:30.520" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="Alright, so another cool thing that I did was" start="00:03:32.240" video="mainVideo-realestate" id="subtitle"]] +[[!template text="if there is no tenant income and I tab," start="00:03:35.651" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it says "Enter Tenant Income"." start="00:03:37.738" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So if I don't put anything," start="00:03:40.049" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it will automatically tell me, hey," start="00:03:41.033" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I can't calculate without the tenant income." start="00:03:42.400" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I can also do this right here [ROI field]," start="00:03:44.920" video="mainVideo-realestate" id="subtitle"]] +[[!template text="say the same thing, Enter Tenant Income," start="00:03:46.608" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but I just didn't put it for whatever reason, but" start="00:03:48.476" video="mainVideo-realestate" id="subtitle"]] +[[!template text="after this video, you should be easily able to" start="00:03:50.564" video="mainVideo-realestate" id="subtitle"]] +[[!template text="put it without much struggle." start="00:03:53.813" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Alright, so if that's something you're interested in," start="00:03:57.400" video="mainVideo-realestate" id="subtitle"]] +[[!template text="then keep watching." start="00:04:00.131" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So let's go over the basics first." start="00:04:02.240" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, how do we create a table?" start="00:04:05.240" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, we can do M-x org-table-create." start="00:04:07.400" video="mainVideo-realestate" id="subtitle"]] +[[!template text="If we run that it, will prompt us in a minibuffer." start="00:04:10.369" video="mainVideo-realestate" id="subtitle"]] +[[!template text="It says table size, columns times row." start="00:04:14.302" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Usually it's rows times columns," start="00:04:16.893" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but it is what it is." start="00:04:18.178" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's just leave" start="00:04:19.602" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the default of 5 times 2, and voila, we get this." start="00:04:20.466" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Beautiful. Awesome." start="00:04:24.960" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So the other way is using the magical C-c C-c" start="00:04:26.400" video="mainVideo-realestate" id="subtitle"]] +[[!template text="in Org Mode, which basically is context-aware" start="00:04:29.511" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and does anything, does the right thing like," start="00:04:32.402" video="mainVideo-realestate" id="subtitle"]] +[[!template text="almost 100% of the time, which is pretty amazing." start="00:04:36.054" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Alright, let's just say I write a pipe, some words," start="00:04:38.600" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then another pipe, Gopar, and then" start="00:04:42.432" video="mainVideo-realestate" id="subtitle"]] +[[!template text="another pipe. Let's just say we're trying to" start="00:04:44.680" video="mainVideo-realestate" id="subtitle"]] +[[!template text="write it out via text, because in Org mode" start="00:04:47.269" video="mainVideo-realestate" id="subtitle"]] +[[!template text="everything has text." start="00:04:50.600" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There's nothing fancy about it." start="00:04:51.547" video="mainVideo-realestate" id="subtitle"]] +[[!template text="If I do C-c C-c, Org mode should automatically be" start="00:04:53.380" video="mainVideo-realestate" id="subtitle"]] +[[!template text="context-aware that this area is a table." start="00:04:57.673" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, C-c C-c, boom. So if I press enter, another column." start="00:04:59.840" video="mainVideo-realestate" id="subtitle"]] +[[!template text="If I press tab, it should automatically move me." start="00:05:04.295" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So yeah, so that's pretty much it." start="00:05:06.964" video="mainVideo-realestate" id="subtitle"]] +[[!template text="That's how you get started into the column." start="00:05:09.392" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, I'm assuming most of the people here already know that." start="00:05:11.920" video="mainVideo-realestate" id="subtitle"]] +[[!template text="This is just the primary basic review." start="00:05:15.592" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So, let's first go..." start="00:05:17.960" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's go dive right into our first formula." start="00:05:19.808" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So I copied some values over here," start="00:05:22.820" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just to save time, and the columns." start="00:05:24.767" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, let's go ahead and say that" start="00:05:27.697" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we have single family house," start="00:05:29.164" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and the price is a hundred thousand." start="00:05:30.750" video="mainVideo-realestate" id="subtitle"]] +[[!template text="And, Let's say that I want the price," start="00:05:33.019" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the down payment that I want to put is 10%." start="00:05:34.164" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Right. Alright. 10%. Now if I tab" start="00:05:36.432" video="mainVideo-realestate" id="subtitle"]] +[[!template text="or go to the next column, nothing happens." start="00:05:40.528" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Why is that? Well, it's because" start="00:05:42.394" video="mainVideo-realestate" id="subtitle"]] +[[!template text="(you probably guessed it)" start="00:05:43.880" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we haven't written or tied any table formulas." start="00:05:44.985" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So we're saying, alright, enough talk." start="00:05:47.756" video="mainVideo-realestate" id="subtitle"]] +[[!template text="How do we do that?" start="00:05:49.564" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, the answer is very simple." start="00:05:50.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We do a pound sign (#), if I can find it." start="00:05:52.094" video="mainVideo-realestate" id="subtitle"]] +[[!template text="#+ and then we do TBL for table" start="00:05:54.984" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then FM for formula." start="00:05:58.713" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, table formula, and the column." start="00:06:01.120" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So this, you're already halfway" start="00:06:03.429" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to writing your first table formula." start="00:06:04.935" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's say we want to automatically," start="00:06:07.064" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's just, for exercise," start="00:06:09.172" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we want to put the down payment," start="00:06:10.979" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just put some type of value in there," start="00:06:13.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just to make sure that it's working." start="00:06:14.616" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So the way Org Mode refers to columns is," start="00:06:16.383" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we start with the dollar sign ($) and then" start="00:06:20.993" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we put the number that the column is." start="00:06:24.141" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Indexes start with one, not a zero." start="00:06:26.869" video="mainVideo-realestate" id="subtitle"]] +[[!template text="As most of us watching are programmers," start="00:06:29.114" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we're probably used to starting with zero," start="00:06:31.624" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but it starts with one." start="00:06:33.793" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So one, two, three, four, five." start="00:06:34.960" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So down payment is the fifth column," start="00:06:38.331" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we say five, and then we say equal to," start="00:06:39.655" video="mainVideo-realestate" id="subtitle"]] +[[!template text="let's say Gopar." start="00:06:42.304" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Then we do C-c C-c to evaluate it," start="00:06:44.289" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and the table is automatically updated." start="00:06:47.938" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Look at that." start="00:06:50.546" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So when you do just this, dollar sign ($) 5," start="00:06:50.957" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it updates every single column." start="00:06:55.863" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There is a way to specify that this cell only and" start="00:06:57.806" video="mainVideo-realestate" id="subtitle"]] +[[!template text="this cell only but this is out of scope and it's" start="00:07:00.680" video="mainVideo-realestate" id="subtitle"]] +[[!template text="not that hard it's just not in this video." start="00:07:03.324" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I would recommend, I commend you, or, actually" start="00:07:05.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I recommend that you go check out the manual for that." start="00:07:08.874" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="All right so, let's say we want to do some basic" start="00:07:13.000" video="mainVideo-realestate" id="subtitle"]] +[[!template text="arithmetic we want to do some list values" start="00:07:17.724" video="mainVideo-realestate" id="subtitle"]] +[[!template text="instead of just putting in text." start="00:07:19.324" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So how do we do that?" start="00:07:20.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, we have to pull the expression that we want" start="00:07:21.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to put in." start="00:07:24.557" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, for example, if we want to add we'll do 20 plus" start="00:07:25.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="20 and if we do C-c C-C to evaluate it, it should" start="00:07:27.959" video="mainVideo-realestate" id="subtitle"]] +[[!template text="update every single column, the entire column," start="00:07:31.457" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the fifth column I mean and, tada, it does." start="00:07:34.324" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Cool! So now let's say we want to do a little bit" start="00:07:38.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="more advanced." start="00:07:41.899" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's say we want to add the previous column to" start="00:07:42.656" video="mainVideo-realestate" id="subtitle"]] +[[!template text="this column, so how do we refer to this one?" start="00:07:45.007" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, 1-2-3-4 is the fourth column, so we would" start="00:07:47.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just simply do $4 and this should automatically" start="00:07:50.990" video="mainVideo-realestate" id="subtitle"]] +[[!template text="be referring to this column (% DP)." start="00:07:55.931" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So we'll do 10 + 20, it's going to be 30 over here," start="00:07:58.157" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and let's do C-C C-c." start="00:08:02.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Ooh, error, what happened?" start="00:08:04.274" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Oh my god, oh my god." start="00:08:07.124" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, this seems scary but no worries." start="00:08:08.974" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="This is where debugging comes in pretty handy," start="00:08:11.720" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is actually our next section as you can see." start="00:08:14.078" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, what happens if we do, if we go into the" start="00:08:16.940" video="mainVideo-realestate" id="subtitle"]] +[[!template text="debugging section, what is the first step?" start="00:08:19.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, the first step is to try out, is to enable" start="00:08:21.440" video="mainVideo-realestate" id="subtitle"]] +[[!template text="formula debugger." start="00:08:24.890" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, if you do C-c {, it will turn on a minor mode" start="00:08:26.516" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that whenever you evaluate a table formula," start="00:08:31.394" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the debugger will be enabled," start="00:08:35.510" video="mainVideo-realestate" id="subtitle"]] +[[!template text="will automatically kick in." start="00:08:38.291" video="mainVideo-realestate" id="subtitle"]] +[[!template text="And if you want to disable the debugger," start="00:08:39.457" video="mainVideo-realestate" id="subtitle"]] +[[!template text="you just run the command again, and it will turn off." start="00:08:41.074" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, let's go ahead and run it. C-c {." start="00:08:43.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="As you can see in the mini buffer, it says," start="00:08:46.608" video="mainVideo-realestate" id="subtitle"]] +[[!template text=""formula debugging has been turned on". Awesome!" start="00:08:48.791" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So if we go back to our table" start="00:08:51.541" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and we try to run this, and see what's going on, we see..." start="00:08:53.158" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Oh, first off, before we look" start="00:08:58.500" video="mainVideo-realestate" id="subtitle"]] +[[!template text="at the buffer that just opened," start="00:09:00.441" video="mainVideo-realestate" id="subtitle"]] +[[!template text="look at the mini buffer," start="00:09:01.391" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it says "Debugging Formula. Continue to next?"" start="00:09:02.491" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So if you have multiple or a series of formulas," start="00:09:05.074" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it will say, "hey, do you want to debug this one" start="00:09:07.974" video="mainVideo-realestate" id="subtitle"]] +[[!template text="or the next one?"" start="00:09:09.691" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So this is just saying, "hey, do you want to go" start="00:09:10.474" video="mainVideo-realestate" id="subtitle"]] +[[!template text="into the next formula?"" start="00:09:12.058" video="mainVideo-realestate" id="subtitle"]] +[[!template text="And since there's no next formula," start="00:09:13.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="debugger will just exit out" start="00:09:14.991" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and leave you with the other buffer to see." start="00:09:16.058" video="mainVideo-realestate" id="subtitle"]] +[[!template text="For now, we'll just click no." start="00:09:18.299" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Right now, it doesn't matter if you click yes or no" start="00:09:20.049" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because there's only one formula," start="00:09:22.591" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but we'll just click no, and let's go ahead and" start="00:09:23.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="pay attention to the new buffer." start="00:09:26.172" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, over here it might seem a little confusing," start="00:09:27.757" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but don't worry, we're just going to ignore most of this." start="00:09:29.808" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The first thing that we're going to pay" start="00:09:32.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="attention is to the original." start="00:09:33.990" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So it says, okay, this is the original, so we have" start="00:09:35.557" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a quote expression, which is just trying to add the" start="00:09:38.167" video="mainVideo-realestate" id="subtitle"]] +[[!template text="fourth column." start="00:09:41.324" video="mainVideo-realestate" id="subtitle"]] +[[!template text="And if we go over here" start="00:09:41.840" video="mainVideo-realestate" id="subtitle"]] +[[!template text="once everything is finalized," start="00:09:42.841" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it says "hey, we're trying to add this 10," start="00:09:44.208" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but it's actually a string 10, and added to 20." start="00:09:47.207" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So of course it's going to be an error, so now we" start="00:09:50.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="know what the error is." start="00:09:52.425" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So you're saying all right cool, awesome, now how" start="00:09:54.099" video="mainVideo-realestate" id="subtitle"]] +[[!template text="do we transform that string into a number?" start="00:09:56.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, Org Mode formulas have these flags" start="00:09:58.940" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that you can use, and essentially a flag looks like this." start="00:10:02.608" video="mainVideo-realestate" id="subtitle"]] +[[!template text="It's a semicolon (;) followed by some letter" start="00:10:05.774" video="mainVideo-realestate" id="subtitle"]] +[[!template text="or some identifier" start="00:10:10.258" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that will let Org mode know that hey," start="00:10:13.370" video="mainVideo-realestate" id="subtitle"]] +[[!template text="this should be turned into a number" start="00:10:16.590" video="mainVideo-realestate" id="subtitle"]] +[[!template text="or this should be turned into whatever." start="00:10:18.291" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There's different ones for alpha literal" start="00:10:20.307" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and for a bunch of..." start="00:10:22.725" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I think there's even "i" for "integer"," start="00:10:23.963" video="mainVideo-realestate" id="subtitle"]] +[[!template text="so it depends what you want." start="00:10:25.474" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So for now we're just going to put "number"" start="00:10:26.919" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because it's a real number." start="00:10:28.203" video="mainVideo-realestate" id="subtitle"]] +[[!template text="If we do this and the debugger is still on," start="00:10:29.590" video="mainVideo-realestate" id="subtitle"]] +[[!template text="(remember because it automatically" start="00:10:33.707" video="mainVideo-realestate" id="subtitle"]] +[[!template text="stays on until we turn it off)," start="00:10:35.374" video="mainVideo-realestate" id="subtitle"]] +[[!template text="if we reevaluate the the formula," start="00:10:36.474" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we should be able to see it." start="00:10:41.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="But first, before I do that, let's check step two." start="00:10:43.724" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I'll now rerun formulas with C-c * and table," start="00:10:47.479" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which calls org-table-recalculate." start="00:10:52.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="To do this, you actually have to be inside the table." start="00:10:54.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Otherwise, Org mode will try to do some other stuff" start="00:10:58.607" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because it is context-aware, so depending on" start="00:11:02.454" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the context it might do something else." start="00:11:04.425" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So if we do C-c *..." start="00:11:06.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="As you can see the debugger has kicked in," start="00:11:09.224" video="mainVideo-realestate" id="subtitle"]] +[[!template text="says, "Do you want to continue to next?"" start="00:11:12.824" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's press yes (y), and it has been applied." start="00:11:14.202" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So as you can see, it only updated one column--" start="00:11:17.680" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I'm sorry, one row--and the thing is," start="00:11:21.071" video="mainVideo-realestate" id="subtitle"]] +[[!template text="when you run this, the recalculate, it will only" start="00:11:23.077" video="mainVideo-realestate" id="subtitle"]] +[[!template text="run for the current row that you're in." start="00:11:28.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="If you want to run for the entire table," start="00:11:30.461" video="mainVideo-realestate" id="subtitle"]] +[[!template text="you're going to do C-u C-c *." start="00:11:32.885" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Before I do that, let me turn off the debugger" start="00:11:36.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="since we no longer are in need of it." start="00:11:38.507" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So C-c {, and debugging has been turned off." start="00:11:40.907" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Now let me do C-u C-c * and as you can see" start="00:11:45.077" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the other rows also calculated, updated as well." start="00:11:50.808" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Beautiful!" start="00:11:54.420" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So as I mentioned, feel free to look / browse the" start="00:11:55.024" video="mainVideo-realestate" id="subtitle"]] +[[!template text="documentation for more flags" start="00:11:58.607" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because each flag has its own special meaning" start="00:12:00.108" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and will do different things, which is pretty cool." start="00:12:02.641" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="All right, cool." start="00:12:07.140" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We're done with debugging and we fixed it." start="00:12:08.224" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So there, now we know how to create formulas" start="00:12:10.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and how to debug them whenever they break," start="00:12:12.076" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is awesome." start="00:12:14.307" video="mainVideo-realestate" id="subtitle"]] +[[!template text="All right, but remember how I said that you can" start="00:12:15.140" video="mainVideo-realestate" id="subtitle"]] +[[!template text="only debug... Whenever you run recalculate," start="00:12:18.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="It will only run the first formula?" start="00:12:23.660" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, let's say you want to have multiple formulas?" start="00:12:25.440" video="mainVideo-realestate" id="subtitle"]] +[[!template text="This is completely valid, except the bad thing is" start="00:12:28.539" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that you have to do C-c C-c C-c on each each one," start="00:12:30.907" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because C-u C-c * won't recalculate everything." start="00:12:34.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="It won't." start="00:12:39.557" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Sadly, it doesn't do it." start="00:12:40.450" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There is a way that you can do it," start="00:12:41.657" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is hacking together some elisp." start="00:12:44.289" video="mainVideo-realestate" id="subtitle"]] +[[!template text="You can probably find it" start="00:12:46.460" video="mainVideo-realestate" id="subtitle"]] +[[!template text="or you can probably make it yourself" start="00:12:47.475" video="mainVideo-realestate" id="subtitle"]] +[[!template text="if you look around, but that's out of scope for this." start="00:12:48.807" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So now, how do we... We can write all the formulas" start="00:12:51.207" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we want in one single line." start="00:12:57.100" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There's a way to to distinguish" start="00:12:59.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="when one ends and one begins" start="00:13:01.741" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and that is the double colon (::)." start="00:13:03.341" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So right there, and a new formula will begin." start="00:13:04.807" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So for example," start="00:13:07.707" video="mainVideo-realestate" id="subtitle"]] +[[!template text="let's say for the seventh column we say "gopar"." start="00:13:08.474" video="mainVideo-realestate" id="subtitle"]] +[[!template text="If I do C-c C-c, it'll run every single thing" start="00:13:12.324" video="mainVideo-realestate" id="subtitle"]] +[[!template text="so that... "gopar". Tada!" start="00:13:17.507" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There, awesome." start="00:13:19.326" video="mainVideo-realestate" id="subtitle"]] +[[!template text="But this is going to get very annoying if you're" start="00:13:20.724" video="mainVideo-realestate" id="subtitle"]] +[[!template text="simply trying to edit formulas like this, right?" start="00:13:22.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So that's where the nicer debugging," start="00:13:25.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="nicer editing section comes in." start="00:13:27.033" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, yes, just like as mentioned, table calls" start="00:13:28.890" video="mainVideo-realestate" id="subtitle"]] +[[!template text="only the first formula." start="00:13:32.300" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So what's the step onto this nicer editing section?" start="00:13:33.607" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Try out "C-c ," or `org-edit-special'." start="00:13:36.449" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's go back to the table formula and call it..." start="00:13:40.524" video="mainVideo-realestate" id="subtitle"]] +[[!template text="oh my god, look at that," start="00:13:44.657" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a new buffer just for editing," start="00:13:47.690" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and each formula is in its own line to make" start="00:13:49.990" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it easier, which is beautiful!" start="00:13:52.699" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, let's just say I want to do another calculation." start="00:13:54.724" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's do eight times eight, which should be 64," start="00:13:58.815" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and we have no need of putting this flag" start="00:14:02.707" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because the flag only affects it on the input coming in." start="00:14:04.741" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I should have mentioned that earlier." start="00:14:07.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Only input coming in." start="00:14:09.174" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There is ways to affect the output," start="00:14:10.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which we'll also cover in this topic later on," start="00:14:13.274" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but for now, you can either leave the end flag" start="00:14:16.574" video="mainVideo-realestate" id="subtitle"]] +[[!template text="or leave it out. It will still work fine." start="00:14:19.231" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's just leave it out for now." start="00:14:21.991" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's just do C-c C-c to make sure" start="00:14:23.508" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that everything is working." start="00:14:26.625" video="mainVideo-realestate" id="subtitle"]] +[[!template text="64. Beautiful." start="00:14:28.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So there you have it. You can have multiple formulas" start="00:14:30.790" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just stacked up into one line," start="00:14:33.166" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and whenever you need to edit it," start="00:14:34.878" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just go into that into that line" start="00:14:36.391" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and "C-c ,", and tada!" start="00:14:38.357" video="mainVideo-realestate" id="subtitle"]] +[[!template text="You have this ready, good to go, and for editing." start="00:14:41.124" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Oh and if you want to exit out," start="00:14:44.450" video="mainVideo-realestate" id="subtitle"]] +[[!template text="also just do "C-c ," again and you're back." start="00:14:45.825" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I did not mention that. Sweet!" start="00:14:49.040" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So now we know how to have" start="00:14:51.990" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a better editing experience. Sweet!" start="00:14:54.775" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So now comes the formatting section which I talked about." start="00:14:57.106" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So what's the first step?" start="00:15:00.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well for formatting, Org mode uses" start="00:15:01.974" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the printf function from C." start="00:15:05.508" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So those who are familiar with C," start="00:15:08.674" video="mainVideo-realestate" id="subtitle"]] +[[!template text="you'll feel right at home because the way you format it" start="00:15:10.375" video="mainVideo-realestate" id="subtitle"]] +[[!template text="is exactly the same way." start="00:15:12.923" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So for example, this will print off" start="00:15:14.040" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a floating number with two decimal points." start="00:15:16.558" video="mainVideo-realestate" id="subtitle"]] +[[!template text="As you can see here, this is how you will use it." start="00:15:18.973" video="mainVideo-realestate" id="subtitle"]] +[[!template text="It will be after the semicolon and it will be "%.2f"." start="00:15:21.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's go ahead and test that out." start="00:15:26.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Actually, let's go ahead to our latest function--" start="00:15:28.158" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I mean, to our latest formula." start="00:15:30.690" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's go ahead to the nicer buffer" start="00:15:32.440" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and let's do, Ctrl... Let's enter the semicolon," start="00:15:33.841" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then let's put the percent sign, we do 2f." start="00:15:39.208" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Actually, let's make it five" start="00:15:45.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just to differentiate from the formula, and let's see." start="00:15:49.175" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let's run it, and tada!" start="00:15:52.690" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So yeah, as you can see, five decimal points." start="00:15:57.274" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and if we want zero decimal points, we can also" start="00:16:00.180" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just move point zero, and tada!" start="00:16:01.957" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Just like that." start="00:16:05.057" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We can also just leave it as is how it was before," start="00:16:06.224" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because before, we didn't even actually need it," start="00:16:08.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but yeah, just an example." start="00:16:10.875" video="mainVideo-realestate" id="subtitle"]] +[[!template text="And just a reminder, there are" start="00:16:13.114" video="mainVideo-realestate" id="subtitle"]] +[[!template text="plenty more ways of formatting," start="00:16:15.091" video="mainVideo-realestate" id="subtitle"]] +[[!template text="just look at the documentation." start="00:16:17.358" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There will be more. Basically every single thing" start="00:16:19.740" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that you need, just use the documentation as reference." start="00:16:21.725" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Cool! So now we know how to debug," start="00:16:25.674" video="mainVideo-realestate" id="subtitle"]] +[[!template text="how to write formulas" start="00:16:28.341" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and how to get a better, nicer editing buffer" start="00:16:29.775" video="mainVideo-realestate" id="subtitle"]] +[[!template text="for the formula so we don't have to do it all" start="00:16:32.825" video="mainVideo-realestate" id="subtitle"]] +[[!template text="in a single line." start="00:16:35.125" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So, what about conditional prompts, like I was" start="00:16:36.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="showing in the first table in the end goal?" start="00:16:38.757" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well that's actually pretty simple because we already" start="00:16:43.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="know how to do this." start="00:16:47.300" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Yes, if you think about it for a second, if we are" start="00:16:48.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="able to pull lisp s-expressions, then we are able to" start="00:16:51.233" video="mainVideo-realestate" id="subtitle"]] +[[!template text="basically do it already. Here's an example." start="00:16:54.321" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We're saying if the second column is empty, is zero--" start="00:16:56.390" video="mainVideo-realestate" id="subtitle"]] +[[!template text="so actually, this should be with the N flag" start="00:17:01.907" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because we will transform empty values as zero," start="00:17:04.620" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and that's how Org mode will read those." start="00:17:07.040" video="mainVideo-realestate" id="subtitle"]] +[[!template text="It's saying if the second flag is zero," start="00:17:08.820" video="mainVideo-realestate" id="subtitle"]] +[[!template text="then I want you to put "Enter the values."" start="00:17:12.425" video="mainVideo-realestate" id="subtitle"]] +[[!template text="And if it's not empty, we're going to put" start="00:17:17.052" video="mainVideo-realestate" id="subtitle"]] +[[!template text=""Values entered." We're going to recognize." start="00:17:20.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's go ahead and actually do this." start="00:17:22.290" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's grab this, and let's type it in." start="00:17:24.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's go ahead. "Enter the values," because it" start="00:17:29.090" video="mainVideo-realestate" id="subtitle"]] +[[!template text="doesn't have any." start="00:17:36.557" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's go ahead and say "Hello EmacsConf"" start="00:17:37.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and let's go ahead and run it again." start="00:17:42.441" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Since there are values," start="00:17:47.324" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it's going to overwrite what's here and put value entered." start="00:17:48.458" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's go ahead." start="00:17:51.674" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Tada, so there you go." start="00:17:53.498" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So that is pretty much how you do conditional props," start="00:17:55.790" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is pretty straightforward" start="00:18:00.624" video="mainVideo-realestate" id="subtitle"]] +[[!template text="once you think about it" start="00:18:01.941" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because if you are able to insert Lisp expressions," start="00:18:02.725" video="mainVideo-realestate" id="subtitle"]] +[[!template text="then you are able to just do that check" start="00:18:05.441" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and do the conditional check yourself." start="00:18:08.241" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, custom formulas." start="00:18:11.174" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="Yeah, you'll see what I mean." start="00:18:13.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We want to be able to put our own custom functions," start="00:18:15.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and you probably have an idea how to do this already." start="00:18:20.024" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Yes, we also know how to do this already." start="00:18:23.990" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Before I continue, I'm going to say that I already" start="00:18:27.060" video="mainVideo-realestate" id="subtitle"]] +[[!template text="have some formulas that I use" start="00:18:30.457" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which are not part of this talk" start="00:18:31.941" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because they're just functions that calculate some stuff." start="00:18:33.375" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So for example, they calculate the monthly mortgage," start="00:18:37.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the monthly PMI, property tax, homeowners insurance," start="00:18:40.090" video="mainVideo-realestate" id="subtitle"]] +[[!template text="so a bunch of other stuff." start="00:18:43.357" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I have these functions already and they are a bit off," start="00:18:44.857" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but for this example, they're doing everything." start="00:18:49.829" video="mainVideo-realestate" id="subtitle"]] +[[!template text="It's close enough, so don't worry too much." start="00:18:52.312" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Just an example, you can have your own function" start="00:18:54.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="that does something else like calculate" start="00:18:56.924" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a REI B rental or something like that." start="00:18:59.313" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So you can do whatever you want." start="00:19:01.640" video="mainVideo-realestate" id="subtitle"]] +[[!template text="As long as you can call via Lisp," start="00:19:03.220" video="mainVideo-realestate" id="subtitle"]] +[[!template text="you can call it in Org mode, in the table formulas." start="00:19:04.824" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's exit out of there." start="00:19:07.900" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Now that we know how to do everything," start="00:19:11.437" video="mainVideo-realestate" id="subtitle"]] +[[!template text="let me go back to the original table and go from there." start="00:19:13.808" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Let me close all these out actually." start="00:19:21.024" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Now let's go back and revisit this table," start="00:19:26.624" video="mainVideo-realestate" id="subtitle"]] +[[!template text="since we'll be much, much more familiar" start="00:19:29.624" video="mainVideo-realestate" id="subtitle"]] +[[!template text="except for one thing, which I will explain." start="00:19:31.620" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So we have the constants right there" start="00:19:35.518" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and we have the house prices" start="00:19:38.041" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and we have everything just like I mentioned before." start="00:19:39.691" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The main part that we want to look at" start="00:19:42.500" video="mainVideo-realestate" id="subtitle"]] +[[!template text="is the table formula." start="00:19:44.123" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So let's open up our special editing buffer," start="00:19:45.124" video="mainVideo-realestate" id="subtitle"]] +[[!template text=""C-c ,"," start="00:19:47.574" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and as you can see, I have some right here." start="00:19:49.774" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, the fifth column I'm saying," start="00:19:52.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text=""Hey, we're gonna call this function" start="00:19:53.624" video="mainVideo-realestate" id="subtitle"]] +[[!template text="rei-calculate-down-payment, and I'm gonna" start="00:19:55.924" video="mainVideo-realestate" id="subtitle"]] +[[!template text="pass in the third column and fourth column" start="00:19:58.657" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and I'm going to pass in t." (true)" start="00:20:00.758" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I believe this is just to normalize," start="00:20:02.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to convert to the proper decimal place," start="00:20:07.174" video="mainVideo-realestate" id="subtitle"]] +[[!template text="so let's not worry too much about that." start="00:20:12.157" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Then for the sixth column, we're going to say" start="00:20:14.179" video="mainVideo-realestate" id="subtitle"]] +[[!template text=""I calculate the monthly mortgage."" start="00:20:16.790" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We're going to pass in the third column" start="00:20:18.145" video="mainVideo-realestate" id="subtitle"]] +[[!template text="the INTEREST_RATE, which we have" start="00:20:20.224" video="mainVideo-realestate" id="subtitle"]] +[[!template text="defined over here in the constants." start="00:20:21.439" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The 30, I believe this is for 30 years," start="00:20:22.980" video="mainVideo-realestate" id="subtitle"]] +[[!template text="PMI, the PROPERTY_TAX and HOME_INSURANCE," start="00:20:26.374" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then the fourth column." start="00:20:29.423" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Then everything is going to be accepted as numbers," start="00:20:30.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and we're going to have two decimals" start="00:20:33.924" video="mainVideo-realestate" id="subtitle"]] +[[!template text="at the end of the place." start="00:20:35.174" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, what else?" start="00:20:36.274" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Over here is where we have our conditionals." start="00:20:37.607" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We're saying, "hey, if the seventh column is 0," start="00:20:40.174" video="mainVideo-realestate" id="subtitle"]] +[[!template text="press 'Enter Tenant Income'."" start="00:20:42.374" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Over here as well, if the seventh column is zero," start="00:20:44.402" video="mainVideo-realestate" id="subtitle"]] +[[!template text="we're going to press 'Enter Tenant Income'" start="00:20:48.507" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and for this one we're going to say," start="00:20:51.824" video="mainVideo-realestate" id="subtitle"]] +[[!template text=""Hey, we're going to normalize the price."" start="00:20:53.705" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I believe this is a 1% rule." start="00:20:56.040" video="mainVideo-realestate" id="subtitle"]] +[[!template text="This could have been extracted into a function," start="00:20:59.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but I just did the calculation right here." start="00:21:01.490" video="mainVideo-realestate" id="subtitle"]] +[[!template text="This, I believe, is the ROI, 12 months." start="00:21:04.239" video="mainVideo-realestate" id="subtitle"]] +[[!template text="This is just calculating the cash flow." start="00:21:07.990" video="mainVideo-realestate" id="subtitle"]] +[[!template text="This is a very rudimentary function or formula." start="00:21:11.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Do not use this because there is way more" start="00:21:15.407" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to go into calculating the cash flow" start="00:21:16.733" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and also, it differs from person to person." start="00:21:18.841" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Some people are more conservative," start="00:21:21.599" video="mainVideo-realestate" id="subtitle"]] +[[!template text="other people are way more liberal, so it just" start="00:21:23.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="depends how you want to calculate it." start="00:21:26.960" video="mainVideo-realestate" id="subtitle"]] +[[!template text="As you can see, we have the N flag for numeric number" start="00:21:28.974" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and then we're saying we're formatting" start="00:21:34.241" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to one decimal place." start="00:21:36.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="The %% sign is just to input a percent sign as itself." start="00:21:37.794" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Otherwise, Org mode is going to think" start="00:21:43.208" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it's some type of a formatter, which it's not." start="00:21:45.420" video="mainVideo-realestate" id="subtitle"]] +[[!template text="If you do... As I mentioned," start="00:21:48.040" video="mainVideo-realestate" id="subtitle"]] +[[!template text="if you've used the printf function in C or C++," start="00:21:49.240" video="mainVideo-realestate" id="subtitle"]] +[[!template text="then you probably know how to use it." start="00:21:51.790" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Okay, so this is pretty much everything in a nutshell." start="00:21:55.607" video="mainVideo-realestate" id="subtitle"]] +[[!template new="1" text="So, one thing that I do want to say" start="00:22:01.924" video="mainVideo-realestate" id="subtitle"]] +[[!template text="is the last section," start="00:22:05.070" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is automatically updating," start="00:22:06.479" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is the part that blew my mind" start="00:22:07.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="when I realized that Org Mode can do this." start="00:22:10.175" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So how do we do it?" start="00:22:11.557" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Well, you probably guessed just from looking at" start="00:22:12.577" video="mainVideo-realestate" id="subtitle"]] +[[!template text="at the first table that we have right now." start="00:22:14.660" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We add a column at the beginning" start="00:22:18.424" video="mainVideo-realestate" id="subtitle"]] +[[!template text="of the table with a percent (%)--" start="00:22:20.874" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I'm sorry, with the pound sign (#)" start="00:22:22.957" video="mainVideo-realestate" id="subtitle"]] +[[!template text="or hashtag as the younger kids call it." start="00:22:24.957" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So this is what we do." start="00:22:28.557" video="mainVideo-realestate" id="subtitle"]] +[[!template text="We added a column at the beginning of the" start="00:22:31.145" video="mainVideo-realestate" id="subtitle"]] +[[!template text="table, we do pound sign (#)." start="00:22:32.820" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So this is what it's for." start="00:22:35.084" video="mainVideo-realestate" id="subtitle"]] +[[!template text="This lets Org mode know that "hey," start="00:22:35.890" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I want the values, the table formulas," start="00:22:38.840" video="mainVideo-realestate" id="subtitle"]] +[[!template text="to automatically run on each tab change."" start="00:22:41.240" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Now I believe that you can make it so that" start="00:22:44.057" video="mainVideo-realestate" id="subtitle"]] +[[!template text="it changes, so that it updates on every keystroke." start="00:22:46.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I think that's too much." start="00:22:49.223" video="mainVideo-realestate" id="subtitle"]] +[[!template text="And then you can also make it so that" start="00:22:51.124" video="mainVideo-realestate" id="subtitle"]] +[[!template text="only certain rows update or certain columns." start="00:22:53.107" video="mainVideo-realestate" id="subtitle"]] +[[!template text="There's a plethora of things that you can do." start="00:22:56.020" video="mainVideo-realestate" id="subtitle"]] +[[!template text="You should definitely read up on the documentation," start="00:22:58.319" video="mainVideo-realestate" id="subtitle"]] +[[!template text="because you will probably make a way better talk," start="00:23:01.024" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a way more advanced talk than I on this one," start="00:23:03.525" video="mainVideo-realestate" id="subtitle"]] +[[!template text="so I'm looking forward for that." start="00:23:07.074" video="mainVideo-realestate" id="subtitle"]] +[[!template text="But this is essentially how you build" start="00:23:09.674" video="mainVideo-realestate" id="subtitle"]] +[[!template text="a Org mode table formula that will help you know" start="00:23:12.460" video="mainVideo-realestate" id="subtitle"]] +[[!template text="if a property is correct." start="00:23:15.508" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So, let's go ahead and as a final out to this demo," start="00:23:17.225" video="mainVideo-realestate" id="subtitle"]] +[[!template text="let's go ahead and enter a new column." start="00:23:22.440" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Org-mode automatically puts the pound sign (#)," start="00:23:25.420" video="mainVideo-realestate" id="subtitle"]] +[[!template text="which is awesome, and let's just say 'Emacs House'," start="00:23:30.274" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and let's say it is 100k." start="00:23:35.540" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So 100k, and as you can see it's already trying to" start="00:23:39.690" video="mainVideo-realestate" id="subtitle"]] +[[!template text="calculate the monthly mortgage," start="00:23:44.340" video="mainVideo-realestate" id="subtitle"]] +[[!template text="but we'll see about that," start="00:23:46.140" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and let's just put 10% down." start="00:23:47.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So 10% of 100k should be 10,000." start="00:23:49.880" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So 10,000, correct, and the monthly mortgage is that" start="00:23:53.157" video="mainVideo-realestate" id="subtitle"]] +[[!template text="and let's just say the tenant income is," start="00:23:56.408" video="mainVideo-realestate" id="subtitle"]] +[[!template text="as you can see right here," start="00:24:00.190" video="mainVideo-realestate" id="subtitle"]] +[[!template text="tenant income is, let's say 1500." start="00:24:01.757" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Is it passing the 1% rule?" start="00:24:05.974" video="mainVideo-realestate" id="subtitle"]] +[[!template text="Yep! What's my ROI?" start="00:24:07.374" video="mainVideo-realestate" id="subtitle"]] +[[!template text="118%, which is kind of cool actually." start="00:24:09.524" video="mainVideo-realestate" id="subtitle"]] +[[!template text="That's a nice deal." start="00:24:13.880" video="mainVideo-realestate" id="subtitle"]] +[[!template text="So this is a rudimentary way of" start="00:24:14.907" video="mainVideo-realestate" id="subtitle"]] +[[!template text="calculating deals in Org mode." start="00:24:17.757" video="mainVideo-realestate" id="subtitle"]] +[[!template text="I hope you found it interesting, and yeah, that is it." start="00:24:20.419" video="mainVideo-realestate" id="subtitle"]] + + Questions or comments? Please e-mail [gopardaniel@gmail.com](mailto:gopardaniel@gmail.com?subject=Comment%20for%20EmacsConf%202022%20realestate%3A%20Real%20estate%20and%20Org%20table%20formulas) diff --git a/2022/info/realestate-before.md b/2022/info/realestate-before.md index f7cf2bb4..3cd25bb5 100644 --- a/2022/info/realestate-before.md +++ b/2022/info/realestate-before.md @@ -10,9 +10,38 @@ The following image shows where the talk is in the schedule for Sat 2022-12-03. Format: 25-min talk followed by pad Q&A (#emacsconf-gen) Etherpad: Discuss on IRC: [#emacsconf-gen](https://chat.emacsconf.org/?join=emacsconf,emacsconf-gen) -Status: Talk captioned +Status: Now playing on the conference livestream
Times in different timezones:
Saturday, Dec 3 2022, ~2:15 PM - 2:40 PM EST (US/Eastern)
which is the same as:
Saturday, Dec 3 2022, ~1:15 PM - 1:40 PM CST (US/Central)
Saturday, Dec 3 2022, ~12:15 PM - 12:40 PM MST (US/Mountain)
Saturday, Dec 3 2022, ~11:15 AM - 11:40 AM PST (US/Pacific)
Saturday, Dec 3 2022, ~7:15 PM - 7:40 PM UTC
Saturday, Dec 3 2022, ~8:15 PM - 8:40 PM CET (Europe/Paris)
Saturday, Dec 3 2022, ~9:15 PM - 9:40 PM EET (Europe/Athens)
Sunday, Dec 4 2022, ~12:45 AM - 1:10 AM IST (Asia/Kolkata)
Sunday, Dec 4 2022, ~3:15 AM - 3:40 AM +08 (Asia/Singapore)
Sunday, Dec 4 2022, ~4:15 AM - 4:40 AM JST (Asia/Tokyo)
Find out how to watch and participate
+[[!template id="vid" vidid="realestate-mainVideo" src="https://media.emacsconf.org/2022/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.webm" poster="https://media.emacsconf.org/2022/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.png" captions="""""" +size="52M" duration="24:25" other_resources="""[Download .webm (51MB)](https://media.emacsconf.org/2022/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar.webm) +[Download --main.webm (52MB)](https://media.emacsconf.org/2022/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.webm) +[Download --main.vtt](https://media.emacsconf.org/2022/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main.vtt) +[Download --main--chapters.vtt](https://media.emacsconf.org/2022/emacsconf-2022-realestate--real-estate-and-org-table-formulas--daniel-gopar--main--chapters.vtt) +[View transcript](https://emacsconf.org/2022/talks/realestate#realestate-mainVideo-transcript) +[View on Toobnix](https://toobnix.org/w/wNqs2ukhcQwCzUkar2bq55) +"""]] +[[!template id="chapters" vidid="realestate-mainVideo" data=""" +00:00:00.000 Introduction +00:20.480 The end goal +00:51.800 Constants and variables +02:11.520 ROI +02:40.040 Demo +03:32.240 Detecting input +04:02.240 Creating a table +04:26.400 C-c C-c +05:17.960 Our first formula +07:13.000 Basic arithmetic +08:11.720 Debugging +09:53.600 Flags +12:07.040 Recalculating +12:50.040 Multiple formulas +14:56.777 Formatting +16:36.202 Conditional prompts +18:12.203 Custom formulas +21:57.857 Automatically updating + +"""]] # Description -- cgit v1.2.3