29 May 2005

Software Engineering Management

"Reuse-in-the-large (components) remains a mostly unsolved problem, even though everyone agrees it is important and desirable."

Emm... make sense. This quote is from an article, "Facts of Software Engineering Management". I guess the author of this article is same as author for book "Software Creativity". Here is the summary.

22 May 2005

Roundup configuration (fix)

We start roundup server by:
roundup-server support=roundup

but I got an error page:
Error Response
Error code 404
Error code explanation: 404 = Nothing matches the given URI.
I can't remember how I start roundup-server nicely before this :), since I use this Roundup rarely. Now it fixed after modify ~/roundup/config.ini:
#! web = http://localhost:8080/roundup/
web = http://localhost:8080/support/
Refer configuring your first tracker.

11 May 2005

portupgrade -v postgresql-client

Upgrade postgres by:
portupgrade -v postgresql-client

then, got this error:
configure: error: do not put -ffast-math in CFLAGS
===> Script "configure" failed unexpectedly.
Please report the problem to girgen@FreeBSD.org [maintainer] and attach the
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. an `ls /var/db/pkg`).
*** Error code 1

Stop in /usr/ports/databases/postgresql74-client.
*** Error code 1

This happen after I build customized FreeBSD-5.4 kernel. I have this line in /etc/make.conf:
CFLAGS= -Os -pipe -funroll-loops -ffast-math
The postgresql74 don't like -ffast-math flag, so I add this line in /usr/ports/databases/postgresql74-client (to override default flag value in /etc/make.conf):
CFLAGS= -Os -pipe -funroll-loops #without -ffast-math

Then I can compile postgresql74-client happily :).

08 May 2005

Ruby on Rails. What?

Rails should support postgresql-7.4. But what the hell is this error?
No such file to load -- postgres

Ok, this is time for googling. Here is one of the solution. Interface to postgresql is
not included in standard rails distribution (I know, interface to mysql is in included).
Then, another error message appear:
ERROR C42P01 Mrelation "personals" does not exist Fnamespace.c L193 RRangeVarGetRelid: SELECT COUNT(*) FROM personals

Before this I had generate model and controller for table personal. This article has nice intro
to activerecord database tables and columns rules (heading: What's in a Table Name?). Also, refer to
this. i.e. the error is because, Rails guess table for model 'Personal' as 'personals' (smart..).
Then, if model 'Mouse', Rails will guess the table name is 'mouses'. What? My English language
teacher teach me that plural for mouse is mice. So,
class Mouse < ActiveRecord::Base
set_table_name "mice"

To have CRUD in Rails for model 'Personal', I only add one line in the controller, e.g:
class PersonalController < ApplicationController
scaffold :personal


05 May 2005

Recompile MPlayer 1.0pre7 and install xfce4

My mplayer is recompiled today. This time, I add some flag in Makefile

I'm gonna like this mplay - console based frontend for MPlayer. Previously I use cplay for my console based mp3 player. But I found, cplay give you very basic functionaly. Last time, I failed to use this app. Today, I solve it by run ./force_install_modules instead of just run ./install (script in mplay-0.80.tar.gz).

Yesterday, I pkg_add -vr xfce4. Works for me. Actually, this window manager is for my housemate. Maybe they found my evilwm quite hard to use :)

Joke for today. Credit to Sarah and Zubayer.

02 May 2005

Support crisis - What to do when client report bug?

My program crash. The client keep complaining why the program doesn't work as they expected. They even phone me during my holiday :(
The database is corrupt, GUI crashing, unexplainable problem coming out. The sky is FALLING! What to do?
I remember the first time they call me to report a bug. What I do was, my head gone blank, my hand is shaking, and I don't answer them properly. Very bad! That was obviously the wrong way to support crisis.

This article from extreme programming practise give me idea to handle crisis properly.

01 May 2005

pg_dump Postgresql.

[in office]Annoying pg_dump and restore database problem. I had a sequence issue_id_seq in a database. But after dump the database and restore to new database, the sequence become issue_issue_id_seq. Until now this problem don't solve. Grrrr...

[at home] How to copy schema of a database to new database?

createdb new_db
pg_dump -s old_db | psql new_db