Jun
24
SugarSync Client update
Hi all,
Good News - my SugarSync client is now in alpha - with the ability to download and upload files and folders based on last modified times.
I will provide some initial source code once I have tidied it up a bit and done some more extensive testing.

posted by
Mark Willis
Sep
18
Sorting MySQL Result by field
After my post about sorting multidimensional array's by an array of values I've now found a better way of keeping a mysql result set in order by using the ORDER BY FIELD() function. For example:
SELECT id,name FROM tbl_name ORDER BY FIELD(id,3,4,2,6,8,1) DESC
Will return the results in the correct order or using ASC instead of DESC will return results in reverse order.
The folks over at MySQL have thought of everything

posted by
Mark Willis
Sep
01
Symfony MVC outlook
I have been playing with the Zend framework for the past week or so, There will be a post in the next few days reviewing it. I am also looking at the Symfony framework this week and will post a comparison on both frameworks within the next week or two.
Symfony provides an architecture, components and tools for developers to build complex web applications faster. Choosing symfony allows you to release your applications earlier, host and scale them without problem.

posted by
Mark Willis
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
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
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
Good Morning.
After 3 years of web development i've finally taken the plunge into writing my own blog. I will be posting information about my life and my work.
My Life:
I have a lovely 18 month old daughter with my fiancee, and we are due to have our baby boy in 6 days. I'll be posting more about my family as things happen.

posted by
Mark Willis