My Two Cents

A blogging site from a hacker.

Is Your Programming Boring?

  1. Programming is Boring

    Boring is a feeling when people is suffering the same things again and again. But my question is how programming could be the same things, in that case programmers should make that specific program reusable, for instance making that kind of program into a shared library.
    Programming is a kind of creation consuming work, in the way of not only the working style programmer could enjoy but also the coding style in a specific program. Actually, programmers in most companies are allowed to choose computers they like to work on, and while coding, programmers could also improve their programs’ algorithms. Thus, programming may not be felt so boring.

  2. You Spend Most of Your Working Life in Front of a Computer Screen

    Computers did change the life styles of people as TV did long times ago. Even if people is not working on programming such as an officer from bank, they still work in front of a computer screen every business day.

  3. You Have to Work Long Hours

    Every job in the real world needs to work long hours.

  4. Programming is Asocial

    Programmers are regarded as geeks, but sometimes as nerds. However, using asocial to describe them is unreasonable. From my experience, programmers are likely lack of the capability of socialization as others, even some of them are not easily to communicate with. But considering the programming characteristics, they are actually lack of the possibility of directly contact with people.

  5. Programming is Only for Those Who Think Logically

    Logic gets a high level for programming, because programs themselves are organized and running logically. But programming is now involved a large range of things, in which not only logic but also creative thinking as used in painting, music and dancing.

  6. Software is Being Outsourced

    This may be the topic especially for Americans. But anyway, even if we have international cooperation of programming, understanding how to programming and mastering the skills is still indispensable. This is not only because software sometimes involves security problems but also because design and analysis of software is highly related to programming.

  7. Programming is a Well-Paid Profession

    It is on some average well-paid. Considering the underlying working to become a proficient programmer and the value he/she contributed, this kind of job is paid evenly.

Minix IPC Server Design



Overview

Overview of MIPC

How to install

  1. cd /usr/src/tools
  2. make install
  3. boot to the customized image, you will see kernel ds … mipc init
  4. check mipc server is running: pe -e | grep mipc

Source code folder

/usr/src/servers/mipc

function

PUBLIC int main(int argc, char *argv[]);
  • the function will maintain an infinite while loop to handle all system calls.
  • it will match which function is requested and pass the call to a manager.
PUBLIC int check(int uid, int group_id, int action);
  • There is a configuration file to define the privelege of each group created by users. The structure of this file is like this:
+—–+—————-+
|user1|(user2 user3) |
|user2|(user1) |
|user3|(user1) |
+—–+—————-+
  • This means the group created by user1 is allowed to be subscribed or published by user1, user2 and user3. The group created by user2 or user3 is allowed both themselves and user1 to become the subscriber or publisher of this group.
  • The parameter uid is the user’s id.
  • group_id is the id of the group defined internally in the server.
  • action is the action needs to be checked: declare_subsciber or declare_publisher.
  • The return value could be 0 (false), 1 (true) and -1 (error).

library

  • It should provide a header file by including which a user process should be allowed to use the system calls.

HTML5 Web App Design Pattern: Is MVC Mode Correct?

MVC is a traditional pattern to develop a web project in many aspects and languages. All main stream languages have their own implementation of MVC framework, some of which have more than one framework, such as Java. Actually MVC is a classical design pattern which is used to develop large scale projects. It is now heavily used in the back-end software development in modern view of web projects. Some famous frameworks, such as Rails, are especially good at this point. So MVC is so successful in modern eara.

MVC, in my opinion, is too successful that it is very easy for developers to build this imagination to other levels of project stacks involving Web Server development, caching system in many layers of an OS, message-passing system in distributed system and even Cloud computing. As we know, Web 2.0 brings not only interest profit but also challenges, one of which is the design pattern of front-end which is usually a sub-project implemented in javascript. Even though javascript is not a well-designed language in browsers, we have no other choices. Therefore developers could be very willing to use MVC in front-end javascript projects.

However,front-end development is highly related to manipulations on the elements in a web page. The more we are using MVC in a html page, the more tricks we are adding to. Because the underlying operations of MVC make the page to add elements and remove elements again. There are many disadvantages in this approach. The performance may be loss since MVC deletes elements and adds elements again and again. MVC mode is usually involved in many lines of code, because the javascript not only has to handle the page rendering but also the functionalities of the page. If the front-end rendering of one function is tight-up with that of other functions, the code is not reusable in other projects or even other pages.

Minix 3 Keyboard Driver Development

Last semester, we have an OS class named Operating System Design and Implementation. In that class, we learned a lot of concepts used in OS. The most important part is that we have plenty of time to implement the knowledge through a few related projects.

This is video is captured for helping other members in our project group to get familiar with the normal progress of how to develop keyboard driver under Minix 3.



Languages Are Trivial

The more programming languages I learned, the more I hold the feeling that languages are trivial things in Computer Science.

Peoples are always discussing what is how to implemented in what language and what language is better than others. From the point of view of applying those technologies to the real world projects, they are correct, because knowing details of languages they are using will be very helpful to the implementation of projects they are working. However, languages themselves are actually a mixture of syntax and grammars, which are defined in compilers; and the how the languages are working is defined in the system, who has the rules that compilers have to follow either. The more programming languages I learned, the more I hold the feeling that languages are trivial things in Computer Science. For one thing that could be implemented in A language, it is very likely that it can be also implemented in B language. But what are the differences between A and B? In the perspective of coding, A and B maybe hold very diverse syntax and grammars, but actually they will be compiled to almost the same machine languages. So they could be viewed as the same program in the view of an operating system.

Hello, World!

Hello, world! is usually used in the start up of a tutorial to a programming language. However, here, it is used as my first blog.