digsmahler's comments

digsmahler | 7 years ago | on: Una Corda, a piano with one string per note

I had the same question, the piano is already a well developed and standardized instrument from centuries of revision and engineering. Returning to one string seems like a step back into the past. The video is really nice though, explaining how they came to this idea, and now I want to hear one of these one-string pianos! From Nils Frahm:

"It really felt like a brilliant new instrument, it was so nice. First time in my life to have kind of like a new piano. It sits in between a clavichord, guitar and a harp, and that was exactly what I wanted."

digsmahler | 7 years ago | on: Why I use old hardware

One of the great beauties of working with scripting languages, they work just fine on lighter laptops. The MacBook Air is a great machine for the node/python/php programmer on the go.

digsmahler | 7 years ago | on: Ask HN: What are your “brain hacks” that help you manage everyday situations?

Brain hack: Formulate your thinking in terms of positive statements.

Example:

* Negative statement: Don't use object inheritance, it leads to confusing code.

* Positive statement: Try to make your inheritance tree flatter, this helps make more straightforward code.

The negative statement is both discouraging and ambiguous. When you tell someone or yourself to not do a thing, it begs the question, "What should be done instead?" Meanwhile, the positive statement is incisive and gives the listener better direction.

If you can spot something to not do, you can probably come up with something to do as well. This shift in thinking seems small, but has had a profound impact on how I interact with the world, and improved my outlook on life, work and relationships.

digsmahler | 7 years ago | on: Geospatial indexing on Hilbert curves

The "where is this child" query is unaffected by the ordering, whether Z-order, Hilbert, or other. However querying "which children are in this area" requires that you come up with corresponding ranges along the curve. This is where the Hilbert curve is slightly better because in many cases the same area can be covered by fewer ranges.

Follow up questions: How do the number of ranges compare with the different orderings? How much does having fewer range segments affect database query performance? Does it make up for the added computational complexity of Hilbert curves? I've not answers, but these can be answered by science.

digsmahler | 7 years ago | on: Geospatial indexing on Hilbert curves

> Instead of projecting the Earth directly onto a single square, it projects the Earth onto the 6 faces of a cube enclosing the Earth and then applies an extra non-linear transformations to reduce even more the deformations. Each cell in s2 is in fact part of one of six quadtrees that describe the whole planet.

That's a super cool detail! I once implemented a 2D index using a Z-Order curve that directly translated lat/lon coordinates to a linear ordering. It works well enough because nobody really lives at the poles--the search regions with a single projection get really obtuse there. Projecting the earth onto a 6-sided die is a really elegant solution to that problem! Go go Google engineering!

digsmahler | 7 years ago | on: Simple, correct, fast: in that order

Yes! So much covered in so few words. This ordering works shockingly well for constructing robust solutions to complex problems.

Keep it simple. Do what needs to be done now, leave off for later everything else. By the time later arrives, what the project needs will have gone in new and surprising directions. Refactoring complex and coupled code into logical discrete units pays off in multiples down the road. Removing that which is no longer needed is like giving your whole team extra time to breath and new room to think. For all the times that simplifying also solved the two other problems, we used that time for making more cool stuff.

digsmahler | 7 years ago | on: Show HN: Interactive guitar scales diagrams

First, it must be said that this is super cool, and I love it so much!

I've got questions...

1. What is the relationship between the bottom colored dots and the colored notes? I'm looking in the "scalar" tool, key of C. It looks like the bottom dots are for coloring a cross-fretboard position. I would have expected the red bottom dot to mark the position from C on the 8th fret for all the scales, as it does for pentatonic minor to dorian. However pentatonic and blues major are on the 5th fret position, and major is in open position.

2. The pentanizer, what is it? I also don't understand the relationship between the colored and numbered dots and the fretboard coloring. The UI has a strange way of switching the numbers if I switch the scales. E.g. select pentatonic major, red dot, and 1 dot. Then switch to pentatonic minor, and it auto-switches to 5 dot. Overall, it's pretty disorienting the relationship between these design elements and the scales. Or I've fundamentally misunderstood the tool.

3. What tools did you use to make this? Will you open source?

Thank you, you're really killing it!

digsmahler | 8 years ago | on: Ask HN: How long does it take you to learn a new language?

Two weeks. I refer to it as the cussing period because it's full of situations where I know something is possible and easy, but I have to figure out how to find the right documentation and put together the peculiarities of the new language in my mind. Usually that feeling of frustrated helplessness goes away after two weeks.

digsmahler | 8 years ago | on: Clever ideas that failed (2010)

In my circle of peers, and perhaps beyond, we use "clever" as a pejorative. It roughly means what you said in the last sentence, "more of a display of cleverness than actual cleverness." In other words, calling a piece of code clever, indicates that it was made too complicated to easily grok. We also have an explicit goal of making code not clever.

digsmahler | 8 years ago | on: Show HN: Dynamic image size generator

Nice! This is definitely an important tool when creating a site traffic in images to be displayed across a variety different sized screens. Having worked on this type of project before I'll mention a few challenges you have not yet addressed.

At some scale point, your single DynamicServer server will have more resize requests than it has CPU cycles to serve. The straightforward solution will be to add more DynamicServer instances. This means that your source image directory will have to be accessible from both instances. It also duplicates your cache directory, meaning a single image size could get generated on both servers. You might solve that by having a shared image cache network directory. Another solution could be to use a hash mechanism to determine a particular backend server from the load balancing layer, so any particular image would always be generated on the same instance.

Something interesting happens when people upload an image to their newsfeed. If it's a public newsfeed, there can be a good many requests of the image within the next several seconds at upload. This means that you can get multiple cache miss requests at the same time coming into your DynamicImage server. Your PHP processes are vertically partitioned, so your server will be simultaneously generating the resize. For users with only a few friends, this is a small waste of CPU cycles, but for users with massive user bases (e.g. Britany Spears), a single upload could grind your DynamicImage server to a halt just because of simultaneous duplicated work. Varnish (and other load balancers) can solve this by collapsing multiple requests to the same resource into a single HTTP call (https://varnish-cache.org/docs/3.0/tutorial/handling_misbeha...).

page 1