Review of movie Project Almanac (2015)

I like science fiction movie, especially related to time travelling. Watched Project Almanac (2015), and there are quite a lot of interesting points.

[WARNING! CONTAINS SPOILERS]

Firstly, unlike Back to the Future (1985), time travellers going back will not meet the time travellers selves, this can be seen when the protagonist and the friends solve Quinn’s chemistry problem. Secondly, unlike Time Traveler’s Wife (2009), travelling to the past can change the future; yet in Time Traveler’s Wife the timeline is fixed, there is only one, single, timeline.

So, Project Almanac has a different time travelling concept. Let me list down the features:

  1. When the time travellers going to the past, they will change the future/present. And they can meet past self, which was not happened in the past of the time travellers. (like Back to the Future)
  2. When the time travellers going to the past again, they will not meet the time travellers selves. (unlike Back to the Future)
  3. But, if a time traveller goes to the past “again”, he will see other time travellers, but not meeting the time traveller self. (As in the case of David tries to change the conversation with Jessie.)
  4. After the time travellers make the changes at the past, when they are going back to the present, they have no memory for what is happened for the time from the back to present, yet there is “another self” doing something in between the past and present. And when they are coming back to the present, they are replacing this “another self”. (This can be seen after David makes the changes for the conversation with Jessie, and going back to his present.)

Interestingly, at the end of the movie, there are two identical cameras. This makes me immediately asked the first question, why? Because I never thought that David and the friends are using his father’s camera to record all the events. Therefore, the movie using the footage method is different from Cloverfield (2008), which is only one camera view. But, the footage at the end which shows that David and Christina found the two cameras must not be the same footage for all the time travelling events.

Okay. Now let me explain the movie in my own way so that it makes more sense, because there are somethings which do not really make sense. Firstly, let me name the David in the movie at the beginning until disappearing as David2. David2 discovered that himself appears in his 7-year-old birthday party. Let me name this “himself” as the David1. It is impossible that David1 and David2 are identical, just like the case past Quinn seeing present Quinn. David1 brings the key chain and wears the same cloth as David2 at going to the past at the end. And let me name David2’s past David at the end as David3. Hence, there are three Davids.

So, David1 go to David2’s time, to “fix something”. But it is impossible that David1 did the same thing as David2, else David2 will find the two cameras as David3. That means, David1 “fix[ed] something”, but different from David2, that is why no camera left. Consequently, David2 can find the time machine. Then, because of the time machine, David2 supposes have gone through everything similar to David1, that is why they dressed same and brought the key chain. But at the end, David2 destroyed the time machine, and left the camera to David3.

David3 at the end has a conversation with Jessie and he knows what Jessie wants to say. The only reason is that David3 already watched the video in the camera passed by David2.

So, this is an open ending. Whether David3 is going to do the same time travelling as David2 and left the camera to David4? I believe David3 will have a very different experience from David2 and David1, because he has the video that shows failure from David2. David2 failed because David1 doesn’t really “fix something”, unless David1 is purposely fixing the problem in order to produce David2. Then this will be more interesting.

Hence, the possible sequence is {1, 2, 3, …} or {1, 2, 1, 2, …}. Just enjoy the movie with your own imagination.

Arch Linux in MacBook Air

This is not a new stuff. You can get some tutorials from Internet. And it is very interesting when I did this, because I learnt new things. The following procedures are based on what I remembered. So, it may not be 100% accurate, since I am a forgetful person. 😅

What I did was reading the Arch Linux Wiki page. Then, followed the instructions as much as possible, and do some trials and errors. Remember to backup everything necessary. And try this at your own risk.

MacBook Air preparation

Before installing, firstly do the partition using Mac OS X itself. The tool can be found in /Applications/Utilities/Disk Utility.app. Then select the drive, not partition, at the left-hand panel. Next, click the “Partition” tab at the right. Make sure that you have enough disk space for the Arch Linux installation including the disk space for /home. In my case, I created three partitions at the end of the drive. One for root, one for swap, and one for /home. These three partitions are formatted in FAT32.

Since MacBook Air uses EFI to boot, and I am new to UEFI boot, so I installed rEFIt (Mac disk image). After installing rEFIt, reboot the MacBook then will show the options like this. That means, you have successfully installed rEFIt.

Arch Linux installation

Firstly, make sure you know how to install Arch Linux. Then, prepare a live USB for Arch Linux installation. Insert the USB to MacBook, then reboot, and hold the Alt/Option key. Then you will be shown a screen to choose booting into rEFIt or Arch Linux UEFI.

Choose Arch Linux UEFI and boot into Arch Linux for installation. Firstly, format the 3 partitions created in Mac OS X to what you want. In my case, I formatted /dev/sda3 and /dev/sda5 to ext4, and /dev/sda4 to swap. Next, we need to edit the partition type of the formatted partitions. This is done by using cgdisk instead of cfdisk, because MacBook is using GPT partition table. At the same time, you can see which partition is the EFI system partition. In my case, it is /dev/sda1, and it is FAT32 format. Hence, I mounted /dev/sda3 to /mnt, /dev/sda5 to /mnt/home, and /dev/sda1 to /mnt/boot.

Get the internet connection using netctl. Then proceed pacstrap as usual, arch-chroot and do some configurations.

Then, the GRUB installation took me some time. I used GRUB instead of gummiboot, because I know nothing about gummiboot yet. Follow the Wiki instruction, and please note that $esp refers to the mount point of the EFI system partition. In my case, it is /boot (after arch-chroot). After installation of GRUB, then generate the GRUB configuration file.

After installation, I found that there are /boot/EFI/Apple/, /boot/EFI/grub/ and some other files in /boot mount point.

Reboot.

If success, no need to hold the Alt/Option key, rEFIt will prompt you to choose to boot into Mac OS X or GRUB. Boot into Arch Linux through GRUB to check whether you succeed or not.

Post-installation

After installing Arch Linux, do the configurations, add users, install packages, install desktop environments, X11, setup the audio, install NetworkManager, etc.

There are three more things I concerned: i) graphics card, ii) touchpad, and iii) keyboard.

I installed Nouveau driver for the graphics card instead of NVIDIA. As the graphics card is GeForce 320M, it is under the N50 family (refers here). Therefore, I tried to install nvidia-340xx and nvidia-340xx-libgl. But the X11 does not work. At the end, I use Nouveau driver.

Next, the Synaptics input driver works fine in MacBook Air. But there is a little unexpected behaviour. Clicking (not tapping) the bottom-right cordern of the touchpad does not produce a right-click, but still a left-click. But in Mac OS X, clicking at bottom-left and bottom-right are different. Furthermore, some configurations have been done, such as two fingers tap and three fingers tap.

Finally, the keyboard is also configured based on the Wiki. I configured the Fn key and also swapped the Alt/Option key with the Command key. So that it works more like usual keyboard layout.

So, the demo video above first shows the rEFIt, then boot into Arch Linux using GRUB. As I have installed many desktop environments, I chose GNOME and launched the session.

Way of web development

Personal Web Server(?) age

When I was doing web development, that time was mostly static pages, with no CSS, a little JavaScript. The only interaction was CGI form. Then I learnt VBScript for ASP and Microsoft Access and used Personal Web Server.

Designing page layout was like hell, everything was using table. The font style was hard coded. So, the HTML source is too messy.

LAMP age

Then, from Personal Web Server, the web server was upgraded to IIS. Next was XAMPP on Windows, using all open source solutions: Apache, MySQL, and PHP. That was a great solution. Unlike ASP, PHP has more functions, more libraries, supports object oriented, syntax similar to C and C++.

JavaScript was not frequently used (in my case), until the usage of XMLHttpRequest (XHR) and AJAX, dynamic content became more attractive. The usage of CSS makes the HTML source much cleaner. JavaScript frameworks became popular for web application development. Some of the frameworks provide better user interface and animation effects. I used MooTools, jQuery and jQuery UI. In my opinion, jQuery is the best because of the element selection syntax is based on CSS selection. It is a great solution to enhance the built-in JavaScript.

To build the web applications, there are web application frameworks too: Ruby on Rails, django (Python), CakePHP (inspired by Ruby on Rails), etc. I personally prefer CodeIgniter. These frameworks are using MVC architecture, including ASP.NET MVC. Instead of static pages, URI routing is used. The developers need not to repeat the source code for similar pages, but using template engine and URI routing, developers only need to focus on the MVC design. Moreover, the web frameworks have their own APIs, the developers should learn how to use these APIs. So does the database, by using the framework APIs, it is possible to change the database from MySQL to PostgreSQL with a little modification.

With the CSS3 and HTML5, web application development becomes much easier. They become more interactive with JavaScript, more elegant with CSS effects.

Other than the frameworks, content management systems such as Joomla!, Drupal, and WordPress were very popular. They allow users to manage their own websites by focusing on the contents only. The developers are usually working on modules to provide more functions to the system, and the web designers will design the themes.

MEAN age

And now, the new trend is the MEAN stack instead of LAMP: MongoDB, Express.js, AngularJS, and Node.js. This solution is seriously different from LAMP. Node.js is not only a web server, but also a server-side JavaScript runtime environment. Unlike client-side JavaScript, JavaScript language is used at the server-side, and it can use the modules which can be installed by using npm (JavaScript package manager). As a result, both client and server sides are using JavaScript.

On the other hand, Express.js is the MVC web application framework. The URI routing and displaying the contents to the users is handled by Express.js. It can use different kinds of template engine where Jade is the default template engine.

AngularJS is a web application framework, which is different from jQuery or JavaScript modules from npm. AngularJS provides MVC architecture to the client-side, so that the view (HTML and CSS) are separated from the controller and model. The greatest feature is the data binding which will make real-time changes to the view. Using jQuery, we need to use EventListener such as onChange(), onKeyDown(), etc. But AngularJS magically omits this phase (demo).

NoSQL is the new trend because of big data. MongoDB is the document-oriented database, which is classified as NoSQL. Relational database management system (RDBMS) such as MySQL organises the data in the table form. As a result, sometimes the design of the database structure is very rigid and causes further changes of the web application becomes difficult. MongoDB does not require table structure, each collection (just like a table in MySQL) has various objects (just like rows of a table in MySQL). Each object is a JSON-like object, specifically BSON (Binary JSON).

Epilogue

Web development is like an ocean. There are various opportunities using web technology, such as WebGL for 3D computer graphics on the web. There are also alternative web servers: Nginx and Apache Tomcat (for JSP); alternative server scripting languages: Perl, Python, Ruby; stylesheet languages: Sass and LESS. It is also possible to develop new wonderful plugins for the web browsers to perform unusual tasks.

Some command-line applications uses web user interface (Web UI) instead of GUI, eg uTorrent Server (for Linux), httrack, Syncthing, etc. This is because HTML is more common than GUI widget toolkits. GUI widget toolkis such as Windows Forms, Qt, GTK+, etc requires runtime libraries. Web UI requires only a modern web browser.

WebKit is a very interesting thing. It is ported to Qt and GTK+, so that Qt and GTK+ can embed the web view in the native applications. Furthermore, Android has WebView class that uses WebKit too, to embed the web view in the native Android applications.

As the trend of big data and IoT, server-client is everything. Linux can be lightweight and focusing on running servers only, including all the logic, running on a single-board computer like Raspberry Pi or C.H.I.P, without any graphical user interface; Web UI allows administrators to manage the Linux server; the devices can connect to the Linux server and perform their tasks systematically.