Show HN: I Design with Code
codepen.io
codepen.io
But it's never got much love outside of Advertising/Marketing circles (was originally a animation toolkit for Flash, now JS) because it was closed source and pay-to-use.
It (probably) is the best animation library out there.
> was originally a animation toolkit for Flash, now JS
I wonder how difficult that transition was.
Take a look at his licensing page. [1] Certainly isn't Open Source in the traditional sense and the terms are pretty convoluted; again IMO the reason for it not gaining mainstream developer adoption.
I remember paying a yearly fee ($100?) for their "Club Greensock" membership so I could develop and supply code for clients and be in good standing. Of course the costs involved trying to replicate this toolkit and keep within deadlines made the fee seem very reasonable at the time.
> transition
There was definitely a transition, some Devs might argue it wasn't that painful; but certainly having a JS version of this particular codebase helped immensely, and also proved that we could still do all the "sizzle" we were able to do in Flash now with JS.
The posted example is testament to that IMO. Very smooth :)
It's widely seen as the go-to animation library on the web...period. Most award-winning sites use it. Chris Gannon is clearly a magician with it. Love his work.
As for the licensing, the codebase is on github and it's free to use in the vast majority of use cases including most commercial ones. See http://greensock.com/why-license/ to understand the "why" behind the model. Hopefully you'll see how it can actually be a very good thing for the community (as evidenced by the decade-plus track record and ongoing updates). But I realize it's not for everyone and that's okay. There are some misunderstandings out there about the license, so I hope folks will take a moment to read that article I mentioned above.
Happy tweening!
(Also consider that a typical way of developing a website or application UI involves everything from drawing on paper through painting in Photoshop through building mockups in a graphics-oriented design package.)
So yeah, if I'm exploring or communicating ideas to non-technical people then yeah maybe code is less appropriate, but to say that you shouldn't design with code is ignoring a huge part of the design process.
Why do we have CAD tools at all when architects and engineers could just be writing code for buildings?
Im not trying to insult your work, but this is so grossly generalized and false that it's absurd.
But please note that programming mostly definitely is made up of patterns - ask any programmer. It's not absurd, nor a generalisation, it's a fact. If you're interested check these links out: http://code.tutsplus.com/articles/a-beginners-guide-to-desig... https://en.wikipedia.org/wiki/Software_design_pattern
Code is a tool, just like a GUI. Most GUIs just abstract away the creation of the code anyway. If a guy like Chris can leverage code as a tool directly and doesn't need a GUI, more power to him. There are plenty of effects I've created with code that would be an absolute nightmare to try to create with a GUI.
There are, but not that much. Look at the code of this demo. It's not obvious, it was probably hard to tweak to look nice, not to mention doing any debugging.
> There are plenty of effects I've created with code that would be an absolute nightmare to try to create with a GUI.
That's kind of my point. It isn't that code is better-suited to this job - it's that our GUI tools are mostly stuck in the static world and suck for dynamic / interactive visualizations.
Bret Victor put a lot of thought on how to improve this state of affairs; he also brings convincing arguments that such things are still better-suited for direct, visual manipulation - that coding directly is a crutch we use because of lack of better tools.
Some good talks and essays on this:
http://worrydream.com/MediaForThinkingTheUnthinkable/
http://worrydream.com/DrawingDynamicVisualizationsTalkAddend...
Using my Powershell module, this creates a Powershell module that loads a Powershell Filter that does FizzBuzz:
New-Module FizzBuzz.ps1 (New-Function Filter-FizzBuzz (New-FunctionStatement If -not _ Modulus 15 'return "FizzBuzz"' (New-FunctionStatement ElseIf -not _ Modulus 5 'return "Fizz"' (New-FunctionStatement ElseIf -not _ Modulus 3 'return "Buzz"' 'return $_' ) ) ) -Filter)
And that command's output: https://github.com/Gilgamech/Main/blob/master/FizzBuzz.ps1
mainLineMask[0].getAttribute('d'),
mainLine2MaskPath = "M148,122.5c82.2-71.6,377,53.3,504,0C766.5,189.5,65.8,194.1,148,122.5z",
mainLine3Path = "M148,122.1c152.9,62.6,377,56.4,504,0",
mainLine3MaskPath = "M148,122.5c152.9,63.6,377,53.3,504,0C766.5,189.5,65.8,194.1,148,122.5z",
mainLine4Path = "M148,122.1c152.9,62.6,377-83.1,504,0",
mainLine4MaskPath = "M148,122.5c152.9,63.6,377-84.7,504,0C766.5,189.5,65.8,194.1,148,122.5z",It's code all the way down.
Remember, just because you 'don't see how this kind of code is helpful for design' it doesn't mean that other people share your view. We all see things differently - a good thing to remember especially in these times.
However, without some sort of interactive IDE, this just feels like magic numbers. The code itself, as written, is not enough to help you visualize what you are producing.
The vector graphics you see are mathematical models which are 'coded' in a script or a programming language and animated with the help of... again... programming.
I understand the concept of less code and more stuff, but the fact that people are saying programming is not for designing is just simply absurd. The tools on top of which you design convert everything into code.
I'm in no way saying people should stop using these tools or design should only be done through code. But knowing how to visualize things in your mind and materializing that concept through code/programming is beautiful and (in my personal) opinion makes you a better designer.