Thursday, January 28, 2016
artsy css animations
A friend of a friend made a cyberPunkGenerator, sprouting slogans and doing it's best to look like an old crappy VHS playback. It's an intriguing use of some css animations such as blur, flick, and jump.
Wednesday, January 27, 2016
quotes from "Dreaming in Code"
"The realization came over me with full force that a good part of the remainder of my life was going to be spent in finding errors in my own programs."
--Maurice Wilkes, in 1949, at the dawn of the age of debugging computer programs.
"The hard thing about building software is deciding what to say, not saying it."
--Frederick Brooks
"Is it possible to do great work without great pressure, or is pressure an indispensable part of genius?"
--Michael Toy
"Joy is an asset. It may well turn out that one of the most important effects of open source’s success will be to teach us that play is the most economically efficient mode of creative work."
--Eric Raymond
"All programmers are optimists. Perhaps the hundreds of nitty frustrations drive away all but those who habitually focus on the end goal. Perhaps it is merely that computers are young, programmers are younger, and the young are always optimists."
--Frederick Brooks
"Front ends are supposed to be elegant, intuitive, versatile; back ends are supposed to be invisible, efficient, rock-solid. The front end talks to people; the back end talks to bits. In Star Wars terms, the front end is the butlerish C3PO; the back end is the unintelligible R2D2."
--Scott Rosenberg
We are still building our software cottage-industry-style today.
--Brad Cox
"There's a difference between transparency aimed at giving visibility and transparency that is aimed at producing collaboration.”
--Ted Leung
"If it takes the typical programmer more than two minutes and twenty-seven seconds to find something, they will conclude it does not exist and therefore will reinvent it."
--Larry Constantine.
My thought on that last one... Yes, but: The price of learning and configuring and tweaking a large system that almost does the required job - and could be similarly battered into shape of handling lots of other tasks- is often larger than the cost of making an original, smaller bit of code that just handles the matter at hand. and, that is also more fun. Or as Rosenberg puts it later in the book: "There is almost always something you can pull off the shelf that will satisfy many of your needs. But usually the parts of what you need done that your off-the-shelf code won’t handle are the very parts that make your new project different, unique, innovative--and they’re why you’re building it in the first place."
Or as he even later refines it:
"Rosenberg’s Law: Software is easy to make, except when you want it to do something new. And then, of course, there is a corollary: The only software that’s worth making is software that does something new."
--Scott Rosenberg, "Dreaming in Code"
--Maurice Wilkes, in 1949, at the dawn of the age of debugging computer programs.
"The hard thing about building software is deciding what to say, not saying it."
--Frederick Brooks
"Is it possible to do great work without great pressure, or is pressure an indispensable part of genius?"
--Michael Toy
"Joy is an asset. It may well turn out that one of the most important effects of open source’s success will be to teach us that play is the most economically efficient mode of creative work."
--Eric Raymond
"All programmers are optimists. Perhaps the hundreds of nitty frustrations drive away all but those who habitually focus on the end goal. Perhaps it is merely that computers are young, programmers are younger, and the young are always optimists."
--Frederick Brooks
"Front ends are supposed to be elegant, intuitive, versatile; back ends are supposed to be invisible, efficient, rock-solid. The front end talks to people; the back end talks to bits. In Star Wars terms, the front end is the butlerish C3PO; the back end is the unintelligible R2D2."
--Scott Rosenberg
We are still building our software cottage-industry-style today.
--Brad Cox
"There's a difference between transparency aimed at giving visibility and transparency that is aimed at producing collaboration.”
--Ted Leung
"If it takes the typical programmer more than two minutes and twenty-seven seconds to find something, they will conclude it does not exist and therefore will reinvent it."
--Larry Constantine.
My thought on that last one... Yes, but: The price of learning and configuring and tweaking a large system that almost does the required job - and could be similarly battered into shape of handling lots of other tasks- is often larger than the cost of making an original, smaller bit of code that just handles the matter at hand. and, that is also more fun. Or as Rosenberg puts it later in the book: "There is almost always something you can pull off the shelf that will satisfy many of your needs. But usually the parts of what you need done that your off-the-shelf code won’t handle are the very parts that make your new project different, unique, innovative--and they’re why you’re building it in the first place."
Or as he even later refines it:
"Rosenberg’s Law: Software is easy to make, except when you want it to do something new. And then, of course, there is a corollary: The only software that’s worth making is software that does something new."
--Scott Rosenberg, "Dreaming in Code"
Tuesday, January 26, 2016
unit tests vs integration tests
I admit my understanding of unit tests is still a work in progress... I still don't get:
- how they don't just test implementation
- how you expect developers to hunt for something they really don't want to find (i.e. problems with their implementation... I mean if they could think of it, they would have solved it in the code, right?)
- how they work in a world dependent on side effects: if it's a function, inputs in, output out, that's pretty straightforward. But so much of UI, say, is the evil of "side effects", changing something else in the environment that the user will see...
2 unit tests. 0 integration tests pic.twitter.com/V2Z9F4G1sJ
— Practical Developer (@ThePracticalDev) January 14, 2016
Thursday, January 21, 2016
the bees' ease
Bees & Bombs is Dave Whyte's site where he posts what has become a garden of beautiful hypnotic looping animations.
Once upon a time, he mentioned his secret was this equation:
At one point he mentioned he had switched to Paolo Ceric's easing equation which goes like this:
It's pretty rad because you can change the value of g and get different results: 1 is linear, like you were doing no easing at all, while a value of 8 would be a long windup and slow down and a quick motion in between.
The link above has an animation that shows Paolo's equation in action for various values of g for linear motion... I decided to make a rotation based animation to see it work, and also to compare it to the Bees & Bombs original formula:
That's kind of a long transition, here it is with every other frame skipped:
Here's the Processing program I used to make the animation. I had some problems with the GifMaker library, so I ended up tweaking the final GIF by hand using EZGIF.com, a new-to-me useful site for making and manipulating Animated GIFs.
Once upon a time, he mentioned his secret was this equation:
3x2 - 2x3This is an easing he frequently relied on.... as x varies from 0 to 1, it also varies from 0 to 1, but at various rates. (One of my first posts on this blog was about various easings, the equations you can add to transitions and animations in order to make less boring and linear and more organic.)
At one point he mentioned he had switched to Paolo Ceric's easing equation which goes like this:
float ease(float p, float g){ if (p < 0.5) return 0.5 * pow(2*p, g); else return 1 - 0.5 * pow(2*(1 - p), g);}It's pretty rad because you can change the value of g and get different results: 1 is linear, like you were doing no easing at all, while a value of 8 would be a long windup and slow down and a quick motion in between.
The link above has an animation that shows Paolo's equation in action for various values of g for linear motion... I decided to make a rotation based animation to see it work, and also to compare it to the Bees & Bombs original formula:
That's kind of a long transition, here it is with every other frame skipped:
Here's the Processing program I used to make the animation. I had some problems with the GifMaker library, so I ended up tweaking the final GIF by hand using EZGIF.com, a new-to-me useful site for making and manipulating Animated GIFs.
Tuesday, January 19, 2016
the dawn of debugging
"The realization came over me with full force that a good part of the remainder of my life was going to be spent in finding errors in my own programs."
--Maurice Wilkes, in 1949, at the dawn of the age of debugging computer programs.
--Maurice Wilkes, in 1949, at the dawn of the age of debugging computer programs.
git branch in shell prompt
It's probably reasonably well known, but adding something like
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
to your .bashrc will show you the git branch you're on, if any, for the current folder.
That's actually wordier than I prefer my shell prompt to be: \u@\h gave me my current user and computer name... I use sudo etc sparingly enough that the former is pointless, and the hostname isn't neccesary because on this machine only I use an emoji instead of the traditional "$" at the end. (It was slightly tricky getting an entry from the emoji keyboard (on OSX, that's ctrl-cmd-space) into emacs where I happened to be editing the file... I had to jump out to the prompt, do a
cat > ~/temp
type the emoji, then insert (ctrl-x i) that file into the .bashrc as I edited it in emacs.
I like having a goofy emoji in my prompt, it visually sets off where the current folder info stops and where the command begins. And it's fun.
Saturday, January 9, 2016
on "How Apple is Giving Design a Bad Name"
A collaborator of mine wrote me:
My response was as follows:
Interesting!
There are some parts I agree with, and some I'd go even further with -- for instance, rumors are very strong that Apple will probably ditch the traditional headphone jack with this Autumn's new phone release, ticking off many, many people, mostly in the name of making a phone slimmer by, like, a millimeter or two. (Now, Apple has led the way in ditching things before people realized they didn't need them - see the iMac w/o floppy disk in 1998 - but this feels like one of the worst ones, because I was able to use that jack for a number of different scenarios that will now need some kind of dongle) I think the parallel with design leading the parade and minimalism above everything is pretty clear.
Of course, Apple is special because they are about the only ones who have really been doing hardware and software, though Microsoft has been getting back to that lately. There's an integration there that the other makers generally can't match.
One instance of Apple vs Android's design aesthetic: I heard one Android fan argue how much more sophisticated Android's home screens look, because the icons could be any shape, while Apple constrains icons to be little jewel-like rounded rectangles - while Apple fans might feel the opposite, that the constraints still allow artitic freedom of color and design while providing a sophisticated and consistent look. In some ways that's the Android vs Apple thing in a nutshell.
I've read Bruce Tognazzini and Don Norman, the authors for a while. Both are great, but I have issues with both of them.
Don Norman wrote the famous Design of Everyday Things... in it he chastises things that are overdesigned and "probably won lots of awards" when they don't think about the thing's use in the real world enough. Ironically, that's a cobbler's children have no shoes scenario, because originally his book - which won lots of awards - was called the PSYCHOLOGY of Everyday Things -- a title he loved because of the well-designed abbreviation "POET" but which didn't think enough about the actual use in the real world, like if booksellers would know what section to put it in!
Bruce Tognazzini... my main issue with him is that he is a "if you can't meter it, it doesn't matter" guy. Maybe his most well known advocacy is for Fitt's Law: "The time to acquire a target is a function of the distance to and size of the target." So he advocates making buttons big, and stuff them right in the corner of screens, so that a mouse can just be shoved there and thus cursor-targetting-in time minimized. He leads what I think of as the "stopwatch brigade" of interaction design; the faster you can click something (as often demonstrated in some arbitrary and not-real-world like testing mock up), the faster you're operating the machine, the happier you are, etc.
For instance, that Fitt's Law bit rips into Windows' tendency to give each window its own dropdown menu, vs the Mac habit of putting a single bar at the top of the window. I thought it was a wash: it might be easier to put a mouse right on a menu item, but it's also much easier to accidentally think you're dealing with one program's menu when actually context has been switched to another. Combined with modern tendencies to have multiple, and extremely large, monitors, and his advice seems increasingly out of date - sometimes on a Mac there's just too much screen geography between the window with the content and the menu items that apply to it. (And in general, I think you see more important stuff moved to toolbars anyway.)
What Tog doesn't talk about (as much) is: how easy or hard is it for a user to keep a mental model of the system in his or her head? That's a concept that resists easy measuring, and so it gets less play. I think it's critical though, and something that the minimalists get more right than he does. Actually, the Tog/Norman article does talk about "mental load" but again tries to oversimplify, implying that every gesture must be independently memorized (rather than making sense in a larger physical metaphor) and that every gesture is as needed as every other one. Many good UIs will allow for basic interaction with onscreen components, and reserve the gestures for "expert mode" stuff.
Discoverability is important, and I'm not a big fan of having a big library of gestures (mostly because I tend to trigger them accidentally all the time, and so find them violating The Tao of Programming: a program should always do that which startles the user the least.) I'd say it's nice if the road to learning those expert gestures is embedded in the program, but not necessary.
I also feel this article implies that all of the same use cases and patterns apply independent of the physical attributes of the device (and that all users are expert users) -- but laptops are used in very different ways than phones and tablets. There are some principles that apply to both, and while we might expect to see more drawing together so you can get more work-work done via a touchscreen device and a laptop might have more fun and simplicity, there's still a big divide.
Not sure if you saw this.
https://www.fastcodesign.com/3053406/how-apple-is-giving-design-a-bad-name
My response was as follows:
Interesting!
There are some parts I agree with, and some I'd go even further with -- for instance, rumors are very strong that Apple will probably ditch the traditional headphone jack with this Autumn's new phone release, ticking off many, many people, mostly in the name of making a phone slimmer by, like, a millimeter or two. (Now, Apple has led the way in ditching things before people realized they didn't need them - see the iMac w/o floppy disk in 1998 - but this feels like one of the worst ones, because I was able to use that jack for a number of different scenarios that will now need some kind of dongle) I think the parallel with design leading the parade and minimalism above everything is pretty clear.
Of course, Apple is special because they are about the only ones who have really been doing hardware and software, though Microsoft has been getting back to that lately. There's an integration there that the other makers generally can't match.
One instance of Apple vs Android's design aesthetic: I heard one Android fan argue how much more sophisticated Android's home screens look, because the icons could be any shape, while Apple constrains icons to be little jewel-like rounded rectangles - while Apple fans might feel the opposite, that the constraints still allow artitic freedom of color and design while providing a sophisticated and consistent look. In some ways that's the Android vs Apple thing in a nutshell.
I've read Bruce Tognazzini and Don Norman, the authors for a while. Both are great, but I have issues with both of them.
Don Norman wrote the famous Design of Everyday Things... in it he chastises things that are overdesigned and "probably won lots of awards" when they don't think about the thing's use in the real world enough. Ironically, that's a cobbler's children have no shoes scenario, because originally his book - which won lots of awards - was called the PSYCHOLOGY of Everyday Things -- a title he loved because of the well-designed abbreviation "POET" but which didn't think enough about the actual use in the real world, like if booksellers would know what section to put it in!
Bruce Tognazzini... my main issue with him is that he is a "if you can't meter it, it doesn't matter" guy. Maybe his most well known advocacy is for Fitt's Law: "The time to acquire a target is a function of the distance to and size of the target." So he advocates making buttons big, and stuff them right in the corner of screens, so that a mouse can just be shoved there and thus cursor-targetting-in time minimized. He leads what I think of as the "stopwatch brigade" of interaction design; the faster you can click something (as often demonstrated in some arbitrary and not-real-world like testing mock up), the faster you're operating the machine, the happier you are, etc.
For instance, that Fitt's Law bit rips into Windows' tendency to give each window its own dropdown menu, vs the Mac habit of putting a single bar at the top of the window. I thought it was a wash: it might be easier to put a mouse right on a menu item, but it's also much easier to accidentally think you're dealing with one program's menu when actually context has been switched to another. Combined with modern tendencies to have multiple, and extremely large, monitors, and his advice seems increasingly out of date - sometimes on a Mac there's just too much screen geography between the window with the content and the menu items that apply to it. (And in general, I think you see more important stuff moved to toolbars anyway.)
What Tog doesn't talk about (as much) is: how easy or hard is it for a user to keep a mental model of the system in his or her head? That's a concept that resists easy measuring, and so it gets less play. I think it's critical though, and something that the minimalists get more right than he does. Actually, the Tog/Norman article does talk about "mental load" but again tries to oversimplify, implying that every gesture must be independently memorized (rather than making sense in a larger physical metaphor) and that every gesture is as needed as every other one. Many good UIs will allow for basic interaction with onscreen components, and reserve the gestures for "expert mode" stuff.
Discoverability is important, and I'm not a big fan of having a big library of gestures (mostly because I tend to trigger them accidentally all the time, and so find them violating The Tao of Programming: a program should always do that which startles the user the least.) I'd say it's nice if the road to learning those expert gestures is embedded in the program, but not necessary.
I also feel this article implies that all of the same use cases and patterns apply independent of the physical attributes of the device (and that all users are expert users) -- but laptops are used in very different ways than phones and tablets. There are some principles that apply to both, and while we might expect to see more drawing together so you can get more work-work done via a touchscreen device and a laptop might have more fun and simplicity, there's still a big divide.
Subscribe to:
Posts (Atom)

