eight years ago ..

Pertama kali nulis di blogg ini 8 tahun lalu tepatnya waktu masih jaman putih abu yg masih labil (meskipun sekarang lebih labil :d) . Singkat cerita ada maksud tujuan tertentu nulis lagi, berhubung bakat menulis sekarang pindah ke skripsi dan tulisan akademis lainnya, perlahan menulis di blogg pun jadi sulit. Selama 8 tahun berkarya di dunia perbloggan ( ada ga ya di kbbi kata perbloggan#), penulis tertawa terbahak bahak melihat posting, gambar dan kata kata yg benar benar labil . Sekarang penulis jadi sadar betapa labil nya selama 8 tahun berkarya . Posting pun lebih banyak mengenai materi materi IT , hardware, software dan primata primata lain sejenis. Dan mulai detik ini (7:28:30 pagi) penulis bertekad mengganti tulisan menjadi lebih ke arah sosial, life and love :p .( Biar kayak pak Budi rahardjo yang postingannya keren keren ). Selama 8 tahun ini, i have already transformed into many shapes #lho . Kerja , kuliah, sedih , senang, sehat, sakit, cinta, semua telah dilewati dan masih jadi misteri yg belum bisa diprediksi what will be the next . Its gonna be happy ending or its gonna be deteriorate. Banyak metode forecasting yang bisa digunakan utk memprediksi, like moving average or winters . Tp itu cuma bisa memprediksi resource aja gan, hidup ga bisa :p .

Mungkin ini sekilas 8 tahun yang penulis rasakan . Mudah”an di tahun ke 9 ini penulis banyak mendapatkan inspirasi untuk lebih berkarya 🙂 hopefully i

 

Advertisements
Categories: Uncategorized

Pemahaman Konsep OOP Versi Saya dan Buku

February 21, 2014 Leave a comment

OOP (Object Oriented Programming) hanyalah sebuah ‘konsep’ dan paradigma seseorang dalam membuat program , baik menggunakan java, c#, c++ dll sama saja. bedanya dengan konvensional yaitu disini aktor utama adalah “OBJECT”. saya analogikan :

Di Jakarta terdapat banyak sekali mobil Dai****u Xe*ia , misalkan terdapat 1000 mobil, setiap rancangan mobil yg terdapat di pabrik tersebut kita namakan class, dan setiap mobil yg  berkeliaran di jalan dan telah lengkap dinamakan object. jelas bedanya, class baru rancangan saja. hanya ada 1 class , yaitu class Mobil dan terdapat 1000 object mobil dengan warna, plat nomor yang berbeda…

 

Categories: Pemprograman

Hardware application in Raspberry PI

i was in Depok yesterday , and suddenly thought about “how to control a hardware component by using PI”, because i used to control hardware device such as LED’S (Light emitting Diode) , Switches, censors, servos, and many more with microcontroller. maybe, i could do same thing by PI, then i searched for article last night , and i got brief tutorial. in this section, i would like to discuss hardware application and how to turn on / off your LED by using python script in Raspberry PI. this is interesting enough. here lists of my raw materials (depend on you) :

  • PI , of course
  • LED
  • Resistor , 1 x 330 ohm
  • Electronic Board or you can use breadboard
  • Cable usually called jumper to connect electronic component to others.
  • Coffee ( to enjoy step by step)

step by step :

  • create electronic circuit like this and connect it to your PI. please be carefull to make this circuit, i suggest you to use breadboard.

rangkaian

  • create file ‘lamp.py’ :

import os; #import os to use 'system' function
import RPi.GPIO as GPIO #GPIO module to access your GPIO Port in PI
import time

GPIO.setmode(GPIO.BOARD);
GPIO.setup(3, GPIO.OUT); # 3 : port GPIO3 set as output
os.system("clear"); #clear screen
status = True; #boolean status as flag true or false, but set true first
while(status): #while status true then loop
 os.system("clear");
 print "1. Nyalakan Lampu"
 print "2. Matikan Lampu"
 print "3. Kedap Kedip"
 print "0. Keluar"
 pil = raw_input( "Pilihan Anda : ") #store user input to pil variable
 if(pil=="1"):
  print "Lampu Dinyalakan";
  GPIO.output(3,False);
 elif(pil=="2"):
  print "Lampu Dimatikan";
  GPIO.output(3, True);
 elif(pil=="3"):
  for i in range(1,10):
   GPIO.output(3, False);
   time.sleep(1);
   GPIO.output(3, True);
   time.sleep(1);
 elif(pil=="0"):
  print "Terima kasih";
  status = False;
 else:
  print "GAGAL";
 raw_input("Press any button");

  • Test your PI, execute it , type sudo python lamp.py .

IMG_0781When you choose ‘2’

IMG_0778when you choose ‘1’

  • After learn about fundamental of hardware of PI, it leads you into combination of hardware and software. you can put servos, censor , switch and other technique. hopefully 🙂

Web Service in RaspberryPI

i have been doing my final project at health informatics engineering ITB,, which related with web services. i used Codeigniter framework as web builder to accompany me accomplish this program. i thought i could change a paradigm that website stored at web service must have be saved in a server or PC. then, i searched whether RaspberryPi could as a web server, and run normally without lack in connection. the answer is “yes” , it could. so i decided to move my final project into PI. here this step :

  1. Connect your RaspberryPI to the network ,i prefer you use a wireless than switch.
    WP_000731this wireless will connect to mobile device or your laptops later. connect this device into ethernet card in PI through UTP Cable.
  2. connect your PI into display adapter (if this is your first action on PI), you can use TV or LCD . if you use TV, connect video adapter port into TV Port. if you use LCD , connect HDMI in PI into HDMI in LCD
  3. WP_000730
  4. Network setting setting your network using DHCP, which acquired from wireless.  open network setting by use nano /etc/network/interfaces
  5. i recommend you use remote connection such as ‘Putty’. download from this URL and install into your laptops (client) as far as you need. both use remote connection and use actually device without remote is good.
  6. suggest that you get IP Address on your PI 192.168.1.104 (my PI address)
  7. install this requirement tools : apache = sudo apt-get install apache2 , PHP = sudo apt-get install php5 , MySQL = sudo apt-get install mysql-server and PHP-MySQl = sudo apt-get install php5-mysql
  8. make web file in /var/www for instance just provide a service
  9. Create your own database :
  • mysql – u root -p
  • in mysql prompt , type : create database your_database_name
  • create a table

I don’t discuss more about database or PHP , moreover you can follow latest post about php or mysql in sidebar.

IMG_0726

Sophisticated Technology

never imagined before. . i am a computer science warrior . :)) . graduate from vocational school, continue to Diploma, now study at bachelor degree of Information system. yes. i like computer science, i like programming language, “Java” and “PERL” is my Favorite language. why use PERL ? because i had read article from Mr.Budi Rahardjo who wrote article about PERL programming language. he describe why he use PERL, etc. immediately i try to use PERL.. after try many function in PERL, i moved to Java. why Java ? because my friend Frizal, taught me Java. he had taught the fundamental of Java, until i can teach in laboratory.

because i like Java very much, i have a hope, to buy some books about Java, not only in Indonesia but also in foreign country. i have bought many books abroad, like at Madinah , Singapore and Malaysia. . here all of my foreign books with English subtitle. now, i must have collect some money to go abroad, buy some books . realize it!.

unnamed

i believe , 3 years later or maybe a decade. computer science field still become most wanted major ever found in the world. it will overlap Doctor . believe that. and , i read a poem . who win in sophisticated technology, he will master in world 😛

Categories: Artikel, Artikel IT, BLog

posting pertama dalam 2 tahun terakhir

tidak terasa sejak tahun 2012 lalu bulan oktober terakhir kali saya posting, ini adalah posting pertama. terima kasih atas banyaknya komentar yang tidak dapat saya balas semua. untuk resolusi 2014 ini saya berencana untuk meningkatkan jumlah postingan saya. terutama mengenai teknologi informasi. mudah-mudahan akan bermanfaat untuk rekan – rekan yang membutuhkan. saya tidak keberatan dengan banyaknya ‘plagiarisme’ tulisan saya, karena saya yakin ilmu itu ada balasannya dari Allah.swt . selamat membaca

Categories: Artikel

The Differences between Tupple, List dan Dictionary

sometimes, we got wrong perception about the using of tupple, list and dictionary, when we use all of them? what is the function?

ok, after i read an article and reference about python fundamental.. i get  this point. let’s check

  • List.. is the type of variable that we can use to accept many of data and bundle or accomodate it into one variable. we usually use array in java and C programming languange, but in python, we can use List. here the pattern :
    name_of_list = [data1,data2,data N]
    For instance : list = [‘octav’,123,True]

    Here is the examples of using list (i ran it in python 2.7.2 with ubuntu 11)

    in feature above, we can call list per element. for instance list[0] .. it means, we just call list which element is 0, so the result is ‘intan’ or we can call of that element, just type ‘list’

  • Tupple..
    what is tupple? what is the differences between tupple and list? as i know, list declare and using [] but, in tupple, we use ()

    Pattern :
    name_tupple = (data1,data2)
    for instance :
    tupple = (‘octav’,123)

    here is example:
    looking at first sentences, it means, we put data in variable ‘tupple’ and we can call it again later using ‘tupple’, but if you want to change your data later, it can’t.. so The differences of tupple and list is tupplue can’t permit changing of data, but, in list, you can change your data later for instance tupple[0] =’asd’ the result is error

  • Dictionary..
    Dictionary is the type that produce random data.. looking at this print screen below:
    notes:
    dict = {} #to declare your dictionary which name is ‘dict’
    dict[0] = ‘octav’ #give a value to index 0 which value is ‘octav’
    dict[‘satu’] = 123 #give a value to index ‘satu’ which value is 123
    dict[‘satu’] #print your dictionary which name is dict

    another format is, declare your dictionary with all of your list.for instance :
    opendict = {12:’octav’,’octav’:12}

 

Categories: Pemprograman