I just finished reading the book The Tipping Point by Malcolm Gladwell. On the surface this does not seem to be a book on programming, and it is not.
I really liked the book because it assembled a number of political and social theories into a readable and digestible items. The Broken Windows Theory, which makes hypothesized that if a vacant building gets a broken window, you should fix it as soon as possible. The consequences of not-fixing it result in people assuming that no one really cares. The result is the rest of the windows getting broken. If you fix the window, then it is likely that no further damage will be done. This policy was implemented in New York in the 1990s. The result was a dramatic reduction in crime, and vandalism. This is the case of making a small change which results in further downstream effects. The explanation in the book is insightful and makes these theories easy to understand.
How does it relate to software and technology? It covers a methodology for making trends and social behaviors "stick". The ideas covered in the book speak in terms of epidemics. Those who understand viral expansion loops (viral marketing) will be able to understand the book and its underlying premises. If you are looking for some material on viral expansion loops (Viral Marketing), there is a really good one on Fast Company which is very well done. Fast Company had a cover article for May 2008 on CEO Gina Bianchini of Ning. They mention the use of viral expansion to attempt to grow Ning into a social powerhouse.
The book details items on how to make things stick, and how to spread the word about something. My stickiness factor is how to make social networks stick. For example, why is Facebook becoming more popular than MySpace. Why do people use LinkedIn? What benefits are there to blogging. This book can provide a wealth of information into social and environmental factors which make software and technologies popular.
The book is a real quick read, and I would recommend it with 4/5 stars.
Sunday, June 22, 2008
Wednesday, June 18, 2008
Apache Derby (JavaDB) INSERT Statement with IDENTITY
If you are trying to insert values into a table which has an identity column, the documentation is not very clear. If I create a table in an Apache Derby (JavaDB) database which has a primary key which is generated always, the syntax for doing a query based insert is a little different.
Here is the table:
Here is the table:
CREATE TABLE FAMILY (Now if I want to insert values from another table here is the query I used:
ID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
DESCRIPTION VARCHAR(50) NOT NULL
)
INSERT INTO FAMILY (DESCRIPTION) ( SELECT DISTINCT FAMILY FROM EQUIPMENT_GROUP WHERE FAMILY IS NOT NULL)Please note that I did not put anything into the ID column. If I try to specify a value, it will result in an exception
Since the column has been marked as GENERATED ALWAYS, it handles incrementing the key and assigning it.Exception: Attempt to modify an identity column 'ID'.
Labels:
Apache Derby
,
Java
,
JavaDB
,
Programming
,
tutorial
Monday, June 16, 2008
Configuring Apache 2 HTTP Server on Solaris 10
How do you configure Apache 2 HTTP Server to run automatically on Solaris 10 using rc init scripts.
Log into the Solaris box as root, or su root.
Go to the /etc/init.d directory.
Copy the apache startup script to apache2
Change the group to sys
as follows:
Check to make sure you have a valid httpd.conf file located in /etc/apache2. You can copy the httpd.conf-example file to httpd.conf. This will create a basic httpd.conf file.
Next go to the /etc/init.d directory and try executing the apache2 file. You should see something like this:
Next you will want to configure it to start/stop at the various runlevels.
Go to /etc/rc0.d and add the following:
This will complete the configuration for your server. Next time you change run levels, or reboot, the Apache 2 HTTP Server will restart as you expect.
Addendum:
Zaphod commented on my page about using Solaris SMF. This is truly easier.
1. Check to make sure you have a valid httpd.conf file located in /etc/apache2. You can copy the httpd.conf-example file to httpd.conf. This will create a basic httpd.conf file.
2. Execute svcadm -v enable -rs apache2
3. You are now running on Apache2 on SMF.
Log into the Solaris box as root, or su root.
Go to the /etc/init.d directory.
Copy the apache startup script to apache2
cp apache apache2
Change the group to sys
chgrp sys apache2Next change the flags on the file to execute
chmod u+x apache2Open the apache2 file with your favorite editor and modify the following lines:
APACHE_HOME=/usr/apache
CONF_FILE=/etc/apache/httpd.conf
RUNDIR=/var/run/apache
PIDFILE=${RUNDIR}/httpd.pid
as follows:
APACHE_HOME=/usr/apache2
CONF_FILE=/etc/apache2/httpd.conf
RUNDIR=/var/run/apache2
PIDFILE=${RUNDIR}/httpd.pid
Check to make sure you have a valid httpd.conf file located in /etc/apache2. You can copy the httpd.conf-example file to httpd.conf. This will create a basic httpd.conf file.
Next go to the /etc/init.d directory and try executing the apache2 file. You should see something like this:
[dev1:init.d:root]#./apache2 startYou can check your configuration by using a browser to check it.
httpd starting.
Next you will want to configure it to start/stop at the various runlevels.
Go to /etc/rc0.d and add the following:
ln -s ../init.d/apache2 K17apache2Go to /etc/rc1.d and add the following:
ln -s ../init.d/apache2 K17apache2Go to /etc/rc3.d and add the following:
ln -s ../init.d/apache2 S51apache2Go to /etc/rcS.d and add the following:
ln -s ../init.d/apache2 K17apache2
This will complete the configuration for your server. Next time you change run levels, or reboot, the Apache 2 HTTP Server will restart as you expect.
Addendum:
Zaphod commented on my page about using Solaris SMF. This is truly easier.
1. Check to make sure you have a valid httpd.conf file located in /etc/apache2. You can copy the httpd.conf-example file to httpd.conf. This will create a basic httpd.conf file.
2. Execute svcadm -v enable -rs apache2
3. You are now running on Apache2 on SMF.
Labels:
Apache
,
Apache2
,
HTTPD
,
Solaris 10
,
tutorial
,
Web
,
Web Server
Subscribe to:
Posts
(
Atom
)
Popular Posts
-
Introduction This article is not another diatribe to tell you the importance of unit testing. I think we can all agree that it is important...
-
A friend of mine asked me if there was a list of reserved words in EL and JSF. He had previously looked for it, and after some Google search...
-
I saw a question posed on stackoverflow called Trouble with Primefaces 3.0.M2 SelectOneMenu Ajax behavior and I had just done an example a...
-
I was working on a couple of SSL based issues when I made a couple of observations. The default self-signed key generation in Java does not ...
-
This is an example on how to make a system call to the local operating system to execute external programs. This example was written to work...
-
We have been doing a lot of work lately with PrimeFaces. A common set of questions comes up about displaying <p:dialog/> boxes on a pa...
-
I was asked earlier today how to reset fields in a JSF application, if the validation fails. In his case, he had a Richfaces table which had...
-
Previously, I posted an example of how to use JSF 1.2 with form based authentication (j_security_check). In this example, I use JSF 2.x to...
-
Image by quasarkitten via Flickr The basics for creating a Maven archetype can be found in the Maven - Guide to Creating Archetypes . The ...
-
Abstract A common use case is to iterate over a collection of elements, and display them on a page. In the world of JSP, we would use a Ja...