Archive for the ‘Web developmnet’ Category

Pebble – more injection and less dependencies in PHP

Wednesday, October 5th, 2011

Dependency Injection (DI) is hardly anything new. I see it as a must for Test Driven Development (TDD). The thing I like most about DI in Java is Autowired in Spring or javax.annotation.Resource, they way member variables are set "magically" and the exact details about creation and implementation is located ...

Marker and polygon tooltips in Google Maps v3

Thursday, September 15th, 2011

Before I get into the details, please note that this is a quick & dirty solution using google.maps.InfoWindow. No demo, sorry, but please add your improvements in the comments! Marker tooltip I start with the marker, as it is the simplest implementation: function attachMarkerInfoWindow(marker, html) { marker.infoWindow = new google.maps.InfoWindow({ content: html, }); google.maps.event.addListener(marker, 'mouseover', function() { marker.infoWindow.open(map,marker); }); google.maps.event.addListener(marker, 'mouseout', ...

Facebook Graph API limitations

Wednesday, September 7th, 2011

I have created a Facebook app for the flea market Facebook groups in my area. (Feel free to take a look at http://loppis.blekinge.it/) To read and manage posts I use the Facebook Graph API, but there are a number of limitations: My application supports deleting posts, but Facebook does not allow applications to ...

Blogging, sharing, status updates, everywhere?

Saturday, July 2nd, 2011

I've realized a long time ago that my personal web diary in in Swedish – 2good.nu – has been obsoleted by my Facebook account. Same with the diary for our first-born child. I didn't even start a blog for our second child. This is quite OK, as my home-made web diary ...

Dutch PHP Conference 2011

Friday, June 3rd, 2011

I was fortunate enough to be able to attend DPC11 on May 19-21 and it was very inspiring. I hope to write more about it in future blog posts!

Stop forum spam!

Monday, January 24th, 2011

I run a Swedish site about energy drinks, along with a Swedish forum for energy drink collectors. In a tie between phpBB and Simple Machines (SMF) I chose the latter as forum software. Since I opened the forum there has been more and forum spam attempts. Actually there have been very ...

Policy notification from Google

Tuesday, December 15th, 2009

My Swedish site Folkmun allows anyone to add words and their definitions. It's a simple Swedish version of Urban Dictionary. Some people add very explicit words and I had totally forgotten that such words may clash with Google AdSense policies. Today I received a friendly warning: While reviewing your account, we ...

New site: Blekinge.IT

Tuesday, December 8th, 2009

As much as I try to get rid of domains I don't use, I can't avoid registering new domains. I recently registered two domains (singular and plural) for a project with codename Green November. Another domain I recently registered is Blekinge.IT. At some point in the future I want it to ...

fmod() in PHP is the worst !”#¤%&/()= function ever!

Tuesday, November 10th, 2009

I hate floating point artithmetic and I really hate fmod() in PHP. It's useless. fmod — Returns the floating point remainder (modulo) of the division of the arguments If you calculate 36 modulo 7.2?  What do you get? Zero, yes. 7.2*5=36. No remainder! What if you use fmod in PHP? $ ...

Online PHP MySQL CRUD Scaffold generator

Monday, July 6th, 2009

I needed some simple PHP MySQL CRUD and found www.phpscaffold.com. Perfect!