MIUI upgrade

Today I just upgraded the MIUI to version 7. Actually, it prompted for the  upgrade since some times last week. But I failed to upgrade, expected to be server problem.

So, today I determined to find the solution for manual upgrade. The upgrade version is MIUI 7.0.5.0. I visited the official site and searched the ROM, but the official site does not have this ROM. As a result, just did a search, and found the target ROM in the MIUI official forum. Then everything becomes easy now.

In order to upgrade manually, we have to identify the filename of the target ROM. If we can start downloading the ROM file partially, then we can get the filename from the folder downloaded_rom.

Then to download using our desktop web browser such as Firefox, make a search online for the filename. For my case, it is “miui_MI3WMI4WGlobal_V7.0.5.0.KXDMICI_9830c22421_4.4.zip”. Make sure you are downloading from the official forum, where the file is located in the true MIUI server.

After download the ROM file, copy it to the downloaded_rom folder, run the system upgrade, then the phone will use the ROM directly. The phone skips the step downloading the ROM which may be very time exhaustive.

Finally, reboot, and upgrade success.

今天升级了MIUI 7。事实上,前几天(上个星期那样)就已经有提示让我升级了。不过试了很多次,都升级失败。应该是服务器的问题。

所以,今天我决定要手动升级。升级版本为MIUI 7.0.5.0。尝试了上官方网站找,但找不到这个ROM。结果,就上网搜寻,在官方讨论区找到。接下来就不是什么问题了。

首先,我们必须要知道ROM的文件名。这可以从downloaded_rom文件夹里看下载到一半的ROM。知道文件名之后,就可以用浏览器上网搜寻并下载。我所下载的是miui_MI3WMI4WGlobal_V7.0.5.0.KXDMICI_9830c22421_4.4.zip。为安全起见,所下载的文件应该是由官方讨论区而来,文件也应该是从MIUI的服务器下载。

下载完毕后,就复制到电话里的文件夹downloaded_rom。然后就来个系统升级。这个,就跳过了由电话下载ROM的步骤。

最后,重启,升级成功。

JavaScript

Previously I read an article regarding JavaScript and another one regarding HTML.

JavaScript, it is so wonderful that not only enhances the HTML interaction, (e.g. jQuery), it also makes a revolution of the system architecture design (e.g. AngularJS, ReactJS with Babel). The Babel JavaScript compiler is so amazing that it can transform the JavaScript to EcmaScript 6 with JSX feature. JSX is actually cannot be interpreted by our current web browser, but with the Babel, it makes JSX possible.

I really cannot believe that a JavaScript can interpret a statement with the syntax like this,

var div = <div>Hello world</div>;

JavaScript, not only client-side interpretation, it also runs as the server-side, such as NodeJS.

In my opinion, JavaScript becomes so popular and so powerful is because of several factors: Web technology itself, HTML specification (DOM design), and CSS specification. In order to produce a web application effectively and efficiently, programmers developed the solution from the JavaScript aspect, because this is the best way for hacking (I do not mean cyber security attack).

As the three fundamental technologies of WWW: HTML, CSS, and JavaScript, you can discover that their syntax are different, and only JavaScript is an imperative programming language; HTML and CSS are declarative programming languages. Yet, these three languages can be integrated into single HTML page. Other programming languages such as C, C++, PHP, Java, C#, etc, they are too programmer-oriented. As a result, they are too rigid during the development. JavaScript is using dynamic typing, thus, development on the JavaScript is more robust. PHP is also dynamic typing, but it is server-side scripting language. JavaScript because of NodeJS, both client-side and server-side can use it. One language rules them all.

And because of JavaScript, the rise of JSON is gradually replacing XML. It is more lightweight and highly used in Web API. Comparing to XML, JSON is much simpler, focusing on the data only. And the syntax can be easily used to differentiate the data types: number, string, boolean, array, object, and null. On the other hand XML should be parsed with a parser according to a DTD (document type definition). Moreover, MongoDB uses BSON format, which is based on JSON.

Therefore, for the web technology, JavaScript is one language that rules them all. I am no sure whether JavaScript will be highly used in desktop applications or not. But surely it cannot be used to develop system software.