Article about Functional Programming

I had heard about functional programming and I was curious about understanding a bit more than just a few “features” of it. This article explains some basic concepts and I was surprised to learn that the functional programming concept can be applied in common programming language.

http://www.geeksaresexy.net/2009/02/06/an-introduction-to-functional-programming/

Installing a new Apache with PHP

I was tasked with installing a new Apache and PHP on an existing and working RHEL4 servers. The new install had to be separate from the current one so to not disrupt the current work.

Apache 2.2

Apache was somewhat easy to install but here are my steps anyway.

I downloaded the source code from apache.org and untarred in my home directory.

As myself I then configured it with these parameters:

./configure –prefix=/opt/apache22 –exec-prefix=/opt/apache22 –datadir=/opt/apache22 –enable-mods-shared=all

Built it as myself with:

make

and as root installed it with:

make install

I had to modify the /opt/apache22/conf/httpd.conf for a few things. After the ServerRoot line I added these 2 lines:

PidFile “/opt/apache22/httpd.pid”
LockFile “/opt/apache22/access.lock”

These allow many version of Apache to run on the same server without stepping on each other files. There is more to it but these were the 2 lines that took me a while to figure out because I was not reading the comment in the configuration file properly.

I also modified these lines to match what I wanted to do:

Listen 8000
User apache
Group apache
DocumentRoot “/var/www/html_php5″
<Directory “/var/www/html_php5″>
ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
<Directory “/var/www/cgi-bin”>

Listening on an other port is the option I took to make sure I could run 2 Apache without stepping on each other toes. The user and group are the ones in RHEL4/5 so I simply re-used. The document root is a directory I created to be different than the default one (/var/www/html) used in RHEL4/5.

So it was quite simple for the Apache portion

PHP 5.2

Selling a domain name

For the second time in recent history I have received an offer to buy my domain name for $1000. Who thinks that such a ridiculous amount can buy a domain with 4 letters? Do I look like a stupid teenager that will be impressed by a few dollars?

New Code Kata page

I have started a simple page to track my progress in becoming a better programmer. So my Code Kata page will be a simple way to track my progress. Hopefully this is enough motivation to keep moving forward.

http://www.cinq.com/code-kata/

Intelligent Phones

I have a Palm Treo 680 and it is time to consider a replacement. I love the Palm software but Palm is going nowhere so I can’t avoid a change forever.

I have looked at some options but I am quite puzzled about which one is the best choice.

iPhone is the rage but I have heard too many stories about the battery not lasting that I don’t really want such a phone. The virtual keyboard is also quite a turn off for me. I have an iPod Touch and I can’t type quickly on a screen. So that option is out of the race.

Windows Mobile options are numerous but I feel a bit the same about it as I do about sticking to the Palm. They seem to be doing nothing and going nowhere. All you hear about Microsoft is that they keep delaying the next version.

Blackberries are attractive to some extent. I have one because of work and I want to get my own so that they can push me the emails and I will not have to carry 2 units on me. Keyboard is good on most units and the battery life is actually very impressive on the one I have.

My concerns with all these different phone is that important tasks to get me organized always seem to be an after taught. A good tasks manager is important for me and on the BlackBerry it is a bit basic for me. Can’t seem to find a good application to organize notes on it either. Very basic applications. I can do advanced organization on my Palm and it helps me a lot. I am not looking for an entertaining device to play music and videos and connect me to the Internet all the time. I am looking for very useful “disconnected” applications.

I will have to dig more to find all the functionality that I want in that gadget.

Disable ipv6 on RHEL5

Found a post that explained what was needed to disable ipv6 on our installation of RHEL5.

The only thing that we really need is to add a line in /etc/modprobe.conf

alias net-pf-10 ipv6 off

Simple enough!

Ref:

Bonding NICs in RHEL5

We started testing some NIC bonding on our RHEL 5 VM and we will be testing on real hardware soon. The ultimate goal is to add this setup in our kickstart file.

We created these files for testing:

/etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=no
IPV6INIT=no

Added these lines to /etc/sysconfig/network-scripts/ifcfg-eth0 and ifcfg-eth1:

MASTER=bond0
SLAVE=yes

in /etc/modprobe.conf we added these lines:

alias bond0 bonding
options bond0 miimon=100 mode=1

We just need to test on some physical servers and see how all this works now.

Reference:

Mobility shut down

I tried the Rogers Portable Internet and it did not work from anywhere I went. It is very simple to setup and the modem has these lights at the top that tells you the strength of the signal. Even when the 5 lights were on I could not keep the signal from more than a few seconds. I tried it for 2 days and then gave up since I was not able to transfer any traffic.

Mobility Worker Nirvana

The title of this post could probably read as “the pursuit of working anywhere on a budget”. Since I work from home I figured that it means that I can work from anywhere. I have been looking at some possibilities for the last few weeks on where and how I could work from elsewhere than my home office.Connectivity is quite important since I do all my work remotely. I need to be able to connect to servers in different locations to do my work. Rarely can I work in an isolated mode. Here they are only a few options if I want to get wireless access from anywhere. Rogers has a modem for only $99CAD plus the data plan. Maybe that could be the solution. The only thing it needs is a power outlet. We will test and see.