Kuliah Praktek di PT. Data Aksara Sangkuriang

Ini dia postingan saya yang baru, saya lagi magang di PT. Data Aksara Sangkuriang waktu bikin postingan ini. Magang ini sudah jalan 2 minggu, dan ini minggu ke-3. Dan apa saja yang sudah saya lakukan? Nothing but to learn. Saya belum dapat assignment seperti 2 teman saya shendy(chen) dan alfin yang sudah berangkat ke jakarta untuk deployment dan training lalu mendapat SPD! Yeah! ๐Ÿ™‚ Surat Perjalanan Dinas yang dimaksud adalah uang berjumlah seratus ribu rupiah.

Kami memang mengajukan magang bersama-sama, tapi berakhir di divisi yang berbeda. Saya dilempar ke pemrograman (JSF), chen disimpan di desain dan dokumentasi, alfin bermain di ranah networking. Saya sendiri belum masuk ke proyek sampai saat saya menulis post ini. Chen dan alfin, mereka sudah ditugaskan untuk menemani project manager untuk deployment dan training ke klien. Saya iri sebenarnya, hahaha, soalnya saya sendiri hanya berkutat di depan komputer dan jarang berkomunikasi dengan teman-teman kantor yang lain. Ini bukan tanpa alasan, pertama mungkin karena memang saya grogi dengan lingkungan baru, kedua posisi desk saya kurang strategis untuk bebas berinteraksi :p, dan ketiga… karena yang lain keliatan sibuk sekali dengan pekerjaannya ๐Ÿ˜ฆ .

Baru 2 minggu pertama jalan magang, saya langsung “kabur” selama seminggu. Seminggu kemarin (18-24 oktober) saya sedang berada di Pematang Siantar, pulang kampung menemani ibu saya. Apa mau dikata, kami pesan tiket pesawat untuk bulan oktober ini waktu bulan puasa, siapa yang tau bakal diterima magang disini bulan oktober :D. Karena ini juga, apa yang saya pelajari selama 2 minggu pertama itu sekarang bersembunyi di otak bagian entah.

In order to recover what lost, supaya ada kerjaan, dan nambah postingan blog, maka saya akan mendokumentasikan apa yang sudah saya pelajari di postingan selanjutnya. Di PT. Data Aksara Sangkuriang saya diminta untuk mempelajari Java Server Faces dengan menggunakan Primefaces sebagai framework UI.

Penjelasan cepat a la saya tentang JSF dan Primefaces:
Dengan dua tech ini, teknik bikin aplikasi web hampir sama dengan bikin aplikasi desktop. ๐Ÿ™‚
CMIIW ya.. masi belajar :p

Oke, next post adalah memulai project JSF with Primefaces di Netbeans 6.9. Tapi sekarang, makan siang gratis duluuu.. ๐Ÿ™‚

untuk anda para calon mahasiswa

Semenjak tulisan ini muncul, mungkin beberapa bulan lagi kalian yang baru lulus SMA bakal mulai masuk kuliah. Ini tulisan ditujukan untuk kalian yang penasaran sama dunia kuliah seperti apa. Saya sendiri baru semester 6 dan begitu kalian mulai kuliah saya udah semester 7. Jadi mumpung masi anget pengalamannya. Saya bagi-bagi disini deh.
Saya ni kuliah di UPI jurusan ilmu komputer non-pendidkan. Dan iya, beda kampus, beda jurusan, pasti beda cerita dan pengalaman. Tapi, di tahun pertama, pada umumnya semua punya pengalaman yang serupa kok.
Misal, pertama kali masuk kuliah, pasti masa-masa ospek itu ada. Walaupun beberapa univ. Swasta udah ngehapus kegiatan tradisional macam ini. Tapi masih banyak univ. negri yang masih membiarkan pesta ospek ini berjalan. Pelaksanaannya tentu berbeda-beda. Di upi misalnya, dulu kami digiring kesana kemari bergumul, macam domba :). Bagaimanapun, kegiatan macam ini membekas. Bayangin kalau awal kuliah cuma dijalani dengan lihat jadwal dan langsung mulai kuliah.
Nah misal ospek udah liwat. Lalu kita mulai mencari tahu macam apa belajar di perkuliahan. My tips: don’t expect too much! Just relax! Kalian punya banyak waktu setahun untuk go with the flow. Karena tahun pertama kuliah ini seperti yang orang banyak bilang adalah “SMA kelas 4”. Kalian bisa mulai dengan mulai mengenal jurusan kalian dari “luar”. Intip apa saja mata kuliah yang bakal kalian santap 3 tahun ke depan. Bagaimana prospek pekerjaan dari jurusan kalian. Dan mulailah berpikir kalau dosen bukanlah guru SMA!

Continue reading “untuk anda para calon mahasiswa”

Run your own script from Launcher (UBUNTU)

Ubuntu new brand logo

Look at that… pretty neat and unique isn’t it? ๐Ÿ™‚ the more beautifull ubuntu will be, the more I love it.

Okay, so this post is the last part wich that started from this post. And if you never create any bash script, you can start from here.

So I have my own script that check wether I connected to the internet or not by do the ping to google.com. If the connectivity still unavailable I would hear some sound until it finally connected and then I would hear some other sound. You can check the script and how to create it from my previous post.

I assume you have your script already in /home/myubuntu/cheko/chek.sh

now, go move your lazy cursor to your top panel bar. For you ubuntu noob or doesn’t understand wich top panel bar is.. here:

this is what I called top panel bar ๐Ÿ™‚

FYI, I called this TOP panel bar, because I prefer that thing is stay at the TOP of my desktop. Yes, you can move this thing to each edge of your desktop.

Next, right click on the panel bar , and the choose Add to panel… then you should see a new Gnome-panel window pop out. Now, choose the Custom Application Launcher.

You are ready to put some command that we usually use at terminal, as you can see :

change your launcher icon!

remember to try the command first in terminal,just in case that is something wrong with it. the “&” you find in the end of the command means the programs would run in background.

And if you do not want any scary blinking cursor with black & and white texts appear if you run the script, then you should switch the type form Application in terminal to Application.

Click close to confirm.

Voila!

voila!

There you go, your own script launcher. Click that icon and your script is running.

That’s all. ๐Ÿ™‚

Bash Script: Check Connectivity

#!/bin/bash -x
limiter=0;
while [ $limiter -lt 10 ];do
chek=$(ping google.com -c 1 | awk '/data/ {print $7}')
if [ "$chek" = "data." ]; then
play /home/your-pc/hack/snd/Alarm.wav
exit 0
else
play /home/your-pc/hack/snd/gitar.wav
let limiter+=1
fi
done

This simple bash script was made to check your current connectivity. It ping google.com and play sounds until it meet a few conditions to stop.

  • First condition is when the stringย  $chek contains “data.” , I’ll explain it later.
  • Second condition is when the $limiter reach 9

First, we assign 0 to a variable called limiter .Then..

while [ $limiter -lt 10]; do

In this line, we set a loop using while..do with a condition. the “-lt” means lesser than or < . So when the $limiter value is 10, it then stop the looping.


chek=$(ping google.com -c 1 | awk '/data/ {print $7}')

This is how you assign a variable’s value from output of commands. ping google.com -c 1 will do a ping to google.com one time. The output of ping will be used in awk ‘/data/ {print $7}‘ย  AWK is a programming language that is designed for processing text-based data.

For example: if the connectivity is available the ping output will be.

PING google.com (216.239.61.104) 56(84) bytes of data.

and if the connectivity is unavailable, in some relatively-normal-case it just show this.

PING: unknown host google.com

The awk line is awk ‘/data/ {print $7}’. It means it will find the line containing word “data”, and then print the 7th column of the line. If connectivity is available the seventh line is “data.” (notes: the first column is “PING”).ย  And that is why in the next line of the script it will do comparison to check wether the string $chek is “data.”. This means, if connectivity is unavalaible the ping output would be as shown above then $chek does not contain “data.” or empty ” “.


if [ "$chek" = "data." ]; then
play /home/your-pc/hack/snd/Alarm.wav
exit 0
else
play /home/your-pc/hack/snd/gitar.wav
let limiter+=1
fi
done

We are ready to check wether we should hear Alarm sounds or the gitar sounds. ๐Ÿ™‚
I used the play tool to play the sounds. My friend said that it only a python script that runs some other scripts or library to play sounds. Most linux distributions has it pre-installed (He guess). So if you use ubuntu 9.10 as same as I use, this will be okay. Let’s proceed! (wait, what? windows? go search for batch tutorial)

As you can see, in line 01 the script does the comparison wether the $chek is contain “data.” or empty ” “.ย  If it is contain “data.” then it will start the play commands, and start to play the sounds found in /home/your-pc/hack/snd/Alarm.wav .ย  After it done play the sound, then it will simply stop the loop and finish the script.

But, when $chek does not contain “data.” or empty ” ” this means you have no connectivity, and it will play the sounds found in /home/your-pc/hack/snd/gitar.wav .It’s not over yet, after done play the sounds,

in line 06 it will increment the $limiter values to 1–>

then finish the ifย  –> check wether the $limiter is now less than 10 (wich means 9)–> oh no it is not yet 9! –>

do the ping again –> assign the new values for $chek –> do the rest code all over again. –>

UNTIL, the $limiter finally reach nine and then finish the loop and stop the script. Why? Because, maybe in some case it is not about losing connectivity temporary. Without the while looping the script will play the sounds until it finally connected (wich we might sure,that it would be for a long-long time). And that can be iritating, but yes you can do the Ctrl-C to terminate the script if you run this directly from the terminal.

(what? you run this script from terminal?? I don’t want to see those scary blinking cursor with black and white text around it!)

okay, I’ll documenting once again how you can run this script simply from your top panel bar and run it with just a click. ๐Ÿ™‚

So you can do other things more useful than hitting reload button all over again :p, while listening to smooth sound of looping guitar pattern.

Oh! This, maybe you interested to another bash script implementation for the good use of linux. My other friend share it here.

AND IF YOU THINK YOU ARE HARDCORE PROGRAMMER, WICH APPARENTLY LAUGHING AT MY SCRIPT>>> Please..pleasee..pleaseeee… give me another algorithm that probably more simple than my stupid script…please…

The Bandwidth Abuser

Do any of you are the loyal user of Internet Download Manager? Do you always set the allowed connection to (max) 16? Do you use that configuration when you use a shared internet connection? If you answer yes to all those question, than probably you should aware that you are actually a bandwidth abuser.

18Mb?!@
18 Mbps ???????

But there are things that make you are not the bandwidth abuser:

  • you own the connection and you yourself paid it but you kindly shared it with some of your friends.
  • you set that hell of maximum connections ONLY when you SURELY know that you are the only host that up on your network

    the cheap script

Continue reading “The Bandwidth Abuser”

I am a slow learner.

So, I was totally failed for my firstย programming competition . But that was a ย very very good experience that made me finally believe that I am a slow learner. I have a very slow skill on logic. But, along those spesification comes a big curiousity wich sometimes could be a tragic ending. Yup, I can’t hold the curiousity when I can’t solve something, but I don’t have ‘that quality’ to support my curiousity. Did you get this? Owh just keep reading if you don’t mind…

It was not an individual competition. I did this with my two college senior. And I was never be able to contribute even a single answer.. ๐Ÿ˜ฆ
So this is one of question from the “problem solving” session:

Write a program to show all the non-negative solutions from this equation:

x+y+z=50

where:

x >= 0, y >=0, ย z >= 0

Continue reading “I am a slow learner.”