Skip to content

Instantly share code, notes, and snippets.

View lewiscowper's full-sized avatar
💻
Doing my best

Lewis Cowper lewiscowper

💻
Doing my best
View GitHub Profile
2015-02-05 13:16:00.715 firefox[82846:4790852] NSWindow warning: adding an unknown subview: <NSView: 0x10e681b00>
2015-02-05 13:16:00.719 firefox[82846:4790852] Call stack:
(
0 AppKit 0x00007fff8a9178fc -[NSThemeFrame addSubview:] + 107
1 AppKit 0x00007fff8a30368f -[NSView addSubview:positioned:relativeTo:] + 208
2 XUL 0x00000001024ed0ba -[BaseWindow setContentView:] + 106
3 AppKit 0x00007fff8a26f7f6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
4 XUL 0x00000001024ebeeb -[BaseWindow initWithContentRect:styleMask:backing:defer:] + 107
)
Process 82846 stopped
@lewiscowper
lewiscowper / gist:bbb8e51fda00ff080058
Created January 21, 2015 14:13
Dreamcode and it's use in Hoodie
Are there any ways of getting to a Dreamcode API with little or no knowledge of how APIs work? I'm interested in API design, and I was wondering how you make the collabarative decisions on how the Hoodie API works, hopefully I can make a blog post about the ideas behind it.
I see the DreamCode/API-first design process as a really nice way of making sure your backend devs and front end devs are working in sync, toward the same goal, because the example request and response are there from an early point, allowing both to work and (hopefully) allowing the two to glue together quite well.
Basically my overall question is, how do I determine if an API is good/better/best from a design point of view, without implementing it.
// HELPERS
// Sometimes it's easier to work with edges instead of point + size
// {x, y, height, width} => {top, bottom, left right}
function frameToRect(frame) {
return {
left: frame.x,
right: frame.x + frame.width,
top: frame.y,
bottom: frame.y + frame.height