Sunday, May 11. 2008

Django installer frustration - don't

I've just spent ... too long ... fighting to get the MEDIA_ROOT and other stuff working properly on my test django install. It seems quite a bit of stuff has changed in 'setup.py install' since I last played with it and basically it doesn't work. What does work is the following trunk method. Basically you:

1, Check out a copy of the source tree.
2, Put a symbolic link into the site packages to point at the source tree.

Under OSX the magic command for (2) is "ln -s /Users/davep/django-trunk/django/ /Library/Python/2.5/site-packages/django" ... where you'll have to change your username, obviously.
Posted by David Preece at 18:03 | Comments (0) | Trackbacks (0)

Sunday, April 27. 2008

Ad-server real world lessons learned

I love it when a plan comes together. Having had droplet's ad-server trickling along in the wild for a month or two now a few things have come to light. The most noteworthy of which was the need for variable width batching. I shall explain...

Droplet auctions off advertising space. He who pays the most per hit gets first dibs on however many hits he wants, the second most gets second dibs and so on and so forth. Without going into detail, droplet's ad server basically holds a regular beauty contest to see (on a per-site basis) which ad campaigns need how many adverts running and how much their owners are willing to pay. Until today this contest was held once a minute - with the assumption that we are designing for fundamentally medium load (1M-10M hits/month) sites. However, on lower load sites it became possible/likely/frequent/usual for each of these beauty contests to be held with the prize being zero hits. While this is not a problem from a load perspective, much of the beauty contest mathematics assumes that if a top contender is asking for 5 hits/minute that at least there is the vaguest hope of it happening. Now we can weld these batches together into, say, an hour at a time so a low load campaign (say 2-3 hits/hour) on a low load site (such as, ummm, this) doesn't suffer dithering losses and the ads actually get served. Clearly important that.

Right. It's live in the real world ... off to make a test :)
Posted by David Preece in business at 17:31 | Comments (0) | Trackbacks (0)

Sunday, April 13. 2008

Portishead

There's a new Portishead album out tomorrow. Although it may, in practice, be tuesday for us. Ten years since "Portishead" and thirteen since "Dummy". I really want to believe that it's going to be as good as their earlier albums but have a nasty suspicion it won't be.

My god. Beth Gibbons' singing. Completely unbelievable.
Posted by David Preece at 16:39 | Comments (2) | Trackbacks (0)

Saturday, March 29. 2008

What's wrong with you? Take my damn money!!

So: "World War Z" - a book about how the world got itself into a zombie war - has an absolutely raved about audiobook edition. It's grey, a bit miserable, and sitting upstairs drinking coffee and listening to an audio book sounds just grand to me.

I head off to Audible.com, hand over my US$21, and get told that "we are sorry but your geographic location prevents us from selling you World War Z". What the hell? As a consequence I've spent the last two hours on two new least favourite activities:

* Learning about port forwarding and UPnP with Azureus. I never did get it sussed fully but I don't care since it appears to be downloading now.

* Scouring the web for someone to sell me a copy of this thing so I can find a faster way of doing it.

Never mind. The torrent says it's going to take another three hours. I guess I'm going to have to work instead.

Dammit, digital media industry, learn to take my money OK!!!!

Dave
Posted by David Preece at 15:11 | Comments (0) | Trackbacks (0)

Friday, March 28. 2008

Ninja debugging Objective-C retain counts

I've been debugging some memory leaks. My understanding of Objective-C memory handling is, even now, flaky at best and this is not helped by retain count rules that include words like "generally" and "automatically" - in short I have no idea what the hell is going on.

What I want is to set the debugger to break on a retain and break on a release so I can see who or what is adding to the retain count. However, while you can set the debugger to break on a particular Objective-c invocation (such as setting a breakpoint on '-[NSException raise]' to effect a "break on exception"), doing this for a specific class is not possible.

Then I had this brainwave - just override the base class implementation by chucking the following into the .m file (no need to muck about with the headers):
CODE:
-(id)retain {
return [super retain];
}
-(oneway void)release {
return [super release];
}

...then set a breakpoint on whichever you want. Tadaa! Instance traceability of reference counts! It also acts as a just astounding way of learning what does and does not change the reference counts...
Posted by David Preece in technology at 11:15 | Comments (0) | Trackbacks (0)

Sunday, March 23. 2008

Adventures with path= on cookies

The "beta 1" ad server running here for the last week or so has had a single big flaw: It's been using cookies to delineate unique from non-unique users, on a per ad-location basis no less (see browser cookies for as1.atomicdroplet.com); but has been sending all the cookies for all the sites. Fine while AD is three low-traffic sites but bad when we have 100 at a million hits/month each. Clearly what is needed is a way of sending only the cookies for the relevant site...

I initially tried setting the domain= parameter, but ended up merely demonstrating how little I knew about what the domain parameter actually does. The path= parameter sets for which parts of the originating domain we send set cookies. Now, previously, atomic droplet ad server URL's took one of two forms - //server/js/forum_code to obtain the javascript to do the magic on the page, and //server/hit/forum_code to register hits (and uniques) to individual ad locations. Clearly, therefore, I'm only able to tell a cookie whether it reponds to a "js" url or a "hit" url. However, by changing the scheme around to be //server/forum_code/js and //server/forum_code/hit I can now achieve the desired aim of only sending the cookies relevant to the site in question.

Miraculously, the change took half an hour and fifteen lines of code - of which three were removals from the older "domain"style; two were changes to test harnesses; and two were changes to comments. Clearly I'm starting to get the hang of django :)
Posted by David Preece in technology at 15:27 | Comments (0) | Trackbacks (0)

Wednesday, March 19. 2008

First bike crash (but an otherwise astounding weekend)

After weeks of indecision I finally decided I was going to go to the cliffhanger hill climb - just for the practice day on saturday, not the 'real thing'. Short version, it was a completely amazing experience but led to my first ever bin - running wide on a fast right hander and hitting the gravel. I am, right now, sitting at home with cracked ribs and a huge amount of Codeine - the haze of which I am currently attempting to write through and, frankly, not doing very well.

Strangely I've found the whole experience to be very positive. I've found that under the most extreme circumstances I am willing to push myself 100%. That I crossed the line between 'not enough' and 'too much' seems irrelevant and the whole thing has widened my approach to risk and, generally, how I feel about stuff. Ack! Gawd, I'm just not here.

Some better writeups:
  • Myself: the crash and aftermath.
  • The F3 battle royale.
  • Str8 jacket (on a borrowed stunter).
  • Deano.
  • Clivoris.
  • Jay Lawrence (actually knows what he's doing).
  • Koba.
  • Wilber.

Until you've done 180k through a fast sweeping right, you just wouldn't understand. Absolutely wild. Worth every second.
Posted by David Preece in bikes at 10:40 | Comments (0) | Trackbacks (0)

Friday, March 14. 2008

What's with the ugly-ass banner?

Anyone hitting this site actually across the web will notice an UGLY banner at the top and some only marginally less ugly text banners saying "Advertise on this site through Atomic Droplet and help keep the site running". What's all this about? Am I having a misguided attempt at selling out?

Well, no. As some know, I've been working for a while on Atomic Droplet, an advertising network designed exclusively for forums. It has taken ... forever ... due to two main factors: (i) Getting 1/3rd the way through the first shot and deciding what I was producing was crap, and it needed to go in the bin and; (ii) Having lots and lots of "real" work and lacking either the conviction, cojones or just plain insanity to turn down well paid and interesting work to play with an advertising network. None the less, I've found some time, it's all coming together now, and I've put banners up here to generate a little background traffic for the deployed (and very 'alpha') ad server to play with.

BTW, feel free to play with the main site, but I realise it's still caked in bugs and am endeavouring to get the nailed.
Posted by David Preece in business at 11:37 | Comments (0) | Trackbacks (0)

Thursday, March 13. 2008

Best ... technology ... ever

Once upon a time the technology industry liked to invent new and amazing things. Then came the web and, with one or two exceptions that pretty much came to a halt and in it's place came a variety of social hacks and, well, shops. Nothing wrong with that, per se, but technology very much took a back seat.

Anyway, in the middle of this drought comes the first sign of rain - the first genuinely amazing technology I've seen for ages: Direct Note Access from Celemony. Very much the produce of mathematics and effort combined, if it works half as well the the linked presentation suggests ....

Available in August, apparently. Bring it on, I have dozens of pieces of music to butcher.
Posted by David Preece in technology at 12:58 | Comments (0) | Trackbacks (0)

Tuesday, February 26. 2008

LED backed displays explained in ten seconds flat.

On the left is a MacBook Air with an LED backed display (they all have them). On the right is a MacBook Pro. They were both set to full brightness. Any questions?

The room wasn't particularly dark, it's just that the MBA was bright enough to sear one's retinas. The picture comes nowhere even close to doing it justice.
Posted by David Preece at 19:06 | Comments (0) | Trackbacks (0)

Castanaut - scripting for screencasts

So, one of the best parts of working for shinywhitebox is working with the community that has sprouted up around it's use. A particularly good example is Joseph Pearson and his Castanaut project. This is a framework for building ruby scripts that automate making screencasts.

Oh, he explains it better. Go look at it, you'll see what I mean.
Posted by David Preece in technology at 15:43 | Comments (0) | Trackbacks (0)

Monday, February 25. 2008

SMTP 503 on Django (using gmail as SMTP server?)

If you get this it's because you've given a string as the recipient of the email. Go back, read it again - it's a list of recipients. So, instead of using to you want (to,) because that's a tuple and therefore a list. Lovely.
Posted by David Preece at 19:38 | Comments (0) | Trackbacks (0)

Monday, February 18. 2008

iTunes - sort by play count

This is what happens when you leave things on loop. That's my excuse, and I'm sticking to it.






Posted by David Preece at 14:41 | Comment (1) | Trackbacks (0)

Sunday, February 17. 2008

Making "nano" work

Nano would be great if only the backspace key worked. Fret no more!

server:/home/davep# cat > /etc/nanorc << EOF
> set rebinddelete
> EOF

Tadaa!
Posted by David Preece in technology at 11:43 | Comments (0) | Trackbacks (0)

Friday, February 15. 2008

Jacqui Dean and the problem with drug prohibition.

The problem with drug prohibition is the line between "good" and "bad" is decided on by people with the scientific and ethical education of a six year old. Not my six year old, mind.

To the left is Jacqui Dean, the National MP for Otago. While I have no doubt that she is a "quintessential people person", she's also the latest to illustrate her background (and inability to use google) by joining the fight against the scourge that is DHMO. Do we really have to have these people deciding how things are run?
Posted by David Preece in life at 07:55 | Comments (0) | Trackbacks (0)
(Page 1 of 8, totaling 117 entries) » next page

Another next big thing

Bio

David Preece is a software developer and entrepreneur based in Wellington (New Zealand) who finds himself looking for the next big thing.

Previous next big things include the refinancing, technical direction, and a lot of the donkey work for Virtual Katy; technical direction, project management and (again) donkey work for VoiceQ; creating code and intellectual property around load balancing that was acquired by Allied Telesis; and the research and an implementation of the h.264 video compression protocol.

More details at LinkedIn

I've also been known to ride bikes and sail a fair bit.

Contact: davep@zedkep.com

RSS

 Subscribe via FeedBurner

See Also

Blogs:
Andrew Mayfield
Tony Rule
Sam Minnée
Andrew Butel

Other:
KiwiBiker
Worser Bay Boating Club

Categories

  • XML bikes
  • XML business
  • XML life
  • XML technology


All categories

Archives

Week 18, 2008
Week 17, 2008
Week 16, 2008
Recent...
Older...

Blog Administration

Open login screen

© Copyright 2006, nerdwg.org design by Luka Cvrk, port for s9y by nerdwg.org