Pages

Learning Python Live

In Sunday, 10th October 2010, at 2.00 AM WIT (West Indonesia Time) or in 9th October at 7.00 PM GMT (Greenwich Main Time), there will be a classroom about Python for Beginners. This classroom is held in IRC Room at #ubuntu-classroom and #ubuntu-classroom-chat at irc.freenode.net server. Hosted by Pedro Mendes (nickname pedro3005), one of the Contributor in Ubuntu. For more information about this, you can see in Ubuntu Wiki's page and The Page for these Class.


Horizontal and Vertical Maximize in One Click with Ubuntu.

Can you do this, without using software, do a one click that give you a horizontal or vertical maximize with any window.
I beat you can't do it in MS Windows. But, if you are using Ubuntu, you are lucky. There is a shortcut to do both things.
To do horizontal maximization, right click the maximize icon instead of left clicking it.

and for vertical maximization, use the middle click.

taken from: http://www.webupd8.org/2009/12/gnome-maximize-window-vertically-or.html
Enhanced by Zemanta

Clear (Source) Code

Html-source-codeImage via WikipediaThe goal is to make a source code that easy to understand and easy to read. It's why we must write a Clear Source Code. But, if you think that your code wont be read by another person, you don't have to do it.
With an Clear Source Code, it's easier for us to debug it. And also, the flow of the program wont be so complicated. The syntax error also can be minimized.

This is few things that must be considered by a programmer that wanna write a Clear Source Code:
  1. Indentation (Use space instead of tab, be consistent).
  2. Separate every part of processing in the program with comments.
  3. Use more friendly variable name instead of unfamiliar thing. For example: use "is_number" for bolean type variable instead of "number".
  4. Give comment that explained. But don't give long explanation.
  5. Don't write to long line. Break a long line to some short line (use an escape character if needed).
Other suggestion can be read from this website.
Happy Clearing Code.
Enhanced by Zemanta

Open Source Replacement for Borland Delphi

As a student of Mathematics Department in State University of Malang, I must confront with Borland Delphi programe for the Basic Computer Programming lecture. It's not my way, because I know that Delphi is a proprietary software, and it isn't free. So, I decide to see other alternatives that Open Source World offer.
Then, I came with Lazarus. A free pascal IDE and RAD tools. Everyone that used to play with Delphi before, will feel comfortable using this software. It's truly a better replacement for Delphi.
But, I think it's still lack of Help and Documentation. And for beginner like me, it's hard to learn something from only the IDE itself. I must collect many source from other place to complete my knowledge about Object Pascal. More over, It's harder to find pascal and delphi documentations compared with Perl and Python.
Enhanced by Zemanta

Learning Perl is Fun

In this holiday, I have an ambitious to learning a programming language. One of my dream is to be a developer for some free open source software (FOSS). But, for that reason, I think at least I must master one programming language. And I choose Perl in this occasion.
 PerlImage via Wikipedia
Perl is an easy language to learn. For a few week, it's easy for me to understand some standard concept in programming. The language itself not so hard to understand. Many simplicity that this language offer to the programmer. Learning this language is same as learning human language instead of computer language. If you have a spare time, better to try learning this language.

Book that I use for learning this language is available for free in the Internet. Its title is Beginning Perl by Simon Cozens. You can download it in this link. But that book are separated by chapter, so for you that want to download a whole book, you can follow this link (created by myself using gs command).

Now, I have landed in chapter 4. And after a long journey to this chapter, a successfully executed program have created by myself. Check this:
#!/usr/bin/perl 
# ara.pl
# version 2.0
use strict;
use warnings;
use 5.010;
use List::Util 'shuffle';

my $jml_siswa = <stdin>;
my $jml_kelompok = <stdin>;
chomp ($jml_siswa, $jml_kelompok);

my @acak_absen = shuffle (1 .. $jml_siswa); #bugs for $jml_siswa = 1

my $sisa = $jml_siswa % $jml_kelompok;
my $hasil = ($jml_siswa - $sisa) / $jml_kelompok;

my @byk_agt_kel = ($hasil) x $jml_kelompok;

if ($sisa) {
 do {
  $sisa--;
  $byk_agt_kel[$sisa]++;
 } while ($sisa);
 @byk_agt_kel = shuffle @byk_agt_kel;
}

my $i = 0; my $j = 1;

while (@acak_absen) {
 print "Anggota kelompok $j adalah:\n"; $j++;
 do {
  $byk_agt_kel[$i]--;
  my $k = pop @acak_absen;
  print "no. absen $k\n";
 } while ($byk_agt_kel[$i]);
 $i++;
} 
Try to understand it. It's fun.
Enhanced by Zemanta

Using Pidgin to Crossplatform Chatting in Local Area Network (Ubuntu/Linux and Windows)

This is the logo for the Pidgin IM client.Image via Wikipedia
Pidgin Logo
A few year ago I was try to find some software for cross platform chatting between a Ubuntu Computer with Windows Computer. After a few hour searching, finally I found the better one, that is Pidgin.
Old version Ubuntu have a facility for chatting with Pidgin because it was the default application for chatting. For now, I don't know are the new default app still support for Local Area Network (LAN) Chatting. If you use old version Ubuntu, you don't need to install anything. If you use windows, so you must install this two software.
    you can download it in http://www.pidgin.im/download/
    for offline installation you can go to this link
    http://sourceforge.net/projects/pidgin/files/Pidgin/2.7.3/pidgin-2.7.3-offline.exe
    • Bonjour for windows, an zeroconf tool for windows.
      Bonjour (software)Image via Wikipediayou can download it at
      http://download.cnet.com/Bonjour-for-Windows/3000-18507_4-93550.html
      After download that two software, the first step is to install the Bonjour. If you don't do this, your pidgin won't work for lan chatting.
      And, after installing Bonjour, you can install pidgin and use it after that.
      For, chatting in Local Area Network, you must start pidgin in both two machine that connected via Lan. Then, you can setup account for bonjour.
      Now, you must see other account in your Pidgin and you can start for chatting with your friend.
      update:
      for new ubuntu version Pidgin is no longer installed by default. It's replaced with Emphaty. I suppose it doesn't support for bonjour account, so, you must install Pidgin with this command.
      sudo apt-get install pidgin
      
      Enhanced by Zemanta