people page 24 - Dave's Blog

Search
My timeline on Mastodon

Sarah M.'s restaurants | Restaurant menus, reviews and maps on urbanspoon.com

2007 Oct 21, 10:28Sarah's restaurant reviews on urbanspon. The site provides feeds of user's reviews too.PermalinkCommentsreview people sarah-moffatt restaurant

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

Easy Come Easy Go

2007 Sep 14, 7:37I previously mentioned how much I enjoyed my new office. Well my team has moved to a new building and although we get more offices total meaning no one on the team has to share an office, this building has less windowed surface area which means less people get window offices. Since I received the window office recently I'm kicked out now in FIFO order. Stacks are so sad.PermalinkCommentsmicrosoft work personal office nontechnical

Palak And Meghal's Wedding

2007 Sep 1, 4:32
The child in front of me kept staring at me.
From: David Risney
Views: 59
0 ratings
Time: 00:07 More in People & Blogs
PermalinkCommentsvideo

Minding the Meeting, or Your Computer? - New York Times

2007 Aug 27, 10:35Article on laptops in meetings by Dean Hachamovitch my GPM. I knew the people in that photo before they were in an article in NY Times.PermalinkCommentsarticle laptop culture microsoft dean-hachamovitch

Wp64 Issues

2007 Aug 6, 3:43Miladin told me about the Visual Studio compiler's promising option Wp64 that finds 64bit portability issues when compiling in 32bit. If, for instance, you cast from a (long*) to a (long) you get a W4 warning. However, the #defines are still set for 32bit builds. This means that other parts of the code can make assumptions based on the #defines that are valid on 32bit but generate 64bit errors or warnings.

For instance, in winuser.h the public published Windows header file there's the following:
...
#ifdef _WIN64
...
WINUSERAPI
LONG_PTR
WINAPI
SetWindowLongPtrA(
    __in HWND hWnd,
    __in int nIndex,
    __in LONG_PTR dwNewLong);
...
#else  /* _WIN64 */
...
#define SetWindowLongPtrA   SetWindowLongA
...
#endif /* _WIN64 */
...
In 64bit everything's normal but in 32bit SetWindowLongPtrA is #defined to SetWindowLongA which takes a LONG rather than a LONG_PTR. So take the following code snippet:
...
LONG_PTR inputValue = 0;
LONG_PTR error = SetWindowLongPtrA(hWnd, nIndex, inputValue);
...
This looks fine but generates warnings with the Wp64 flag.

In 64 bit, p is cast to (LONG_PTR) and that's great because we're actually calling SetWindowLongPtrA which takes a LONG_PTR. In 32 bit, p is cast to (LONG_PTR) which is then implicitly cast to (LONG) because we're actually calling SetWindowLongA. LONG and LONG_PTR are the same size in 32bit which is fine but if you turn on the Wp64 flag there's a W4 warning because of the implicit cast from a larger size to a smaller size if you were to compile for 64bit. So even though doing a 32bit or 64bit compile would have worked just fine, if you turn on the Wp64 flag for 32bit you'd get an error here.

It looks like I'm the most recent in a list of people to notice this issue. Well I investigated this so... I'm blogging about it too!PermalinkCommentswp64 technical 64bit compiler c++ visual-studio setwindowlongptra

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

Avatar: the other you

2007 May 31, 11:11An article from newscientist about videogame avatars. There's a slideshow with side by sides of people and their avatars.PermalinkCommentsinternet videogames avatar culture article photos

Is it just me or is everything great?

2007 May 21, 10:41FTA: '... product reviews on Amazon give an average rating of 4.2 out of five.' I would've thought people would be more likely to review if they had an unhappy experience with something.PermalinkCommentsarticle review inflation economics technology

The Impact of Emerging Technologies: Media Viewer

2007 May 13, 5:21Video interviews with various interesting people on the Internet and other future thoughts.PermalinkCommentsvideo interview science

WiiLi.org Wiimote via Java

2007 May 11, 1:47A long thread between the guy making the WiiRemoteJ library and people testing it and using it. Some stuff in there about setting up Java with Bluetooth support for Win & Mac.PermalinkCommentswii remote java library programming research:wii-remote

Roommate Wedding

2007 May 5, 10:05Carissa, Elijah, and KristenCarissa and Elijah are married! Sarah and I flew to Oakland the Friday of two weeks previous (April 27th) into the Oakland Airport. We were on the same flight as Jon which was fun but we weren't seated with him. Instead I was seated between Sarah and a middle aged lady who enjoyed talking to herself. It seemed a bonus if others such as myself listened but not a prerequisite for her speaking.

Church Front Sarah and I rented a car and we drove Jon first to Hayward where he was staying then we drove to our hotel in Dublin. The car we got turned out to be a PT Cruiser which was a surprise of course but actually wasn't that bad. The power windows are controlled by the center console rather than by a switch near the windows themselves which led to several embarrassing seconds when we later tried to pay the toll for the Bay Bridge.

Carissa & Elijah's Reception HallThe next day we went to Carissa's wedding which was lovely. In a small church with white roses Carissa's mom married Carissa and Elijah. Afterward we went to the reception at the Senior Center. "Senior Center" may conjure up images of rolley charis that smell like old people but it wasn't like that at all. It appears to be a community center funded by the Senior Condos next door so it was very nice.

Carissa is the first of the college roommates to get married! I guess I'm just having trouble imagining any of us getting married...PermalinkCommentswedding friend personal california nontechnical

Web Mashups Turn Citizens Into Washington's Newest Watchdogs (Wired)

2007 May 2, 1:12Voting records from congress people available as well as money trail information.PermalinkCommentsarticle politics mashup web blog social public privacy voting

Given a choice between two options, you influence the result by adding a third, inferior, alternative (The Old New Thing)

2007 Apr 23, 1:31As noted in the title, an interesting result from researchers who find that a third result which is clearly worse than the two other options will influence people picking from those two.PermalinkCommentsarticle raymond-chen business game-theory decoy-effect

Debate on "We'd be better off without Religion"

2007 Apr 13, 1:56"We'd be better off without Religion" with Richard Dawkins, Christopher Hitchens, and AC Grayling. In London's Westminster Central Hall on March 27, some 2,000 people turned out to hear Hitchens, Dawkins and philosopher A.C. Grayling debate a trio of relPermalinkCommentsaudio mp3 politics religion debate philosophy richard-dawkins

'Talking' CCTV scolds offenders (BBC NEWS | UK | England)

2007 Apr 5, 11:45British cameras watching the public now have loudspeakers hooked up to scold people behaving inappropriately. What year is it?PermalinkCommentsparanoia government tv camera article bbc

"Daisy, Daisy, Give me your answer do!" Switching off a robot

2007 Mar 26, 11:13Researcher watches person try to switch off robot while the robot begs them not to. Kind of messed up. Study finds people less likely to turn off robot if its agreeable and smart.PermalinkCommentsvideo humor ai robot robots

ikea hacker

2007 Mar 20, 5:59Projects people have produced using Ikea products.PermalinkCommentsblog cool design diy furniture hack tutorial ikea

Hot or Not Captcha

2007 Mar 16, 3:40Similar to the previous one where you prove your human by selecting cats here you select people that are hot or not based on the website hotornot.com.PermalinkCommentscaptcha security humor javascript hotornot web

Annals of the Road: Getting There: The New Yorker

2007 Mar 13, 5:06An article on the companies and people behind the GPS units found in cars.PermalinkCommentsarticle the-new-yorker technology map car driving gps
Older EntriesNewer Entries Creative Commons License Some rights reserved.