HNHacker News
TopNewBestAskShowJobs

sratner

354 karma · joined July 17, 2007

YC Badge: 0xe4bad42969186ecba2eb7e70ef0ba8b8b7f7a82f
submissionscomments
sratner··on How to Pass a Programming Interview
Yet it is certainly false that if you are able to get CS basics right, you will be any good at deep engineering.
sratner··on Show HN: LogDNA – Easy logging in the cloud
Is there a specific syntax for nested fields, such as `res.status:403`, or do you flatten the json structure for indexing purposes?
sratner··on How to Fix Tech’s H-1B Problem
Well, more accurately, you can't pay a foreign worker less than some floor set by the DoL for the given job description and location. It is unrelated to how much a given company is paying to any one of their other workers.
sratner··on How to Fix Tech’s H-1B Problem
DoL already has a process for determining prevailing wage for a given location. There is no reason why "sorting by wage" can't mean "sorting by ratio of wage to local prevailing wage".
sratner··on How to Fix Tech’s H-1B Problem
If you pay taxes, your participation is non-zero.
sratner··on Facebook iOS App Scrapes Your Clipboard?
Keepass2Android does exactly that, and additionally auto-fills password and confirmation fields when you focus them with the custom keyboard active. Very handy.

(https://play.google.com/store/apps/details?id=keepass2androi...)

sratner··on New Windows 10 Devices From Microsoft
My two last laptops have been from ASUS. No complaints, no problems with reliability, decent trackpads and generally solid builds (not Apple-solid, but they are also not Apple-priced as you point out). For a while, they were the only company making decent 13" with discrete graphics.

The thing that I found incomprehensible, and somewhat tangential to the grandparent, is how ASUS manages to screw up distribution so badly. They release slightly different models at slightly different times in different geographic regions, and it is usually impossible to buy, say, the European or Asian versions, in the US. A year ago I was quite literally ready to throw money at them in exchange for a UX303LN to replace my aging U36SG, but my dream model was only available in Europe. The only two options I could get in US both had something wrong with them. Repeat: they actually manufactured a laptop to the exact specifications that I wanted, but didn't give me a way to buy it.

Considering they have global distribution channels, it don't imagine it actually being hard to make all models globally available, so the only other explanation I have is forced market segmentation: the two models available in US were pretty much the lowest and the highest end, with nothing in the middle.

I had been waiting to see if UX303UB will make it to US, or if it will suffer the same fate. Instead, I just pre-ordered a Surface Book.

sratner··on New Windows 10 Devices From Microsoft
1. SurfaceConnect on the right edge of the base: https://dri1.img.digitalrivercontent.net/Storefront/Company/.... Same connector as the new dock.
sratner··on 2015: The Year of Emoji Diversity
There is http://emojione.com/.
sratner··on Tech salary insights from 1.2M foreign worker visas
The prevailing wage data does not necessarily reflect what people are actually paid. It is the minimum required salary for the company to be able to apply for a labour certification on behalf of a foreign worker. It is obviously in the company's interest to commit to the lowest salary the DOL will let them get away with for a given level of worker.

There is another potential effect: as part of the labour certification process, the company is required to post up the applications of all foreigners it is hiring in a "prominent location" for around two weeks, to make sure all other employees are aware of it. It can be rather awkward to post up an LCA with a number on it that is significantly higher than what others in the company are getting.

My experience has been that many people are paid significantly more than the prevailing wage on the application. As mentioned, this is also just the base rate, without bonuses or equity.

I would say this analysis is useful for drawing comparisons between companies and observing trends, but less useful for the absolute numbers.

sratner··on Tech salary insights from 1.2M foreign worker visas
A bunch of data here, and not just for H-1Bs: http://www.foreignlaborcert.doleta.gov/performancedata.cfm#d...

[edit: for a searchable interface to this data, as well as complete approved applications, check out http://dolstats.com/]

sratner··on Rust Guide
Comparison with `null` is strange. First thing I thought of was JavaScript's `undefined`.
sratner··on Windows NT Kernel Contributor Explains Why Performance is Behind Other OS
JavaScript strings are UCS-2 or UTF-16.
sratner··on Kindle Fire HD: Much Better Than Original Kindle Fire
It is definitely annoying, however you can side-load the latest YouTube apk (you also need "Google Services" apk if you want to be able to log into your account), making the original Kindle Fire a pretty good YouTube machine. The YouTube app serves up the 720p stream even though the screen is slightly smaller, and it looks very nice and crisp.

I disagree when it comes to reading books, though. My Kindle Paperwhite, and even the Kindle2 before that, are superior reading devices. The Fire is a decent video/games device, but the only reason I use it in preference to the Nexus7 is to get access to Amazon Prime streaming.

sratner··on Using python and k-means to find dominant colors in images
A lot depends on what you are trying to achieve. In my case, for example, I wanted to group images that may have perceptually similar colours either as a dominant component or as an accent (say, a red shirt and a white shirt with red stitching).

To expand on your points, based on my own experience:

* Rather than using the centroid to represent the cluster, pick a representative peak from the hue histogram. This tends to make things less muddy.

* Not only do I throw away extreme S/L values, I aggressively weigh everything by S * (0.5 - |0.5 - L|), so bright, saturated colours dominate. Black and white are usually very thin slivers, and I almost never have grey.

* As a last step, I convert to Lab space and merge any colours that are perceptually similar (dE < 5.0). This means that large gradients (like an unevenly lit surface) only occupy one sliver of the pie. Unfortunately, in my current implementation this conflicts with my first point above, so the colours I end up with aren't always in the original image -- something I need to fix.

Here's my result for one of your images: https://dl.dropbox.com/s/azl2bag84riugg8/imghist.png, notice how the orange has a disproportionally large weight because it is so saturated.

sratner··on Don’t use JavaScript for Retinafying
> for bitmapped images, go high-resolution and let the browser scale down

Wait, I should use more bandwidth than I need, and impose a client-side performance hit? What is wrong with a little CSS to serve the right assets to 1x, 1.5x and 2x pixel ratio devices?

sratner··on Web Fonts Performance: Making Pretty, Fast
Strength of "encryption" notwithstanding, it was a fun exercise: https://github.com/simonratner/fontcrypt

Perhaps of some use to those annoying coupon code sites that go to great lengths to prevent copying of the coupon code in order to funnel users through their affiliate link. [Edit: To be an inconvenience to scrapers, you'd want to generate a random font per session.]

sratner··on Try Python, Ruby, Lua, Scheme, QBasic, Forth ...
Numeric labels also don't work:

  10: PRINT "hello"
  GOTO 10
This works though:

  label: PRINT "hello"
  GOTO label
sratner··on The Founders Visa Movement
These are pretty much the conditions for an E-3 (treaty worker) visa available to Australians. I believe Canadians have something similar, too.
sratner··on Google Chrome, Google's Browser Project
And with html5 video support in Webkit, another advantage of Flash evaporates. There is still the question of distribution, though.
sratner··on Why Java Isn't Shit, Part 2 - Conservatism
Also seems like a misunderstanding of C# features:

> type safety is loosened and a few keywords are borrowed from JavaScript (var)

C# is strictly and statically typed. The var keyword is only similar to Javascript's in using the same three letters. What the author calls loose typing is derived by the compiler, at compile time, in a completely static fashion. However, you get the power of being able to type variables even when you cannot name the type (for example, anonymous types).

> with LINQ, they decide to borrow the single most verbose language on the planet (SQL), and add that too

LINQ is about SQL about as much as Javascript is about Java.

edit: Oh yeah, and Java never really added generics. It's just some syntax sugar which in no way actually closes a hole in the type system.

sratner··on Why Java Isn't Shit, Part 2 - Conservatism
For some reason, there are ever larger numbers of C# advocates in most hard-core programming forums. This can only be explained in one of three ways: 1) astroturfing by Microsoft; 2) good old-fashioned trolls trying to start a flamewar; or 3) the "too easy" crowd have fallen for the hype

Is it not even conceivable to the author that members of hard-core programming forums advocate C# because it is actually a decent language backed by a well-implemented runtime?

sratner··on The Hydrogen Hoax
I don't know anything about economic viability of nuclear power, so I won't comment. I understand that wind and solar both receive substantial subsidies in the U.S. as well. There is also a possibility that were nuclear power as trendy as wind and solar, it would receive more development unhindered by politics, potentially leading to lower costs. This is of course pure speculation.

As for the environmental impact and total carbon footprint, that of wind farms is not small either. Vast areas of otherwise-usable land concreted, carbon expended on building, maintaining and dismantling wind mills, backup power required to buffer against weather conditions, and the like. I haven't seen any comparison of various energy forms with all the costs included, but would certainly like to take a look at one.

[edit:

A quick search led me to this: http://www.nrdc.org/nuclear/pnucpwr.asp

It seems that while existing nuclear power plants (constructed over 3 decades ago) provide marginally cheaper electricity than fossil fuel based powerplants, new nuclear powerplants are indeed not viable economically, at least as compared to fossil fuels. The report suggests that including a carbon emission tax of $100/tC will bridge that gap.]

[another edit:

A paper (http://gabe.web.psi.ch/pdfs/Annex_IV_Dones_et_al_2003.pdf) claiming that total carbon footprint of nuclear power, from mining to waste disposal, is in the range of 6-12g CO2-equivalent per kWh, mostly attributable to mining, compared to 500g/kWh for natural gas and >1000g/kWh for coal.

Hydro weighs in at anywhere from 3 to 3000g CO2-equiv per kWh depending on region (alpine hydro stations are clean, flooding tropical forests is not) with weighted average somewhere in the 300g range, wind is at 14-21g/kWh depending on weather conditions, and finally solar at 79g/kWh with potential to fall to 30-40g with future technologies.

The concluding graph shows only [European] hydro beating nuclear in terms of total carbon footprint.

Lots of other interesting reports on that site (http://gabe.web.psi.ch/research/lca/), most offering similar results. One 2007 paper also considers land use, ecotoxicity, and radiation emissions, allowing certain types of wind generators to approach nuclear in terms of total environmental impact. Solar is still way off due to high levels of inorganics and toxic non-greenhouse air pollutants. ]

sratner··on The Hydrogen Hoax
> but fossil fuels are also much more widely used (I imagine by several orders of magnitude)

True. Also consider the relative efficiency of the generation methods. Supplying the world's demand for energy with nuclear power would probably require far fewer powerplants than doing so by other means.

> I guess if reactors were located on land that was already unusable (eg. desert, esp Antarctica)

Except for the melting of the Antarctic ice and all that, in case of an accident :) Most technology seems to involve a trade-off of evils.

sratner··on Culprit found for lower sperm counts: soy (contains estrogen-like chemical)
> Really? Dangerous? Like loaded gun in the hands of an angry monkey dangerous, or just riding a bike while wearing flip flops dangerous?

Neither. More like making generalisations dangerous (Although I am sure you will be able to pick apart my post to find plenty of generalisations, too).

> The average American diet is, to use your inflammatory language, "outright suicidal for an average middle-American". It's high fat, high sugar, low fiber, and low in nutrients (unless "fortified" with artificial concentrations of vitamins and minerals), and it is nothing like previous American generations diet.

I did not at any point advocate that Americans eat the average American diet. Nor did I mean any offense to America, merely to the diet. I don't eat such a diet, nor do I eat the average Russian diet since leaving that region. The point I am making is that accepting any extreme view on dietary requirements is a strange thing to do considering how little we understand about the workings of our metabolism, regardless of how many cultures have enjoyed such a diet for countless millennia. [edit: I realise you did not advocate such a position, either. But plenty of people misinterpret statements like the one I quoted to do just that.]

I am sure tofu is great, and has lots of science behind it. So does consuming red meat. Or milk. They also have lots of science pointing to the contrary. But most of those scientific arguments apply to extreme cases. In the right environment, eating an occasional steak will not give you a heart attack or colon cancer, just as eating a few soy beans will not make you impotent. But excluding foods on the basis of current scientific understanding strikes me as more damaging, if it turns out that those foods carried nutrients we previously did not understand. Of course, dietary requirements based on religious or moral principles are something else entirely.

Seems like we agree on the general principles, the devil is in the implementation details, and one's risk profile.

sratner··on The Hydrogen Hoax
Here's a nice list: http://en.wikipedia.org/wiki/Chernobyl_disaster#Comparison_w...

Several of those disasters, of scales arguably larger than Chernobyl, were caused by attempts to generate power. And although I do not have any evidence to back this, I suspect the total number of casualties resulting from burning fossil fuels over the past century far exceeds that from nuclear power related accidents.

The one aspect of nuclear accidents I'd be willing to concede is the long-term contamination of the area, but while rendering chunks of land unusable, it is not a direct threat to life.

sratner··on The Hydrogen Hoax
Nuclear reactors. See above.
sratner··on The Hydrogen Hoax
I suspect any engineer in a position of sufficient power did know about this, but no orders were given to upgrade the process appropriately, or, gasp!, take the reactor offline; doing so would be equated to admitting defeat of the Soviet nuclear physics program, a result that was very clearly unacceptable.

And let's not forget that a large fraction of casualties after the Chernobyl accident is attributable to the fact that the general public was not informed for an entire day after the accident, in fact not until a powerplant in Sweden reported heightened radioactivity levels. This, with Kiev, Ukraine's multi-million capital, only 100km from Chernobyl.

sratner··on Culprit found for lower sperm counts: soy (contains estrogen-like chemical)
> As you note, if the Chinese can eat it for thousands of years without negative impact, I reckon it's safe.

That's a dangerous statement. Your lifestyle is different to the lifestyle of the Chinese over the past few millennia.

People in northern Europe eat very large quantities of cholesterol-rich foods: salted/cured pig fat, and a thick meat-based jell-o made by boiling pig legs for hours, are two popular dishes in Russia. This diet is not only tolerable, but is recommended during the colder months, as (1) fat is the best energy store we have, and (2) cholesterol reduces the freezing point of lipid cell membranes, helping maintain their fluidity. On the other hand, such a diet would be outright suicidal for an average middle-American.

The same cultures also eat large quantities of heavily-salted preserved vegetables during the winter; the salt is not particularly good for you, but the negatives are outweighed by the benefits of vitamins in the vegetables, which would otherwise be unavailable in the winter months. Again, not recommended for the average American who has access to fresh fruit and vegetables all year.

In Australia, people are hospitalised every year from over-eating after a rich Christmas turkey meal in 40C heat. The tradition evolved in the English winter, where energy demands are higher and digestive systems operate at a greater efficiency.

I do agree with you on the fads. Human metabolism is still sufficiently misunderstood that any claim that advocates particular extreme dietary behaviour will ultimately be proven wrong. The sequence of events usually goes something like this: x provides essential nutrients -> x is added to every product on the market -> scientists claim x causes cancer! -> scientists discover a way to emulate x with y, a healthy alternative! -> y is added to every product on the market -> scientists claim y causes cancer! -> ...

Those claim are generally true, technically. Everything you eat kills you; the trick is balance and moderation.

sratner··on Google: We knew the web was big...
"Except it'd be a map about 50,000 times as big as the U.S., with 50,000 times as many roads and intersections..."

Great! So now, all you have to do is give some sort of a comparison that lets people visualise exactly how big an area 50,000 times the size of U.S. is. May I suggest a metric based on whales?

← PreviousPage 4 of 5Next →