generated from Apexal/revealjs-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
722 lines (617 loc) · 30 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>How QuACS Works</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/night.css" id="theme">
<link rel="stylesheet" href="dist/custom.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h3>What goes into making QuACS?</h3>
<p>Solving self-imposed problems for fun and profit</p>
<aside class="notes">
ELi
</aside>
</section>
<section>
<h3>The source for this presentation is available <a href="https://github.com/quacs/presentations">here</a></h3>
<aside class="notes">
ELi
</aside>
</section>
<section>
<section>
<h2>What is QuACS?</h2>
<p>QuACS is a course scheduling tool to help students pick which courses to register.</p>
<aside class="notes">
Ben
</aside>
</section>
<section>
<h2>Key features:</h2>
<ul>
<li>Automatic schedule generation</li>
<li>Conflicting course detection</li>
<li>Automatic prerequisite checking</li>
<li>Up-to-date data</li>
<li>View past semesters</li>
</ul>
<aside class="notes">
Ben
<ul>
<li>Automatic schedule generation based on which sections you have selected</li>
<ul>
<li>If there are multiple possible schedules, we'll show all of them.</li>
</ul>
<li>QuACS will automatically check if a course can be added to any possible schedule</li>
<li>Automatic prerequisite checking</li>
<li>Up-to-date data</li>
<li>View past semesters</li>
</ul>
</aside>
</section>
<section>
<h2>Our goals</h2>
<ul>
<li>Always up-to-date data</li>
<li>Zero maintenance</li>
<li>Mobile-first</li>
<li>Open data availablity</li>
<li>Above all else, it must be fast</li>
</ul>
<aside class="notes">
Ben
<ul>
<li>Always up-to-date data - it's useless if courses are missing/out of date</li>
<li>Zero maintenance - don't want the site to randomly be down, don't want to have to support it post graduation</li>
<li>Mobile-first</li>
<li>Open data availablity - let people use our data for their own projects/schedulers</li>
<li>Above all else, it must be fast - there's no excuse for being slow</li>
</ul>
</aside>
</section>
<section>
<h2>Analytics</h2>
<a href="https://stats.quacs.org/">All analytics are publicly available</a>
<p><br /></p>
<div class="columns">
<div class="col">
<h4>Overall since November 2020</h4>
<p>19.2k total visitors</p>
<p>382k page views</p>
</div>
<div class="col">
<h4>Best day: November 9, 2020</h4>
<p>2,000 unique visitors</p>
<p>41.8k page views</p>
</div>
</div>
<aside class="notes">
Ben
Peak around course registration
</aside>
</section>
<section data-background-iframe="https://stats.quacs.org/" data-background-interactive>
<aside class="notes">
Ben
<ul>
<li>All data is easily accessible</li>
<li>You can view which actions are most popular (show events)</li>
</ul>
</aside>
</section>
</section>
<section>
<h2>History of QuACS</h2>
<p>Initial plan: April Fools joke for the <a href="https://discord.gg/rpi">RPI Academic Discord Server</a></p>
<p>March 2020: Old QuACS</p>
<p>June 2020: Modern QuACS</p>
<p>October 2020: Previous semesters are added</p>
<p>January 2021: QuACS joins RCOS</p>
<p>February 2021: Arch support</p>
<aside class="notes">
ELi
QuACS was developed during free time while devs had jobs/classes/other projects.
</aside>
</section>
<section>
<section>
<h2>Website implementation</h2>
<aside class="notes">
ELi
</aside>
</section>
<section>
<h2>Frontend technologies</h2>
<p>Vue.js</p>
<p>QuACS is a <span style="color: #00CC00">Progressive Web App</span></p>
<ul>
<li>Installable as an application</li>
<li>Fully functional offline</li>
</ul>
<aside class="notes">
ELi
Talk about what PWAs are
</aside>
</section>
<section>
<h2>Analytics</h2>
<a href="https://umami.is">https://umami.is</a>
<p>Privacy focused</p>
<p>Self hosted</p>
<p>Tracks unique sessions, page views, and events</p>
<p>Analytics helps us drive design choices</p>
<aside class="notes">
ELi
All anonymized data
Easy to opt-out
Self hosted = no one stealing your data
Design choices: talk about CRN copying
</aside>
</section>
</section>
<section>
<section data-auto-animate>
<h2>Course conflict algorithm</h2>
<p>Problem: Given some selected courses, can you mark which courses can still be registered for without conflicts?</p>
<br />
<p>Sounds simple, right?</p>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h2>Course conflict algorithm</h2>
<p>Problem: Given some selected courses, can you mark which courses can still be registered for without conflicts?</p>
<br />
<p>What if the user has selected multiple sections from each of their courses?</p>
<aside class="notes">
Ben
</aside>
</section>
<section>
<h2>How about an example?</h2>
</section>
<section data-auto-animate>
<h2>Course conflict example</h2>
<p>I've selected up for these sections.</p>
<ul>
<li>Course A: S1 S2 <span style="opacity: 0%">S3</span></li>
<li>Course B: S1 S2 S3</li>
</ul>
<p>Can I select these sections?</p>
<ul>
<li>Course C: <span style="opacity: 0%">S0</span> S1 S2</li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h2>Course conflict example</h2>
<p>I've selected up for these sections.</p>
<p>Yes!</p>
<ul>
<li>Course A: <span class="fragment highlight-current-green" data-fragment-index="1"><span class="fragment highlight-current-green" data-fragment-index="2">S1</span></span> <span class="fragment highlight-green" data-fragment-index="3">S2</span> <span style="opacity: 0%">S3</span></li>
<li>Course B: <span class="fragment highlight-green" data-fragment-index="3">S1</span> <span class="fragment highlight-current-green" data-fragment-index="1">S2</span> <span class="fragment highlight-current-green" data-fragment-index="2">S3</span></li>
<li>Course C: <span style="opacity: 0%">S0</span> <span class="fragment highlight-current-green" data-fragment-index="2">S1</span> <span class="fragment highlight-current-green" data-fragment-index="1"><span class="fragment highlight-current-green" data-fragment-index="3">S2</span></span></li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h2>Course conflict example</h2>
<p>I've signed up for these sections.</p>
<ul>
<li>Course A: S1 S2 <span style="opacity: 0%">S3</span></li>
<li>Course B: S1 S2 S3</li>
<li>Course C: <span style="opacity: 0%">S0</span> S1 S2</li>
</ul>
<p>Can I add this one now?</p>
<ul>
<li>Course D: <span style="opacity: 0%">S1</span> S1 <span style="opacity: 0%">S2</span></li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h2>Course conflict example</h2>
<p>I've signed up for these sections.</p>
<ul>
<li>Course A: <span class="fragment highlight-current-green" data-fragment-index="1"><span class="fragment highlight-current-green" data-fragment-index="2">S1</span></span> <span class="fragment highlight-red" data-fragment-index="3">S2</span> <span style="opacity: 0%">S3</span></li>
<li>Course B: <span class="fragment highlight-green" data-fragment-index="3">S1</span> <span class="fragment highlight-current-red" data-fragment-index="1">S2</span> <span class="fragment highlight-current-green" data-fragment-index="2">S3</span></li>
<li>Course C: <span style="opacity: 0%">S0</span> <span class="fragment highlight-current-red" data-fragment-index="2">S1</span> <span class="fragment highlight-current-green" data-fragment-index="1"><span class="fragment highlight-green" data-fragment-index="3">S2</span></span></li>
</ul>
<p>No!</p>
<ul>
<li>Course D: <span style="opacity: 0%">S1</span> <span class="fragment highlight-red" data-fragment-index="1">S1</span> <span style="opacity: 0%">S2</span></li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
</section>
<section>
<section>
<h2>Course conflict algorithm</h2>
<ol>
<li>Generate all valid schedules (use DFS)</li>
<ul>
<li>Each level is a course</li>
<li>Each branch is a section of that course</li>
<li>Check each section against every time block of every other section in the schedule</li>
</ul>
<br />
<li>Does the course/section we're checking work in at least one of the schedules?</li>
</ol>
<aside class="notes">
ELi
</aside>
</section>
<section>
<p>This takes a while! Imagine the poor freshman who has every section of CS1, Calc 1, and Chem 1 selected :(</p>
<aside class="notes">
ELi
</aside>
</section>
<section data-auto-animate>
<h2>Can we mitigate the runtime?</h2>
<ul>
<li>Use our RPI education to come up with a fundamentally better algorithm</li>
<li>Only check a few schedules</li>
<li>Pre-compute which sections conflict with each other</li>
<li>Write it in Rust</li>
<li>If all else fails, upgrade the server</li>
</ul>
<aside class="notes">
ELi
</aside>
</section>
<section data-auto-animate>
<ul>
<li>Use our RPI education to come up with a fundamentally better algorithm</li>
</ul>
<br />
<p>Despite <a href="http://kryten.mm.rpi.edu/scb_pnp_solved22.pdf">Professor Bringsjord's "proof" of P=NP</a>, we've been unable to show it in practice</p>
<br />
<p class="fragment">There isn't a fundamentally faster algorithm</p>
<br />
<p class="fragment">Please: If you can figure this one out, let us know</p>
<aside class="notes">
Eli
Mention that we've spoken to a lot of people about this
</aside>
</section>
<section data-auto-animate>
<h2>Can we mitigate the runtime?</h2>
<ul>
<li style="color: red"><s>Use our RPI education to come up with a fundamentally better algorithm</s></li>
<li>Only check a few schedules</li>
<li>Pre-compute which sections conflict with each other</li>
<li>Write it in Rust</li>
<li>If all else fails, upgrade the server</li>
</ul>
<aside class="notes">
ELi
</aside>
</section>
<section data-auto-animate>
<ul>
<li>Only check a few schedules</li>
</ul>
<br />
<p class="fragment">If a course doesn't work in the first N schedules, it probably doesn't work at all</p>
<br />
<p class="fragment">Might be good enough for some course schedulers 😉</p>
<br />
<h3 class="fragment">Not good enough for QuACS</h3>
</section>
<section data-auto-animate>
<h2>Can we mitigate the runtime?</h2>
<ul>
<li style="color: red"><s>Use our RPI education to come up with a fundamentally better algorithm</s></li>
<li style="color: red"><s>Only check a few schedules</s></li>
<li>Pre-compute which sections conflict with each other</li>
<li>Write it in Rust</li>
<li>If all else fails, upgrade the server</li>
</ul>
<aside class="notes">
ELi
</aside>
</section>
<section data-auto-animate>
<ul>
<li>Pre-compute which sections conflict with each other</li>
</ul>
<br />
<p>We won't have to check if two sections overlap (That was the nested loop in our DFS)</p>
<p>This makes the algorithm a lot faster!</p>
<p>It takes up a bit more memory, but compresses well</p>
<aside class="notes">
ELi
</aside>
</section>
<section data-auto-animate>
<h2>Can we mitigate the runtime?</h2>
<ul>
<li style="color: red"><s>Use our RPI education to come up with a fundamentally better algorithm</s></li>
<li style="color: red"><s>Only check a few schedules</s></li>
<li style="color: #00CC00">Pre-compute which sections conflict with each other</li>
<li>Write it in Rust</li>
<li>If all else fails, upgrade the server</li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<ul>
<li>Write it in Rust</li>
</ul>
<img src="https://rustacean.net/assets/rustacean-flat-happy.svg" />
<aside class="notes">
Ben
As we all know, Rust is the greatest programming language known to man. Any program written in it instantly gains a massive speed improvement. If we write our algorithm in Rust it'd probably become so fast that we wouldn't even need a computer to run it on.
</aside>
</section>
<section data-auto-animate>
<h2>Can we mitigate the runtime?</h2>
<ul>
<li style="color: red"><s>Use our RPI education to come up with a fundamentally better algorithm</s></li>
<li style="color: red"><s>Only check a few schedules</s></li>
<li style="color: #00CC00">Pre-compute which sections conflict with each other</li>
<li style="color: #00CC00">Write it in Rust</li>
<li>If all else fails, upgrade the server</li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<ul>
<li>If all else fails, upgrade the server</li>
</ul>
<p class="fragment">Wait a second... <span class="fragment">I thought we didn't want any maintenance???</span></p>
<p class="fragment">We don't want to have to manage a cluster of servers</p>
<p class="fragment">Why do we even need a server?</p>
<aside class="notes">
Ben
Ben: start blabbering about how servers are good
ELi: interrupt Ben, say that he doesn't want servers since they're a lot of maintenance
Time first transition with interruption, second transition with the rest of the complaints
</aside>
</section>
</section>
<section>
<section>
<h2>Course conflict algorithm (revisited)</h2>
<p>Problem: Given some selected courses, can you mark which courses can still be registered for without conflicts, all within the browser?</p>
<br />
<p>This sounds impossible :(</p>
<aside class="notes">
ELi
</aside>
</section>
<section data-auto-animate>
<h2>Old ideas, revisited</h2>
<ul>
<li>Pre-compute which sections conflict with each other?</li>
<ul>
<li>Pre-computing on page load increases load times</li>
<li>This is a lot of data, so downloading it takes a while</li>
<li>Turns out it's still not fast enough</li>
</ul>
<li>Write it in Rust?</li>
<ul>
<li>Websites are written in Javascript 😭</li>
</ul>
</ul>
<aside class="notes">
ELi
Ben after ELi says we can't use Rust: "But I really like rust :(" (time with transition to next slide)
</aside>
</section>
<section data-auto-animate>
<ul>
<li>Write it in Rust?</li>
</ul>
<p>But I really like Rust!</p>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<ul>
<li>Write it in Rust?</li>
</ul>
<p>But I really like Rust!</p>
<img src="https://rustwasm.github.io/wasm-pack/public/img/wasm-ferris.png" />
<aside class="notes">
Ben
Rust can be compiled to WebAssembly, which is extremely efficient code which can run in web browsers. You get all of the benefits of a compiled language but in client-side code.
</aside>
</section>
</section>
<section>
<section>
<h2>New ideas</h2>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h2>Store the times a section occurs in a bitvector</h2>
<p>Allocate a single bit for every hour in the week</p>
<p>Bits are 1 when the section occurs and 0 for all other times</p>
<br />
<p>Section meets at times T1 <span style="opacity: 20%">T2 T3</span> T4 <span style="opacity: 20%">T5</span></p>
<!--p><span style="opacity: 0%">Section meets at times</span> <span style="opacity: 0%">T</span>1 <span style="opacity: 0%">T</span>0 <span style="opacity: 0%">T</span>0 <span style="opacity: 0%">T</span>1 <span style="opacity: 0%">T</span>0</p-->
<p>This would be stored as<span style="opacity: 0%">T</span>1 <span style="opacity: 0%">T</span>0 <span style="opacity: 0%">T</span>0 <span style="opacity: 0%">T</span>1 <span style="opacity: 0%">T</span>0</p>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h2>Store the times a section occurs in a bitvector</h2>
<p>Allocate a single bit for every hour in the week</p>
<p>Bits are 1 when the section occurs and 0 for all other times</p>
<p>Check for conflict with "bitwise and"</p>
<p>Pre-computation can minimize the number of bits needed</p>
<aside class="notes">
Ben
</aside>
</section>
<section>
<h2>Bitvectors can be "ORed" together to store the times of the schedule</h2>
<p>One operation to check if a section can be added</p>
<aside class="notes">
Ben
</aside>
</section>
<section>
<h2>Run the algorithm in a separate thread</h2>
<p>This means the site won't freeze while running the algorithm</p>
<aside class="notes">
Ben
</aside>
</section>
</section>
<section>
<section>
<h2>Does it work?</h2>
<aside class="notes">
Ben
</aside>
</section>
<section>
<h2 class="r-fit-text">2.45ms</h2>
<p class="r-fit-text">to generate all schedules for CS1, Calc 1, and Chem 1</p>
<aside class="notes">
Ben
</aside>
</section>
</section>
<section>
<section>
<h2>Data Collection and Site Generation</h2>
<aside class="notes">
ELi
</aside>
</section>
<section>
<h2>Data Collection</h2>
<p>We want the most up-to-date and accurate data</p>
<p>Course availablity is determined by <span>SIS</span></p>
<p>You shouldn't see any difference between SIS and QuACS!</p>
<aside class="notes">
ELi
If data is out-of-date or inaccurate, a scheduler is useless.
</aside>
</section>
<section>
<h2>Scraping Data</h2>
<p>Helper scripts log into SIS for course times, seats, prerequisites, etc.</p>
<p>Course descriptions come from the catalog</p>
<p>Also collect data not on frontend</p>
<p>All stored in <a href="https://github.com/quacs/quacs-data">quacs/quacs-data</a></p>
<aside class="notes">
ELi
Catalog prerequisites are bad
</aside>
</section>
</section>
<section>
<h2>Deploying QuACS</h2>
<ol>
<li>Scrape data</li>
<li>Build wasm component</li>
<li>Download Umami script</li>
<li>Build site</li>
<li>Deploy</li>
</ol>
<aside class="notes">
Ben
</aside>
</section>
<section>
<section data-auto-animate>
<h2>Automation</h2>
<h3>QuACS is fully automated by GitHub Actions!</h3>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h3>QuACS is fully automated by GitHub Actions!</h3>
<p>Standard actions</p>
<ul>
<li>Linting</li>
<li>Site performance</li>
<li>CodeQL</li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h3>QuACS is fully automated by GitHub Actions!</h3>
<p>Data collection</p>
<ul>
<li>Four scraper actions</li>
<li>Runs every hour</li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h3>QuACS is fully automated by GitHub Actions!</h3>
<p>Site building</p>
<ul>
<li>Each semester is a separate instance</li>
<li>One action builds all semesters</li>
</ul>
<aside class="notes">
Ben
</aside>
</section>
<section data-auto-animate>
<h3>QuACS is fully automated by GitHub Actions!</h3>
<p>Total time from scraping to deploy: 37 minutes</p>
<p>Hosted with GitHub pages</p>
<p>Zero downtime</p>
<aside class="notes">
Ben
</aside>
</section>
</section>
<section>
<h1 class="r-fit-text">Any QuACtions?</h1>
<aside class="notes">
ELi
</aside>
</section>
</div>
</div>
<script src="../dist/reveal.js"></script>
<script src="../plugin/notes/notes.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
plugins: [RevealNotes],
});
</script>
</body>
</html>