HNHacker News
TopNewBestAskShowJobs

snprbob86

7,460 karma · joined March 13, 2008

New account: https://news.ycombinator.com/user?id=brandonbloom
submissionscomments
snprbob86··on Rap Genius (YC S11) responds to Heroku’s call for ‘respect’
I had never heard of Rap Genius before this Heroku thing and their app is aimed at dissecting the types of textual messages that are being exchanged back and forth here. Seems like they decided to take the "pick a fight" approach to publicity quite literally...

Although I'm getting bored of this little scuffle, I am glad that they made some noise initially because it let me know that I wasn't crazy. I was trying to profile, understand, and optimize a Heroku app and ultimately gave up because it was relatively easy to migrate.

snprbob86··on Virtualenv's bin/activate is Doing It Wrong
This is also the same technique I like to use for providing configuration to applications. Basically, write YOUR_APP_ENV=prod or whatever into /etc/environment and then add appenv to PATH which tests against the machine's environment, sets all the appropriate environment variables accordingly and ends with an `exec`. Super nice way to provide shell-friendly language-agnostic configuration.

I used to use `exec env $@` at the end of the script, so that I could `appenv > prod` for diffing, but I actually prefer this articles suggestion: `exec "${@:-$SHELL}"` since you can still `appenv env > prod`, but `appenv` provides an interactive shell by default.

snprbob86··on How I learned to love rebase
> To avoid having to go to the reflog

Why should I avoid having to go to the reflog?

I've met a few folks that, upon learning about reflog, think that every time they run `git reflog` they are admitting that they made a mistake or have otherwise failed to accomplish some task with Git. It's not a failure to need reflog; even if it was, you shouldn't have such an aversion to failure. I frequently run reflog to re-orient myself just like I do with `git log` or `git status`.

snprbob86··on How I learned to love rebase
This is where smaller code projects with clearer dependencies come in to play. You can designate maintainers, integrators, reviewers, etc on a per-project/per-boundary basis. This means that failure to understand rebase has severely localized effects. As a bonus, you'll get better factored code backed by developers with an enhanced sense of ownership.
snprbob86··on How I learned to love rebase
I don't understand why anyone considers rebase to be scary. It's really quite simple:

Primarily, rebase is a tool for modifying patches. Patches are as much about communication as they are about modifying code.

You edit your emails before you send them, so why not your patches? You proof read your edited emails before you send them, so why wouldn't you test rebased patches?

There are plenty of reasons to use rebase and as many advanced use cases as there are git enthusiasts. However, it's not "rewriting history" because you've always got reflog and cryptographically secure version hashes. It's not any more scary to rebase than it is to "undo" and subsequently "redo" in your text editor. The only caveat is that you shouldn't rebase code on branches that you've shared publicly for the exact same reasons that you shouldn't publish version 3.2.1 and then re-publish it with a bug fix without calling it version 3.2.2.

snprbob86··on How to stop Time Warner Cable sucking at Youtube
To clarify, `ifpw list` prints a table of rules where the first column contains rule ID numbers. Use `ipfw del $id`.
snprbob86··on Keep your wireframes free of distracting Lorem Ipsum
> The use of Lorem Ipsum is to have a place holder for your typography.

And this is to have a place holder for your text, not your typography.

> This is going to make your mock-ups less relevant and is going to be harder to explain to your clients.

But it will make your wireframes less distracting and easier to explain to your clients.

The distinction is in the level of detail. If you're not at the stage where you're picking colors, why should you be picking fonts?

Different tasks; different tools.

snprbob86··on Discourse ditches CoffeeScript
I'm not sure if you're telling me, or telling other folks in this thread, but for the record: I've fixed bugs in the ClojureScript compiler related to preserving the lexical scoping semantics :-) It's actually quite a tricky process and involves shadow tracking, symbol generation, self-calling function wrappers, and a bunch of other nonsense to deal with JavaScript's crummy semantics.
snprbob86··on Discourse ditches CoffeeScript
JavaScript's lexical scoping is function-level. There is no block level lexical scoping, so variables are "hoisted" to the containing scope. This is why people use the (function(foo){...})(bar) trick to create lexical scopes, such as when looping (CoffeeScript's `do` keyword embodies this pattern). In my opinion, "proper" lexical scope implies shadowing without hoisting.
snprbob86··on Discourse ditches CoffeeScript
I greatly prefer Scheme-like lexical scoping. However, JavaScript does not implement lexical scoping properly. Given the particularities of JavaScript's inadequacies, I think that the CoffeeScript design is very reasonable. It's certainly not "broken".

Lots more discussion here: https://news.ycombinator.com/item?id=3379962

snprbob86··on The Department of Homeland Security Stole My Boat Today
The more important part of that sentence, which you elided, was the fact that there was a language communication barrier.

I treated them with nothing but respect in person. I always joke around and make small talk with people in the service industry. I know how far that sort of thing can take you. However, I elected to use the word "meatheads" because it paints a picture: They were large men whom couldn't hold a conversation. Whether or not they could hold a conversation with native spanish speakers was immaterial to the story.

snprbob86··on The Department of Homeland Security Stole My Boat Today
> [T]he procedure is, for the normal person, a once-in-a-lifetime event. But the flunky on the other side of the desk does it every day.

I just had a TV delivered. And then a replacement delivered, but they were unauthorized to pick up the original, so the same two delivery guys had to come back a third time.

All three times, the delivery guys tried to force me to sign an incomplete form. They clearly wanted me to sign for whatever condition it was in and they would check all the boxes on my behalf to cover their own asses. The tactic was plainly obvious.

> The other solution is to be really, really nice. To be incredibly accommodating.

That's what I usually try to do in this sort of situation. However, it simply was impossible because the delivery guys 1) were rather large and intimidating 2) in my home, where I'm still unpacking and 3) spoke very poor english. Charm simply does not work on underpaid meatheads who don't understand the words your using. Any attempt to communicate clearly resulted in them becoming impatient and visibly annoyed, which resulted in me becoming uncomfortable (in my own home!). So each of the first two times, I just didn't sign my name. I just made an X that is in no way similar to my normal signature. The last time, for the pickup, I wrote "PERFECT CONDITION" over the whole form and then signed my name to that. The delivery guys were clearly pissed that last time because they didn't have another form and that if they dropped the TV, then they couldn't blame damage on me.

snprbob86··on Confessions of a Git Skeptic
> The hardest part is not learning "obscure" git things, it's unlearning the habits and preconceived ideas about how SCMs work.

I've begun to think of engineer's ability to "get Git" as a sort of abstract-thinking FizzBuzz. DVCS breaks up some composite actions (svn commit/checkout) into their component parts (git fetch/merge/commit/push). If you can't make that mental leap and see the value in it (and accompanying tradeoffs) despite all the learning materials out there, how can you be expected to derive comparable evolutions of design and engineer on your own?

snprbob86··on HTML5/WebGL source port of Quake
MouseloOk != MouseloCk

Tracking view position from mouse coordinates has always been possible, but handling mouse focus and coordinate wrapping is necessary for games with mouse look. The really tricky bit is that there are security implications in much the same way as full screen mode.

See here for details on Pointer Lock: http://www.chromium.org/developers/design-documents/mouse-lo...

snprbob86··on WebKit is the jQuery of Browser Engines
What's your point? There's also Trident (IE) and Gecko (FF), just like there's NT and BSD.
snprbob86··on Why we don't use a Rails template
> you end up spending time maintaining your template, losing much of the benefit of the template

It really depends on whether or not you start a lot of new projects. If you're a Rails dev shop that does a wide variety of apps on a regular basis, then the N=1 cost of maintaining the template is well worth the per-project getting-started cost.

snprbob86··on Yours vs. Mine
It depends on the application.

For a tool that you use as often as Gmail, you want something functional, but that doesn't mean it can't let the personality of Google shine through. Gmail's empty spam page says something like "No spam here, Hurray!" where as Outlook's says generic and bland like "There are no items in this view".

However, consider a shopping experience that you may use a couple of times per year at most. The application has a real opportunity to expose the user to your brand.

Also consider a new user experience that you only ever do once. These processes are boring, so maybe some personality helps conversions and reduces falloff.

There is no right answer here because there are so many different types of applications.

snprbob86··on "I Want Hue" – Colors for Data Scientists
Cool! I also really like http://colorschemedesigner.com/
snprbob86··on Google Go: The Good, the Bad, and the Meh
If you're are changing a...

...private to public:

The only references are in your package. They can be found trivially with ack or grep.

...private mutable variable to public:

You want to inspect all usages anyway to ensure that you're not violating the public invariant.

...private function to public:

You want to inspect all usages anyway in case you'd prefer to call an internal version of the function without the same preamble, such as argument defaulting or validation logic. If you change 'foo' to 'Foo', you can leave 'foo' around and just have 'Foo' call it.

...public to private:

You need to find all the external references anyway to eliminate them. Since the references are capitalized, it's easy to find them with a grep or ack. You won't get lots of false positives from locals that are named without a capital.

;

Personally, I prefer languages that let you bend the rules when you need to, but I also work with small and skilled teams on largely exploratory projects. If I were working on a larger and ever evolving corporate team, I'd be all over Go. They have made some excellent design trade offs for that audience; ie Google's internal usage.

snprbob86··on Egghead.io - short screencasts about AngularJS
It's just very different than what most GUI tools feel like. In some ways, it's more like a game engine loop than a UI toolkit's message pump. The lack of familiarity slows adoption, despite being, IMHO, vastly superior technology.

See my thoughts on why Angular's approach is attractive here: http://news.ycombinator.com/item?id=5063986

snprbob86··on Why a CEO should develop a habit of daily meditation
I've recently switched to no-music workouts. Awkward at first, listening to the sounds of others working out around you, but with practice you can tune that and your other thoughts out. After a week or two, I greatly prefer it!
snprbob86··on Segment.io (YC S11) Lets Developers Integrate Multiple Analytics Services
Because standards are where innovation goes to die.

I'm not saying standards are a bad thing, I'm saying that it's likely counter productive for most vendors at this point in the marketplace.

snprbob86··on The IDE as a value
> games built on top of Unity

For the curious, here is Unity's components reference page:

http://docs.unity3d.com/Documentation/Components/index.html

snprbob86··on The IDE as a value
> I still like to convince myself, though, as to why this approach makes sense over the traditional OO / encapsulation approach.

I've become a 100% believer that Values are preferable to Objects & Encapsulation, full stop. However, I don't think that means you abandon objects, state, encapsulation 100%. I think that just means that you minimize them significantly.

I just watched a talk by Stuart Halloway [1] on Datomic where he makes a little "play at home" fill in the blanks table of design decisions and implications. He makes the assertion that if you take "program with values" to be the only given filled in table cell, you can make some arbitrary decisions for one or two other spots and the rest of the spots will fall out trivially with interesting properties. I guess the point is that programming with Values just affords you so much freedom and flexibility.

[1] http://www.infoq.com/presentations/Impedance-Mismatch

snprbob86··on The IDE as a value
> But why oh why use a language that is very arguable not meant to write video games

Because Chris has absolutely no interest in writing a game (as an end goal). He's trying to write an IDE. He wrote a game to test out some ideas that he thought had direct applicability to his design for an IDE. Turns out that it helped him develop some insights into how to build dynamic systems with immutable data structures and composable, aspect-oriented behavior injection. I think that means it was a successful experiment; he wants to share his learning process.

No one is arguing that Clojure is the right tool for the job when it comes to real-time games, so I have no idea why you are so upset...

snprbob86··on Improve your REPLs with rlwrap
This isn't about adding readline support to your own programs (although it's a reasonable stop-gap solution there), this is about adding basic readline support to other people's programs without a massive investment.
snprbob86··on Backbone.js v0.9.10 Released
I've worked on a reasonably large Backbone app in production and I've written several toy apps with Angular.

I think that a lot of people dismiss Angular as yet-another-mvc-framework without ever discovering the key elements of Angular that are actually novel and worthy of study. Personally, I think that Angular is a local maximum in client-side JavaScript app development. But even if you don't agree, you should at least understand how it is different.

1) Angular prefers declarative

This doesn't mean you don't write procedural code. This means that if you want to do something proceedural, you should package it up as a Directive. Directives are where behavior and logic live. Your templates simply arrange and parameterize a tree of directives. This means that you have limited and well understood moving parts that can be tested in isolation, in combination, or in the application context. Contrast with the traditional big bag of event callbacks, which can only be tested in the application context and are more difficult to re-use in other application contexts.

2) Angular works like a game engine

Most traditional UI frameworks are a graph of intertwined callbacks. Games, however, traditionally have a pair of functions called Update and Render. The Update functions permutes the world and the Render function draws the new world. Angular works similarly, but it might not be immediately obvious. There is a "Dirty Checking" pass, where your view models, a simple hierarchy of poorly-named "scopes" are essentially diff-ed against the previous iteration. Then the Directives take over and permute the DOM to match the new view model.

Let's call the "Controller" part of the "ViewModel" and then just simplify that down to "Model". Inherently, Model and View systems are co-dependent. You have a graph like M <--> V. Angular's system graph is less like single bi-directional edge, and more like two directed edges in a cycle. That makes little difference when viewed abstractly with the two subsystems as nodes. However, once you break M and V down into subgraphs, the traditional Model & View systems look like a spaghetti mess of bi-directional relationships. An Angular application, on the other hand, would look like less like a lattice and more like a circle.

snprbob86··on Introducing Graph Search
I don't think that branding is for users. I think users will always just see "Facebook Search" when this is eventually rolled out broadly. The "Graph" part of "Graph Search" is for us geeks and for Wall Street. The idea is to obviously differentiate this against Google's "Web Search", "Image Search", and other Thing-Searches.
snprbob86··on Aaron Swartz commits suicide
I also never met him, but this really upsets me too.

It was a bummer when I saw the headline, but I'm really, really upset now that I was reminded of his legal troubles.

Suicide is complex, so I don't want to speculate on whether or not he committed suicide to avoid a trial and probably incarceration. Regardless, it had to be a factor and it certainly fucked up his life somewhere between a little bit and a lot a bit.

When I realized just how many spiders I've written... When I think about that spider with a $240B+ market cap... When I think "This could have been me or one of my friends"... I started to cry :-(

snprbob86··on Introducing Contributions
> If you visit your "contributions" page while you are logged out, you will notice that all non-public activity is hidden.

This wasn't immediately clear to me, so I had to test it out with Incognito. As it is, my own view of my profile is dominated by repositories from my prior business for which I no longer have access to on GitHub.

In general, I'd really prefer to be able to see my public profile. I guess it makes sense to let people know how much I contribute privately, but I want to be able to audit my public persona in much the same way Facebook has "View Profile As ____".

← PreviousPage 4 of 34Next →