What is Hindley-Milner and why is it cool? (2008) - <AUTHOR> http://www.codecommit.com/blog/scala/what-is-hindley-milner-and-why-is-it-cool <comment><USER2> Hindley-Milner is cool, but if you're planning on implementing a language with type inference, I strongly suggest you take inspiration from bidirectional type inference, notably Pierce-Turner[1] and subsequently Dunfield- Krishnaswami[2]. These algorithms are capable of inferring much more complex types and generally produce better error messages. Typically, there are very few programs which can't be typed when you combine Dunfield-Krishnaswami type inference and have the user place annotations on major function definitions.

[1] [http://www.cis.upenn.edu/~bcpierce/papers/lti- toplas.pdf](http://www.cis.upenn.edu/~bcpierce/papers/lti-toplas.pdf)

[2] [https://arxiv.org/pdf/1306.6032.pdf](https://arxiv.org/pdf/1306.6032.pdf)

<comment><USER3> What does "bidirectional" mean in this context?

<comment><USER4> It means check both ways

        Gamma |- e => t

Given Gamma (the environment) and e, you want to derive the type t (bog standard type inference).

The other direction also holds:

        Gamma |- e <= t

Now we want to ensure that e conforms to type t.

Consider for example, a function:

        func foo(a) b

and an expression that we know the type of already:

        e <= a

Therefore we can say when we apply `foo` onto `e`, we'll yield something of type `b`

In effect, you perform 2 passes: forwards inference, and then backwards inference.

p/s: I'm not actually a PL person. This is from my casual reading, so my understanding is highly probably very wrong

</comment></comment></comment><comment><USER5> The trend seems to be for languages to have forward inference of types within functions, while declaring them in function definitions. Assignments which initialize a variable also implicitly declare its type. C++ started this with "auto", but it's really because programmers had become used to dynamic languages where assignment set type. Go and Rust both do this.

Inferring types of function parameters and results isn't as useful. Combined with generics, it gets really complicated. It seems better to have those declared explicitly. Programmers need to be able to read function signatures when programming. They're an essential part of the documentation. Also, whole- program type inference and separate compilation inherently conflict.

That's pretty much where things seem to be settling out. Even Python now has optional type declarations for function signatures.

<comment><USER6> _> The trend seems to be for languages to have forward inference of types within functions, while declaring them in function definitions. Assignments which initialize a variable also implicitly declare its type. C++ started this with "auto", but it's really because programmers had become used to dynamic languages where assignment set type. Go and Rust both do this._

Note that this is quite different to, and simpler than, HM inference. It doesn't require unification like the article describes and is something all statically typed languages practically have to do anyway: even with full annotations, validating `T x = f()` (or equivalent) requires type checking the `f()` expression to see that it actually is a T. And thus, this style of "inference" can be gained by simply not requiring the T type to be written and just taking the result of type checking `f()` as gospel, and is what C++ and Go do. (There's a bunch of subtlety/complexity for this in C++, but that's due to C++, not this form of "inference".)

Proper HM (or similar) type inference will use information from how variables are manipulated after their declaration to decide on the type, and so is more than what's already done for the purposes of type checking. This is what Rust does, breaking the supposed trend.

<comment><USER7> Although even with local type inference you usually want to do some unification based inference also, at least to infer the type arguments for generic functions. But it's still simpler than inferring the most general types for functions themselves.

</comment></comment></comment><comment><USER8> One drawback of the Hindley-Milner type system is that its typecheckers are necessarily non-compositional. The basic idea here is that this can result in "non-symmetrical" error messages[1]: given something like

        MkPair :: a -> b -> Pair a b
        not :: Bool -> Bool
        succ :: Int -> Int

        foo x = MkPair (succ x) (not x)

the error message will either complain that `x` has type `Bool` but it should be `Int`, or it will complain that `x` has type `Int` but it should be `Bool` -- depending on what implementation you use! For example, in Haskell, Hugs 98 will emit the first error message, but GHC 7.10 will emit the second (see the full example in my slides[2]). And in some sense, neither is right (and certainly neither is as helpful for the programmer as it could be).

So next time you're implementing vanilla HM, maybe consider a compositional type system[3] instead, which can give the following, much more informative error message:

        Cannot unify 'Int' with 'Bool' when unifying 'x':
        Cannot unify 'Int' with 'Bool' in the following context:

               MkPair (succ x)        (not x)

               Bool -> Pair Int Bool  Bool
          x :: Int                    Bool

I have a simple implementation here[4], and am about to release a new version which works on `haskell-src-ext`'s AST to support more of Haskell 98 syntax (but still for vanilla HM only).

[1] [https://gergo.erdi.hu/blog/2010-10-23-the_case_for_compositi...](https://gergo.erdi.hu/blog/2010-10-23-the_case_for_compositional_type_checking/) [2] [https://gergo.erdi.hu/talks/2016-06-compty/CompTy.pdf](https://gergo.erdi.hu/talks/2016-06-compty/CompTy.pdf) [3] [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.25.8...](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.25.818) [4] [https://github.com/gergoerdi/hm- compo/blob/master/src/Langua...](https://github.com/gergoerdi/hm- compo/blob/master/src/Language/HM/Compositional.hs)

</comment><comment><USER9> Hindley Milner is awesome and surpursingly not super hard to implement. Shameless plug: Wrote a minimal implementation in OCaml back in college [https://github.com/prakhar1989/type- inference](https://github.com/prakhar1989/type-inference)

<comment><USER10> I first became interested in programming language theory back in high school when a guy in an IRC chat, who was a student at UIUC, asked me to do his homework for him. The assignment was to implement Hindley-Milner type checking with unification in OCaml. Thanks, lazy IRC guy!

<comment><USER11> Wow, good for you, ridiculous for the student's integrity; from UIUC also.</comment></comment></comment>


Yahoo, Twitter, Google talk BOSS [video] - <AUTHOR> http://jellytalks.yahoo.com/

<comment><AUTHOR> Mis-titled article: talk mostly covers real-time and streaming search vs "web search".</comment>


Ask HN: where to get customer opinion for early concept? - <AUTHOR>

In the "Startup Owner's Manual", Steve Blank stresses plenty the need to get out of the building and get customer feedback about anything it is that you're doing.
In the case of my product (we're still in customer discovery phase), it's tentatively aimed at stay at environmentally friendly stay at home dads or moms. The problem is that being in the SV tech bubble, and only ever interacting with tech people and entrepreneurs, we're having a hard time getting an idea if that's a good product/market fit. We're in fact going close to nowhere.
I'm an engineer who's just now starting to figure out how to be a "hustler", and so I'm pretty fresh when it comes to getting random people's opinions. Where should I go? I'm thinking either online forums (again, probably my tech bias showing), or in person at stores (can't imagine this would have worked well for companies like IMVU and Stardoll, chasing 13yo girls down Toys R US aisles for customer validation) or some other meetings of our hypothetical core user. I think the guys from Food on the Table went to some kind of homeowner meetings and tried to pitch their idea there.
Any suggestions? <comment><USER2> I'd suggest going to parks with playground equipment during the day monday to friday.

Also run it by stay at home mom/dad bloggers.

Buy some ads on Facebook with a targeted demo.

Talk to sellers of childrens' items on etsy.</comment>


It is unlikely that built-in email encryption will ever be available in Gmail - <AUTHOR> https://tutanota.com/blog/posts/gmail-end-to-end-encryption-is-dead/ <comment><USER2> > While it is possible to encrypt certain emails in Gmail with GPG, Google can > still read all email meta-data such as email addresses and subject lines. > Better use a Gmail alternative that encrypts your entire mailbox and > contacts automatically.

This is nonsense. Any email service will be able to see the recipients (and senders) of your messages, because that's how email works. Subject lines too, again, because that's how email works.

E2E encryption of email is a good thing, GPG is hard. These things have be true forever.

<comment><USER3> This.

Can we please kill the idea of "safe email" forever. Email leaks like a sieve. In fact, It would be interesting to see if the Carbon Copy (CC:) feature of email violates GDPR.

<comment><USER4> 100% agree. I remember a friend who typed in SMTP commands to send his dad a Christmas email from firstname.lastname@example.com.

There are alternatives, they just haven't caught on as an email replacement. For example, I suspect the Extensible Messaging and Presence Protocol (XMPP) can do everything email can do, and it supports E2E encryption. XMPP addresses would still be exposed, as any messaging needs the message routing information decryptable by the server, but much better that email.

<comment><USER5>
        > telnet mailserver.com 25
        HELO me
        MAIL FROM: email@example.com
        RCPT TO: email@example.com
        DATA
        You've been a good boy.
        Santa
        .

<comment><USER6> Syntax error.

<comment><USER5> Good call, needs more colons.

</comment></comment></comment></comment></comment></comment><comment><USER7> This is a promotion article for an end-to-end encrypted mail service called tutanota. They claim that google abandonment of the mail encryption project impiles that gmail encryption will necessarily never be available for gmail users.

</comment><comment><USER8> It was dead the moment they put it on Github. Their blog post[1] claimed:

> E2EMail is not a Google product, it's now a fully community-driven open > source project, to which passionate security engineers from across the > industry have already contributed.

But looking at the commit history[2] makes it clear that was not the case at all.

Although this post is by Tutanota (and I can't tell if Tutanota supports PGP), Protonmail does support PGP emails.

1: [https://security.googleblog.com/2017/02/e2email-research- pro...](https://security.googleblog.com/2017/02/e2email-research-project-has- left-nest_24.html)

2: [https://github.com/e2email- org/e2email/commits/master](https://github.com/e2email- org/e2email/commits/master)

<comment><USER9> All email services selling encrypted email as a service are snake oil in my opinion.

You won't gain anything more than when using GPG by yourself, except you're now trusting a third-party app to do it for you, using a non-standard adapter for allowing IMAP / SMTP apps to still work while at the same time obscuring the fact that end-to-end encryption will only happen when the recipients support it as well, which is at most 1% of all recipients you're communicating with.

</comment></comment><comment><USER10> I know it's a bit old, but since I read this I cannot possibly take Tutanota seriously on anything crypto:

[https://tutanota.uservoice.com/forums/237921-general/suggest...](https://tutanota.uservoice.com/forums/237921-general/suggestions/7858974-tutanota- is-using-unauthenticated-aes-cbc-encrypti) [https://seclists.org/fulldisclosure/2015/Jun/58](https://seclists.org/fulldisclosure/2015/Jun/58)

</comment><comment><USER11> The article has a point but do know that Tutanota is using their own custom encryption scheme. I can understand they don't want to support PGP if they have something better but judging from their FAQ [0] they just replicated what PGP already can do [1] [2] effectively reinventing square wheel.

As for browser encryption Mailvelope [3] works and can even use local GnuPG (through NativeMessaging). FlowCrypt [4] is a little bit more tightly integrated with Gmail (through their API).

[0]: [https://tutanota.com/faq/#pgp](https://tutanota.com/faq/#pgp)

[1]: "That's why we have developed a solution that is also based on recognized algorithms (RSA and AES) and that automatically encrypts the subject, the content and the attachments."

[2]: [https://github.com/autocrypt/memoryhole#memory-hole- protecte...](https://github.com/autocrypt/memoryhole#memory-hole-protected-e- mail-headers)

[3]: [https://www.mailvelope.com/en](https://www.mailvelope.com/en)

[4]: [https://flowcrypt.com/](https://flowcrypt.com/)

<comment><USER12> Hmm. Solutions like signal or whatsapp also used their "own custom encryption scheme" (in that sense), instead of PGP.

I'm not sure PGP is actually good enough that alternatives aren't desirable. Here's a Wired article saying "PGP is dead... use Signal for your encrypted messaging instead": [https://www.wired.co.uk/article/efail-pgp-vulnerability- outl...](https://www.wired.co.uk/article/efail-pgp-vulnerability-outlook- thunderbird-smime)

Here's respected cryptographer Matthew Green saying PGP is "a model of email encryption that's fundamentally broken" in 2014. [https://blog.cryptographyengineering.com/2014/08/13/whats- ma...](https://blog.cryptographyengineering.com/2014/08/13/whats-matter-with- pgp/)

I think there was another more recent "what's the matter with PGP" post I saw on HN, I found these above while trying to see if I could remember what I saw more recently.

<comment><USER11> > Solutions like signal or whatsapp also used their "own custom encryption > scheme" (in that sense), instead of PGP.

But Signal's "own custom encryption scheme" have obvious advantages over PGP, for example forward secrecy. That's what I meant by "I can understand (...) if they have something better".

In Tutanota's case judging from their public descriptions the scheme doesn't have any advantages over PGP as it is currently used.

Implementing custom crypto usually ends up with something like this: [https://tutanota.uservoice.com/forums/237921-general/suggest...](https://tutanota.uservoice.com/forums/237921-general/suggestions/7858974-tutanota- is-using-unauthenticated-aes-cbc-encrypti)

<comment><USER12> If you're providing an encryption service and not doing it well, that's certainly a problem.

There are various levels of "custom". I'm not sure anything that isn't PGP is "implementing custom crypto" in the same way; you could be using a good crypto library like NaCL -- or not -- for instance.

But you gotta know what you're doing. With so much critique of PGP though, I'm not sure "using PGP or not," or suggesting that using PGP is the obvious way to go, is the right line to be drawing.

But yeah, that link you provide to an issue does not one make confident that tutanota has the proper staffing to do crypto right.

</comment></comment></comment></comment><comment><USER13> In the meantime I'm using mutt on the desktop on K9 on Android. I have to say that K9 is brilliant (mutt less so, but I like it ;-)). It's the closest "it just works" E2E mail client I've ever used. Unfortunately the reality of PGP is that it's hard for a normal person to use, although I've got my Dad using it for all of our email.

</comment><comment><USER14> We need the Dark Mail Alliance more than ever.

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

[https://darkmail.info/downloads/dark-internet-mail- environme...](https://darkmail.info/downloads/dark-internet-mail-environment- june-2018.pdf)

[https://github.com/lavabit/](https://github.com/lavabit/)

</comment><comment><USER15> GPG is hard for some, but 7-zip is easy for most. Not perfect, but perfect is enemy of good. Just put your email, files, whatever in a 7-zip encrypted and compressed file and email that.

Tell your friend the password over voice chat, or some other chat that is in no way related to your mail provider. Even a weak password is better than trusting the mail provider to handle this job. Here is a 7-zip file with a very simple password. [1] Please reply with the contents of the text file in the 7z.

[1] - [https://tinyvpn.org/5/e/f/5efed61e6efe235d965547999292279e.7...](https://tinyvpn.org/5/e/f/5efed61e6efe235d965547999292279e.7z)

</comment><comment><USER16> If all one wants to do is communicate securely with another person and what your typing is private but not "illegal", then why even send email. Simply use the Drafts in GMail. Compose an email and leave it in Drafts. Each person amends the draft and they can agree on times to check and update. This has been done with great success before if you want nothing "going across the wire" so to speak.

</comment><comment><USER17> Advertisement for tutanota. Just use GPG like everybody who knows what they're doing.

</comment><comment><USER18> Mass surveillance is kinda Google's model

</comment><comment><USER19> So, I'm sure this idea has holes all over it, but how about a very simple service that you log into with your PGP public key, then would allow you to post encrypted messages to other PGP public keys and retrieve messages posted to your public key. It could be fully anonymous, depending on your choice of keys. It would be very similar to the mixmaster remailers, except it wouldn't actual mail anything as it wouldn't have any identifiable information other than the public key.

<comment><USER20> PGP itself leaks a huge amount of metadata. A known problem on open mailing lists and Usenet.

</comment></comment><comment><USER21> Why not something like Let's Encrypt, but for S/MIME?

<comment><USER22> That's actually what a Swiss startup called Vereign seems to be working on: [https://medium.com/@ggreve/nobody-cares-about- signatures-a56...](https://medium.com/@ggreve/nobody-cares-about- signatures-a56505b8ce04)

</comment></comment><comment><USER23> "shows where Google's real interests are: Not in protecting their users' private data, but in harvesting it for their own benefit."

Well, Duh. That's the deal. "in exchange for this service we will scrape your data in order to serve ads". If you don't like it go somewhere else. Google doesn't owe you a free email service.

</comment><comment><USER24> The problem with Email is that it's routed, store and forward, whereas there's no reason why it shouldnt be point to point.

If you wanted to revolutionize email then you'd create a point to point email service.

<comment><USER25> There's a reason peer to peer isn't seen as a great idea for messaging and that reason is it's been tried many, many times and it doesn't work well. For some people it just won't work well ever. Furthermore, it doesn't mesh with the expectations most people will have of a mail service (you push the mail out and it will arrive some day regardless of what you do), which makes it a bad fit for the use-case to begin with.

</comment></comment><comment><USER26> I'm not a fan of email, and not only because of security / privacy. Yes, it's ubiquitous and convenient; and great for quick simple messages.

But it's not (in a biz / life context) a project management tool. So aside from "where do you want to go for lunch?" the appropriateness of email breaks down pretty quick. Unfortunately, the habit and convenience not so much so.

Ideally, we're nudging towards a tipping point where email gets replaced by more appropriate (planning and proj management) tools - even at the personal level.

<comment><USER27> I'm not a fan of cars, because they don't perform well in lakes. I'm hoping we're moving toward a world where we use different tools for different tasks. Something engineered to float would be much better, in my opinion.

<comment><USER26> Yes! Thank you for proving my point[1]!!

That is, at this point email is the internet equivalent of a fax machine. It's a hammer (or car) that most are using as a screwdriver (or boat). Factor in the lack of security / privacy and email should be marginalized, just as the fax machine was.

[1] Yes, I realize it was not your intent. But the fact is, your analogy is a good one for the point I'm trying to make.</comment></comment></comment>


Ask HN: Best environments to hack in SF - <AUTHOR>

Hi all,
I'm in SF for two months to explore and take some time out to work on personal projects and I'm looking for some nice places to hack on my projects.
Places with WiFi are preferable but not a necessity. I'm just looking for good environments from calm to busy. So if anyone has any good well known/not so known spots, please share :)
Thanks! <comment><USER2> I worked on a startup for a month from the SF public library near the Civic Center. The trick is to go up to the 4th floor, where they have some really nice reading rooms with power and free wifi, and pretty nice views of the outside. Good light, too. Just make sure to empty your bladder before coming, because you sure _as hell_ don't want to use the restrooms (I've seen homeless people bathing in the sinks).

</comment><comment><USER3> If you're willing to go to Mountain View, as suggested by jwb119, Hacker Dojo (<http://hackerdojo.com>) is a much better choice IMO than Red Rock. Don't get me wrong, Red Rock is probably the best of the downtown MV coffee shops and I worked there many mornings before the Dojo opened, but the Dojo is much larger, has far less ambient noise and the people are much more amenable to conversation.

</comment><comment><USER4> The POPOS.

<http://www.spur.org/files/u7/POPOSGuide.pdf>

</comment><comment><AUTHOR> Wow, thanks for the great responses!

I will definitely head up to the public library near the civic center and checkout the POPOS guide.. great information :)

As for the hackerdojo, I already plan on heading there but wont be down that way for a couple of weaks yet..

</comment><comment><USER5> Seconded on the library - make sure to get a card and access their on-line catalog - besides the HUGE computer book section in the library itself there are many e-editions available for on-line patrons.

</comment><comment><USER6> Not technically SF, but if you are down in the Valley you have to check out Red Rock Coffee in Mountain View at least once. Great spot.</comment>


March reports show economic hit swifter and deeper than expected - <AUTHOR> https://www.cnbc.com/2020/04/15/the-economic-data-is-even-worse-than-wall-street-feared-the-economy-is-clearly-in-ruins-here.html <comment><USER2> Nobody is working anymore, and nothing is produced anymore, and people are surprised that the economy "took a hit"?</comment>


Why doesn't Google Docs work on iPad? - <AUTHOR> http://www.itworld.com/internet/104477/why-doesnt-google-docs-work-ipad <comment><USER2> The author assumes this is Google's doing, and not Apple's. For all we know, Steve Jobs is hitting below the belt with this one.

<comment><USER3> Apparently the iPad doesn't support the contentEditable attribute, which would be pretty damaging to Google docs I would think.

<comment><USER2> An intentional move on Steve Jobs's part to stifle competition to iWork?</comment></comment></comment>


UbuWeb, the 20-year-old website that collects the forgotten and the unfamiliar - <AUTHOR> http://www.slate.com/articles/technology/future_tense/2016/12/ubuweb_the_20_year_old_website_that_collects_the_forgotten_and_the_unfamiliar.html <comment><USER2> Nice to see an archive of old art presented for the love of it, however the selection is rather eccentric and the navigation bespoke.

IMHO some modern discovery features such as tag clouds, multi-category ontologies or a custom search could really keep eyeballs, especially since huge numbers of recent uploads are films and the collection spans other media.

Then again, the site's own aesthetic seems to be anti-fluff, so perhaps that's supposed to be part of the attraction.

<comment><USER3> There have been various modernization attempts over the years, all stymied by a lack of time/money/labour. If someone wanted to take on this project, it certainly deserves the attention.

</comment></comment><comment><USER4> Ubuweb was my go to resource when I was getting my MA in poetry. Not sure if some of the work is still on there (content rotates in and out), but I got to know the work of bp nichol on there. He was a poet that I think would appeal to the HN crowd. In addition to his sound poetry and concrete poetry, he was an early digital poet, and his piece _First Screening_ is available via emulation and reproduction here: [http://vispo.com/bp/introduction.htm](http://vispo.com/bp/introduction.htm)

</comment><comment><USER5> ubuweb is a fantastically deep and broad archive with resources often hard to find elsewhere. check out the films section [1]- i feel any site with laurie anderson, alvin lucier, cory arcangel, and kenneth anger for free deserves your love and support.

[1] [http://www.ubu.com/film/](http://www.ubu.com/film/)

</comment><comment><USER6> Few know it hosts the single greatest artistic accomplishment by any human being on this solar system or any other: The Man Within[1] by Sean Landers, perhaps the finest human being in our time.

[1] [http://ubu.com/sound/landers.html](http://ubu.com/sound/landers.html)</comment>


Show HN: Reach more people with a Share-to-Gmail-contacts button - <AUTHOR> http://gmailsharebutton.com/

<comment><USER2> This is one of the scariest buttons I've ever seen: When would I ever want to email everybody in my Gmail contacts list? _everybody_??

<comment><AUTHOR> Is it really so different from sharing something on facebook?

From my experience regular users sometimes prefer sharing with everyone instead of taking the time to select specific contacts. They don't really care, it's just email...

<comment><USER3> I've opted-in to be friends with someone on Facebook. I've opted-in to follow someone on Twitter. I have not opted-in to be in someone's contact list on Gmail. That's the big difference.

<comment><AUTHOR> But you gave the person your email address. He wants to send you an email. I just help him fulfill his wish...

<comment><USER3> No I didn't. There's nothing stopping someone from finding my email address and sticking it in their contact list. How do you think spammers get email addresses in the first place? People give them their email addresses?

<comment><USER4> I concur 100% with CanSpice.

I saw the email from a contact, clicked through and saw that your app only asks for "view contacts" so I though I'd be able to choose to whom I'd send an email or at least have some kind of confirmation before all of a sudden "BAM" you send thousands of emails to everyone I've emailed in the past 5 years.

That's really bad. You have to improve the UX/UI so that there's a bit of granularity and more transparency otherwise, you're going to lose your Google API access... or simply disappear as everyone marks your emails as spam.

<comment><AUTHOR> I hear what you are saying. I'll think about adding another confirmation screen after the authorization.

<comment><USER4> I think this is a minimum. Optimally you'd have a UI which allows you to choose with whom to share... otherwise it's simply not pertinent for so many people and thus simply spam.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER5> Even if I did want to share something with all my contacts on Gmail, the other challenge is that Gmail considers EVERYONE you have ever emailed a "contact". That's hundreds and hundreds of people, old mailing lists, etc. etc. that are on there. It's not a "contact list", it's a list of everyone I have ever contacted.

</comment><comment><USER6> Anything sent to more than around 25 contacts is marked as spam in gmail, is there a way to get around that?

<comment><USER7> Sure -- just move to a small, isolated foreign country and set up an email distribution system that relies on compromised windows machines (i.e. bots) instead of your Gmail account.

In other words, these limits are in place for a reason. If the Gmail ecosystem didn't stop you from sending 25 simultaneous emails, you might lose all your friends instead.

</comment></comment><comment><USER3> This is nice and all, but I really hope nobody who has me in their contacts ever clicks that button.

<comment><AUTHOR> You need to think about it from the perspective of site-owners, not of email recipients ;-)

<comment><USER3> You (and I'm assuming you're the person who came up with this) need to think about it from the perspective of email recipients, because they're the ones who are going to be directly affected by this button.

You don't say at all how this works. Do you scrape the email addresses? What does the email look like? Does it have any sort of opt-out mechanism?

How do emails sent by this conform to Canada's anti-spam legislation, or any other country's anti-spam legislation?

<comment><AUTHOR> There's no scraping going on. I'm using Google's Contacts API, with authorization from the user who clicks the button.

Currently the email is plain-text, but in the future paying customers can customize the email sent

You can opt-out simply by filtering out emails sent from your past contacts, who you do not wish to receive emails from.

<comment><USER8> This is not legal in some countries.

While your customers are the ones breaking the law you might find your network access increasingly restricted.

I wish there was a better version of NANAE still around.

<comment><AUTHOR> I don't know if it's illegal. I do know that it's perfectly moral. I mean, it's just email... It's not like I'm tricking people into giving me money...

I think responses in this thread are somewhat lacking a sense of humor

<comment><USER8> If it's a joke site then well done, v funny.

But if it is a joke site it's attempting to parody bad marketers and they are viciously stupid and thus your parody is indistinguishable from stuff they actually do.

Project Gutenberg started when Michael Hart tried to email copies of the American Declaration of Independence to everyone on his local network; they were not amused and so he set up a website instead.

The first commercial email spam was probably the DEC spam to all Arpanet. [http://www.templetons.com/brad/spamreact.html](http://www.templetons.com/brad/spamreact.html)

If you do not have a confirmed, opt-in, agreement with people you're sending bulk email to you need to be very careful or you risk losing internet connectivity. You're not warning your customers about that.

You're also violating parts of Google's tos. Lucky for you Google refuse to take any form of contact from the outside world so your service will survive until someone there notices it.

</comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> I would love to hear your feedback.

Would you consider putting this on your site? If not, why?

<comment><USER9> You might want to check your spelling in your signup.

You put 'you' instead of 'your'.

<comment><AUTHOR> you're right, thank you!

</comment></comment></comment><comment><USER10> sooo... this is just a way for you to collect email addresses and annoy people, right?

<comment><AUTHOR> I most certainly do not intend to collect email addresses!

Regarding annoying people, however,...

<comment><USER11> however what?</comment></comment></comment>


Ask HN: Getting started with TDD as a lone developer (without a job)? - <AUTHOR> During a few recent job interviews, I've gotten the impression that most companies have hit warp speed in development practices, compared to the last places I worked for. They ask me TDD-related questions. I know vaguely what it's used for but I don't have any concrete experience with it. No single company I have worked for uses TDD!<p>It's one of the many things that is keeping me from getting my next software engineer offer (and working as SDET is out of the question obviously). So where to get started with it? How do I know which testing framework to choose? For reference I want to use it with JavaScript and C# as I'm more familiar with those two languages. <comment><USER2> Not the right languages, but if you want to see TDD being done, deeply, there's a guy, Brett Schuchert, who has some very detailed videos where you watch him do it and he explains what he's doing and why.

He has an 11-video series on using TDD in Java to create an RPN calculator and a 3-video set for a C++ dice-game example.

(I suspect it might be helpful to duplicate his setup and to actually follow along, doing what he's doing, to really get the full mileage and not just to passively watch.)

Again, not the languages you are interested in, but once you get TDD in your head, I expect translating the knowledge to other languages/test-frameworks would be pretty easy. (As to which frameworks to choose, you can probably Google that up pretty easily).

His video albums of this stuff are on Vimeo here:

[https://vimeo.com/user3159463/albums](https://vimeo.com/user3159463/albums)

P.S. If you Google: site:youtube.com TDD C# (or Javascript) or site:vimeo.com TDD Javascript (or C#) you'll find a whole bunch of videos.

Here's a 2 hour C# TDD video: [https://www.youtube.com/watch?v=pzonnSyqVfc](https://www.youtube.com/watch?v=pzonnSyqVfc)

On Vimeo there are many videos too, including a Javascript TDD of Fizzbuzz and also a TDD calculator kata.

Again, might best to do it along with the presenters and not just watch the videos.

Good luck.

</comment><comment><USER3> If you're going to learn TDD - then I suggest you learn who "Uncle Bob" (Robert C. Martin) is.

Watch a few of his videos, read his blogs, etc - it will all become clear.

It will also sound completely insane, if you are already used to coding and writing tests.

But give it a shot. Once you get past the awkwardness of it, you will be amazed at how well it works.

Is it the be-all-end-all for testing and development? No - it isn't. But if you're going to learn it, getting it from Bob is not a bad way to go about it.

</comment><comment><USER4> I think a lot of companies write tests nowadays but only a small number of them actually do true TDD.

TDD can be actually counter-productive unless you have a very clear spec, which is never the case. There's a reason why TDD is evangelized by agencies.

That said, I think it's good to learn testing just for the heck of it, you'll get used to it after you start writing a few. For JS try mocha

<comment><AUTHOR> Thanks, I'm gonna try out Mocha. I think it was briefly mentioned for a coding test I once did.

I have worked for two web agencies (we do mostly CMS re-skins and custom websites for small clients) but TDD isn't really pushed there. Nobody talks about automated testing or writing tests.

Our QA does all the testing, to give us the thumbs up (or down) that it's good to push the code to the master branch.

Managers just expect the developers to finish the tasks given from a certain deadline and lack the technical knowledge to give input on how to improve the development process. If you tell them that we need to write tests, they will ask, how does that increase customer satisfaction? Because of this I believe that the need for TDD, or even just writing tests is a hard sell at many companies.

</comment></comment><comment><USER5> It sounds like you need to learn how to (programmatically) test your software, not learn TDD. Have you written tests before?

<comment><AUTHOR> I haven't learned or found a use for writing tests. It seems like it only comes into its own with large code bases, where I don't have much experience in.

It's not really something that was talked about or used at my previous jobs, either. We just had one QA guy doing manual testing whenever we notify him that a ticket has been resolved.</comment></comment>


Candid thoughts about a $200 million dot.com bust -- The CueCat. - <AUTHOR> http://whoishuttonpulitzer.com/2011/11/13/who-is-hutton-pulitzer-cuecat/

<comment><AUTHOR> Insider info about meetings and dealings with Microsoft, Warren Buffet, Mark Cuban, Todd Wagner, and how the technology now powers more than 150,000,000 devices, yet the company still tanked. Very interesting info that has never been revealed before.</comment>


500 Greatest Rock Albums of All Time - <AUTHOR> http://www.rollingstone.com/music/lists/500-greatest-albums-of-all-time-20120531

<comment><USER2> I hate that Rolling Stone cannot seem acknowledge that rock (or music in general) has actually continued to be good since the 70's.</comment>


Show HN: Get SMS reminders for dry days in India - <AUTHOR> https://drydayreminder.com/ <comment><USER2> Be aware that your robot detection will not work as it is:

* The question (and answer) is always the same * The answer is in the source code for the site * The answer is only checked in the frontend (so robots will never see it at all)

Effective anti spam should be done in the backend, as a spambot would just send HTTP requests directly to your backend.

<comment><USER3> Possibly intentional since this was on the front page a little while ago [https://kevv.net/you-probably-dont-need-recaptcha/](https://kevv.net/you- probably-dont-need-recaptcha/)

<comment><AUTHOR> Haha, yeah I read that exact piece.

</comment></comment></comment><comment><AUTHOR> The Problem: A bunch of friends and you land up at a bar/wine shop and it turns out to be a dry day and then you go - doh! (one friend even went to Goa for a weekend only to realise it was a dry day)

Solution: I decided to build this simple SMS based reminder service which would remind you of all the dry days in the year!

Let me know what you guys think!

<comment><USER4> What's a dry day?

I assume it means no alcohol, but worth making it clear on the site.

<comment><AUTHOR> I assumed here that potential end users in India would know what a dry day is. Maybe I'll revisit this assumption if more feedback like this comes in. Thanks!

</comment></comment></comment><comment><USER5> In India, we get so many spam SMSes that I've learnt to completely ignore that channel.

Must have a privacy policy and tnc.

Looks good though

<comment><AUTHOR> yeah, agree. But SMS was the quickest to get started - depending on traction - can add other channels as well - Email/Whatsapp/IVR/website notifications.

Yes, privacy policy seems to be universal feedback. Will add that for sure.

<comment><USER6> Email+Telegram would be best for me. I don't want to give my phone number

</comment></comment></comment><comment><USER6> A privacy policy would help me trust you a bit more.

Good hack!_

<comment><AUTHOR> yeah, gotta add a formal privacy policy. It'll look something like: \- Will never share your data without your _explicit_ consent

\- Don't use any 3rd party trackers (not even GA) so no data shared with them

\- Data stored in India (AWS) in a server owned by me

Anything else you think I should cover?</comment></comment>


Interview with Freeman Dyson, Reluctant Global Warming Skeptic - <AUTHOR> http://e360.yale.edu/digest/with-freeman-dyson-reluctant-global-warming-skeptic <comment><AUTHOR> Full interview: [http://e360.yale.edu/features/freeman_dyson_takes_on_the_cli...](http://e360.yale.edu/features/freeman_dyson_takes_on_the_climate_establishment)

</comment><comment><USER2> This will do ... [http://www.nytimes.com/2009/03/29/magazine/29Dyson-t.html?_r...](http://www.nytimes.com/2009/03/29/magazine/29Dyson-t.html?_r=3&pagewanted=all&ref=magazine&)

</comment><comment><USER3> From the interview:e360: Do you mind being thrust in the limelight of talking about this when it is not your main interest. You've suddenly become the poster child for global warming skepticism.

Dyson: Yes, it is definitely a tactical mistake to use somebody like me for that job, because I am so easily shot down. I'd much rather the job would be done by somebody who is young and a real expert. But unfortunately, those people don't come forward.

e360: Are there people who are knowledgeable about this topic who could do the job of pointing out what you see as the flaws?

Dyson: I am sure there are. But I don't know who they are.

</comment><comment><USER4> "Click here to read full interview"

takes you to..

"Sorry, we can't find the page you're looking for."

<comment><AUTHOR> Err thanks, correct link: [http://e360.yale.edu/features/freeman_dyson_takes_on_the_cli...](http://e360.yale.edu/features/freeman_dyson_takes_on_the_climate_establishment)

</comment></comment><comment><USER5> I think there is a general sense some scientists get in which they judge a field from the outside based on their contacts with it, reading a paper or two, attending some meetings or engaging in conversation with others and so on. I am just a graduate student, but I sometimes tell myself it was a good idea to bail from a high profile and stressful CMS (LHC detector) group looking specifically for supersymmetry. I took a look at their results at that point, the general progress of the search for any sign of SUSY, the group environment, the stress level, and the advisors, and from that I betted against them and switched groups. Today, I am very happy in my current field and as HEP funds dry up, I am relieved I made the switch.

But, if I'm very honest with myself, what the hell did I know then? I just made a bet and won, it may have been informed but it was still uncertain then. Survivorship bias is a bitch after all, right?

I am not aware of Dyson's full body of work, but I am of course aware of the one thing most people know him for, the famous Dyson series from which springs modern particle physics. Dyson is on the mathy side of science, so it's not too surprising that he feels uncomfortable with fudge factors and the lot of them in the less fundamental sciences. You can't model everything exactly down to the bone due to computational constraints, you have to approximate and sometimes be happy when you get within an order of magnitude. Mathematicians I know and particle theorists I know are _not_ comfortable with that. I at first wasn't when I switched to Laser Plasma and I still am not sometimes, but, it isn't completely arbitrary, the one saving grace that the more applied sciences have is we have experiment[0]. It's not that particle physicists don't have it, it's just that it requires the huge colliders which aren't that easy to make, while for Laser Plasma (my thing), you can shoot a target multiple times before someone can finish their simulations on a HPC system. For climate scientists, they have a wealth of history of temperatures to fit against and their predictions are surprisingly good. That to many of us is the gold standard, finding a model that fits the reality.

So fudge factors and fuzzy models are the norm in these parts, and how that would rub someone like Dyson the wrong way is understandable. Does that mean he's right? Dyson is extremely successful and one of my personal physics heros (right up there with Yang and Hermann Weyl) so perhaps he's come to trust that instinct where he might judge a field and bail (like it sounds like he did with modeling crowd, ironically, I'm in that crowd), but again, as an expert who doesn't know the deep facts, he is right when he says that he shouldn't be taken as a leading voice against it, especially when he doesn't want to be.

[0] (not counting the extremely messy systems like biologists or sociologists have. Weather is close, but climate I think is a little better)

</comment><comment><USER6> [2009]</comment>


DOJ Cautions Employers Seeking H-1B Visas Not to Discriminate Against US Workers - <AUTHOR> https://www.justice.gov/opa/pr/justice-department-cautions-employers-seeking-h-1b-visas-not-discriminate-against-us-workers <comment><USER2> The consulting firms have been abusing the H-1B system for years. I've been documenting it for couple years here: [http://www.jobsintech.io/immigration_companies#name=&city=&s...](http://www.jobsintech.io/immigration_companies#name=&city=&state=&page=)

You can clearly see that the top companies using H-1B visas are consulting firms.

<comment><USER3> A simple solution for the consulting companies would be a rule requiring all H-1B sponsors to have at least 51% of their domestic staff be US citizens. That would ruin the wacked out business model of the body shops and return to a fair playing field for Americans in their own country.

<comment><USER4> Not sure if that's sufficient, but I wanted to answer to your "Americans..." comment: This isn't just an issue for Americans, it's also bad for actually highly qualified foreigners and other companies. Because a few companies gobble up all the visas, the rest have to go through the lottery. Which actually makes it hard to hire highly qualified immigrants, because it takes agrees to see of you're lucky.

I've been through this, and it sucks. In the end I got another type of visa, but that cost a lot of energy and money.

<comment><USER5> Couldn't agree more. If anything, a lottery system encourages spamming candidates whatever quality over carefully selecting high quality candidates.

Plus, nothing says "Welcome" than waiting several months for a decision in the visa purgatory. So that also discourages high quality applicants who have other choices.

</comment></comment></comment></comment><comment><USER6> For a few years, I worked at a US government joint that abused the visa system to reduce its labor costs. The junior positions were staffed 100% by foreign workers who were being paid 25% to 50% of market rates.

The problem is that the US immigration system is rife with selective enforcement. Many rules are open to interpretation, and officers have full discretion as to how they interpret them. In this, the US is unique among nations that uphold the rule of law.

<comment><USER7> Easiest solution is stack rank all H1b applicants by salary and fill the quota with based on ranking. Top talent in theory should be making the most money so we wouldn't risk losing them.

<comment><USER8> Hmmm. I have a friend who has an extremely specific PhD and was offered a job in Atlanta, for a position that would be hard to fill otherwise as his expertise is quite unique.

So on one hand, you have a person with unique expertise, but on the other, he would be joining as a junior, so he would be paid a great salary - for that level. But he would be competing for visas with Seniors who will be paid more at other companies, purely because of their age/experience?

<comment><USER9> Isn't that a market based solution though? Nothing against your friend but if a company is willing to spend more on a senior than your friends company is going to pay him, that indicates that the senior is more valuable to economy

<comment><USER8> Sure, but it will lead to a solution where only top programmers at highest positions get visas? I mean, I can see the logic why some people would want it that way, but surely, there's value to be provided in hiring someone at a junior position and growing them from there?

<comment><USER10> The whole point of why H1B exists is that yes, only specialists with expertise you cannot buy locally (because of unavailability, not price) should get H1B visas, and that's generally at the highest positions, since you definitely _can_ get local entry-level specialists or generic good programmers.

There's value to be provided in hiring someone at a junior position and growing them from there, but H1B is explicitly not for that - unless the position literally has _zero_ candidates locally, it doesn't/shouldn't qualify for H1B.

</comment></comment></comment></comment></comment></comment><comment><USER11> H1b visas have primarily been used by consulting companies to bring in less expensive junior engineers (<$100k) [1]. If new directives make it harder to sponsor junior engineers, it will shift the mix to more senior engineers. This will shift the supply/demand curves, so that US salaries will come down for senior engineers and go up for junior engineers.

[1] [http://www.myvisajobs.com/Reports/2017-H1B-Visa- Sponsor.aspx](http://www.myvisajobs.com/Reports/2017-H1B-Visa-Sponsor.aspx)

<comment><USER12> More demand for senior engineers will decrease their salaries?

<comment><USER11> More supply of senior engineers will decrease salaries. The visas used to be taken primarily by junior devs preventing (some) senior devs from getting one. Senior devs may no longer be blocked which increases supply. Demand is unchanged, at least in the short-term.

<comment><USER13> In my experience of hiring engineers across several companies over the past decade, the pool of senior SDEs who are both not already in the US and willing to move to the US is so small that I'd be surprised if it even registered in the overall H1B flow. Virtually all the non-resident senior SDEs I saw getting hired in my orgs ended up being H1B transfers who got hired straight out of college into the US and grew into seniority while here.

</comment></comment></comment></comment><comment><USER13> This also came out and is more narrowly focused on areas relevant to frequent discussion on HN: [https://www.uscis.gov/sites/default/files/files/nativedocume...](https://www.uscis.gov/sites/default/files/files/nativedocuments/PM-6002-0142-H-1BComputerRelatedPositionsRecission.pdf)

SUBJECT: Rescission of the December 22, 2000 "Guidance memo on H1B computer related positions"

(edit to add:) Some key passages from the USCIS memorandum: "... an entry- level computer programmer position would not generally qualify as a position in a specialty occupation ...

Based on the current version of the Handbook, the fact that a person may be employed as a computer programmer and may use information technology skills and knowledge to help an enterprise achieve its goals in the course of his or her job is not sufficient to establish the position as a specialty occupation."

<comment><USER14> _"... an entry-level computer programmer position would not generally qualify as a position in a specialty occupation ..._

So _that 's_ why every job is "Senior Developer" now.

<comment><USER15> "Senior Developer" is the new "Entry-level developer". Now we have job title inflation.

</comment></comment></comment><comment><USER16> Also, USCIS has announced plans to combat H-1B fraud [1]. They seem to provide two provisions with this:

1) An avenue [2] for members of the workforce to report H-1B abuse. People on H-1B are offered some protection against retaliation.

2) Targeted onsite visits at worksites of employers who have larger fraction of their employees on H-1Bs, and those who sent employees to other locations.

Together, this seems to be aimed at curbing H-1B abuse by staffing companies. Some Silicon Valley employers - like Apple, Cisco etc - who use these staffing companies extensively might also be affected. But overall, this should be good news for both H-1B employees and citizens/permanent residents.

[1]: [https://www.uscis.gov/working-united-states/temporary- worker...](https://www.uscis.gov/working-united-states/temporary- workers/h-1b-specialty-occupations-and-fashion-models/combating-fraud-and- abuse-h-1b-visa-program)

[2]: An email address really - email@example.com

<comment><USER17> You know what's the fastest way to curb H-1B fraud?

Make it so that if an H-1B visa holder complains, and their complaint is found to be valid, they are entitled to apply for a green card immediately, and get EAD for the duration of their application.

<comment><USER18> Then you get H-1B fraud complaint fraud ;)

<comment><USER19> I'm fairly sure an H1B'er isn't going to seek extra USCIS attention unless things are bad.

</comment></comment></comment></comment><comment><USER20> I am so torn on this. On one hand, I spent 10 years on H1B in the US and the amount of H1B abuse that goes on is crazy. On the other hand, I would not have received my H1B under current guidelines.

<comment><USER21> Yeah, this policy is very clearly meant to curb _immigration_ , not H1B abuse.

<comment><USER22> Can you explain why that is? I'm not clear on how that's the case.

</comment></comment></comment><comment><USER23> I'm concerned about the effect this will have on F-1 Visa holders, if they can't convert to H1-b, they'll take their graduate degree back to their home country which is a net negative for us.

This seems to be throwing out the baby with the bath water, if you want to fix the body shop consulting firm issue, then target that. "Entry level programmer" is very broad, it could mean a guy with no experience who just graduated MIT with expertise in machine learning, but no projects under his belt.

<comment><USER24> This is still predicated on the assumption that there's a STEM shortage right?

Almost everyone I know who has a graduate degree in CS came here on a visa. The reason is because employers don't reward graduate degrees in CS with compensation commiserate with their costs.

So US nationals make the rational decision to not pursue a graduate degree. But if you're a foreign national, getting a graduate degree from a US school increases the likelihood of getting a Visa. So they make a different rational calculation.

If employers want their programmers to have graduate degrees they can make the bump in pay worthwhile, and American students will start pursuing graduate degrees.

<comment><USER25> > Almost everyone I know who has a graduate degree in CS came here on a visa. > The reason is because employers don't reward graduate degrees in CS with > compensation commiserate with their costs.

I think the main reason for that is because the vast majority of software jobs do not even remotely require a graduate degree in CS.

A lot of great research into ML, data science, distributed systems, etc., is driven by people with graduate degrees, but that's still a very tiny part of the programmer-job pie.

</comment></comment></comment><comment><USER26> No matter how you frame the issue, call it an abuse, or try to solve it, I don't think anything will change other than some minor adjustments. Jobs are not going to magically appear or wages rise.

India/China has a huge supply of engineers across the board (good, bad, senior, junior etc.,). And US companies always want to maximize their profits. So increasing the bar on H-1B visas will increase the quality of H-1B's making their way to US.(very competent, hard working, willing to work for lower wages in the initial years).

This is a huge benefit for technology companies who can directly recruit from these countries for US offices, which they were not doing before due to lottery uncertainties, and instead had to rely on L-1 route. (recruit for local office, then transfer)

As for the other US jobs that were being filled by low skilled H-1B's, they will simply move offshore/nearshore/remote or replaced by AI in few years. This is a big win for consulting firms as their offshore profitability per employee is 3 times higher than onsite. Given a choice, they would want all their employees offshore, and the only reason they had to bring in some % of H-1B's was on the US client companies request, which they may do away with now.

Bottomline: Protectionism did not work for manufacturing, and will not work for Tech either.

<comment><USER27> Protectionism does work. Just ask the Lawyers and the Airline pilots. The reason software engineers are not paid as well now is because we don't have a Bar association or Labor union to keep out the low rate foreign competition.

<comment><USER28> >The reason software engineers are not paid as well

The annual mean wage for Software engineers is higher than that for lawyers and pilots.

[https://www.bls.gov/oes/2015/may/oes_nat.htm](https://www.bls.gov/oes/2015/may/oes_nat.htm)

<comment><USER27> Please double-check the link you posted on mean salaries:

Programmers $98K Lawyers $136K Airline pilots $136K (not including big retirement benefits)

The link you posted proves the point I was making.

</comment></comment></comment></comment><comment><USER29> One in my area straight-up said "H1-B Visa's Preferred" on the job notice. Not even worried about hiding it. I wonder if any are doing that now.

<comment><USER30> It took me less than 5 seconds to come up with one. DOJ needs people to complain about this??? Seriously its wide out in the open. They can just go through job boards and figure what is going on in less than a few days and know which companies to prosecute.

Let us break this position below up. Basically no one other than H1b/F1 are welcome. Show me what specialized skill is needed in the requirements. Why shouldn't an american apply for these jobs?

[https://www.indeed.com/cmp/American-Technology-Consulting- LL...](https://www.indeed.com/cmp/American-Technology-Consulting- LLC/jobs/Business-Analyst-1e9f82e47a505a26?sjdu=QwrRXKrqZ3CNX5W-O9jEvYFcACbv- DthnUj_IRiMl_guugm44-mzV0A5DRJMTjrbwqOA599AiEevu5SiwhGxLZRCGTTWuXZZK_bCOrO_1EA)

<comment><USER16> [IANAL] Advertising a job specifically targeting H-1Bs is illegal. You should consider writing in to firstname.lastname@example.com about it.

</comment></comment></comment><comment><USER31> As an Indian software engineer on H1B I totally support this idea. I see a lot of Indians working with the consulting companies where entire departments are staffed by H1B workers on low (65-70k) salary. That kind of work is degrading even for the engineers who don't get any raises, are overworked and have very few benefits. But this is how things are.

However my main concern is that because the lawmakers don't understand the intricacies of the ecosystem, they might create laws that implement blanket restrictions on software engineers across different domains (that have real shortage in the US market) and salary bands. The earlier proposal for 130k salary band also doesn't make sense since the cost of living, and the salaries, vary widely across different cities.

For example I work at a startup working on some niche technologies and we have had real difficulties hiring good people even though we pay way above market wage for the location (NC).

<comment><USER32> "That kind of work is degrading even for the engineers who don't get any raises, are overworked and have very few benefits. But this is how things are." My sister recently completed a coding boot-camp in NYC but had to go back to India to work as a software developer at a startup for $12,000 / year. She would LOVE to be 'degraded' by a 65k-70k job.

<comment><USER31> It depends. 12k in India is a good salary in most cities whereas 65k in New York won't even enable you to rent a studio apartment.

My last salary in India was around 15k a year and when I moved here I was initially getting 65k during probation period. Despite NC being a rather cheap place I immediately saw my relative spending power (eating out, etc) go down. The only good thing is that electronics are cheaper compared to wage levels.

</comment></comment></comment><comment><USER33> Too late now [https://qz.com/889524](https://qz.com/889524)

</comment><comment><USER34> The company I have been working as a contractor for several years decided last year to cancel all contractor contracts. Most American contract workers had their contracts cancelled at the end of calendar year 2016, only a few Americans were extended past the beginning of the new calendar year but all H-1B visa contractors were hired into permanent positions. Now as one of the extended American contractors, I have been notified my contract will be terminated, though I am highly qualified and have a very heavy work load. I believe during this month I will be called upon to train another less qualified worker in my current duties. This is occurring all through tech industries.

</comment><comment><USER35> Good. Fuck the bodyshop consulting firms.

We work with a few of them, and they are universally terrible.

</comment><comment><USER36> Many Financial Brick and Mortar, like JP Morgan Chase uses H1Bs quite heavily. Many of the job positing listed show this.

H1Bs are used as a cheap source of labor and nothing more.

<comment><USER37> > H1Bs are used as a cheap source of labor and nothing more.

Really? Even at companies like Google and FB?

</comment></comment><comment><USER38> There is H-1B, but there is also H-4 (dependents), as well as L-1/L-2. My prediction is that if H-1B visas will be squeezed, we'll see a pick-up in L-1.

[https://apps.axibase.com/chartlab/8c9bb9cc/8/#fullscreen](https://apps.axibase.com/chartlab/8c9bb9cc/8/#fullscreen)

<comment><USER39> What has H-4 got to do with anything? You can't work on that.

<comment><USER38> You can't, but you can search for a job with an employer who would be willing to sponsor an H1-B. Being in the country makes it much easier.

<comment><USER16> > you can search for a job with an employer who would be willing to sponsor an > H1-B

What is wrong in doing that?

<comment><USER38> It causes incremental demand for H1-B visas from H-4 dependents whose specialized skills were not sufficient to warrant an issuance of an H1-B visa in the first place. This could be happening at the expense of more qualified H1-B candidates without physical presence in the country, as well as at the expense of citizens and permanent residents.

<comment><USER40> > whose specialized skills were not sufficient to warrant an issuance of an > H1-B visa in the first place

And how this changes if you apply for H1B while in US (on H-4)? Are the requirements softened?

<comment><USER38> If the candidate on H-4 visa is physically present in the country and is able to attend onsite interviews, this increases his/her chances and thus creates more competition with American workers.

<comment><USER40> If "specialized skills" are not sufficient for H1B, it doesn't matter where the candidate resides...

And if the candidate has enough those specialized skills - what's the problem?

<comment><USER38> Free shipping matters and so does removing the logistics overhead and the risks associated with a potential candidate. Moving overseas labor right next to your door surely increases the pressure on the domestic labor market. I'm an outsider and the State Department unfortunately doesn't publish statistics on visa type transitions, e.g. how many people went from H-4 to H1-B, as well as from J-1 to H1-B. J-1 for instance is a visa type for cultural exchange and it's been known a major vehicle of abuse and illegal immigration because. J-1 has been replacing lower-skilled labor however.

<comment><USER40> We are not talking about abusing of H1B, but when the candidate really satisfies the requirements and the salary offered is on par or better compared to local worker at the same level. So we agree that "importing" skilled people is good for the country.

<comment><USER38> I actually talked about a different subject, namely secondary effects. I argued that the displacement of jobs with H-1B visa holders is greater that the exact number of H-1Bs due to additional pool of H-4 candidates who are now in a better position to compete for new job openings.

<comment><USER16> > due to additional pool of H-4 candidates

Counting out H-4 EADs [1], the spouse on H-4 has to apply for an H-1B, go through the lottery, prove his/her qualifications, and only then get a job. So no, being on H-4 does not automatically get one a job.

[1] at which point they are only one step away from permanent residency

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER33> Not an easy task [http://business.rediff.com/report/2009/sep/24/indians- among-...](http://business.rediff.com/report/2009/sep/24/indians-among-most- corrupt-while-doing-business-abroad.htm)

</comment><comment><USER41> Its a welcome change and really should have been done a long time ago. Not only does it create unfair competion into the US market it also allow companies to underpay their employers.

</comment><comment><USER42> You're just going to see more remote work. No one's going to want to lose those profits once they have them.</comment>


How Browsers Work: Behind the Scenes of Modern Web Browsers - <AUTHOR> http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/? <comment><USER2> > So a lot of the parser code is fixing the HTML author mistakes.

This is probably my biggest problem with most of the ideology behind HTML 5. You learn from past mistakes and HTML has no way to teach you anything because there is no error-correction-test feedback cycle.

How do you learn proper HTML? You write something, you load it in a browser, does it show properly? It was right. Does it show in a funny way? There must be something wrong. What? Who knows. Nobody knows because you cannot, by definition create _wrong_ HTML 5. It is just that you did not write what you think you wrote.

There are validators you can use to validate your page. But most of the times they will tell you that your page is wrong while it actually looks perfectly as you wish in the browser. The browser is not complaining and the page looks good... these validators must be too picky, a waste of time.

The problem that killed XHTML was the draconian error handling in most browser. Only Opera had a good way to handle XHTML errors: a banner that told you that the page had an error and which error. Under that banner the page, rendered as best as possible. That was a good way to learn (and to tell people that the person who wrote the site is not a pro).

<comment><USER3> I'd argue that forgiving HTML parsing is one of the main reasons the web got as big and broad as it did.

[http://quandyfactory.com/blog/39/the_virtue_of_forgiving_htm...](http://quandyfactory.com/blog/39/the_virtue_of_forgiving_html_parsers)

<comment><USER4> I disagree. It's also what allowed the "IE-only web" to persist for about five years.

It might have been a good thing until about 1997, but at that point there was no shortage of people creating new web content, and raising the barrier to entry would have done no harm. And a lot of innovation in browser features might have happened sooner (due to increased competition between browsers.)

<comment><USER3> There was great competition between browsers through the 1990s. Unfortunately, they were competing through 'value add' proprietary extensions and browser lock-in, which is orthogonal to the issue of whether HTML parsing should be more permissive or more draconian.

<comment><USER5> Somewhat. Microsoft reverse-engineered a lot of Netscape's rendering quirks, as well as adding their own. Being quite liberal it what it accepted certainly didn't hurt IE adoption. (And a lot of these things are now in black&white in the HTML5 spec).

<comment><USER3> Related: <http://diveintohtml5.info/past.html>

"[W]hy do we have an <img> element? Why not an <icon> element? Or an <include> element? Why not a hyperlink with an include attribute, or some combination of rel values? Why an <img> element? Quite simply, because Marc Andreessen shipped one, and shipping code wins."

</comment></comment></comment></comment></comment></comment><comment><USER6> This is great content, but it is so hard to read. The light blue against the light gray is rough on the eyes, and the font size/style isn't helping either.

<comment><USER7> Here's the article at author's website <http://taligarsiel.com/Projects/howbrowserswork1.htm>.

<comment><USER8> "Tali published her research on her site, but we knew it deserved a larger audience, so we've cleaned it up and republished it here."

</comment></comment></comment><comment><USER9> Started reading the document tripped over a statement at the beginning:

"It is important to note that Chrome, unlike most browsers, holds multiple instances of the rendering engine - one for each tab. Each tab is a separate process."

This is not true and has never been true to my knowledge without restricting the statement. Chrome will open links opened in a new tab/window which point to the same domain in the same content process and it will start mixing different domains in the same content processes once a certain threshold is reached (whether this is a hard-coded upper limit on how many content processes may exist simultaneously or if this is calculated dynamically I do not know).

</comment><comment><USER10> Old discussion: <http://news.ycombinator.com/item?id=2894708>

Personally, I'm happy for the repost - I was looking for this, but couldn't find it, just yesterday.

<comment><USER11> Agree, reposts help me when searching in google site:<http://news.ycombinator.com/>

Also, it gives a chance to add to the discussion of what's been happening in the domain in the past 181 days!

</comment></comment><comment><USER12> A few interesting quotes about performance optimization from the article:

"Firefox blocks all scripts when there is a style sheet that is still being loaded and parsed. Webkit blocks scripts only when they try to access certain style properties that may be affected by unloaded style sheets."

"WebCore simply throws a global switch when any sibling selector is encountered and disables style sharing [optimization] for the entire document when they are present. This includes the + selector and selectors like :first- child and :last-child."

"After parsing the style sheet, the rules are added to one of several hash maps, according to the selector. There are maps by id, by class name, by tag name and a general map for anything that doesn't fit into those categories." Every element then looks in these maps to find rules which might apply to it.

</comment><comment><USER13> Great work! The guy who does photoshop job for you is simply amazing.

From a high-level view, I hope we see super-intense competition of tablet browsers soon. Because looking at -webkit-on-iPad, I feel IE6 has just been re-invented.

<comment><USER14> What's so bad about webkit on the iPad? It's my favorite way to browse the web.

<comment><USER13> Yeah it's good when it comes to rendering neatly done content websites - i.e consumption.

But when it comes to creating the content, such as having an email done with browser based rich text-editing, or file-input for attachments it falls flat on the face.

Example of a discussion: [http://answers.37signals.com/basecamp/2659-ipad- file-uploadi...](http://answers.37signals.com/basecamp/2659-ipad-file- uploading)

</comment></comment></comment><comment><USER15> I desperately need this in ebook format so I can read it in chunks, leave it, come back to it, etc. [edit] Found something -- dotEPUB works great.

</comment><comment><USER16> _sigh_ Is it too much to ask HTML5 advocates to make sure their pages render properly on an iPad?

<comment><USER13> And also you guys, being at that level, should insist on Apple guys to respect web-standards for file-input on iPad Safari.

This is gonna get corny very soon.</comment></comment>


IPhone Audio-Only Game Uses "3D" Sound - <AUTHOR> http://www.papasangre.com/

<comment><USER2> This is really interesting as a tech demonstration. I have actually never heard of binaural stereo generated in real time before.

<comment><AUTHOR> Yeah, I thought it was neat. I'm not an audio guy, so I have no idea if the tech is actually impressive.

As a game though, I've been playing it for a couple hours and it's really well done.

</comment></comment><comment><USER3> How is this different from using CoreAudio or OpenAL for 3D audio?

<comment><USER2> They're not binaural. They use the normal method of modifying phase and volume based on the direction of the sound. Binaural stereo uses spatially varying impulse responses for the sound channels, which creates a full and realistic 3D environment, including front and rear directions. There's also a better sense of how close the sounds are. But in a sense, it just feels you are in there.</comment></comment>


The collected jwz bicycle wisdom - <AUTHOR> http://www.jwz.org/blog/2008/05/the-collected-jwz-bicycle-wisdom/

<comment><USER2> I could pick apart a lot of this questionable advice but let me just say this instead: in my experience, those who try to get into cycling with a very pragmatic and cynical approach -- get a cheapo inefficient bike, don't take care of it, expect it to be stolen -- tend to not stick with it.

Get a bike that you _want_ to ride, whatever that may be. Maybe it's a hot road bike or maybe it's a gnarly mountain bike or an artsy low-rider.. whatever floats your boat. If nothing floats your boat, just ride _something_ for a little while and you'll figure out what you want. But if your bike isn't fun to ride then you won't ride it.

Also, get the best lock money can buy. If it's _better_ than most other locks, and you use it religiously, and your bike is not studded in diamonds, it probably won't get stolen.

And if you feel any inclination to become some variety of bike nerd, don't hold back, because that makes things a _lot_ easier. It really doesn't take much mindshare.

<comment><USER3> There's always the TiGr.

<http://tigrlock.com/pages/>

</comment></comment><comment><USER4> This is some of the worst (and even dangerous, see #11) advice I've read pertaining to owning and operating a bicycle.

Choosing a hybrid over a road bike isn't an awful idea if you don't mind sacrificing speed and lightness for some durability. I also reject the idea of riding a fixie--no matter how cool they look, I don't commute 10 miles a day on a velodrome. However, I can take the more rigid feel of a 120psi road tire in exchange for averaging 15MPH in hilly Atlanta. I paid $250 for a 1984 Cannondale and have probably invested a total of $30 in maintenance and parts at this point.

The absolute refusal to maintain the machine yourself? I'm definitely no mechanic-nerd and I do take my bike to the shop, but seriously, do you take your PC to the Geek Squad when you get some spyware? Change a tube yourself. Just "knowing how" isn't good enough, unless you want to spend 30 minutes on the sidewalk in 94° weather because you caught a puncture on your way home and are unpracticed in getting a tire off the rim.

Also, please don't use sidewalks because an intersection looks "iffy." For one, it's rude (and illegal in most places) to pedestrians and two, a driver is much more likely to see you if you're occupying a lane on the street than if you come zooming into the crosswalk while they're making a right turn.

This whole list reeks of someone that has simply not taken the time to appreciate and learn to properly use a tool.

<comment><USER5> Upvoted, but (11) makes sense if I read it as "get off of your bike and cross on foot, as a pedestrian". I'm not sure if that's what jwz had in mind or not, but that is what I do when things get iffy. Agreed that riding on sidewalks is dangerous.

</comment></comment><comment><USER6> For some reason JWZ thinks I'm most comfortable reading things off of green- screen CRTs. Readability link: <http://www.readability.com/articles/fd86bcaw>

That said, most of the advice seems pretty solid -- I've been (unwittingly) following most of these rules except for #10. I'd _rather_ get greasy lubing my chain and save that $20 for a nice meal. But that's just my preference.

</comment><comment><USER7> Slightly off topic but one thing that surprised me when I moved to SF a few years ago was how bicycle unfriendly it is with very few dedicated bike lanes and downright dangerous in many parts, including a lot of The Mission. For some reason I imagined the liberal utopia would be a Portland wannabe but it's really not. My guess for why, besides the steep hills, is that bike culture here is more centered around the aggressive hipster types and not the everyday commuters and thus the big political push hasn't taken place.

</comment><comment><USER8> > 14\. Cross train and trolley tracks at a 45° angle or more, or you will die.

45° gets shallower the faster you go - it feels like you are crossing at a safe angle, but at speed, it's shallower than you think. Swanston Street tram tracks vet here (Melbourne).

<comment><AUTHOR> _"... Swanston Street tram tracks vet here (Melbourne) ..."_

Swanston is pretty grim, especially at intersections like Collins ~ [http://www.flickr.com/photos/bootload/2658435132/in/set-7215...](http://www.flickr.com/photos/bootload/2658435132/in/set-72157607405827577/)

</comment></comment><comment><USER9> It doesn't matter if JWZ is entirely correct or not. He is doing a nice public service by providing some guidelines to help folks to introduce utilitarian biking into their lives.

For those that are completely new to biking, his advice is as good as any. Biking is not rocket science, everyone can do it, and it is lots of fun and practical. Many cities are developing bike infrastructure so it makes sense to take advantage of it.

But I will shut up now because I'm lycra-wearing racer-boy bike nerd and JWZ says people should not take my biking advice.

</comment><comment><USER10> I dunno, doesn't $370 seem expensive too? I went through a few of these things[1] back in the day, and even now a new one should cost about the equivalent of $50. They're fixed gear, and likely not feature comparable, but they comfortable enough to drive uphill, light enough to actually carry around, and even on the kind of roads I used to drive, flat tyres were usually because of bent nails or broken glass.

[1] <http://www.herocycles.com/jet2.htm>

</comment><comment><USER11> _You really do need to tuck in or roll up your right leg._

Or buy the $2 velcro straps they sale that go around your leg and not worry about it again.</comment>


Disabled programmer seeking assistance/advice - <AUTHOR> Hi, I have been disabled since 2009 (phobias,anxiety,depression,pain)
After 1+ years sleeping on the streets, I moved in with a friend to try to help take care of him while he waited for a knee replacement surgery. After he was doing better, I moved in with a friend who was battling cancer, COPD, and an opiate addiction.
During that time I was able to finally get my hands on a laptop. It was an 8 year old HP DV7. It never really worked great, but I managed to fix it enough that I could start getting Gentoo on it. Two nights ago the CPU died. It's had a hufe effect on my well being. Tinkering on the computer is the one thing that helps keep my depression at bay.
I am passionate about free software and Gentoo. I want to get to where I can can contribute and eventually hopefully get to where I can freelance program (I'm already pretty decent with multiple languages). I thought that maybe at some point I could find a freelancer that would subcontract out to me, having some small jobs would help me build confidence.
I'm just hoping that given that I've been repairing computers for sick/low-income people for years pro-bono and have devoted every ounce of energy and every penny taking care of two sick friends that I might have enough good karma banked up that someone would be willing to hook me up with an old laptop they've got sitting in the closet collecting dust. (A desktop wouldn't be practical because I may very well be back to living on the sidewalks in a few months.)
Honestly, if this indigent life continues to get worse every day I doubt I'll even live to see my SSDI process complete (lawyer says it may be least 1.5 years until I can get a hearing.)
Any help/advice is appreciated more than you could possibly know. (I don't have constant internet access so I won't be able to reply to anyone until tonight). Thanks for reading, and double plus thanks to anyone who can render any form of assistance. <comment><AUTHOR> I forgot to mention, I live int he Olympia, WA, USA area.

The idea of Seattle scares the shit out of me. Elevators are one of the phobias I couldn't handle on a day-to-day basis.

Again, thanks to anyone who can do anything to help and/or takes the time to read this.

<comment><USER2> Ping me when you visit Seattle area. I have a 2007 era working Black Macbook. Happy to give it to you as I was already planning to donate it.

<comment><AUTHOR> I couldn't figure out how to send a pm on HN so I sent you a message on twitter. That computer would be fantastic. Your kindness means more to me than I'm capable of expressing. Thank you.

<comment><USER2> I didn't receive the Twitter message. Twitter is not a reliable messaging service. Please send me a message through my service's contact page [https://www.peercube.com/welcome/contact](https://www.peercube.com/welcome/contact).

<comment><AUTHOR> I just sent a message. I addressed it to Anil (Last name redacted because I don't know if you want that info on HN or not) because that's what twitter said your name is.

If for some reason that doesn't go through, could you please text me at 360-970-0361? I'm petrified of speaking on the telephone. I used to work in call centres; they've left quite the mark on me. When I speak on the phone I go into instant panic attacks.

I'd be happy to meet you in whatever part of town is best for you. I'm staying in Roy (between Tacoma and Oly) so time wise I'm only limited to when the transit gets to Seattle as I can usually find a pretty early ride to the Roy Y.

Thank you again. This means so much to me. The fact that I had multiple people offer in such a short time frame lifts my spirits and kind of makes me tear up a bit.

</comment></comment></comment></comment></comment><comment><USER3> When I lived in Portland OR, an org called Free Geek let volunteers rebuild computers for folks who couldn't afford them. Even if you're not near them, maybe they can point you somewhere similar in your area

[http://www.freegeek.org/#volunteer](http://www.freegeek.org/#volunteer)

</comment><comment><USER4> These people seem focused on recruiting volunteers, but they may be able to put you in touch with a resource: [http://www.volunteermatch.org/search/index.jsp?r=msa&l=98599...](http://www.volunteermatch.org/search/index.jsp?r=msa&l=98599&categories=17)

Other possible resources or leads:

[http://www.needhelppayingbills.com/html/washington_disabilit...](http://www.needhelppayingbills.com/html/washington_disability_benefit_.html)

[http://interconnection.org/retail/](http://interconnection.org/retail/)

[https://www.dshs.wa.gov/ra/division-vocational- rehabilitatio...](https://www.dshs.wa.gov/ra/division-vocational- rehabilitation)

<comment><AUTHOR> Thanks, I'll have to look into those more tonight.

<comment><AUTHOR> Thanks for the links. Those are some really great resources.

There wasn't anything too connected to my needs at the moment (the retail place is above my budget of $10 in my wallet).

I heard rumour that the DVR program gives people in the program a laptop.

As for the volunteering, I'm trying to get a meeting about volunteering with the organization that's helping me not be homeless (SideWalk). They seem to be in desperate need of tech help from what I've heard. I think I could automate a lot of their tasks so that volunteers could focus on more pressing matters than data entry.

</comment></comment></comment><comment><USER5> I'm in the Seattle area, shoot me an email.I can probably hook you up with my old Chromebook.

<comment><USER5> Just checking in to see if you emailed me. I emptied my spam folder earlier and like an idiot I forgot to make sure yours wasn't in there.

<comment><AUTHOR> I can't seem to figure out how to contact people directly from HN. I already messaged the anilkg. If the Chromebook is destined for the recycle bin anyway, I could probably find someone in need of a laptop that can't afford to get one.

In fact, depending on how it'll hit my SSDI case and health permitting I really want to start up something where I collect every unused/broken computer I can get my hands on, refurbish them as needed and give them to people with disabilities/low-income and the elderly. (I taught a 67 year old who had never used a computer before how to use GNU/Linux last year. He loves it)

Thank you for the offer. As stated previously, the generosity I've encountered means a great deal to me. I really feel lost in life without a computer to muck about on. Especially considering I just lost my best friend to an opiate addiction; she didn't die or anything. She just can't put anything ahead of getting high. I had to leave because she turned abusive and I wish her all the best.

<comment><USER5> Check my my profile, there is a link to my personal site there. I have a contact form there :-)

</comment></comment></comment></comment><comment><USER6> Check this out for some general info: [http://sandiegohomelesssurvivalguide.blogspot.com/](http://sandiegohomelesssurvivalguide.blogspot.com/)

A lot of the sources are specific to San Diego County California, but not all are.

Best of luck.

<comment><AUTHOR> Thanks for the link. I'm semi-familiar with that blog. A lot of the info provided is really solid regardless of where you're at (if it's the one I'm thinking of.)

</comment></comment><comment><USER7> Shoot me an email.

<comment><AUTHOR> I have no clue how to send an email via HN. It doesn't seem to list it in your profile.

Thank you for your kindness. Hopefully anilkg's offer still stands.

Though in the future I'm very interesting in getting my hands on as many old/broken/unused computers as possible so I can refurb them and give them to those in need.</comment></comment>