Marcos Ojeda

Marcos Ojeda

san diego, ca nerd Joined over 7 years ago

  • 6 stories
  • 12 comments
  • 3 upvotes
  • Posted to Javascript can be used instead of Applescript in Yosemite, in reply to Elliott Regan , Jun 08, 2014

    part of the reason keyword arguments in other languages are nice is that you can generate/update them programmatically or even pass them through numerous times to various methods without having to unpack them when they arrive at their final destination. but also, it's really just a convenience. javascript apps embrace this idiom all over (i.e. react.createClass, backbone's .extend, jquery plugin confs, etc) so it feels particularly weird to see it not used in an instance where it would have felt so natural.

    you're right, not all apis benefit from the 'object in any order' design, some really do benefit from positional arguments. but if you're in a situation like Color where passing in r,g,b gives you one thing, but maybe r,g,b,a gives you something else, why should it matter which color goes first if all the parameters have names already. More to the point, why should the burden be on you of getting the order right? this is exactly the sort of thing that languages and compilers should be able to save us from. here's a small example, suppose i have a color:

    clr = {r:.3, g:.5, b:.2}; // maybe arrived from a JSON.parse c1 = Color(clr) // or Color(clr.r, clr.g, clr.b) clr.alpha = .3; clearC1 = Color(clr) // or Color(clr.r, clr.g, clr.b, clr.alpha)

    certainly you can argue that this is problematic for other reasons, but it's certainly more convenient in terms of typing and it also reduces the number of potential deviations between the two instances i'm making. it's not that one approach is necessarily better than another, but having that flexibility does change the way you design apis and data structures that others consume.

    1 point
  • Posted to Javascript can be used instead of Applescript in Yosemite, Jun 08, 2014

    interestingly, the main developer of Flying Meat Software has been pushing this idea pretty hard, first as jstalk and more recently reincarnated as cocoascript which, i'm surprised nobody has mentioned since there's nativecocoascript support in sketch for automation.

    i have some mixed feelings about how this js for automation bridge was set up, though, but if i step back a bit i think it's a huge win for app-scripting in general. I don't think i've seriously considered writing any applescript since ~10.4, but if the effect of this change in yosemite is more apps including scripting dictionaries, then by all means, sign me up.

    3 points
  • Posted to Ask DN : Whats your favourite CSS hack / quick fix?, in reply to Luis Ramalho , May 31, 2014

    funny story, around 2010 i was working on a band's website and made the same assumption, so i left-positioned a div at -10,000,000px. About a week after launch, i got an email forwarded to me from an Opera dev and fan of the group who was writing to let me know that ten million was too much left for the element and that their internal css parser just threw up its hands at very big values like that, breaking my layout.

    However, the site would work if i bumped the value down to something like -100,000px. anyhow, all that to say that i'm now forever skeptical of any css parser dealing with large numbers.

    1 point
  • Posted to OSX Font Management, in reply to frank kolodziej , May 28, 2014

    i had a similar realization sometime in grad school and it was incredibly liberating. I'll add to your suggestion the following:

    everyone has different opinions about how to organize fonts and i've taken the route, after a long time, to organize them by foundry because it became troublesome and often counterproductive (even though very type-a stimulating) to categorize almost all fonts.

    The example i like to give is jonathan barnbook's virus fonts which have blackletter and inscriptional influences but are thoroughly modern in execution and design. How do you organize something like that? even with fontexplorer's tagging features, it became troublesome to have a stash of tagged fonts and then realize that half of them needed some other tag, so like mp3 tagging, i ended up in this ridiculous cycle of tagging and untagging fonts.

    maybe that's not a problem you have, but it's a huge time suck because, to be honest, the only important classification that any of barnbrook's fonts have is that they were all made by him. and when you understand that, it's like spotting an eames chair, an m.i.a. track or, to get real pretentious, the 'distinctive notes' for a beer or wine. foundries have similar styles, like record labels or fashion brands.

    anyhow, i'm going to second using ~/Library/Fonts/ and organizing type, in the finder, by foundry. i have a screenshot and slightly more detailed explanation of this on quora.

    0 points
  • Posted to Ask DN: Should I be using version control for my designs?, May 06, 2014

    you should use git or hg if you think that they will make it easier to share, collaborate or waypoint your design work.

    branching almost certainly is not necessary, at least not in the same way that it is in software, primarily because it is onerous to merge most design files.

    it's helpful to unpack why you want to use version control, though. a while ago, i decided to make a script to rasterize my illustrator artboards and then added a secondary stub to rasterize-and-commit-on-save. this let me basically not even think about mercurial at all, i'd just work on my file, make my changes, save the file and i'd have a new commit and a folder of rasterized pngs.

    and it was useful for me when going back and looking at how my own process had evolved, but it wasn't a fundamental game changer in terms of improving our team's process. that is, it was useful, but it wasn't as useful as using mercurial or git as part of a software development workflow was. and that's primarily because traversing history was tough and because i wasn't collaborating with anybody at the time, so it was really just "for me," a single tree of history with lots of artboards.

    what i have found useful has been committing infrequently updated but commonly used items into source control. A good example is the indesign files for our business cards along with the csv used to generate them. this lets me look at prior orders, keep the files i send to my printer consistent, and lays out a process that i can easily adhere to when i make cards again.

    but for fast moving team stuff and prototyping, i have had better luck sharing screenshots and photos of my notebook in trello and soliciting comments from those.

    finally, it's worth considering that hosting on github may be problematic if your company or whatever is hawkishly protecting ip. it may also just be weird. is 'social coding' really the right thing for files that can't even be merged?

    i think that having some kind of version control for designed assets is super valuable, but i'm not 100% sold on git being the shining path. instead, my impression is that layervault is solving this exact problem, so i suppose i should take a look at it (he says blushing).

    1 point
  • Posted to Prisma - Global Color Swatches for Photoshop, in reply to Dominik Guzei , May 05, 2014

    very neat, it's quite ambitious! i've gone down this rabbit hole in a completely passive way rather than tackling it as part of the active design process.

    i'm curious to see what else comes from prisma!

    0 points
  • Posted to Two Sentences About Getting Older and Working on the Web, in reply to Bennett Wong , May 05, 2014

    serious question: how many people need git to develop a webpage? consider, i understand that git is a necessity in situations where you're collaborating with lots of remote folks. i even understand that source control is good developer hygiene. But to make a webpage, do you actually need git? i mean, you'll probably agree that the answer is no. and not even on technicality.

    but i think what he's echoing is something that most people encounter when they wonder why their singe page website now wants 600k of javascript once pageload hits. Why? is it really necessary? Do you need angular/react/backbone/etc. to make a webpage? need is a strong word.

    Even the html 5 boilerplate some would argue is part of a larger problem. Why do we need a boilerplate of js/css/html just to get to a blank page before we've even laid down any content. It sounds like a trivial complaint, but it's worth unpacking: should this really be the way that we develop webpages or webapps? should every project really start with yeoman and then involve me setting up a grunt build script to watch some folder to minify my js and css?

    part of the fatigue is that it's not clear that these projects whose genesis is in optimizing Very Complex Applications really have a place in garden variety hacking. does your homepage really need a lint > build > minify > deploy phase? it's not luddite-ism, either.

    As a thought experiment, it's worth thinking about why it is that we even have jsfiddle. These aren't complex things are they? why do we need some page to stub out a couple lines of html, css and some javascript?

    the answer, which you're probably muttering under your breath as you read this is probably "because nobody makes webpages anymore, everyone makes webapps" and so we've ended up in a situation where we've traded up-front developer convenience for having massively expressive web applications.

    his complaint isn't about git or github, it's about how these 'workflows' become accepted dogma in the world of web development and it's not entirely clear that they're really big wins in most cases. But i mean, has design devolved to massaging a yeoman config? is design about minifying js with uglify or closure, or is it about choosing less or sass or some other preprocessor?

    but i mean, give it five years and we'll probably all be using some other workflow, some new twist on Make, maybe hg and bitbucket will be ascendant and github will be the sourceforge of tomorrow. there'll be a lot of new stuff for all of us to learn, but will it really improve our web design? i think that is but a small part of the nature of his two sentence frustration.

    11 points
  • Posted to Prisma - Global Color Swatches for Photoshop, in reply to Samuel Zeller , May 02, 2014

    if you are using pantone swatches from the swatch->color book, those are completely portable between illustrator and indesign and portable between computers as well. you just need to save your document's swatches in illustrator and you can open them up elsewhere.

    0 points
  • Posted to Prisma - Global Color Swatches for Photoshop, May 02, 2014

    comically, this is the exact behavior of illustrator's builtin Global Process Color swatches. I understand that photoshop became a popular tool for mocking up designs, but it seems like there has been a puzzling duplication of effort as a result of eschewing illustrator.

    if this excites you, don't wait for prisma, illustrator already offers swatches which can be shared easily as .ase's and organized and persist across multiple open files and can be parsed in python even. and illustrator even supports vector shapes out of the box!!

    1 point
  • Posted to Apple Developer Tools — Sam Soffes, Apr 23, 2014

    i mostly came here to fill in the statement about radars.

    the webapp at bugreport.apple.com used to actually be comically oldschool, i think between 2005 and 2010 it received almost no frontend facing updates. it was amazing, like a trip back through time with pinstripe translucent aqua buttons and everything.

    i wouldn't say it was bad though. it let you fill out bugs, attach files, and a few days or weeks later, you'd hear back from an engineer or see the bug marked as a dupe or whatever. it worked, it got the job done. i'm not exactly sure what people want from it and i'm not at all convinced that a native app would really help matters much since it's not like an indesign or illustrator crash report screen, it's more like "this api seems to be broken" and for that, pretty much any port in a storm will do as far as i'm concerned.

    0 points
Load more comments