freenode/#sicl - IRC Chatlog
Search
4:48:58
no-defun-allowed
How would you manage multiple disks and removable disks in CLOSOS? The best solution I can think of is to give each disk an offset and rewrite addresses in the object store to be added to that offset, but that wouldn't allow cross-disk references.
4:51:36
beach
So you then need to decide how the stuff on the removable disk is to be presented to the rest of the system.
4:52:43
beach
In the chapter I just wrote, I don't consider that situation, though that situation has to be taken care of at some point of course.
4:54:35
no-defun-allowed
Also, I am now at the point in my assessment project where I will start interviewing people for opinions on the bookkeeping program.
4:55:37
beach
You know my schedule, right? Today I have lunch guests. Wednesday morning, I cook for my favorite coauthor. Thursday I travel to Italy.
4:55:38
no-defun-allowed
Do you know much about bookkeeping? I will probably partition my subjects into people knowledgeable about bookkeeping and accounting and those that are not, and people knowledgeable about using computer programs, and those that aren't.
4:59:01
no-defun-allowed
Well, is there a time I should not interview before? I don't want to be too early, though you are up early.
5:09:32
beach
There are some particular end-of-year manipulations that you might want to look into, perhaps before our interview, because I don't remember them. It is where the annual revenue is transferred to the capital account for the next year.
5:13:27
no-defun-allowed
Also, I need to include some form of complex algorithm. The teacher suggested writing a sort function to the class, but I'm not sure how applicable that would be, and a lazy implementation of Quicksort would be less than ten lines.
5:16:44
no-defun-allowed
I was thinking about adding rudimentary (probably similar to LZ77) compression to the Compta format. I asked the teacher about this, and he said it would be a very good algorithm and would also be beneficial for "efficiency".
5:18:02
beach
It does seem that your teacher insists on all the premature (and unnecessary) optimizations in the book, but hey, if that is what it takes to make it a project, so be it.
5:19:19
no-defun-allowed
Sure, it's probably not necessary given that we have drives that can store those databases millions of times over, even in inefficient s-expression format.
5:20:37
beach
That, and you should (in my opinion of course) learn to make quick back-of-envelope calculations. In this case, take a huge corporation, estimate how many transactions are made per time unit, multiply by the remaining expected lifetime of humanity.
5:21:29
beach
You can estimate the number of transactions by the typing speed of a person and the number of people in the corporation entering financial transactions.
5:22:28
beach
A lot of human endeavor is wasted by vastly incorrect intuitions about the resources required for some particular feature.
5:23:49
beach
One of the latest ones I was exposed to was when I announced that all the source code of SICL would be present as (uncompressed Unicode) text strings in the executable, and the reaction I got was that it would be unacceptably large.
5:24:31
beach
But my solution is simpler than trying to keep track of file paths and trying to make sure the version on disk corresponds to the executable in memory.
5:25:49
beach
I have (apparently) learned to have a constantly executing process in my brain that does back-of-envelope calculations, and it runs wild when I watch the news on TV.
5:26:05
no-defun-allowed
If we have a corporation with 100 accountants, each able to type 80wpm (where a word is 5 characters on average), working for 10 hours a day constantly entering transactions, with 330 working days in the year, and our format uses twice as many characters as the accountants enter, then we'll only produce 15.8 gigabytes of data a year I think.
5:27:34
beach
For back-of-envelope calculations, you can round things to multiples of 10 or 100, no problem.
5:32:47
beach
The key here is to then say "and I grossly over-estimated all the figures, so the real value is much lower", as opposed to "oh, my, that's significant" as most people would then say.
5:33:30
beach
But, yes, include such calculations in your project presentation, assuming you need to write one of those.
5:34:48
beach
And the cost of that RAM should be compared to the time spent writing and maintaining the compression algorithm.
5:35:39
beach
If you can learn this skill, and apply it consistently, you will be a great engineer some day.
5:36:46
beach
The other day, it was announced that the EU had given 10M€ to the victims of the cyclone in Africa.
5:37:57
beach
And the reporter should have added (but was unable to do so) "and this amount represents 0.01€ per EU citizen, and it will help only around 100 people to rebuild, so SHAME ON YOU EU."
5:40:50
beach
Or this one "If we would fix all the dripping faucets in France, we could save 100M liters of water each year".
5:41:29
beach
Let's see, that's 2 liters per person per year. How about flushing the toilet one fewer times per year. Then you save twice that.
5:42:01
beach
Or turn the water in the shower off while you put soap on your body. Then you will save 10 times that.
5:42:38
no-defun-allowed
Maybe people just forget that they are dealing with statistics that apply to millions of people, and that they should be mentally removing zeroes to balance it out.
5:43:59
beach
I once spent an entire lecture (1 hour and 20 minutes) on the answer by one student on a single exam question.
5:44:55
beach
I divided by Giga first, then by the population of the planet, then by the price per GB.
5:45:15
beach
The result was that the budget of each person on the planet would be greater than that of all combined nations in the world.
5:45:58
no-defun-allowed
Well, that might fit into the observable universe, if you can store each byte in less than 1000 atoms.
5:47:06
no-defun-allowed
That gives me an idea. I wrote an essay arguing about how static programming languages and other forms of overoptimisation are probably a waste of time (not news to us Lispers, but I got bored of the static programmers on a website I like reading), but I never figured how much of a waste it is.
6:02:46
no-defun-allowed
So, in this problem, there are two values I'd like to solve for: how many times does this program have to be run before the wasted time is greater than the time the programmer didn't have to take optimising, and at what point does solving the problem with more hardware become more expensive than more programmer time?
6:04:44
no-defun-allowed
The second is harder to solve, as the ratio between processing power and price usually isn't constant.
6:19:58
beach
Sometimes, figures like that can be reduced to a single comparison that a decision maker must decide upon using experience and "gut feeling".
6:20:48
no-defun-allowed
I had a go at making some estimations. For the first problem, if it takes 100 hours to write the program, then another 100 to "optimise" it, making it 25% faster, and user's sessions are 30 minutes long on average, then it would take 800 sessions for the optimisations to pay off in time.
6:22:17
no-defun-allowed
For the second, I arbitrarily chose the difference between the Ryzen 1600 and 1700 processors, as they are about 25% apart in performance, and $40 different in price. If the programmer is paid $30 an hour, then you'd need more than 75 users per programmer for more money to be "wasted" on hardware than on programmer time.
6:23:58
no-defun-allowed
Though, I suppose that ratio isn't as large as I would have liked for an argument. If such a thing happened with SICL, then you would need less than 1,350 users for it to be a waste of time.
6:27:11
beach
I forget the documented ratios of maintenance to initial code, but as I recall, maintenance dominates by an order of magnitude.
6:27:44
beach
This is my endless argument for SICL. I want to avoid special-purpose code as much as possible so as to cut down on maintenance.
8:44:47
no-defun-allowed
Oh, I remember https://xkcd.com/1205/ now, which is a relevant table about how much time you should spend on saving time.