HNHacker News
TopNewBestAskShowJobs

mcantor

5,255 karma · joined May 21, 2009

Devout software hater.

http://www.maxcantor.net

my name is max cantor.

my email is firstname at firstnamelastname dot net

purveyor of vim cheat sheet posters

http://www.vimcheatsheet.com

submissionscomments
mcantor··on Designing command-line interfaces
One of my favorites is tar:

    $ tar -m foo
    tar: You must specify one of the `-Acdtrux' options
    Try `tar --help' or `tar --usage' for more information.
Oh, right! `-Acdtrux'! How could I have forgotten. I deal with ACD Trucks all the time. (?!?!)
mcantor··on Code Kata: Becoming a better developer
Internalizing the correct ritualized movements lets you forget about them so you can focus on high-level strategy (winning fights/writing applications).

Lego bricks are hard and consistent and unchanging, and you need them to build incredible novelties.

BTW, my personal belief is that they are called "martial arts" because "art" is simply creating novelty within a system of constraints. Also, you are incorrect that all martial arts are concerned with inflicting damage--there are many arts and corresponding practitioners who encourage and value the mystical aura, because martial arts can be used as a vehicle for personal growth, discipline and spiritual nourishment. Please be careful about generalizing your experiences!

mcantor··on Designing command-line interfaces
I think a lot of people don't even realize such libraries are out there, or don't understand that there's a wheel being reinvented. ("It's just command line options. Why would you need a whole library to do that?")
mcantor··on Designing command-line interfaces
One more:

Keep your "usage" blurb succinct and clear.

Don't clobber your users' terminals with two pages of output when they're not expecting it. If "yourapp", "yourapp -h" or "yourapp --invalid-flag" results in two screenfuls of information containing your app's license, installation instructions, contribution notes, an exhaustive listing of every single one of the 100 available subcommands, and a verbose representation of a configuration setting that 75% of your users won't care about, you're doing it wrong. (I'm looking at you, rvm).

This is similar to the idea of "You don't really understand something unless you can explain it so your grandmother gets it." Your app doesn't really have a sensible interface unless the top layer of its abstraction, or the most common commands, can be summarized in less than scrillions of lines of text. If you simply can't trim it down far enough, it's because you're breaking from the Unix philosophy and your utility is doing too much.

mcantor··on Designing command-line interfaces
I think the use of "interface" is sensible, if somewhat ambiguous on the surface. In this context, options & arguments are the interface to the utility, not the "CLI", which is the interface to the command line itself.

Context-aware tab completion is very doable in the unix world, actually; it's just a hassle on the part of the utility-writer. Have you ever noticed that if you add a new file "foo/bar/baz.py" to a mercurial repository and type "hg add fo<TAB>", it will autocomplete all the way to "foo/bar/baz.py", without stopping at each directory? This is because hg has overridden the default tab completion provided by bash and defined its own set of possibilities.

I wish it were easier to set up; I think if that were the case, we'd see a lot more utilities with spot-on tab completion.

mcantor··on Designing command-line interfaces
Oh, and another:

Use your language's command-line option processing libraries.

OptionParser in ruby and argparse in python. There is no reason to eschew these libraries: they're part of the standard library, they require zero coupling to your app logic, and they handle all of the edge cases for free.

"But I can just shift the arguments", you say! Yeah? Great! What if the user pipes input through STDOUT? What if the user passes a flag, a required argument, and then another flag? Will your script read the last flag correctly, or has the naive logic already entered "required argument processing mode"? Just use the library. It's a solved problem!

mcantor··on Designing command-line interfaces
Here's another one:

Provide explicit flags for default behavior.

For example, if your lines-of-code counting utility excludes preprocessor directives by default, and includes them when you pass "-i", provide an "-x" switch that signals to use the default behavior. This way, when someone wants to write a bash script that uses your utility, they can do this:

    case $include_directives in
    y)
        LOC_FLAGS='-i';;
    n)
        LOC_FLAGS='-x';;
    esac

    myloc $LOC_FLAGS
This has three benefits:

1.) It's explicit, and thus more obvious and clearer.

2.) It's more consistent, so there's no risk of empty/unset variables, whitespace, or other edge conditions screwing up a delicate munging operation.

3.) It's change-tolerant, so if future versions of your utility change the default behavior, scripts will continue functioning as expected.

mcantor··on Game mechanics for thinking users
:-> I hope I didn't come off as critical! I often hang out with a feminist-leaning crowd, so that sort of thing tends to stand out to me. (The running joke is "The hardest thing about being a straight white male is remembering that not everyone is a straight white male.")

I'm actually just now working through "Rules of Play" by Salen & Zimmerman; it's nice to see the field of game design slowly maturing and accruing "serious" texts. It would be nice if we didn't need academia's help to legitimize our pursuits, but ya can't win 'em all.

I liked the separation you drew here: "The idea here is to use techniques of game design in a way which is integrated in the functionality of an application not focused on gaming..." It's an interesting way to frame the goal of a "gamified application": rather than the "game" being played for its own sake, there is an overarching goal, and the path to that goal possesses game-like qualities as an (apparently) organic side-effect. In the same way that "real life" can distract you from a game, you don't want the "game" of the app to distract you from the "real life" or "goal" of the app.

mcantor··on Hacker puts a video cam on an RC truck and saves the lives of 6 soldiers
Well, it's stereotypical for both hackers and hippies to have scruffy facial hair and hygiene problems, so I guess I can see how one might mix them up.

Hackers don't hug their computers, though.

At least, not when anyone else is looking.

mcantor··on Hacker puts a video cam on an RC truck and saves the lives of 6 soldiers
Why will the comments be pure crap?
mcantor··on Game mechanics for thinking users
I think it's kinda funny how the "Did you consider a woman player's perspective?" question at the end asks us to be mindful of women as a game-playing demographic while simultaneously forgetting that women are also a game-designing demographic who might be reading this very article.

Just sayin'!

The "Art of Game Design" book looks fascinating, too--I ordered a copy!

mcantor··on Lost skills: What today's coders don't know and why it matters
How is this hacker news?
mcantor··on NYT Crossword editor: "I was willing to endure a life of poverty to do this."
Why is that phrase surprising?
mcantor··on Texas Battlefield 3 launch LAN bans women from attending
their female attendees have been... intolerant of the culture of computer gaming

Their female attendees have been harassed and disrespected. You need to understand that there is no such thing as an objective experience; context is the trump card every time. You don't feel threatened when someone trash talks or hazes you at a conference/tournament. Most women do feel threatened. It's up to us as a culture to decide which of those views is "reasonable". I prefer to consider both of them reasonable and search for a viable compromise.

mcantor··on Texas Battlefield 3 launch LAN bans women from attending
The women-only events exist to provide more support for women in technology.

The intention behind men-only events is to avoid having to support women in technology.

mcantor··on Why Google cares if you use your real name
I have no idea why you're being downvoted. One of my friends has been named "Bubonic Johnson" ("Johnson" is not any part of his name) for over a year and Facebook hasn't nuked his account from orbit yet!
mcantor··on Why Google cares if you use your real name
Nevertheless, that doesn’t in any way add to a debate over my specific comment

This assumes that the OP's only goal was to debate. I opine that his secondary goal was to be a little cheeky and possibly evoke a chuckle, which was successfully achieved with me! You can interpret the "curmudgeon" comment as an ad hominem to the extent that his exclusive concern was the logical presentation of his argument, which I do not think is true for most cases in human discourse, on or off the internet.

mcantor··on Multiple APK Support in Android Market
As you leave features out of older versions, those users will be unhappy and leave negative reviews.

Can you elaborate on what you mean by this? It seems like you're saying users will be unhappy because they can't get new features without having to update, which seems odd.

mcantor··on Multiple APK Support in Android Market
I wish the market made a distinction between "reviews from people for whom the app is working" and "reviews from people for whom the app is broken". Most apps work fine on my G2, and it's useless when the first page of reviews is filled with 1-stars saying "FC's (force closes) on my Samsung Matrix Galactus++ Z".
mcantor··on Life lessons learned in travelling the world for 8 years straight
And then let me know where you were when you found it. I'm all about finding random marshmallows while I'm just ambling around.
mcantor··on If Dropbox Used GitHub’s Pricing Plan
Yeah! What a bunch of dickbags.

What if Western Digital used Dropbox's pricing plan?

mcantor··on I've Written a Book
I just purchased this book in both formats and I am giddy with excitement to read it. But I just have to ask... does anyone else think the swiss army knife on the cover looks like some kind of horrifying insect?

SWEET JESUS GET IT OFF ME

mcantor··on Kind of Screwed
Someone got jumped on for reproducing a work at a lower quality.

Just because you don't like it doesn't mean it's objectively "lower quality".

mcantor··on Please, make yourself uncomfortable
This reminds me of a less developed version of the advice Leo Babauta gives in his short book, "Focus":

http://focusmanifesto.com/

I highly recommend it. It takes maybe a couple of hours to read, and it's very dense with good ideas, suggestions and observations about how we interact with distractions. He doesn't go the extreme route of destroying them like this article's author; instead, he acknowledges that distraction can be fun and even a necessity to inspiration, but that we need the tools to quash it when we need to focus.

mcantor··on Please, make yourself uncomfortable
The last paragraph is a Chuck Palahnuik quote! Seems like you got the mindset the author was coming from. :->
mcantor··on Fish don't know they're in water
Ah yes, someone definitely posted it before me. I did read the entire thread, by the way; I just missed that link at the end of the long post.
mcantor··on Fish don't know they're in water
http://xkcd.com/386/
mcantor··on Why I've built an alternative to Github
You might be able to do a quick happy medium by generating a "vanity url" such as bit.ly/sneaky-affiliate-link or something.
mcantor··on I don't program in my spare time. Does that make me a bad developer?
"Poor comment" is very subjective; I think that people are downvoting you not only because they disagree, but because of the type of argument you made: you imposed a value judgment on a certain kind of decision-making without really backing it up. You just said, "People who do X are 'wrong' and people who do Y are 'right'." There was no logical basis or evidence for what you wrote, and on HN, I feel like people value the rationale behind opinions as much--if not more--than the opinions themselves.
mcantor··on Ooops.
Are there specific techniques to learning it, or is it just experience? For example, do you have to be very familiar with the specific weapon you're using? Does "visualizing" help? Are there tricks or points of reference that you use to help out?
← PreviousPage 8 of 32Next →