Wednesday, April 4. 2007
I was extending the Openads database abstraction layer last night, to ensure that creation of databases works correctly. I'm no PostgreSQL expert, but it seems that it won't let you issue DDL/DML commands unless you have connected to a database first - so if you want to create a database, you have to connect to a different, already existing database first. Luckily, the PEAR::MDB2 library will connect you to the "default" database for a database server if you specify no database name in the DSN. (For PostgreSQL, this is the "template1" database.) This was all well and good, until I tried to then connect to my newly created database, and all I'd get back was the previous connection to "template1". It turns out that the MDB2::singleton() method compared the DSN array of the database you want to connect to with any DSN arrays of previous connections it has made by using the array_diff() function. Alas, when creating a connection with no database name results in the DSN having the boolean false for the database name field - and because other items in the new DSN array were also false in my case (for example, the "mode" of the connection" was false), the array_diff() function returned no differences. Oops! Changing to the array_diff_assoc() function solved the problem.
Tuesday, April 3. 2007
It's been all systems go at Openads central this year. One of the big jobs we've been taking on is dealing with our database schema. Managing database schemata is actually a tough job, if you want to do it in a agile way. (No one actaully designs their database schema up front any more, right?) There are several great books on the subject, though, and based on those ideas, we've produced a white paper outlining a system we're writing for managing database schemata for PHP, in the same vein as Rail's Migrations. As part of this project, we've decided to use PEAR::MDB2 and PEAR::MDB2_Schema to manage the jobs of reading in our existing database schemata from existing databases, to then be stored in XML files, The same two PEAR packages will then be used to prepare the SQL DDL/DML commands required to create new databases when installing Openads, or to modify an existing Openads database when upgrading. Of course, the DDL/DML created will all be based on XML schemata files. If you've ever used PEAR::MDB2, you may be aware that it works by storing database schemata information in an "internal" MDB2 datatype. This datatype needs to be converted into database-specific commands when talking to a database, obviously. But if you're reverse engineering a schema from an existing database, you also need to be able to convert an existing database "nativetype" into the appropriate MDB2 datatype. However, this is where we've run into a few issues.
Continue reading "Custom Types in PEAR::MDB2"
Tuesday, March 27. 2007
Maybe not my ideal job, but man it would be cool.
Monday, March 26. 2007
Sorry to all of the millions of RSS subscribers out there. (Ha!) I decided to add categories to posts, and so of course the RSS generator decided to update all the entries and re-publish them with new dates. Grrr. I really didn't want it to do that. Oh well, live and learn.
Wednesday, March 14. 2007
Oh yeah. A new version of PEAR::MDB2 is out. I'm planning on updating my blog software "soon", and I'll put up a detailed run down on some of the new features in MDB2 as soon as I can get code syntax highlighting working...
Thursday, February 22. 2007
So, day two of the Future of Web Apps! Mark Anders kicked things off with a demo of Flex Builder 2. That was actually pretty cool, I thought. I'm not much of a UI person (okay, I have no interest in UI design at all, beyond enjoying someone else's nice UI) but it seemed like a pretty awesome way to create a Flash application. Mark also talked about how great ECMA will be in the future (nice) and also gave a quick demo of Apollo. Next up Chris Wilson from Microsoft talked about IE7. Khoi Vinh from NYTimes.com talked about site design. This was a great presentation, with lots of interesting things to note: - It's Web 2.0, baby. Even the big boys at NYTimes.com don't do it the old way, anymore. It used to be that new sites were based on "news delivery." Now, it's all about "news centric interactivity."
- Features are bad. If you look at users, they fit the bell curve. There's a few beginners, there's a few experts, but most people are the run-of-the-mill intermediate users. However, all of your fancy features are aimed at the experts. That means for most people, there's a lot of "feature noise" that they have to tune out.
- Should that be there? "For every single thing of importance, there should be multiple reasons."
- Settings and preferences? That's just a "dumping ground" for design issues that you couldn't solve, and that's not good.
- Do user testing. If you show it to your boss, that's not user testing, that's "executive testing". (Or, usability testing vs. acceptance testing.)
Simon Willison talked about OpenID. Hopefully people will take his advice, now that the war is won, and soon we will be able to enjoy everyone's sites supporting OpenID! Jonathan Rochelle from Google talked about the lessons learned from creating Google Docs & Spreadsheets. His advice complemented Khoi's nicely, I thought: - Get UI help early on, because UI innovation is key to success these days, and lots of your front end code will depend on what the UI does - so the sooner you know what your UI will do, the better.
- Speed is critical. Kill those features, and make the important stuff fast. If it's not fast, and you don't have time to make it fast, dump it.
- Get user feedback - not manager feedback.
- Users cannot always see innovation - so sometimes, you have to innovate and create features that your users don't know that they want (yet).
- User data is sacred. Protect it at all costs.
- Use test harnesses, automate your tests, and perform benchmark testing.
Rasmus Lerdorf talked about the history of PHP, and the new filter_input() option in PHP 5.2. Hopefully some good will come of this! Finally, the boys from Moo got up and spoke. The product sounds, and looks great. If only they didn't have to go down the innocent path. There are few things that annoy me more than companies that think they are "cute". Fun, I can deal with. Funny, I like. Energetic? Sure. Fresh and funky? Great. But "cute" is just annoying.
Tara Hunt's presentation on Building Online Communities is now up on her site. I'm back at work today helping out a client, and I didn't have a chance to write up day two last night, but hopefully I'll get a chance to do that tonight!
Tuesday, February 20. 2007
The Future of Web Apps conference started today, and I'm lucky enough to be going along to all three days. Here's my thoughts on day one.
Mike Arrington from TechCrunch kicked off the day with his thoughts on The Future of Start-Ups and Web Companies. However, he started his presentation with the caveat that he's paid to think about start-ups and so on, but most of the great start-ups have ignored his ideas, so I don't really know what we were meant to take home from his presentation . Still, the obvious points - you need a good idea, you need great people, and you need to get people into it - were worth mentioning, I guess. I did also notice that Mike thinks Apollo is the best thing since sliced bread.
Tara Hunt of Citizen Agency gave an interesting talk on Building Online Communities. There wasn't much in the presentation that you couldn't guess that you would need to do if you want to involve people in your product/site and build a community; but it was still interesting to see the common features of their case study of different healthy communities. The presentation was very dense on the content side, so hopefully I'll be able to update this article soon with a link to the slides.
Danny Rimer was, alas, unable to make it, so Ben Holmes from Index Ventures stepped in to talk about Everything you need to know about Funding. This isn't something that has any immediate impact on me at the moment, but it was interesting to hear him talk about when not to get investment, what VC companies are looking for - a product, not an idea; and great people - and what they will want from you in return for investment (ie. their share of the stock, representation, reverse vesting, and veto on the exit strategy).
Matthew Ogle & Anil Bawa Cavia gave the stand-out presentation of the day, talking about Lessons from Building the World's Largest Social Music Platform. The presentation really gave an insight into how being open with their community helped them grow. This meant being open in terms of making the API open so that developers could get involved, and also so that people would be willing to share their attention data with last.fm, because the open API meant that the attention data wasn't "owned" by last.fm, as users could get their data out of the system if they wanted it - and when they did, it was worth more than when it went in, because last.fm had added value by performing collaberative filtering on the data.
Being open also meant being open in terms of process, and letting their community know about the good and the bad - Matt mentioned that he thought it was odd that in the early days, when the hardware crashed, they would actually get more donations from users immediately afterward, because the open approach meant people were engaged and involved in what was going on with their service.
Anil also talked about processes, and how last.fm are trying to ensure that their communications and processes are as light weight as possible, so that while information is shared - as it needs to be - the processes don't get in the way of doing their development. I gather from talking to Anil (we used to work together) that the idea of agile processes is something that he's enjoyed bringing to last.fm from how we do it at Openads.
Werner Vogels from Amazon (I can't bring myself to link to Amazon) ran through the Amazon S3 and EC2 service offerings, but didn't really say anything that I didn't already know.
Bradley Horowitz from Yahoo! talked about, well, basically Pipes. It's a cool idea for the future of web applications, and I'm keen to see where this can go. In question time, Bradley mentioned that Y! are obviously concerned about people using web site scraping as a source of data for Pipes, and the content and copyright stuff that goes with that, so it will be interesting to see if this becomes a real problem for them, or just a problem a la YouTube.
Kevin Rose from Digg talked about some of the problems they deal with at Digg, as well as features planned for the future. He announced that Digg will be joining the ranks of sites that support OpenID, so I'm really looking forward to tomorrow's talk on OpenID. There was a question about splitting Digg into different social groups that got a big cheer - but I'll talk about that more in depth in another post soon!
Monday, February 19. 2007
Every season in The Sopranos, Silvo becomes more and more of a parody of the stereotypical mafioso. On Saturday, I went into Currys (uuuugh), to pick up a cheap DVD player for Cathy - so that she doesn't have to try and deal with mucking about with my Archos just to be able to watch a simple DVD - and I found myself confronted with a sales assistant who, apparently, is the greatest parody of the clueless, uneducated sales assistant who could care less about you ever conceived. Me: "Excuse me please, I'm looking at DVD players. There are two here that I am interested in, but only one of them has a price tag. Could you please tell me what the differences between the two models are?" Him: "Well, this one's more expensiver, innit."
On enquiring what the differences were other than which one was the more "expensiver", he simply walked off without saying anything, leaving me to try and figure out the differences by myself for 10 minutes. On his return, a series of blank looks and shrugs suggested that he had been unable to find out anything about either model in this time, so I simply asked for the "cheaperer" one, assuming that any place staffed by people this clueless would be easy to push about if I had managed to buy something that wasn't suitable. The player is great. 
Tuesday, February 13. 2007
|