News for hackers. Stuff that matters.

BrianHV

Re:Why the Elixir language has great potential on Thursday December 22, 2016 @10:35AM (#13237887)
Because of the points you mentioned, I've been wondering why I haven't been able to find a framework-independent, open-source user management and authentication system. This seems like the sort of thing that should be solved in a standard way and not reinvented by every framework (or worse, application) that needs user management.

I've come across some paid services (e.g., stormpath, auth0) that seem to do what I'm talking about. It would be really nice if there were a free project along those lines though.

Re:Announcing TypeScript 1.4 on Friday January 16, 2015 @10:53PM (#8903334)
I'm hoping these features find their way in, too. I was just looking into their status yesterday, in fact, and came across these tracker threads:

* Non-nullable types: https://github.com/Microsoft/TypeScript/issues/185

* Sum types: https://github.com/Microsoft/TypeScript/issues/186

The short story is that there's some interest in both features, but there are challenges that someone needs to propose a solution to.

Re:Rust and Go on Saturday November 08, 2014 @12:33AM (#8576133)
Having just started reading the Rust guides, I'm curious: can the closure type actually ensure it doesn't mutate any externally visible data, or does that only apply to memory? Can declare that a closure doesn't (or shouldn't be allowed to) write to disk or hit a database?
Re:The octave – history of a discovery on Saturday October 18, 2014 @02:21PM (#8475922)
To be fair, it's not just the octave. The interval between a C and a C is a unison. The interval between a C and a D is a second. Two octaves are a fifteenth (not a sixteenth). The entire thing is one-indexed.

It's perhaps better to think of it as the number of notes you have to count before you reach the second note, starting with the first. If you start with C, you have to count one note before you get to that same C. You have to count 8 before you get to the second C, and 15 before you get to the third.

Re:Circle of fifths and roots of two on Wednesday April 30, 2014 @12:19AM (#7671580)
Yes, I should have gone logarithmic. But I spent enough time playing with that. Had to get back to work. ;) Thanks for figuring out that it's 16 cents. And yes, 16 cents is very noticeable. I might even say dramatic.

The thing is, tunesmith wasn't talking about a perfectly tuned equal temperament guitar. We're talking about tuning a guitar by ear so that one chord is sounds perfectly in tune (i.e., is in just temperament), then trying to play a different chord. It's going to sound off for the same reasons a just-tempered keyboard would. And as someone who constantly has to resist the urge to tune his B string too high in G major, I can tell you this isn't just a theoretical assertion.

That said, I have played on guitars (especially electric ones) that seem to resist sounding in tune even when the open strings are tuned "perfectly." Maybe that's a fret spacing defect in action. But it doesn't make the tuning-by-ear error negligible.

Re:Circle of fifths and roots of two on Tuesday April 29, 2014 @06:46PM (#7670420)
This doesn't match my experience. When I tune by ear, I spend a lot of time compromising to get even a few basic chords to all sound good. But since we're talking about the math, I thought I'd try to put some numbers behind my experience.

  Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
  [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> A = 440
  >>> def alterBySemitones(basenote, semitones):
  ...     return basenote * (2 ** (semitones/12.0))
  ...
  >>> equal_B = alterBySemitones(A, 2)
  >>> equal_G = alterBySemitones(A, -2)
  >>> equal_E = alterBySemitones(A, -5)
  >>> major_third_ratio = 5.0/4
  >>> perfect_fifth_ratio = 3.0/2
  >>> equal_G * major_third_ratio     # B as third of G major chord
  489.9942949771866
  >>> equal_E * perfect_fifth_ratio   # B as fifth of E chord
  494.44133536930485
  >>> equal_B                         # Equal tempered B
  493.88330125612413
There's about a 4.5 Hz difference between just-tuned Bs in those two chords. For reference, the distance between that B and the Bb below it is about 27.72Hz. If your fret spacing is introducing that much error, it's going to be tough to tune the instrument for more than maybe one chord at a time.
Yeah, cabal isn't quite there yet. People are aware of the issues and are working on them, but it's a slow road.

As a workaround, my modus operandi right now is to use virthualenv and build everything in there. I understand cabal-dev provides similar functionality, but I haven't used it. I've never had dependency conflicts when I build something from hackage in a virthualenv, so if you're still interested in trying it you might want to give that a shot.

Re:Excuses on Tuesday July 10, 2012 @08:51AM (#4223452)
I was in a similar — albeit not so extreme — place to where Abe was. I tell everyone that I'm working towards a music career and experimenting with startups. But I recently (prompted by a birthday) started looking at how I spent the past few months. And when I looked at it honestly, I hadn't done some of the core things that are required to be successful. I hadn't networked in the music scene much, I hadn't played out enough, and I hadn't devoted serious time to writing code, preferring to learn new frameworks, languages, or techniques.

What I noticed was that in all cases, there was a fear of trying and failing underlying my inaction. I was worried that if I played out and didn't live up to professional standards I would develop a bad reputation quickly. I was worried that I would produce a service that some people would start relying on but that wouldn't produce enough revenue to justify maintaining it. It was a lot easier to tell myself that I would be successful when I put the effort in than to actually test that hypothesis.

So I made a conscious decision to err on the side of action in all things. I chose to wake up at 8:00 every day even though I love being able to sleep in; it puts me into a working state of mind. I chose to install LeechBlock in Firefox, which will make it so I can't even post in this thread by the time you're reading this. Between 9 and 5 every day, I'm doing only things that advance me towards my goals. (And eating.) And I refuse to allow myself excuses. If I imagined a friend asking me why I haven't done something that is an essential step in my process and I would feel embarrassed by the answer, I do it ASAP.

I've been at this a week now. I've already accomplished several things I ought to have done months ago. Hopefully I'm building habits that I can maintain indefinitely.

You may be right... but might it also be the case that the people who are doing something about it just aren't making a big deal about it?

I suspect many people in their 20s and early 30s can think of a time when they were rewarded just for showing up. One year of little league was like that for me. Some of my non-core (or non-STEM, in modern parlance) classes felt like that, though I tended to participate actively in those. Put a lot of stories like that together and it's easy to say that the self-esteem culture affects everyone, and a small step from there to say it affects everything.

But that doesn't take into account my other four years of little league. Or my many music auditions. Or the difficult years when I decided I didn't want to do homework. (I assure you my grades suffered those years.) No one involved in those things was making a political statement; they were simply allowing the natural consequences of my actions to work.

Obviously everyone has different experiences. But I suspect a lot of people would be able to recall fewer cases in their lives where mere participation was rewarded than those where natural consequences were quietly present.

It sounds like this was a good speech. I expect few people here will disagree.

I'd like to remark, though, on the fact that the author called this "controversial advice," while going on to describe not a controversy, but instead "overwhelmingly positive" reaction.

Recently I've been trying to think about stories like these. Stories where someone speaks the truth that society doesn't want to hear, and people rally around the truth teller. I try to ask myself who's in this willfully deaf society if everyone I see supports the truth.

And in this case, I suspect we're still seeing some inertia from the self-esteem movement to which the speaker alludes. But is there a deep controversy? Is David McCullough a brave whistleblower speaking against a near-unanimous wrong? Or is the New York Daily News making a big deal out of someone saying what we all already know?

Re:Ask HN: Freelancer? Seeking freelancer? (June 2012) on Friday June 01, 2012 @10:01AM (#4053374)
SEEKING WORK - New York, NY

Particularly experienced in Django. Solid familiarity with C#, and firmly intermediate fluency in Haskell.

Client side experience with jQuery, backbone and coffeescript. I have a simple iOS app in the App Store as well.

Would enjoy working in-person in NYC, but remote is fine as well.

http://github.com/brianhv/

[email protected]

"Shy people fear negative judgment" is a bit facile on its own; it was sort of mentioned in passing in her TED talk. But it's actually not far from my understanding of the subject. (IANA psychologist, though.)

The wikipedia quote you gave lists apprehension, discomfort, and awkwardness as the feelings that are symptomatic of shyness. Those feelings strongly imply a fear of something—some negative consequence that might result from a given social interaction. If that weren't the case, why would you feel apprehensive, uncomfortable, or awkward?

Many people recognize their anxiety, even if they don't label it, but either don't notice or actively deny that there might be an underlying belief that causes it. Beliefs can be things like, "She's going to notice how awkward I am," or, "I have no idea what to do in this situation," or, "If I screw this up I'll never live it down." An eye-opener for me was reading an inventory in a social anxiety book and seeing exactly how many of the distorted thoughts I accepted about myself without even knowing it.

It's also worth mentioning that cognitive behavioral therapy is largely about becoming aware of these anxiety-provoking beliefs and developing different responses to them. If anyone reading this is interested in trying to reduce their shyness, I recommend researching this approach.

Re:Ask HN: Freelancer? Seeking freelancer? (May 2012) on Tuesday May 01, 2012 @04:25PM (#3916231)
SEEKING WORK - New York, NY

Particularly experienced in Django. Solid familiarity with C#, and firmly intermediate fluency in Haskell.

Client side experience with jQuery, backbone and coffeescript.

Would enjoy working in-person in NYC, but remote is fine as well.

http://github.com/brianhv/

[email protected]

Re:The iPad’s split keyboard has 6 invisible keys on Tuesday April 24, 2012 @10:12PM (#3887344)
Indeed, you are correct. And the heuristic clearly isn't as simple as whether or not the cursor is at the start of the word. Clicking between O and P produces a seemingly pseudorandom alternation that probably has some basis in statistics.
Re:The iPad’s split keyboard has 6 invisible keys on Tuesday April 24, 2012 @10:01PM (#3887313)
I just played around with this in the emulator for a bit and I discovered that the feature has some subtle nuances. Clicking on the same pixel can produce either the visible letter or the invisible letter. From what I've been able to ascertain, within a certain range of the visible key it favors the visible key if you're typing the first letter of a word, and favors the invisible key otherwise.
Re:The iPad’s split keyboard has 6 invisible keys on Tuesday April 24, 2012 @09:30PM (#3887253)
I find the personal dig at the start of your comment unnecessary, but I appreciate that you're engaging me in a discussion about the design aspects.

I'll grant that if you're optimizing for error correction, it's a perfectly suitable solution. I'd even go so far as to say that's exactly what Apple was going for when designing this. Even so, I really think this is a case where showing that this is an option would be valuable. When I see a split keyboard, I assume that I need to press the keys where they're displayed and frequently have to slow down my typing to figure out which side of the keyboard the key is on. It's nice to know I don't have to do that.

Re:The iPad’s split keyboard has 6 invisible keys on Tuesday April 24, 2012 @09:14PM (#3887209)
Perhaps there were thousands of iPad users who used the keys without knowing it. I don't have access to those numbers.

But how many more would have used them if there were an affordance?

And if we're talking about good (user interface) design, there's an element of "what if everybody did it" involved. I don't want a lot of applications hiding useful features behind invisible buttons. I think having the keys there is a fantastic idea; I just think it would be better if they were visible.

Re:The iPad’s split keyboard has 6 invisible keys on Tuesday April 24, 2012 @08:40PM (#3887115)
I'm not entirely convinced this falls under the category of good design. As it stands, it's a fun and useful easter egg. But good design wouldn't have required a blog post months after the OS's release to inform users of the feature's presence.

Good design should have some sort of affordance. In this case Apple probably didn't want to have two instances of the keys along that border, but perhaps some sort of faded version of the keys could have provided the necessary affordance without cluttering up the keyboard.

Unfortunately, Schumer just got reelected. He won't be up for election again until 2016.
Re:Android Design on Thursday January 12, 2012 @05:47PM (#3458315)
As a day 1 Droid user after 10 years on Palm OS, I was stunned that the control in your third picture made it into a release, and even more stunned it persisted so long. On Palm OS you could pick a time with a maximum of three taps. There's no reason it should take more than five: one for each digit plus AM/PM.

I'm not a fan of the swiping, but you're right. It is a huge improvement.

I haven't tried Prezi in public. But to me, the big opportunity in this for a well-organized presenter is the ability to spatially orient your audience.

I can imagine a history lecturer creating a timeline spanning the entire length of the course, marking major events on it. When he wants to discuss a topic, he zooms in on the timeline so that the students get both context and specificity.

I can imagine an elementary music teacher designing a presentation with instruments grouped by family, zooming in first on the woodwinds, then on the single reeds, then on the saxophones. When moving to a new family, it would zoom out first to remind the students of how the instruments relate to each other.

I can even imagine any routine three-point presentation could benefit from the added context that spatial reference can provide.

Animation for animation's sake would almost certainly be detrimental to a presentation. But I'm excited about tools like this because they give good presenters the opportunity to present information in a way that wasn't previously possible.

Re:Show HN: Scroll Reddit on Friday November 04, 2011 @05:42PM (#3197816)
I think this is obscuring the hover on links. I'm on Firefox and when I hover over a link so I can see what subreddit it's in, the status bar shows it loading stuff from reddit, then reverts back to scrolldit.com.

Cool site, though. Could replace RSS for at least some of my reddit viewing.

Re:I want to code, not configure mail servers on Monday October 31, 2011 @02:22PM (#3178421)
In addition to this, once I get a mail server running, I'm terrified to make changes lest incoming mail end up in a black hole. One time when I made an incorrect change, the backup mail server that godaddy "helpfully" put in my DNS settings started bouncing everything coming in. Even in the absence of a broken backup server, my experience has been that errors in the process are too frequent and take too long (on the order of minutes) to discover.
Re:JetBrains AppCode: an Objective-C IDE That Makes a Difference on Wednesday October 26, 2011 @12:24PM (#3159266)
I tried it out for a bit a couple of weeks ago. I didn't stay with it because it didn't seem to be playing nice with the beta Xcode, but I'm still interested in switching. My two major reasons are refactoring support and the vi plugin. Having used Resharper for a long time in C#, I feel slow in environments without it; App Code begins to bring the Resharper convenience to Objective C.
I don't have a specific idea at the moment, but...

I've often wondered why emacs seems to have these plugins and modes that make one want to learn emacs, and vim doesn't. For instance, org mode. I don't think there something inherent to emacs that makes a mode like that work better there, and I'd love to see info on how to write plugins like that.

In fact, perhaps a simple org mode clone would be a good example project; it would certainly touch a lot of vimscript.

Assuming the author is reading these comments, I have a few questions:

- What neighborhood in Manhattan?

- How do you approach the owners/managers to negotiate?

- Do you find that small owners are more (or less) receptive to the idea than larger management companies?

Re:Tricky Programming Concepts Aren’t on Thursday September 22, 2011 @01:43PM (#3026921)
I can get behind that. I'm a big fan of finding better ways to teach. Thanks for taking the time to respond.
Re:Tricky Programming Concepts Aren’t on Thursday September 22, 2011 @01:28PM (#3026860)
I'm unclear on what it means to "understand references" in a way that doesn't involve the way they behave in code. Unless you're saying that the concept as it appears in code can be explained entirely with the tautological definition, in which case I would be inclined to disagree.

Of course, I'm also not sure that Joel's suggestion that some people have an aptitude for such understanding is "irresponsible." If you were to say he underestimates what people can pick up with practice, that would be a different story.

Older »