php page 2 - Dave's Blog

Search
My timeline on Mastodon

Xbox Achievements for Everyday Life

2008 Sep 16, 7:54

I just upgraded to the Zune 3.0 software which includes games and purchasing music on the Zune via WiFi and once again I'm thrilled that the new firmware is available for old Zunes like mine. Rooting around looking at the new features I noticed Zune Badges for the first time. They're like Xbox Achievements, for example I have a Pixies Silver Artist Power Listener award for listening to the Pixies over 1000 times. I know its ridiculous but I like it, and now I want achievements for everything.

Achievements everywhere would require more developments in self-tracking. Self-trackers, folks who keep statistics on exactly when and what they eat, when and how much they exercise, anything one may track about one's self, were the topic of a Kevin Kelly Quantified Self blog post (also check out Cory Doctorow's SF short story The Things that Make Me Weak and Strange Get Engineered Away featuring a colony of self-trackers). For someone like me with a medium length attention span the data collection needs to be completely automatic or I will lose interest and stop collecting within a week. For instance, Nike iPod shoes that keep track of how many steps the wearer takes. I'll also need software to analyze, display, and share this data on a website like Mycrocosm. I don't want to have to spend extreme amounts of time to create something as wonderful as the Feltron Report (check out his statistic on how many daily measurements he takes for the report). Once we have the data we can give out achievements for everything!

Achievements for Everyday Life
Carnivore
Eat at least ten different kinds of animals.
Make Friends
Meet at least 10% of the residents in your home town.
Globetrotter
Visit a city in every country.
You're Old
Survive at least 80 years of life.

Of course none of the above is practical yet, but how about Delicious achievements based on the public Delicious feeds? That should be doable...

PermalinkCommentsself-tracking data achievements

Facebook Profile Views Application - Failed Idea

2008 Aug 21, 11:24

I had an idea for a Facebook app the other day. I wondered who actually looked at my profile and thought I could create a Facebook app that would record this information and display it. When I talked to Vishu though he said that this wasn't something that Facebook would be too happy with. Indeed the Platform Policy explicitly disallows this in section 2.8. This explained why the app didn't already exist. Its probably for the best since everyone assumes they can anonymously view Facebook profiles and would be irritated if that weren't the case.

On the topic of assumed anonymity, check out this article on the aggregation and selling off of your cell phone data including your physical location.

PermalinkCommentstechnical facebook privacy cellphone extension

Dr. Horrible Link Roundup

2008 Aug 10, 3:33PermalinkCommentsdr. horrible doctor horrible humor link roundup

Kirkland Uncorked Weekend

2008 Jul 21, 10:36

Kirkland Uncorked posterSaturday we went to Kirkland Uncorked, a wine tasting festival near our home. We took the bus and after finding the correct one (they really should have different numbers for buses that are on the same route but traveling in different directions) made it to the festival. Unfortunately I don't remember any of the names of the wines just which ones I enjoyed by order. Recalling that I enjoyed the first one I had and the second to last one, doesn't really help me find them again. There were local artists who had setup booths and Sarah got a lovely necklace. After that we ate at Cactus which, because it was such a lovely day, had all its windows and doors open.

Sunday was quieter. A few household chores and plenty of GTA4. I almost got the One Man Army achievement but I found that after four minutes with six stars I eventually dropped back down to three stars without realizing it.

PermalinkCommentswine weekend nontechnical

CodeIgniter User Guide : Getting Started With CodeIgniter

2008 May 1, 3:50CodeIgniter is a PHP framework for rapid web application development.PermalinkCommentscode php manual reference codeigniter

Mazda Forums - Mazda 3 audio inputs

2008 Apr 29, 5:16PermalinkCommentscar reference forum mazda3 mazda audio aux

Welcome to OpenID Enabled!

2008 Apr 7, 2:55"The PHP OpenID library lets you enable OpenID authentication on sites built using PHP."PermalinkCommentsphp openid development opensource identity authentication api software server library

Search and Archive of Dave's Things

2008 Apr 7, 10:31

Photo of crates in a warehouse. Licensed under creative commons by Don Jones.I now have search and an archive available for my site. I previously tried to setup crappy search by cheating using Yahoo Pipes and now instead I have a slightly less crappy search that works over all of the content that I've produced on my blog, uploaded to flickr or youtube, or added to delicious.

You can now read my first LiveJournal blog post or, for probably much more entertainment value, view all the photos and videos of Cadbury by searching for 'bunny'.

The search is only slightly less lame because although it searches over all my content, I still implemented it myself rather than getting a professional package. Also, the feed supports the same search and archive as my homepage so you can subscribe to a feed of Cadbury if you're so inclined and just skip all this other boring stuff. My homepage and feed implement the OpenSearch response elements and I've got an OpenSearch search provider (source) as well.

PermalinkCommentstechnical search archive opensearch homepage

DeleteThis.net on NearlyFreeSpeech.NET Update

2008 Mar 23, 12:38

The move of my website to NearlyFreeSpeech.NET is mostly complete except for a few server side things not working yet: RandomGrammar and parts of Vizicious. I'm still very happy with the NearlyFreeSpeech.NET hosting and so far I've only spent a few cents on hosting. At this rate I'll only spend a few dollars a year.

I've moved all my pages to use the same CSS and hooked it up with cookies to my Kuler color options so now changes to the color theme will stick and apply to all my pages. I haven't figured out the caching for this yet so you may have to refresh to see changes to color applied.

PermalinkCommentsnearlyfreespeech.net technical webhosting kuler homepage

Now using NearlyFreeSpeech.NET to host deletethis.net

2008 Mar 17, 1:25

I've switched from using my own home web server of which one of the harddrives died, to using NearlyFreeSpeech.NET, an actual real live web hosting service. So far I'm very happy with them and they give me almost exactly what I had on my own home server: ssh access, vim, php, java, etc. etc. The only notable things they don't do are (1) cron jobs which I use currently and (2) SSL which I don't use currently. I can replace my cron job usage and I suppose I'll have to reevaluate my web hosting if I ever need SSL. At the moment many of the server side things like Vizicious will be unavailable. I'll work on getting those working again at some point.

PermalinkCommentstechnical webhosting webserver server homepage

SourceForge.net: ZPlet: A Z-Machine for Java

2008 Feb 25, 2:09PermalinkCommentsdevelopment if interactive-fiction java opensource

Personal Search with Yahoo Pipes

2008 Feb 3, 11:59

I've setup a minimal search page that uses a Yahoo Pipe to sort of search through my content. I say sort of search because I only get full text search over my recent item feeds and otherwise I just search over my tags.

To get real search I'm going to have to keep an archive of all my content on my own website. This is a pain but on the other hand it will let me easily backup my content or display old items on my page. Why didn't I just use a prebuilt solution?

PermalinkCommentsyahoo search rss yahoo-pipes homepage

LibraryThing Developers are Responsive

2008 Jan 31, 10:47

[Many books in large bookcase. Photo creator http://flickr.com/people/babblingdweeb/]I use my recently added books feed from LibraryThing, a site I've mentioned before where you track, review, recommend, and share your books, and I put the recently added books on my page. I thought it might be nice to include the book covers so I suggested adding book covers to RSS feeds in LibraryThings 'Recommend Site Improvements' group. The next day I had a response from the founder and lead developer Tim Spalding who had started implementing the feature. I noticed a few bugs, reported them on the same thread, and he fixed them soon after. Fantastic! It makes me want to upgrade to a paying account.

Incidentally, if you notice the Ghost in the Shell book appear multiple times in my RSS feed its due to the previously mentioned iterative bug fixes. The same item appeared multiple times slightly differently with each bug fix and your RSS aggregator may have picked them up as distinct items.

PermalinkCommentstim-spalding librarything rss homepage

Vegas and New Year

2008 Jan 2, 8:57

Normal Sized Slot MachineTwo and half weeks ago Sarah and I went to Las Vegas where I got to see Jesse, Pat, Chris, and (briefly because he's some kind of big shot too busy for his friends now etc) Grib from college. They're mostly in San Jose and I hadn't seen them for a while so it was a lot of fun to hang out. We all stayed at the MGM which is a nice hotel with some good restaurants. In other Vegas related links, Sarah added Sarah's Las Vegas restaurant reviews to her reviews and Jesse has Jesse's Vegas photos up too.

Vegas DinnerSarah and I saw the Blue Man Group (video from a concert) and the Price is Right Live Show. The Blue Man Group was very cool although the music was all rock with a heavy drum focus (not depicted in the videos I linked) which I got a little tired of. But despite that I really enjoyed the show, very funny and I totally recommend it. The Price is Right Live Show is like the regular show on TV except the recording is not televised and its not hosted by Bob Barker or Drew Carey. So folks from the audience are still called up to play the same games and really win prizes. It was advertised as hosted by Todd Newton, B-list game show host, but was instead hosted by JD Roberto who hosted such things as "Reality Remix" and the show "Are You Hot? The Search for America's Sexiest People". The showcase showdown included the 2008 version of my car and thankfully I wasn't picked to compete for that because, well I don't know where they bought the car, but I would have gotten the price very wrong. We sat right next to the stage for that show and had a good time.

MGM Grand in Las VegasFor New Years Eve Sarah and I stayed in and watched the glitched Seattle Space Needle fireworks show from a safe distance. On New Years we went to a pot-luck at Todd's house and had a fun time. Todd's place is on the top of a hill and has a lovely view of Washington's snow-capped mountains.

PermalinkCommentsnewyear vegas lasvegas personal bluemangroup

Theme Options

2007 Dec 24, 12:41These days it seems like there's a social sharing website for everything representable as bits. Like Scribd for (mostly legal) documents, SciVee for scientific research videos, Wordie for words, and Kuler for color themes. Kuler seems like a ridiculous website (overkill) but I had been meaning to update my homepage's color design and Kuler has an RSS based REST API. The API lets you obtain things like the most recently added color themes or the most popular or all themes containing the color dark red, etc... So of course rather than update my website's design I hooked up my css to the color themes coming out of Kuler. Select my main page's color theme from a list of random Kuler themes. As I'm sure the regular readers can guess I use an xslt and blah blah blah... It looks OK with Silver Surfer and Happy Hipo but in general changing the colors this way doesn't produce something pretty.

When reading about Kuler I found that they may have stolen the whole idea wholeslae from ColourLovers. They discuss the thievery in an article on their blog. I would have switched over to ColourLovers out of principle but they don't have an easily accessible API.PermalinkCommentscolourlovers color xslt theme homepage technical kuler design

Zune Software Update

2007 Nov 19, 3:47PermalinkCommentsmicrosoft technical music zune social

Portal is fun; the cake is a lie!

2007 Oct 22, 4:47I purchased the Orange Box off of Steam a bit ago and like others before me who have discussed elsewhere, I already owned two of the five games that come from the Orange Box. However, the combined price of HL2E2 and Portal, the two games I actually wanted was supposedly equivalent to the price of the Orange Box bundle. Incidentally, if anyone would like HL2 or HL2E1 I can gift them to you.

HL2E2 was excellent of course but the big surprise for me was Portal. (Mild spoilers follow) It has a sort of zen simplicity: there are a few simple game-play mechanics, a handful of textures and objects, and a deceptively simple story all used well and tied together to produce an entertaining and polished game. It seems a bit short but its probably better to end with the gamer demanding more. The humor and the sort of play within a play aspect of the game is what really sold me though. It has the funniest ending theme I've heard (also blogged by the creator). The voices of the automated turrets are so adorable I would feel compelled to hug them if they weren't always trying to kill me. Additionally the weighted companion cube seems like an experiment in understanding gamers' attachment to NPCs. In this case the NPC is a box and yet I still felt awful incinerating it. The whole time I was vaguely reminded of Solitary the reality show that sticks contestants alone in small rooms forcing them to endure various tests all the while being watched by a humorous computer with a female voice. Someone should sue...

RPS has articles on Portal including a Portal review, a page suggesting Portal is a tale of lesbianism, and others.PermalinkCommentshl2e2 game hl2 solitary valve portal nontechnical

FoaF on my Homepage

2007 Oct 14, 3:12I've updated my homepage by moving stuff about me onto a separate About page. Creating the About page was the perfect opportunity to get FoaF, a machine readable way of describing yourself and your friends, off my to do list. I have a base FoaF file to which I add friends, projects, and accounts from delicious using an XSLT. This produces the FoaF XML resource on which I use another XSLT to convert into HTML and produce the About page.

I should also mention a few FoaF pages I found useful in doing this: PermalinkCommentstechnical xml foaf personal xslt xsl homepage

Canadian Wedding

2007 Jul 15, 5:08This previous weekend Sarah and I went to Canada for my friends Palak and Meghal's wedding. Our five day stay took us on the route from Toronto, to Burlington (for the wedding), and then Niagra.

Hotel near CN TowerIn Toronto we visited the CN Tower, the ROM, and the Bata Shoe Museum. We generally acted like tourists walking around taking photos of things, putting on sun block, and not saying 'eh'. But we could have been worse like the drunk American college students in front of us in line for the CN Tower asking the guide if the CN Tower is taller than the Stratosphere in Las Vegas. We stumbled upon the Toronto Outdoor Art Exhibit which was really interesting. Sarah in particular recalls the cute stuffed animal monsters.

Palak And Meghal's Wedding 6After Toronto we drove to Burlington where Palak and Meghal's wedding would take place. We got up early and made it on time to the wedding which was lovely. I hadn't attended an Indian wedding previously so it was a new experience for me. During the ceremony the child in front of me kept peeking over her parent's shoulder and staring at me. It lasted all day with a break after lunch during which we drove around and experienced small town Ontario. After the break cousins performed dances for Palak and Meghal and then we all danced the night away until the wee hours.

Niagra FallsIn Niagra we stayed in a hotel room with a falls view which was lovely. We went on the Maid of the Mist tour that takes tourists right up to the falls in a boat and drenches them. We also went on the Behind the Falls tour which was not as fun. In both we are given rain coats which are essentially glorified plstic trash bags. For dinner we ate in the hotel restaurant which had a lovely view of the falls. At night the falls are lit up in various colors with gigantic lights.PermalinkCommentsniagra wedding personal toronto nontechnical

Second Life Translator

2007 Jul 4, 10:58Hackdiary
I really enjoy reading Matt Biddulph's blog hackdiary. An entry some time ago talked about his Second Life flickr screen which is a screen in Second Life that displays images from flickr.com based on viewers suggested tags. I'm a novice to the Second Life scripting API and so it was from this blog post I became aware of the llHTTPRequest. This is like the XMLHttpRequest for Second Life code in that it lets you make HTTP requests. I decided that I too could do something cool with this.

Translator
I decided to make a translator object that a Second Life user would wear that would translate anything said near them. The details aren't too surprising: The translator object keeps an owner modifiable list of translation instructions each consisting of who to listen to, the language they speak, who to tell the translation to, and into what language to translate. When the translator hears someone, it runs through its list of translation instructions and when it finds a match for the speaker uses the llHTTPRequest to send off what was said to Google translate. When the result comes back the translator simply says the response.

Issues
Unfortunately, the llHTTPRequest limits the response size to 2K and no translation site I can find has the translated text in the first 2K. There's a flag HTTP_BODY_MAXLENGTH provided but it defaults to 2K and you can't change its value. So I decided to setup a PHP script on my site to act as a translating proxy and parse the translated text out of the HTML response from Google translate. Through experimentation I found that their site can take parameters text and langpair queries in the query like so: http://translate.google.com/translate_t?text=car%20moi%20m%C3%AAme%20j%27en%20rit&langpair=fr|en. On the topic of non US-ASCII characters (which is important for a translator) I found that llHTTPRequest encodes non US-ASCII characters as percent-encoded UTF-8 when constructing the request URI. However, when Google translate takes parameters off the URI it only seems to interpret it as percent-encoded UTF-8 when the user-agent is IE's. So after changing my PHP script to use IE7's user-agent non US-ASCII character input worked.

In Use
Actually using it in practice is rather difficult. Between typos, slang, abbreviations, and the current state of the free online translators its very difficult to carry on a conversation. Additionally, I don't really like talking to random people on Second Life anyway. So... not too useful.PermalinkCommentspersonal translate second-life technical translator sl code google php llhttprequest
Older EntriesNewer Entries Creative Commons License Some rights reserved.