Lari pagi yang seru dan membantu sesama (RUN FOR LEPROSY 2015)

Minggu lalu tepat nya tanggal 15 Maret, saya mengikuti acara Run for Leprosy dimana merupakan kegiatan yang menunjukan kepedulian kita terhadap sesama saudara kita yang sedang sakit ataupun sudah sembuh dari penyakit KUSTA atau kata lain nya Leprosy.

Acara terbeut diadaikan oleh Teach For Indonesia (TFI) dari BInus dan diselenggarakan di Alam Sutera. Hasil dari kegiatan ini, 100% akan di sumbangkan dan di gunakan bagi Komunitas Kusta. Acara ini dimulai jam 06.00 pagi (start untuk 10 K) dan jam 06.15 pagi (start untuk 5K) higga selesai.

Mengenai  Penyakit kusta atau lepra (Leprosy) atau disebut juga Morbus Hansen adalah sendiri adalah  sebuah penyakit infeksi menular kronis yang disebabkan oleh bakteri Mycobacterium leprae. Indonesia dikenal sebagai satu dari tiga negara yang paling banyak memiliki penderita kusta. Dua negara lainnya adalah India dan Brazil.  Bakteri Mycobacterium leprae ditemukan oleh seorang ahli fisika Norwegia bernama Gerhard Armauer Hansen, pada tahun 1873 lalu. Umumnya penyakit kusta terdapat di negara yang sedang berkembang, dan sebagian besar penderitanya adalah dari golongan ekonomi lemah. Istilah kusta berasal dari bahasa sansekerta, yakni kushtha berarti kumpulan gejala-gejala kulit secara umum. Penyakit ini diduga berasal dari Afrika atau Asia Tengah yang kemudian menyebar keseluruh dunia lewat perpindahan penduduk. Penyakit ini masuk ke Indonesia diperkirakan pada abad ke IV-V yang diduga dibawa oleh orang-orang India yang datang ke Indonesia untuk menyebarkan agamanya dan berdagang. Pada 1995, Organisasi Kesehatan Dunia (WHO) memperkirakan terdapat dua hingga tiga juta jiwa yang cacat permanen karena kusta.

Penyebab :

Penyakit kusta disebabkan oleh kuman yang dimakan sebagai microbakterium, dimana microbacterium ini adalah kuman aerob, tidak membentuk spora, berbentuk batang yang tidak mudah diwarnai namun jika diwarnai akan tahan terhadap dekolorisasi oleh asam atau alkohol sehingga oleh karena itu dinamakan sebagai basil “tahan asam”.

Mekanisme penularan yang tepat belum diketahui. Beberapa hipotesis telah dikemukakan seperti adanya kontak dekat dan penularan dari udara. Dan diduga faktor genetika juga ikut berperan, setelah melalui penelitian dan pengamatan pada kelompok penyakit kusta di keluarga tertentu. Belum diketahui pula mengapa dapat terjadi tipe kusta yang berbeda pada setiap individu.

Masa inkubasi pasti dari kusta belum dapat dikemukakan. Beberapa peneliti berusaha mengukur masa inkubasinya. Masa inkubasi minimum dilaporkan adalah beberapa minggu, berdasarkan adanya kasus kusta pada bayi muda.Masa inkubasi maksimum dilaporkan selama 30 tahun. Hal ini dilaporan berdasarkan pengamatan pada veteran perang yang pernah terekspos di daerah endemik dan kemudian berpindah ke daerah non-endemik. Secara umum, telah disetujui, bahwa masa inkubasi rata-rata dari kusta adalah 3-5 tahun.

Pengobatan :

Pengobatan yang efektif terhadap penyakit kusta ditemukan pada akir 1940-an dengan diperkenalkannya dapson dan derivatnya. Bagaimanapun juga, bakteri penyebab lepra secara bertahap menjadi kebal terhadap dapson dan menjadi kian menyebar. Hal ini terjadi hingga ditemukannya pengobatan multiobat pada awal 1980-an dan penyakit ini pun mampu ditangani kembali.

Pada 1985, kusta masih menjadi masalah kesehatan masyarakat di 122 negara. Pada Pertemuan Kesehatan Dunia (WHA) ke-44 di Jenewa, 1991, disetujui resolusi untuk menghapus kusta sebagai masalah kesehatan masyarakat pada tahun 2000, dan berusaha untuk ditekan menjadi 1 kasus per 100.000. WHO diberikan mandat untuk mengembangkan strategi penghapusan kusta. Kelompok Kerja WHO melaporkan Kemoterapi Kusta pada 1993 dan merekomendasikan dua tipe terapi multiobat standar. Yang pertama adalah pengobatan selama 24 bulan untuk kusta lepromatosa dengan rifampisin, klofazimin, dan dapson. Yang kedua adalah pengobatan 6 bulan untuk kusta tuberkuloid dengan rifampisin dan dapson. Obat terapi multiobat kusta.Sejak 1995, WHO memberikan paket obat terapi kusta secara gratis pada negara endemik, melalui Kementrian Kesehatan. Strategi ini akan bejalan hingga akhir 2010. Pengobatan multiobat masih efektif dan pasien tidak lagi terinfeksi pada pemakaian bulan pertama. Cara ini aman dan mudah. Jangka waktu pemakaian telah tercantum pada kemasan obat.

Hingga saat ini tidak ada vaksinasi untuk penyakit kusta. Dari hasil penelitian dibuktikan bahwa kuman kusta yang masih utuh bentuknya, lebih besar kemungkinan menimbulkan penularan dibandingkan dengan yang tidak utuh. Jadi faktor pengobatan adalah amat penting dimana kusta dapat dihancurkan, sehingga penularan dapat dicegah.
Saran saya :

Acara Charity yang sangat membantu seperti ini lebih diharapkan banyak diadakan, apalagi memiliki unsur “Fun”.

Anak muda seharusnya membangun kesan positif terhadap penyandang penyakit.

PLC Chapter 16

1.   3 primary uses of symbolic logic in formal logic:

• to express propositions

• to express the relationships between propositions, and

• to describe how new propositions can be inferred from other propositions that are assumed to be true.

2.   Two parts of a compound term are:  a functor, which is the function symbol that names the relation, and an ordered list of parameters, which together represent an element of the relation.

3.   Propositions can be stated in two modes: one in which the proposition is defined to be true, and one in which the truth of the proposition is something that is to be determined. In other words, propositions can be stated to be facts or queries.

5.   Antecedents are the right side of clausal form propositions, whereas Consequents are the left side of clausal form propositions, because it is the consequence of the truth of the antecedent.

7.   Horn clauses can be in only two forms: They have either a single atomic proposition on the left side or an empty left side. The left side of a clausal form proposition is sometimes called the head, and Horn clauses with left sides are called headed Horn clauses. Headed Horn clauses are used to state relationships, such as

likes( bob, trout ) likes( bob, fish ) x fish( trout )

11. An uninstantiated variable is a variable that has not been assigned a value.

13.  Conjunctions contain multiple terms that are separated by logical AND operations.

Problem Set

1.”All predicate calculus propositions can be algorithmically converted to clausal form”. Is this statement true or false?

This statement is true. Nilsson (1971) gives proof that this can be done, as well as a simple conversion algorithm for doing it.

2. Describe how a logic programming language is different from a general programming language.

Programming that uses a form of symbolic logic as a programming language, unlike other general programming language, is often called logic programming; languages based on symbolic logic are called logic programming languages, or declarative languages.

10.  Using the internet for reference, find some of the applications of expert systems.

• Expert system in healthcare: The Electronic health record (EHR) is designed to replace the traditional medical and bring together a more versatile, expansive and robust expert system to provide greater quality care.

• Expert systems in the financial field: Loan departments are interested in expert systems for morgages because of the growing cost of labour, which makes the handling and acceptance of relatively small loans less profitable.

• A new application for expert systems is automated computer program generation. Funded by a US Air Force grant, an expert system-based application (hprcARCHITECT) that generates computer programs for mixed processor technology (FPGA/GPU/Multicore) systems without a need for technical specialists has recently been commercially introduced

PLC Chapter 15

2.   A lambda expression specifies the parameters and the mapping of a function.

3.   Atoms and lists were parts of the original LISP.

6.   Simple list is a list which membership of a given atom in a given list that does not include sublists.

7.   REPL stand for read-evaluate-print loop.

8.   Three parameters to IF are: a predicate expression, a then expression, and an else expression.

18.   A function is tail recursive if its recursive call is the last operation in the function. This means that the return value of the recursive call is the return value of the nonrecursive call to the function. It is important to specify repetition to be tail recursive because it is more efficient(increase the efficiency).

22.  During reader phase of a common LISP language processor,  There is a special kind of macro, named reader macros or read macros, that are expanded.  A reader macro expands a specific character into a string of LISP code. For example, the apostrophe in LISP is a read macro that expands to a call to QUOTE.

24.  What is stored in an ML evaluation environment?

A table called the evaluation environment stores the names of all implicitly and explicitly declared identifiers in a program, along with their types. This is like a run-time symbol table.

29.  Curried function let new functions can be constructed from them by partial evaluation.

30.  Partial evaluation means that the function is evaluated with actual parameters for one or more of the leftmost formal parameters.

33.  Explain the process of currying.
The process of currying replaces a function with more than one parameter with a function with one parameter that returns a function that takes the other parameters of the initial function.

35.   A language is nonstrict if it does not have the strict requirement.

43.  What is the syntax of a lambda expression in F#?

The following lambda expression illustrates their syntax:
(fun a b −> a / b)

PROBLEM SET

2.  Give the general form of function declaration in ML.

Function declarations in ML appear in the general form
fun function_name( formal parameters ) = expression;

8.   How is the functional operator pipeline ( | > )used in F#?

The pipeline operator is a binary operator that sends the value of its left operand, which is an expression, to the last parameter of the function call, which is the right operand. It is used to chain together function calls while flowing the data being processed to each call.

Consider the following example code, which uses the high-order functions filter and map:

let myNums = [1; 2; 3; 4; 5]
let evensTimesFive = myNums

|> List.filter (fun n −> n % 2 = 0)

10.  What does  the following Scheme function do?

(define ( x lis)

(cond

(( null? lis) 0 )

(( not(list? (car lis)))

(cond

((eq? (car lis) #f) (x (cdr lis)))

(else (+1 (x (cdr lis))))))

(else (+ (x (car lis))  (x (cdr lis))))

x returns the number of non-#f atoms in the given list

|> List.map (fun n −> 5 * n)

PLC Chapter 14

2.   An exception is raised when its associated event occurs.

3.   The advantages of having support for exception handling builtin to language:

• First, without exception handling, the code required to detect error conditions can considerably clutter a program.

• Another advantage of language support for exception handling results from exception propagation. Exception propagation allows an exception raised in one program unit to be handled in some other unit in its dynamic or static ancestry.

• A language that supports exception handling encourages its users to consider all of the events that could occur during program execution and how they can be handled. This approach is far better than not considering such possibilities and simply hoping nothing will go wrong.

9.   An exception handler in Ada can occur in either a  subprogram body, a package body, a task, or a block

10.  There are four exceptions that are defined in the default package, Standard:

Constraint_aError
Program_Error
Storage_Error
Tasking_Error

12.   The suppress pragma is used to disable certain run-time checks that are parts of the built-in exceptions in Ada.

14. The name of all C++ exception handlers is Try clause.

15.  The exception out_of_range is thrown by library container classes.

16.  The exception overflow_error is thrown by math library functions.

32.  Event-driven programming is a programming where parts of the program are executed at completely unpredictable times, often triggered by user interactions with the executing program.

33.   The JFrame class defines the data and methods that are needed for frames. So, a class that uses a frame can be a subclass of JFrame. A JFrame has several layers, called panes.

PROBLEM SET

1.   What mechanism did early programming languages provide to detect or attempt to deal with errors?

Early programming languages were designed and implemented in such a way that the user program could neither detect nor attempt to deal with such errors. In these languages, the occurrence of such an error simply causes the program to be terminated and control to be transferred to the operating system.

2.   Describe the approach for the detection of subscript range errors used in C and Java.

In C subscript ranges are not checked. Java compilers usually generate code to check the correctness of every subscript expression. If any exception generates, then an unchecked exception is thrown.

4.   What are the different approaches to handle checked exception in Java?

In Java there are basically two types of exceptions: Checked exceptions and unchecked exceptions.

Checked exceptions must be explicitly caught or propagated as described in Basic try-catch-finally Exception Handling. Unchecked exceptions do not have this requirement. They don’t have to be caught or declared thrown.
Checked exceptions in Java extend the java.lang.Exception class. Unchecked exceptions extend the java.lang.RuntimeException.

14.  Summarize the arguments in favor of the termination and resumption models of continuation.

The resumption model is useful when the exception is only an unusual condition, rather than an error. The termination model is useful when the exception is an error and it is highly unlikely that the error can be corrected so that execution could continue in some useful way.

PLC Chapter 13

1. What are the three possible levels of concurrency in programs?

– Instruction level (executing two or more machine instructions simultaneously)

– Statement level (executing two or more high-level language statements simultaneously)

– Unit level (executing two or more subprogram units simultaneously)

7. What is the difference between physical and logical concurrency?

Physical concurrency is several program units from the same program that literally execute simultaneously.

Logical concurrency is multiple processors providing actual concurrency, when in fact the actual execution of programs is taking place in interleaved fashion on a single processor.

8. What is the work of a scheduler?

Scheduler manages the sharing of processors among the tasks.

12. What is a heavyweight task? What is a lightweight task?

Heavyweight task executes in its own address space. Lightweight task all run in the same address space.

16. What is a task descriptor?

Task descriptor is a data structure that stores all of the relevant information about the execution state of a task.

18. What is the purpose of a task-ready queue?

The purpose of a task-ready queue is to be storage of tasks that are ready to run.

21. What is a binary semaphore? What is a counting semaphore?

Binary semaphore is a semaphore that requires only a binary-valued counter, like the one used to provide competition synchronization. A counting semaphore is a synchronization object that can have an arbitrarily large number of states.

30. What is purpose of an Ada terminate clause?

The purpose of an Ada terminate clause is to mark that the task is finished with its job but is not yet terminated.

34. What does the Java sleep method do?

Sleep method blocks the the thread.

35. What does the Java yield method do?

Yield method surrenders the processor voluntarily as a request from the running thread.

36. What does the Java join method do?

Java forces a method to delay its execution until the run method of another thread has completed its execution.

37. What does the Java interrupt method do?

Interrupt becomes one way to communicate to a thread that it should stop.

55. What is Concurrent ML?

Concurrent ML is an extension to ML that includes a fform of threads and a form of synchronous message passing to support concurrency.

56. What is the use of the spawn primitive of CML?

The use of Spawn primitive of CML is to create a thread.

57. What is the use of subprograms BeginInvoke and EndInvoke in F#?

The use of subprograms BeginInvoke and Endinvoke in F# is to call threads asynchronously.

58. What is the use of the DISTRIBUTE and ALIGN specification of HPC?

The use of DISTRIBUTE and ALIGN specification of HPC is to provide information to the compiler on machines that do not share memory, that is, each processor has its own memory.

PROBLEM SET:

1. Explain clearly why a race condition can create problems for a system.

Because two or more tasks are racing to use the shared resource and the behavior of the program depends on which task arrives first (and wins the race). The importance of competition synchronization should now be clear.

2. What are the different ways to handle deadlock?

– Ignoring deadlock

– Detection

– Prevention

– Avoidance

3. Busy waiting is a method whereby a task waits for a given event by continuously checking for that event to occur. What is the main problem with this approach?

Busy-waiting or spinning is a technique in which a process repeatedly checks to see if a condition is true, such as whether keyboard input or a lock is available. Spinning can also be used to generate an arbitrary time delay, a technique that was necessary on systems that lacked a method of waiting a specific length of time. Processor speeds vary greatly from computer to computer, especially as some processors are designed to dynamically adjust speed based on external factors, such as the load on the operating system. Busy waiting may loop forever and it may cause a computer freezing.

PLC Chapter 12

2. What are the problems associated with programming using abstract data types?

-The features and capabilities of the existing type are not really understanding by the beginner
-The type definitions are all independent and at the same level

4. What is message protocol?
Message protocol: The entire collection of methods of an object.

5. What is an overriding method?
Overriding method: A method that overrides the inherited method.

7. What is dynamic dispatch?
Dynamic dispatch: The third characteristic of object-oriented programming language which is a kind of polymorhphism provided by the dynamic binding of messages.

12. From where are Smalltalk objects allocated?
Smalltalk objects are allocated from the heap and are referenced through reference variables, which are implicitly dereferenced.


15. What kind of inheritance, single or multiple, does Smalltalk support?
Smalltalk supports single inheritance; it does not allow multiple inheritance.

19. How are C++ heap-allocated objects deallocated?
C++ heap-allocated objects are deallocated using destructor.

29. Does Objective-C support multiple inheritance?
No, it doesn’t. Objective-C is not support it. It supports the single inheritance only.

33. What is the purpose of an Objective-C category?
The purpose of an Objective-C category: to add certain functionalities to different classes and also to provide some of the benefits of multiple inheritance, without the naming collisions that could occur if modules did not require module names on their functions.

38. What is boxing?
Boxing is primitive values in Java 5.0+ which is implicitly coerced when they are put in object context. This coercion converts the primitive value to an object of the wrapper class of the primitive value’s type.

39. How are Java objects deallocated?
By implicitly calling a finalizemethod when the garbage collector is about to reclaim the storage occupied by the object.

 

PROBLEM SET

 

3. Compare the inheritance of C++ and Java!
Java
:
– All classes inherit from the Object class directly or indirectly
– If we create a class that doesn’t inherit from any class, then it automatically inherits from Object Class
– Members of the grandparent class are not directly accessible
– Protected members of a class “A” are accessible in other class “B” of same package, even if B doesn’t inherit from A
– Java uses extends keyword for inheritance
– We don’t have to remember those rules of inheritance which are combination of base class access specifier and inheritance specifier
– Methods are virtual by default
– Uses a separate keyword interface for interfaces and abstract keyword for abstract classes and abstract functions

C++:
– Private members of base class are not accessible in derived class
– Have the forest of classes. When we create a class that doesn’t inherit from anything, we create a new tree in forest
– Support the multiple inheritance
– Default constructor of parent class is automatically called, but if we want to call parametrized the constructor of a parent class, we
must use Initalizer list
– Use virtual keyword


5. Compare abstract class and interface in Java!
– Abstract class is a class while interface is a interface, means by extending abstract class you can not extend another class because Java does not support multiple inheritance but you can implement multiple inheritance in Java.

– You can not create non abstract method in interface, every method in interface is by default abstract, but you can create non abstract method in abstract class. Even a class which doesn’t contain any abstract method can be abstract by using abstract keyword.

– The abstract class are slightly faster than interface because interface involves a search before calling any overridden method in Java

– The interface are better suited for Type declaration and abstract class is more suited for code reuse and evolution perspective

– When you add a new method in existing interface it breaks all its implementation and you need to provide an implementation in all clients which is not good. By using abstract class you can provide default implementation in super class

7. What is one programming situation where multiple inheritance has a significant disadvantage over interfaces?
A situation when there are two classes derived from a common parent and those two derived class has one child.


9. Give an example of inheritance in C++, where a subclass overrides the superclass methods!
class ship{

 public:
void sink(){
cout << “sink” << endl;
 }
 };
class titanic:public class ship{
 public:
void sink()
 {
 cout << “Sink! Titanic has been fallen!” << endl;
 }
 }


10. Explain one advantage of inheritance!
Provides a framework for the definition of hierarchies of related classes that can reflect the descendant relationship in the problem space.


12. Compare inheritance and nested classes in C++! Which of these supports an is-a relationship?
Inheritance
 is where one class (child class) inherits the members of another class (parent class).

Nested class is a class declared entirely within the body of another class or interface.

 

17. What are the different options for object destruction in Java?
There is no explicit deallocation operator.