Shortest Code to randomly place points and connect them
Java : 318 282 265

Because, ya know, Java:



class M{public static void main(String[]a){new Frame(){public void paint(Graphics g){int i=0,j,d=640,n=25,x[]=new int[n],y[]=x.clone();for(setSize(d,d);i&lt;n;i++)for(j=0,x[i]=(int)(random()*d),y[i]=(int)(random()*d);j&lt;i;g.drawLine(x[i],y[i],x[j],y[j++]));}}.show();}}


Its just a simple loop that makes random dots and draws lines between the current dot and all previous ones.

Example with 25 dots:



With line breaks and imports:

import java.awt.*;
import static java.lang.Math.*;

class M{
    public static void main(String[]a){
        new Frame(){
            public void paint(Graphics g){
                int i=0,j,d=640,n=25,x[]=new int[n],y[]=x.clone();
                for(setSize(d,d);i&lt;n;i++)
                    for(j=0,x[i]=(int)(random()*d),y[i]=(int)(random()*d);
                        j&lt;i;
                        g.drawLine(x[i],y[i],x[j],y[j++]));
            }
        }.show();
    }
}


Edit: Since we're not counting imports, I imported a couple more things to save some characters later.

Edit 2: OP added an allowance for hardcoding number of dots. -17 chars :)