HN user

drewolson

636 karma
Posts19
Comments20
View on HN
blog.drewolson.org 9y ago

Elixir's Secret Weapon

drewolson
6pts0
blog.drewolson.org 9y ago

Specify Your API

drewolson
1pts0
mave.io 11y ago

Mave Public Beta – A drop-in SMS invite page

drewolson
24pts5
blog.drewolson.org 11y ago

Composable Queries with Ecto

drewolson
2pts0
www.braintreepayments.com 12y ago

Braintree V.Zero SDK – Faster integration, drop-in UI, and pay with PayPal

drewolson
76pts30
blog.drewolson.org 12y ago

Node Streams for APIs

drewolson
2pts0
blog.drewolson.org 12y ago

Understanding gen_server with Elixir and Ruby

drewolson
3pts0
blog.drewolson.org 13y ago

Clojure core.async and Go: A Code Comparison

drewolson
150pts78
github.com 13y ago

Performance Improvements Using Judy Arrays

drewolson
183pts51
github.com 13y ago

Springboard: Full-stack HTTP testing for Express apps

drewolson
1pts0
www.braintreepayments.com 13y ago

Blogging with Mobile in Mind

drewolson
3pts0
drewolson.org 13y ago

Testflight - Painless HTTP testing in Go

drewolson
5pts0
blog.drewolson.org 14y ago

Rails Mass Assignment Protection in the Controller

drewolson
10pts0
www.braintreepayments.com 14y ago

Ping Pong is Serious Business

drewolson
2pts0
blog.drewolson.org 14y ago

Testing Express with Jasmine

drewolson
2pts0
www.braintreepayments.com 15y ago

How We Built the Software that Processes Billions in Payments

drewolson
85pts38
www.braintreepaymentsolutions.com 15y ago

Continuous Backwards Compatibility

drewolson
15pts1
www.braintreepaymentsolutions.com 15y ago

Our Git Workflow: Private Development, Public Releases

drewolson
89pts13
fingernailsinoatmeal.com 16y ago

Metaprogramming: Ruby vs. Javascript

drewolson
38pts50

Reviews are very exciting, but seem to be unable to fit the following use case:

I want to setup a repo such that a subset of collaborators (or organization members) can merge reviewed PRs to protected branches. I want the rest of the users to be able to create new branches and submit PRs from them, but _not_ to be able to push to protected branches. They should _only_ be able to land code in protected branches via reviewed PRs (via the merge button).

Is there a way to achieve this now that I'm missing? Gitlab's more granular user roles + permissions allow this.

Can you reference the part of the proposal that states this? I'm reading the following points:

$GOPATH/src/foo will be imported as foo by non-main package $GOPATH/src/mypkg/p.

$GOPATH/src/mypkg/external/foo will be imported as foo by a non-main package p anywhere, when p is being built as a dependency of command $GOPATH/src/mypkg/c.

It seems to me this is saying that libraries will use external packages only when built as a dependency of a main package. Again, this means library authors are out of luck.

Am I understanding correctly that this proposal again side steps / ignores pinning dependencies for libraries? To me, this is the biggest current problem in the ecosystem and, as a library author, this doesn't solve any of my issues. I hope I misread somehow.

This whole "framework fatigue" thing is going reductio ad absurdum. Convenience is not bad. _Too_ much convenience traded for opacity is bad.

As someone with a Phoenix app running in production, I can tell you that this framework hits the sweet spot of providing lots of value without requiring the user to learn too much. The abstractions it provides, especially the router and rendering layers, are very welcome. And I'm saying this from the perspective of someone who has built a few smaller vanilla plug applications.

Let's not throw the baby out with the bath water here just because rails went a little too far with the magic.

Golang Diaries II 13 years ago

I think the point is, if you write map like this you might as well be using a dynamically typed language in the first place because you're deriving no benefit from the type checker. In fact, you're just using casting to completely circumvent it.

Author here.

From what I've read/seen, the go blocks are lightweight thread-like processes multiplexed onto a thread pool. You may be correct about using Thread/sleep, ideally I would have used (timeout ...) and then pulled off the channel. However, I didn't want to introduce the concept of channels too early in the post, so I felt Thread/sleep worked as a compromise.

Agile is a Sham 14 years ago

A fun anecdote is to consider the belief the TDD crowd entertained that, by creating tests for a problem you couldn’t solve, you could somehow evolve a code that passed the tests and therefore solved the problem!

I'm all for a healthy debate of TDD, but the above statement seems ridiculous to me. For me, TDD helps with two main things:

- I specify the behavior I'm adding/changing before I implement it. This helps document the change I believe I'm making.

- I feel more confident when making changes to a large codebase.

TDD works for some and not for others. There are very interesting arguments to be had about the subject. However, can we please stop acting as though TDD advocates view their tests as having psuedo-mystical powers to solve problems automatically?

kevingadd -

We tend to use var when the return type is obvious, but we wanted to be explicit in the examples. Unfortunately, LINQ is not an option for us as we support .NET 2.0.

Your C# and Python predicate examples are quite readable, but in this case they don't work for us. The return type of each of these statements would be true or false, whereas we are building XML requests to be sent to a server to perform the searches. The call to Amount.Between(...) builds an XML node behind the scenes representing the search data.

Drew Olson (Braintree Dev)

In javascript, functions are closures. This means that the function "closes" over the environment in which it was defined. In the above example, the function has access to the sum variable because it was available at the time the function was defined. It is then free to add to that variable when the function is called at a later time.

I'm the author and I appreciate the insights. I wrote the article about what I consider to be building blocks of metaprogramming. I don't agree at all that eval() is the only piece of JS code that is metaprogramming. I believe that being able to dynamically define methods on objects at runtime is an example of "code that writes code" and hence metaprogrmming. YMMV.

I have to second The Road. Any book that I finish in a single sitting has a special quality. I would say it is my favorite book of the past 5 years and in my top 10 of all time.