alecperkins's comments

alecperkins | 13 years ago | on: Active Markdown: an experiment

I'm considering actually using the Tangle controls for the interactivity. They do a really good job of being accessible and unobtrusive. Right now the controls are just vanilla jQuery UI. I started with native `<input type="range">` for simplicity, but switched to jQuery for quick compatibility.

Also, how does the notation feel? The goal is a balance between functional/useful and simplicity. Ideally, the plaintext version is just as understandable.

alecperkins | 13 years ago | on: Thalmic (YC W13) introduces gesture control without the cameras

Given that the technology in that film was designed by actual interface researchers, based on their research, it's no surprise that it continues to resonate so well. Also, sci-fi does have a tendency to inspire, or at least be inspired by, the leading edge of technology.

Said researchers now have a company, Oblong industries, that's basically making the Minority Report interface a reality: http://oblong.com/

alecperkins | 13 years ago | on: Stop Using Small Font Sizes

The idea that small font sizes are acceptable because “users can zoom” is fucking ridiculous, and I am extremely disappointed to see it suggested here. That is absolutely the wrong attitude. If a user has to go out of their way to use your interface, you're doing it wrong. No question. Interfaces should bend over backward for their users, not the other way around. Yes, you can't satisfy every edge case, but the default attitude must not be “well, users can just use this workaround”. That thinking is why we have crappy interfaces. If that's your approach for building interfaces, please stop building interfaces, for the sake of the user.

alecperkins | 13 years ago | on: Try RethinkDB in your browser

Same. A hint that appears after a wrong attempt at the "before you move on" steps and a full explanation that appears after two would be very helpful, especially with steps 7+. Without those it feels like a puzzle instead of a tutorial.

alecperkins | 13 years ago | on: In Defense of "The Big Bang Theory"

It's a running joke that Sheldon and others look down on Leonard as a scientist. The claim is often that his work is very "derivative". Even Leonard's own mother criticized the originality of his science fair experiments as a child. Also, the dynamic between Sheldon and Leonard can be seen as theoretical physicist versus experimental physicist. (Not to mention extending the layers of superiority when Howard, the non-PhD mechanical engineer, is included.)

As for Sheldon generally being a douchebag, the article does a good job of explaining his (partially deserved) sense of superiority.

alecperkins | 13 years ago | on: Youth expelled from Montreal college after finding security flaw

A analogy even more accurate to this case would be: "Let's suppose you let someone store their stuff at your house, and they have previously pointed out a problem with the lock. You come back home and find them picking on your door lock with a lock picking tool. You ask him "what are you doing?" and he says "I'm just checking the lock I said you should fix is safe. I do it for our security."

alecperkins | 13 years ago | on: Single-Click Double-Tap Murder

The criticism of drones isn't of the technology, but the attitude of those operating them. The article mentions that it doesn't put the operator's own people at risk, and is trying to point out that this creates a detachment from the consequences. Before, taking out a target required people on the ground in some capacity, actually carrying out the mission or just identifying the target. Drones undoubtably save the lives of troops on a per-engagement basis, but now that there isn't that risk, and without some process or oversight, it's becoming too easy to just pull the trigger and destroy some pixels on a screen.

alecperkins | 13 years ago | on: Snow Fall: The Avalanche at Tunnel Creek

Odd. It looks perfectly fine to me, in both mobile Safari and mobile Chrome. The text is completely visible, with a little padding on either side, and videos all slide nicely into the text column.

alecperkins | 13 years ago | on: Hypermedia APIs on Rails

I like to take this one step further and return referenced objects with both their ID and their URL as actual objects instead of strings. This is incredibly helpful for working with the API in something like Backbone.js, because then there's no need for logic in determining if it is getting a list of IDs as strings or full objects. It's doubly helpful if the references are to objects of different types. The client simply loads the objects as given, and can do a sync if it's missing attributes it expects. (Of course, sending the full data in one request is usually preferable.) Also, the `url` property on the model just returns the `url` attribute instead of needing to duplicate the URL construction pattern.

So,

    …
    {
        'id': 123,
        'url': '/resource/123'
    },
    …
instead of

    …
    '/resource/123',
    '/resource/124',
    …
or worse

    …
    123,
    124,
    …
Also, Django REST Framework is easily my favorite REST API tool for Django. It's very straightforward to use just as much or just as little of it as necessary. In fact, it's powering the main views of the upcoming second draft of http://marquee.by (the entire site is effectively a browsable API).

alecperkins | 13 years ago | on: Apple Could Power the Web

> If I had to run a monolingual web stack, I would choose Objective-C for the sole language.

This article is severely undermined by its conflating internet and web. Objective-C doesn't have a significant presence in the browser, and is consequently a useless language for achieving a monolingual web stack. The article demonstrates a complete lack of awareness of the frontend side of the web and assumes that iOS apps are this frontend. There is not a single mention of JavaScript, or even the word "browser".

It also seems to be overly focused on the idea of computational performance, when in many cases applications are IO-bound. The descending cost of compute power means this efficiency edge in computation is decreasing in importance. Also, no mention of things like PyPy? Overall, the article has a very narrow-minded and misguided view of the web.

alecperkins | 13 years ago | on: Student Suspended for Refusing to Wear a School-Issued RFID Tracker

It's less about ensuring that students are at school, but ensuring that they are counted. The school district receives funding from the state dependent on attendance. That's what is meant in the article by "it's all about money". With the cameras and now RFID, they can record that the student is on the premises even if they are not in the homeroom for attendance taking. (There are legitimate reasons a student may miss roll call.)

alecperkins | 13 years ago | on: Introducing the Redesigned Bitbucket

Are you sure you're looking at the redesign? It looks less like GitHub now. There are still similarities, but Bitbucket is thankfully starting to take on its own style.

alecperkins | 13 years ago | on: CoffeeScript: less typing, bad readability

I didn't mean to say "Python does it, so CoffeeScript is not a problem", but rather that both can suffer from too much indentation. CoffeeScript is a little more prone, given the callback-heavy nature of JavaScript, but similar treatment of surrounding whitespace is helpful in maintaining clarity. (Basic example: I find Python's standard of four-space indentation helps CoffeeScript readability, and prefer it over the popular two-space indentation.) And in both cases, excessive indentation is a useful signal.

Readability is very subjective and depends on the user's knowledge of the language, as well as personal style, or 'accent', if you will. Code written with, for example, leading commas in dictionaries instead of trailing commas just looks bizarre to me and is a little harder to read, to me, even though I like to do something similar and stack colons.

alecperkins | 13 years ago | on: CoffeeScript: less typing, bad readability

I do every day, both in CoffeeScript and in Python. I find things like braces frustrating, because I already keep it indented, and have to then manage the openings and closings. With proper 'aesthetics', indentation is perfectly readable. Plus, if something starts getting too indented than is readable, it's a sign that it needs to be refactored. (Whereas JavaScript looks messy even with otherwise sensible nesting.)

alecperkins | 13 years ago | on: CoffeeScript: less typing, bad readability

If you use anonymous functions a lot, it's amazing:

    result = _.map object, (val, key) ->
        foo(val)
        
is much cleaner than

    var result = _.map(object, function(val, key) {
        return foo(val)
    });
I think.

alecperkins | 13 years ago | on: CoffeeScript: less typing, bad readability

It's funny, because as a big fan of Python who has had to do a lot of CoffeeScript lately, I find CoffeeScript very similar to Python, and very readable. It's certainly more readable than JavaScript, when you don't get fancy. It's called "Unfancy JavaScript" for a reason.

Many of the issues raised in this article can be solved by "simply" not doing it (admittedly not always a real solution). Just because the language allows something to be done, doesn't mean it should be done that way. Our team has a styleguide that clearly explains good and bad practice, for CoffeeScript AND Python. (It's possible to do bonkers stuff in Python, too, just harder.) It includes things like: use explicit returns, especially when intending to return nothing; include parenthesis unless it's more clear without them (callback as arguments).

Yes, it'd be great if the language were more explicit and made it harder to do confusing thing. But, its core goal is being "just javascript", which prevents some of that explicitness. Also, the flexibility lets the real goal be clarity.

I find

    my_object =
        key: 'value'
        fn: (response) ->
            console.log(response)
to be more clear than

    my_object = {
        key: 'value',
        fn: function() {
            console.log(response)
        }
    }
because it doesn't have all the crap. CoffeeScript's whitespace syntax is even more helpful when those objects start getting nested. Plus, not having to deal with trailing commas is amazing. At the same time,

    someFn arg1, arg2, ->
        doStuffInACallback()
    , arg3
can be confusing, so parens help:

    someFn(arg1, arg2, ->
        doStuffInACallback()
    , arg3)

I try to not be "that guy" when it comes to CoffeeScript, but it's easily one of my favorite languages now. All the crap that JavaScript requires is just gone.
page 1