Monday, 9 December 2013

Software engineering

Software engineering adalah bagaimana menggunakan komponen-komponen software untuk membuat software.

1. Matriks/list
pengunjung = [1 2 3 2 1 2 3]
artinya:
pengunjung hari 1 = 2
pengunjung hari 2 = 2
pengunjung hari 3 = 3
pengunjung hari 4 = 2
pengunjung hari 5 = 1
dan seterusnya

artinya variabel pengunjung menggunakan hari sebagai index nya.

2. Conditional


3. Looping



4. Regresion linear sederhana


5. GUI

Wednesday, 4 December 2013

System

System

System is a set of interacting component or a set of interdependent components forming an integrated whole.

Example of real-life system:

Following are considered as example of real-life system that near you:

1. Traffic system
2. Telecommunication system
3. Information system

Common characteristic between those systems:
  • A system has a structure, it contain elements/parts/components that are directly or indirectly related to each other;
  • A system has a behavior, it contain process that transform inputs into outputs (material, energy or data);
  • A system has interconnectivity

Examples of the elements of Information systems:


Following are considered as the elements of a system in terms of Information systems: –
  1. Inputs and outputs
  2. Processor
  3. Control
  4. Environment/surroundings
  5. Feedback
  6. Boundaries and interface
  7. Relationship

Tuesday, 3 December 2013

Electrical Engineering

1. Power Engineering
Power engineering deals with the generation, transmission, and distribution of electricity as well as the design of a range of related devices

Devices: transformer, electric generator, electric motors, high voltage engineering, and power electronics.

2. Control Engineering
Control engineering focuses on the modelling of a diverse range of dynamic systems and the design of controllers that will cause these systems to behave in the desired manner.

Device: electrical circuit, digital signal processors, microcontroller, and PLC (Programmable Logic Controllers)

3. Electronics Engineering
Electronics Engineering involves the design and testing of electronic circuits that use property of components such as resistors, capacitors, inductors, diodes, and transistors to achieve particular functionality.

Example of electronic circuit: tuned circuit, circuit that allow a user to tune to a radio station.

4. Microelectronics Engineering
Microelectronics engineering deals with the design and microfabrication of very small electronic components and circuit for use in an integrated circuit (IC) or sometimes for use on their own as a general electronic component.

5. Signal processing
Signal process deals with the analysis and manipulation of signals (digital and analog signal).

6. Telecommunication
Focuses on the transmission of information across a channel such as coax cable, optical fiber or free space.

7. Instrumentation
Instrumentation engineering deals with the design of devices to measure physical quantities.
That physical quantities are: pressure, flow, and temperature. The design of such instrumentation often requires a good understanding of physics that often extends beyond electromagnetic theory.

8. Computer engineering 
Deals with the design of computers and computer systems (systems that contain more than one computers).

9. Mechantronics
Mechantronics is an engineering dicipline which deals with the convergence of electrical and mechanics system.

10. Biomedical Engineering
Biomedical Engineering concerned with the design of medical equipment. This includes fixed equipments such as ventilators, MRI scanners and electrocardiograph monitors, as well as mobile equipment (cochlear implants, artificial pacemakers and artificial hearts).


Server types

Server types:
1. Proxy server
to filter request, improve performance, and share connections

2. Mail server
move and store mail over corporate networks.

3. Server platform
engine that drives servers.

4. Web server
 serves static content to web browser by loading a file from a disk and serving it across the network to a user's web browser.

5. Application server

6. Real-time Communication server
Formerly known as chat server or IRC server.

7. FTP server
server that makes it possible to move one or more files securely between computer while providing file security and organization as well as transfer protocol.

8. Collaboration server

9. List server

10. Telnet server
enables user to log on to a host computer and perform tasks as if they are working on the remote computer itself.

11. Open source server

12. Virtual server
From hypervisor (Windows)

Sunday, 1 December 2013

Cookbook of Assembly

1. Kita akan modifikasi register berikut ini: AX, DS, CS, IP  menggunakan perintah register, assemble, dump, enter, trace command.

register: to display the content of our CPU register
assemble: to entering code to our code segment
dump: to display the content of our data segment
enter: to fill/change the content of our data segment
trace: to execute a code one at a time.




2. Semua angka yang dimasukkan kedalam debugger adalah hexadecimal.

3. Segment register = DS, ES, SS, CS

DS= data segment
ES = extra segment
SS =
CS = Code segment (place of code)

Flags: NV, VP, EI, PL, NZ, NA, PO, NC


Langkah 1: melihat isi register untuk pertama kali
How?
-r
What you see?
AX, BX, CX, DX, ......
AX= Acummulator register (Arithmetic and logic)
DX = Data register (DH + DL)

Int 21: print character to screen
Int 20: terminate program

-h
contoh: 
-n name

Langkah 2: mengisi register AX dengan nilai 1234
How?
- r ax
:1234

Langkah 3: Melihat (dump) isi register DS (untuk pertama kali)
How?
-d ds:0000
ds:0000
0B3C:0000

What you see?
Isi dari memory dari 0B3C:0000 sampai 0B3C:0070 dan printable ASCII character-nya
. --> unprintable ASCII character

Langkah 4: Memasukkan(enter)/mengubah data di data segment
How?
-e ds:0000


Langkah 5: Melihat kembali hasil perubahan yang tlah dilakukan
How?
-d ds:0000

Langkah 6: Put some code to the machine
How?
-a cs
Watch IP address (next instruction to be fetched)
so
-a cs:100
mov [0], ax

Langkah 7: trace
-t
what?
IP pointer from 0100 to 0103 is change


Langkah 8: Periksa isi konten register ds
-d ds:0000

What you see?
isi dari register ds:0000 berubah menjadi Langkah 4

Langkah 9: Assemble another code
- a cs:0000
mov ax, [0]

Langkah 10: Ubah register IP (Instruction Pointer)
-r IP



1. Ketik a
2. Setelah tanda - muncul, ketik baris berikut ini satu baris per satu baris:
mov ax,B800
mov ds,ax
mov byte[0F9E],24
int 20
3. Ketik return/enter dua kali, untuk keluar dari editor
4. Ketik g untuk menjalankan program

Keterangan:

Wednesday, 27 November 2013



Calling sub procedure and function procedures

Bagaimana cara memanggil suatu sub procedure dari sub procedure yang lain?

Untuk memanggil suatu Sub procedure dari Sub procedure yang lain, ketik nama dari procedure yang kamu inginkan untuk dipanggil dan ikut sertakan argument-argumen yang dibutuhkan Sub procedure yang akan dipanggil itu.
Panggil namanya, sertakan argumen-argumen yang dibutuhkannya
Kamu bisa menggunakan Sub procedure untuk mengatur prosedur-prosedur yang lain supaya mudah dimengerti dan di-debug

Contoh dibawah ini, sub procedure Main memanggil sub procedure Multibeep, serta menyertakan value 56 sebagai argumennya. Setelah sub procedure Multibeep berjalan sampai selesai, pengendalian dikembalikan ke sub procedure Main, dan yang dilakukan sub procedure Main selanjutnya adalah memanggil Sub procedure Message, sub procedure Message bertugas menampilkan sebuah kotak pesan; ketika user menekan OK, pengendalian dikembalikan ke Main, dan Main selesai.

Sub Main()
    Multibeep 56
    Message
End sub

Sub Multibeep(numbeeps)
    For counter = 1 to numbeeps
        Beep
    Next counter
End sub

Sub Message()
    Msgbox "Time to take a break!"
End sub



Memanggil sub precedure yang memiliki lebih dari satu argumen

Pada dasarnya untuk memanggil sub procedure terdapat dua cara:
1. Menggunakan keyword Call
2. Tidak menggunakan keyword Call

Dengan menggunakan keyword call butuh parentheses atau tanda kurung.
Tidak menggunakan keyword call, tidak membutuhkan parentheses atau tanda kurung.

Sementara, untuk memasukkan lebih dari satu argument tambahkan tanda koma (argumen1 koma argumen2).

Dibawah ini adalah contoh bagaimana sub procedure housecalc dipanggil dari dalam sub procedure main.

Statement housecalc 99800, 43100 menyertakan 2 buah argumen dan tidak menggunakan keyword Call.

Statement  Call housecalc(380950, 49500) menyertakan 2 buah argumen dan menggunakan keyword Call dan mengapit kedua argumen itu didalam tanda kurung.


Sub main()
    housecalc 99800, 43100
    Call housecalc(380950, 49500)
End Sub

Sub housecalc(price As Single, wage As Single)
    If 2.5 * wage <= 0.8 * price Then
        MsgBox "You cannot afford this house"
    Else
        MsgBox "This house is affordable."
    End If
End Sub

Memanggil Prosedur Function

Dari tadi kita hanya membahas cara memanggil sub procedure. Dengan menggunakan keyword Call atau dengan tidak menggunakan keyword Call.

Bagaimana dengan cara memanggil prosedur function?

Untuk memanggil function dan memanfaatkan hasil return nya, assign function itu sebuah variabel, bungkus argumennya dengan tanda kurung.
Contoh statement:
Answer3 = MsgBox("Are you happy with your salary?", 4, "Question 3")
     

Untuk memanggil function dan tidak memanfaatkan hasil return nya, tidak perlu assign function itu ke sebuah variabel dan tidak perlu bungkus argumennya dengan tanda kurung.
Contoh statement:
MsgBox "Task Completed!", 0, "Task Box"



Melepas named argument

Komponen Named argument terdiri dari: {nama argumen, tanda ( =: )dan nilai yang diberi}

Urutan named-named argument bebas siapa yang duluan. Pada Contoh 1 dan 2 dibawah ini named argumen Title yang lebih dulu dari named argumen Prompt.

Contoh 1:
msgbox Title=:"Task Box", Prompt :="Task completed!"
Contoh 2:
answer3 = msgbox(title :="Question3", _
prompt:="Are you happy with your salary?", buttons:=4)

Msgbox arguments


Calling sub procedure and function procedures

Bagaimana cara memanggil suatu sub procedure dari sub procedure yang lain?

Untuk memanggil suatu Sub procedure dari Sub procedure yang lain, ketik nama dari procedure yang kamu inginkan untuk dipanggil dan ikut sertakan argument-argumen yang dibutuhkan Sub procedure yang akan dipanggil itu.
Panggil namanya, sertakan argumen-argumen yang dibutuhkannya
Kamu bisa menggunakan Sub procedure untuk mengatur prosedur-prosedur yang lain supaya mudah dimengerti dan di-debug

Contoh dibawah ini, sub procedure Main memanggil sub procedure Multibeep, serta menyertakan value 56 sebagai argumennya. Setelah sub procedure Multibeep berjalan sampai selesai, pengendalian dikembalikan ke sub procedure Main, dan yang dilakukan sub procedure Main selanjutnya adalah memanggil Sub procedure Message, sub procedure Message bertugas menampilkan sebuah kotak pesan; ketika user menekan OK, pengendalian dikembalikan ke Main, dan Main selesai.

Sub Main()
    Multibeep 56
    Message
End sub

Sub Multibeep(numbeeps)
    For counter = 1 to numbeeps
        Beep
    Next counter
End sub

Sub Message()
    Msgbox "Time to take a break!"
End sub



Memanggil sub precedure yang memiliki lebih dari satu argumen

Pada dasarnya untuk memanggil sub procedure terdapat dua cara:
1. Menggunakan keyword Call
2. Tidak menggunakan keyword Call

Dengan menggunakan keyword call butuh parentheses atau tanda kurung.
Tidak menggunakan keyword call, tidak membutuhkan parentheses atau tanda kurung.

Sementara, untuk memasukkan lebih dari satu argument tambahkan tanda koma (argumen1 koma argumen2).

Dibawah ini adalah contoh bagaimana sub procedure housecalc dipanggil dari dalam sub procedure main.

Statement housecalc 99800, 43100 menyertakan 2 buah argumen dan tidak menggunakan keyword Call.

Statement  Call housecalc(380950, 49500) menyertakan 2 buah argumen dan menggunakan keyword Call dan mengapit kedua argumen itu didalam tanda kurung.


Sub main()
    housecalc 99800, 43100
    Call housecalc(380950, 49500)
End Sub

Sub housecalc(price As Single, wage As Single)
    If 2.5 * wage <= 0.8 * price Then
        MsgBox "You cannot afford this house"
    Else
        MsgBox "This house is affordable."
    End If
End Sub

Memanggil Prosedur Function

Dari tadi kita hanya membahas cara memanggil sub procedure. Dengan menggunakan keyword Call atau dengan tidak menggunakan keyword Call.

Bagaimana dengan cara memanggil prosedur function?

Untuk memanggil function dan memanfaatkan hasil return nya, assign function itu sebuah variabel, bungkus argumennya dengan tanda kurung.
Contoh statement:
Answer3 = MsgBox("Are you happy with your salary?", 4, "Question 3")
     

Untuk memanggil function dan tidak memanfaatkan hasil return nya, tidak perlu assign function itu ke sebuah variabel dan tidak perlu bungkus argumennya dengan tanda kurung.
Contoh statement:
MsgBox "Task Completed!", 0, "Task Box"



Melepas named argument

Komponen Named argument terdiri dari: {nama argumen, tanda ( =: )dan nilai yang diberi}

Urutan named-named argument bebas siapa yang duluan. Pada Contoh 1 dan 2 dibawah ini named argumen Title yang lebih dulu dari named argumen Prompt.

Contoh 1:
msgbox Title=:"Task Box", Prompt :="Task completed!"
Contoh 2:
answer3 = msgbox(title :="Question3", _
prompt:="Are you happy with your salary?", buttons:=4)

Msgbox arguments