What happens when your startup gets debunked by science? - <AUTHOR> http://www.fastcompany.com/3008066/tech-forecast/what-happens-when-your-startup-gets-debunked-science <comment><USER2> Most consumer "health" products (running shoes come glaringly to mind) are not backed by science.

They may need to adjust their marketing to not run afoul of the FTC, but I'm sure a slight pivot will suffice. They will live or die by how well they satisfy a (psychological) consumer need, not whether the product "works." Do any of the exercise products advertised at 3am ... "work"? It doesn't matter.

[Note: this comment is intended as an unsnarky statement of fact.]

<comment><USER3> Depends on your customer. Many of these consumer health companies are also at least at heart gunning for reimbursement and payor customers. You're going to need to do more than a slight pivot to keep on sight with that strategy.

</comment></comment><comment><USER4> The Atkins diet (and almost every other diet I can think of) has been debunked, un-debunked, debated, berated, and praised almost from its inception half a century ago. It has not stopped the companies that promote the diet, produce the food, and publish the cookbooks, from making money hand over fist.

With any physiological system of sufficient complexity, whether it be human digestive/metabolic systems or the neurological systems responsible for memory and intelligence, there will be opportunities for profit as long as improvement of that system is desirable and a small fraction of the population believes they have the chance to improve it and the cost is reasonable. Plus, there will likely always be "success stories" to cite simply due to the placebo effect.

We have a massive alternative "medicine" industry that supports not only the people in it, but also, ironically, the people producing the constant flow of content criticizing alternative medicine. Lumosity will be fine.

</comment><comment><USER5> Homeopathy. Next question.

People are remarkably good at ignoring things they don't like to believe. Other people are good at exploiting those people.

<comment><USER6> But, but, you cure cancer with sugar pills!

<comment><USER7> Tim Cook would need another job if that worked.

</comment></comment></comment><comment><USER8> When I first saw the title of the article, I thought about Lumosity. And it is about Lumosity!!! When I first saw its ads on youtube, I was like "Are you joking?... Pseudo-science trying to rip money off ignorant people?" The problem with Lumosity is that their claims are outrageous and exaggerated..

</comment><comment><USER9> Anyone who's read Ben Goldacre's _Bad Science_ book will realise that you can sell anything and the science of whether it works or not is irrelevant.

See, for a particularly bad example, "Brain Gym". This is a set of nonsense exercises that children are forced to do to increase mental alertness. It has some bizarre statements ('processed food does not contain water'; breathing through the nose gets oxygen to the brain faster, etc).

This nonsense is depressingly common in UK schools.

</comment><comment><USER10> Unfortunately the all-too-brief article doesn't really answer this question (unless the answer is the usual "Deny everything and carry on".)

<comment><USER11> > Unfortunately the all-too-brief article doesn't really answer this question > ...

I think that was intentional, and that the answer is either "no one knows" or "caveat emptor". Or both.

</comment></comment><comment><USER12> I hope this means NPR will stop pimping this garbage during their pledge drives (a $450 value) and lending what little credibility they have left to junk science. It is genuinely something that puts me off pledging... It just reminds me of their general decline in standards and terrible science reportage... And funnily enough since I stopped pledging I stopped listening pretty much, just catch it occasionally at the parents, but i digress.

I suppose the broader point I'm trying to make is they won't have to change as it is hardly like there's any scientifically literate mainstream media to hold them to account, and they've bought off the public media alternative.

<comment><USER13> They definitely have gone down in quality from 1998 to now. What caused this? Trying to be more commercial?

<comment><USER11> > They definitely have gone down in quality from 1998 to now. What caused > this?

A gradual decline in public interest in public television and radio. That, in turn, has been caused by the increasing diversity of offerings on cable and satellite TV and radio, compared to 30 years ago. There was a time when the only way to see anything resembling scientific or educational programming was to tune into public TV or radio. Not any more -- there are dozens of channels offering this kind of content now, of widely varying quality, but certainly competing with public TV.

As the number of advertisements and pledge drives on public TV has increased, the public has begun to see public TV as just another commercial-supported TV offering, nothing special. And guess what? They're right -- there's no difference.

<comment><USER14> "A gradual decline in public interest in public television and radio"

Don't forget the conservatives in management who want to "diversity" the programming and defunding due to the "socialist" content.

<comment><USER11> > Don't forget the conservatives in management who want to "diversity" the > programming and defunding due to the "socialist" content.

Yes, very true. Management reacts to a conservative social trend by avoiding content that might be looked on as too liberal, this offends liberals, which causes a further drop in audience numbers, and a death spiral begins.

This speaks to a general rule in television programming -- everybody want to have the "least offensive program". The least offensive program is the program that is so bland that it gets the largest audience simply because it offended the smallest number of viewers.

</comment></comment></comment></comment></comment><comment><USER15> While it may not make your mind better, you can get positive results with problem solving - - like doing a crossword each day.

</comment><comment><USER3> Why don't these companies have a scientific strategy running alongside your product/customer/marketing/financial strategies? From a company making bold claims like this I want to see a continual string of increasingly sophisticated trials, each one giving increasingly robust indications of success. Luminosity should be fighting alongside those meta-analyses and investors should be demanding proof points in terms of p-values. Fail (scientifically) fast.

<comment><USER16> The companies _do_ have scientific strategies; Posit Science, for example, has a bunch of associated studies. They're an integral part of the marketing.

> Luminosity should be fighting alongside those meta-analyses and investors > should be demanding proof points in terms of p-values.

How many $$$ is a p-value or meta-analysis worth?

> Fail (scientifically) fast.

That doesn't sound very profitable. How does that put more $$$ into the founders' pockets?

<comment><USER17> Thanks gwern - I work at Posit Science, and that's been our approach since our beginning. When we got started, we ran an initial randomized controlled trial[1] which showed our cognitive training program improved memory, then ran a larger study[2], and then ran the largest study that had ever been done with commercially available brain training program[3]. Other research groups have gone on to show benefits in chemobrain[4], HIV associated neurocognitive impairment[5], and schizophrenia[6].

Different cognitive training programs are different - just like different anti-cancer molecules are different. Some are going to work, and some aren't.

[1] <http://www.ncbi.nlm.nih.gov/pubmed/17046669> [2] <http://www.ncbi.nlm.nih.gov/pubmed/16888038> [3] <http://www.ncbi.nlm.nih.gov/pubmed/19220558> [4] <http://www.ncbi.nlm.nih.gov/pubmed/22918524> [5] <http://www.ncbi.nlm.nih.gov/pubmed/22579081> [6] <http://www.ncbi.nlm.nih.gov/pubmed/19448187>

<comment><USER11> > I work at Posit Science, and that's been our approach since our beginning. > When we got started, we ran an initial randomized controlled trial[1] which > showed our cognitive training program improved memory, then ran a larger > study[2], and then ran the largest study that had ever been done with > commercially available brain training program[3].

Problems obvious to a scientist:

1\. Poor controls. Both the experimental subjects and the researchers know, or can easily establish, which are experimental subjects and which are controls. A built-in bias.

2\. The study was conducted by the company that stood to benefit from a positive result. An obvious procedural flaw.

3\. Inadequate precautions against counting a placebo effect (an imaginary benefit) or Hawthorne effect (any attention paid to the subjects improves their state) as a meaningful outcomes correlated with the specific treatment rather then any treatment.

But I am sure you already know this -- it presents the usual litany of legitimate objections to this kind of study.

> Different cognitive training programs are different - just like different > anti-cancer molecules are different. Some are going to work, and some > aren't.

That's true but irrelevant. The only meaningful question is which methods work _in principle_. There are no methods that consistently work, and no one can _explain_ the outcomes, only _describe_ them. Which means it's not science.

<comment><USER17> You're right - those are the usual litany of legitimate objections to this kind of study - and they are good ones. So we addressed them:

1\. The trials are blinded, with more advanced studies using active controls (e.g., ordinary computer games[6], adult education[1,2,3]). Study staff administering cognitive assessments are always blind, and participants are blind in studies with active controls. The human consent forms describe the studies as comparing two forms of cognitive training. This is a good blind - in one study the wife of a control participant called my to tell me her husband loved the cognitive training because the art history education made him go to the museum more with her :-)

2\. Study [3] in my post was conducted by Mayo and USC (and funded by Posit - the money has to come from somewhere), studies [4],[5],[6] were conducted entirely by independent academic investigators.

3\. Active control groups control for the placebo/Hawthorne effect.

As I see it, the only meaningful question is which methods work in practice - and the studies show us that. If what you mean is do we know what the mechanism of action is, we are speeding up information processing flow through the brain and making it more efficient - speaking loosely, we're improving signal/noise ratios. Reference [1] in my post has an extensive conceptual background to this approach. And we've seen that with studies of EEG/working memory [7]

[7] <http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2904363/>

<comment><USER16> > You're right - those are the usual litany of legitimate objections to this > kind of study - and they are good ones. So we addressed them:

But you guys were apparently unable to address Robert's questions: [http://blog.sethroberts.net/2013/03/09/a-few-answers-from- po...](http://blog.sethroberts.net/2013/03/09/a-few-answers-from-posit- science/)

<comment><USER17> Seth Roberts sent me a list of questions and I answered all of them. He then selectively quoted my answers. It's his blog, and there's nothing I can do about it.

</comment></comment></comment></comment></comment></comment></comment><comment><USER18> I wonder, who is this science?

<comment><USER14> The whole of objective reality.

<comment><USER14> Well, that is what "science" is. The measure and best possible understanding of the reality in which all beings live in.

</comment></comment></comment><comment><USER19> The irony in this case is that 'brain science' itself is mostly pseudo science.

<comment><USER14> Pop applications of it aren't neurobiology, sure.

</comment></comment><comment><USER20> The font on the mobile site on Android is shockingly fuzzy and hard to read. Anyone else seeing that?</comment>


Watermark.js - Create Image Watermarks With HTMLCanvas And JavaScript - <AUTHOR> http://functionn.blogspot.com/2012/03/watermarkjs-create-image-watermarks.html#.T2isd_7JTjM.hackernews <comment><AUTHOR> Direct Link If You Prefer: <http://www.patrick-wied.at/static/watermarkjs/></comment>


Complex Step Differentiation - <AUTHOR> http://blogs.mathworks.com/cleve/2013/10/14/complex-step-differentiation/ <comment><USER2> This is very similar to dual numbers [1] which I find even easier to reason about.

There is an implementation of dual numbers in Julia [2] that is quite fun to play around with. The Optim.jl package [3] uses this to get better derivatives than finite differencing.

[1] [http://en.wikipedia.org/wiki/Dual_number](http://en.wikipedia.org/wiki/Dual_number)

[2] [https://github.com/JuliaDiff/DualNumbers.jl](https://github.com/JuliaDiff/DualNumbers.jl)

[3] [https://github.com/JuliaOpt/Optim.jl](https://github.com/JuliaOpt/Optim.jl)

<comment><USER3> Complex step differentiation is a hack for environments that have built in complex numbers, but that don't allow additional numeric types to be implemented easily. But it's a pretty clever hack.

<comment><USER2> Ah that makes a lot of sense!

</comment></comment></comment><comment><USER4> This general case of this method is sometimes called Lagrangian interpolation. As the article describes, there is one caveat with using these formulas: you can only decrease the step size so much before it backfires.

Because you are dividing by _h_ , to decrease it from, say 1e-6, to 1e-8 introduces more error into the result than it removes. (Floating-point division with a numerator and denominator that have a big difference in magnitude is a problem.)

The example problem in the article just happened to be well conditioned because the sine and cosine, and their derivatives, are bound on [-1, 1], but most problems won't be and the complex step method won't help much then either.

To get better accuracy, rather than decrease the step size, you should use a higher-order formula. The three and five-point formulas are common. The _Handbook of Mathematical Functions_ (Abramowitz & Stegun) has a table of coefficients for differentiation formulas up to the sixth order (Table 25.2): [http://imgur.com/eRl8w8h](http://imgur.com/eRl8w8h)

For fun, derive the 8-point formulas.

<comment><USER3> Not so. Roundoff errors happen because when you add a big number and a small number in finite precision, the result loses information that was in the small number. The magic of complex step differentiation is keeping the small part (the imaginary part) separate from the (potentially) large part (the value of the function evaluated at a real argument).

You can use a very small step size (and so get very high accuracy) with traditional finite difference differentiation at x=0 for functions with f(0) = 0. Complex step differentiation takes advantage of the fact that real valued functions of a real argument have 0 imaginary part everywhere on the real line.

> most problems won't be [well conditioned] and the complex step method won't > help much then either

Try coming up with an example of this. You might be able to find one if there is a pole or branch cut very near the real line, but otherwise, complex step differentiation is very robust.

</comment></comment><comment><USER5> Under what circumstances does one choose an approximate solution over the exact solution especially given that both ways are of more or less the same complexity besides that you have to symbolically calculate the derivative once for the exact solution?

<comment><USER3> One nice thing about this technique is that its time complexity is essentially the same as evaluating the original function. This property is shared by dual number differentiation mentioned by iadunning above.

Try symbolically differentiating deeply nested functions, and you will see that you end up with n^2 terms, where n is the depth of the nesting. E.g. Try differentiating n = 10 for (i=0; i<n; i++) x = sin(x)

Then notice that evaluating this function with a complex argument is only O(n), not O(n^2).</comment></comment>


Falsehoods Programmers Believe About Time (2012) - <AUTHOR> http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time <comment><USER4> I got two I noticed over the years:

* Didn't think about time at all.

In most cases most don't think about time until it becomes a problem. It often ends up with a system which behaves in surprising ways, and is the equivalent to the developer believing any of those things in the article. But there is a difference in them believing those falsehoods, and simply not being a aware of them at all.

* Time moves forward

This is probably the biggest gotcha of all. Just imagine how many times int the past you did dt = now() - t0, then did something with dt like sleep(dt). Well time will move backwards sometimes and dt is negative. I bet this will make most people here worried and they'll think about code they wrote like that (sure did). I have seen systems freeze for example because they end up sleeping for a huge amount of time (negative number was cast to an unsigned huge number).

A small advice on how to improve errors related to time is to abstract it away from algorithms and code as much as possible. Instead of always calling gettimeofday() / time() / now() function to get the current time, in a piece of lower level code, try to pass it in as an argument. That will make code testable.

I have seen fun failing test cases. Something like encoding the current time the test was written and a dt to current time. The test was working for years then started failing eventually because of the hard coded time.

<comment><USER5> >Instead of always calling gettimeofday() / time() / now() function to get the current time, in a piece of lower level code, try to pass it in as an argument.

Any code that uses time based scheduling should use a virtual implementation of time/scheduler to allow testing - this way you can say "sleep 10 hours" and then "move virtual time by 10 hours" and actually verify that the timeout is hit without the tests actually taking 10 hours. It also lets you test out logical edge cases such as `<=`, `>=` vs `<`, `>` which is surprisingly tricky with timeouts.

<comment><USER6> Great idea! But how does one make a virtual implementation of time/scheduler?

<comment><USER7> Every function which returns the current time, should be dependency injected with a 'currentTimeService'. This service, during tests, is injected with your mock implementation, and during production with a simple call to 'new DateTime()' or sth like that.

<comment><USER8> I 100% agree.

I've pitched this before (during a code review for something) and was laughed at by the team under some guise of YAGNI / developer gold plating. They honestly thought I was joking. Once I explained the issues mentioned in the article, they still thought it was a waste of time.

It takes just a few seconds to implement and makes the code so much easier to test / maintain.

<comment><USER7> Tell them we're currently replaying test scenario's involving thousands of truck routes per day (and around a thousand trucks). This allows us to easily recreate bugs and see the effects of fixes, new algorithms, etc. etc. Couldn't do it with some DI on the whole system and simulated time.

</comment></comment></comment></comment></comment></comment><comment><USER9> Leap seconds are a big enough problem that stock markets shut down for them.[1] Google starts advancing their clocks hours in advance of a leap second. Power companies take about four hours to catch up after one. (Every 1800 RPM generator has to make 30 extra turns.) Very few systems properly handle a 61-second minute. Unix timestamps are fundamentally incompatible with leap seconds.

[1] [http://money.cnn.com/2015/06/29/technology/leap- second/](http://money.cnn.com/2015/06/29/technology/leap-second/)

<comment><USER10> "Every 1800 RPM generator has to make 30 extra turns."

I'm having trouble wrapping my my head around this one. If the goal is maintaining a steady output, shouldn't they keep revolving at the same rate, without worrying about what day the "current" second (no pun intended) belongs to? After all, I'm assuming they don't "catch up" after leap days, they just run for an extra day at the same output level. Why would leap seconds be different?

Put another way, what do they need to spread those extra 30 turns over a 4 hour catch up period? Weren't they given an extra second in which to take care of them?

<comment><USER11> A lot of systems use the 60hz (or 50hz depending on location) signal from AC power as a way of keeping time. It's used enough that power companies will actually adjust the frequency minutely at night in order to make up for any mistakes made during the day. (Which in turn makes it so reliable that more systems use it to track time, and so on...)

I guess grandparent post is saying power companies go ahead and feed in extra cycles for the leap second. It's not something I'd heard of, but it wouldn't surprise me.

<comment><USER12> Hmmm? In the UK I'm sure the frequency changes with load on the grid and is actually a way of measuring grid load.

<comment><USER13> Indeed, and they have to remain within +-1%. They have a realtime graph:

[http://www2.nationalgrid.com/uk/Industry- information/electri...](http://www2.nationalgrid.com/uk/Industry- information/electricity-transmission-operational-data/)

Before quartz clocks were around, synchronous mains clocks were common, and accurate.

</comment></comment></comment></comment></comment><comment><USER14> Falsehood non-physicists believe about time: simultaneity.

[https://www.youtube.com/watch?v=wteiuxyqtoM](https://www.youtube.com/watch?v=wteiuxyqtoM)

</comment><comment><USER15> This is a very interesting video by Computerphile on this subject: [https://www.youtube.com/watch?v=-5wpm- gesOY](https://www.youtube.com/watch?v=-5wpm-gesOY)

</comment><comment><USER16> My experience is that for most applications, programmers really only need to understand 3 types:

1\. An instant in time - often represented as an integer number of milliseconds since January 1, 1970.

2\. A date in the Gregorian calendar. This could also be an integer offset from a particular day, but it's better to encapsulate it in a class that allows you to add days or months, get the number of days between two dates, etc.

3\. A timezone which is necessary to convert between the two types mentioned above.

Java has default classes to represent Types 1 and 3, but is missing a simple class for Type 2. So I designed one myself: [http://calendardate.sourceforge.net](http://calendardate.sourceforge.net)

<comment><USER7> I think the following ingredients are minimally necessary for normal day-to- day stuff:

1\. For events in the past, a timestamp

2\. For events in the future, a date/time pair with precision at least milliseconds and a timezone.

3\. An ISO 8601 serialization/deserialization method

4\. A duration type, which denotes a number of 'hours/minutes/seconds/days/weeks'.

5\. A partial representation of date, to denote repeating events or events which last a whole day. The partial representation should optionally include a timezone. This allows me to say: '5th of May', or '22nd of November 1980, in CEST'.

For calculations of dates and times, it is very useful to have a notion of time intervals, durations of time and weekdays.

<comment><USER16> > For events in the future, a date/time pair with precision at least > milliseconds and a timezone.

Hmmm...Can you give an example where that would be used? I'm thinking of a user who wants to be woken up at 7am even if they change their timezone. But that wouldn't require millisecond precision.

> A duration type, which denotes a number of > 'hours/minutes/seconds/days/weeks'.. For calculations of dates and times, it > is very useful to have a notion of time intervals, durations of time and > weekdays.

Couldn't you do that with the first two types I mentioned? With two instances of Type 1 it's trivial to count the number of milliseconds between them. With two instances of Type 2 you can have d1.daysUntil(d2) or dq.monthsUntil(d2) etc.

> This allows me to say: '5th of May'...

Is that common enough and complicated enough to warrant an extra type? When I write code to process credit card payments, I just record the card expiry as two integers: expMonth and expYear. When I want to check if the card is expired I just create a Type 2 instance representing the last day of the month. Seems to me I could do something similar for 'repeat on 5 May'.

<comment><USER17> For the first example, a skype meeting with participants on both sides of the equator, or even just in countries where one has ended daylight savings time and the other hasn't yet.

That may seem like a special case, but it is relatively common, it might also matter for normal business meetings in a foreign country - UK time is an hour behind France, so if you are a UK business man trying to have a meeting in Paris, you need to take time zones into account.

It is never trivial to calculate the duration between two times, because you may have to take into account leap years, leap seconds, months that does not have the same number of days, etc, not to mention if they are in two different timezones. That doesn't mean it isn't possible, but it is not trivial.

What is the last day of the month? That depends on the month, and if that is February it also depends on the current year. If you need to process credit cards, you might need to know the last banking day of the month, which could be quite early during e.g easter. BTW to know when easter falls, your dating system needs to know about the lunar calendar.

This doesn't even begin to touch what happens in countries that celebrate Ramadahn.

<comment><USER16> Those are some interesting situations, but I think they can still be handled using the 3 types I mentioned.

A Skype call is actually a good example of when _not_ to use a data type which encapsulates 'time zone plus instance in time'. That's because there is not one but multiple time zones associated with a single instance in time - <USER2> Skype caller will have his or her own time zone. The time of the call should be treated as a pure 'instance in time' without reference to any particular time zone. When it comes to displaying the time to a particular user, you would have formatting code which takes (a) the user's time zone; (b) the user's language; (c) a format pattern; and (d) the instance in time; and returns (e) a string representation of the time for that user.

If the computer's clock is based UTC it _is_ trivial to find the duration between two 'instants in time': it's just t2 - t1. An instant in time (what I called Type 1) is independent of any calendar system so months, leap years, time zones, etc. don't matter when calculating the duration between two Type 1 values.

However, in practice most system clocks are not based on UTC but rather Unix Time [1]. Due to leap seconds, such clocks do not always 'tick' in a monotonic way. So I accept that it is usually not trivial to accurately find the duration between two times. But the solution is not to burden the programmer with an extra type - instead, just add a method to the existing 'instant in time' class like this: t1.millisecsUntil(t2).

To find the days in any given month, a 'date in the Gregorian calendar' class (what I call Type 2) can handle that easily - just call the daysInMonth() method. Again, no need to create new type.

Easter, Islamic dates, Buddhist dates, banking days, etc. are all based on Type 2 - ie. an abstract concept of a 'day' without reference to any time zone or any particular instant in time.

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

<comment><USER7> The Skype call is always in reference to a certain perspective of 'time-of- day'. So, you'd say: I will call you at 13.00 CET, which is 14:00 GMT at my place. When we move it to the next day, it will be in reference to CET and DTS will be taken into account in CET, not in GMT. As long as humans see time as a location dependent aspect, it makes sense to inform them of the reference that has been used (being the timezone). Another way to say this is that the Skype call, or the appointment, will be scheduled at a time and timezone of someone's perspective. The other participants need to see the appointment in reference of that.

The duration in milliseconds is (almost always) easy to find. However, you often want to find the duration in months, weeks, days, etc. etc. This again requires a reference timezone and calendar system.

Your 'type 2' day is actually very difficult to define. For example, when I talk about the 12th of October 2016, I will see it as a time-interval in central European time. Your time-interval might be different. By the way, you can only handle the daysInMonth case. Other examples would fail: weeksInMonth, weeksInYear, hoursOfMonth, etc. etc.

</comment></comment></comment></comment></comment></comment><comment><USER18> My favorite time-related false beliefs are about time zones:

1\. 1AM happens 24 times a day

2\. Ok, so 1A is screwed up because of DST. Noon happens 24 times a day.

3\. The maximum distance between time zones is 24 hrs

4\. Time zones are in 1hr increments

5\. In half hour increments?

6\. UTC offset is a good thing to store in someone's profile

7\. People live in a fixed number of UTC offsets

<comment><USER19> Add to it:

Time zones change linearly from east to west and west to east

For each physical location there is exactly one time zone

<comment><USER20> > For each physical location there is exactly one time zone

Care to elaborate?

<comment><USER21> I don't know of any parcels of land that are simultaneously in more than one zone, but I do know that (until recently?) Indiana used to change time zones from Eastern to Central instead of using DST.

<comment><USER20> I knew that.

What I understood was same geographical location with several time-zones at an instant in time.

Modulo border disputes I don't know of any such thing.

<comment><USER19> There are several places on earth that have an official and unofficial time zone, chiefly on time zone borders - some places in Indiana, for example, and the far western part of China where the time zone varies from solar time very significantly.

In those places, if you ask a user where they are, and then show them a time zone based on that, it may not reflect what they think.

</comment></comment></comment></comment></comment></comment><comment><USER22> That the clock always moves forward.

As one example, some clocks are cpu specific (rather than system specific). When a thread gets scheduled to a different cpu, it might be talking to a different clock, and getting a backwards time.

The user might also be changing the clock while the program is running, of course.

If the forward direction of time is important, make sure the the source of time is a monotonic clock API.

<comment><USER23> All I can add is a warning about running NTP if you are maintaining a priority queue of time-stamped actions (now + delta, where delta depends on the action): use CLOCK_MONOTONIC instead of wall time.

</comment></comment><comment><USER24> One recently that bugs me to no end, is someone at the company I work for created an API that takes a date parameter in YYYY/DD/MM format... wtf?!? YYYY-MM-DD is fine, when year is first, the month should _always_ be next... that's universal at this point. mm/dd vs dd/mm is a problem, but it's always ymd when year is first. _sigh_

The issues with timezones, and offset calculations can be problematic too... fortunately most environments and language platforms have systems in place to at least convert to/from local to utc, while that doesn't resolve for time drift, or mis-set times, it does handle a lot of issues to _always_ use utc, or use date/time + location if not using utc...

Another hard one is leap minutes/seconds, daylight savings time changes, etc.

<comment><USER25> In US a lot of paper forms use yy-mm-dd. America has crazy units and standards.

<comment><USER24> US is MM/DD/YYYY for most paper forms... whenever year is first, it's always year-month-day, period.

</comment></comment></comment><comment><USER26> Time education in practice:

The linux kernel boots 5 minutes before the end of time, so that anyone whose code would break when jiffies wraparound will see that breakage soon after boot. That's a great, great feature.

<comment><USER27> Out of curiosity, what does the kernel consider 'the end of time'? Int 64 maximum?

<comment><USER26> uint32.

</comment></comment></comment><comment><USER28> I discovered this one, recently:

> _Excel stores dates as sequential serial numbers so that they can be used in > calculations. By default, January 1, 1900 is serial number 1, and January 1, > 2008 is serial number 39448 because it is 39,447 days after January 1, > 1900._

That's from the Microsoft's documentation of Excel[1]. Note this part: "because [Jan 1, 2008] is 39,447 days after January 1, 1900"

      In [3]: (datetime.datetime(2008, 1, 1) - datetime.datetime(1900, 1, 1)).days
      Out[3]: 39446

Off by one, Microsoft. And yes, Excel does the same thing — i.e., the docs match the product.

If you're wondering why, it's b/c Excel incorrectly thinks that 1900 is a leap year. (Also, this is why a lot of Window's clocks track time since 190 _1_ , as it makes leap year calculations simpler… for now.)

[1]: [https://support.office.com/en-us/article/DATEVALUE- function-...](https://support.office.com/en-us/article/DATEVALUE-function- df8b07d4-7761-4a93-bc33-b7471bbff252)

<comment><USER29> I recall reading somewhere on Joel on Software that I can't find at the moment that Microsoft did this deliberately to duplicate a bug in Lotus 1-2-3, because they needed perfect compatibility with formulas and dates with 1-2-3 to get people to switch over. And Lotus 1-2-3 reportedly had this bug because, at the time it was written, the code to account for that case correctly legitimately took up too much space and was dropped, with Lotus figuring that not too many people would notice. And of course, Microsoft can't change it now, or else they'll potentially break a ton of people's spreadsheets that already work around it.

</comment></comment><comment><USER30> I had some fun ones a couple of years ago on this theme:

* Every week has a weekend

* Weekends are always Saturday and Sunday

* Weekend days never change within a locale

* Weekend days are always on consecutive days

<comment><USER31> Are you talking about historical dates and calendars, or maybe different cultural calendars? Could you provide some examples? In the US today I don't think these four falsehoods are ever false.

<comment><USER32> I imagine the concept of weekends, as related to most computing, has to do with a work schedule.

Back when I used to work the night shift on non-standard days, doing any kind of scheduling with an electronic device was a real pain. Even today many scheduling tools don't cope well with overnight meetings.

</comment></comment></comment><comment><USER33> Let me just throw Easter in there, since nobody else has..

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

[http://aa.usno.navy.mil/faq/docs/easter.php](http://aa.usno.navy.mil/faq/docs/easter.php)

</comment><comment><USER34> One thing I've had to explain to many programmers, at several different jobs:

* A timestamp is not a date.

Many people believe a timestamp is a "more detailed date". In reality, every timestamp is in (at least) two different dates, depending on what timezone you look at it in.

The terrible java.util.Date is probably one reason.

</comment><comment><USER35> I have two suggestions, one useful and one less useful:

1) Given two events that happened in two different locations, one happened before the other or they happened at the same time [1]

2) All the devices comprising your system will agree on what offset each timezone is (alternatively: will have the same version of the tzdb)

Number 2 is not a theoretical problem: if you have users in a country where the timezone can change at short notice (e.g. Turkey), how do you handle the fact that across all the different Android versions their phones will have different opinions on what the time is and what timezone they are in?

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

<comment><USER36> (1) is not a theoretical problem in distributed systems. I work on a system that involves malicious actors such that allowing subtle timing problems can cause very real revenue impact, and defining consistency in a way that converges quickly with only what amounts to a vector-clock definition of time is tons of fun.

<comment><USER35> I was deliberately careful with the wording - yes, in distributed systems, we may be unable to determine which event came first. But one of them did happen first in reality, we just can't tell which. However, in some cases (see the Wikipedia link) it's not even true that one of them did happen first - <USER3> depends on where you observe them from and there is no definitive answer! Relativity is weird.

</comment></comment></comment><comment><USER37> A case like this, which has a wide variety of exceptions that need to be updated as timezones change (yes, they do) is a perfect case for a library. The best I've ever found was JodaTime, but I no longer work in Java and no other language has an equivalent.

<comment><USER38> Joda Time was "adopted" as a part of java 8 on the java.time.* packages.

<comment><USER37> Yeah, but that happened to late to help me. :/

</comment></comment></comment><comment><USER39> Dates and times, floating point numbers, even strings... there will be always magic in how data is represented/encoded.

Now in the case of dates, there's the epoch, and a precision determined in terms of that epoch, there are compatibility workarounds between 32-bit and 64-bit time... we add have leap days and leap seconds, and of course: the fact that clocks go out of sync, timezones and daylight saving time, as well as a long long list of things.

Some countries move dates for DST every year.

Then, there are days that "do not exist" (September 1752 in UK/US, etc, when they moved from the julian to the gregorian calendar).

</comment><comment><USER40> Previous discussion: [https://news.ycombinator.com/item?id=4128208](https://news.ycombinator.com/item?id=4128208) (4 years ago, 213 comments)

</comment><comment><USER41> For iOS devs: mach time is just a more precise, monotonic equivalent to wallclock, and it never pauses :p

See [https://developer.apple.com/library/content/technotes/tn2169...](https://developer.apple.com/library/content/technotes/tn2169/_index.html)

</comment><comment><USER38> It looks like some of these should be taken care on the operations side. Sort of like [https://12factor.net/](https://12factor.net/)

As a programmer you need to be able to make assumptions, otherwise it gets crazy complicated.

</comment><comment><USER42> This list seems to imply relatively is only important orbiting black holes but the GPS satellites are far enough from earth or orbiting fast enough (both apply to satellites depending on orbit height) that relatively applies and the clocks have to be adjusted.

</comment><comment><USER43> if you think dealing with time is a problem, try measuring elapsed time on computers that sleep :)

the solution i found (when dealing with this problem in C# a few years ago) is that you need to poll the time in an update loop (running at, say 10hz or whatever resolution you need). if you have a sudden jump in time between two loops, chances are the computer was asleep.

or there was a leap second.

or you are sampling local time instead of UTC and daylight savings just occurred, or the user crossed timezones.

or the user changed their clock manually.

Or the computer resynced with the time server (happens quite often, and can cause negative time to elapse. Better check the CPU for elapsed ticks instead!)

man... this is starting to sound like roll-your-own-cryptography ;)

</comment><comment><USER44> More interesting falsehoods in this awesome list: [https://github.com/kdeldycke/awesome- falsehood](https://github.com/kdeldycke/awesome-falsehood)

<comment><USER45> Nice. Includes the one I'd just posted as well.

I recommend submitting that to HN. Looks as if it was a couple of months ago, but definitely worth the resubmission as it didn't take:

[https://hn.algolia.com/?query=https:%2F%2Fgithub.com%2Fkdeld...](https://hn.algolia.com/?query=https:%2F%2Fgithub.com%2Fkdeldycke%2Fawesome- falsehood&sort=byPopularity&prefix&page=0&dateRange=all&type=story)

</comment></comment><comment><USER46> Much needed. Thanks. Handling time is difficult, and Java's api(older ones) didn't make life easy. I have fixed many subtle bugs in my code related to time, over the years.

</comment><comment><USER47> I have had my fair share of dealing with these over the last decade.

pulling data from processes that run in different timezones and trying to merge that all together has been really fun.

</comment><comment><USER48> I appreciate the list of things to look out for, but what about solutions? That would increase the value of the article immensely.

</comment><comment><USER49> Also: * Leap years occur every 4 years

<comment><USER49> * Timezones never change

</comment></comment><comment><USER50> I've got 2:

-Your clock works the way you think it does

I was working for a company that makes pico-second clocks. It turns out, that all clocks experience drift. Like a gyroscope, each clock has it's own peculiarities and hyper-local environment, and like a gyroscope, they all tend to record and count time in different ways. If you have a clock, you know what time it is. But if you have 2 clocks, you are never sure. Now, we extend this to many clocks and we then have an ensemble of them, and (thank god) it ends up being a normal distribution that we then take the mean of. Now with picosecond clocks, the local gravitational environment, temperature, wear history, etc all end up being very big factors in time keeping. For most systems, this would be a catastrophe. You'd have to bury the clocks in some mountain, gravitationally 'shielded' away from things, temperature controlled, super clean, etc, and only take the time once a day or something. It turns out that if you run those calculations, you can only keep time to a part in 10^-16. Fortunately though, we discipline time to that of the Earth. Days and years are the thing we must subside to. And these things are only good to about a part in 10^-12, so we have 10,000 parts of 'error' to live in. It turns out, the Earth is a pretty bad clock, overall. It was pretty cool, years after I left that job, to walk into NIST and see an ensemble of our old clocks in the room where the US second is measured.

-Leap seconds always occur on the same date/time of the year.

The terrible earth-quake in Fukushima really did a number on the international timing community too. The change in distribution of mass of the Earth was so much that it slowed the year down by ~1 millisecond in total. I hope that the readers of the article and the rest of the comments here can appreciate that such a change, though to a normal person is small, is actually quite a lot for computers and other logic based systems. The 'leap-second', in reality a millisecond, was chosen to occur not on the last night of February of the following year, but was pushed forward to the last night of June. This did not make the people that sell super precise clocks very happy. Typically, the leap-second night is one of mayhem for clock sellers and the people that support the sold clocks. As this usually happens at midnight, far past when you have to put your kids to bed, the 'push notification' of the new time is in weary hours. That means starting about 1 minute after midnight, you start getting flooded with calls from your customers. Now, the purchasers of hyper- precise clocks tend to be very wealthy and powerful and very angry and sleepy that all of their very expensive computers are now 'all broke'd' in the literal middle of the night. Most of the time, you can reach out to the IT guys of these large oil&gas, Wall-Street, military, educational, and other types of firms and make contacts and let them know things will start to get out of whack. And they tend to learn that this usually happens in early March. Well, for this end of June leap-second, we knew things were going to be hairy. And they were. I was not even close to senior enough to be on those calls, but I came in the next day and all the senior guys were STILL on the phones with the various companies. When I left, they were on the phones still. I think they must have been up for at least 50 hours, judging by the amounts of RipIts scattered about the floors. That is what I call a salary job.

In all, I learned that humans think that time works in one way, but it really is 'what a clock measures' and is an abstract concept we put a lot of value into. And no, we will never be able to make a program that can take all of these considerations into account. All that will do is make the troubleshooting process a lot longer. Time is ephemeral, the Earth makes a bad clock, and mammals are diurnal. Those 3 things make clocks and time-keeping a 'hands on' job.

</comment><comment><USER45> We could just cut to the chase:

Falsehoods programmers believe: [https://encrypted.google.com/search?hl=en&q=%22things%20prog...](https://encrypted.google.com/search?hl=en&q=%22things%20programmers%20believe%20about%22#hl=en&q=falsehoods+programmers+believe+about+names&search_plus_one=form)

[http://www.metafilter.com/117073/Falsehoods-Programmers- Beli...](http://www.metafilter.com/117073/Falsehoods-Programmers-Believe)

By way of lists, a pretty comprehensive one: [http://spaceninja.com/2015/12/08/falsehoods-programmers- beli...](http://spaceninja.com/2015/12/08/falsehoods-programmers-believe/)

More in another comment: [https://news.ycombinator.com/item?id=12675830](https://news.ycombinator.com/item?id=12675830)

<comment><USER51> I miss falsehoods about pathnames:

* That there's never a \0 in a pathname

wchar names on MSWin UNICODE and WinCE. Symbian uses UTF16.

* That paths are seperated by /

Yes, Windows NT accepts /, VMS, VOS, RISC OS also, but MacOS classic had :, and VMS uses []. And there are still \ pathseps only, like DOS, OS/2, SYMBIAN, Novell NETWARE, AmigaOS4. Native Acorn RISC OS uses . as pathsep and : as in DOS.

Just the easiest ones.

<comment><USER52> "* That paths are seperated by /" The day I learnded that Korean Windows version uses a Won sign and Japanes use a Yen sign was very bad day.

</comment></comment></comment><comment><USER53> And because time is so simple, we figured to just rely on accurate time for TLS certificate validation and thus the security of HTTPS. </sarcasm>

</comment><comment><USER54> Many, if not most of these things are problems with the environment, not things programmers should think about or try to solve. In fact, most of them should explicitly not be thought about. All that that will do is lead to defensive programming - What if X happens? What if Y? The answer to most of them is simple - Crash. Make it loud and clear that something is wrong. Any attempts to rectify the problem, and most attempts to even detect it will only add surface area to the code, surface area where you can screw up and introduce bugs.

Could the system's timezone change? Yes. If you're manipulating time sanely, you're already using a timezone aware time class - particularly when serializing - and that's great. But if you're uncertain, it's best not to try to rectify. Your program will never be able to guess with any success.

Almost all of this post strikes me as along the vein of the questions of Babbage - "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" Almost all of these are the wrong numbers. Rather than leading you to the simple, correct solution (Use good serialization formats and timezone aware datastructures) it leads you down a path of paranoia, convinced the world is out to get you. If you're programming for that world, you're either a DRM programmer and should burn in hell, or you're doing it wrong. Trust your environment and OS and make damn sure that when you're setting up those layers you set them up right - Don't worry that every second open() call will return an invalid filehandle, just because.

<comment><USER55> No.

Yesterday my friends Mac crashed hard while they were working on a foolishly unsaved one-and-a-half page document in LibreOffice.

At the next start LibreOffice gives a big warning of "Oh shit things are really wrong, should I fix them for you? [Continue | Cancel]" .

Thank you LibreOffice team for making it so that within the time of a phone call to me plus the time it took to press "Continue" they were able to recover the their document and continue working.

This "attempt to rectify" the problem, could only have made things better not worse, so that's reasonable to implement.

I am not saying that _every_ problem needs a solution like this. But blanket statements like "crash whenever there is a problem with your environment", while certainly the correct way to do it in _some_ cases, leads to software that's really shitty use if that's all the software does.

Because while

> Almost all of these are the wrong numbers.

is correct from a programmers point of view, we aren't talking about the numbers a user put in, but rather numbers that the user has no control about.

And not many things are more annoying than computers doing unexpected things for reasons that are incomprehensible to you.

<comment><USER56> >At the next start LibreOffice gives a big warning of "Oh shit things are really wrong, should I fix them for you? [Continue | Cancel]" .

> Thank you LibreOffice team for making it so that within the time of a phone > call to me plus the time it took to press "Continue" they were able to > recover the their document and continue working.

Uh, that's exactly what the OP was advocating, if I understand correctly. On a consistency check failure (i.e. an assert), crash immediately [1]. If the application correctly handle transactional state changes, it will be able to recover on startup from the replay log, as all changes are immediately persisted on the log.

This approach is known as "Crash Only Software", and it is pretty much the only approach for writing robust applications.

[1] Syncing the replay log to stable storage can be a good thing though.

<comment><USER54> Yes, and I'm consistently disappointed that HN no longer gets this - It's becoming an echo chamber of those who can't and won't, rather than those who architect and learn. Timekeeping considerations are rarely-to-never the responsibility of an application programmer, and the scenarios presented - Leap seconds, etc - Are either meaningless (Who cares if your delta-t value is off by a second over a three month report?) or incredibly meaningful to the point you explicitly define them in the spec (High-freqeuncy trading systems should use good linearization mechanisms, not just rely on 'timestamp' \- The programmers who are working on these problems have well documented that these are hard problems that throwing more time specificity bits doesn't solve).

High level talks about low-level concerns are rarely helpful. This overview of detailed problems without links or even understanding of the relevant literature (It doesn't even mention the scenario that time runs backwards, which is way more common and terrible than pretty much anything on the list). This was a bad post, and it's bad training - Bringing up superficial questions without giving places to check answers for sanity. Many people will likely think about these issues halfheartedly, form half-baked answers, and propagate mistakes. Good learning not only asks questions, but asks follow ups and helps reach complete solutions.</comment></comment></comment></comment>


Ask HN: How to do this effect using jQuery? - <AUTHOR>

Hello !
I Saw this effect (https://en.mention.net/#testimonials) and i really want to do something like it.
What is the best way to do this using jQuery ? I can not think of an efficient way. <comment><USER2> They are using jQuery. Their code is obfuscated, so hard to say exactly how they are doing it. But i know how I would do it. Nothing crazy going on there.

You fetch your tweets from twitter, and build your html for them, position it out of view contained by an overflow hidden div. Go through the list of tweets, waiting a random amount of time to send them all off, and animate them from the bottom to top over another random amount of time. Im sure the biggest details will be in tweaking the timers so you get them firing off well. On animation callback, run the script again on the element.</comment>


"Our Xerox scanner randomly adds penises to copied documents" - <AUTHOR> http://alexmuir.com/our-xerox-scanner-randomly-adds-penises-to-copied-documents

<comment><USER2> That was quite juvenile, but funny nonetheless.

</comment><comment><USER3> The funny ending would be when one of your employees does it to you.</comment>


Show HN: Each day is a gift - <AUTHOR> http://www.eachdayisagift.com/

<comment><USER2> I'd be pissed if someone signed me up for this junk. I guess it's cool if you like "stuff", but it would just be clutter to me.

</comment><comment><USER3> I'd probably do this for Amazon Prime and I'd probably make the max $5 so I could get something every 5 days. Otherwise in 90 days I'd have 90 pieces of trash.

</comment><comment><USER4> Relevant:

<http://xkcd.com/576/> <https://twitter.com/#!/trademe_xkcd576>

<comment><USER5> My old blog post about this: <http://bieh.net/wordpress/2010/11/08/xkcd-576/>

<comment><USER6> I remember the bot. I still have the RSS subscription. It was fun to see all of the junk it had purchased.

</comment></comment></comment><comment><USER7> Example gifts: solar cockroach, stainless steel eyebolt, cuticle nail pusher, bra extender strap, and mini PVC tiles.

I suspect people would either love or hate getting stuff like that with few people being ambivalent.

<comment><USER8> cuticle nail pushers are very useful, if not essential.

</comment></comment><comment><USER9> Are there any ways to limit to specific categories or other criteria or is it totally random? I could see more use if it allowed filtering (eg under $10 in "Toys->Action Figures")

<comment><AUTHOR> Hey Jon, have this planned for v2.

</comment></comment><comment><USER10> id use dealextreme or something with higher quality products, i dunno, just seemed like a ton of those items had absolutely no use. maybe have a "veto" function or something to avoid items that wouldnt be good gifts [even for $1]

EDIT: On second glance, it actually was a lot better than I thought

</comment><comment><USER11> One gift PER day? That sounds like way too many gifts.

Or at least that is the impression I got from reading your homepage.

</comment><comment><USER12> That's the third time I have seen that character representing a startup. Where is he from, where can I get the little guy?

</comment><comment><USER13> Unique idea, Andrew! I'm also currently exploring the gifting business. Are you leveraging affiliate marketing?

<comment><USER8> unfortunately not that unique. I wish it were...

</comment></comment><comment><USER14> It will be great if you can provide oauth or fb for login.Its boring to fill new form again for the site.

</comment><comment><USER15> :-( Doesn't work in the US and signup form for notification when it will is down.

<comment><AUTHOR> Thanks Todd - fixed this now

</comment></comment><comment><USER16> There should be an apostrophe in "friend's" door.

</comment><comment><USER17> I would add a "only used items" option

</comment><comment><USER18> eBay is becoming cool again!

</comment><comment><USER19> How does this seem like a good idea? A dollar could buy a cup of coffee or a cheeseburger or any number of things, but instead you'd waste it on this junk? It's junk. I can not benefit in any way from receiving any of these things. They would all go directly into the trash. Essentially, all that this accomplishes is getting crap out of a warehouse and into a landfill. I'm sorry, but open your eyes. This is either a bad joke, or you need a wake up call.

<comment><USER19> Well that was pretty rude of me to say... I'm projecting from a deep and unsatiated desire for folks to rally around trying to create worth. There really aren't so many projects out there that do.

However, these are sincere questions... How does this add worth? Who benefits? What is the point?

<comment><USER20> I agree with you, but what irks me more is the disingenuously of it all: "We'll take care of the rest".

So basically I sign up a friend to receive petty "gifts" that some third-party chooses on my behalf with absolutely no thought given on my part whatsoever. How is anyone supposed to be happy about that?

And on the receiving end of the deal, if I receive a 2-dollar present for ten days straight then I'll be looking for the unsubscribe button.

The idea behind this startup - bringing random acts of kindness into social networking - is noble, but I feel as if they need to rethink their strategy a bit.</comment></comment></comment>


Ask HN: Ways to get hired anonymously? - <AUTHOR> Any startups that work on the possibility of an anonymous hiring process? Maybe agencies, that have the right process in place? Lists of companies, that practice anonymous hiring? What are any opportunities available to go through the hiring process anonymously, with an identity not disclosed prior to getting an offer? <comment><USER2> Hired (hired.com) does two things that might be close to what you're looking for, if not providing the entire solution: — We hide candidate profiles from their current employers (and others, upon request) — We also have a feature for employers called the 'bias elimination tool' which anonymizes candidate names and photos when companies are viewing candidate profiles (more here: [https://hired.com/blog/highlights/howhiredcanhelpremoveuncon...](https://hired.com/blog/highlights/howhiredcanhelpremoveunconsciousbias/))

</comment><comment><USER3> Here's one way:

1\. Send them a Surface Hub or equivalent device.

2\. Use something similar to ProctorTrack[1] to ensure that they're not using unauthorized programs, etc.

3\. Anonymize their voice with i/o software.

[1] [http://www.proctortrack.com/](http://www.proctortrack.com/)

\---

That being said, some companies actively discriminate, ala "culture fit." You can't anonymize culture without being devoid of it. Culture, for better or for worse can predict race/ethnicity/age/gender/nationality/etc in many cases as well.

What you could do, I guess, is so something similar to the Common App and have them answer a ton of short answer questions.

<comment><USER4> Is culture really a thing anyway? If someone is a high performer and treats others with respect how can they be a bad culture fit?

<comment><USER5> It absolutely is a thing. Culture isnt just about someone being good at their job or being respectful, it's about how the company and teams mesh overall. You can have a boring but civil workplace or a super fun one that's also respectful. I know that's vague but I figure giving a breakdown of the culture at my workplace is a bit overkill.

<comment><USER4> Yes but the point is when would anyone choose to not hire a high performing person just because their culture was different? That seems crazy given the difficulty of finding great people.

</comment></comment></comment></comment><comment><USER6> What you're looking for is "Blind Auditions" or "Blind Hiring"

It's a difficult process because you have to clear out many things. Not just ordinary stuff like age or sex, but you can't have in-person or over-the-phone interviews because that instantly de-anonymizes the applicant.

Having said that, there are many companies that are trying to find such a process that keeps the applicant anonymous in an effort to increase diversity. It's still very early and nobody (I don't think) has found a process that works effectively yet.

<comment><AUTHOR> Maybe over-the-phone with some voice changing technology could work? Or allow a real voice interview but try to reduce its importance?

</comment></comment><comment><USER7> Bytemark (a UK hosting company) have an anonymous hiring process which they've documented at [https://careers.bytemark.co.uk/full- process](https://careers.bytemark.co.uk/full-process) which gives them as much confidence as possible that if you make it to the interview stage, you've done so based on your skills rather than your CV, gender, religion etc.

Disclaimer: I don't work for Bytemark but have been a happy customer for many years

</comment><comment><USER8> Sorry to be a downer on this, but I am skeptical on how effective this could be - all the companies I have worked for (where I have actually enjoyed working there) the main part that made everything work was cultural fit - similar sense of humour, gets along well with the team, social etc.

I can see how possibly in some companies this could be achieved but it seems like it would be for a job where you are just a number not a person - YMMV I guess.

<comment><AUTHOR> Same for me about the best companies. In my case they were also the less inclined to discriminate employees in any way and spent minimal time on technical assessment. Maybe the less a company cares about cultural fit, the more it tends need anonymous process from an employee perspective? I think there should be ways to make anonymous hiring work, especially taking into account how broken current hiring processes are, despite of being extremely selective.

</comment></comment><comment><USER9> No idea if it works, if it is of any good, but I just came across this company while searching companies on the HR field:

[https://anthology.co](https://anthology.co)

</comment><comment><USER10> We totally made a thing for this several years ago - sunsetted now

[https://medium.com/@jongold/meet-hiremyfriend-a-new- product-...](https://medium.com/@jongold/meet-hiremyfriend-a-new-product-from- makeshift-372c64f3d833)

</comment><comment><USER11> take a look at [http://www.comparably.com](http://www.comparably.com) \-- early days but they do anonymous candidate/company job matching

</comment><comment><USER12> Why is being hired anonymously so important to you?

<comment><AUTHOR> Because discrimination rates are overwhelming and blind hiring could provide equal opportunity. It's not just me. But I'm surprised that threads about discrimination like current Oracle thread gain a lot of attention, while blind hiring theme which is the most obvious possible solution, doesn't.

<comment><USER3> For better or for worse, the reason for this is pretty obvious.

<comment><AUTHOR> Which one?</comment></comment></comment></comment>


Ask HN: What are your favorite tools for windows and mouse management on macOS? - <AUTHOR> I'm a long time Linux user who recently switched home and work to macOS for the use of various communication tools our company uses which aren't supported on Linux.
On Linux, I used i3 and was absolutely in love with it. I could control my entire environment without touching my mouse, and keep my windows very organized. However, I've really struggled to find anything close to it on macOS. I'm very open to approaches which aren't apples to apples with i3...I just want something which significantly improves upon the default macOS experience. In other words, I'm not exactly sure what I'm looking for, but the default experience isn't it. One thing I know I'd prefer is to touch the mouse as little as possible, and I'd like to keep SIP (system integrity protection) enabled (which seems to exclude some promising options):
Among the things I've tried:

  Divvy - looked promising initially, but requires a user to touch the mouse to draw the window in the pop-up.
  Spectacle - too basic...while it allows me to quickly resize one window, that's about it.
  Hammerspoon - very cool idea, but I'd have to basically write my own window manager in lua. None of the shared configurations from other users seem fully baked
  TotalSpaces2 - I thought TS2 was going to be *the one* solution I found which, while a different approach, fulfilled my needs. However, it requires SIP to be disabled.
  Amethyst - reading about it filled me with promise, but actually using it proved confusing and it didn't always manage the windows in intuitive ways. I couldn't tell if it was the software, the user, or a combination of both. I really need to revisit this one.
  yabai - requires disabling SIP
 I know many of you are long-time macOS users. Would you mind sharing your can't-live-without windows management and mouse management solutions?
Thanks in advance! <comment><USER2> I use Linux as well, and BetterTouchTool is the closest thing to a mouseless window manager I've encountered. It's not free software, but I expensed a license with my company because I need it for my job.

</comment><comment><USER3> Yabai does function without disabling SIP [1], just that certain features do not work without doing so. Whether or not those functions are critical to your workflow you'd have to figure that out for yourself. They are functions that you couldn't get functioning without SIP being disabled, as far as I know.

Amethyst doesn't require disabling sip because it doesn't support the same features that yabai does. It does support different rules for layouts than yabai, which only supports floating and bsp rules.

If you didn't like Amethyst's handling of windows, you can try adding different layout rules; there are several that you can cycle through in the settings.

Tangentially related, Karbiner Elements [2] will let you modify your keyboard so you can say, invoke hyper by pressing down the caps lock keys so it would be easier to map keys to global functions like launching applications or moving windows around. I use it extensively for throwing windows to different spaces in yabai, or switching spaces. Yabai can swap spaces without any animation. You can reduce animation of changing spaces in macos from a swiping animation to a fade animation in accessibility settings, if that is sufficient for your needs. Karabiner can also bind keys to control the mouse cursor.

An app (that may be pretty much dead) that I found somewhat interesting is Switchem [3]. Dead as in the website for its independent release no longer exists, but the functionality for it might be enough for you anyway. It allows you to create workspaces that you can invoke with keyboard shortcuts that lay out the applications on the screen the same way each time. So rather than using spaces for managing windows, you switch from a "coding" workspace which has a terminal window and a web browser and an IDE to a "research" workspace which might open up a notes application and a web browser.

Moom [4] also allows you to define custom layouts and save them. It can be controlled by the keyboard entirely.

[1] [https://github.com/koekeishiya/yabai/wiki/Disabling- System-I...](https://github.com/koekeishiya/yabai/wiki/Disabling-System- Integrity-Protection) [2] [https://pqrs.org/osx/karabiner/](https://pqrs.org/osx/karabiner/) [3] [https://setapp.com/apps/switchem](https://setapp.com/apps/switchem) [4] [https://manytricks.com/moom/](https://manytricks.com/moom/)

</comment><comment><USER4> Just to give you another popular app to try out: Magnet

[https://magnet.crowdcafe.com/](https://magnet.crowdcafe.com/)

</comment><comment><USER5> Magnet is excellent for window management. Works well on my 13" mbp, and my vertical monitor.

If you have a touchbar, pock.dev is excellent.

</comment><comment><USER6> yabai (and chunkwm before it) with skhd key shortcuts without a doubt. I thought sip only needed to be disabled for certain features, such as window transparency and changing window chrome?

<comment><AUTHOR> From the readme ([https://github.com/koekeishiya/yabai/blob/master/README.md](https://github.com/koekeishiya/yabai/blob/master/README.md)):

* The WindowServer is a single point of contact for all applications. It is central to the implementation of the GUI frameworks and many other services. Because of this, System Integrity Protection must be disabled for yabai to function properly.*

I haven't tried it because that language made me think it was a dead end out of the gate... are you running it with SIP enabled?</comment></comment>


Tell HN: I'm launching a product the "right" way - <AUTHOR> At this point, I have launched many projects (some with the aim to make money and some just for fun). For all of these projects, I started coding first, completed the project, and then tried to figure out how to get users. Of course that never really worked.
The interesting part is that I always knew the theory - to test the idea with prototypes or just talk to potential users first. But I always started with the coding.
Well, here I am, after many failed launches, giving all of my energy to another product that I am truly excited for and passionate about. But this time, I will not code first.
I have set up a landing page and I'm collecting emails to have the first set of users IF I decide to go forward with this. I hope I do.
Of course, a lot of the credit goes to the HN community for really drilling this point in my head to not start with coding. Thanks, everyone!
For the curious, here's the landing page - http://gettaurus.in/. Feel free to tear it apart! <comment><USER2> The capital markets in India (and elsewhere in the world) is highly regulated. It will take you at least a year to get a brokerage licence.

How do I know? I work in the space. It is dominated by traditional brokerages who are now facing the heat from discount brokerages, the largest of which is Zerodha.

In order to make any real money, you'll need to operate at scale. The cost of customer acquisition is very high and the average revenue per user very low which makes it impossible to get far without raising significant money. There are enough quality brokerages in the market and I don't see VCs backing another one.

I'm only sharing my insights, not discouraging you. But I'd highly recommend you look at building something with lesser regulatory overheads. You could even explore building on top of the brokerage layer - Zerodha has exposed their APIs and a number of startups have been built on this.

<comment><USER3> An idea for the meantime: OP could paper trade for early users. Prove the concept, improve the UX, and be ready to partner or have investment to manage the brokerage licensing etc.

</comment></comment><comment><USER4> > I have set up a landing page and I'm collecting emails to have the first set > of users IF I decide to go forward with this.

I don't think you should equate giving you an email address with the willingness to become a user of your product, once it exists. If you end up building this product, it would be interesting to hear about your "conversion rate" for these early emails.

And on the flip side, I personally am very reluctant to give out my email address to an entity that is essentially a company that doesn't exist yet, with a product that doesn't exist yet. Even if I'm very interested in the product in theory. (In this particular case I'm not in your target group.)

Finally, here you write that you are essentially only collecting emails at the moment, while the submission button on the website says "Get Early Access". That is very vague, but to me it suggests that you are at least actively working on development and will have a beta or at least an alpha sometime soon. So I find this _very_ dishonest. Dishonesty is not a great look for an entity that harvests emails, or one that hopes to provide financial services.

All in all, I don't think this is the "right" way to launch this product at all.

<comment><AUTHOR> > I don't think you should equate giving you an email address with the > willingness to become a user of your product, once it exists. If you end up > building this product, it would be interesting to hear about your > "conversion rate" for these early emails.

Of course, the conversion rate won't be high especially if the time between the user signing up and the launch date is very long. But it is still possible to keep the interested users engaged and some of them (not sure how many) will be the seed for the first set of actual users.

> And on the flip side, I personally am very reluctant to give out my email > address to an entity that is essentially a company that doesn't exist yet, > with a product that doesn't exist yet. Even if I'm very interested in the > product in theory. (In this particular case I'm not in your target group.)

I think that's fine. Your email, your choice. But the company does exist and the product is in the design phase.

> Finally, here you write that you are essentially only collecting emails at > the moment, while the submission button on the website says "Get Early > Access". That is very vague, but to me it suggests that you are at least > actively working on development and will have a beta or at least an alpha > sometime soon. So I find this very dishonest. Dishonesty is not a great look > for an entity that harvests emails, or one that hopes to provide financial > services.

This is totally valid criticism. I hope to convey that by signing up, you will be the first set of users to get access to the product when it launches. And while we haven't started development, we are in the design and user testing phase. The whole idea is to test ideas before developing.

> All in all, I don't think this is the "right" way to launch this product at > all.

I don't think there's one right way to launch. The only theory being tested here is to test each and every single idea before going into development. Since this product will be more expensive to build, it is even more important now.

</comment></comment><comment><USER5> Neat. That product is needed in India even more than Robinhood was needed in the U.S.

Here's the end game: a payment/retail aggregator app like Flipkart's Phonepe could buy out your business and integrate it with theirs. Acquisition would be faster than building a stock trading service internally. Paytm, their competitor, already got approval to build a stock trading platform. Diversified financial offerings cement first mover advantage and create a very profitable position in an oligopoly.

In the U.S., this space is marginally less exciting because there are multiple stock brokers with good or good enough tech platforms, reliable service, and hundreds of billions of dollars under management.

A bit of advice on the product itself.

1\. Try to integrate with other Indian fintech platforms early on.

2\. Learn from Chinese fintech. They created a model that can be more or less copied throughout the developing world. For example: Ant Financial followed the principles of choice architecture to save Chinese savers from making ill advised investments. They deliberately put safer as opposed to riskier stocks on their stock trading platform. They knew that even Chinese people didn't trust Chinese stocks a lot anyway, so they leaned on global offerings and partnered with Vanguard to encourage investment in diversified foreign indices. Ant Financial did a lot of fascinating and innovative things so if you're going to research Chinese fintech I would start with them.

Edit: I see what you're doing with the landing page approach, but you should gather conversion metrics. Advertise to your target market on Facebook and measure the CTR and signup rate.

<comment><AUTHOR> Thanks for the helpful advice!

Totally agreed about learning from existing models especially the ones used in China. I don't think a model that works in the US or Europe will necessarily work in India.

Indian markets offer "mutual funds" which are very diversified and some of them carry low fees. The plan is to make sure new investors know of this option.

</comment></comment><comment><USER6> Three things:

1\. Your website does not have a privacy policy that I could find, so that is something you probably want to fix.

2\. I feel that you should disclose that this company doesn't actually exist yet.

3\. I don't know much about India's financial system, but do you have the infrastructure/ability to establish a brand new stock brokerage?

<comment><AUTHOR> 1\. Agreed, I'll add that asap. 2\. I should make it clear that the company does exist and is registered. 3\. India's financial system is tricky but I'm well positioned to start a new brokerage. The problem that I'm dealing with is building a product around it that users actually want.

</comment></comment><comment><USER7> This is a step in the right direction from coding first and then hoping people will come.

I think you need more than a count of subscribers to validate your idea though. Ideally you can engage them so you can have conversations will a decent sample size (see the book "The Mom Test" and similar on what questions to ask), and you will know a lot more than just "I got 318 subscribers from HN" or whatever. I can't tell you how many hours I've wasted trying to sell stuff to uninterested lists of even 3000 people and getting nothing.

I'm in a different country to you, and sample size of 1 speaking here, but I'd never sign up your page because you are dealing with money and stocks and I don't recognise you as a banking institution. So I wouldn't waste my time. I've been stung enough by trading platforms run by pig players. I'll use the boring big banks thanks. Things might be different in India though. Unless you are the ex-CTO of Barclays and have $100M in funding or something. Plus its such a competitive landscape that unless you are paying me to trade I can get very good deals out there.

However I might sign up for a tool to help me calculate options prices, or can tell me which shares internationally have falling the most since the COVID pandemic started. That's safe, I'll soon know if it doesn't work properly and it might be handy. Having signed up for that I might answer a survey you send me, and then you'd know more about me. Maybe I'm happy with my broker but I have a big problem with X that you can solve.

</comment><comment><USER8> This post resonates with me completely. Products need to solve problems people other than ourselves actually have. We have not always been perfect at this and started like you have here, by speaking to people, then we got too into the code to hear what users were saying, now we're back on the straight and narrow! Set up a public roadmap the other day, this is now working very well and we are shipping features genuinely requested and upvoted by users. This has taken all the guesswork out of product development. I'm happy to share for reference: [https://did.nolt.io/](https://did.nolt.io/) [https://did.app/](https://did.app/)

<comment><USER9> Don't mean to get off topic, but if you don't mind me asking, what are you using to build your product roadmaps and have users request/vote on features? Because I'm currently building a SaaS that helps users manage and organize user feedback, and trying to get an idea of how founders solve this problem currently. Thanks!

</comment></comment><comment><USER10> Just FYI, the .org of that domain is active: [https://gettaurus.org/](https://gettaurus.org/)

</comment><comment><USER11> I think you should change the "Low latency" part of your pitch. I don't think consumers should have to know that kind of technical detail to know the benefit your product can provide. Having that term in there is more confusing than helpful.

</comment><comment><USER12> Others have already said the site is light on regulatory documentation like a privacy policy but I would also expect to see your disclaimers about the claims you are making at the bottom.

Commission free brokerage means to me that you probably make your money on arbitrage with the prices of the equities. Is that your plan?</comment>