the Design Experience Weblog Archive

I am reading Iterating Infusion, by Greg Anthony. It tries to show a clearer way of design object-oriented systems. It's full of theory and throws in a new way to describe object-oriented design. I'll skip over all that for now. I am in the section on designing a system now, and there is one bit that is sticking out as a read it.

He says designing a toolkit, where the outcome is uncertain, that is, you don't know what software will be built with it, is risky. He says done well, a toolkit is more flexible is building multiple system, but done poorly makes it diffifult to build anything.

This makes alot of sense, and is pretty obvious. I hope he has advice on how to design a toolkit well. I am feeling OpenACS suffers from the problem of poor toolkit design. It sometimes gets in the way of what you want to do with it. A good toolkit point the way to your solution when you know what result you want.

12:23 PM, 31 Jan 2006 by dave bauer Permalink | Comments (0)
categories: Programming , Computer Science

Here is the instructions I am following

http://www.togaware.com/linux/survivor/Preliminary.shtml

Unbuntu doesn't magically create a user's home directory so I added

root@leo:~# mkdir /home/oracle
root@leo:~# chown oracle:oinstall /home/oracle

Made it to http://www.togaware.com/linux/survivor/Kernel_Parameters.shtml

I elected to leave me kernel params as is for now, the output was slightly differnet but shouldn't be a problem, I am only using it for testing.

Next I ran into an issue with this:

Florian Beckmann notes to also change the value of ORATAB in $ORA_HOME/bin/dbstart and $ORA_HOME/bin/dbshut from

ORATAB=/var/opt/oracle/oratab


to

ORATAB=/etc/oratab

$ORA_HOME isn't set anywhere and I don't know where to look yet since Oracle isn't installed yet.

Ok past that, now, no combination of xhost + or xhost +localhost or export DISPLAY=localhost:0 is letting the oracle user access the X window server from runInstaller.

Even the debian howto is not helping.

Time to take a break.

This seemed to work

xhost + executed as my regular user.
su - oracle
export DISPLAY=:0.0
cd /tmp/database
./runInstaller

Now its done and it says it installed two j2ee apps

The following J2EE Applications have been deployed and are accessible at the URLs listed below.

iSQL*Plus URL:
http://localhost.localdomain:5560/isqlplus

iSQL*Plus DBA URL:
http://localhost.localdomain:5560/isqlplus/dba

I checked and nothing is runnon there right now.

I skipped the instructions to start oracle on boot for now. I don't wnat it running most of the time.

http://www.togaware.com/linux/survivor/Starting_Stopping.shtml

Ok.

I needed to set ORACLE_HOME. The Howto I linked to specifically UNSETs it, so I don't recommend using that howto!

Next i needed to create a user who could access the database.

To connect as dba

sqlplus "/as dba"
create user ora10 identified by ora10 default tablespace users temporary tablespace temp quota unlimited on users;
grant connect, resource, javasyspriv, ctxapp, query rewrite to ora10;

Make sure ORACLE_HOME, ORACLE_SID and LD_LIBRARY_PATH are set in the environment of the user running aolserver.

April 17,2006, I installed again. Got everything working. Used defaults in netca and dbca.

Got this error

ERROR:
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
Linux Error: 13: Permission denied
Found the answer at https://wiki.objectweb.org/byline/Wiki.jsp?page=BylineOnOracleFAQ
This is caused by Oracle installer not setting setuid on $ORACLE_HOME/bin/oracle. To fix do:

$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle

Now I am getting lots of errors so I think I need to grant some more privileges to the openacs database user.

THe answer is in the OpenACS documentation of course :)

07:52 PM, 29 Jan 2006 by dave bauer Permalink | Comments (2)

I tried to install the debian package from the skype download page, but that did not work. The skype provided .deb is looking for "libqt3c102-mt (>= 3:3.3.3.2)" but the package is called libqt3-mt.

I followed the instruction I found http://forum.skype.com/viewtopic.php?t=42942

1 download the RPM for Mandriva,
2 convert it from rpm to deb with alien: sudo alien -d skype-1.2.0.21-1mdk.i586.rpm
3 install it: sudo dpkg -i skype_1.2.0.21-2_i386.deb

As of January 26, 2006 this worked.

I also had to apt-get install libqt3-mt and alien.

08:41 PM, 26 Jan 2006 by dave bauer Permalink | Comments (0)

Joel Aufrect has stepped down as release manager of OpenACS. Since I had recently read the release documentation and worked on helping Joel test and get OpenACS 5.2.x out the door, I volunteered to take over. Thanks alot to Joel for his years of hard work. The process he worked out and the documentation he wrote made it much easier to take over the volunteer position.

I plan to look for ways to make releases of OpenACS better quality and more frequent. I am starting a personal campaign to clean up the opeancs.org bugtracker.

03:57 PM, 20 Jan 2006 by dave bauer Permalink | Comments (0)
categories: OpenACS , Open Source Content Management

If I have helped you out, and you offered to buy me a beer, I have another idea. I am saving up to buy a Apple laptop (MacBook Pro, I guess). The new laptops should be stable by the time I save up enough. If you feel like helping, click the Donate button. Thanks for listening. You'll have to click the link on my home page, I don't think I can post it in a weblog entry. http://www.thedesignexperience.org/

09:37 AM, 20 Jan 2006 by dave bauer Permalink | Comments (0)
categories: OpenACS

It is interesting to see how writing an automated test can show shortcomings in an API.

The API to subscribe a user to email notifications in openacs looks like this

notification::request::new (public)

notification::request::new [ -request_id request_id ] -type_id type_id \
-user_id user_id -object_id object_id -interval_id interval_id \
-delivery_method_id delivery_method_id [ -format format ] \
[ -dynamic_p dynamic_p ]

Defined in packages/notifications/tcl/notification-request-procs.tcl

create a new request for a given user, notification type, object, interval and delivery method.

Switches:
-request_id (optional)
-type_id (required)
-user_id (required)
-object_id (required)
-interval_id (required)
-delivery_method_id (required)
-format (defaults to "text") (optional)
-dynamic_p (defaults to "f") (optional)

It looks ok, until you try to write a test using notifications. I needed to create a community, add a user, subscribe to the community weblog, remove membership from the community, and then confirm the subscribtion was gone.

Creating the subscription requires deep knowledge of the internals of the notifications data-model. I need to know the id for every one of the notification foreign keys. What a mess. Since every foreign key has a programmer friendly name, such as weblogger_entry or something similar, it would make more sense to pass in the generic name. The id is automatically generated from a sequence and now I have to poke around in the internal notifications tables to get the ids just to write this test.

Certainly there is nothing wrong with this code, and I am not criticizing anyone for it. The notifications code works reasonably well, and has been in OpenACS for quite a while. I just noticed that writing a test can show where your APIs could be made easier, and clearer to use. This particular procedure is intended only called by the notifications code itself. The client code would request a URL with the correct query variables from the notifications package, then pass control to the notifications package with a return_url. This works fine from the web site, but makes it a pain to automate or do anything the original author did not forsee.

So writing tests makes you look at your code in isolation and can reveal places where you code can be improved.

UPDATE: Ok its not a bad as I thought, but still a pain to me. There are helper pros to retreive the ids from the names, but I still think its better design to hide the existence of the ids altogether and do the lookups inside the notification proc.

03:47 PM, 07 Jan 2006 by dave bauer Permalink | Comments (0)

Comparing SICP to HTDP we find one book focused on learning how to solve problems, and think in new ways, while the other focuses on building computer software systems.

SICP is for training computer scientists, while HTDP is for training good programmers.

So if you just want to implmenet new versions of the software we already have, in a new lanaguage HTDP will help you produce better, easier to maintain code. If you want to change the world, and create something new, you need SICP.

11:17 AM, 03 Jan 2006 by dave bauer Permalink | Comments (0)
categories: Technology and Education , Learning , Programming , Computer Science , Learning Portfolio

XML

Notifications

You may
request notification for the Design Experience Weblog.

Syndication Feed

XML