Oracle: why 9 lines of rangeCheck code is copyright infringement - <AUTHOR> http://www.groklaw.net/article.php?story=20120802030811156

<comment><USER2> > Josh Bloch, who wrote rangeCheck, testified that "[a]ny competent high > school programmer could write" that method. RT 815:13-16 (Bloch). Even > Oracle's expert Dr. Mitchell conceded that "a good high school programmer" > could write rangeCheck with guidance. RT 1316:24-25 (Mitchell).

Maybe this whole misunderstanding comes from the fact that Oracle just thinks programming is a lot harder than it is.

<comment><USER3> I agree that rangeCheck is trivial and needn't be protected, but I'm not sure I understand the "high school programmer" argument. A highschooler could also write Rebecca Black's "Friday" (indeed, one did), but it's still protected by copyright.

Is any code written by a High School student automatically uncopyrightable?

<comment><USER4> Well that's about as far from a valid analogy as you're likely to get. Rebecca Black's "Friday" _is_ the entire work, and if you told any high school student "write me a song" they'd probably never come up with that exact song.

But something like the rangeCheck function _is_ what you'd get if you asked a junior programmer "before you're going to access that datastructure make sure your within its range". Furthermore it's a completely irrelevant part of Android as a whole which gave Google no competitive advantage whatsoever.

</comment></comment></comment><comment><USER5> The judge in this case writes computer programs, and has already made statements that indicate that this line of argument is going to be a loser. I don't know why Oracle is persisting.

> Judge: I have done, and still do, a significant amount of programming in > other languages. I've written blocks of code like rangeCheck a hundred times > before. I could do it, you could do it. The idea that someone would copy > that when they could do it themselves just as fast, it was an accident. > There's no way you could say that was speeding them along to the > marketplace. You're one of the best lawyers in America, how could you even > make that kind of argument?

Then:

> Judge: rangeCheck! All it does is make sure the numbers you're inputting are > within a range, and gives them some sort of exceptional treatment. That > witness, when he said a high school student could do it--

[http://www.i-programmer.info/news/193-android/4224-oracle-v-...](http://www.i-programmer.info/news/193-android/4224-oracle- v-google-judge-is-a-programmer.html)

<comment><USER6> The judge was even more scathing in the judgement on this particular point but I can't seem to Google up the PDF where he says it.

</comment></comment><comment><USER7> Range checks on a input feild were one of many simple exercises in learning computer programming at educational institutes that pre-date Oracle. It is lamentable that education can be copyrighted and be used to sell popcorn.

</comment><comment><USER8> I thought Oracle had agreed to $0 in damages for the rangeCheck copyright infringement ( [http://www.computerworld.com/s/article/9228298/Oracle_agrees...](http://www.computerworld.com/s/article/9228298/Oracle_agrees_to_zero_damages_in_Google_lawsuit_eyes_appeal) ) so they could get on with appealing the API copyrightability and the patents. Why are they arguing about it now. Did I miss a step?

</comment><comment><USER9> so is "int i;" in my programs a copyright infringement?

</comment><comment><USER10> I just thought of an awful analogy:

A builder is suing another builder in the next state over for stealing his plans and constructing a house following them.

Used by Oracle as evidence is that someone swung a hammer three times in the garage in a row in the same way someone else swung a hammer three times in a row, which produced two nails hammered in in exactly the same way.

</comment><comment><USER11> Who supports Groklaw? What are the goals of the financial backers?

I hate Oracle as much as anyone else here, but I refuse to support Groklaw. Patents and copyrights are very important for the fate of mankind, and I will not start trusting anonymous reporting and support of Groklaw just because Oracle is getting called out as an asshole atm.

<comment><USER12> 1) PJ hasn't been anonymous for years now.

2) There are anonymous blog posts submitted to HN every day, which you appear to never have had a problem with. Why this one?

3) If you have an argument why "patents and copyrights are very important for the fate of mankind", and somehow _this_ particular copyright case is a bellwether for that fate, make it. Otherwise there is no substance to your post, just blind assertions (and anonymous ones, at that :).

<comment><USER11> 1). But is PJ actually writing these articles? Or is PJ just publishing them? Is that a stupid allegation to make, or are people scared of mentioning that?

Are other corporations actively supporting her? To what degree? Financially, for hosting the site? Sources? Evidence? Opinions?

2). None are held with the same esteem as Groklaw, which I know most people default to for current news about patents and copyrights.

What isn't being covered by Groklaw? I'm not smart enough to answer that, and I doubt few here are. Is that something to be worried about? We are all trusting an expert which few people here can call out.

3). You are right, there is nothing special about this copyright case in particular. However, I do have a problem with the level of trust that Groklaw receives from the rest of the community. I have supported everything Groklaw has done to this point; however, I am severely worried about the lack of competition when it comes to giving the same level of reporting. One perspective is always bad.

<comment><USER13> > ...I refuse to support Groklaw... will not start trusting anonymous > reporting and support of Groklaw

> I have supported everything Groklaw has done to this point.

Kindly do two things for us: stop talking out of both sides of your mouth, and, instead of ineffectually waving your hands, point to specifically what Groklaw got wrong on this issue.

<comment><USER11> We are both in the room, I'm claiming there's a monster and you say there's nothing. The point is, neither of us really has a coherent argument with facts until the lights are turned on.

This blog needs a high level of transparency. If you can't imagine how Groklaw might be abused you are a fool.

<comment><USER14> OK. Your comment history up to this point hasn't been very trollish, so I'll assume you're actually trying to be straightforward here.

You seem to be making the claim that Groklaw is somehow worthy of scrutiny (which implies that they are somehow dangerous, or at least influential, but I'll get to that in a moment). You're also implying that Groklaw does not have a competitor.

In general, you're right that demanding transparency from politically influential organizations shouldn't require a burden of proof. However, I've seen no evidence that Groklaw is either politically influential or influential in matters of law. The principals behind Groklaw may be influential in their own professional rights, but Groklaw itself is not: Groklaw does not have a horse in this race. Do you think that the judge is reading Groklaw and thinking, "Hmm, good point"? Or that the attorneys for either side are doing the same? Or that the jurors are, which is strictly forbidden? I seriously doubt that Groklaw's analyses are having any impact on the case.

You're also wrong that Groklaw doesn't have a competitor, at least where this case is concerned. Groklaw has been publicly at odds with Ars Technica's Joe Mullin, even (in at least one instance that I remember) poking a little fun at him for getting the outcome of this case so wrong.

And, just last year, Groklaw came quite close to voluntarily shutting down ([http://www.linux-magazine.com/Online/Blogs/Off-the-Beat- Bruc...](http://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruce- Byfield-s-Blog/Eulogy-for-Groklaw)) entirely because the SCO vs. Linux (et al) cases, which Groklaw was created to discuss, were pretty much all settled. Any suspicions of nefarious purposes on Groklaw's part would have to explain why Groklaw was so willing to just shut down at that point.

I don't disagree that it would be nice if there were more sites doing in-depth legal analyses of technical cases targeted for a layman audience. But, the demand for that is pretty small, and so is the supply: I expect that there aren't very many legal professionals that are at the top of the game at law and technology, and possess the ability and desire to publish in-depth analyses of cases where they aren't making any money.

So now the ball's in your court. Why, specifically, should we be questioning Groklaw's motives?

<comment><USER11> Hmm, I guess I can't dissuade the appearance of being a troll.

You are saying Groklaw is not influential politically or in matters of law. I agree. However, I think you are severly downplaying the influence Groklaw has on the people who read it.

My main fear is that Groklaw becomes the site that programmers go to not to find out the state of a case but to find out what opinion they should have about it.

I guess what I'm trying to say is that I'm afraid that people will say "I like company A's usage of patents/I dislike company B's usage of patents."

I'm a big proponent of patent nullification, especially in the area of algorithmic/cosmetic areas. Of course that's a vague definition, but I think most people will know what I mean. However, at this point, that is a very scary opinion to certain influential people.

Page rank is a patented aglorithmm. Intellectual Ventures is a huge known patent troll. I think bgC3, the new company of Bill Gates, is going to spearhead some very advanced patent trolling tactics (I have no evidence for this).

But right now the blogosphere is more or less just passively angry. People read what's going on in the news, argue for a bit and go have dinner. Almost no one is protesting because of patents.

It's a big deal. Over 50% of our Medicare obligated spending for the future (I think 38.6 trillion by the last count) is due to patents.

I guess I can't help being a troll when it comes to this subject, and I fucking despise the idea that Groklaw has the ear of so many programmers when they argue only in the short-term and in a reactive manner. I support what they do, but the factual tone limits them to being short-term and prevents them from making the vaguer strong claims that they should be making.

Groklaw is in the position to influence people on the most important subject of the 21st century, and I think they are doing a poor job of it as well as making whatever motives/resources might exist transparent.

<comment><USER14> Well, that's a pretty reasonable position. HN is pretty overwhelmingly opposed to software (and algorithmic) patents in general -- anything that any given professional in the field could be reasonably expected to develop on their own shouldn't be patented. This opinion of patents seems to extend beyond HN, throughout most of the programmer community. So I'm not sure that your concern that, "I like company A's usage of patents/I dislike company B's usage of patents" is valid.

Patent nullification is one of my favorite things, too, and I've heard quite a few other people argue either for that or for massive overhauls of the US PTO. But, that's all very expensive and somewhat politically suicidal, so at the moment going and having dinner seems to be about the best thing that anyone can do. That, and cheer on companies like Mojang when they choose to double down and destroy an offensive patent troll rather than settling (<https://twitter.com/notch/status/226604081932812288>).

As far as Groklaw goes ... I sympathize, but I think the organization you're looking for is the EFF. Groklaw was never really intended to be an activist organization; they just wanted to help the Linux community understand what was going on in the SCO case (and stomp them a bit publicly too). Groklaw doesn't seem to have been biased in favor of one particular company, to the extent that they cheer on that company for offensive use of patents against a competitor.

Groklaw is however providing a very valuable service in helping programmers better understand the law where it applies to patents, and I think we should appreciate that instead of criticizing them for not doing more. (Especially since nobody else does what they do as well as they do -- except maybe Grellas here on HN sometimes.)</comment></comment></comment></comment></comment></comment></comment></comment>


Social Collaboration Platform For Classrooms Edmodo Opens API - <AUTHOR> http://techcrunch.com/2012/03/06/social-collaboration-platform-for-classrooms-edmodo-opens-to-third-party-developers-with-api/

<comment><AUTHOR> If they manage to get as big as they hope for, that could get pupils to even start developing apps themselves. In any case, much better efforts than in the early 2000s, where governments experimented with computers in classes, just for the sake of using computers in classes.</comment>


Sin and Cos: The Programmer's Pals - <AUTHOR> http://www.helixsoft.nl/articles/circle/sincos.htm <comment><USER2> > For some reason I can't quite put my finger on, some experienced game > programmers are reluctant to use atan2() and prefer the dot product.

It's because atan2, along with all the other inverse trigonometric functions, is incredibly slow. On a GPU, sin and cos may be a couple of cycles, but asin/acos/atan/atan2 may be upwards of 30 or 40.

Often times, angles are best avoided when possible for this reason. Normalized vectors end up faster and simpler in many cases.

Relevant anecdote: I recently wrote some code to compute normals in 2D and thought I would be clever by encoding the normal as an angle to save space. It turned out that the atan2 call at the end was so slow that it outweighed the cost of everything else I was doing several times over. Lesson learned…

<comment><USER3> Yeah, there are multiple reasons. Perf is important: inverse trig functions are generally much slower both on the CPU and on the GPU [1]

But also - most of the time gamedev happens in 3D space not in 2D space (even if it gets rendered down to 2D). So it's more natural to do a dot product of two 3d vectors, than try to mess around with trig functions that work on scalar angles. Same with rotations: it's easier and better to use quaternions in 3D space than try to rotate along each axis separately.

[1] GPU intrinsic estimated costs: [http://www.fractalforums.com/programming/shader-function- or-...](http://www.fractalforums.com/programming/shader-function-or- instruction-cost-\(performance\)/msg84618/#msg84618)

<comment><USER4> Quaternions have a bunch of properties that make them awesome:

* Compact storage compared to matrices

* No gimbal-lock

* Multiplication is cheap (mult + add, very similar to vector operations)

* Interpolation is cheap

You really only pay the sin/cos costs when translating out to a Mat3x3 at the end.

<comment> Const-me > You really only pay the sin/cos costs when translating out to a Mat3x3 at > the end.

You don't need sin/cos for that either.

Here's a code that does that:

[https://github.com/Microsoft/DirectXMath/blob/master/Inc/Dir...](https://github.com/Microsoft/DirectXMath/blob/master/Inc/DirectXMathMatrix.inl#L1654-L1736)

<comment><USER4> You're right, I was mixing that up with the initial conversion from axis+angle to quaternion.

</comment></comment></comment></comment></comment><comment><USER5> I'm half way through writing a blog post on how transcendental functions are computed in glibc, and more importantly how to extend the methods to compute things like

      sin(x) / x
      (1 - cos(x)) / x^2

directly without incurring the numerical problems arising from the division.

One thing to understand is that the stdlib math functions are accurate to machine precision, i.e. the closest representable value to the actual answer.

For 32-bit floats, this is achievable using a 5 or 6 order polynomial approximation. However, there was one surprise I was previously unaware of.

Obtaining the correct precision becomes difficult when the result is close to zero, since any absolute error is divided by the magnitude of the result. Silly example, if

      sin(0.000001) ~= 0.1

Then the absolute error is small (~0.1), but the result is still off by four orders of magnitude.

Sometimes this is not a problem. When x is small, sin(x) can be computed by simply returning x. This rule is valid until x^3/6 > precision ~= 1e-38, or x = 4e-16. So exact precision is obtainable by simply returning x if x < 1e-16.

But now consider:

      x = pi/2; cos(x) = 0

The logical way to compute this is as

      -sin(x - pi/2)

But this creates another problem, since x - pi/2 ~= 0, a catastrophic cancellation occurs. Now recall that glibc is required to be accurate to machine precision, which goes down to 1e-38. But x is order 1 and only represents 7 digits, down to 1e-6. So glibc is forced to scour lookup tables to recover the missing digits of pi.

This makes computing cos(x > pi/4) about twice as expensive than cos(x < pi/4), but there is a certain irony since it is very unlikely x is known down to 7+ digits, so those CPU cycles are wasted. How many times have you seen x = sqrt(a _a + b_ b + c*c); ?

On my 4 year old laptop:

      time ./a.out 0.5   4.12s
      time ./a.out 1.5   7.31s

On my raspberry pi:

      time ./a.out 0.5   1m15.829s
      time ./a.out 1.5   1m47.522s

<comment><USER6> Do you have advice for which fast, good-enough approximations one can use instead in the situations where the precision is not needed?

In many use-cases we would pre-multiply the value we throw into _sin_ and _cos_ with two times Pi anyway, so couldn't one skip the circle constant altogether and a write function like _sin_one(t)_ and _cos_one(t)_ , where each call "implicitly multiplies" t by two times Pi? (perhaps, if constructed well, the function could even be _more_ precise, since it avoids the rounding errors, however small, of multiplying by the pi constant)

<comment><USER7> I don't have advice on the specific `sin(x) / x`/`cos(x) / x^2`, but the Sleef vectorization library [0,1] supports operations with varying precision. (0.506, 1.0, and 3.5 ULP)

If you're working in a case where you can afford slightly lower accuracy, the 3.5ULP method can be a very significant speedup, especially since you're vectorizing at the same time. I got dozens of times in speedup when testing just the 1.0 ULP bound when performing sin/cos on a large vector. (I don't remember the precise number and should just re-run the tests.)

To generically dispatch this library, in case there's any interest, I wrapped it in some template metaprogramming in [2], so that the widest vectorization available is selected at compile-time when selecting a given operation.

[0]: [http://sleef.org/](http://sleef.org/)

[1]: [https://github.com/shibatch/sleef](https://github.com/shibatch/sleef)

[2]: [https://github.com/dnbaker/vec](https://github.com/dnbaker/vec)

<comment><USER6> Thanks, forwarded your comment to a few colleagues who might have a use for it!

</comment></comment></comment></comment><comment><USER8> How old is this article? I ask because the examples use Allegro and DJGPP, and reference the 1991 games Micro Machines and F-Zero. And also the giveaway sentence "Floats are so slooooooooow! Why don't you use fixed-point numbers?"

I learned games programming as a teenager in that era, and I present my fixed- point 3D code from 1996, which does sin and cos through the medium of 512-entry 32-bit integer lookup tables:

[https://github.com/pjc50/ancient-3d-for- turboc](https://github.com/pjc50/ancient-3d-for-turboc)

<comment><USER9> While I'm sure the article is old, Allegro is still around. The latest release was February 25th:

[http://liballeg.org/](http://liballeg.org/)

<comment><USER10> Allegro is also the library currently being used by Factorio, although the dev team is currently porting it to a custom game engine to try and get more performance.

</comment></comment></comment><comment><USER11> Ah, the race-car example is bringing back memories!

In the early days of Macromedia Flash, I wanted to build a GTA I clone. I didn't know about trigonometric functions yet, so I had a line of height 1, width 0 that I rotated around one of its ends at a fixed angular velocity while the user pressed the left and right arrow keys.

Then I read the height and width of the rotated object and added it to the x and y coordinates of the car, respectively.

For some reason, trigonometry is treated pretty late in Swiss schools (often only during the Matura, where students are 16-20y/o). I never understood this, since understanding trig can be really useful in a lot of everyday situations.

<comment><USER12> What everyday situations can trigonometry be useful in?

<comment><USER13> You rely om the results of trigonometry in the thousands of engineered object you encounter every day. Almost anything having to do with physics will have a fair amout of trig underlying it, and a lot of calculus relys on trig. So if you want to understand a lot of what's going on, you'll need trig.

It's like asking "what everyday situations is addition useful in".

<comment><USER14> I think that's like saying one "uses" advanced physics every day because they use a cell phone. The OP question was probably asking more about what practical uses are there for normal people to actually use trig, the way you use arithmetic to calculate a tip at a restaurant.

To that I'd say: finding the height of something only knowing the length of the base and an angle. Or triangulating your position, surveying your property to make a garden, etc.

</comment></comment></comment></comment><comment><USER15> I was trying to do some calculus the other day, and ended up reading about the history of logarithms. As you may know, logarithms were valuable in the pre- mechanical era because they allowed people to reduce multiplication to addition and a couple of table lookups, which is much faster to do - a huge boon if you're doing navigational calculations on a rapidly-moving ship, or calculating vast astronomical ephemerides.

What i hadn't realised is that before logarithms were developed, people used to do it with sines and cosines, exploiting some identities from spherical geometry, and the tables they already had for navigation:

[https://en.wikipedia.org/wiki/Prosthaphaeresis](https://en.wikipedia.org/wiki/Prosthaphaeresis)

<comment><USER16> I WISH this is how we learned math in school. Knowing how stuff was used / why it was invented would have gone a very long way in making everything much more grounded and interesting.

<comment><USER17> I once got a two week survey course in the history of mathematics. I can confirm it was riveting the whole way through, seeing the evolution of the toolset laid out.

</comment></comment></comment><comment><USER18> Hey, nice to see my venerable tutorial get some renewed attention. I got a lot of positive feedback on it over the years and that's why I kept it around, even though it's a bit outdated.

I'd like to do an update or write a follow up article. What would you be interested in seeing? More examples? Different concepts? Should I port the examples to a different framework?

<comment><USER19> Different concepts: yes. Different framework: no.

</comment></comment><comment><USER20> Hmm it's been my opinion that most of the time that trigonometry is used, one should work with vectors instead. This goes doubly for inverse trig. If you have trig then inverse trig, you can almost always turn it into a geometrically meaningful vector operation and avoid the difficulty of handling the ambiguous range of inverse trig functions properly. Remember your sohcahtoa for doing this.

<comment><USER21> _"...Remember your sohcahtoa..."_

My _what_?

Oh, you mean Oscar Had A Headache Over Algebra.

I'd love to find a math cheat sheet poster with comparative mnemonics for the office wall. There are a ton of them. I imagine they vary depending on the pedigree of the teacher.

<comment><USER22> we were taught... The Cat Sat On An Orange And Howled Horribly

<comment><USER23> We were taught "Some Old Hippy Caught Another Hippy Tripping on Acid"

<comment><USER24> This seems to be the only mnemonic in this thread that matches soh-cah-toa, and it's quite memorable, so kudos to your teacher!

<comment><USER25> The one we were taught was "Silly old Hitler caused awful headaches to our allies".

<comment><USER26> "All Stations To Central" is the mnemonic I still remember as you progress around quadrants of circle:

Whenever I pass through central station in Sydney I hear my high school math teacher's voice:

Less than PI/2 "All are positive PI/2 through to PI "Sin is positive" PI through to 3/2 PI "Tan is positive" 3/2 PI through to 2PI "Cos is positive"

</comment></comment></comment></comment></comment></comment></comment><comment><USER27> The example code uses Allegro ([http://liballeg.org/](http://liballeg.org/)) which was one of my _favorite_ libraries when I was learning to make games as a teenager in the early 2000s.

I had come from a QBasic background and was trying to learn C++. QBasic was wonderful because it put everything a budding game developer could want at their fingertips—full screen graphics and text modes, drawing primitives, sprites, rudimentary sound and music using the PC speaker, etc.

In 1999 I got my first taste of C++ with MSVC++ 6.0, but soon lost interest. I had to limit myself to text-based command-line programs, or attempt to learn the Windows APIs, which seemed way over my head at that point. What I really wanted was C++ but with QBasic-like APIs.

Probably around 2002-2003 I discovered Dev-C++ and the Allegro library. It was exactly what I had been looking for and more! It reinvigorated my interest in programming and helped me learn tricky concepts like pointers and memory management. I probably wouldn't be an engineer today if it weren't for Allegro.

</comment><comment><USER28> Sin and cos were the first mathematical concepts I truly understood through programming rather than through high-school mathematics. The traditional method of teaching them through triangles feels very unintuitive.

<comment><USER29> Agreed re: triangle method. At the very least, the triangle should be explored in the context of a unit circle. Otherwise, most students struggle with negative sin / cos / tan values ("how do the quadrants work again?"), the connection to Cartesian coordinates, etc. It's a shame that we present so much of mathematics as arcane magic requiring incomprehensible mnemonics to understand - especially in trigonometry, where there are much more intuitive / visual representations of the basic ideas.

(Source: I volunteer with the Toronto Public Library to help high school students with homework, mainly math.)

<comment><USER30> What's a top alternative you've found to work aside from triangles?

<comment><USER28> For me it was associating (sin(r), cos(r)) with a _direction_ (on the unit circle), instead of with a triangle. After that, the relation with a triangle where the longest side has unit length is obvious.

<comment><USER31> Don't you mean (cos(r), sin(r))?

I guess your method works if your angle starts at north and increases clockwise.

</comment></comment></comment></comment></comment><comment><USER32> I like using trigonometric functions for other things beyond rotations.

For instance, a cropped sine ( [-pi/2,3pi/2] ), remapped to [0,1] in both axes is very handy as a smooth-step function.

Another range ( [0, pi] ) is very convincing as a screen flash.

</comment><comment><USER33> I remember my amazement watching our CS teacher in highschool expand the sine function into its Taylor series.

I just couldn't wrap my head around the idea that you could simply calculate this using basic arithmetic operations.

One thing I learned from this experience was that these functions are expensive to calculate and it's actually pretty easy to write your own, faster but less precise implementation.

<comment><USER34> CORDIC is cheap and fundamentally simpler than Taylor series since it works on the essential principal of unit circle rotations that the trigonometric functions derive from. It isn't just a close enough approximation.

</comment></comment><comment><USER35> > Floats are so slooooooooow! Why don't you use fixed-point numbers? On newer > computers, there is not much speed difference, but on older computers the > speed gain of using fixed numbers is significant.

This is now even more true than when this article was written, enough that I've been surprised lately and feel like I need to unlearn things I thought I knew about floats and transcendentals. They only cost a handful of clocks now in the worst case, with dependent instructions before and after. Depending on what else is going on, I think you can sometimes get sin & cos for the same cost as 1 add instruction; as long as you have a lot of other independent math nearby and/or memory access. Sin & cos & sqrt are crazy fast on GPUs, when using ShaderToy, for example.

<comment><USER36> Logarithm too. I had written a fractal program in python, and one optimization for adding up a lot of logarithms was to multiply several values together first, then take the log of the batch. When I converted it to a shadertoy, I found that I could strip out the crufty batching code, converting hundreds of multiplies into logarithms with no noticeable change in performance.

</comment></comment><comment><USER37> A real blast from the past, I used this reference to implement ray tracing in java. Was it fast? Not really, was it fun? Yes!

</comment><comment><USER38> I recently wrote a routine to do fast IKs[1] for a new robot arm and let me say, I am filled with profound love for atan2. It saved me from having to explicitly dealing with _so_ many corner cases.

[1][https://en.wikipedia.org/wiki/Inverse_kinematics](https://en.wikipedia.org/wiki/Inverse_kinematics)

</comment><comment><USER39> Follow-on article: [http://www.helixsoft.nl/articles/sphere/sphere.html](http://www.helixsoft.nl/articles/sphere/sphere.html)

</comment><comment><USER40> I remember the exact time and place I first understood sin, cos, tan and SOH CAH TOA after months of being confused. The guy next to be at school Shaun Marshall just explained it to me in a sentence and bam, I got it, and have been using it in various forms of programming for about 20 years since then. Thanks Shaun, wherever you are now.

<comment><USER41> can you share it with us?

<comment><USER42> Definition via the unit circle [https://youtu.be/IxNb1WG_Ido?t=1m40s](https://youtu.be/IxNb1WG_Ido?t=1m40s)

</comment></comment></comment><comment><USER43> Slightly unrelated to this: I've always wanted to play with simple demoscene graphics that make use of sine waves (think scrollers) - what would be the simplest programming language to give this a shot?

<comment><USER44> I'd also recommend processing. But if you wanted to try your hand at GLSL you could also play around with shadertoy [1], though the learning curve is likely to be much steeper. It has genuine demoscene heritage, coming from a talented demoscener named 'iq' [2].

[1] [https://www.shadertoy.com/](https://www.shadertoy.com/)

[2] [http://www.iquilezles.org/apps/index.htm](http://www.iquilezles.org/apps/index.htm)

</comment></comment><comment><USER45> The trick with sin and cos is to never use atan (or atan2).

</comment><comment><USER46> Is there a more widespread name for a circle split into 256 units than "allegro degrees"?

<comment><USER47> BAM : Binary Angular Measure

[https://en.wikipedia.org/wiki/Binary_scaling](https://en.wikipedia.org/wiki/Binary_scaling)</comment></comment>


Engineering Dropbox Transfer: Making simple even simpler - <AUTHOR> https://dropbox.tech/application/engineering-dropbox-transfer--making-simple-even-simpler <comment><USER2> Firefox Send, SendSafely, and Magic Wormhole are all end-to-end encrypted.

[https://send.firefox.com/](https://send.firefox.com/)

[https://www.sendsafely.com/](https://www.sendsafely.com/)

[https://github.com/warner/magic-wormhole](https://github.com/warner/magic- wormhole)

[https://webwormhole.io/](https://webwormhole.io/) (magic wormhole over WebRTC!)

This seems like table-stakes for a modern file transfer system. Accepting unencrypted files and storing them temporarily in the clear on your own servers seems like it only introduces tons of additional risks without much gain.

<comment><USER3> If I might ask a lazy question - do any of these work with basic (e.g easily available on a lightweight container) command line tools on the terminal? I assume not since they must all be Javascript-based.

<comment><USER4> Found this: [https://github.com/timvisee/ffsend](https://github.com/timvisee/ffsend)

<comment><USER5> Thanks for linking, dev here. Yes, perfectly usable for automation!

<comment><USER6> ffsend excellent tool. Ffsend is inspiration for me to make 'ele'

[https://github.com/prakis/helloele](https://github.com/prakis/helloele)

Ele is a command line tool works with your own cloud. Main difference from ffsend and other cmd tools is no need to share links, files are referred by file-indexes.

<comment><USER5> Sounds cool! Will check it out later today.

</comment></comment></comment></comment></comment></comment><comment><USER7> > helped us break away from preconceived notions based on what is easy and > incremental to build on top of the Dropbox stack.

In my experience, this is one of the biggest challenges for developers involved in product design, expressed succinctly there.

And to try to step out of this is why it's so important to have product owners/managers who are NOT technical staff, and who technical staff doesn't unduly influence. When you've invested your time and energy in building a hammer, you really want to figure out how to treat anything as a nail.

<comment> yjftsjthsd-h > When you've invested your time and energy in building a hammer, you really > want to figure out how to treat anything as a nail.

And to be fair, this is reasonable, right up until it isn't. When every tool costs onboarding and maintenance effort, it makes sense to leverage as few tools as possible to the greatest effect - but much as "everything should be made as simple as possible, but not simpler", you want the fewest tools that will do the job well, but sometimes that _is_ N+1, and a new tool _will_ pay for itself.

<comment><USER7> Absolutely.

But it's really hard to tell when it is and isn't reasonable, when it comes to UX.

I find that the only thing you can do is try to have peopel who aren't developers and don't even _know_ what's "easy to build incrementally on top of the existing stack" determining the appropriate UX for the customer/market/business need.

Then the developers can say "OK, but if we did it like THIS, it would be a lot cheaper to implement because we can incrementally add to what we've got", and the product manager/owner can push back "Eh, that's not going to meet the market need", "OK, but we can't afford it" \-- it's a negotiation. But in my experience you really have to have someone who isn't a developer at all standing up for the user need, for anyone who will be involved in the implementation, no matter how smart and user-centered, it's just too tempting to decide that the thing that can be met with the incremental change to existing stack is "nearly as good" no matter what, when it's _so_ much easier and more elegant under the hood.

</comment></comment></comment><comment><USER8> This is awesome! Firefox Send[0] is another very similar product in the space. Excited for more file transfer players!

\- [0] [https://send.firefox.com](https://send.firefox.com)

<comment><USER9> And Firefox Send has much higher limits too, for free. Without a Firefox Account, the user can upload up to 1GB. And with a Firefox Account, the limit is 2.5GB. Dropbox Transfer, in comparison, provides (just) 100MB in the free tier.

<comment><USER10> Yea but it doesn't seem like Firefox Send lets you right click on any file anywhere on my computer and just right click to Transfer. The uploading with Dropbox Transfer (through the desktop client) is super reliable too -- I have Time Warner internet and when it invariably craps out, my upload auto-resumes. Looks like this here: [https://www.dropbox.com/t/jJNe5IBPrezaw7aE](https://www.dropbox.com/t/jJNe5IBPrezaw7aE)

</comment></comment></comment><comment><USER11> I uninstalled Dropbox and moved my files elsewhere because there was NO WAY to disable the annoying notifications asking me to 'upgrade' my account (when my account was almost full). My whole family used Dropbox with paid accounts and I'm actively moving them elsewhere because of this.

<comment><USER12> The client is now full of all kinds of irritating nagware to enable this and that unnecessary feature, even though I'm a paying customer already. Doing so whilst ignoring the design language of the OS is a hallmark of applications arrogantly deluded of their own importance. The Dropbox client UX now puts me in mind of 90s-era RealPlayer, which surely ranks as one of the worst software products of all time.

I do not appreciate intrusive micromanagement and passive-aggressive interdepartmental memos from humans, let alone from my file sync utility, and when this occurs separately on every god-damn device and even after a time machine recovery, I find myself verbally abusing it, and the product managers that spawned it, aloud in the most vulgar language.

Not good, Dropbox.

<comment><USER13> Can you elaborate on what you mean by nagware? Are they OS notifications, "ads" in the tray or the Dropbox app?

<comment><USER14> I am a paying Dropbox user.

When I click the Dropbox icon in my system tray, 43% of the space is used on two ad units: trying to "introduce Gmail integration" and "Recent shows the latest activity." Here you go - [https://imgur.com/a/51MiWOb](https://imgur.com/a/51MiWOb)

You silently enabled some new syncing mechanism that doesn't actually download files to my computer. This was absolutely nuts and is a far more serious violation of why I used Dropbox, and it almost made me churn. I was so angry that I had to change some kind of setting on the web to sync with selective sync and have real bonafide files in my Dropbox folder again.

The ultimate nagware: Open folders in: Dropbox desktop app by default is garbage. Obviously people want to open Finder / Explorer, that is the whole value proposition of Dropbox. I don't care about your product manager's monetization schemes or introducing Paper or whatever, please just never mess with defaults because I'm not comfortable suggesting this app to my parents if it litters them with new paradigms and garbage. How do your PMs not understand how important those referrals are? How integral simplicity is to those referrals? Just because you guys don't measure them, just because there isn't a chart going up and to the right, doesn't mean it's not real.

The backups nagware. Nobody wants that. People get they have to store stuff in the dropbox folder. I do not want to confuse my parents, "Sometimes Documents is backed up, sometimes not." It's unambiguous. Again, messing with the simplicity.

The photos nagware. Nobody wants to do that. People use Photos on their iPhone, it's fine. Don't eat up storage on something they use iCloud for.

The Accessibility prompt. You don't need it. Why are you asking for Accessibility?

Permissions to access Documents, Desktop, Downloads without backup. Again you don't need that.

Nagware, adware, product managerware. I hope this is sufficient.

The lack of care here is mindboggling for a product so simple. Everyone should embrace the idea that they're much more likely to make it worse rather than better. Drew Houston should be putting that on a huge billboard behind him on his Zoom calls to 22 year olds fresh out of school, it should be your motto, it should be the first sentence out of everyone's mouth, regardless of what the numbers or metrics or surveys say.

<comment><USER15> Yep. I've been a paying Dropbox customer pretty much from the start. The quality of the current Dropbox is atrocious and I ended up with entire directories of corrupted files full of null bytes as a bonus.

I am looking to move as soon as I find something which isn't garbage.

</comment></comment></comment></comment></comment><comment><USER16> Please make Dropbox Transfer email notifications configurable. I use it a lot and I don't want to be spammed with emails.

<comment><AUTHOR> This is something we started providing recently (based on user feedback we heard, like yours). There's now a "let me know when someone downloads" checkbox when you're making a Transfer (both on Desktop & web)

<comment><USER17> Can you also support "Let me know when the download completes successfully?" I assume this is easy if the recipient is adding to their own Dropbox account, or downloading to their client using a Dropbox client, but may be slightly more tricky with a browser download.

EDIT: In the event my comment was ambiguous, I meant these notifications should be configurable by the sender. Essentially "delivery confirmation" for bits.

<comment><AUTHOR> We're definitely looking into ways to make the recipient side smoother. Stay tuned ;)

</comment></comment></comment></comment><comment><USER18> Does anyone know if there's a CLI tool to transfer files? Ideally I'd want to give it a file as an input and then have it return a shareable URL that transfers the file directly from my computer to whoever clicks the URL.

<comment><USER19> Firefox Send has a CLI: [https://github.com/timvisee/ffsend](https://github.com/timvisee/ffsend)

<comment><USER5> Thanks for sharing, dev here. It's an unofficial tool, but fully featured for sure. Supports link shortening or QR code generation as well.

<comment><USER18> Oh damn, I forgot I need to send files larger than 1GB. Still neat though, I'll check it out! Thanks

<comment><USER5> Yea, I really hope Mozilla will allow me to use FxA OAuth anytime soon to solve that issue.

</comment></comment></comment></comment></comment><comment><AUTHOR> Author here. Happy to answer questions!

<comment><USER20> Great work on this. I had to send 100GB files last year (1TB in total) and it was extremely difficult to send them as-is. Most clients that upload data choked while attempting it. Had to break the files up into smaller ones using a compression tool. It actually increased the file size overall but the transfer could then be facilitated.

Hope to see you guys add a feature like DocSend next. It's like a missing puzzle piece from a utility perspective. I have no idea who downloads a shared file once a url is generated. Would be nice to request emails and get alerts when it's downloaded.

<comment><USER21> You gotta wonder how much easier it would be to put a stamp on a letter with an SD card in it sometimes

</comment></comment></comment><comment><USER22> Related I've been wearing out webwormhole.io to send large files to coworkers.

Not a 1:1 here but very useful tool in the same space.

</comment><comment><USER23> This was a great writeup! I loved start to finish view, that didn't get bogged down in technical details.

</comment><comment><USER24> wow, that was a very exhaustively informative explanation of how to clone WeTransfer

</comment><comment><USER25> Not sure why it still stakes hours to days to upload a video from my iPhone.</comment>


Show HN: Tool to help workers get the longest possible vacations - <AUTHOR> https://stretchyourannualleave.com <comment><USER2> Nice.

At my job we just get the public holidays added to our vacation days and we can take them off on those days, if we want. I find this to work really well.

<comment><AUTHOR> Interesting! This tool can help those who don't know the exact dates they would like to stay on vacation.

<comment><USER2> Yeah I mean it's definitely a cool idea (and) implementation</comment></comment></comment>


Operating System Support for Persistent and Recoverable Computations (1996) [pdf] - vezzy-fnord http://www-systems.cs.st-andrews.ac.uk/gh/pub/gh-15.pdf <comment><AUTHOR> Interesting architecture. This structuring might fit well with clouds given that some container tricks resemble it. Adding capability controls are an improvement. The use of custom memory management per container is a smart idea also used in JX operating system. Should be used more often given how each app, servlet, etc can have considerably different memory requirements and optimizations.

I think it might also be rewarding to look into combined language and OS approaches. The reason is that there's lots of diversity in operating systems, libraries, ISA's, etc with most projects standardizing around a certain language and interface. I could see some extension that marks things as persistent while compilers for specific OS's handle the details. Would help portability.

On other end, some research should be done in hardware support. Acceleration of persistence options at the least. I particularly think a hardware/software combo will help with safety-critical embedded where the hardware constantly checkpoints key state with the OS facilitating that with structuring and directing its operation. Well, no need to speculate as that's what Tandem's NonStop did with custom MIPS processors. A little in academia, too. I just think it's worth another look as it might not add much cost to an existing, high-end SOC in embedded.

<comment> vezzy-fnord Capabilities are pretty much the only practical way to perform access control on a persistent object store design.

External pagers (custom VMM and page fault handling policy on the per-process, per-task, per-library, etc. level) have been an integral part of all microkernel architectures since Mach, likely earlier on to the Accent and TRIX kernels.

The paper actually cited a reference to an old microarchitecture with capability-based addressing called MONADS-PC. Unfortunately, it seems like the paper is nowhere to be found in public, even though it's cited quite a bit! Instead, there's a shorter and related paper called "The Micro-Architecture of a Capability-Based Computer", but it's not the same one.

<comment><AUTHOR> The reason it was only cited was because it was a conference that was published as a whole for $200 and largely out of stock. However, even a wall that big doesn't easily stop a force of nature like Nick P:

[http://messagelab.monash.edu.au/Publications/DavidAbramson](http://messagelab.monash.edu.au/Publications/DavidAbramson)

Note: Acaddmics and research groups often squirrel away copies on their own sites for self promotion and sometimes public benefit.

Summary of the group's work below along with important point that hardware wasn't good enough for software at that point:

[http://www.monads-security.org](http://www.monads-security.org)

Enjoy. :)</comment></comment></comment>


Eight years of victory - <AUTHOR> https://blog.pinboard.in/2017/07/eight_years_of_victory/ <comment><USER2> I am 1.5-month Pinboard user and I have to say I am not particularly happy with the support. I admit that for $25 / year, providing full-text search + archiving is an excellent deal, but it's also incredibly frustrating when your problems don't get solved.

Archiving didn't work for me for first 3 days, so I sent an email, no response. Followed up 2 days later, no response. Contacted on Twitter, got a response that it'll be looked into, but it wasn't solved. Contacted on Twitter again 3 days later, no response. Finally, it did start working a few days later but stopped again.

I emailed again, no response. Followed up 4 days later, no response. Contacted on Twitter, no response. Emailed on founder's email 2 days later, no response. Another contact on Twitter, no response. I did get a response when I send a DM that the lack of response was due to huge impending work.

It's completely possible that the work was indeed huge and I was growing impatient (for that, I apologise), but I wasn't expecting that the problem is solved immediately but just how and when it'll be solved, that's all.

I didn't send any messages after that and it seems issues are slowly getting fixed. There are still issues with accessing the archived links, but I feel there won't be any point in reporting them. Pinboard is an excellent service that I use every day, but I wish there was more effort to make users feel less frustrated.

<comment><USER3> FTA and in addition to venning's comment: _" In November I began traveling extensively in support of Tech Solidarity, an attempt to mobilize tech workers after the US election. All the travel meant I sometimes ignored support emails for weeks at a time."_

<comment><USER2> I do sympathise with valid reason to not be able to respond. However, I think a minimum level communication should maintained in any kind of service. In this case, I don't think I would have been unhappy even with an autoresponder, but no response feels despairing.

<comment><USER3> I agree, though I do sympathise with any fellow smallfry operator who hasn't set that up, or feels like it's impersonal so avoids it.

Reminds me of the idea that you'll often avoid an email for a while because you want to respond perfectly. For you, that email is critical. Meanwhile, in the absence of a response, the sender assumes the email is completely ignored and meaningless to the recipient.

My unread count is generally 350-500, so I'm very guilty of that.

</comment></comment></comment></comment><comment><USER4> Love everything that Pinboard is doing - both service and attitude wise. Great to have living examples of hackers doing what they love, without having to sell out to investors or a large company, all the while bringing in decent money.

All that said, I'm always surprised that Maciej racked in over $100k in revenue his first year. I was of the impression that your first 1-2 years are going to be in the red, unless you have something big to build on (existing business to promote your new one, big twitter following, etc.).

The fact that he has 10x the users now compared to the first year but only 2x the revenue is interesting. I assume that's due to moving the subscription fee to a small but ever incrementing amount to a larger, fixed one.

Any tips/prep advice for someone who has a business they want to launch but dread spending the first couple years making no money/having few users?

<comment><USER5> The 100K was the first full year of operation (2010) and 80K of that came over a two-week period in December, when Yahoo announced it was 'sunsetting' my main competitor. The period from April 2009 to December 2010 was very lean. I don't have the figures handy, but it was a few hundred bucks a month at best.

</comment></comment><comment><USER6>
      I know there are lots of rival bookmarking services out
      there to choose from.
      I will consume them all, like I consumed the pie.

I like the owner's style :)

<comment><USER7> You're in for a treat if you just learned about Maciej ([https://xkcd.com/1053/](https://xkcd.com/1053/)). I've been an admirer of his writing for a long time.

[http://www.idlewords.com/](http://www.idlewords.com/)

[https://blog.pinboard.in/](https://blog.pinboard.in/)

</comment></comment><comment><USER8> Pinboard user here.

I'm very good at archiving links, I use a chrome extension that just does it.

However I'm not so good at the recall side of things. This isn't pinboard's fault, it's just my habits. Right now I just throw links into a box with a few tags and then forget about it.

Maybe one day it will come in useful and I'm glad it's there.

<comment><USER9> I have the same issue. I usually just head to Google when I need to find something again...

</comment></comment><comment><USER10> > The big story this year was last month's surprise acquisition of Pinboard's > long-time nemesis Delicious. This illustrates the importance of always > having a backup nemesis.

I love Maciej's writing.

</comment><comment><USER11> Kudos to Pinboard. How he pulls it off with the almost non-existing support and without a(n official) mobile app is interesting, too.

Other apps have Intercom or some other support app telling you that you're special and promising you a reply in a few hours. Meanwhile Maciej doesn't reply to your emails or tweets.

And yet, growth.

Perhaps neglect is the secret sauce!

<comment><USER12> Perhaps chance is the secret sauce.

<comment><USER13> Perhaps being awesome, fully human and sincere with your users, and standing behind your service while providing an amazing narrative around your product is a part of the secret sauce.

</comment></comment></comment><comment><USER14> Nice job, Pinboard is great!

One question, how come the number of users has increased 10x, but revenue only ~2x. Has the pricing model changed over time?

<comment><USER15> Two years ago they changed pricing from a 1-time fee, to a recurring fee. So the majority of users are not a recurring revenue.

</comment></comment><comment><USER16> Anyone else subscribe to Pinboard primarily to support Maciej's writing/organizing?

It's like the fair trade coffee of online bookmarking services.

</comment><comment><USER17> Just wanted to say: You're an inspiration, Maciej

<comment><USER5> Thank you; that is very friendly!

</comment></comment><comment><USER18> The best 6 dollars I ever spent...

</comment><comment><USER19> what a terrible website, i'm still amazed how people can make money with such poor UX, i have to zoom the page at 175% to be able to read whats written there

<comment><USER18> Such poor UX? Are you joking right? Pinboard UX is awesome and fast: just straight to the point. Font size is about 13pt: standard; just like HN.

<comment><USER20> It's actually 13px, which is much smaller than 13pt. 16px (which is slightly smaller than 13pt) is pretty much the standard minimum.

Pinboard is great, but the UX could _definitely_ do with some attention. It annoys me to the extent that one of my pet projects is a better front-end, using its API. As one small example, it's incredibly frustrating that I have to view page source to extract metadata (e.g. title + description) when adding a new URL, rather than pinboard just doing this for me.

<comment><USER21> _As one small example, it 's incredibly frustrating that I have to view page source to extract metadata (e.g. title + description) when adding a new URL, rather than pinboard just doing this for me._

I think my bookmark extension extracts at least the title for me.

IIRC one bookmark extension I used used to add whatever text I had highlighted before bookmarking as the description.</comment></comment></comment></comment>


Breaking the Reddit code - <AUTHOR> http://blog.jgc.org/2010/12/breaking-reddit-code.html <comment><USER2> Next challenge for the OP: [http://en.wikipedia.org/wiki/Taman_Shud_Case#The_Rubaiyat_of...](http://en.wikipedia.org/wiki/Taman_Shud_Case#The_Rubaiyat_of_Omar_Khayyam)

(People might be interested in reading that whole page - it's quite a curious case.)

<comment><USER3> I enjoyed it, thanks!

</comment></comment><comment><USER4> Impressive!

Just as exciting as someone posting a code is seeing a follow-up of someone's examination.

Thanks for sharing the analysis.

</comment><comment><USER5> This reminds me of the Toughest Developer Puzzle Ever:

<http://www.toughestdeveloperpuzzleever.com/begin/>

</comment><comment><USER6> So the "popular I love anal" was just an accidental discovery having no relation with the actual encryption method.

</comment><comment><USER7> This is pretty cool, thanks for sharing the analysis.</comment>


Offer HN: UI Design for Hackers - <AUTHOR>

Hey, Im currently available to work with hackers and help them with their app's UI design.
If you need help, simply drop me a line.
Contact info and portfolio at my profile. <comment><USER2> I'm working on a few apps. <http://www.jobbrew.com> is one, basically bookmarking(or lead mgmt) for freelancers.

Another one i'm also testing is an indie game marketplace.

PS: liked <http://www.kiveve.com/></comment>


The smartphone patent wars - <AUTHOR> http://www.ft.com/cms/s/2/de24f970-f8d0-11e0-a5f7-00144feab49a.html#axzz1bCvvUVbE

<comment><USER2> I'm somewhat irked by the fact that this interactive graphic's style seems to plagarize this mobile lawsuit inforgraphic.

[http://www.vodeblog.com/wp-content/uploads/2010/10/mobile- la...](http://www.vodeblog.com/wp-content/uploads/2010/10/mobile- lawsuit_thumb.jpg)</comment>


An Engineer's Guide to Silicon Valley Startups - <AUTHOR> http://books.piaw.net/guide/index.html

<comment><USER2> Hi. Thanks for posting this. I'm the author of the book. I would like to note that this is not a book for founders. It's a book for employees.

<comment><USER2> In case anybody's been waiting for the paperback edition of the book, it's now available.</comment></comment>