goodformandspectacle / v_and_a

1 stars 0 forks source link

Fun 404? #17

Closed george08 closed 9 years ago

george08 commented 9 years ago

How about something like: show the first sentence of the public_access_description from a set of 500 random things that have an image?

image

infovore commented 9 years ago

I'm thinking how best to achieve that, so some thinking out loud:

I (personally) believe that error pages they need to render as quickly and as reliably as possible - there's already been some kind of failure, so another DB hit doesn't feel wise. If it's a plain flat HTML page, it doesn't even have to hit the application server - Apache/nginx will render it for us. Something dynamic needs to file through the Rails stack.

404s should be rare on this site, though, so they don't need to be super-performant. However, the query you describe will be a slow one if I were to do it against the database.

So, my proposal would be:

That way you get the surprise/delight without having to hit the database. Would that - the pre-canned list of 500 to choose from - be acceptable?

(I'm beginning to run short on time - no more today, really. I'm going to look at the changes to the Date Graph now and prioritise those.)

george08 commented 9 years ago

You're also welcome to say no :)

A static list is totally fine! If it's annoying to make on programmatically, I can build one manually... Happy to.

On 19 Dec 2014, at 12:34, Tom Armitage notifications@github.com wrote:

I'm thinking how best to achieve that, so some thinking out loud:

I (personally) believe that error pages they need to render as quickly and as reliably as possible - there's already been some kind of failure, so another DB hit doesn't feel wise. If it's a plain flat HTML page, it doesn't even have to hit the application server - Apache/nginx will render it for us. Something dynamic needs to file through the Rails stack.

404s should be rare on this site, though, so they don't need to be super-performant. However, the query you describe will be a slow one if I were to do it against the database.

So, my proposal would be:

we pick 500 random objects with an image right now store them in a JSON file with their URL and sentence load a random item from that file (rather than the DB) when the user hits a 404 page. That way you get the surprise/delight without having to hit the database. Would that - the pre-canned list of 500 to choose from - be acceptable?

(I'm beginning to run short on time - no more today, really. I'm going to look at the changes to the Date Graph now and prioritise those.)

— Reply to this email directly or view it on GitHub.

infovore commented 9 years ago

A quick skim suggests the first sentence of PAD isn't always going to be relevant or interesting; a curated selection might best.

In the meantime, happy to take a slightly improved static 404 and drop it into the site.

george08 commented 9 years ago

I'm happy to curate a selection. Will do over Christmas. Spreadsheet with ID and sentence enough?

On 22 Dec 2014, at 18:24, Tom Armitage notifications@github.com wrote:

A quick skim suggests the first sentence of PAD isn't always going to be relevant or interesting; a curated selection might best.

In the meantime, shall we just make a better static 404 page?

— Reply to this email directly or view it on GitHub.

infovore commented 9 years ago

yeah, absolutely - 404s will be rare, but a handful that read well I think will be more fun than luck of the draw. spreadsheet absolutely fine.

On Tue, Dec 23, 2014 at 9:41 AM, George Oates notifications@github.com wrote:

I'm happy to curate a selection. Will do over Christmas. Spreadsheet with ID and sentence enough?

On 22 Dec 2014, at 18:24, Tom Armitage notifications@github.com wrote:

A quick skim suggests the first sentence of PAD isn't always going to be relevant or interesting; a curated selection might best.

In the meantime, shall we just make a better static 404 page?

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/goodformandspectacle/v_and_a/issues/17#issuecomment-67935070 .

Tom Armitage http://infovore.org 07813 060578

george08 commented 9 years ago

Ok, cool. I'll start thing that have IDs that contain 404 :)

On 23 Dec 2014, at 16:51, Tom Armitage notifications@github.com wrote:

yeah, absolutely - 404s will be rare, but a handful that read well I think will be more fun than luck of the draw. spreadsheet absolutely fine.

On Tue, Dec 23, 2014 at 9:41 AM, George Oates notifications@github.com wrote:

I'm happy to curate a selection. Will do over Christmas. Spreadsheet with ID and sentence enough?

On 22 Dec 2014, at 18:24, Tom Armitage notifications@github.com wrote:

A quick skim suggests the first sentence of PAD isn't always going to be relevant or interesting; a curated selection might best.

In the meantime, shall we just make a better static 404 page?

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/goodformandspectacle/v_and_a/issues/17#issuecomment-67935070 .

Tom Armitage http://infovore.org 07813 060578 — Reply to this email directly or view it on GitHub.

george08 commented 9 years ago

9404 | Until the 17th century, it was the custom for guests to bring their personal cutlery, but by the 18th century knives and forks were provided in matching sets by the host. 13404 | During the 19th century the commercial manufacture and packaging of foods, including biscuits, became increasingly commonplace, as movement of goods became cheaper by rail and as foodstuffs were exported to the Empire. Commercially made biscuits became socially acceptable also. 18404 | Technical improvements in textile production coincided with radical improvements in the manufacture and use of new dyestuffs; an entirely new range of mineral colours became available after about 1817. 19404 | In 1940 the Committee for the Employment of Artists in Wartime, part of the Ministry of Labour and National Service, launched a scheme to employ artists to record the home front in Britain, funded by a grant from the Pilgrim Trust. 47404 | Kate Greenaway is known for her drawings and watercolour illustrations of quaint children in bonnets, sailor suits and pinafore dresses. She drew from life and made the clothes worn by her models. 48404 | The most celebrated painted faïence, or tin-glazed, tiles of Renaissance France are those from the Château d'Ecouen. 52404 | During the period 900-1200, ivories were produced all over Europe, often in monasteries and ecclesiastical or royal courts. Ivory carvings appeared on book covers, reliquary caskets, antependia (the panel in front of an altar) and religious icons. 60404 | The netsuke is a toggle. Japanese men used netsuke to suspend various pouches and containers from their sashes by a silk cord. Netsuke had to be small and not too heavy, yet bulky enough to do the job, while also being strong and hard-wearing. 73404 | Square cushion covers must have been used not only on chairs, since these were quite rare in farmers' homes right up to the 19th century. It is likely that they were also placed on benches or in carriages. 74404 | A ‘chandelier’ is literally a ‘candleholder’, its name deriving from the French for candle: ‘chandelle’. Chandeliers differ from candelabra in that they are suspended from the ceiling and usually have branch supports for two or more candles or electric lights. 95404 | Schiller and Gerbing flourished in Bohemia (part of modern Czechoslovakia) from 1829 to about 1885, making useful and decorative stoneware and earthenware. 99404 | Tailors experimented with the shape and position of pockets as the new fashion of closely fitted, knee-length coats and waistcoats developed during the late 17th century. 101404 | Julia Margaret Cameron's career as a photographer began in 1863 when her daughter gave her a camera. Cameron began photographing everyone in sight. 108404 | The international fashion for beetle jewellery parallelled that for bird jewellery. 112404 | Photography was a novel and exciting development in Victorian days. Most actors and actresses had studio photographs taken, in everyday dress or theatrical costume, for ‘cartes de visite’, and later ‘cabinet cards’. 113404 | The Sangrahanisutra is a cosmological text composed in 1136 by Shrichandra that includes Jain ideas about the structure of the universe and the mapping of space. 115404 | ‘Cartes de visite’, the size of formal visiting cards, were patented in 1854 and produced in their millions during the 1860s when it became fashionable to collect them. Their subjects included scenic views, tourist attractions and works of art, as well as portraits. 120404 | China produced many types of green-glazed wares, in shades ranging from olive to grass to grey-blue. Resembling jade, they were admired for their tranquil beauty. 122404 | Paintings of composite animals occur in several parts of India. The convention sometimes referes to the Hindu god Shiva in his role as Pashupati or 'Lord of the animals'. 133404 | Liberty's department store in London's Regent Street was well known for offering 'picturesque costumes' inspired by historical dress, alongside contemporary styles based on the latest Paris fashions. 145404 | In the 18th century Europeans greatly admired the white and resistant body of Chinese porcelain, available at low cost, but in addition to traditional shapes and designs, they also ordered tableware and household objects made in imitation of western items. The East India trading companies supplied models and patterns from Europe to Chinese potters, who could copy them using their skills and local resources. 164404 | Layette pincushions were given as presents to women who had newly or recently born babies. They were in theory useful as well as symbolic, because baby clothes in the UK were often fastened with ordinary pins until the successful marketing of the safety pin in the 1870s. 177404 | Francis Frith was one of the most successful commercial photographers from the 1850s and 1860s. He also established what was to become the largest photographic printing business in England. 196404 | A Company Painting is a picture made by an Indian artist for the British in India.

george08 commented 9 years ago

How's that?

infovore commented 9 years ago

Looks ideal. I'll rig that up right now - thanks for finding those!

infovore commented 9 years ago

Voila:

http://va.goodformandspectacle.com/nope

(you'll need to be HTTP auth'd for now, which is fine.) Is that OK?

The data itself is stored in https://github.com/goodformandspectacle/v_and_a/blob/master/spelunker/lib/interesting_objects.json so you could always add more whenever, though I think this is enough. I've removed all the curly quotes for safety's sake, if that's OK with you.

george08 commented 9 years ago

Brilliant!

We should work out the right time to whip off the password too.

On 2 Jan 2015, at 12:20, Tom Armitage notifications@github.com wrote:

Voila:

http://va.goodformandspectacle.com/nope

(you'll need to be HTTP auth'd for now, which is fine.) Is that OK?

The data itself is stored in https://github.com/goodformandspectacle/v_and_a/blob/master/spelunker/lib/interesting_objects.json so you could always add more whenever, though I think this is enough. I've removed all the curly quotes for safety's sake, if that's OK with you.

— Reply to this email directly or view it on GitHub.

infovore commented 9 years ago

Well, I can take the password off whenever - it just involves deleting two lines of code and pushing out a deploy.

george08 commented 9 years ago

Righto. I'd say we aim for early Tuesday morning. (Working on blog post today/tomorrow.) Can post yours later in the week if you like? Or, all on the same day is OK with me too.