Comments Feed

Archive for August, 2009

« Older Entries
Aug
28

Sphinx Tip – Multiple config files

I currently use Sphinx Search for alot of website on my web server, and have about 30-40 different indexes. As you can imagine this can make for a very long sphinx config file.

(40 lines per index) X (30 indexes) = 1200 lines - alot to have in one file.

I learnt this nifty trick from the sphinx search forum. You can use any command line scripting language (BASH,PHP,etc) and then include config files from another directory.

Read the rest of this entry »

posted by Mark Willis
Tags: ,

Aug
25

Remote development – Happier staff

If you had the choice would you commute to your works office everyday (maybe 1-2 hours each way) to do web development or would you prefer to stay at home spend an extra few hours with your family? Would you turn down / negotiate terms on a job proposal if you always work from home but a prospective employer doesn't agree with remote employees?

Read the rest of this entry »

posted by Mark Willis

Aug
23

Best viewed in Firefox

I've been applying some small CSS3 changes into the style of this website including, text-shadow (post titles), custom font-faces (website title) and finally box shadows. These are viewable in firefox,opera,safari generally non-IE web browsers. Although IE is getting better with the new CSS3 styles, its still not quite there.

So for the meantime i'll be applying some more CSS3 styles to the site including gradients and maybe some border images.

Adding the new CSS3 tags to your current HTML is easy:

Read the rest of this entry »

posted by Mark Willis

Aug
20

Windows 7 – A Linux killer?

Windows 7 won't kill Linux on the desktop or anywhere else for that matter. Linux is a brilliant OS for everything its good at (low fragmentation, excellent memory handling, brilliant server reliability), I've always had a copy of Linux installed on my laptop - Fedora,Ubuntu,CentOS. I have also played with Mac OS X, All the major OS players have there pros and cons (for example Mac OS X - you have to by mac hardware)

One of windows' major con - reliability. I constantly see laptops filled with adware/spyware, with fragmentation levels through the roof.

Trying to get a workable system out of these laptops (without formatting) is a tough and lengthy challenge, So I tend to do what everyone does with windows... format it and start again.

Read the rest of this entry »

posted by Mark Willis
Tags: ,

Aug
19

We’ve had a baby

We have had a beautiful baby boy, Liam Archie Willis, last night (11:32pm 18th august).  After being in labour since 6:30PM

Liam Willis minutes old

Liam Willis minutes old

liam 2

posted by Mark Willis

Aug
16

ip2long vs INET_ATON

Whilst I was making the IP range function for my crawler catcher, I stumbled upon the problem of signed and unsigned integers for ip address (ip2long, INET_ATON) and back again (long2ip, INET_NTOA) using PHP and MySQL respectively. This caused me a problem when I used ip2long to sort ip addresses by order, and received negative numbers (-16843010) this gave me some funny results when using php's sort() function. I was getting 1 IP out of a range appearing 3/4 numbers out of place.

Upon futher inspection I found out that php uses signed integers (positive and negative numbers). This messes with the array sort functon. After I changed to unsigned integers, my ip ranges worked perfectly.

MySQL also won't produce an IP from a negative integer, and just returns false:

I've provided some demonstrations, and a php function to produce an unsigned long from an IP address.

Read the rest of this entry »

posted by Mark Willis

Aug
14

Bespin – Collaborative Coding

After reading this from mozilla labs, I thought I should give "Bespin" a try. It's a web based cloud text editor so you can write code through your web browser at your office/favourite coffee shop then logout and log back in again at home (even on another machine) and continue your project.

The newest feature to be released is the "Collaborative coding" feature which enables multiple people to edit the same file at the same time, with undo features. This is a great feature for coders that work remotely as they will still be able to work together.

Check out this webcast from there Joe Walkers blog

posted by Mark Willis

Aug
13

PHP is the future

After reading this, from a fellow PHP Blogger I strongly agree with what he says - PHP has given alot to the web community and I think has helped push Open Source software to the masses, and helps more companies and big players steer away from licensed software.

Also with being an Open Source piece of software and freely available to the masses there are thousands of people that have more then likely been in the same problem as yourself if your stuck coding some odd one - off code.

posted by Mark Willis
Tags:

Aug
12

Software Updates – It’s never my day

It's always sods law that when I download some software (wordpress this time) the day after there is always a security update. Which involves re-doing something I spent a while doing.

Somethings never change.

Mark Willis

posted by Mark Willis

Aug
12

Sphinx Search Review

As with more and more developers, i've always faced a problem with MySQL's FULLTEXT search. As soon as you get over 100-200Mb table and try and do a BOOLEAN search on a keyword field, performance seems to fall out the window.

For Example:

SELECT id FROM listing WHERE MATCH ( keywords ) AGAINST ( 'plumbers' IN BOOLEAN MODE )
Rows: 2,913 total, Query took 0.3789 sec

This was run on a 500k row table, containing 180Mb data.

Sphinx Search makes FULLTEXT searching much simpler and quicker.

Once you download it and get it installed (I have been running it in linux environments: Cent OS and ubuntu), you modify the main config file to setup your desired indexes. You then start the search daemon and away you go.

How it works:

Read the rest of this entry »

posted by Mark Willis
Tags: , ,

« Older Entries