tag:blogger.com,1999:blog-19576281117657788552024-03-15T18:10:27.148-07:00Linpei's BlogLily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-1957628111765778855.post-25608277271136437512014-12-08T18:46:00.000-08:002014-12-08T18:46:03.454-08:00Project Release 0.4<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">In my project release 0.4, I still worked on the webmaker app project. I
was working on the issue#569, which are the UI adjustments on Sign In. The code
that I fixed is in webmaker-login-ux, which webmaker app uses for log in. My
pull request is <a href="https://github.com/mozilla/webmaker-login-ux/pull/87">here</a>.
And the screenshot after fixing is as follows:<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.blogger.com/blogger.g?blogID=1957628111765778855" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwjEWhkPaz7df_Yoo_iUs8-cBIcvhEEh8htJ2uEXmkHFaY8iqc4Rn9Aw1edQM6dAKUNL9pkT3llnx9WCtUG5cftc8iOMZmIoh75C2_pctKczmIFkbjUFF138Ab-kXd4moW4fqG83KzgeI9/s1600/webmaker_issue569.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwjEWhkPaz7df_Yoo_iUs8-cBIcvhEEh8htJ2uEXmkHFaY8iqc4Rn9Aw1edQM6dAKUNL9pkT3llnx9WCtUG5cftc8iOMZmIoh75C2_pctKczmIFkbjUFF138Ab-kXd4moW4fqG83KzgeI9/s1600/webmaker_issue569.jpg" height="320" width="297" /></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-33907974137499573682014-12-05T12:22:00.001-08:002014-12-05T12:22:45.133-08:00Changes in Open Source in Last 3 Months<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span class="apple-converted-space"><span style="background: white; color: #212121; font-family: "Segoe UI",sans-serif; font-size: 11.5pt;">In this semester, I had the opportunity to take
David Humphrey’s OSD600. In this course, I learned the culture of open source
community and how to involve in the development of an open source project. Open
source model becomes more and more popular. And a lot of companies have
open-sourced the software. Although, it’s been only three months since I
started learning open source development. The changes in the open source
community are large and obvious. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span class="apple-converted-space"><span style="background: white; color: #212121; font-family: "Segoe UI",sans-serif; font-size: 11.5pt;">In this October, the 13<sup>th</sup> FSOSS
conference was held in Seneca@York campus. I participated as a volunteer. There
were more than 200 registered audience, nearly a hundred more than the number
in last year. From the number of FSOSS participants, we can see there are more
and more people interested in the open source. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span class="apple-converted-space"><span style="background: white; color: #212121; font-family: "Segoe UI",sans-serif; font-size: 11.5pt;">Moreover, the biggest news in open source
community during last three month was that Microsoft announced that it made the
full .NET server core stack open source for cross-platform Nov. 12, 2014. Developers
can begin engaging with breadth of .NET open source project </span></span><span style="background: white; color: #424242; font-family: "Segoe UI",sans-serif;"><span class="apple-converted-space"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #212121; font-size: 11.5pt; line-height: 107%;">at <a href="http://github.com/Microsoft/dotnet">Github</a>.</span></span> <span class="apple-converted-space"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #212121; font-size: 11.5pt; line-height: 107%;">It uses MIT License, which is one of most popular license in open source
projects, instead of its own open source license in the dotnet project. </span></span> </span><span class="apple-converted-space"><span style="background: white; color: #212121; font-family: "Segoe UI",sans-serif; font-size: 11.5pt;">That was the big step for Microsoft in the open
source community. It is also a big sign that open source is getting widely
recognized and adopted as an efficiency development model and in the software
development industry since Microsoft, the top company leads the development
model in the industry always, starts moving steps into the open source
community. It is anticipant that there will be more and more companies and
developers will participate the open source community. </span></span><span style="background: white; color: #424242; font-family: "Segoe UI",sans-serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span class="apple-converted-space"><span style="background: white; color: #212121; font-family: "Segoe UI",sans-serif; font-size: 11.5pt;">Source: <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;"><a href="http://blogs.msdn.com/b/somasegar/archive/2014/11/12/opening-up-visual-studio-and-net-to-every-developer-any-application-net-server-core-open-source-and-cross-platform-visual-studio-community-2013-and-preview-of-visual-studio-2015-and-net-2015.aspx">http://blogs.msdn.com/b/somasegar/archive/2014/11/12/opening-up-visual-studio-and-net-to-every-developer-any-application-net-server-core-open-source-and-cross-platform-visual-studio-community-2013-and-preview-of-visual-studio-2015-and-net-2015.aspx</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-25203489374090575592014-11-26T12:49:00.002-08:002014-11-26T13:44:17.672-08:00Building Open Source Browser – Firefox on Windows<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">I followed the <a href="https://developer.mozilla.org/en-US/docs/Simple_Firefox_build">instruction</a></span><span style="background: white; font-family: Arial, sans-serif;"> to build Firefox in my laptop, which is x64 system, using OS
Windows8.1. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;"><b>First of all, check the prerequisites.</b> </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">Check if all of windows build<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites"> prerequisites</a> </span><span style="background: white; font-family: Arial, sans-serif;">are installed in the computer. At this point, I have to install
MozillaBuild package. I downloaded and installed the latest version of
MozillaBuild in fold c:\mozilla-build. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;"><b>Second, get the source code.</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">Mozillar use Mercurial repository to hold the source code. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">To get the source code, I have to have Mercurial installed in my laptop.
I downloaded and installed <a href="http://tortoisehg.bitbucket.org/">TortoiseHg</a></span><span style="background: white; font-family: Arial, sans-serif;">, which a</span><span style="background: white; color: #545454; font-family: Verdana, sans-serif;"> </span><span style="background: white; font-family: Arial, sans-serif;">Windows shell
extension and a series of applications for the</span><span style="font-family: Arial, sans-serif;"> </span><a href="http://mercurial.selenic.com/"><span style="color: black; font-family: Arial, sans-serif;">Mercurial</span></a><span style="font-family: Arial, sans-serif;"> <span style="background: white;">distributed revision control system, similar with
TortoiseGit and TortoiseSVN. It saves from getting lost in the instruction of
Windows Install on <a href="http://mercurial.selenic.com/wiki/WindowsInstall">mercurial website</a>.</span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;"><b>Next, start the building environment.</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">In folder c:\mozilla-build, type <b>start-shell-msvc2013.bat</b>
to setup building environment because I have install visual studio 2013 installed
in laptop. Then it enters a linux mode in window power shell.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">Running start-shell-msvc2013-x64.bat generated the error in building
(4:21.90 configure: error: You are targeting i386 but using the 64-bit compiler).
<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background-color: white; font-family: Arial, sans-serif;"><b>Following, build the project.</b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">cd into </span><span style="font-family: Arial, sans-serif;">mozilla-central <span style="background: white;">subdirectory
in above powder shell, and run command <b>./mach build</b>. It will take some time to
build the project. It takes 3 to 4 hours to build the project. In the end, it will show a success message if the build finishes and succeeds as follows:</span></span><br />
<span style="font-family: Arial, sans-serif;"><span style="background: white;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJWuC5tv5u_JW3jH9bGlnv2Gp3kb9JLGex0cMKOjFlqbfbr1dvN3iaQLe4dtem4JMzosifyV-xfebXD9gdUriPnXfLHw3UQPqMeUaE_TbsYtgeepacNZtRQTduYtJ5Fv0cHiIe7U3zegy5/s1600/Firefox_build_succeed.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJWuC5tv5u_JW3jH9bGlnv2Gp3kb9JLGex0cMKOjFlqbfbr1dvN3iaQLe4dtem4JMzosifyV-xfebXD9gdUriPnXfLHw3UQPqMeUaE_TbsYtgeepacNZtRQTduYtJ5Fv0cHiIe7U3zegy5/s1600/Firefox_build_succeed.jpg" height="167" width="400" /></a></div>
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;"><b>Finally, run the project</b><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">Run command <b>./mach run </b>in the same fold as above. Firefox Nightly
browser will be started as follows:<span style="font-size: 10pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPv7u1pYlH0p27aGq9VNf0wApzk631WWzCVHlXBd6DDxXB9M51rMzN8ZhcJQqcf1HinD8cJXaf4joAuVm2Qh3qZzeeGhJSHVv2MYTycfL6yLlTB4cIQdTLb3tJVwkPKvkqJlL5zwxC3San/s1600/build_firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPv7u1pYlH0p27aGq9VNf0wApzk631WWzCVHlXBd6DDxXB9M51rMzN8ZhcJQqcf1HinD8cJXaf4joAuVm2Qh3qZzeeGhJSHVv2MYTycfL6yLlTB4cIQdTLb3tJVwkPKvkqJlL5zwxC3San/s1600/build_firefox.png" height="275" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-90058361887950598352014-11-21T08:14:00.001-08:002014-11-21T08:14:45.925-08:00Grunt vs. Gulp<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Grunt and Gulp are the popular task runner in Node.js projects. In release
0.1, I have used Grunt in Filer project. And webmaker project uses Gulp indead.
I did some research on their similarities and differences.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Both Grunt and Gulp are to build the process in Node.js base. But they
have different mechanism. Grunt has longer history and Gulp is new.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><b>Plug-ins:</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Both Grunt and Gulp relies on the plug-ins to build tasks. They have
large plug-in base. Developers rarely need to developer own building tasks. Grunt
has better community support than Gulp since it has longer history. Grunt
plug-ins often perform multiple tasks; Gulp plug-ins are designed to do one
thing only</span>. <o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><b>Mechanism in building process:</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Grunt needs to generate intermediary files (.tmp/) to disk during the building
process. It uses declarative approach to build tasks. When the build flow is large,
it will be hard to figure out the task execution order. Also, the development
team needs to write the maintenance code.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Gulp is a streaming building system. Streams is the most important
concept of Gulp, which means that you input your files into a pipe from one end
and generate the output file from the other end without any interruptions in
the middle of the process. It makes your task definitions a bit easier to ready.
And it does not have the disk I/O issues since it does not have the
intermediary file written to the disk. However, Gulp requires developers know
Node well to deal with streams, pipes and asynchronous code.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><b>Gruntfile.js vs. Gulpfile.js</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Grunt uses JSON-like data configuration files. And Gulp use Javascript
code. There are examples getting from Filer project and Webmaker project.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Gruntfile.js<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpMKHYYIGdkl2FnHxefDbKEW_e6bc4K5ysbMo1pJBWJwRfwOk_LKdK6w_xCKR5uKie5TsxNritd3ITMcR7X9O4B0yYhkL_QGu-q8PUVTw4p_9SvAOwv4ZuU4nvwdEKUvkRrJ_BSztIAnfs/s1600/gruntfileJS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpMKHYYIGdkl2FnHxefDbKEW_e6bc4K5ysbMo1pJBWJwRfwOk_LKdK6w_xCKR5uKie5TsxNritd3ITMcR7X9O4B0yYhkL_QGu-q8PUVTw4p_9SvAOwv4ZuU4nvwdEKUvkRrJ_BSztIAnfs/s1600/gruntfileJS.png" height="217" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt; text-align: justify;">Gulpfile.js</span><br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq0q4UoKOaA5rckIWXmKYAJAi6FVBv6utBaTgJJNsQz9rlSX6hMnqI2IMZVeV2-imBcxFg4yOGoLGTqYHNa8fpvGSawTycy_fbix0ShXrUD3bLTqjovvTNo7QS6S8XaaE4awvIrmZHFqxj/s1600/gulpfileJS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq0q4UoKOaA5rckIWXmKYAJAi6FVBv6utBaTgJJNsQz9rlSX6hMnqI2IMZVeV2-imBcxFg4yOGoLGTqYHNa8fpvGSawTycy_fbix0ShXrUD3bLTqjovvTNo7QS6S8XaaE4awvIrmZHFqxj/s1600/gulpfileJS.png" height="224" width="320" /></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Arial, sans-serif;"><span style="background-color: white; font-size: 13px;">Both of them have advantages and disadvantages. Developers would consider them to choose the best suitable one. As a beginner in open source community, it is good to learn both of them to help understand the system I am working on.</span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Arial, sans-serif;"><span style="background-color: white; font-size: 13px;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="font-family: Arial, sans-serif;"><span style="background-color: white; font-size: 13px;">Source:</span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://www.sitepoint.com/introduction-gulp-js/">http://www.sitepoint.com/introduction-gulp-js/</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://ponyfoo.com/articles/choose-grunt-gulp-or-npm">http://ponyfoo.com/articles/choose-grunt-gulp-or-npm</a><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-56587562369947940962014-11-20T22:44:00.001-08:002014-11-20T22:44:53.497-08:00Release 0.3<span style="background: white; line-height: 107%;"><span style="font-family: Arial, Helvetica, sans-serif;">I chose to stay in webmaker project for my
release 0.3 project since I have worked on this before and am interested in
this project. I picked up the issue #498 and then worked on it for several
days. I noticed that this project uses page.js to direct routing. It took me
some time to understand how page.js works, but finally found out page.js does
not have the functionality to refresh the page. Then I used location.reload()
to do so. After doing release 0.3, I got to know more about webmaker My pull request is <a href="https://github.com/mozillafordevelopment/webmaker-app/pull/526">here</a>. </span></span>Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-1484710236486739302014-11-19T11:48:00.003-08:002014-11-19T11:48:45.128-08:00Strategies benefiting from open source communities<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">On OSD600 class on this Monday, we had a discussion on how to build a
software production pipeline that can strategically benefit from a vibrant open
source community from many aspects, such as big corporations, small shops,
students and so on.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">We had a lot of ideas, which can be categorized into following aspects:</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
</div>
<ul>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Face to face gatherings</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: since the open source developers are from all of the world, it’s
important and excited for them to have chances to gather together and have the
face to face communication, such conferences, workshops and so on. They can
increase participants’ enthusiasm to the open source community.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Standards</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: good standards
make participants easy to understand and follow, and keep workflow organized in
open source communities.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Technology</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: using
programming languages that is newly developed.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Onboarding</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: making it easier
to understand for non-developer.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Time management</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: making
miles stones.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Project planning</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: doing marketing research to find users and localization staff, use
feedback to improve the project.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Funding</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: big companies
would sponsor for events held in open source community; hiring contributors.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Partner</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"> : encouraging
partnerships with business and educational organization, partnering with educational
organization to have more targeting users and participants for the project</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Building open community</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: encouraging social media, use permissive license; putting on version
control system, such as github or subvision; recognizing contributors,
mentoring the community.</span></li>
<li><b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Documentation</span></b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">: creating
good guide and documentations for new developers, making video/audio guide for
different learners.</span></li>
</ul>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
</div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-40388756097228701452014-11-10T10:02:00.001-08:002014-11-10T10:02:27.020-08:00Less.js – a CSS preprocessor<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Today, Jordan Theriault introduced Less.js in the OSD600 class. Less.js
gets popular recently. It is a CSS framework working with Javascript in
client-side. I started to learn and use it when I worked Mobile Webmaker
project. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Less.js have some advantages:</span></div>
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-align: justify; text-indent: -0.25in;">
</div>
<ul>
<li><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt; text-indent: -0.25in;">Improve performance. The purpose of Less.js is to
speed up development of CSS. So using Less.js can improve performance in ways
that can’t be done in normal CSS.</span></li>
<li><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt; text-indent: -0.25in;">Significantly reduce sizes of style sheet files
by well grouping things. Using Less.js, .css files can be well grouped and be separated
into smaller and more meaningful .less files.</span></li>
<li><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt; text-indent: -0.25in;">Easiness to operate. Less.js has following
features:</span></li>
</ul>
<!--[if !supportLists]--><br />
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; text-align: justify; text-indent: -0.25in;">
</div>
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Ability to define variables, <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Operations and functions (Mathematical functions
and operational functions) <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Mixins, embedding all the properties of a class
into another class<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Nesting<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0.0001pt 1in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;">
</span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Joining of multiple files. <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Those features of Less.js make it easy to operate
to group things and generate CSS files. Moreover, the developers are easy to
modify .less files with those features by reducing the redundancy of the code.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">In the future, I will dig deeper into Less.js with continuously working
in Mobile Webmaker project.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Source:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://stackoverflow.com/questions/8276154/less-and-sass-vs-traditional-css-methods-and-thoughts-on-performance-and-seo-etc">http://stackoverflow.com/questions/8276154/less-and-sass-vs-traditional-css-methods-and-thoughts-on-performance-and-seo-etc</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://en.wikipedia.org/wiki/Less_(stylesheet_language)">http://en.wikipedia.org/wiki/Less_(stylesheet_language)</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://blog.blakesimpson.co.uk/read/37-less-sass-the-advantages-of-css-preprocessing-explained">http://blog.blakesimpson.co.uk/read/37-less-sass-the-advantages-of-css-preprocessing-explained</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-58842177122867696282014-11-03T09:31:00.000-08:002014-11-03T09:31:18.162-08:00Presentation Script – NodeJS<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">This presentation contains following content:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: 'Wingdings 3'; font-size: 10pt;">´<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">What is Node.js?<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: 'Wingdings 3'; font-size: 10pt;">´<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Popularity<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: 'Wingdings 3'; font-size: 10pt;">´<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">License<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: 'Wingdings 3'; font-size: 10pt;">´<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">History<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: 'Wingdings 3'; font-size: 10pt;">´<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Community<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: 'Wingdings 3'; font-size: 10pt;">´<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Main idea of Node.js<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-family: 'Wingdings 3'; font-size: 10pt;">´<span style="font-family: 'Times New Roman'; font-size: 7pt; font-stretch: normal;"> </span></span><!--[endif]--><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">How to start<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">What is Node.js?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 13.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">In nodejs.org, Node.js is described as follows:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 27pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Node.js® is a platform built on Chrome’s
JavaScript runtime for easily building fast, scalable network
applications. Node.js uses an event-driven, non-blocking I/O model that makes
it lightweight and efficient, perfect for data-intensive real-time applications
that run across distributed devices.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 13.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 13.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">This is what is Node.js on Wikipedia:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 27pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Node.js is a cross-platform runtime environment
for server-side and networking applications. Node.js applications are written
in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft
Windows and Linux with no changes.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 27pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Popularity<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
</div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Node.js is release under the MIT license and
bundles other liberally licensed OSS components, such as V8’s license,
OpenSSL’s license, HTTP Parser’s license, npm’s license and other licenses for
some modules / tools.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">License<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"> link: <a href="https://raw.githubusercontent.com/joyent/node/v0.10.32/LICENSE">https://</a><a href="https://raw.githubusercontent.com/joyent/node/v0.10.32/LICENSE">raw.githubusercontent.com/joyent/node/v0.10.32/LICENSE</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">History<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Node.js was created by Ryan Dahl (github: <a href="https://github.com/ry">https://</a><a href="https://github.com/ry">github.com/ry</a>),
starting in 2009.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Its development and maintenance was sponsored by
Joyent, the firm where Dahl worked.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Dahl stepped aside in 2012. And Timothy J
Fontaine (twitter: <a href="https://twitter.com/tjfontaine">https://</a><a href="https://twitter.com/tjfontaine">twitter.com/tjfontaine</a>, github: <a href="https://github.com/tjfontaine">https://</a><a href="https://github.com/tjfontaine">github.com/tjfontaine</a>) is Node.js’
current project lead<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Community<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Developer site: <a href="http://github.com/joyent/node">http://github.com/joyent/node</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Contribution Guide (<a href="http://nodejs.org/documentation/contributing/">http://nodejs.org/documentation/contributing</a><a href="http://nodejs.org/documentation/contributing/">/</a>). It contains the
instruction on reporting an issue and contributing a feature or fix, such as
how to fork, branch, commit, test, push and so on.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
</div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">nodejs.org in multiple language: <a href="http://nodejs.org/documentation/localization/">http://nodejs.org/documentation/localization</a><a href="http://nodejs.org/documentation/localization/">/</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Main Idea of NodeJS<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Use <b>non-blocking</b>, <b>event-driven</b> I/O
to remain lightweight and efficient in the face of data-intensive real-time
applications that run across distributed devices.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Non-blocking / callback means that the code does
not need to wait the completion of the action to continuously execute the next
line.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Event-driven means that Node.js uses even loop to
handle tens of thousands of concurrent connections instead of multiple threads.
<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">How to Start</span></b><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt;"> </span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 9pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Tutorials</span><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://nodeschool.io/">NodeSchool.io
interactive lessons</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="https://github.com/maxogden/art-of-node/">The
Art of Node (an introduction to Node)</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://www.nodebeginner.org/">Hello
World</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://www.nodebeginner.org/">Hello
World Web Server</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://nodeguide.com/">Node.js guide</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://howtonode.org/express-mongodb">Build
a blog with Node.js, express and </a><a href="http://howtonode.org/express-mongodb">MongoDB</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://project70.com/">Node.Js</a><a href="http://project70.com/"> Tutorials At Project 70</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://net.tutsplus.com/tutorials/javascript-ajax/node-js-for-beginners/">Node.js
for Beginners</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://javascriptissexy.com/learn-node-js-completely-and-with-confidence/">Learn
Node.js Completely and with Confidence</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://blog.modulus.io/absolute-beginners-guide-to-nodejs">Absolute
Beginners Guide To Node.js</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Find more, please visit <a href="http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-node-js">http://</a><a href="http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-node-js">stackoverflow.com/questions/2353818/how-do-i-get-started-with-node-js</a><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Source:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Real Time Web with Node.js (<a href="http://node.codeschool.com/levels/1">http://</a><a href="http://node.codeschool.com/levels/1">node.codeschool.com/levels/1</a>)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;">Understanding the node.js event loop (<a href="http://blog.mixu.net/2011/02/01/understanding-the-node-js-event-loop/">http://blog.mixu.net/2011/02/01/understanding-the-node-js-event-loop</a><a href="http://blog.mixu.net/2011/02/01/understanding-the-node-js-event-loop/">/</a>)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 22.5pt; text-align: justify;">
<u><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><a href="http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js">http://</a><a href="http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js">www.toptal.com/nodejs/why-the-hell-would-i-use-node-js</a></span></u><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 27pt; text-align: justify;">
</div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 27pt; text-align: justify;">
<br /></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-53241179065370803222014-11-03T09:03:00.003-08:002014-11-03T09:03:45.387-08:00FSOSS in Oct 23-24, 2014<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">This year’s FSOSS at Seneca College, Toronto was the thirteen iteration. Three keynote speakers
were invited to this year’s conference. . They are David Humphrey (CDOT
Researcher for Mozilla Foundation), Bob Young (Red Hat, Inc. Co-Founder) and
Chris Aniszczyk (Head of Open Source at Twitter). And thirty-five speaker have
presented at the conference. I participated this event as a volunteer. Fortunately,
I listened two keynote speakers’ presentation and the Kieran Sedgwick’s
presentation besides my duty shift.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">All of the three presentations expressed speakers’ enthusiasm to the
open source. Mr. Young generally introduced how open source work with business
from the entrepreneur aspect. Mr. Chris talked more details on open source on technical
side. With more experience and profound understanding on open source, He
clearly shows the craft and culture of open source and presents how open source
works in a large scale a company (Twitter). He explicitly expresses he loves
open source and gets a lot of advantages from it. Moreover, he hopes there are
more and more people joining open source development. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;"><br /></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">Mr. Kieren is an intermediate open source developer, who works in CDOT, an
open source organization. In his presentation, he did not explicitly mention
his view point on open source. But from his words, audience can strongly
receive the message that he has a very positive opinion on open source. He
starts his career at an open source organization with the open source projects.
He learns cutting edge technologies and grows rapidly in the open source
environment. He gets many benefits from open source community. In his
presentation, he uses an open source project to illustrate how the mentioned
technologies work. It is inevitably showing audience how open source works in a
small scale - a project from some aspect.</span><span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<span style="background: white; font-family: Arial, sans-serif;">I am glad I did contribution to the big event held by CDOT at Seneca College. And I had deeper understanding on open source from this conference.</span></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-3236635383645566492014-10-17T21:03:00.002-07:002014-10-17T21:59:56.014-07:00OSD600: Release 0.2<span style="font-family: Verdana, sans-serif;">I took issue#319 in Webmaker for this release. I already completed it. Please find it <a href="https://github.com/mozillafordevelopment/webmaker-app/pull/364">here</a>. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">This issue is about the UI, to align the line on the homepage with the text instead of centralize it. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Now it looks as following:</span><br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCBlPVeP-mg52WDmYGcAc8X1oUrVWGzMtlWtGNl3Fj7CDFHfuCmmw1fd_42TWtAaVfwjoiF-jSkEleJqYT7rSO5y-Hku-LjDLpu5o_SnblSfIWIW_p7wFR4xOXu1nwcb_XzEeaYf__mn0Q/s1600/Webmaker_issue319.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCBlPVeP-mg52WDmYGcAc8X1oUrVWGzMtlWtGNl3Fj7CDFHfuCmmw1fd_42TWtAaVfwjoiF-jSkEleJqYT7rSO5y-Hku-LjDLpu5o_SnblSfIWIW_p7wFR4xOXu1nwcb_XzEeaYf__mn0Q/s1600/Webmaker_issue319.jpg" height="212" width="320" /></a></div>
<br />
<br />Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-25939540940651563442014-10-15T18:56:00.001-07:002014-10-15T19:07:51.348-07:00OSD600: Release 0.2 – Webmaker – issue#319<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">In project release 0.2, I would like to take the
issue #319 in webmaker. And I already left a message on github to ask and am
still waiting for the response. This issue is about the UI, making the line to
align with the text in the homepage. It is a small bug and easy to fix.
However, it will a good start for me to go through the whole project and get
the ideas about how it works. Whenever I get confirmed, I will send the pull
request to make my first contribution on a real open source project. </span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">I have been hesitating in taking bugs for a while. Inspired by David's article "Minimum Viable Product" in Oct. 8, I decide to start with small bugs. Taking a small bug makes me feel more confident on open source development. And I am willing to take more bugs. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Also, there is another small bug (#315) I am interested in. After I am
done with this, I am most likely to work on that if it’s still available.</span></span>Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-91629565250529915122014-10-06T21:17:00.001-07:002014-10-06T21:17:14.262-07:00OSD600: Project for Release 0.2Kate Hudson introduced Mobile Webmaker project in last Wednesday. It is a mobile application providing users the framework to create the mobile apps. In other words, it is a software being used to create software. She also showed some examples and gave the links of how to start. This is a cool project, which also have the clear information to start.<br />
<br />
Moreover, I have some friend who are going to work on this project as well. Thus, I can discuss with them. And we may help each other although we work on different issues.<br />
<br />
I need to look at the issues in detail and then decide which one to take. I will do so no later than this Wednesday, and will post which issue I would like to take.<br />
<br />
<br />Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-91794484612725107442014-10-06T19:26:00.001-07:002014-10-06T19:27:39.181-07:00SPO600: Lab3 - Loop in Assembly<div class="MsoNormal">
In lab3, we were asked to write the assembly programs in
both x86_64 and aarch64 to display number 0-29 in a loop.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This was my first assembly code. And it took me one night
and 2 whole days to get them work. Now the loop is working to display the
numbers. But I still have the problem for the newlines. My outputs do not have
the newlines as I expect. In other
words, my output is on one line. I spent some time on this issue, but have not
found the solution. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
One frustrating thing in assembly is that different platform
requires different syntax. The code I run in one platform without problems could
not smoothly transform to the other platform. I still need to spend amount of
time to recode it even though both programs have the same logic and same
output.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
Here is the code on X86_64 in GAS syntax.<o:p></o:p></div>
<br />
<pre style="background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyWKkVvaGqV2mResvv3-sHrYvl0izl9B0yGHe6Su-eVve8F-8cw_rZNZsEMVvdeL-ck023YBKA5qx_guqQ6X6moFo7YfRZjNqBll4Bn0LcYDB9HinGVFSCx8IYQxzEjkioTLOFdj2SVjU-/s320/codebg.gif) rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 450.828125px;"><code style="word-wrap: normal;"> .text
.globl _start
start = 0
max = 30
_start:
mov $start,%r15 /* starting value for the loop index*/
loop:
/*showing digit*/
mov $'0',%r14
mov $10,%r13
mov $0,%rdx
mov %r15,%rax
div %r13
cmp $0,%rax
je singledigit
mov %rax,%r13 /*store the second digit from right*/
add %r14,%r13
mov %r13,msg+5
singledigit:
mov %rdx,%r12
add %r14,%r12
mov %r12,msg+6
/*showing loop in front of digit*/
mov $len,%rdx
mov $msg,%rsi
mov $1,%rdi
mov $1,%rax
syscall
inc %r15 /* increment index*/
cmp $max,%r15 /* see if we're done */
jne loop /* loop if we're not */
movq $0,%rdi /* exit status */
movq $60,%rax /* syscall sys_exit */
syscall
.data
msg: .ascii "loop: '\n'"
.set len, . - msg </code></pre>
<br />
<div class="MsoNormal">
And ARM assembly in aarch64:<o:p></o:p></div>
<pre style="background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyWKkVvaGqV2mResvv3-sHrYvl0izl9B0yGHe6Su-eVve8F-8cw_rZNZsEMVvdeL-ck023YBKA5qx_guqQ6X6moFo7YfRZjNqBll4Bn0LcYDB9HinGVFSCx8IYQxzEjkioTLOFdj2SVjU-/s320/codebg.gif) rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 450.828125px;"><code style="word-wrap: normal;"> .text
.global _start
_start:
start = 0
max = 30
mov x15,start /*starting value for the loop index*/
loop:
mov x28,0
mov x27,10
adr x12,msg /*loading the message*/
udiv x10,x15,x27 /*getting the quotient*/
msub x9,x10,x27,x15 /*getting the reminder*/
cmp x10,0 /*if quotient equals 0, then go to execute single digit*/
beq singledigit
add x14,x10,0x30 /*display quotient - second digit from right*/
str x14,[x12,6]
singledigit:
add x11,x9,0x30 /*display reminder - first digit from right*/
str x11,[x12,7]
/*system call write*/
mov x1,x12
mov x2,len
mov x0,1
mov x8,64
svc 0
/*loop*/
add x15,x15,1
cmp x15,max
blt loop
/*system exit*/
mov x0,0
mov x8,93
svc 0
.data
msg: .ascii "loop: ##\n\r"
len= . - msg </code></pre>
<br />
<div class="MsoNormal">
Through the practice in this lab, I got the basic idea how
assembly works with memory and register, how to do the system call and how loop
works. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal">
In the end, I would like to ask if anyone has any good
tutorials in assembly for beginners or suggestions, please comment it because I
could not find one good for beginners. I highly appreciate. <o:p></o:p></div>
<br />Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-41746560510145212572014-09-25T20:52:00.002-07:002014-09-25T20:52:32.435-07:00OSD600: Release 0.1<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">I have done the project 0.1 release and send
David the pull request (<a href="https://github.com/humphd/filer/pull/5">https://github.com/humphd/filer/pull/5</a>)
today. Project 0.1 release was to add
the du command to filer project. Following project instruction, I did not have
much difficulties to finish it.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">First of all, I got the code and had my github
ready by forking filer to my github account and coloning it to my local
computer. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Then I installed the node.js in order to have npm
package installer in my computer.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Next, following the instruction to install the
grunt both locally in project (filer) folder and globally in my computer. At
this step, I had the trouble to install grunt locally with the errors during
the installation. After discuss with the classmate, I found out that I need use
Linux command line instead of Windows command line to run the command “npm
install”. Then I used git bash to run this command, and it turned out that
installation was successful eventually.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Following, I run “grunt test” to test the code. I
met the problems as well here. After asking David, it was resolved by updating to
the latest code. The problem I met was just solved and updated quite recently,
and I had not updated my code yet.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">At this point, I had all the required
environment ready. Then I started to write the code. I reviewed the code for
cat command and ls command because du command has the similarity with these two
commands. Both du and cat commands have two parameters – data and callback. And
both du and ls commands need to return deep content of a directory tree, and
have the file size, file path and file content. Having the reference to these
two blocks of code, I built du command without much difficulties. There were 5
files that needed to be modified and/or added. They were:<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-align: justify; text-indent: -.25in; text-justify: inter-ideograph;">
</div>
<ul>
<li><span style="font-family: Verdana, sans-serif;"><span style="line-height: 107%; text-indent: -0.25in;"><span style="line-height: normal;"> </span></span><span style="background: white; line-height: 107%; text-indent: -0.25in;">MODIFY: /README.md</span></span></li>
<li><span style="font-family: Verdana, sans-serif;"><span style="line-height: 107%; text-indent: -0.25in;"><span style="line-height: normal;"> </span></span><span style="background: white; line-height: 107%; text-indent: -0.25in;">MODIFY: /test/index.js</span></span></li>
<li><span style="font-family: Verdana, sans-serif;"><span style="line-height: 107%; text-indent: -0.25in;"><span style="line-height: normal;"> </span></span><span style="background: white; line-height: 107%; text-indent: -0.25in;">MODIFY: /src/shell/shell.js</span></span></li>
<li><span style="font-family: Verdana, sans-serif;"><span style="line-height: 107%; text-indent: -0.25in;"><span style="line-height: normal;"> </span></span><span style="background: white; line-height: 107%; text-indent: -0.25in;">MODIFY: /dist/filer.js</span></span></li>
<li><span style="font-family: Verdana, sans-serif;"><span style="text-indent: -0.25in;"><span style="line-height: 14.2666664123535px;"> </span><span style="line-height: normal;"> </span></span><span style="background: white; line-height: 107%; text-indent: -0.25in;">ADD:
/test/spec/shell/du.spec.js</span></span></li>
</ul>
<!--[if !supportLists]--><br />
<span style="background: white; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">At last, it passed the test with no error. </span></span>Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-20197252288382101452014-09-23T18:42:00.001-07:002014-10-06T20:08:39.143-07:00SPO600: Static linking vs. Dynamic linking<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><span style="color: #333333; font-size: 12.0pt; line-height: 107%;"><b>Linker</b>
as a system program takes relocatable object files and command line arguments
in order to generate an executable object file. </span><span style="background: white; font-size: 12pt; line-height: 107%;">The linker is responsible
for locating individual parts of the object files in the executable image,
ensuring that all the required code and data is available to the image and any
addresses required are handled correctly.</span><span class="MsoHyperlink"><span style="font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></span></span></div>
<div class="MsoNormal">
<span style="background: white; font-size: 12pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIaMieib6R_zB6ZhevUmn9pC-DPYjEu8u61sRL5UjVY2_oeQz55NukDwgkJJ2JmUgv92yemYNBl-mCI-zRcV0-zBBlESH_1xu9iYyTnm1nE8_slbuLxtZ7Wm9DDIsCSJnLA0eeDvW0yfow/s1600/linker.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIaMieib6R_zB6ZhevUmn9pC-DPYjEu8u61sRL5UjVY2_oeQz55NukDwgkJJ2JmUgv92yemYNBl-mCI-zRcV0-zBBlESH_1xu9iYyTnm1nE8_slbuLxtZ7Wm9DDIsCSJnLA0eeDvW0yfow/s1600/linker.jpg" height="205" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Static
and dynamic linking are two processes of collecting and combining multiple
object files in order to create a single executable.<span class="apple-converted-space"> <o:p></o:p></span></span></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><span class="apple-converted-space"><br /></span></span></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><b>Static
linking</b> is the process of copying all library modules used in the program into
the final executable image. This is performed by the linker and it is done as
the last step of the compilation process.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="color: #333333; font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal">
<span style="background: white; font-size: 12pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">
<span style="color: #333333; font-size: 12pt; line-height: 107%;">During <b>dynamic linking</b> the
name of the shared library is placed in the final executable file while the
actual linking takes place at run time when both executable file and library
are placed in the memory.</span></span></span></div>
<div class="MsoNormal">
<span style="background: white; font-size: 12pt; line-height: 107%;"><span style="color: #333333; font-size: 12pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></span></div>
<div class="MsoNormal">
<span style="background: white; font-size: 12pt; line-height: 107%;"><span style="color: #333333; font-size: 12pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><b>Differences</b> between Static linking and Dynamic linking:</span></span></span></div>
<div class="MsoNormal">
<span style="background: white; font-size: 12pt; line-height: 107%;"><span style="color: #333333; font-size: 12pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><span style="background: white; font-size: 12pt; line-height: 107%;"></span></span></div>
<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1056; width: 575px;">
<tbody>
<tr style="height: 29.2pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #5B9BD5; border-bottom: solid white 3.0pt; border: solid white 1.0pt; height: 29.2pt; padding: .75pt 5.4pt 0in 5.4pt; width: 58.15pt;" width="78"></td>
<td style="background: #5B9BD5; border-bottom: solid white 3.0pt; border-left: none; border-right: solid white 1.0pt; border-top: solid white 1.0pt; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 184.35pt;" width="246"><div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><b><span style="font-size: 12.0pt; line-height: 107%;">Static
linking</span></b><span style="font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></span></div>
</td>
<td style="background: #5B9BD5; border-bottom: solid white 3.0pt; border-left: none; border-right: solid white 1.0pt; border-top: solid white 1.0pt; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 189.0pt;" width="252"><div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><b><span style="font-size: 12.0pt; line-height: 107%;">Dynamic
linking</span></b><span style="font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></span></div>
</td>
</tr>
<tr style="height: 29.2pt; mso-yfti-irow: 1;">
<td style="background: #D2DEEF; border-top: none; border: solid white 1.0pt; height: 29.2pt; mso-border-top-alt: solid white 3.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 58.15pt;" valign="top" width="78"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Sharing
external program<o:p></o:p></span></span></div>
</td>
<td style="background: #D2DEEF; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 3.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 184.35pt;" valign="top" width="246"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">External
called program cannot be shared. It requires duplicate copies of programs in
memory. <o:p></o:p></span></span></div>
</td>
<td style="background: #D2DEEF; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 3.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Dynamic
linking lets several programs use a single copy of an executable module.<o:p></o:p></span></span></div>
</td>
</tr>
<tr style="height: 29.2pt; mso-yfti-irow: 2;">
<td style="background: #EAEFF7; border-top: none; border: solid white 1.0pt; height: 29.2pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 58.15pt;" valign="top" width="78"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">File size<o:p></o:p></span></span></div>
</td>
<td style="background: #EAEFF7; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 184.35pt;" valign="top" width="246"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Statically
linked files are significantly larger in size because external programs are
built into the executable files.<o:p></o:p></span></span></div>
</td>
<td style="background: #EAEFF7; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Dynamic
linking significantly reduces the size of executable programs because it uses
only one copy of shared library<o:p></o:p></span></span></div>
</td>
</tr>
<tr style="height: 29.2pt; mso-yfti-irow: 3;">
<td style="background: #D2DEEF; border-top: none; border: solid white 1.0pt; height: 29.2pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 58.15pt;" valign="top" width="78"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Easiness
to update<o:p></o:p></span></span></div>
</td>
<td style="background: #D2DEEF; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 184.35pt;" valign="top" width="246"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">In static
linking if any of the external programs has changed then they have to be
recompiled and re-linked again else the changes won't reflect in existing
executable file.<o:p></o:p></span></span></div>
</td>
<td style="background: #D2DEEF; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">In dynamic
linking individual shared modules and bug fixes can be updated and
recompiled.<o:p></o:p></span></span></div>
</td>
</tr>
<tr style="height: 29.2pt; mso-yfti-irow: 4;">
<td style="background: #EAEFF7; border-top: none; border: solid white 1.0pt; height: 29.2pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 58.15pt;" valign="top" width="78"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Speed<o:p></o:p></span></span></div>
</td>
<td style="background: #EAEFF7; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 184.35pt;" valign="top" width="246"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Programs
that use statically-linked libraries are usually faster than those that use
shared libraries.<o:p></o:p></span></span></div>
</td>
<td style="background: #EAEFF7; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Programs
that use shared libraries are usually slower than those that use
statically-linked libraries.<o:p></o:p></span></span></div>
</td>
</tr>
<tr style="height: 29.2pt; mso-yfti-irow: 5; mso-yfti-lastrow: yes;">
<td style="background: #D2DEEF; border-top: none; border: solid white 1.0pt; height: 29.2pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 58.15pt;" valign="top" width="78"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Compati-bility<o:p></o:p></span></span></div>
</td>
<td style="background: #D2DEEF; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 184.35pt;" valign="top" width="246"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">In
statically-linked programs, all code is contained in a single executable
module. Therefore, they never run into compatibility issues.<o:p></o:p></span></span></div>
</td>
<td style="background: #D2DEEF; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 1.0pt; padding: .75pt 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Dynamically
linked programs are dependent on having a compatible library. If a library is
changed, applications might have to be reworked to be made compatible with
the new version of the library.<o:p></o:p></span></span></div>
</td>
</tr>
</tbody></table>
<span style="font-family: Verdana, sans-serif;"><br /><span style="font-size: 12pt; line-height: 107%;"><b>Advantages:</b></span></span><br />
<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1056; width: 575px;">
<tbody>
<tr style="height: 29.2pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="background: #5B9BD5; border-bottom: solid white 3.0pt; border: solid white 1.0pt; height: 29.2pt; padding: .05in .1in .05in .1in; width: 206.5pt;" valign="top" width="275"><div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><b><span style="font-size: 12.0pt; line-height: 107%;">Static
linking</span></b><span style="font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></span></div>
</td>
<td style="background: #5B9BD5; border-bottom: solid white 3.0pt; border-left: none; border-right: solid white 1.0pt; border-top: solid white 1.0pt; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; padding: .05in .1in .05in .1in; width: 225.0pt;" valign="top" width="300"><div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><b><span style="font-size: 12.0pt; line-height: 107%;">Dynamic
linking</span></b><span style="font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></span></div>
</td>
</tr>
<tr style="height: 29.2pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="background: #D2DEEF; border-top: none; border: solid white 1.0pt; height: 29.2pt; mso-border-top-alt: solid white 3.0pt; padding: .05in .1in .05in .1in; width: 206.5pt;" valign="top" width="275"><div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12pt; line-height: 107%;">•<span style="font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 107%;">Static linking is efficient at run time. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12pt; line-height: 107%;">•<span style="font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 107%;">It has less system calls. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12pt; line-height: 107%;">•<span style="font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 107%;">Static linking can make binaries easier to distribute to diverse user
environment. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12pt; line-height: 107%;">•<span style="font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 107%;">It let the code run in very limited environments.<o:p></o:p></span></span></div>
</td>
<td style="background: #D2DEEF; border-bottom: solid white 1.0pt; border-left: none; border-right: solid white 1.0pt; border-top: none; height: 29.2pt; mso-border-left-alt: solid white 1.0pt; mso-border-top-alt: solid white 3.0pt; padding: .05in .1in .05in .1in; width: 225.0pt;" valign="top" width="300"><div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12pt; line-height: 107%;">•<span style="font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 107%;">Dynamic linking is more flexible.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12pt; line-height: 107%;">•<span style="font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 107%;">It is more efficient in resource utilization, taking less memory space,
cache space and disk space.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;"><span style="font-size: 12pt; line-height: 107%;">•<span style="font-size: 7pt; line-height: normal;">
</span></span><!--[endif]--><span style="font-size: 12.0pt; line-height: 107%;">It is easy to update and fix the bugs.<o:p></o:p></span></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><span style="background: white; font-size: 12pt; line-height: 107%;"></span></span></div>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; mso-yfti-tbllook: 1056; width: 1151px;">
<colgroup><col style="mso-width-source: userset; width: 77pt;" width="103"></col>
<col style="mso-width-source: userset; width: 374pt;" width="498"></col>
<col style="mso-width-source: userset; width: 412pt;" width="550"></col>
</colgroup><tbody>
<tr height="39" style="height: 29.2pt; mso-height-source: userset;">
<td class="oa1" height="39" style="height: 29.2pt; width: 77pt;" width="103"><div style="direction: ltr; language: en-US; line-height: 107%; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: center; unicode-bidi: embed; word-break: normal;">
</div>
</td>
<td class="oa1" style="width: 374pt;" width="498"><div style="direction: ltr; language: en-US; line-height: 107%; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: center; unicode-bidi: embed; word-break: normal;">
<span style="color: white; font-size: 18pt; font-weight: bold;"><span style="font-family: Verdana, sans-serif;">Static linking</span></span></div>
</td>
<td class="oa1" style="width: 412pt;" width="550"><div style="direction: ltr; language: en-US; line-height: 107%; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0pt; mso-line-break-override: none; punctuation-wrap: hanging; text-align: center; unicode-bidi: embed; word-break: normal;">
<span style="color: white; font-size: 18pt; font-weight: bold;"><span style="font-family: Verdana, sans-serif;">Dynamic linking</span></span></div>
</td>
</tr>
<tr height="39" style="height: 29.2pt; mso-height-source: userset;">
<td class="oa2" height="39" style="height: 29.2pt; width: 77pt;" width="103"><div style="direction: ltr; line-height: 107%; margin: 0pt 0in; unicode-bidi: embed; word-break: normal;">
<span style="font-family: Verdana, sans-serif;">Source:</span></div>
<div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0242a/ch04.html">http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0242a/ch04.html</a><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-size: 12.0pt; line-height: 107%;"><a href="http://stackoverflow.com/questions/1993390/static-linking-vs-dynamic-linking">http://stackoverflow.com/questions/1993390/static-linking-vs-dynamic-linking</a><span class="MsoHyperlink"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="MsoHyperlink"><span style="font-size: 12.0pt; line-height: 107%;"><a href="http://cs-fundamentals.com/c-programming/static-and-dynamic-linking-in-c.php">http://cs-fundamentals.com/c-programming/static-and-dynamic-linking-in-c.php</a><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span class="MsoHyperlink"><span style="font-size: 12.0pt; line-height: 107%;"><br /></span></span></div>
<div class="MsoNormal">
<span class="MsoHyperlink"><span style="font-size: 12.0pt; line-height: 107%;"><br /></span></span></div>
</td><td class="oa2" style="width: 374pt;" width="498"><span style="font-family: Verdana, sans-serif;"><br /></span></td><td class="oa2" style="width: 412pt;" width="550"><span style="font-family: Verdana, sans-serif;"><br /></span></td></tr>
</tbody></table>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-59148279108949530352014-09-19T07:54:00.004-07:002014-10-06T20:19:12.582-07:00SPO600: Lab2<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Brief description: </span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Wrote a simple c program to display “Hello World!”, and compiled it using command “gcc –g –O0 –
fno-builtin”. Then using command “objdump” with options –f, -d, -s, --source to
display the information of the output file.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">And then do the following changes to see the changes and
difference in the results. <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">5)<span style="background: white; line-height: 107%;"> Move the<span class="apple-converted-space"> </span></span><code><span style="background: rgb(249, 249, 249); line-height: 107%;">printf()</span></code><span class="apple-converted-space"><span style="background: white; line-height: 107%;"> </span></span><span style="background: white; line-height: 107%;">call to a separate function named<span class="apple-converted-space"> </span></span><code><span style="background: rgb(249, 249, 249); line-height: 107%;">output()</span></code><span style="background: white; line-height: 107%;">, and call that function from<span class="apple-converted-space"> </span></span><code><span style="background: rgb(249, 249, 249); line-height: 107%;">main().</span></code><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><span style="font-family: Verdana, sans-serif;"><code><span style="background: rgb(249, 249, 249); font-size: 10pt; line-height: 107%;"><br /></span></code></span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Original output file: a.out<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Output file after change: hello_all5.out<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><b>Before change:</b><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">When run the command: </span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFtFtKz8giLCXVywFs5WJqbcBDS18P4SCThCVcNJOovhXCr4P7gFsh22hHLT9FLRK9v8b8RraJOKeohribVtfcwsphVPiTGv7G3MdhZrYQ9a4m3WPMDLJi3sdl8Tvcrche0FS7QxClVT5v/s1600/lab2_1.png" imageanchor="1" style="font-family: Verdana, sans-serif; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFtFtKz8giLCXVywFs5WJqbcBDS18P4SCThCVcNJOovhXCr4P7gFsh22hHLT9FLRK9v8b8RraJOKeohribVtfcwsphVPiTGv7G3MdhZrYQ9a4m3WPMDLJi3sdl8Tvcrche0FS7QxClVT5v/s1600/lab2_1.png" height="20" width="320" /></a></div>
<!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_i1035" type="#_x0000_t75"
style='width:273pt;height:17.25pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\Lily\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"
o:title=""/>
</v:shape><![endif]--><br />
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">It only has main section for the source code:<o:p></o:p></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ5TWeQ7WO_5kNP2W82NNQr83K26AtwuU_kg4XRrVjGnPDyyj6TrrM5U2QD50ag07aL5dI9DBM-yktd_GK9dcHF2uwxxQ0COHuVsvTDsWQ_gS6-wOjQ-TQohVyjXusLJJkWj-GGtg9fKh5/s1600/Lab2_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ5TWeQ7WO_5kNP2W82NNQr83K26AtwuU_kg4XRrVjGnPDyyj6TrrM5U2QD50ag07aL5dI9DBM-yktd_GK9dcHF2uwxxQ0COHuVsvTDsWQ_gS6-wOjQ-TQohVyjXusLJJkWj-GGtg9fKh5/s1600/Lab2_2.png" height="307" width="640" /></a></div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://2.bp.blogspot.com/-zfrvTDF-8vo/VBw_kIHNFxI/AAAAAAAABGg/jSFOl-OOGxU/s1600/Lab2_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<!--[if gte vml 1]><v:shape
id="Picture_x0020_21" o:spid="_x0000_i1034" type="#_x0000_t75" style='width:420.75pt;
height:203.25pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\Lily\AppData\Local\Temp\msohtmlclip1\01\clip_image002.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><b>After change</b></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">When run the command: </span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYBYcZFcwR9CdDYnuD85CLrNMMDMQ5Eh079dzGHW0M1DMyOmQ9Y_9EDGsizmODSHSEiiVrRORqQeDsdiQPg4jngICpbbh3zUmrrRL6HYnMmjhTRrpQO6kPJT484Frn54ykpV7TSDznd3E6/s1600/lab2_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYBYcZFcwR9CdDYnuD85CLrNMMDMQ5Eh079dzGHW0M1DMyOmQ9Y_9EDGsizmODSHSEiiVrRORqQeDsdiQPg4jngICpbbh3zUmrrRL6HYnMmjhTRrpQO6kPJT484Frn54ykpV7TSDznd3E6/s1600/lab2_3.png" height="19" width="320" /></a></span></div>
</div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">It shows following:</span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGydJN3_V4sQTmpsWUk5kEdLLj4PoaiRC4MJw03On4UFRfeBUGbfZA5EuhL8TQUK7tG2gjnd8TjDo7wOQhjEmNsbuJ9ZkTDQhqsRzYYQCnJO65dviDVRCb9KTsrjHDYCVIVlJpKS1OR6Zf/s1600/lab2_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGydJN3_V4sQTmpsWUk5kEdLLj4PoaiRC4MJw03On4UFRfeBUGbfZA5EuhL8TQUK7tG2gjnd8TjDo7wOQhjEmNsbuJ9ZkTDQhqsRzYYQCnJO65dviDVRCb9KTsrjHDYCVIVlJpKS1OR6Zf/s1600/lab2_4.png" height="512" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://4.bp.blogspot.com/-UlbzPywTQu8/VBw_kSE00wI/AAAAAAAABHU/6zKtUngqvJw/s1600/lab2_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><span style="font-family: Verdana, sans-serif;"><br /></span></o:p></div>
<div class="MsoNormal">
<!--[if gte vml 1]><v:shape
id="Picture_x0020_18" o:spid="_x0000_i1032" type="#_x0000_t75" style='width:6in;
height:345.75pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\Lily\AppData\Local\Temp\msohtmlclip1\01\clip_image004.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">6) <span style="background: white; line-height: 107%;">Remove<span class="apple-converted-space"> </span></span><code><span style="background: rgb(249, 249, 249); line-height: 107%;">-O0</span></code><span class="apple-converted-space"><span style="background: white; line-height: 107%;"> </span></span><span style="background: white; line-height: 107%;">and add<span class="apple-converted-space"> </span></span><code><span style="background: rgb(249, 249, 249); line-height: 107%;">-O3</span></code><span class="apple-converted-space"><span style="background: white; line-height: 107%;"> </span></span><span style="background: white; line-height: 107%;">to the gcc options. Note and explain the
difference in the compiled code.</span><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">-O3 is to <span style="background: white; color: #222222; line-height: 107%;">optimize more
for code size and execution time. It reduces the execution time, but increase
the memory usage and compile time.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><span style="background: white; color: #222222; line-height: 107%;"><br /></span></span></div>
<div class="MsoNormal">
<span style="background: white; color: #222222; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Output file before change:
hello_all5.out<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="background: white; color: #222222; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">Output file after change:
hello_all6.out<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="background: white; color: #222222; line-height: 107%;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal">
<span style="background: white; color: #222222; line-height: 107%;"><span style="font-family: Verdana, sans-serif;">I use “time” command to
check the execution time of above files, and get following result.<span style="font-size: 10.5pt;"><o:p></o:p></span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQx-TgI8WRTaXHuLSHueIVeVOP3chRHkKEObEqib_P1XCDaU8qNizn9olZ6Y8SNVmmtZVu6QIvNmtD6fFWmc_V4WPDqg7xpy7PgXdtKARsVnXTZTn5Mp_IKd837_PSqd2LE_bZFI-VwttM/s1600/lab2_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQx-TgI8WRTaXHuLSHueIVeVOP3chRHkKEObEqib_P1XCDaU8qNizn9olZ6Y8SNVmmtZVu6QIvNmtD6fFWmc_V4WPDqg7xpy7PgXdtKARsVnXTZTn5Mp_IKd837_PSqd2LE_bZFI-VwttM/s1600/lab2_5.png" height="227" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://4.bp.blogspot.com/-g7k5y_Ywb-Q/VBw_kfWJP2I/AAAAAAAABGk/mSvtq3DWefY/s1600/lab2_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">hello_all6.out is complied with the option –O3. It supposes
to have less execution time. However, it takes much longer in real time than
the previous one. Well, it does take less time in sys time.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">I also compared the sizes of the output files with –O0 and
–O3. The hello_all5.out, which is compiled with –O0, has smaller size than
hell0_all6.out, being compiled with –O3. Apparently, compiling file with option
–O3 does not reduce the file size. Instead, it increases the file size.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_bSD-D81o9EtVctYbKWsSGP0u_NTlK9iZJZvzoWS-jKi-eNgakXfd0OP3Y3L795r4fl-ju931ntF3BiEq-uaSOPUaVfr3zsyZdz94PW-7NS_wpjap4dot8QTMRUwYQnQxzUQ1BWjqi_7i/s1600/lab_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_bSD-D81o9EtVctYbKWsSGP0u_NTlK9iZJZvzoWS-jKi-eNgakXfd0OP3Y3L795r4fl-ju931ntF3BiEq-uaSOPUaVfr3zsyZdz94PW-7NS_wpjap4dot8QTMRUwYQnQxzUQ1BWjqi_7i/s1600/lab_10.png" height="249" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://4.bp.blogspot.com/-DqIld0MR4Ek/VBxAtBkm4vI/AAAAAAAABHk/nbcMl23YTwI/s1600/lab_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div style="text-align: center;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Following sreenshots are the result by running “objdump
–source” command for both of the files.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Comparing the two results, I found:<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;">1<span style="font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif;">---</span><span style="font-family: Verdana, sans-serif; font-size: 7pt; text-indent: -0.25in;"> </span><span style="font-family: Verdana, sans-serif; text-indent: -0.25in;">The sequences of <main> section and
<output> section in both results are different. For the output file
hello_all5.out, being compiled with –O0 option, <main> section appears
after <frame-dummy> section. And <output> section is after
<main> section. By contrast, for the output file hello_all6.out, being
compiled with –O3 option, <main> section appears right after the line “
Disassembly of section .text”. And <output> section still appears after
<frame-dummy> section.</span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span style="font-family: Verdana, sans-serif; text-indent: -0.25in;"><br /></span></div>
<div class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Verdana, sans-serif;">2 ---The contents of <main> section and
<output> section are different for both results. For the output file
hello_all6.out, the contents of both <main> section and <output>
section are shorter than those in the result of hello_all5.out. It has 6
actions in <main> section of hello_all5.out and 9 actions in
<output> section of hello_all5.out. By contrast, there are only 3 actions
in <main> section of hello_all6.out and 4 actions in <output>
section of hello_all6.out.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim2QhgBlrPAcnEb9JfbdKbRc-q2CxVsq-LkKVUTFqeDXWMwvWttWtnlQJhyphenhyphenes3zvKtRVpbQb-EaBNEVAJWbMiq8WW6jc5fOoLjsgZpXyovZmibyeuo_RD-MgAALQ35ZWHSa3bsbbc5wn75/s1600/lab2_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim2QhgBlrPAcnEb9JfbdKbRc-q2CxVsq-LkKVUTFqeDXWMwvWttWtnlQJhyphenhyphenes3zvKtRVpbQb-EaBNEVAJWbMiq8WW6jc5fOoLjsgZpXyovZmibyeuo_RD-MgAALQ35ZWHSa3bsbbc5wn75/s1600/lab2_6.png" height="22" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://3.bp.blogspot.com/-MPSeXMe3K5Y/VBw_kgsusfI/AAAAAAAABGo/9aQxmE-5-tk/s1600/lab2_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<br />
<div class="MsoNormal">
<!--[if gte vml 1]><v:shape
id="Picture_x0020_6" o:spid="_x0000_i1029" type="#_x0000_t75" style='width:327pt;
height:20.25pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\Lily\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmtgD_rAID9Ru28fRVp8Z27PYj14gDum__JkIZqKl-kGLzySJL_z4ggyIeLCWy-RGPDt4u70c440hyY-jFTK3DgmAcaWjGMjnGV9wV3g8IBqzlKJoWE4cysQhbNkgc8skf8n8kpBipYm5A/s1600/lab2_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmtgD_rAID9Ru28fRVp8Z27PYj14gDum__JkIZqKl-kGLzySJL_z4ggyIeLCWy-RGPDt4u70c440hyY-jFTK3DgmAcaWjGMjnGV9wV3g8IBqzlKJoWE4cysQhbNkgc8skf8n8kpBipYm5A/s1600/lab2_11.png" height="640" width="547" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://3.bp.blogspot.com/-4Euq-LGuZ7Y/VBxBhJvJObI/AAAAAAAABHw/zn_QDF5x3CU/s1600/lab2_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://2.bp.blogspot.com/-mip3JpMVoIU/VBw_k1um8EI/AAAAAAAABGs/5kb32CVzmHk/s1600/lab2_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig_bq9sBI8Qbu5jeQOMzTm016cqzWOiLm1l94P5yLOH2oq1QdvOmCp4bii93pOzf36AJm1nHebQ8EzjHNmD6DxLi27McdWx3ko8GJ-MSf5EsU3naMDK96BZJGqaO_TQ1BDSBNcePIxzdP9/s1600/lab2_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig_bq9sBI8Qbu5jeQOMzTm016cqzWOiLm1l94P5yLOH2oq1QdvOmCp4bii93pOzf36AJm1nHebQ8EzjHNmD6DxLi27McdWx3ko8GJ-MSf5EsU3naMDK96BZJGqaO_TQ1BDSBNcePIxzdP9/s1600/lab2_7.png" height="21" width="400" /></a></div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://1.bp.blogspot.com/-AgCxIYajcdA/VBw_lLfNqLI/AAAAAAAABGw/RuFoiyNGUhw/s1600/lab2_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhriTR2Gk8SEUHNLsvrnfe9L7-ax6cc-gYyRd_2AoNxrITcs83301kx5chVqHf2nr9Bc-xb1yapyPJKwEi3oD1gCZBYdwbK03z_c-w6BhBcNiMuuoQiBiKMIF6ttPOfW3_LMF65ZnLkifQq/s1600/lab2_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhriTR2Gk8SEUHNLsvrnfe9L7-ax6cc-gYyRd_2AoNxrITcs83301kx5chVqHf2nr9Bc-xb1yapyPJKwEi3oD1gCZBYdwbK03z_c-w6BhBcNiMuuoQiBiKMIF6ttPOfW3_LMF65ZnLkifQq/s1600/lab2_8.png" height="232" width="640" /></a></div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://4.bp.blogspot.com/-a7xyFvZ91Ok/VBw_lePt-0I/AAAAAAAABG4/wT2L40Fx12U/s1600/lab2_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"></span></a></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDUfeUUiQ-I-kPJEYvUPLaSoOpwR45yfvnESqYO4zNPlhwtvl-clRHfN-6OzzpNPihifb3hyphenhyphenJVNIvA3LLfjzidqXUK2MgOBQZpepHqd3vSPmlf4wGJ5_zIxp8jlSKUNctRAMKTzxZInGai/s1600/lab2_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDUfeUUiQ-I-kPJEYvUPLaSoOpwR45yfvnESqYO4zNPlhwtvl-clRHfN-6OzzpNPihifb3hyphenhyphenJVNIvA3LLfjzidqXUK2MgOBQZpepHqd3vSPmlf4wGJ5_zIxp8jlSKUNctRAMKTzxZInGai/s1600/lab2_9.png" height="388" width="640" /></a></div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<span style="font-family: Verdana, sans-serif;"><br /></span>
<div class="MsoNormal">
<!--[if gte vml 1]><v:shape
id="Picture_x0020_8" o:spid="_x0000_i1027" type="#_x0000_t75" style='width:329.25pt;
height:18pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\Lily\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div>
<div class="MsoNormal">
<!--[if gte vml 1]><v:shape
id="Picture_x0020_23" o:spid="_x0000_i1026" type="#_x0000_t75" style='width:6in;
height:157.5pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\Lily\AppData\Local\Temp\msohtmlclip1\01\clip_image010.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div>
<div class="MsoNormal">
<!--[if gte vml 1]><v:shape
id="Picture_x0020_24" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:6in;
height:262.5pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:\Users\Lily\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="font-family: Verdana, sans-serif;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">When I ran “objdump –s” for both files, I found more
differences.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Contents of section .debug_line and contents of section
.debug_str are shorter than the result of hello_all6.out. Moreover, the result
generate by hello_all6.out has one more section – contents of section
.debug_ranges.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Contents of section. debug_str generated by hello_all5.out<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">It is good to know that using different compiling options,
the compiler compiles the program in different ways. Each option serves the
different purposes. Accordingly, the assembler contents of each object files
are different as well. <o:p></o:p></span></div>
<br />
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif;">Using “objdump” command, it is good to see the assembler
contents of the object file. It’s a good start to learn the assembly language.
However, I still don’t fully understand what the assembler contents stand for.
With learning more assembly language, I think it won’t be a problem for me
anymore.</span><o:p></o:p></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-77392979032308369762014-09-14T09:56:00.002-07:002014-09-14T09:56:30.328-07:00OSD600/DPS909: First Glance at Node.js<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">I
firstly heard about the Node.js from my friend, who worked at CDOT @ Seneca. He
told me Node.js is a server side Javascript and his main job was working with
Node.js. Then I got the frist impression about Node.js, which is a JavaScript
library in server side.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">Now
I take the course Open Source Development. Node.js is one of the topics in the
list of the Case Study. To be honest, Node.js is the only topic that I have
heard about. It is an opportunity for me to dig out what is Node.js and how it
works on the server.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">This
is what is Node.js on Wikipedia:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">“Node.js<span style="text-align: start;"> is
a <span style="color: windowtext; text-decoration: none; text-underline: none;">cross-platform</span> <span style="color: windowtext; text-decoration: none; text-underline: none;">runtime environment</span> for server-side and networking applications. Node.js
applications are written in <span style="color: windowtext; text-decoration: none; text-underline: none;">JavaScript</span>, and can be run within the Node.js runtime on <span style="color: windowtext; text-decoration: none; text-underline: none;">OS X</span>, <span style="color: windowtext; text-decoration: none; text-underline: none;">Microsoft
Windows</span> and <span style="color: windowtext; text-decoration: none; text-underline: none;">Linux</span> with no changes<span style="background: white; color: #252525; font-size: 10.5pt; line-height: 107%;">.</span>”<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify; text-justify: inter-ideograph;">
<span style="text-align: start;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;"><span style="background: white; color: #252525; line-height: 107%;">And according to the Wikipedia, Node.js is gaining
popularity and is adopted as a high-performance server-side platform<span class="apple-converted-space"> </span>by<span class="apple-converted-space" style="font-size: 10.5pt;"> </span></span><span style="color: windowtext; text-decoration: none; text-underline: none;">Groupon</span><span style="text-align: start;">,</span> <span style="color: windowtext; text-decoration: none; text-underline: none;">SAP</span><span style="text-align: start;">,</span> <span style="color: windowtext;">LinkedIn</span><span style="text-align: start;">,</span> <span style="color: windowtext; text-decoration: none; text-underline: none;">Microsoft</span><span style="text-align: start;">,</span> <span style="color: windowtext; text-decoration: none; text-underline: none;">Yahoo!</span><span style="text-align: start;">,</span> <span style="color: windowtext; text-decoration: none; text-underline: none;">Walmart</span><span style="text-align: start;">,</span> and <span style="color: windowtext; text-decoration: none; text-underline: none;">PayPal</span><span style="text-align: start;">.</span> <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="text-align: start;"><span style="font-family: Verdana, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">In
nodejs.org, Node.js is described as follows:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">“Node.js® is a platform built on <span style="color: windowtext; text-decoration: none; text-underline: none;">Chrome's JavaScript runtime</span> for easily building fast, scalable network
applications. Node.js uses an event-driven, non-blocking I/O model that makes
it lightweight and efficient, perfect for data-intensive real-time applications
that run across distributed devices.”<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">Here
it provides more information about Node.js. It describes that Node.js uses an
even-driven, non-blocking I/O model, which I will find out what the meaning of
these words are later.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">The
first project I work on in OSD600 is to enable Filter have “du” functionality
as Unix does. Filer is a POSIX-like file system interface for node.js and
browser-based JavaScript. It seems that my research on Node.js will be
helpful on my first project. And I may keep work on Filer in my later projects,
or may switch to MakeDrive (<span style="color: windowtext; text-decoration: none; text-underline: none;">MakeDrive</span><span style="text-align: start;"> is a JavaScript library and server (node.js)
that provides an offline-first, always available, syncing filesystem for the
web.</span>), which I am interest in. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<br /></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<br /></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;">Source: </span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Verdana, sans-serif;"><a href="http://en.wikipedia.org/wiki/Node.js">http://en.wikipedia.org/wiki/Node.js</a></span></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<a href="http://nodejs.org/" style="font-family: Verdana, sans-serif; text-indent: 0.5in;">http://nodejs.org/</a></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<a href="https://github.com/js-platform/filer" style="font-family: Verdana, sans-serif; text-indent: 0.5in;">https://github.com/js-platform/filer</a></div>
<div class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
<a href="http://blog.humphd.org/introducing-makedrive/" style="text-indent: 0.5in;"><span style="font-family: Verdana, sans-serif;">http://blog.humphd.org/introducing-makedrive/</span></a></div>
<div class="MsoNormal" style="text-align: justify; text-indent: .5in; text-justify: inter-ideograph;">
<o:p></o:p></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-17180411248282248572014-09-14T08:31:00.003-07:002014-09-14T09:57:22.520-07:00SPO600: Procedure of bug fixing on open source software - Bug 1041788@ Bugzilla@Mozilla<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">I used advance search at Bugzilla@Mozilla with following
criteria: Status-Resolved, Product-Firefox, Resolution-Fixed, and
Classification-Client Software to find a resolved bug. It showed me a listed
bug met above-mentioned criteria. I sorted them by date of Changed and found <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1041788"><span style="color: windowtext; text-decoration: none; text-underline: none;">Bug 1041788</span></a> - Unable
to close tab after slow script warning at chrome://browser/content/tabbrowser.xml:1989.
The reason why I chose this bug is because this bug is unusual and there were a
lot of conversations about it. It is easy for readers to understand what’s
going on during the process. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">This bug was reported on 2014-07-21 and was modified on
2014-08-06. There were 11 users involved in the comments. The user, bull500,
who reported the bug, has less experience in the community. And the user, Mike
Conley, is the one who was assigned to solve the bug and has a lot of experience
in this community. And there were some other experience users and QA (Paul
Silaghi) contact in the reviews.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">During the bug fix procedure, user bull500 reported a bug,
which is unable to close the table after opening a large number of tags and
showing a slow script warning, together with more details like the OS /
software version, steps to reproduce and the results. Then Paul and Mike tried
to reproduce it. Paul failed. But Mike did and found where cause the bug. And
then Mike asked another experience user’s (Tim’s) opinion about this bug. Tim
suggested a patch for this bug and asked the bull500’s and Mike’s feedback.
They did not have the issue after install the patch. Thus the bug is resolved.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">The whole process for resolving this bug took 16 days. Bull500
got the response the day after he reported the bug. When he reported that he
met the same issue 5 days after, he received immediate response. Then they
actively discussed the issue and found out where it came from. 9 days after the
bug was reported, the solution came up. In the following days, they discussed
how the solutions worked.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;">Moreover, I also browsed the Bugzilla@Eclipse. It has the
exact same procedure as Bugzilla@Mozilla has.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Verdana, sans-serif;"><span style="line-height: 107%;">After reviewing the procedure of above bug, I have
some ideas on </span>how the open source software works on resolving the bugs.
However, I am still confused about who assigns the tasks or how developers take
the task.<span style="line-height: 107%;"> </span></span></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-12145218838351884372014-09-07T16:02:00.001-07:002014-09-07T16:02:26.354-07:00OSD600/DPS909: Opened license vs. Closed license/EULAs<div class="MsoNormal">
I read the BSD 2-Clause License and Skype’s license. I was
surprised following facts about these two types of license. First of all, the
length of the licenses are quite different. BSD 2-Clause license is very short.
On the contrary, Skype’s license is quite long. Second, the content of the
license have the big difference as well. BSD 2-Clause license only contains the
license template and conditions to redistribute and use. Skype license have
much more content, containing 22 sections. Each section is about the different
aspects, such as charges, payments, and license, use of the software and
products and Skype and so on. It puts as much as possible related content into
the license. Third, the tone and the words they used in these two license are
different. BSD 2-Clause license is not strictly like a business document. The
Skype license is a formal business document. It has everything that a formal
business document should have.<o:p></o:p></div>
Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-22932462496886405442012-12-01T16:53:00.003-08:002012-12-01T17:08:02.881-08:00Week 9 _unsigned int size()unsigned int Queue::size() {<br />
unsigned int size=0;<br />
Node* n = _head;<br />
if(!isEmpty()){<br />
size =1;<br />
while(n!=_tail) {<br />
size++;<br />
n = n->_next;<br />
}<br />
}<br />
return size;<br />
}Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-33434113618049294552012-12-01T16:53:00.002-08:002012-12-01T17:07:53.894-08:00Week 9_int& operator[](unsigned int index)int& Queue::operator[] (unsigned int index){<br />
unsigned int size = this->size();<br />
Node* idx = _head;<br />
for(int i=0; i<int(index%size); i++){<br />
idx = idx->_next;<br />
}<br />
return idx->_data;<br />
}Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-75041540771167788152012-11-29T20:05:00.000-08:002012-12-02T09:51:25.027-08:00Week13_Display the environment variable path#include <iostream><br />
using namespace std;<br />
<br />
int main(int argc, char* argv[], char* env[]) {<br />
int len = strlen(env[0]);<br />
int pos = 0;<br />
int i=0; <br />
while(env[0][i] != '='){<br />
i++;<br />
}<br />
for(pos = i+1;pos<len;pos++){<br />
cout <<env[0][pos];<br />
}<br />
cout<<endl;<br />
return 0;<br />
}Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-9438338389526924042012-11-29T19:40:00.001-08:002012-12-01T17:22:33.578-08:00Week13_StrCat function - Concatenate optional strings#include <iostream><br />
#include <cstdarg><br />
#include <string.h><br />
using namespace std;<br />
<br />
char* StrCat(char* des, char* src1, ...);<br />
int main() {<br />
char str[500] = "Fred";<br />
StrCat(str, "Soly", "Moly", 0);<br />
cout << str << endl;<br />
return 0;<br />
}<br />
<br />
char* StrCat(char* des,char* src1, ...) {<br />
strcat(des, src1);<br />
va_list varg;<br />
va_start(varg, src1);<br />
char* i =va_arg(varg, char*);<br />
while(i!=0) {<br />
strcat(des, i);<br />
i = va_arg(varg, char*);<br />
}<br />
va_end(varg);<br />
return des;<br />
}<br />
<br />
output is :<br />
FredSolyMolyLily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com1tag:blogger.com,1999:blog-1957628111765778855.post-90077736655523206722012-11-12T17:51:00.001-08:002012-12-01T20:31:05.229-08:00Week11_prnBitOneLn(unsigned int Val)Writing print bit function in one line as follows:<br />
<br />
void prnBitsOneLn(unsigned int Val){<br />
for(unsigned int bitNo = sizeof(Val)*8; bitNo > 0; printf("%d", !!(Val&(1<<(bitNo-1)))),bitNo --);<br />
}Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0tag:blogger.com,1999:blog-1957628111765778855.post-87149802259075978652012-11-11T16:08:00.000-08:002012-12-01T17:22:00.241-08:00Week11_void bitDump(void* memAddress, unsigned int memSize)By given memory address and the size, output what the given memory has on the screen:<br />
<br />
void bitDump(void* memAddress, unsigned int memSize) {<br />
unsigned char* p = (unsigned char*) memAddress;<br />
int i;<br />
for (i=0; i < memSize; i++) {<br />
unsigned int n = 1 << (sizeof(p)*8 -1);<br />
while(n) {<br />
printf("%c", !!(p[i] && n));<br />
n = n >> 1;<br />
}<br />
}//end forloop<br />
}<br />
<br />Lily Fanhttp://www.blogger.com/profile/07753344023602330692noreply@blogger.com0