Comments for Bernie Sumption's Blog https://blog.berniesumption.com Various writings on software development and photography Fri, 10 Aug 2018 08:19:11 +0000 hourly 1 https://wordpress.org/?v=4.9.11 Comment on Daphne’s tweeting catflap by bernie https://blog.berniesumption.com/software/daphnes-tweeting-catflap/#comment-24406 Fri, 10 Aug 2018 08:19:11 +0000 http://blog.berniesumption.com/?p=756#comment-24406 Technically it’s possible to write a generative grammar that always produces correct grammar, but it’s hard work. I wouldn’t call stripping double punctuation in python a bodge, I’d call it a UX improvement :o) It’s in the same class as how the generator will let you write [node-name] or [Node-name] and the second will capitalise the first letter in the resulting text.

]]>
Comment on Daphne’s tweeting catflap by Nick Battle https://blog.berniesumption.com/software/daphnes-tweeting-catflap/#comment-24404 Thu, 09 Aug 2018 19:33:38 +0000 http://blog.berniesumption.com/?p=756#comment-24404 There’s an interesting problem with the generative grammar and punctuation. The topmost clause explicitly adds full stops after each subpart. But some of the subparts can end with ! or ? which results in doubly punctuated endings like!.

It’s tricky to fix though. I’m not sure that the generative system described here can flexibly handle closing punctuation? It could be bodged in the Python, but that’s a bit ugly.

]]>
Comment on On abandoning Gulp by bernie https://blog.berniesumption.com/software/on-abandoning-gulp/#comment-23795 Thu, 30 Nov 2017 12:34:36 +0000 http://blog.berniesumption.com/?p=795#comment-23795 To be clear, I didn’t post the Gulp file that the package.json replaced, but trust me it was hideous! If anything, syntax highlighting in Gulp files just serves to highlight all that unnecessary noise and implementation details, calls to .pipe(), functions etc. And this is just talking about readability – writability of Gulp files is even worse, for example getting calls to .pipe() in the wrong order will totally break things, so you need to understand what’s going on under the hood. Command line interfaces are more of a black box, and generally you can mix arguments around and not break things.

So yes I’d argue that the package.json was a big improvement, but you’re right that it could be further improved. Embedding shell scripts in JSON isn’t exactly pretty.

]]>
Comment on On abandoning Gulp by NotAScriptKiddy https://blog.berniesumption.com/software/on-abandoning-gulp/#comment-23794 Thu, 30 Nov 2017 11:21:57 +0000 http://blog.berniesumption.com/?p=795#comment-23794 You may continue to love you shell scripts. But to state that the posted package.json is more readable than a Gulp script or in any kind readable at all is just pure nonsense (just look at the highlighting…).

]]>
Comment on Bernie’s Better Guide to Depth of Field for Geeks Who Want to be Digital Artists by Rory Melough https://blog.berniesumption.com/photography/depth-of-field-for-geeks/#comment-21881 Fri, 10 Mar 2017 09:02:06 +0000 http://berniesumption.com/photography/#comment-21881 Cracking article – thank you!

]]>
Comment on Inamo case study by bernie https://blog.berniesumption.com/software/inamo-case-study/#comment-21215 Mon, 16 Jan 2017 10:48:13 +0000 http://berniesumption.com/software/#comment-21215 A lot of people ask this question :o) There are a couple of reasons. Firstly, this project predates the iPad, and such technology wasn’t available then. Only very recently have large, thin, capacitive touch screens become available. And they’re very expensive, and fragile, and still not quite big enough for a 4 person restaurant table. Secondly, even if we did use a capacitive membrane in addition to an overhead projector to make a large robust touch screen, as you relax and eat at a table you touch the table with your skin all the time.

]]>
Comment on Inamo case study by Baraja https://blog.berniesumption.com/software/inamo-case-study/#comment-21202 Sun, 15 Jan 2017 13:30:52 +0000 http://berniesumption.com/software/#comment-21202 Hi Bernie,
a question, why did the table have a mouse pointer and NOT a full touch screen for dragging images and selections, while making the touch sensors to be responsive only to skin (to avoid issues with plates and other stuff could be placed on table).
so was there a specific reason you chose to use a small corner on the table as the moouse-kinda control?

]]>
Comment on Making DNArtwork #7: how does it work? by Asa Hakansson https://blog.berniesumption.com/software/dnartwork/dnartwork-how-it-works/#comment-20983 Fri, 16 Dec 2016 06:53:55 +0000 http://blog.berniesumption.com/?p=989#comment-20983 You ROCK and this is AMAZING!

That is all.

Thanks
Åsa

]]>
Comment on Daphne’s tweeting catflap by bernie https://blog.berniesumption.com/software/daphnes-tweeting-catflap/#comment-20954 Mon, 12 Dec 2016 11:28:39 +0000 http://blog.berniesumption.com/?p=756#comment-20954 If you’re using the code that I put on GitHub, then it would be easy to swap out another camera. Edit capture-image.sh and replace it with an alternative Linux shell command that captures an image from your camera and saves it to a file called capture.jpg. I assume that the rpi-cam has a suitable command line utility?

]]>
Comment on Daphne’s tweeting catflap by Mark https://blog.berniesumption.com/software/daphnes-tweeting-catflap/#comment-20950 Sun, 11 Dec 2016 17:06:05 +0000 http://blog.berniesumption.com/?p=756#comment-20950 Love this! Currently trying to implement it myself but a) my cats do not like the new catflap I brought and b) my USB webcam (a old ps3eyetoy) appears to have given up on life after years of being demoted to the loft.

Any pointers for getting this to work with the rpi-cam which I have abundances of??

]]>