Jumat, 15 Mei 2015

Closing and Conclusion


NIM                      : 1801428554
Name                   : Rizky Andiputra


On this day we also dropped all the garbage we had been collecting and give it to Abu and Co. Abu and Co. is a garbage disposal and place for recycling inorganic garbage. It is located at Jl. Cemara Raya RF1/3 BSD City.


Besides being a place for recycling inorganic garbage, this place also provides garbage bank. People can come there and collect some kilograms of inorganic garbage then they can have money from it. One kilogram of inorganic garbage can be exchanged with Rp 2000,-. For us this is great, because it makes people want to collect inorganic garbage instead of throwing it away.



These are some of our photos with the person in charge today (sorry but we forgot what her name is). She welcomed us, asked us several questions, and support our activity. 

As a conclusion, I think actually people need more motivation to collect the garbage instead of littering, and Abu and Co. is an example to motivate people to stop littering. They have the same mission with us: to keep the environment clean. We really hope that there are a lot of people feel motivated and would do the same campaign with us.

Day 4 Garbage Collecting



NIM                      : 1801428554
Name                   : Rizky Andiputra

Today we were doing this activity again. We chose 1G sector in Gading Serpong as the place for today's activity. As usual, there were a lot of litter on this area. This is a new area for us, we hadn't do our activity here so maybe there were still a lot of people that hadn't notified about our project and mission to keep the area clean. 

In this place, the litters were mainly plastic bottles and food wrappings. That place also located near some residence, so maybe many the litters were left by them. 



While we were taking litters, it was suddenly raining. Then we took a rest for a while and explaining to people around us that we have this project, to keep the environment clean and to start the no littering campaign.



Jumat, 24 April 2015

Day 3 Garbage Collecting


NIM                      : 1801428554
Name                   : Rizky Andiputra

This is the third day of our activity taking litters from the streets. Today we were doing this activity in different place as before. Previously we took place near Summarecon Digital Centre, but today we were doing this activity in 1B sector, Gading Serpong. 

At the time we arrived at that place, we saw lots of litters around that area, some of them were near the bushes and the sidewalk. Those were the proof that people around there are still don't care about the environment. They still litter everywhere they want. 


While we were taking the litters, there were some people around the location looking at us curiously. They probably asking why we were taking litters because on that area there should be another people responsible for the litters. There was also one man commenting about the cleanliness on that area. 

For me, it is our responsibility to keep the streets clean, at least streets around the place we live in. Because no matter who threw the litter, it would make our area dirty and it could affect the drain system. If we don't keep our area clean, then who will?

Jumat, 10 April 2015

Day 2 Garbage Collecting



NIM                      : 1801428554
Name                   : Rizky Andiputra

Today, we were doing the activity again. The area is still the same as the previous one. We still took place near SDC (Summarecon Digital Centre). On this day, we were not just collecting litters from the street, but we also notify the people around SDC to try to stop littering. We were doing these activity for around 1 hour, mostly collecting the litters. 


We expect that our action before inspired and make people around SDC realize that litters and garbage is one of the issues that supposed to be concerned. We thought that at least the litters were decreasing, but in fact it was  increasing. 

After collecting litters, we did our second activity: telling people the importance to keep the environment clean. Some of the people felt offended while told them. Probably they thought that we accused them of littering, even though we didn't mean to.

We actually hope that our activity today could make people around us feel like they are also responsible of the environment, because nowadays many people think that keeping the environment clean is not their job, there are some workers that supposed to do that. But keeping the environment clean is our responsible to, and we can do it by throw the litters to the trash bin instead of throw it on the street.

Jumat, 03 April 2015

Day 1: Garbage Collecting


NIM                     : 1801428554
Name                   : Rizky Andiputra

This is the first day of my project activity. Basically my project is collecting inorganic litters from the streets around Gading Serpong. Me and my partner, Michael Jamestong, had done a little research around Gading Serpong. We have seen a lot of inorganic litters that being thrown on the street. This is the reason why we want to do this project around Gading Serpong. 

For the first day, we decided to take place around Summarecon Digital Centre. We spent around an hour to collect the litters that mainly plastic wrappings and bottles. Besides that, we also found some Styrofoam on that place. 


After an hour doing the activity,  we decided to end the activity for today. We have collected a plastic bag full of litters today. For me, it is a real issue, because we as Indonesian already have the habit to throw the litter on the street. This is a bad habit that we have to stop. 

Minggu, 22 Maret 2015

Run For Leprosy

Run for Leprosy is an event that Teach For Indonesia held to increase the awareness and solidarity to people who has leprosy. Leprosy is an infectious disease that causes severe, disfiguring skinsores and nerve damage in the arms and legs. Leprosy is caused by a slow-growing type of bacteria called Mycobacterium leprae . It interfere the granuloma of the nerves, skin, and respiratory system. 

Leprosy is a curable disease. It can now be cured with treatment. There are several antibiotics for leprosy. Leprosy itself has 2 different types: paucibacillary and multibacillary. Those 2 types are both can be cured.

As a runner, I felt that the event was fun. After entering the university, I hardly ever doing some sports. It was a great opportunity to go running with some of my friends. It was also my first time having a marathon race. I feel addicted to join this kind of activity.

For me, the socialization of leprosy is needed. Many people out there having perception that leprosy can't be cured. We should let people to know more about this disease and change the perception about it.

Here are some of my photos that taken at the venue.


Rizky Andiputra
1801428554


Senin, 05 Januari 2015

About Me

Name             : Rizky Andiputra
Student ID     : 1801428554
Class              : LC02
Course           :  Programming Language Concept
Lecturer         : Tri Djoko Wahjono, Ir.,M.Sc.

CHapter 9: Subprograms

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}