<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=WebFund_2024F_Lecture_8</id>
	<title>WebFund 2024F Lecture 8 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=WebFund_2024F_Lecture_8"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2024F_Lecture_8&amp;action=history"/>
	<updated>2026-05-12T20:54:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2024F_Lecture_8&amp;diff=24770&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture for October 3, 2024 is now available: * [https://homeostasis.scs.carleton.ca/~soma/webfund-2024f/lectures/comp2406-2024f-lec08-20241003.m4v video] * [https://homeostasis.scs.carleton.ca/~soma/webfund-2024f/lectures/comp2406-2024f-lec08-20241003.cc.vtt auto-generated captions]  ==Notes==  &lt;pre&gt; Lecture 8 ---------  Assignment 1 is due on Monday, Oct. 7th, will discuss solutions in class on Tuesday.  If you ware working on Windows, you nee...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2024F_Lecture_8&amp;diff=24770&amp;oldid=prev"/>
		<updated>2024-10-03T21:26:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture for October 3, 2024 is now available: * [https://homeostasis.scs.carleton.ca/~soma/webfund-2024f/lectures/comp2406-2024f-lec08-20241003.m4v video] * [https://homeostasis.scs.carleton.ca/~soma/webfund-2024f/lectures/comp2406-2024f-lec08-20241003.cc.vtt auto-generated captions]  ==Notes==  &amp;lt;pre&amp;gt; Lecture 8 ---------  Assignment 1 is due on Monday, Oct. 7th, will discuss solutions in class on Tuesday.  If you ware working on Windows, you nee...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture for October 3, 2024 is now available:&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/webfund-2024f/lectures/comp2406-2024f-lec08-20241003.m4v video]&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/webfund-2024f/lectures/comp2406-2024f-lec08-20241003.cc.vtt auto-generated captions]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 8&lt;br /&gt;
---------&lt;br /&gt;
&lt;br /&gt;
Assignment 1 is due on Monday, Oct. 7th, will discuss solutions in class on Tuesday.&lt;br /&gt;
&lt;br /&gt;
If you ware working on Windows, you need an editor that will produce UNIX-style text files. Most sane text editors will not change the type of file, so if you start with the template you should be fine.&lt;br /&gt;
&lt;br /&gt;
Newer versions of Notepad on Windows may have support for UNIX textfiles, not sure.&lt;br /&gt;
&lt;br /&gt;
TextEdit on Mac does support it, but its default format is RTF, so you have to tell it to save as a plain text file.&lt;br /&gt;
  - if you can change the font of individual words or lines, it isn&amp;#039;t a plain text file&lt;br /&gt;
&lt;br /&gt;
When you are doing web development, you SHOULD be using UNIX-style text files.&lt;br /&gt;
 - DOS style text files will often work, but they can also cause weird issues&lt;br /&gt;
 - UNIX-style text files are basically always safe&lt;br /&gt;
&lt;br /&gt;
VSCode is a perfectly good text editor and should do the right thing.&lt;br /&gt;
&lt;br /&gt;
ONE IMPORTANT THING&lt;br /&gt;
 - openstack VMs may go down at any time!&lt;br /&gt;
 - make sure to keep local backups of any important work&lt;br /&gt;
&lt;br /&gt;
HOW SHOULD YOU BE DOING TUTORIALS?&lt;br /&gt;
 - your goal should be to understand every line of code that is assigned&lt;br /&gt;
 - to that end, you should do the suggested tasks&lt;br /&gt;
 - IN ADDITION, you should play with the code!&lt;br /&gt;
    - change, delete things&lt;br /&gt;
    - extend functionality&lt;br /&gt;
&lt;br /&gt;
The code in this class is mostly boilerplate-free, almost everything is significant&lt;br /&gt;
 - if you don&amp;#039;t know why a line is there, you&amp;#039;re probably missing a concept&lt;br /&gt;
&lt;br /&gt;
Normally, when we use a database in a web application, that database is separate from the web server.&lt;br /&gt;
 - often running on a completely different computer&lt;br /&gt;
 - communication is over the network, whether local or remote&lt;br /&gt;
   (as most local databases are still in separate processes&lt;br /&gt;
    and behave as if they were on a separate machine)&lt;br /&gt;
&lt;br /&gt;
But not with sqlite&lt;br /&gt;
 - it is an embedded database, becomes part of the application&lt;br /&gt;
 - it is VERY fast, sometimes faster than regular file I/O&lt;br /&gt;
&lt;br /&gt;
As a piece of software engineering, sqlite is a wonder&lt;br /&gt;
 - very small, very reliable, very efficient&lt;br /&gt;
 - all written in C with LOTS of tests&lt;br /&gt;
 - uses its own revision control system, Fossil, rather than git&lt;br /&gt;
   (guess what the file format of Fossil is?)&lt;br /&gt;
&lt;br /&gt;
But given that sqlite is written in C, but it isn&amp;#039;t running as a separate process, how is it incorporated into our Deno program?&lt;br /&gt;
 - by using a version where the C has been compiled into WebAssembly&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So modern web browsers can execute code in two formats:&lt;br /&gt;
  - JavaScript&lt;br /&gt;
  - WebAssembly&lt;br /&gt;
&lt;br /&gt;
WebAssembly is designed as a target for compilers, so basically any code can be complied to WebAssembly and used in a browser&lt;br /&gt;
 - but that code will need some JavaScript glue code to use all of a browser&amp;#039;s APIs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Understand that sqlite isn&amp;#039;t like other databases&lt;br /&gt;
 - expects only one program to access it at a time&lt;br /&gt;
 - generally fine if embedded, but you don&amp;#039;t want to be having multiple&lt;br /&gt;
   threads accessing sqlite at the same time, could go badly&lt;br /&gt;
 - should NOT be shared between concurrent programs!&lt;br /&gt;
    - can be done to some degree, sqlite will lock the entire database&lt;br /&gt;
    - but definitely not the way to go&lt;br /&gt;
&lt;br /&gt;
In the context of Deno, this isn&amp;#039;t a big deal&lt;br /&gt;
 - sqlite is so fast, can be part of main event loop&lt;br /&gt;
    - don&amp;#039;t need to use it asynchronously&lt;br /&gt;
    - and in fact you really shouldn&amp;#039;t try&lt;br /&gt;
&lt;br /&gt;
In JavaScript, =&amp;gt; is used to declare inline anonymous functions&lt;br /&gt;
 - specifically, you have parentheses with the function arguments,&lt;br /&gt;
   =&amp;gt;, and then {} for the function body&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>