Friday, May 8, 2015

CB Citizenship Project - Community Program

Community Program



Nama : Alvin Theodora
NIM  : 1801428434

Isi Laporan :
After a week had passed, we went back again to Yummy Yummy restaurant, and introduce them about social media that I and my partner have created.
Just like Ayam Bakar Cirebon before, we have created Twitter and Instagram for Madam Anisa. People can find Yummy Yummy on twitter @YummyYummy and also on instagram with the same username.
We are also explaining to them what is social media and how to use them. Madam Anisa  seems to be confused at first, but we try to introduce them and get them to know it for promoting the restaurant.

Friday, May 1, 2015

CB Citizenship Project - Community Program

Community Program



Nama : Alvin Theodora
NIM  : 1801428434

Isi Laporan : 
After Ayam Bakar Cirebon Pak Kumis, we selected our next candidate which is called Yummy Yummy. Madam Anisa is the owner of this restaurant, we ordered Capucino Cincau because it looks great. The taste of that particular drink is very refreshing and also quite cheap.
Madam Anisa also agreed to help us with our CB project, so we conducted a short interview with her and here’s the result that we got
-She had been opening Yummy Yummy about 7 months
-Yummy Yummy opens at 7am and closes at 7pm
-She could get around 600 thousand rupiah each day
-Madam Anisa never had a social media before and never had a special promotion for her business
And we have decided to help Madam Anisa to promote her marginal restaurant through social media.



Monday, April 27, 2015

CB Citizenship Project - Community Program

Community Program



Nama : Alvin Theodora
NIM  : 1801428434

Isi Laporan : 


After we visited to Ayam Bakar Cirebon last week, we came back to the place again for the second time in the next week.
Between that week, I and my partner are discussing and making social media for the restaurant. We are going to help them to promote their products from the social media itself. And we have decided to create 2 different kinds of social media, the first social media is Twitter(@KumisAyam). We’ve chosen twitter for our first social media because it is simple to use even for new people and also most of the Indonesian people are using twitter.
Second, the social media we are using is Instagram(@KumisAyam), we have chosen instagram as our second media because it shares pictures so, people can know what they are selling and of course many Indonesian people are still using this social media.
After making the social media, we explain to them what is social media and how does it work. They are a little bit confused on how to use it at first, but we try to explain and maintain it for promoting the restaurant.


Monday, April 20, 2015

CB Citizenship Project - Community Program


Community Program




Nama         : Alvin Theodora
NIM            : 1801428434

Isi Laporan :

Since our project goal is to promote small and marginal food store to public, we decided to go to "Ayam Bakar Cirebon Pak Kumis" restaurant, a marginal grilled chicken restaurant located at Alam Sutera. We came there and ordered two sets of grilled chicken and rice, and as what we expected, the taste is delicious, and is definitely worth to try. The price is also friendly for student like us. The owner of this restaurant is Pak Darmadi, he has been opening this restaurant for almost 9 years, and has one branch located behind Living World Mall. He can sell up to 40 chickens in a day with revenue 2 million rupiahs. This restaurant opens from 10 a.m and closes at 8 p.m.

Due to lack of information of social media, Pak Darmadi never promotes his restaurant in social media, and we have decided to help Pak Darmadi to make him one and promotes his business.




Saturday, March 21, 2015

Run For Leprosy 2015 - Alvin Theodora 1801428434

Nama : Alvin Theodora
NIM   : 1801428434

Pada tanggal 15 Maret lalu, kami melakukan sebuah charity event untuk saudara-saudara kita yang terkena penyakit kusta / pernah terkena penyakit kusta yang diselenggarakan oleh BINUS University.

Kesan saya setelah mengikuti acara tersebut adalah saya sangat terkesan atas kepedulian orang - orang di sekitar saya karena mereka perduli terhadap sesama dan mau membantu sesama yang sedang kesusahan atau membutuhkan bantuan.

Pesan saya juga terhadap semua panitia dan peserta pada event tersebut, semoga apa yang sudah kita lakukan dapat direalisasikan dan ditargetkan kepada orang-orang yang memang membutuhkan pertolongan, dan juga semoga charity event seperti ini dapat terus dilakukan karena ini merupakan tindakan yang positif bagi diri sendiri maupun untuk orang lain.

Penyakit kusta merupakan penyakit yang disebabkan oleh bakteri dan dalam jangka waktu yang lama, dapat merusak sistem saraf, kulit, anggota gerak, maupun mata. Namun, penyakit kusta dapat dicegah dengan cara mengetahui gejala-gejalanya, oleh karena itu sosialisasi yang baik dari berbagai pihak pun perlu diterapkan agar masyarakat mengetahui betul tentang gejala-gejala dari penyakit kusta, sehingga penyakit ini dapat dicegah penyebarannya.

Event Run For Leprosy ini pun dapat membantu saudara-saudara kita yang memang membutuhkan pertolongan, dan semoga charity event ini dapat digunakan sebaik-baiknya untuk pengobatan, penyuluhan, dan cara-cara lainnya untuk menolong sesama kita.

Monday, January 5, 2015

Assignment 9 Programming Language Concepts

Name : Alvin Theodora
NIM   : 1801428434

Here is the ninth assignment of Programming Language Concepts course. The question is taken from "Concepts of Programming Language, 10th edition" from Robert W. Sebesta in chapter 9:

Review Questions

1. What are the three general characteristics of subprograms?
=  
- Each subprogram has a single entry point.
- The calling program unit is suspended during the execution of the called subprogram, which implies that there is only subprogram in execution at any given time.
- Control always returns to the caller when the subprogram execution terminates.

2. What does it mean for a subprogram to be active?
. It means that after having been called, a subprogram has begun execution but has not yet completed that execution.

3. What is given in the header of a subprogram.
=  subprogram header, which is the first part of the definition, serves several purposes. First, it specifies that the following syntactic unit is a subprogram definition of some particular kind.1 In languages that have more than one kind of subprogram, the kind of the subprogram is usually specified with a special word. Second, if the subprogram is not anonymous, the header provides a name for the subprogram. Third, it may optionally specify a list of parameters.

 4. What characteristic of Python subprograms sets them apart from those of other languages?
One characteristic of Python functions that sets them apart from the functions of other common programming languages is that function def statements are executable. When a def statement is executed, it assigns the given name to the given function body. Until a function’s def has been executed, the function cannot be called.
Consider the following skeletal example:if . . .
def fun(. . .):
. . .
else
def fun(. . .):
. . .

5. What languages allow a variable number of parameters ?
C,C++,Perl JavaScript, and Lua. Also, C# allows methods to accept a variable number of parameters, as long as they are of the same type.


Problem Set

1. What are arguments for and against a user program building additional definitions for existing operators, as can be done in Python and C++? Do you think such user-defined operator overloading is good or bad? Support your answer.
=  FOR:
It allows the developer to program using notation “closer to the target domain” and allows user-defined types a similar level of syntactic support as types built into the language. It can easily be emulated using function calls.

AGAINST:
It can be implemented according to user’s want, eventhough it is not logically true.

I think such user-defined operator overloading is good as long as user use it according to its logical rules. User must use for example, + operator to be overloaded to implement “add” not “substraction”. And sometimes, in C++ there is condition when user need to add many data in class, so user-defined operator like this is needed to make it easier.

2. . In most Fortran IV implementations, parameters were passed by reference, using access path transmission only. State both the advantages and disadvantages of this design choice.
The main advantage of this method is the fast accesses to formal parameters in subprograms. The disadvantages are that recursion is rarely useful when values cannot be passed, and also that a number of problems, such as aliasing, occur with the method.

3. . Argue in support of the Ada 83 designers’ decision to allow the implementor to choose between implementing in out mode parameters by copy or by reference.
The tradeoff is one of efficiency of passing parameters vs. efficiency of accessing the parameters in the subprogram. Ada leaves this choice to the implementor, rather than forcing a single solution, because different situations may require different approaches. Passing a large array which the subprogram only accesses a few times is faster with reference. Passing any argument that the subprogram accesses a lot is faster with copy.

4. Suppose you want to write a method that prints a heading on a new output page, along with a page number that is 1 in the first activation and that increases by 1 with each subsequent activation. Can this be done without parameters and without reference to nonlocal variables in Java? Can it be done in C#?
This can be done in both Java and C#, using a static (or class) data member for the page number.

5. Consider the following program written in C syntax:
void swap(int a, int b) {
int temp;
temp = a;
a = b;
b = temp;
}

void main() {
int value = 2, list[5] = {1, 3, 5, 7, 9};
swap(value, list[0]);
swap(list[0], list[1]);
swap(value, list[value]);
}

For each of the following parameter-passing methods, what are all of the values of the variables value and list after each of the three calls to swap?
a. Passed by value
b. Passed by reference
c. Passed by value-result

 a. Passed by value
-value =1 , list[5] = {2,4,6,8,10}
b. Passed by reference
-value =6, list[5] ={4,1,2,8,10}
c. Passed by value-result
-value =6, list[5] ={4,1,2,8,10}