Better HN
topnewbestaskshowjobs
Log inSign up

slashdev

17,493 karma · joined May 14, 2013 (13y ago) · 5,497 submissions

Founder of revscope.co

Revenue focused web analytics to help you quickly identify where to focus your effort to best increase revenue.

And embersofvictory.com

Retro turn-based strategy game.

Submissions

comment 11y ago · link · parent

Parallel python is almost an oxymoron. Python has a GIL that prevents more than one thread from running Python code at the same time. You can get around that by spawning multiple processes each running an independent interpreter, but that's not as cheap or easy as spawning threads. You need to reuse those processes for multiple units of work, or chunk your units of work into big enough pieces to offset the startup costs. Sharing large amounts of memory between the processes requires copying or shared memory (which also isn't that friendly to use from Python.) Granted copying is harder to get wrong, so it's the recommended solution anyway. If you wanted extreme performance Python is a lousy choice in the first place.

comment 11y ago · link · parent

Sure, that's valid reasoning. If your goal is optimizing your personal happiness, you don't need that much money. The extra stress will easily compensate for the extra money and you'll be worse off.

But a word of warning, make sure it's not because you're afraid of taking things to the next level. Adding employees (rising costs) and moving into more of a managerial role is something many engineers are afraid of on some level. Additionally, all humans are afriad of change to some degree. Make sure you really understand what motivates you. </armchair psychologist>

comment 11y ago · link · parent

> Bill Gates does code reviews, not coding.

That's just wrong:

In 1983 Microsoft had revenues of $55 million and a headcount of 500. Bill was the CEO. And yet, according to Gates talking about the Tandy TRS-100, "part of my nostalgia about this machine is this was the last machine where I wrote a very high percentage of the code in the product. I did all the design and debugging along with Jey."[1].

Gates was CEO of a company of 500 with revenue of $55 million, and still producing large amounts of serious code. That's impressive (or misspent time, however you want to think about it.)

[1] http://www.nausicaa.net/~lgreenf/bill.htm

comment 11y ago · link · parent

PlentyOfFish was the biggest example I can think of, but companies like that are very rare. It's also strange. If you have a successful company, why wouldn't you try to grow it and hire employees? Maybe if you're more interested in keeping things simple than in making more money.

comment 11y ago · link · parent

A bootstrapped business does not have to be exclusive with larger revenue streams.

Guy Kawasaki says that he's seen many more businesses die because they tried growing too fast (e.g. using VC money to scale the company) than because they grew too slow.

Joel Spolsky is famously a critic of the SV VC-based model as well. He put his money where his mouth is with Stack Exchange, which only recently raised VC money. He says the obvious, that if take things as far as you can without VC money, then you get better terms when/if you finally do take it.

There are a bunch of companies, especially those with strong network effects like social companies, that face a very real risk of growing too slow. There are others, especially hardware companies, where the startup costs are high. So the bootstrapped model is definitely not for everyone!

I think it's best to stay small and agile until you've found a strong product-market-fit that can the company can be scaled up into. You may or may not need VC money during that stage. When your biggest problem is you lack the resources to scale up as fast as your real product demand, then you should be looking for VC money (or a alternative financing like a loan.) Before then it may well do you more harm than good.

comment 11y ago · link · parent

He's not talking about the brain conserving energy (the brain doesn't use that much energy anyway) but rather the organism as a whole by not performing other physical activity (e.g. an early human looking for food during the night when the African predators are active.)

comment 11y ago · link · parent

No, it definitely isn't. I'm a software engineer and I've used it as my primary desktop OS for years. A year ago I went and paid $300 for a windows 8.1 box and migrated my whole system back to windows. There were just too many problems that got in the way of my work, things breaking after updates, graphics and printer driver issues, etc. I was spending more time debugging that stuff than a windows license costs. I don't like windows, especially windows 8, but it's stable. I did have to buy a start menu add-on, because Microsoft lost their mind with windows 8. I keep my Ubuntu machines in a VM now, where I can easily back them up, roll them back, or throw them away without affecting my productivity. It's not quite as fluid running an Ubuntu desktop at 4K inside a VM, but still quite usable.

If it's not ready for a seasoned software engineer, it's definitely not ready for my mom.

comment 11y ago · link · parent

That's the situation now, and nobody is thinking they're going to fail now. But back in the early days of Amazon the sentiment was different.

comment 11y ago · link · parent

DropBox fit that category. It was a solved problem for the people on HackerNews. "Oh we already have rsync for that". They had a very critical reaction here, most people thought the idea didn't have any value, but now look at where they are.

I also think that back when Amazon started, a lot of people laughed at the idea of selling books online. In fact for many, many years with Amazon making huge losses people predicted they would fail.

But I agree there are always exception to the rule. The question, I suppose, is which one is the rule?

comment 11y ago · link · parent

They didn't say unsigned overflow was undefined, but you're right that the offset won't be correct. I thought it seemed intuitively wrong to me, but I figured google research is probably a reliable source!

comment 11y ago · link · parent

Not if low and high are both unsigned (size_t is unsigned.) Even if it overflows, the result will be correct. See: http://googleresearch.blogspot.com/2006/06/extra-extra-read-...

comment 11y ago · link · parent

Thank you for the detailed and fascinating response! I read and re-read it to make sure I didn't miss any details. I understand now why you chose to handle only metadata with Raft. I really appreciate the time you took to explain not only your reasoning, but your reasoning through the alternatives as well. Databases and distributed systems are both fascinating, and very challenging, problem domains. Combining them is even more challenging.

comment 11y ago · link · parent

OK, so it's a latency concern, which makes perfect sense.

> If we used Raft to replicate the document, in many cases it would be a lot more chatty.

I'm out of my depth here. Leader needs to send AppendEntries and slave needs to apply to persistent storage and ACK. Leader needs to wait for majority of ACKS before responding to the client. That's the same as your three-node replication scenario, so what am I missing here? Does Rethink db relax consistency guarantees in some cases to achieve better latency?

It's not your job to educate me on Raft, I appreciate your being patient with me, but feel free to opt out of this conversation anytime you please.

comment 11y ago · link · parent

I'm curious about "We chose to only store cluster metadata in Raft due to performance limitations imposed by distributed consensus"

I would naively assume that since you need to replicate your database to the slave servers, you need to send the WAL or changes somehow anyway. Could you elaborate on what was the problem there? I'd be surprised if it is because of a fundamental limitation of Raft (but could easily be a limitation of a Raft library!)

comment 11y ago · link · parent

0% in Panama on foreign income, interest and dividends. 20-year exemption on property tax for new construction. 7% sales tax.

If you're a remote worker, that's heaven.

comment 11y ago · link · parent

It depends, as always, if you access it sequentially, iterating two separate arrays vs one is similar in performance, the prefetcher will help with both. If it's random access, then you really want things to fit into 64 bits.

comment 11y ago · link · parent

If you're reading sequentially in a loop, the prefetcher will detect that and the cache lines will be loaded ahead of the accesses and the cost for straddling will be almost nothing. If you're doing random access of misaligned 64bit words, roughly 1/8 of your accesses will need two cache lines, which we can naively say is twice as slow as the other 7/8ths, so your runtime would be 9/8ths. That's a bit of a hit, but still not that bad.

comment 11y ago · link · parent

That's how I would have done it too. He had 65 bits to start with, so just combining two fields with the trick in the article would have been enough to save that one bit. Or one could have just extracted one boolean field into a separate bit array (even simpler.) Since the article makes a big deal about getting down to 61 bits, I assume every bit saved helped and that they were all packed together with no padding. It's a lot of assumptions.

comment 11y ago · link · parent

I'm surprised saving 4 bits made such a difference, it's about 6% smaller. But I guess that depends on how much of your memory these things are taking up. 6% of 8GB is 500 MB, which could easily be the difference between swapping and not.

comment 11y ago · link · parent

The 65bit packing would straddle cache boundaries, but it won't affect performance noticeably on Intel CPUs since Ivy Bridge. Packing into 61 bits without padding will do the same.

comment 11y ago · link · parent

By most modern architectures you mean 32bit, since you seem to think accessing a 64bit "long" (it's 32bits on windows btw) takes two memory accesses. 32bit architectures are not "modern"... Maybe you meant unaligned 64bit accesses, which will be 2 reads, but those are pretty cheap since Sandy Bridge or earlier.

comment 11y ago · link · parent

The article author talks of the number of CPU ops, as if they were all the same. Since he's using compile time constants, he probably never noticed that division (20-100 cycles) is so horribly slow. The compiler uses a trick like in Hacker's Delight to convert division into multiplication (4 cycles). But shifts and masks are cheap (1 cycle each). This kind of trickery is rarely worth the small space savings (to be fair, the author seems aware of that, by calling it immature optimization.)

comment 11y ago · link · parent

Fair enough, and my bad for not using the term statistical significance correctly. But we agree that it's entirely possible to have statistical significance that's completely meaningless. Lies, damn lies, and statistics. This is especially true for health studies, and very common with studies that show so-called gender differences when what's really happening is the variation among individuals of a single gender is larger than the detected variation between sexes. Then a result with a small sample size is really just noise and an attempt to publish a paper for the sake of publishing a paper by some academics with questionable competence or morals (or both.)

comment 11y ago · link · parent

There's a line somewhere, but this was tasteful. I don't see what's so objectionable.

comment 11y ago · link · parent

You would rather they make statements with a neutral tone, promising nothing?

What's wrong with expressing a little excitement and optimism?

comment 11y ago · link · parent

No, I stand by my assertion. You might have a "statistically significant" result, but the sample size is just too small to know if it represents a real result or not. At best you can say they've discovered something worth investigating with a larger study. But you can't take the conclusions at face value.

http://www.nature.com/nrn/journal/v14/n5/full/nrn3475.html

comment 11y ago · link · parent

I've been living in Panama since 2006. I've followed a lot of the articles around the Nicaraguan canal to try to get some sense of how it will affect Panama.

My conclusion is a canal in Nicaragua makes no economic sense, there must be some hidden motivation at play here, such as personal glory for Wang Jing or a ploy to secure land rights and tax exemptions. The reasoning is as follows:

1) The possible ROI from a ~$70 billion investment is very low. The same revenue can be achieved by building a third set of locks in Panama for ~$15 billion. Right away it looks like bad business. Most ways you can spend $70 billion will yield a better return with less risk.

2) The Chinese government is not involved. If it were a political thing, it could explain why someone would forge ahead despite the poor ROI, but the government is not financing it and government companies won't touch it with a stick.

3) Wang Jing is a telcom billionaire and neither he nor his company have any experience with construction or engineering.

4) A Chinese construction and engineering company has offered to finance and build a fourth set of super-sized locks in Panama for ~17 billion. This would compete directly with a hypothetical Nicaraguan Canal for the largest ships, but at a much smaller investment.

Given two nearly identical products, the company with lower costs will be able to offer lower prices while still making a profit. That will clearly be Panama. There's just no logic in the Federation's move here. Jorge Quijano, who leads the Panama Canal Authority, has come to the same conclusion.

[1] http://www.bloomberg.com/news/articles/2015-04-23/panama-can...

[2] http://insidecostarica.com/2015/04/14/chinese-interested-fin...

[4] http://www.reuters.com/article/2015/03/26/us-panama-canal-id...

comment 11y ago · link · parent

There were only 12 people in the study, this can't have any statistical significance. The differences they saw could be completely caused by chance.

comment 11y ago · link · parent

Just click the upvote arrow.

comment 11y ago · link · parent

There are countries with much lower corporate tax rates. E.g. Ireland is 15%, Panama is 0% (on foreign income).

I'd say the optimal strategy is what Facebook and Google do with the double Irish Dutch sandwich http://conversableeconomist.blogspot.com/2014/07/double-iris...

1
173174175
184