How I'm using Twitter to acquire 100 uniques a day for my startup - <AUTHOR> http://trevorstarick.com/twitter-an-untapped-well-of-potential-new-users/? <comment><USER2> This post was upvoted by sockpuppets. We have banned those, buried the post, and banned the site.

Edit: We're also banning the site of the startup this was promoting, since it has been promoted abusively on HN in the past and asking for that to stop [1] seems only to have encouraged more.

1\. [https://news.ycombinator.com/item?id=7637010](https://news.ycombinator.com/item?id=7637010)

<comment><USER3> I don't get why there seems to be hostility towards Outpost. On both occasion ([https://news.ycombinator.com/item?id=7637010](https://news.ycombinator.com/item?id=7637010) and the current) the articles have been relevant to the YC community and to my knowledge hadn't been up voted by sock puppets that we created or operated. This article mentioned Outpost once and wasn't even centred around it. I could have replaced Outpost with any other company and it still would have same purpose.

<comment><USER2> Our hostility is to abuse and gaming of HN. If you aren't doing it, it must be someone else. In that case, their dedication to promoting your personal blog is remarkable.

They managed to find their way to both of your own (now deleted) submissions of this article from medium.com, and then helpfully re-submitted it from your personal domain and ring-voted it up. They don't seem interested in anything else, either. Quite the fans.

</comment></comment></comment><comment><USER4> The idea of directly engaging potential users actively seeking/asking for a particular product/service on Twitter is very interesting; but unfortunately the way you are implementing it right now is unethical and in violation of Twitter's Automation Rules and Best Practices [1]:

"Creating serial or bulk accounts with overlapping use, however, is prohibited."

I initially thought you were using your company's own Twitter account for messaging people; instead, by your own admission [2], you have resorted to using multiple 'realistic' accounts:

[https://twitter.com/search?q=outpost.travel](https://twitter.com/search?q=outpost.travel)

This kind of growth hacking is misleading and unethical, and I think it has no place in Hacker News.

[1] [https://support.twitter.com/groups/56-policies- violations/to...](https://support.twitter.com/groups/56-policies- violations/topics/237-guidelines/articles/76915-automation-rules-and-best- practices)

[2] [https://news.ycombinator.com/item?id=7720634](https://news.ycombinator.com/item?id=7720634)

<comment><USER5> Well you can always argue what is right and what wrong. Very true, it is a violation of the Twitter terms of services but I still appreciate it for sharing with the HN community.

There has also been a post about Darkmarket ([https://github.com/darkwallet/darkmarket](https://github.com/darkwallet/darkmarket)) on HN. Again, I do not encourage trading illegal goods at all but as a proof of concept it is still impressive.

</comment></comment><comment><USER6> The amount of startup-culture Kool Aid going on here is quite mesmerising.

First the product, 'let's aggregate the aggregators!!!'

The monetization: those affiliate marketing codes everyone else uses!!!

Then there is the user acquisition strategy. Getting some intern to post stuff to Twitter for you.

The spin off product: a Twitter spamming machine!

Then there is 'sharing economy'. Is this really all it amounts to?

<comment><USER7> Hacker News is so much more honest at this time of day, before Silicon Valley wakes up.

It'll never last, they're going to disrupt us any second now.

<comment><USER2> I'm not sure what you find honest about this behavior, but you're right that it isn't welcome on Hacker News.

</comment></comment></comment><comment><USER8> Have you considered what potential there is for scaling in up? Because if all you are getting that way is 100 uniques a day, the effort involved sounds like it'd make it a net loss compared to simply buying the traffic via paid advertising. If the tweets continue to generate additional referrals down the line, then of course it might change.

But frankly, having seen the travel space up close, I find this system more interesting than your startup...

<comment><USER9> Asking out of curiosity Is it legal to automate tweet in twitter? I mean if twitter detects someone is doing so wont they ban them?

Edit: I Read the post properly the replies are manual not automatic so I don't twitter will have any issue with it.

<comment><USER10> It might be ok to automate tweets, but this particular service might run afoul of Twitter's spam rules

Per Twitters Rules for Identification of Spam[1]

-If your updates consist mainly of links, and not personal updates;

-If you send large numbers of unsolicited @replies or mentions in an aggressive attempt to bring attention to a service or link;

[1][https://support.twitter.com/articles/18311#](https://support.twitter.com/articles/18311#)

</comment></comment></comment><comment><USER11> If this trick is still really working for you, please, do yourself a favour and shut up about it. Drawing attention to it is not going to end well for you, either twitter shuts you down or people just copy your idea and it loses effectiveness. The correct time to write about these things is when they stop working.

<comment><USER12> All he's doing is smartly parsing the results of Twitter searches. This isn't really groundbreaking, it just requires some legwork.

<comment><USER11> I agree, but the general point is that specific marketing tricks that work well should be hoarded, not shared, because sharing them destroys their value.

<comment><USER13> > "because sharing them destroys their value."

... Why?

Because it'll lower your competitive advantage? If your main competitive advantage is knowing about some cheap Twitter trick--sorry, I mean "Growth Hack"\--then you need to rethink your game plan.

<comment><USER11> because sharing them makes them stop working. No one said anything about this being his main competitive advantage.

</comment></comment></comment></comment></comment><comment><USER14> I wrote something similar to this, but more for the layman. Kind of a step-by- step guide to Twitter user acquisition. [http://www.austenallred.com/the- hackers-guide-to-the-first-1...](http://www.austenallred.com/the-hackers- guide-to-the-first-1000-users-twitter/)

Before we launched were were getting about 50 signups/day from Twitter at our landing page - around 150 visits.

</comment><comment><USER15> This is unscrupulous, even the account that submitted this to HN is only 3 hours old and I'm guessing most of the upvotes have been faked.

<comment><USER3> My account had posted it from Medium earlier but I realized how SLOOW it was loading so I loaded up a Ghost Blog droplet for Digital Ocean and reposted it there. I needed a new account to post it on behalf of so a smashed my keyboard. Voial!

<comment><USER2> The reason you didn't address what phea said is that you promoted this story through abusive techniques. So abusive, in fact, that we're banning your main account too, as well as this site.

Edit: We're also banning the site that you've abusively promoted here in the past [1].

1\. [https://news.ycombinator.com/item?id=7637010](https://news.ycombinator.com/item?id=7637010)

</comment></comment></comment><comment><USER16> I'm not affiliated with it, but LeadSift does something similar to this and is actually pretty good at it for picking up new lead opportunities [http://leadsift.com/](http://leadsift.com/).

</comment><comment><USER17> This post is doing something a bit different and probably more useful, but it reminds me of the people that search Twitter for mentions of their competitors and then try to convince those people to use their product instead. I see this every once in awhile when I search for our product mentions and it makes me sad. I'm sad because it's a huge waste of time for them and they are actually damaging their brand (not ours).

Even though Twitter is public, there's still a sense that some random person isn't just going to start replying to your tweets.

</comment><comment><USER18> I wonder if they are using paid interns or unpaid interns? Makes me wonder if the cost of paid interns was put towards regular advertising whether it would generate a better return.

<comment><USER19> Unpaid interns would be a violation of labor laws if you're simply not paying them for work you would normally pay for.

</comment></comment><comment><USER20> 99% of the time this technique will not be worth while.

However, there are niche markets where this could be useful. This is especially true when the user has a limited means to pay for ads.

</comment><comment><USER21> This isn't a complete story.

\- How many of those users convert to cash in the bank and recurring customers?

\- Has this actually resulted in a better ROI than other means?

\- Does this sort of semi-solicited tweet advertising gain or lose goodwill?

From a tech standpoint, this is cool, from a business standpoint, it's not proven yet from this writeup. IMO.

</comment><comment><USER22> Security Notification

Per company security policy you have been denied access to the website: [http://trevorstarick.com/twitter-an-untapped-well-of- potenti...](http://trevorstarick.com/twitter-an-untapped-well-of-potential- new-users/)

Reason: Not allowed to browse this Botnet site.

</comment><comment><USER23> The thing to remember here is that the replies are being crafted by a human. It's a very sensible thing to do.

If you were to use the same procedure but send the replies off using a bot and the API, then I believe that it would be against the Twitter ToS.

<comment><USER3> It was what I originally was planning on doing but felt that a personal response would be better than a bot. During the hours of 3am - 9am I do set it up to be auto replies but there's not much traffic anyways. There are similar Twitter bots that do this and I've spoken to someone from Twitter about a grey of the ToS area I might be able to work in.

<comment><USER24> If there isn't that much traffic between 3am and 9am, then why is it worth it to spam during those hours?

</comment></comment></comment><comment><USER25> File this nothing new under the sun,

I know a few people who worked on a startup doing exactly this some 2-3 years ago.

Problem was it would not really scale plus Twitter really limited the free pipe.

There were a lot of hotels interested, but not enough to pay.

</comment><comment><USER26> "How I'm spamming Twitter to acquire 100 uniques in a day"

<comment><USER27> To be fair, if you post a question on twitter you can hardly call it spam if someone answers it, even if it's with their own product

<comment><USER26> I think the question is, how spammy would you think if 1000 other people would do the same? How relevant would the answers be if every answer would have 100s of answers from bots that are advertising their service?

<comment><USER28> Not sure why you're getting downvoted. "What if everybody did that?" is a great framework for considering the effects of novel behaviors.

<comment><USER29> literally is just Kantian ethics

</comment></comment></comment></comment></comment><comment><USER30> Great innovative lead-gen. I'm more curious about your database of destinations. Do you have formal partnerships with the sites you're linking-to to syndicate their listings?

</comment><comment><USER31> Am wondering if there are an API based services which can be used for NLP? Something cheap because the number of messages to be processed will be extremely large.

<comment><USER32> Not sure what your budget is like, but here's one that does entity extraction and classification.

[https://www.mashape.com/jetlore-dev/semantic-text- processing...](https://www.mashape.com/jetlore-dev/semantic-text- processing#!documentation)

Demo:

[http://dev.jetlore.com/tech-demo/text-processing- api/entity-...](http://dev.jetlore.com/tech-demo/text-processing-api/entity- extractor)

Disclosure: I used to work for Jetlore.

</comment></comment><comment><USER33> As an very active twitter user this kind of behaviour is very anoying for me. I would never klick one of these.

</comment><comment><USER34> I think AirBnB might have a problem with your website's design.

</comment><comment><USER35> Wondering how much of this new traffic converted into customers...

</comment><comment><USER36> "they're are" _twitch_

</comment><comment><USER37> Glorified spam.

</comment><comment><USER3> I'm planning on doing a more in-depth write up on how NER/NLP in the tweetosphere is different that general NER/NLP which will by me technical explanation of what I did here. That should be up sometime later this week.

<comment><USER38> Can you elaborate more on how having these specific tweets helps your specific startup or how you are converting them from casual tweeters to your new users?

Right now there is a big disconnect in the post. I am guessing its because you assume the reader understands even what ner/nlp is

</comment></comment><comment><USER39> "Over the past decade"? Actually founded on March 21, 2006 ([http://en.wikipedia.org/wiki/Twitter](http://en.wikipedia.org/wiki/Twitter)) :)

<comment><USER3> Over the past eight years didn't sound as sexy.

<comment><USER40> Be very very careful with this sort of thing. Try "the better part of a decade" if you want a phrase with a similar ring but actual truth behind it.</comment></comment></comment>


A defense of C's null-terminated strings - <AUTHOR> https://utcc.utoronto.ca/~cks/space/blog/programming/CNullStringsDefense?showcomments <comment><USER2> The article tries to make its point with unnecessarily complex code examples. They seem to be locked in a C way of thinking. But Pascal was created about the same as C and had proper types.

Strings could be represented as length checked arrays. They could come in two types, short ones, having a length byte at the beginning and are limited to 256 elements, and long ones, having an "int" size marker and corresponding length limits. The type handling could be handled by the compiler, the length() function would always return an int, and the elements addressed by a[i]. Thats it. This would have saved us more than 3 decades of nasty bugs if not security problems.

<comment><USER3> > But Pascal was created about the same as C and had proper types.

The Pascal I remember (some version of Turbo Pascal in the early 90s) had strings where you had to declare the length as part of the type. Strings of different length had different types and you could not pass a string of length 30 to a procedure that expected a string of length 31. The way to solve this is to declare that all your strings had the same length and hope that it would be enough. It was horrible and at the time I found the C approach much more reasonable. Of course Pascal improved through the years and the C approach turned out to be a huge security problem.

<comment><USER4> Pascal strings are weird.

The first byte tells you the string's length. If the MSB of the first bit is set, the string's first 4 bytes tell you the length of the string. I mean yes its not a horrible system, but there are better systems.

I'll be honest I like Rust's. Just keep the length and the pointer on the stack in a tuple.

</comment></comment></comment><comment><USER5> > C's null byte terminator imposes a fixed and essentially minimal size > penalty regardless of the length of the string.

From an information theoretic point of view, making 1 out of 256 values of each byte unusable as the content of the string, is an overhead linear in the size of the string, not constant.

<comment><USER6> It's even worse than that (from a practical standpoint, not a complexity theory standpoint) when you get into the realm of interpreted languages written in C. Try processing text containing null bytes in bash, for example.

<comment><USER7> Data containing null bytes is not text.

I like to think of bash / sh as just a job control system. It enables you to setup process pipelines. Everything is just processes and files (streams). Variables only serve as programs arguments. Since program arguments are also null terminated, variables containing null bytes just make no sense.

(Of course it gets dirty as soon as you feed the output of a job into a variable, for example. I think that isn't even defined by POSIX for non-text streams).

<comment><USER6> Feeding the output of a job into a variable is a common enough task. One example I worked on recently was to use the results of one find(1) command as an array of arguments to another. Perhaps this was a very ugly way of comparing two directories, but it worked.

This is why it surprised me when I realized (without having thought about it) that variables can't contain null bytes. It made my quick id3 tag parsing script a bit trickier to write, since I could no longer just use read(1P).

</comment></comment></comment></comment><comment><USER8> What I want from strings in a programming language:

1) Memory-safe (can't touch memory that you don't own)

2) Opaque (standard library can change the implementation later)

3) Immutable (can be passed around like values)

4) Unicode (no fixed width chars, no default conversion to bytes)

I don't know any good reason to deviate from these rules. Even systems languages would do well to follow them, IMO.

<comment><USER9> I don't think any of these are valuable, let alone essential.

1) Memory-safe costs a lot and gives me little. If I know I'm not going to touch memory incorrectly I should be able to take advantage of that.

2) Knowing the cost of operations is essential to do any kind of performant programming in a reasonable amount of time; e.g. whether `length(x)` is O(N) or O(1). The operations specified is hugely important.

3) When I've got a 300GB log to update, an in-place algorithm will be better for everybody. Microcontrollers don't want to waste space with extra copies either, and a better algorithm wins.

4) I'm not sure having an opinion about Unicode in the language is ideal: You can either store an array of bytes, or you can store an array of code points, or you could store a list of UTF8 "characters", and I see value in all of these interpretations (comparison/copying, rendering, transcoding). I'd prefer flexibility, and the language not switching them around on me behind my back (see #2)

<comment><USER10> I do kernel driver and embedded programming. I find your attitude scary.

1) Memory buffer errors cost a lot. Kernel panic or a frozen device after overwriting its whole memory. Having some low cost safety would be _very_ much welcome. One of the biggest reasons I'm interested in Rust.

2) Well, I guess you can peek at the implementation, no? Strlen doesn't give you any guarantees either -- different implementations over an order of magnitude in performance.

3) Having a 300GB log to update, what happens when your update process step 2 out of 3 fails? In-place updates are risky on shared or persistent data. And this is a low frequency corner case anyways. Most strings don't need to be mutated. So it's reasonable to default to that.

4) Array of bytes is usually good enough. When it's text, it encoding should just always be UTF-8 except when not practical for some external reason.

<comment><USER9> I can appreciate your "kernel driver and embedded programming" background, and I'm working on my attitude.

I think about programming a lot.

I don't do much programming since my programs usually work correctly the first time, but when I do I write fast web servers and operating systems and text editors and language bindings and compilers and interpreters and compressors/decompressors and image editing tools, backup tools, system administration tools, reverse engineering network protocols, reverse engineering file formats, invoice generation tools, billing and accounting packages, mobile apps, high volume mail servers, mp4 decoders, 1wire (dallas) drivers, ad servers, ad players, web applications like email clients and web stores, windows device drivers, linux device drivers, and other things that I can't remember right now.

I have observed that the bugs I tend to make have more to do with my failing memory (i.e. what I can remember), than overflowing buffers that I allocated. Maybe memory buffer errors happen to other programmers often enough that it's worth worrying about for other people, but I'd argue this says more about those other programmers, and I propose that the techniques I use to avoid making those mistakes are more valuable than memory protection since it clearly allows me to have my cake and eat it too.

I've observed a great deal of performance can be gained by controlling how my structure is laid out in memory, but in order to do that, the compiler needs to trust me.

Maybe.

Some languages are experimenting with algebraic types and what they're doing might be a good-enough middle ground such that they can actually get zero-cost buffer protection, but I haven't played with them much to know for certain. I'm willing to be convinced, but I haven't yet, so I continue to maintain that enforced memory protection is not ideal.

Re 2) I think the original point is that the implementation should be free to change it however (and whenever) they like. That's why they wanted opaque strings, such that you access them from the interface itself.

Re 3) It depends. If it fails, then we've lost however long it takes to scan 300GB (a few minutes), but just because we copied it once from the disk, doesn't mean we need to copy it again and again: That turns minutes into hours. I agree that most strings don't need to be mutated, and that it's reasonable to default to it, however order-of-magnitude performance gains are worth spending a little time thinking about, and they often require mutating- in-place.

Traversing a tree is another good example, and the Schorr-Deutsch-Waite link- inversion algorithm (Knuth, TAOCP vol.1 § 2.3.5) is essential for constrained- memory devices when you need a tree-walker. Sometimes I need to mutate, so I think _enforcing_ immutability is simply not valuable.

<comment><USER10> > I do I write fast web servers and operating systems and text editors and > language bindings and compilers...

I didn't want to invoke any contest, but to remind C is used a lot in those contexts and zero termination seems to be one of the bug magnets. A very common source for security vulnerabilities as well, pretty large portion of them are related to string processing.

> Maybe memory buffer errors happen to other programmers often enough that > it's worth worrying about for other people

Yup. Maybe a large part of how I think of this to protect the other people. It's not rare someone messes up on an embedded system and writes a bit somewhere else in memory. Often it won't crash, but the bugs you get take ages to hunt down.

There's just no way around it. I do want to delegate things to other people. Defensive coding tends to catch and prevent a lot of mistakes at that point. Many of them have pretty cowboy attitudes towards details such as parameter validation or error checking. Some of them will need to maintain it in the distant future.

> I've observed a great deal of performance can be gained by controlling how > my structure is laid out in memory, but in order to do that, the compiler > needs to trust me.

Yeah, performance is often about cache, locality of reference. Pointer chasing and other random access destroys performance. Applying SIMD without penalties requires at least 16 byte alignment. In 2016, 64 byte align is even better. SIMDs are getting pretty wide.

Re 3)...

I still think that 300GB string example is esoteric, even off topic. You're not going to put 300GB string in any standard string abstraction. There are probably a lot of other worries, such as running out of disk space, undetected data corruption on disk (happens pretty often), failure in the middle of the modification process, etc.

> Sometimes I need to mutate, so I think enforcing immutability is simply not > valuable.

I don't think anyone wanted to enforce immutability. Just to have it default.

<comment><USER9> > I didn't want to invoke any contest, but to remind C is used a lot in those > contexts and zero termination seems to be one of the bug magnets. A very > common source for security vulnerabilities as well, pretty large portion of > them are related to string processing.

I understand. I think the gross majority of this comes from the C standard library though, and _not_ from the C language.

qmail for example had no buffer overflow problems -- the first security vulnerabilities found 10 years after release wouldn't affect any system that qmail was developed to run on simply because nobody gave their mail server 4GB of ram! Surely the author should have predicted this problem, but it demonstrates methodology can protect against this issue.

KDB takes an interesting approach of reference counting in all operators. Operators can then be optimised for situations where one argument (or both) have a reference-count of exactly one. This means writing C code with KDB's memory management library can make things very simple.

Antirez also has an interesting string library that uses a combination of length+null-termination specifically for the purpose of finding bugs.

> There's just no way around it. I do want to delegate things to other people. > Defensive coding tends to catch and prevent a lot of mistakes at that point. > Many of them have pretty cowboy attitudes towards details such as parameter > validation or error checking. Some of them will need to maintain it in the > distant future.

I understand what you're saying, but I think technique can help a lot more than we think: Most of the software engineering industry wants to move to smarter and better tooling, and I'm just proposing we upgrade our brains some too.

I don't have all the answers yet.

> You're not going to put 300GB string in any standard string abstraction.

In KDB this is actually pretty common, but it doesn't have a "standard string abstraction" because while it meaningfully supports byte-arrays that are in the 300GB range, the string-atoms (symbols) which are used similar to strings in python et al, never approach 1MB let alone 300GB.

However in C I just did mmap() and updated the file. It took about 15 minutes to write and debug, and a few minutes to run on the server.

> I don't think anyone wanted to enforce immutability. Just to have it > default.

I don't know. I parsed _I don 't know any good reason to deviate from these rules._ as "enforce". I might be wrong, you'd have to ask "cousin_it" what he/she meant at the time. I know at least later they either were convinced, or clarified[1] this position.

However what I meant was that I don't want to enforce those rules because I can think of an exception for each, and they understood that. Sorry I was unclear though.

[1]: [https://news.ycombinator.com/item?id=10842858](https://news.ycombinator.com/item?id=10842858)

</comment></comment></comment></comment></comment></comment><comment><USER11> The SDS library ([http://github.com/antirez/sds](http://github.com/antirez/sds)) is the middle ground between the two approaches. SDS strings are apparently C null- terminated strings, but before the pointer that you pass around there is metadata with the length. This makes SDS strings compatible with everything there is in the C standard, but has allows to easily manipulate the string without managing the allocation manually. Also sdslen() is O(1) and binary safe.

The main drawback is that most functions have to reassign the pointer back, like in:

        sds foo = sdsnew("foo"); // Creates an SDS string
        printf("%s\n", foo); // You can print it with printf()
        foo = sdscatlen(foo,buffer,10); // Append 10 bytes.

Failing to reassign sdscatlen() return value back to "foo" creates a bug. SDS originated with Redis but is now a standalone library. Recently version 2.0 was released that makes it synchronized with the version we have inside Redis.

<comment><USER12> Seems like you could avoid that potential for error by making functions that modify an SDS take &foo rather than just foo, and modify it in place.

As a stopgap, though, SDS could use GCC's attribute "warn_unused_result" on all of those return values.

<comment><USER13> Last time I tried it, that GCC attribute was only implemented for C, not C++. It seems like a good idea anyway.

</comment></comment></comment><comment><USER14> Well, yes: these are the original design constraints that led to null- terminated strings. The result is a data structure a bit like a linked list: finding the length is an O(n) operation.

So long as all your operations on the string are char-at-a-time, and your first act is to check the char against zero, this works fine.

In fact, _so long as you stay in the original UNIX batch processing model_ , where you're reading bytes from stdin and writing to stdout, the whole program works fine. Inconvenient buffer-size issues are avoided: don't keep intermediate buffers, just write to stdout a char at a time. (Have a look at lex/yacc generated code for this model, for example, with their not-easily- resettable parsers and trouble handling errors other than by calling `exit`).

The problem is not so much "string is not a type" as " _buffers_ for composing strings are not a type".

<comment><USER15> What do you mean by that last sentence?

<comment><USER14> Roughly the distinction Java makes between String and StringBuffer. I observed that buffer overflows require a buffer: if you do all your IO a character at a time, this is less risky.

For security you need not "string first char + length of string" but "string first char + length of _allocated region into which it is safe to write_ ", which (unlike the length of the string) cannot be inferred from the string head pointer in any way.

<comment><USER15> thanks

</comment></comment></comment></comment><comment><USER16> C strings may well have made sense for the time. The point is they don't do now. I don't blame the people who created C, I blame the people who continue to use it today.

<comment><USER17> > I don't blame the people who created C, I blame the people who continue to > use it today.

that's pretty harsh, and far-reaching. is it really justified to paint _everything_ with that brush ?

<comment><USER16> Probably not; I probably should remain open-minded. But I've seen so much written in C, and so rarely has C been a good choice, that I don't feel like wasting any more of my time.

</comment></comment></comment><comment><USER18> Take a look at bstring[0] and you'll see how to circumvent C's null-terminated string in a clean and light way.

[0] [http://bstring.sourceforge.net/](http://bstring.sourceforge.net/)

<comment><USER19> bstring relies on undefined behaviour for security. Do not use it.

>Bstrlib is, by design, impervious to memory size overflow attacks. The reason is it is resiliant to length overflows is that bstring lengths are bounded above by INT_MAX, instead of ~(size_t)0. So length addition overflows cause a wrap around of the integer value making them negative causing balloc() to fail before an erroneous operation can occurr. Attempted conversions of char * strings which may have lengths greater than INT_MAX are detected and the conversion is aborted.

>It is unknown if this property holds on machines that don't represent integers as 2s complement. It is recommended that Bstrlib be carefully auditted by anyone using a system which is not 2s complement based.

<comment><USER20> It is not only unknown if this holds on machines that don't use 2s complement, it is quite likely that this doesn't even hold on machines that do use 2s complement, but have an optimizing compiler. In many cases, the overflow checks contains terms like

        (b->slen+1) < 0

which an optimizing compiler could compile as

        b->slen < -1

effectively switching the overflow test off (as there is no non-overflowing execution where this code will produce other behaviour than the original code, and behaviour on overflow is undefined, so the compiler can safely get rid of the addition).

<comment><USER20> I just had to check what happens using a real compiler using realistic compiler options (gcc-4.9.2 -O2): [https://github.com/websnarf/bstrlib/issues/8](https://github.com/websnarf/bstrlib/issues/8)

<comment><USER19> Thanks for doing that. It's much more productive than just moaning on HN like I did.

</comment></comment></comment></comment></comment><comment><USER21> Regarding the comments on the OP site

" D is the first example to have array slices that I can think, of so this might be slightly a-historical."

No, D wasn't the first one.

There were already systems programming languages with proper string types with the same age or older than C.

Usually there was a clear distinction between array of characters and strings, both in any case safer than C's approach.

</comment><comment><USER22> Another nice feature of C strings is that a substring spanning to the end is essentially p + something. You can also insert temporary null-chars in the middle and have copy-free substrings.

Most other high-level languages would let you copy the substring even if you don't intend to modify it.

<comment><USER10> > Most other high-level languages would let you copy the substring even if you > don't intend to modify it.

C++, std::string yes. But for example Java, C# and Go (slices) substring doesn't copy data.

<comment><USER23> Didn't java change its behaviour?

<comment><USER19> Yes: [https://news.ycombinator.com/item?id=9862556](https://news.ycombinator.com/item?id=9862556)

<comment><USER10> That's a bit scary. Some of older Java code relies a bit too much on substring not copying. I think most devs understood it pins the original String char[] buffer until all references are gone.

<comment><USER21> That was always a JVM specific behavior.

Like C, any dev that makes language assumptions based on the installed compiler, is bound to get burned.

<comment><USER23> Really? Does java offer no cost guarantees for library functions? If a given method might be O(1) or O(n) at the whim of the JVM, programmers are doomed to failure.

<comment><USER24> Even worse, with partial evaluation or escape analysis it might still be non allocating to use a substring call today.

So the thing about advanced compilers in the java world is that they use defined behaviour(results) to do optimisations. And the best optimisations are about not doing work you can avoid. i.e. if you can avoid doing an allocation at all because the (sub)string you just created is only used locally, the object might not be allocated at all (heap|stack) but just registers are reassigned with temporary values needed to calculate the function. So its already common to have O(n) semantics turn into O(1) or even better O(0) ;).

In the java world results are specced, not how you need to get them. (Exceptions to this rule exist).

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25> >A fixed size length field commits you to a maximum string size size_t would be enough, but I guess it would be too much of an overhead.

<comment><USER26> Debating the size of the size field is a folly: It's a struct with one char pointer, and a length field. For alignment / padding reasons, the length field with use the size of a pointer anyway, so `size_t` is entirely appropriate (and never too small).

<comment><USER27> A relatively common implementation of strings (as compared to slices) is to store the length before the char array. The length field can be encoded with a variable size encoding. The string itself is just a single pointer.

If you have a real garbage collector of course using the same representation for strings and slices (two pointers or pointer+len) is appropriate.

</comment></comment></comment><comment><USER26> Explicitly sized strings are so much easier to work with efficiently. SIMDified algorithms, for example.

</comment><comment><USER28> Can't remember where I read it because it was such a long time ago but one explicit benefit of null-terminated strings is that they take a single instruction to check for the end on nearly all processors: jump if zero.

That allows for elegant constructions in C such as:

        while (*p++ = *q++);

<comment><USER29> It may be syntactically terse but I'm not sure it's elegant as you would need to do several checks before this line or else you could end up with some pretty major bugs.

For example, you would need to ensure that sizeof p is >= sizeof q, or else you will end up with a buffer overflow. This then implies that q has a length and therefore a \0. So you will need to iterate through the string once to find the \0 (which may not be there).

Failure to do this can lead to execution of arbitrary code, which is why null terminated strings are indefensible frankly.

<comment><USER28> I read (and used) this during a more civilized age when everyone and his dog wasn't trying to get your program to execute arbitrary code, although I have still used the construct on a recent project on the Raspberry Pi and it worked just fine.

<comment><USER29> You're very naughty ;)</comment></comment></comment></comment>


Saying "NO" - <AUTHOR> http://blog.objectmentor.com/articles/2009/12/04/saying-no <comment><USER2> Four techniques for saying "No" without your client knowing it:

1\. Tell them how much something will cost. "Great idea! A live chat widget will cost another $20,000. What do you think?"

2\. Make them prioritize. Pick things that you know are more important. "How should we prioritize that change compared to paid subscriptions and the Help system?"

3\. Make them remember. Put it on the backlog and don't start it until they ask for it again.

4\. Offer them alternatives. We once had a client who wanted native Excel exports of reports. We suggested either CSV exports or HTML table exports, which Excel can read.

(This is more "no" to features than to design decisions, but the principal is similar.)

<comment><USER3> Absolutely!! The answer is always yes, sometimes qualified. The only no is when you decide you don't want them as a client and you find a reason to not do further work.

</comment></comment><comment><USER4> This is interesting, the comic makes it kinda cute, but OP's conclusion is exactly the opposite of what I firmly believe. I have learned over the years that the best way to win and keep quality business is to find a way to say "YES".

Buyers of software products, like small children, hear one word more than any other: "no". "No, it can't be done." "No we don't do that." "No, if you did that it would screw up everything else." "No, that's stupid" It doesn't matter if you're right, all that matters is that you're just another person saying "no".

You differentiate yourself from others by giving the exact same answer, but with the word "yes" instead of "no".

"Yes, in order to do that, we'd also want to look at..."

"Yes, let's make it 'pop' using some of the things we bring to the table..."

"Yes, no one even thought about that, and we should now before we get any further into this thing..."

or even the extreme:

"Yes, there's a way to do that. No one has ever done that before, so now is the time for someone to be first..."

As I've told my customers many times, "The answer is always 'Yes'. You may not want to do it once you understand what it will take, but the answer is still 'yes'."

No other word has helped me more to find myself and do my best work for others.

<comment><USER5> huh. I guess I am more 'product oriented' than you are, but I tell people 'no' when they want passwords rather than ssh keys to access their out of band console. I imagine it would be different if I was charging by the hour, but I'm not.

But this is part of why I like being a product company. I do my R&D on my own time, without an angry customer if it fails or if I take longer than I thought. "Here" I say, "are the products I've sold to hundreds of other people. I can sell these to you, too." Then I add "If you want something else, suggest it, I might add that as a product as well, then I will sell it to you and others who want it at a low cost, but I'm not going to make it just for you."

(of course, being a product company, if I screw up production, I have many, many angry customers.)

For me, this has largely solved the problem of not estimating correctly and/or managing customer expectations. Here is what I have. you don't like it? Oh, I'm sorry. would you like a refund?

<comment><USER6> On the other hand, if you can convince them that ssh keys are better than passwords, you might never get to the point where you have to say no.

<comment><USER5> mostly it's a filter. If you can't make an OpenSSH public key, you should probably not be managing your own VPS, and you should certainly not sign up with me, as all my interfaces are command-line only, and I don't have a nice GUI web control panel like many competitors do, and my support is email-only. go, pay the extra bucks, pay slicehost, and get someone to talk you through it on the phone. I don't charge enough to deal with that sort of thing.

If you wanted to hire me by the hour, that'd be different, but we're talking about people giving me $8/month.

<comment><USER6> Your line makes more sense now, since you're talking about a different situation from the article. It's a different relationship; since anything you do would have to benefit the many of your users at once to be worthwhile, it makes sense to have users who are similar to each other, ie, to say no to the outliers.

<comment><USER5> Yeah. a successful product business involves a whole lot more 'no' than a consulting business.

However, I think even when working by the hour, when I charge what I seem to be able to charge lately, I try to say "No, that's outside of my area of competence" because really, they are paying me way too much for me to 'figure it out.'

When it is in my area of competence, I think it's just as important to say "No, I think that's a bad idea, and here's why" - They are paying me silly rates, presumably because I know more than they do about what we are trying to get done; Sure, sometimes you need to translate the technical choice into a business decision and push it up the chain, but sometimes it's a purely technical decision, and within your realm of knowledge, and in that case, I am not doing my job unless I say "Don't do that" when the customer asks me to do something that is clearly incorrect.

</comment></comment></comment></comment></comment></comment><comment><USER7> In a previous lifetime, I was a graphic designer working at the Field Museum in Chicago. Fresh out of college and my first task was to design a logo for a client. I was eager to please, and I came up with about 10 logo ideas. I showed them to the client and all hell broke loose. They basically wanted a "super" logo that combined all 10 ideas, plus their own ideas, and I found myself in a very awkward situation of trying to figure out how to tell them that's a really bad idea. After the ordeal was done, my boss said "Yeah, next time, only show them two."

</comment><comment><USER8> The comic referenced at the top of the article was good for a laugh or two: <http://theoatmeal.com/comics/design_hell>

<comment><USER9> I think it also illustrates where this article goes wrong. You don't say NO to the client, you say NO to a potential customer before they become the client.

Citing the second part of the comic - Client: "Our last designer was an IDIOT". Then the next appropriate question is - What idiot hired/managed him?

You're about to become the 'last designer'

<comment><USER10> > You don't say NO to the client, you say NO to a potential customer before > they become the client.

This is critical, and it's fairly easy to recognize potential 'problem clients' when there's still time to escape.

<comment><USER11> Or just make sure you have an escape clause in your contract. Maybe the last designer actually was an idiot. I've found that if you behave like the doctor (in the article) it's often quite easy to steer the course of projects with even very difficult clients.

</comment></comment></comment></comment><comment><USER12> I wish I could vote this up 100 times. The first rule of requirements gathering: the customer doesn't know what they want. You have to tell them.

<comment><USER13> While I'm not disagreeing with needing to say no to a client, the moment you figure you know everything they want or more importantly, need, YOU are the one with the problem.

There are numerous examples of programmers/providers figuring that they know what the customer needs. They're called enterprise software.

<comment><USER12> There's a difference between telling people what they want and telling people that they want something that they don't want. You have to listen to them. But bear in mind that if they

</comment></comment></comment><comment><USER14> I think designers have this problem since anyone can have opinions about design. It's also hard to argue objectively why one design should be better than another, since design is subjective (for most parts).

Maybe the design process should be more "Google like" and include more design patterns that are field tested. The basic principle should be to use data to back up claims instead of subjective arguments. An example, if the customer wants an "intro page", then point to a "anti pattern" that argues against intro pages. Etc.

<comment><USER15> Couldn't you just defer to functionality when pressed on a design decision?

If you can't justify your decisions then I'd say having to humor the client is fair-game.

</comment></comment><comment><USER16> If you find yourself saying no a lot you need new clients, or a new line of work. Being a designer is hard, and so is finding good clients.

As an aside -- nightmare clients tend to crop up more on projects with thin margins. If you are taking on a new client, make sure the margins are not thin.

</comment><comment><USER17> The problem with his rationale regarding the very comic he's talking about, is that every body and their mothers think they got a clue about design, and that they know what is beautiful better than you . Most of us think that way, and that's what makes designing web sites such a painful job

</comment><comment><USER18> Part of this is just diplomacy. Don't say "No," just figure out what results they want, not just what actions they've asked you to take;

[http://www.byrnehobart.com/blog/how-not-to-say-no-to-a- clien...](http://www.byrnehobart.com/blog/how-not-to-say-no-to-a-client/)

</comment><comment><USER19> I thought this was a review of <http://islostarepeat.com></comment>


(Re-)Introducing the Heron Programming Lanugage - <AUTHOR> http://www.artima.com/weblogs/viewpost.jsp?thread=284558

<comment><USER2> You know, I hate to dog on attempts at innovation, but I fail to see what is new or exciting about this language. It looks like it's just solving some of the problems with Java and C++ that were apparent 15 years ago. I suppose baked-in support for parallelization of list operations is nice, but I wonder how that works with mutable state. And really, I thought (hoped?) OOP was starting to die out in the latest generation of languages that we were seeing, especially very _formal_ OOP.

I suppose strong support for meta-programming and compile-time reflection is a leap forward, but one glance at the grammar of the language, in all its complexity, made me wonder how feasible manipulating the abstract syntax would be in a real environment.

I understand not everyone wants to rethink and update older languages like Lisp (Clojure), Perl (Ruby), or Java (Scala), a but this just seems like the author got tired of waiting for C++0x and decided to make his own.

<comment><USER3> Why are you hoping OOP is starting to die out? I'll admit my lack of real FP knowledge (and an envy of those who have it), but OOP has done pretty well I think. I'm hoping I'm not succumbing to the Blub paradox here, but I might be, and like I said I'm totally NOT against FP in any fashion - far from it!

</comment></comment><comment><USER4> I read over the article. I don't exactly understand his desires to keep a developer from converting an instance of a superclass into an instance of a sub-class (presumably to implement the specific methods). Maybe I don't understand his paradigm properly, and that situation can never happen (there was mention of no virtual methods, either. Perhaps that has something to do with the above situation never actually existing), but why would this be an advantage.

Furthermore, can't that very restriction be circumvented by making it a two- step procedure instead of 1?

Eg:

Any a = (Any)someObject; DerivedObject b = (a as DerivedObject);</comment>


When Ramjets Ruled Science Fiction - <AUTHOR> https://www.tor.com/2018/07/30/when-ramjets-ruled-science-fiction/ <comment><USER2> I:was really confused for a second, until I realized they must mean Bussard ramjets, because standard ramjets are very much in use and lived up to the hype. It's a good article, although I still disagree with some of it. In particular...

 _NAFAL trips mean crossing time as well as space. But that shouldn't prevent exploration; anyone who would consider racing off that far into the future probably wouldn't have friends and relatives about whom they deeply cared in any case._

Maybe, but subjectively a few years into your journey when tens of thousands of years have passed on Earth, and you've been totally forgotten, your technology is equivalent to rocks banging together, maybe you'd care? When you arrive in a subjective 30+ years and millions of years passed on Earth and people aren't even remotely human anymore, and you're a relic of a relic its going to be weird. Who are you exploring for exactly? Not humanity, they moved in without you, so unless it's purely about starting a colony it's a pointless exercise.

Even more galling would be the result you'd encounter if FTL turns out to be viable, unlikely as that seems today. You arrive in Andromeda only to discover that human colonized it a million+ years before your arrival. Whoops. Relativity is a stone cold bitch.

<comment><USER3> >Relativity is a stone cold bitch.

Really? That sounds straight up awesome to me. After a few years of shore leave, I'd be tempted to grab one of the most reliable FTL ships, pack myself full on longevity treatments and then turn around and go again. See what humanity is like in another few million years. If it all goes to shit at least I'll have an FTL ship with me to go wandering around with.

All things considered, this might be a really good way of securing the existence of the human race, too. Send out one or two of these per millenia, as high speed stasis pods to refound humanity if it all goes horribly wrong in the mean time.

<comment><USER4> Alastair Reynolds' _House of Suns_ tells a similar story. A family of 1,000 clones split up to tour the galaxy and reunite every 200,000 years. Since they live lone, solitary lives off the grid, they witness from afar many civilizations rising and dying. I found it much more interesting than Reynolds' bone-dry _Revelation Space_ series.

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

<comment><USER5> Seconded, I just finished a re-read of House of Suns. I also very much enjoyed Revelation Space.

</comment></comment></comment></comment><comment><USER6> For us SF lovers, take some time visiting the link at the end of the article: [http://www.projectrho.com/public_html/rocket/slowerlight.php](http://www.projectrho.com/public_html/rocket/slowerlight.php)

<comment><USER7> This is ... amazing. It's like a TV-tropes level of detail about science fiction topics.

Also linked is a fun read about space combat: [http://www.projectrho.com/public_html/rocket/spacegunconvent...](http://www.projectrho.com/public_html/rocket/spacegunconvent.php#firstlaw)

<comment><USER8> > At around .998 c, the impacting ravioli begins to behave less like ravioli > and more like an extremely intense radiation beam. Protons in the water of > the ravioli begin to successfully penetrate the nuclei of the hull metal. > Thermonuclear interactions, such as hydrogen fusion, may take place in the > tomato sauce.

You're not kidding! This is awesome.

</comment></comment></comment><comment><USER9> > There is an alternative to the Bussard ramjet that offers many of its > advantages (at least as far the needs of science fiction authors go)—one > that has inexplicably only been used by a single author to my knowledge. > What that alternative is, however, will have to wait for another essay.

Hope he writes that essay soon.

</comment><comment><USER10> They show up in some recent Alastair Reynolds novels (House of Suns and the Revelation Space stuff, at least), though mostly as a bit of a dead end technology which doesn't go as fast as people might have liked.

Pity they're not workable, really, they were a fun idea.

<comment><USER11> In at least one of his stories the conjoiner engines were similar to highly advanced ramscoops, but he seems to have discarded the scoop part in later novels.

<comment><USER10> Yeah; in the novels they just work by magic (even in-universe, more or less). There is a ramscoop in The Prefect, though; it suffers from the practical issues mentioned in the article and is not considered useful.

<comment><USER12> Iirc they're explained as wormholes opening into a very early stage of the universe where heat/pressure/radiation are immense.

</comment></comment></comment></comment><comment><USER13> The article mentions Larry Niven's A Gift From Earth, but in fact Bussard Ramjets are tightly integrated into several of the stories in Niven's Known Space [0] sequence. Briefly, humanity sends colonists to several nearby stars in manned Bussard Ramjet ships. Eventually, humans encounter aliens who sell them the secret of an FTL drive, and the ramjet ships become obsolete. Several plot-points in the Known Space stories relate to the quirks of the planets colonised by the Ramjet crews, and in one short story (The Ethics of Madness), a significant part of the plot is a chase across spacetime of two men in separate Ramjet ships

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

<comment><USER14> The second half of Niven's novel _Protector_ even involves a space battle between Bussard ramjet-powered spacecraft.

</comment></comment><comment><USER15> His 28.6 year trip to Andromeda has the ship being accelerated at about 12000g, ouch.

You don't get to Lorentz down g-forces inside your own reference frame, do you?

</comment><comment><USER16> It's interesting to see this topic brought up without a reference to Haldeman's seminal Forever War. I can't recall whether he specifically outlines the means of interstellar travel in his universe as Ramjets but the story heavily relies on this concept.

<comment><USER13> Haldeman doesn't use Ramjets in 'Forever War'[0], since the soldiers have access to Collapsars (black holes?) for instantaneous point-to-point jumps. He doesn't describe the drive technology that gets them from between planets and the collapsars, except to say that the ships were 'converted cattlewagons ... with extra reaction mass'

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

<comment><USER16> Yeah I couldn't recall whether he specifically called out the drive technology used to accelerate and decelerate from the collapsars or not. From the description and mechanics it sounded pretty similar.

</comment></comment></comment><comment><USER17> I wonder how many of those authors first heard of ramjets from the mid-1960s kids' cartoon series, Roger Ramjet[0].

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

<comment><USER10> Probably very few. NORMAL ramjets (ie not magic space fusion ones) are quite old; the first ramjet aircraft was tested by the Soviets in 1940, and the US tested ramjet missiles in the late 40s. And scramjets (supersonic ramjets, where the internal airflow is supersonic) were meant to be the next big thing since the 50s, though they've never really worked out.

</comment></comment><comment><USER4> A Bussard ramjet sounds like the opposite of Star Trek's warp deflector. :)

<comment><USER10> Star Trek ships had Bussard ramjets! Though it was rarely mentioned: [http://memory-alpha.wikia.com/wiki/Bussard_collector](http://memory- alpha.wikia.com/wiki/Bussard_collector)

<comment><USER18> And amusingly, when they are mentioned, it's almost always when they're going to run them in reverse, to spew stuff out into space.

<comment><USER19> > run them in reverse

Surely you meant "reverse the polarity"?

</comment></comment></comment></comment><comment><USER20> Vaguely reminds me of the cartoon 'Roger Ramjet'....

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

</comment><comment><USER21> Any idea why the physics says it wouldn't work?

<comment> T-A [https://en.wikipedia.org/wiki/Bussard_ramjet#Feasibility](https://en.wikipedia.org/wiki/Bussard_ramjet#Feasibility)

</comment></comment><comment><USER21> Deceleration is almost more useful. Since we could beampower from lasers on earth for the acceleration.

</comment><comment><USER22> As a kid who grew up on a farm, I found the non sequitur footnote to be delightful (and true)</comment>


Ask HN: Which provider would you use to start a small web hosting company? - <AUTHOR> My day job involves looking after a Cloud Linux web hosting setup, based on WHM and cPanel, for a few thousand small customers in a niche sector.
I freelance and create (mostly WordPress powered) websites for small to medium businesses, as well as eCommerce sites and so on. I end up referring them all to various 3rd party hosts and domain providers, when most the time they ask if I'll host it and provide services like backups, setting up email accounts and so on.
As I have knowledge of web hosting, and it my work are ok with it, I figured it'd be a fun side project (I've been looking for one) to scratch an itch I've had to learn more about 'the cloud'. All my work web hosting is on our tin, and I've used Azure enough to dislike it.
What would you use to back it? I was thinking of either DigitalOcean as I know it well, or learning AWS, which I want to do but seems daunting. It'd be great to be able to auto scale, or simply create an EC2 instance per customer or something which would be great for security.
As well as the titular question, if anyone has any blogs or similar related, I'd be interested in reading. <comment><USER2> I suggest you get a reseller account from one of the web hosting provider and setup your clients on it.

Managing cPanel, WHM, CloudLinux, CXS, CSF, Munin, backup, security, etc is not easy.

ps: I'm running a web hosting business myself ;)

<comment><AUTHOR> I've done that for a couple of clients, but I wanted something I could entirely automate and my current host have randomly broken permissions and stuff during maintenance. I manage most of that stuff already anyway, I was wondering if anyone was backed by AWS mainly. Do you have a blog or something? I'd be interested to see how a small setup gets on - are you a one man show?

Edit: Never seen Munin before. At work my main responsibility is monitoring, so I setup and scale out our Icinga, Graphite, Grafana and Graylog platforms - you should check out the Icinga/Graphite/Grafana stack, you can do some awesome stuff!

<comment><USER2> For most of Azure, AWS stuff I use Ansible for automation and deploying my tools.

If I have something like wordpress, joomla or any other classic web application that can be easily run on cPanel, I don't bother with installing automation for them on AWS or any bare servers or even docker. Even though lately using docker, containers or stuff like that have become very popular.

Still tons of the stuff like database backup, monitoring, ssh access for each customer, htaccess configuration, php multi-version, etc are not easily done by those technology stacks, cPanel & CloudLinux cover them all.

If you want to play it cool, you can even run each web application on heroku.

If you're still considering to go out of cPanel stack, I suggest you something like Dokku, deis, Flynn, Docker Swarm, etc...

I don't have a blog by myself about this, but there are tons of resource about them how to go with each of them.

I mosltly play with Python, Go, Java, NodeJS and some others for web application, so CloudLinux or cPanel are not a fit for me. Therefore I get them done with PaaS as much as I can and tons of help from my Ansible playbooks to run customized machines on bare metal or AWS servers.

I started running the web hosting business as a one man show for a 3-5 months to get things running and now we have 2 people on it to manage cPanel/CloudLinux and OpenVZ servers.

Thanks for mentioning the monitoring stacks, I'v used some of them before but not extensively. I mentioned "munin" because its available as a plugin for cPanel and sometimes configuring it can cause confusion.</comment></comment></comment>


Ask HN: Is there a "street-team" for startups? - <AUTHOR>

I was wondering if there are street teams for new startups? It would be a cool idea and people love free stuff. I know I would check out a startup if I got a free sticker or something cool. <comment><USER2> Yes, we at Room 77 have been thinking of doing some street team outreach at various events and conferences where we can show people their hotel room before they check-in and wow them on the spot. I think if you just randomly go out to a mall or downtown with t-shirts and stickers, most people will take it but have no intention on checking it out (who doesn't love free stuff right?). Know your audience.

</comment><comment><USER3> Didn't this go out of fashion after the first bubble burst, leaving warehouses full of branded swag that no-one wanted?

Unless you are engaging with your target market, this is probably not the most efficient marketing technique. I could see it working in some cases though (e.g. outside a competitors conference, where you _know_ 90% of the people who pass will be interested in your startup).</comment>


Why Mathematics Works So Well [pdf] - <AUTHOR> https://arxiv.org/abs/1506.08426 <comment><AUTHOR> Abstract:

A major question in philosophy of science involves the unreasonable effectiveness of mathematics in physics. Why should mathematics, created or discovered, with nothing empirical in mind be so perfectly suited to describe the laws of the physical universe? We review the well-known fact that the symmetries of the laws of physics are their defining properties. We show that there are similar symmetries of mathematical facts and that these symmetries are the defining properties of mathematics. By examining the symmetries of physics and mathematics, we show that the effectiveness is actually quite reasonable. In essence, we show that the regularities of physics are a subset of the regularities of mathematics.</comment>


Useful podcasts for keeping up to date with innovations in the tech industry? - <AUTHOR> New methods in security, ML, etc. <comment><USER2> \- Software Engineering Daily

\- Exponent</comment>


Ask HN: Reward users for early upvotes? - <AUTHOR>

Reddit has the Knights of New -- who take it upon themselves to curate the queue of New items.  I don't believe there are any systemic rewards for such action or participation.
My suggestion is that the first person to upvote an article from 1 points to 2 points, when the article is subsequently upvoted by (say) hundreds of HNers, should get rewarded for bringing it to attention.
The person who upvoted from 2 to 3 should get somewhat less of a "reward".  The person who upvoted from 999 to 1000 should get epsilon.
This is just the seed of an idea.  It could take many forms.  I'm sure it has been proposed before.  Links to previous discussions entirely welcome. <comment><USER2> This would not work because there is no limit on upvotes. It would therefore be advantageous to just upvote a lot of random posts. And then if many people do this, it breaks the voting system entirely.

<comment><USER3> Multiply the reward a user gets with

      1 /( n_upvotes_user / (n_upvotes_all_users/ n_user))

Or use a more elaborate function than mean, maybe median.

</comment></comment><comment><USER4> You could get something like 10% of the karma of an article if you upvoted that article before it reached the frontpage and that article gets more than a certain threshold (say: 100 points, which would somewhat mean that the article is good. That way you get some of be benefits of the submitters, but not all. A bit like being an early employee at a startup.

However, people could just upvote all the newest articles without reading it and get the karma from the ones that end up scoring well, so that system wouldn't be perfect.

</comment><comment><USER5> The challenge is how to measure the quality of what gets upvoted. We don't want to reward all upvotes, only ones that identify the best stories for HN, as defined by [https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html) and [https://news.ycombinator.com/newswelcome.html](https://news.ycombinator.com/newswelcome.html).

<comment><USER3> Multiply the reward by

      (1 / (flags_post / (flags_all_posts / n_posts))) * (1 / (downvotes_post / (downvotes_all_posts / n_posts)))

<comment><USER5> Can you define these terms? I don't understand what they mean exactly.

At first glance, this expression looks like a positive number, meaning you could still get a reward by upvoting everything. If we ever roll out something like this, it has to not be possible to write a bot to gain karma—except, of course, by writing a bot the identifies the best stories, in which case you deserve it.

<comment><USER3> Sure. What I wanted to say is just, that you can create a measurement for low- quality posts through dividing the number of flags and/or downvotes the post got by the average number the other posts had had. Take the inverse of that product and you have a nice factor that approaches 0 for low-quality posts and 1 for high quality posts.

I chose a simple example, but of course you could use a more appropriate statistical method, apply a logarithm afterwards or just choose a threshold and reward only posts with 0.9 to 1.

Edit: I just realized I made a mistake. Of course, posts do not have downvotes. Flags would still work, but to a lesser extend, I guess. There has to be another method to identify low-quality posts. Maybe some measurement based on the number of comments, their upvotes and so on. That would get really complex, because these metrics again would have to be ungameable.

</comment></comment></comment></comment><comment><USER6> The reward comes from writing good comments. Writing good comments early on good articles tends increase that reward. Rewarding early upvotes would just encourage voting rings.</comment>


Abusing Nvidia's Node.js to bypass application whitelisting - <AUTHOR> http://blog.sec-consult.com/2017/04/application-whitelisting-application.html <comment><USER2> I've not been able to update my NVidia drivers ever since they started doing this. I don't allow outbound connectivity from software updates, nor from Nvidia, nor to any telemetry sites. This blocks Windows Update from updating drivers and also blocks the NVidia official driver update packages.

I can not find a .zip file on their site that has only the drivers.

In my opinion, not everything needs to be turned into a social networking site or a gaming up-sell site. Certainly not driver updates.</comment>


Ask HN: What happened to stockfighter.io? - <AUTHOR> Hey HN, Anyone knows what happened to stockfighter.io ? It looks like it's been down for at least a few weeks now :(. I was planning on playing the Jailbreak levels.<p>Is there anyone with some inside knowledge of StarFighter about what's going on ? Is the website down forever ? <comment><USER2> I assume you mean starfighter, not stockfighter. It's closed or in the process of closing.

[https://news.ycombinator.com/item?id=12415786](https://news.ycombinator.com/item?id=12415786)

[https://news.ycombinator.com/item?id=12464647](https://news.ycombinator.com/item?id=12464647)

</comment><comment><USER3> Patrick took a job at Stripe and shut the site down. My personal opinion is that the the site was over-complicated and he never actually figured out a good model for making money before the developer in him created an uber- complicated platform.

It also had lots of scaling issues. I tried it a few time and there were frequent errors/downtime. Something that made me not want to use it again. For a potential employer? It's even worse.

It's also a little disappointing that he took a job at a corporation, when he was looked up to in this community as someone that 'made it' with their own company.</comment>


Right-wingers are owning Facebook Live - <AUTHOR> https://backchannel.com/facebook-live-is-the-right-wings-new-fox-news-50d63fb8c639#.a8n35t931 <comment><USER2> I am shocked and appalled that people I disagree with might use some communications platform that I use too.

If only I could downvote...</comment>


"We sued a Chinese company on Amazon and they are now extorting us." - <AUTHOR> https://twitter.com/Molson_Hart/status/1231969414062448641 <comment><USER2> Amazon only seems to care about counterfeits for a certain protected class of seller. I sold DVDs about 7 years ago and bought them from legit sources and sold no counterfeits.

I had nearly 100% positive reviews and would bend over backwards to help any customer with any issues. What I believe now is a competitor purchased a DVD, filed a claim that it was a counterfeit, and even told me that they were going to 'punish' me in their comments.

Before I had a chance to even resolve the issue, my account was permanently banned. All of my messages to Amazon support went to an automated department and I was rejected outright.

To this day, I can't even open an Amazon seller account in another industry or login to a companies seller account without the account getting banned.

I now have a business that does millions of dollars in revenue/year (different industry completely) and Amazon reps have been hounding me for months to open up a Business account. I always tell them I will do it if they can resolve my seller account issue and the response is always the same: "That's not my department" and they stop emailing me.

It's scary that there is really no recourse if a company like Amazon bans you for life. As we get more reliant on companies like this, there will be a class of people that eventually won't even be able to buy anything.

<comment><AUTHOR> You can take them to arbitration. I've heard anecdotally of people who got reinstated that way. Multiple stories of people I know personally.

That said, my own account was permanently blocked after false counterfeit complaints and I'm currently entangled in a lawsuit against the companies that filed those complaints. Legal process is rough. Takes time and costs money and is emotionally draining even if you have a strong case.

<comment><USER2> That ship has sailed. It taught me a lesson not to base any business on any 3rd-party platform.

If I ever start a business on a platform again, my goal will be to move away from it as soon as possible.

Amazon is a horrible company and although it's tempting to sell products on their platform, they will only steal your business from under you.

</comment></comment></comment><comment><USER3> Sounds like amazon is also to blame for allowing this behavior on their platform. Getting $$ from someone in China might be difficult from a legal standpoint.

<comment><AUTHOR> Worth taking a look at the proposed law by this person, linked downthread. One of the proposals is to require all foreign sellers to have insurance to cover any legal judgements. This would effectively solve that issue, and insurance companies would presumably do some kind of verification to make sure companies aren't fly-by-night, which would cut out a lot of bad behavior.

<comment><USER4> It's really not hard to get crappy insurance. What's hard is getting that crappy insurance to pay out when there's a problem.

<comment><AUTHOR> If the insurance is required to pay any judgements against the company, they will pay. The system works for car insurance - you must carry liability insurance if you drive.</comment></comment></comment></comment>


Where's Ryan Dahl? - <AUTHOR> Did he specify any reasons?
http://news.ycombinator.com/item?id=4691994
Twitter http://twitter.com/ryah
Not on G+ http://plus.google.com/115094562986465477143
Not on reddit http://www.reddit.com/r/node/comments/h1m2o/i_am_ryan_dahl_creator_of_nodejs_ama/
Livejournals are deleted http://four.livejournal.com/ http://ry-comic.livejournal.com
Github http://github.com/ry
Website is redesigned (it had a hand drawn sketch for a long time) http://tinyclouds.org/
Sorry Ryan! I am just curious. <comment><USER2> Ryan caused a lot of drama not so long ago saying some things that escalated into quite a lot of people flaming him on Twitter - I'm unsure if this is why he's abandoned the other websites as well.

<comment><USER3> All I could find was this: <http://shitryandahlsays.tumblr.com/>

I don't see the problem with him saying what he thinks; heck I agree with most of his points.

<comment><USER4> Some of it is inflammatory and though I don't agree with such treatment I can see why he received it.

One example is this: "Node.js has linear speedup over multiple cores for web servers."

In general it is possible to say crazy and inflammatory things without repercussions only if these 2 things are true: 1) There is already enough dev karma and respect 2) The things you say are true.

Think of Linus. Linus rails on people publicly and is quite insulting. But he has both lots of dev karma and also most stuff he says is true.

Think of average Joe programmer some place on a mailing list. They don't have public dev karma and even if they are right and say true things, if they say it in an insulting way they will face repercussions. Others might point out that he is right but he will still have to handle negative responses coming his way.

Ryan in this case has lots of dev karma (#1) but he messed up (#2), he said things that are wrong and because he put them in a rather insulting tone, this amplified the response.

<comment><USER5> I'm all for someone talking shit, but you have to be able to stand up to the blowback. I have little respect for someone who talks shit, then gets all bent out of shape that someone is talking shit about him.

<comment><AUTHOR> The sad part is when this someone doesn't defend and people start ridiculing the argument (instead of just losing the credibility for the person) whereas a defense instead can potentially make them a convert (a radical example can be programming development methodologies) regardless of the sense of the argument; or at least humanize the enemy.

</comment></comment></comment></comment></comment><comment><USER6> Flagged. I understand the curiosity, but as was the case with Mark Pilgrim and __why, it's not right to pry into the private lives of these people.

Obviously, Ryan Dahl no longer maintains a public internet presence--his reasons are his own.

<comment><AUTHOR> The curiosity is about his well-being, and this hype for possible loss- mitigation by collecting the remains from the erased persona. Also, a reminder to be nice towards fellow programmers. Referencing Paul Buchheit's write up in this context <http://paulbuchheit.blogspot.in/2011/08/i-am-nothing.html>

</comment></comment><comment><USER7> One of those heated discussions on HN 4 months back: <https://news.ycombinator.com/item?id=4306241>

</comment><comment><USER8> A few months he was being harassed on twitter and just left the Internet.

<comment><USER9> What sort of harassment?

<comment><AUTHOR> A direct attack on a creative soul is quite daunting. I'm talking about stuff like <http://shitryandahlsays.tumblr.com/>

"Creative people are on the whole fragile beings, and letting each other down gently and quietly was the unwritten rule." \- [http://www.lindsredding.com/2012/03/11/a-overdue-lesson- in-p...](http://www.lindsredding.com/2012/03/11/a-overdue-lesson-in- perspective/)

</comment></comment></comment><comment><USER10> Oh give it a rest.

He didn't 'leave' the internet. He's just taking time away from all the fooflah. You know, not everyone needs to be hooked up to the machine 24x7.

<comment><AUTHOR> But he deleted his stuff which makes me sad :(

<comment><USER10> It is his stuff. People can do that.

Sometimes people want to do something different,

</comment></comment></comment><comment><USER11> Who cares?

<comment><USER12> I do.</comment></comment>


Advice for the Freelance Developer - <AUTHOR> https://medium.com/@marknutter/advice-for-the-freelance-developer-68b63c69b050 <comment><USER2> This is good advice. One thing that surprised me was viewing a long-term contract with a big company as a holy grail. That's different from my way of thinking. Also, I've never been tempted to double my rate for those; my instinct is to pass some of my overhead savings back to the client. I'd be interested to hear some elaboration on those topics.

<comment><AUTHOR> A long-term contract with a big company paid for my first major down payment on my current house, helped me even qualify for the loan in the first place, and helped me get a huge head start on saving for retirement. When you find an opportunity where you can get paid your hourly rate and the number of billable hours is unlimited, my advice is to jump at it. Corporations are much more financially stable than small clients and often far more willing to pay for quality rather than penny pinch. You also have an opportunity to work on larger scale problems and meet other developers whom may provide you with future opportunities both from within that company and at any future company or ventures they join. The only problem is that it can start to feel like you're wearing golden handcuffs, especially if the work isn't rewarding. Just make sure not to do what I did and forego taking vacations and working too many hours during the week, because that can lead to burnout.

And as far as hourly rate goes, there's only two universal truths – you are either undercharging, or you are overcharging. Most freelancers undercharge by a wide margin, especially younger freelancers and engineers (who in my experience tend to be more humble and self-doubting). It sounds like you may be up against universal truth #2 and passing savings onto your client is a way to attract more business. You also sound like you're happy with the amount of money you're making which is great, but keep in mind that the amount of time you'll be able to continue doing what you're doing right now and make good money at it is finite. Also, think of it from the client's perspective; how often have they offered to double your rate to pass on some of their profits back to you? It's a business arrangement, not a friendship. Make sure you're getting something in return for discounting your rate, like future opportunities or referral opportunities.

It's important to keep in mind that there's no guarantee what you do will be in high demand for the next 10x years, and there's no guarantee you'll be able to or even want to continue doing it that long. Because freelancing does not scale like a company can you have to maximize your revenue as much as possible while you can and save as much as possible along the way. When you're done, you're done. You won't have ownership in a company you helped found or a pension from a company you worked for. You'll have whatever you set aside during the fat years.

<comment><USER2> Great followup, thanks. Getting a home loan is one time when it pays to be on board with a big company.

Good point about networking. My best networking came from mid-size companies (~100 people - for me that's a big company), because there was a good flow of new people coming through regularly from elsewhere in industry and I actually got to meet most of them.

In general, it seems to me that the best results came when a small, motivated group of people with money had an opportunity to make a lot more money by solving some hard problem before someone else did. In those cases, the payoff was very clear to them and they were ready to pay accordingly. Big companies do this, but they usually seem to do it by partnering with smaller companies or by doing a skunkworks project, often relying on outsiders.

I agree that not enough developers plan for a short career. One of the nice things about being independent is you don't get to fool yourself into thinking you'll have a job in a month.</comment></comment></comment>


IE10 beats Chrome, Safari, Firefox at blocking web malware - <AUTHOR> http://www.zdnet.com/ie10-beats-chrome-safari-firefox-at-blocking-web-malware-7000015409/ <comment><USER2> The source is a company who seems to have put IE as #1 in their tests ever since IE8 days. Just saying (you can do a google search for the company's name and microsoft).</comment>