Hash URIs - <AUTHOR> http://www.jenitennison.com/blog/node/154 <comment><USER2> Does nobody care that this makes the world-wide-web completely pointless from any perspective that isn't a web browser with JavaScript? I'm going to be royally pissed if I have to write from scratch an http library in C with JavaScript support just to make a friggin' scraper script or debug a website/webserver.

If you want to be annoyingly fancy with the way you deliver content, just do it to user agents that _support JavaScript_. For any other user agent just provide the actual content we wanted! To do this, all you have to do is _not use hash tags_. The URI can remain the same and the application will work just fine (JS can still check the friggin query uri and do any Ajax trickery it wants). Sometimes I think webapp designers are just trying to piss hackers off.

We'll ignore the fact that having to escape the bang is really annoying, considering the page is useless from the console anyway due to the aforementioned requirement of JavaScript.

<comment><USER3> You don't need to embed Javascript to solve this problem, which has confronted web security products since the invention of "Ajax". Yes, the clientside is evaluating JS to figure out what to load, but once you know how those loads work, nothing stops you from simply making the "backend" requests directly.

We can nerd out till the sun goes down on how feasible it is to automatically figure out what links to load, but we spend the better part of many people's time every week dealing with this, and it rarely creates a major problem. Actually scraping tag soup is _by far_ the more annoying issue.

<comment><USER4> I'm not sure reading and fully comprehending the flow of the complete JavaScript source for every site you might wish to scrape is actually easier than making a WebKit-based scraper that runs load and click handlers.

<comment><USER5> Relevant: <http://code.google.com/p/phantomjs/> is a headless browser based on WebKit

I don't have any hands-on experience with it, but if one were to go down the path you just described, that project would likely be a great start on that journey.

</comment></comment></comment></comment><comment><USER6> At Cloudkick we use the hash bang on our new overview. The hash bang URI represents the application state or view. It is a UI tool that helps provides the user with an additional, browser friendly, means to navigate the application. The information in the hash bang is also private to the account and irrelevant to the public which can't access the same information. The URI portion without the hash bang is simply the application's address. The server doesn't need to know about application's UI, all it does is deliver the application. Many sites make the server part of the user facing application with server side templates and scripts but we are moving away from that. The UI will be in the client and server doesn't need to know about UI state. If your server is part of the UI then don't use the hash bang convention as the server can't make sense of it.

<comment><USER7> I don't understand why Cloudkick uses a hashbang instead of just a hash. Is my overview being indexed by Google?

<comment><USER6> Your overview isn't, but we've built this into our library of tools that we use for history management, and maybe we will build something like our provider portal that would be.

</comment></comment></comment><comment><USER8> It's part of 2 general trends that are taking place recently.

1) A move away from server-side programming. Server is now used to serve static files and json data. Not to dynamically create pages. Application logic is not done in javascript.

2) The emergence of high-level javascript frameworks that do most of the blunt work. These frameworks are server-language agnostic and hence do all of the application scripting in browser. JQuery Mobile and Mobl come to mind here.

</comment><comment><USER9> Great article. Recommends building on conventional hash-less URIs and using progressive enhancement e.g onClick handlers to implement hash-bang URIs.

Three particularly interesting ideas:

* sites should support the _escaped_fragment_ query parameter, the result of which should be a redirection to the appropriate hashless URI

* if you're serving large amounts of document-oriented content through hash-bang URIs, consider swapping things around and having hashless URIs for the content that then transclude in the large headers, footers and side bars that form the static part of your site [can't envisage how this would work]

* "I suspect we might find a third class of service arise: trusted third-party proxies using headless browsers to construct static versions of pages without storing either data or application logic"

<comment><USER10> If you're starting on a new app today then I'd suggest to embrace the history- API instead of entering the world of pain that is hashtags.

<http://caniuse.com/#search=history>

Adoption will sky-rocket when Firefox 4.0 rolls out, as that is the last major browser to not support it yet.

Oh yes, and then there's IE... This is where my suggestion becomes opinionated: Screw IE and display a polite message to the remaining IE- visitors.

<comment><USER11> Well... I don't see how ignoring IE would change that much for those visitors, if the pushState is used only as progressive enhancement. I probably wouldn't even display a message to them.

On the other hand, if dynamic changes are essential, we'll have to support hashbangs too.

</comment></comment></comment><comment><USER12> I think the whole method that these sites use to deliver content is completely backwards, at least from the user perspective.

The goal of going to a web site is ultimately to get the content you are looking for. If you're going to Twitter, it's to read someone's twitter stream, etc.

The way these hashbang sites function is to display the least-relevant (to the user) information first, all the chrome and ads of the page. Then, when all the stuff you don't actually care about is done rendering, only then does it go and get the content you came to see.

This drives me nuts as a user. It is particularly annoying on slower devices, such as Edge or 3G smartphones, where you see the lag even more strikingly.

From a user-experience, content-oriented framework, this entire architecture should be reversed. The URI should point to the content, not the presentation as it does with Hashbang. The content should be served first, in a readable format, and then the javascript magic should kick in, download all the chrome in the background and then update the page once with all the other elements.

If you're going to have your page do a secondary load anyway (as hashbang does now) you might as well make the content the front-and-center part.

<comment><USER13> > _If you're going to Twitter, it's to read someone's twitter stream, etc._

You may be interested in the twitter-like website I'm currently developing. It currently uses no JS at all (it will do so, for e.g. writing new messages, but the entire functionality will work without JS).

</comment></comment><comment><USER14> I am hearing a lot of vitriol against the use of the hash uri (or hash-bang uri) pattern. While I agree that it does make a slightly different set of assumptions about the browser model, I don't think that application developers are employing it just because it is a " cool new thing".

In many cases, the hash-uri enables a new class of applications and system architectures that were not previously possible on the web. Naked (hash less) uri's require that all state transitions round-trip to the server. This isn't at all desirable if you want to support offline, or high latency (mobile) clients.

I am in agreement that we want to retain the link structure of the web. But we also do want to not freeze the application architecture of the web to 1997. I think this post had some great recommendations about implementing a hash-bang based site, and still "playing nice" with a diversity of client assumptions.

<comment><USER15> > I don't think that application developers are employing it just because it > is a " cool new thing"

Have you seen the Gawker media redesign of lifehacker, Gizmodo, etc? They appear to be using the hash-bang for all links for no good reason at all. So yes, some big sites are employing it because it's a cool new thing.

<comment><USER14> That may be. But it's pretty hard to ascribe _intention_ simply by looking at their site. While what they are achieving _could_ be implemented w/o the use of hash-bang URIs, it may be that they have reasons that are not readily apparent.

Whether you agree with them or not, there was a lot of thought put into the Gawker redesign:

<http://lifehacker.com/#!5701749>

I do note that they (sometimes) avoid redrawing the right-hand column, when I switch between Gizmodo articles, since they don't refresh the whole page. Even though they still have dozens of server round trips for this kind of transition, they seem to flow in very quickly and the page transitions are actually quite smooth. This would not have been possible with a standard page refresh (which would re-anchor the browser view to the top of page, regardless of the user's current scroll state).

I'm not saying they are taking optimal advantage of the hash-bang pattern, but it does allow them some user experience optimizations that they could not get without it.

<comment><USER15> The links could still be rendered as regular urls and onclick handlers used to dynamically update the page and set the fragment for bookmarks.

<comment><USER14> Isn't that what they are doing?

<comment><USER15> No, all links are hashbanged. Probably simplifies the implementation a bit because they only need one method of loading pages (Ajax) but I don't think it's particularly friendly.

<comment><USER14> I think the two methods result in the exact same thing. Especially since the crawler won't see any raw HTML pages anyway - all links are hashbanged, and have to be crawled via the Google parameter rewriting scheme.

<comment><USER15> Except non-JavaScript (or limited JS) browsers see nothing at all. Graceful degradation in this situation isn't all that difficult, they just chose not to do it.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> _Fragment identifiers are currently the only part of a URI that can be changed without causing a browser to refresh the page_

This is actually the primary reason for most of the hash and hash-bang uris in today's javascript-heavy sites. Once all the popular browsers allow changing URI without reloading the page, the whole issue will become irrelevant.

I am actually a big fan of HTTP and REST (the real one, with HATEOAS), but browsers have a long history of making it hard to write RESTful web sites. HTTP methods had long been restricted to GET/POST; code-on-demand support before XHR had been very rudimentary (javascript was almost useless, and I don't even want to mention java applets); browser addressing conventions led to horrible (from the REST point of view) practices like redirect-after-POST etc.

</comment><comment><USER17> Good article. Although instead of writing "A browser that doesn't support Javascript ..." (implying some failure or deficiency in the browser) he might have written "For users who selectively disable Javascript ..."

<comment><USER18> There's also millions of low-end mobile devices that can reach the web but don't support javascript.

</comment></comment><comment><USER19> A lot of visually impaired people disable javascript too since it usually doesn't play nice with the screen reader.

<comment><USER20> According to this survey (<http://webaim.org/projects/screenreadersurvey3/>), 98.4% had enabled js.

</comment></comment><comment><USER21> There are a number of data points these days behind the social wall that will never have access to a crawler.

</comment><comment><USER22> Keep it simple.

Hopefully they did not use AJAX to serve static content.</comment>


YC's Top 100 Companies - <AUTHOR> http://www.ycombinator.com/topcompanies/ <comment><USER2> I wish a valuation column was added. Much easier to read. Now we have to intepret from the text. Not a big deal, but prefer it as a separate column</comment>


Sexed up and smart: Women debate Marissa Mayer's Vogue photo - <AUTHOR> http://www.cnn.com/2013/08/20/living/marissa-mayers-vogue-photo-women/ <comment><USER2> If it was a dude who was a CEO and was on the cover of GQ no one would say a word.</comment>


Ask HN: How to raise 10M for a SaaS product? - <AUTHOR> The market structure an obsolete leader (lead time for highly requested features literally 6-10 years)owns close to 50% of the market. There is a large number of competitors literally none offer capabilities that would allow F500 company to switch from market leader to their offering. Building up a competitive offering would take a few years and a 10M round. This does not fit normal VC deal structure. How could one look for capital? (market size is about 6 billion) <comment><USER2> So you already hit the nail on the head. You say "This does not fit normal VC deal structure." That generally means you are going to have to create a whole new funding market to get that 10MM you are looking for. The important part is why.

The reason this doesn't work for VCs is because their model works and works well. They want enough risk to allow for a substantial level of potential upside, with a reduced amount of time (and therefore risk) to see results. So basically they are fine with relatively small amounts of money going into relatively small SaaS products as long as those products have some users, some revenue, and a path to higher profitability.

You are asking for a relatively large sum of money, for a very high risk project. Your project is high risk because it has absolutely zero customers, a long lead time for any sort of results, and has an absolutely giant competitor that owns a massive market segment. With zero customers, we have no idea how long it will take you to get to any sort of profitability. With no product built and with a long lead time to build any sort of product we don't know if you'll really build the right thing to get to profitability (and, neither do you, even if you think you do). Finally, you admit you have a giant competitor that owns the market. You can get past that but it will be potentially really costly and risky.

At the VC I work with, there wouldn't be a lot of interest in any of that. It's not because you don't have a good idea. It's also not because you aren't right that there is a market there and that you might be able to take it over. Those are all true and I believe you. The problem is $10MM is a lot of money and can be used in numerous other potential investments which have less risk and could do quite well.

So what should you do? If you really want to do it, I would look at how Elon Musk built SpaceX and Tesla. First, come up with another idea, make that successful, make quite a bit of money, then fund this project with your own money and the money of the people you gain new relationships with. This might sound silly but it's really not. If you can build this company, first build one that is less lucrative but still successful, then build this one. It happens more often than you think.

</comment><comment><USER3> Make an MVP that has some of the capabilities you mention, and build a small loyal audience that pays, either with eyeballs/time spent on the app or actual dollars. If you have a smidgen of that, and a team of 1 or more capable people, you can then approach people for funding which would be needed to scale your product out to more users and more capabilities (iterating). How you do it is simple, you show your product, user base, yourself, and your vision to anyone who will listen. And then take the amount needed to make it happen (could be less than the 10M figure you mentioned, actually wondering where you go that number from). Good luck!

<comment><AUTHOR> I would 100% agree with you there are literally like 100 offerings that lack features that you absolutely will not be able to do as MVP as in enterprise grade workflow engine with visual editor etc. There no lack of competitors on the low end of things and there is literally 0 competitors on the high end of things. So there is no business case in trying to compete on the low end there is very good case for the high end offering but it literally does not fit the regular VC deal structure.

<comment><USER3> I really don't agree, and think you are misguided by the high end/low end characterizations, although I can see where you are coming from. You think that if something was enterprise grade, etc. and had all the features people would switch. You could be right, but

a) you really need to check out some case studies about things like this because people absolutely do not shift to a "better" or even "more complete" product. There is a thing such as lock-in and it's caused by many factors, some of which the user don't even have control over and

b) Consider that people using the other offerings could use your simple less complete offering but which has that 1 killer item (and a couple more as time goes on and you add them slowly). I have seen it many times and I'm sure you have too -- users keep using Photoshop but use that other editor for something special. Or use Office but use some other tool for their specialized offering.

I really think this is the way to go to a) have success and b) even get funding. It's incredibly difficult/rare, even for a team of multiple highly proven individuals, to get that kind of funding and green light to go do a waterfall project based on your hunch that everyone will switch if something just existed.

<comment><AUTHOR> I know not going into specifics is making this sound a bit stupid but again "high end" is not a marketing term in this case there is a minimal set of features that would enable a F500 company to switch there is litterly close to a 100 low end offerings that are useless for the f500 use case and no matter how cute they are they not going to make a dent. The cool thing this is targeted at super technical people who absolutely hate the status quo and truly would love an alternative, but that alternative has to support their use case.

<comment><USER4> A reasonable founder would have to ask why nobody will compete on 'high end' features. Maybe they're much more difficult to build, perhaps there is an incredible amount of vendor lock in, or perhaps nobody really cares about these 'high end' features...

<comment><AUTHOR> I agree all very reasonable questions but going back to original ASK HN. It's obvious there are instances where developing MVP takes a significant amount of resources what are the avenues for financing such a project.

<comment><USER4> I've noticed that you really like this idea. That's good - you'll need passion. But, I'm concerned that you have so much passion that you've convinced yourself that if you build a high end product, you'll get customers.

There are a lot of very smart people out there and $10m isn't too much for an experienced founder to raise. If this market is so big and frothy that you can name hundreds of low end competitors, someone would be competing at the high end. Why isn't anyone??

Once you can answer that, you'll know what kinds of avenues are available to finance it.

Sometimes, high end variants look seductive because there's no competition. But, there's no competition because margins are too low to support the high end product. Other times, there is no competition because sales cycles are measured in years and nobody can stay alive long enough to get to yes. Other times, there is no competition because you have genuine insight that gives you a severe competitive advantage.

Those 'choices' point towards three financing options. The first one, if margins aren't high enough to pay for the damned thing, you're starting a non profit, so it's time to look for grants, patreon, etc. The second one, where sales cycles are too long, is a great use case for crowdfunding. And the third one sounds like a deal that VCs would get in on (if you have the background/communications skills).

On the other hand, if you can't figure that out, or if you keep coming back to no financing, you might be looking at a bad idea...

<comment><AUTHOR> 1) I like the idea because I am on the receiving end of the pain as a user

2) There are fundamental reasons why you can make a better product and the leader can not respond (would be too long trying to outline why here)

3) This product is used by eng. daily most startups in this space are by software eng. and try to address the pain points for eng. and not for managers.

4) The leader product can not be used by F500 customer (managers) without a number of 3d party addons (which can and should be part of core functionality)

5) without going into specifics imaging SAP ERP system that was built from quickbooks e.g. fundamental mismatch between original arch. and what was bolted on over the years.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER5> I've been a founder twice at startups that raised a lot of VC and the MVP was big. The only reason we did it is because we had experience as founders, and the MVP really was big (a chip once, a web-scale search engine the second time).

</comment><comment><USER6> You can't really unless you have done it before in which case you would not be asking here as you would already have the network that would give you the money.

There are a few ways you could manage this.

1\. Find a single rich individual who will back you. This is not going to be easy, but it is possible.

2\. Raise less and move the development team to a low cost country. A tight team of a half a dozen smart people can get a lot done if they have time on their side.

3\. Work on something else first, sell, and try when you have money and credibility.

</comment><comment><USER7> There tons of examples that fit this description. Financial record keeping (401k, mutual funds, etc), medical insurance claims processing are some. The market is large, legacy providers and their legacy systems are complex, featureful, and entrenched. These can be very very difficult markets to break into. The sales cycles are years long and conversion cost high. I've heard numbers like 20k to 40k hours to convert on to new providers.

Does you pitch take all this into account as well, not just the tech?</comment>


Fortnite Removed from App Store - <AUTHOR> https://www.gamespot.com/amp-articles/fortnite-pulled-from-ios-app-store-after-epic-circ/1100-6480913/ <comment><USER2> > Apple has removed Fortnite from the iOS App Store.

So this is the hill Apple wants to die on. It makes sense. 30% of all the apps economy is a lot of money.

I hope that antitrust and other government agencies take note.

The ability to take down the 7th top grossing iOS game without blinking shows the kind of power that Apple has over everybody else.

<comment><USER3> They really don't have a choice. Every app developer thinks the 30% fee is excessive and if Apple lets one company get away with it everybody else is going to follow suit.

<comment><USER4> Amazon already got away with it with their video streaming service.

You totally get away with it if you have something that Apple needs badly enough

</comment></comment></comment><comment><USER5> Discussion of Apple topics here on HN almost always gets reduced to the argument that Apple is not a monopoly, so what they are doing is OK. I want to present an alternative viewpoint. It's not a monopoly issue, it is an anti- competitive issue. In Canada, we have three major cell carriers. None of them has a monopoly, or anything close to it. None of them has even 50% market share.

You can have a 10 GB smartphone plan with Rogers for $75. If you don't like that, you can switch to Bell's 10 GB plan for $75. If you don't like Bell, of course you can switch to Telus's 10 GB plan for, wait for it, $75.

The Big 3 operate smaller brands with fewer bells and whistles and lower costs. You can get a 4 GB cell plan from Koodo (Telus subsidiary) for $50, or from Fido (Rogers subsidiary) for $50, or from Virgin Mobile (Bell subsidiary) for $50.

Sometimes one of them has promotional pricing, like $45 instead of $50 for 4GB. The other two offer the same pricing for the same duration. Sometimes one of them increases their prices by $5 a month citing reasons such as infrastructure investments, lower Canadian dollar value, or inflation. The other two increase their prices by the same amount a couple of days later.

And none of this is collusion in the legal sense. They don't gather in smoke- filled rooms and decide how to screw over their customers. There is not back- channel communication whatsoever. And it is not because the competition is so perfect the prices have been commoditized. In fact, Canada has some of the highest cell plan prices in the world, even adjusting for factors such as population density and GDP.

It's just that the big companies have decided to stop competing. If you live in, say Alberta or Ontario or BC, you have three options and they are all the same overpriced crap. Cell carriers in Canada are not a monopoly, but you don't have to be a monopoly to harm customers with anti-competitive behaviour. Apple and Google, Android and iOS do not have a monopoly or a collusion agreement. But they are harming the customers all the same.

<comment><USER5> I think this is called tacit collusion. You see something like this with gasoline pricing - major brands will have "competing" stations across the street from each other, but their prices moves in lock step without a race to the bottom.

Memory vendors have explicitly colluded in the past, but they really didn't need to - they just needed to copy their competitors' posted pricing. Presumably that is what they do now.

If there are high barriers to new competitors entering the market, then the situation is unlikely to change.

<comment><USER6> While it looks like collusion, collusion is fiendishly difficult to prove and prosecute, much less disrupt. I think you're right...unless there's a substantive change in the market landscape, nothing will change.

</comment></comment></comment><comment><USER7> Main discussion:

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

</comment><comment><USER8> It's amazing that one company could control the hardware and universal functions like texting in such a restrictive hyper-capitalistic way.

"You can write apps for our hardware but all your purchases we take 30%..." imagine Microsoft trying this tactic in the 1990s.

<comment><USER3> The year of Linux on the Desktop probably would have actually happened.

But that's really not the right comparison. It would be more like back in the pre-clone era IBM taking a cut of everything that ran on a PC. They might have even gotten away with it had the courts gone the other way on the BIOS copyright lawsuit. Probably would have set personal computing back for years.</comment></comment>


Ask HN: How to fund an open source project? - <AUTHOR> A few months ago I built an App that people seem to like a lot: https://twitter.com/search?f=tweets&vertical=default&q=snapdrop&src=typd [1]<p>Now I'd love to work on it full time, but I'd like to keep it free and open source.
Do you have any suggestion on how to fund it? Thanks a lot! <comment><USER2> Any time you ask for money your job changes. If you just want to work on an open source project, you're a developer. If you want people to give you money for your work and/or the results of it, you're a marketer.

So there's nothing new, just google "marketing" and start learning. It will take some or all of your time and there will be a learning curve.

You will also have all of the problems of marketing, like not having any idea if the idea itself just isn't worth money, or if you yourself just haven't figured out the right pitch to the right audience. You'll have to think like your customers/donors, instead of like yourself. If you take it at all seriously you'll start to wonder if you should keep working on what you like or switch to working on what people will exchange money for.

For example, the software that forms the infrastructure of the internet should be an obviously easy pitch for money to support development, or at least QA, but the OpenSSL project got like $2K [https://en.wikipedia.org/wiki/Heartbleed#Root_causes.2C_poss...](https://en.wikipedia.org/wiki/Heartbleed#Root_causes.2C_possible_lessons.2C_and_reactions)

The only way to get money is to hustle.

</comment><comment><AUTHOR> [1] Clickable link: [https://twitter.com/search?f=tweets&vertical=default&q=snapd...](https://twitter.com/search?f=tweets&vertical=default&q=snapdrop&src=typd)</comment>


The New Obvious Choice - <AUTHOR> http://www.theindy.org/514

<comment><USER2> Juxtapose doesn't mean what the author thinks it means... "This sort of thinking is interesting because it's oddly similar to how students make decisions when going into finance, a particular industry that Google is usually seen to juxtapose."</comment>


Ask HN: Any good BuySellAds(BSA) alternatives? - <AUTHOR>

We are PSD to HTML/WP agency in Sydney, Australia and the business is pretty stable. http://www.xtmlweaver.com
We've been using BSA for awhile and the monthly budget is about $2K for advertisings (cross few different sites).
I'd say that BSA is pretty good and hassle free service. But in recent month the CTR has been dropped for us so the money we spent doesn't give us good return.
I am wondering that are there any good BuySellAds(BSA) alternatives for tPSD to HTML/WP type business?
I don't think there is any wrong about BSA and actually I still really like their service, just want to see the potential for others.
Cheers, <comment><USER2> I run a large Wed design & development related website. I can send you some decent converting traffic.

My contact information is in my profile.

</comment><comment><USER3> Hi Nelson - maybe we just need to help you find some better spots :)

<comment><AUTHOR> thanks, mail sent</comment></comment>


The 2010 technology of the year is ... - <AUTHOR> http://radar.oreilly.com/2010/12/2010-tech-of-year.html <comment><USER2> Must have been a slow year in technology.

      Time = Marky Z
      O'reilly = Twitter

Both technologies seem ultimately centered on selfish desires of people to want the minutia of their lives to be found interesting by others (Twitter especially).

I would've thought both Time and O'reilly would've named something with a little more of a net positive on society.

<comment><USER3> The highest purpose of any technology, whether microblogging or semiconductor fabrication equipment, is to improve human lives.

One can make arguments on both sides about whether Facebook and Twitter are net positives or net negatives on society. However, given the sheer scale of their userbases, and the amount of those users' time they choose to spend on these services, if FB/Twitter usage is even mildly positive in net impact, the total impact dwarfs other more "hardcore" technology products.

<comment><USER4> Yeah, but Michelin year after year leaves McDonalds off its ratings.

</comment></comment></comment><comment><USER5> Surely Android has had a more impactful year than twitter? It really is hard to pin down one thing isn't it?:)

<comment><USER6> Calling Android the technology of the year is to take sides in an ongoing war. This would put O'Reilly in an unfavorable position with Apple.

<comment><USER7> Has O'Reilly really been solid for a while, though? I realized recently that the last O'Reilly book I cared about was "Programming Collective Intelligence" (and that one is flaky) - I haven't actually /liked/ an O'Reilly book since Perl was big. O'Reilly has a lot of reputation, but I've been much happier with No Starch (_Land of Lisp_, etc.), Morgan Kaufman, etc., and anything Brian Kernighan has ever touched. (Either he has the CS midas touch, or he's the world's best tech writer. I'm thinking BOTH.) My wife is currently using my Unix manuals to weigh down recently-glued carpet on our basement steps though.

(and I've wondered about it because I feel inclined to spell-check "O'Reilly" every single time)

<comment><USER6> In terms of technical publications, Morgan Kaufman, Prentice Hall and Addison Wesley are far more superior. But O'Reilly has Tim's personal brand behind it, and he has proven himself to be a visionary by betting on Unix early, then noticing the Free Software movement and fully embracing it. Then going on to godfather two editions of the web (bubble.)

Think of O'Reilly as the "Virgin" airlines of Richard Branson, compared to the classics, like British Airways or Lufthansa.

Yes, I too double check the spelling often.

</comment></comment></comment></comment><comment><USER8> In other news, a lot of people are using Google to search the Internet.</comment>


Public Lab DIY Spectrometry Kit - <AUTHOR> http://www.kickstarter.com/projects/jywarren/public-lab-diy-spectrometry-kit <comment><USER2> I attempted this before, even on Kickstarter:

<http://www.openspectrometer.com/>

[http://www.kickstarter.com/projects/makerhaus/open- spectrome...](http://www.kickstarter.com/projects/makerhaus/open- spectrometer?ref=live)

Unfortunately we did not hit our fundraising target, and it's now a dead project. I'd love to see this new Kickstart project succeed, especially the online spectral database. Commercial databases of spectral signatures are expensive (thousands of dollars), and they shouldn't be.

Part of our problem, I think, was that we were attempting the project while taking classes full time, and working.

We were planning to release two different designs at different price points. One would have used inexpensive ruled transmission grating, while a more expensive unit would have used a concave holographic aberration-corrected reflective grating. The latter would have had better system efficiency, less "smear" across pixels, and better linearity. Each would have made use of a linear CCD array with good sensitivity (the same chip used in the Ocean Optics units). Concave gratings add a couple hundred bucks to the price, but are well worth it if you need to do UV.

A challenge we didn't get to solve was how to make something DIY that could be used to detect UV. It's difficult to sputter a uniform phosphor coating or remove a sensor window without specialized equipment.

<comment><USER3> "Part of our problem, I think, was that we were attempting the project while taking classes full time, and working."

I think your project was fantastic.

I see the main problem is the price. Most of the normal people can't justify expending $800 on an spectrometer. They don't even know what they could use it for.

People that could justify it because they need it will buy tested equipment anyway, they have money but not time.

So you need to fill the gap. The new project is making it super cheap so they could get traction like Reprap machines. At first they are terrible, but with enough people and huge market improvement is so fast like with the PC that at some point in the future it could get better than commercial closed systems.

Start small, if you can't detect UV it does not matter, remember it is 100x better than Newton ever had.

<comment><USER4> Thanks for the kind words!

The $800 price tag was just a kickstarter only price, since we were still largely in the development phase we weren't sure of final pricing. Now it looks like a UV capable scientific instrument with a chinese grating would cost around $400, if you want the same optics but U.S. made it would be around $900.

</comment></comment></comment><comment><USER5> I'm no optical scientist, but seeing as the diffraction grating being used is recycled from a DVD and the sensor is a consumer webcam, I wonder how accurate/reproducible the results would be.

A conventional diffraction grating is pretty inexpensive ($2.50): <http://www.rainbowsymphonystore.com/difgratfilsh.html>

<comment><USER2> Gratings like this (or a CD) will work, but they introduce plenty of artifacts. Scratches and material nonuniformities can scatter light in a way you don't want, and reduce the (already limited) amount of light hitting the right spot on the sensor.

</comment></comment><comment><USER6> I applaud the approach, but it seems like a challenge to achieve useful accuracy across many devices. I am a little skeptical about the 3nm claims.

First, the (bandpass) Bayer color filter arrays on cameras limit their color resolution pretty sharply. It might be a better (if less elegant) approach to use the ambient light sensor and scan it across the spectrum generated by the diffraction grating.

Also, the resolution of a spectrometer is in part determined by entry slit width. Old timers and DIY'ers use abutted razorblades to make a clean, straight slit. Problem here is that there is a trade-off. You need a wide slit to get light in for these insensitive webcam sensors. But then you lose spectral resolution because your slit is wide. Alternately, you narrow the slit to get more spectral resolution, but then your image is dominated by noise. I'm sure these guys have found the sweet spot.

Second, the spectral response of the color filter arrays varies both from camera to camera and even within same-model sensors (I personally own over 40 of one model of Canon Powershot, and the differences in color response are fairly extreme). This could in principle be at least partly calibrated out, if you had each device take a picture of a calibration standard.

Third, the image signal processors are closer and closer to the sensor these days. It may be impossible to get data which hasn't at least been somewhat mucked with, meaning some people will have a useful spectrometer and some won't.

This goes doubly for phones with bad imaging pipelines, where the image processing is out of your control. Lots of spatial and spectral processing going on. It will be interesting to see, for example, how the auto white balance and sharpening algos deal with having zero natural image content in the captured data.

Aside from the within-sensor variation/image processing problems it would definitely be usable for relative data - I see that they used a relative approach on their UV detection of a bluing dye in detergent. Nice.

All that said, I run a somewhat-similar project using cheap cameras to do work previously only reserved for hard-core SLRs and scanning line sensors, and I've found that over and over again, something is vastly better than nothing and often "good enough" is better than expensive, complicated, and pain in the ass. I've also dealt with a lot of people laying out a bunch of complicated technical "Here's why it won't work" talk and have learned to counter with my own "But look, it does work" answer.

Blah blah: I think it's important for the capture software captured as much metadata about the image sensor as possible. Their software looks great and a database of spectra would also be great. It would be AWESOME if the Shazam- style auto identification worked at all. Good luck, I'll probably be supporting the project.

<comment><USER7> >First, the (bandpass) Bayer color filter arrays on cameras limit their color resolution pretty sharply. It might be a better (if less elegant) approach to use the ambient light sensor and scan it across the spectrum generated by the diffraction grating.

The diffraction grating spreads the different frequencies physically across the sensor. So the camera sensor doesn't need _any_ color information, you only need position and brightness information.

<comment><USER6> Right, but the different physical locations on the sensor have different spectral sensitivities due to the bayer CFA. Ideally, you'd have panchromatic pixels with no bayer pattern.

<comment><USER7> Oh I hadn't thought of that. I assume some calibration would be required for each device anyway, I wonder how hard it would be to detect and correct for this effect?

<comment><USER6> People have done it for a variety of purposes (natural image statistics, astronomy, etc). I can post references later. Problem is that it almost universally requires you to photograph a standard light source or a standard reflectance target under a standard illuminator. Or a monochromator. So you can calibrate your cheapy device but you need an expensive/scarce standard.

It's an interesting problem and I look forward to seeing how they solve it.

<comment><USER2> Back in the day, standard illuminants were candles made from spermaceti--the wax substance from the cavity of a sperm whale (it was also used as space- grade lubricant until very recently). Nowadays, CIE Illuminant D represents a sort of model of natural daylight. I bet a blue sky sunny day could be used for calibration, if the instrument is pointed straight up and a function corrects for lon/lat and time of the year.

For reflectance measurements, the highly-lambertian Spectralon material is basically just well-controlled Teflon sheet. Some PTFE sheet from McMaster might do the job for DIY purposes.

<comment><USER7> Sunlight is tricky because colors can be distorted according to the angle of the light through the atmosphere, hazing, dust, etc.

<comment><USER2> Certainly, but you could account for much of it--and average away the rest.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> When I do this with a Project STAR spectrometer and my cameras and point it to a candle I get two distinct dips in the spectral distribution. It should be even like a blackbody. I have made a parser for the RGB-picture to turn it to a B&W power distribution and I thought I'd might do a simple software filter to make it completely even, like a calibration of sorts. Like so: [http://www.flickr.com/photos/defdac/7874867702/in/photostrea...](http://www.flickr.com/photos/defdac/7874867702/in/photostream/lightbox/) I use the power distributions coupled with lumen and wattage-specification as input for my home made spectrally based global illumination renderer to calculate PAR in aquariums. Do you think this will work?

<comment><USER8> The IR-filter most cameras have is a real problem too. I have a webcam with the IR-filter removed.

</comment></comment><comment><USER9> Best of luck with the project. I think the really good idea is the open-source spectral library.

You need to educate your readers a bit more, though. They need to be aware of the kind of spectroscopy the machine does, i.e UV-Vis, and what information it provides.

I might try DIYing it, but what would be really interesting is an IR spectrometer, under 250$. Tough.

</comment><comment><USER10> What are some of the cool experiments one can do with a spectrometer, other than the ones mentioned here (I especially liked the wine analysis application)?

<comment><USER2> If you can transmit light through a sample curvette to the spectrometer, you could use it to measure optical density (i.e. the amount of stuff in the way that blocks or scatters light). You could use that to measure the concentration of particulate in engine oil, or the strength of coffee.

If you can detect at 405nm, you could measure blood coagulation time/extent (separate blood cells from plasma, measure attenuation at 405nm though plasma).

You could cludge together a pulse oximeter if you can detect at 660nm and NIR (905, 910, 940nm) and have light sources to emit at these wavelengths. Absorbtion at these wavelengths changes as hemoglobin picks up and loses oxygen. The ratio at 660nm and one of the other wavelengths could be used to show blood oxygenation.

If you were into photography or cinema, you could measure the emission spectrum of a light source and fit a blackbody curve to it to find its color temperature--useful for white balancing.

If you wanted to match paint colors, you could use a spectrometer to do (along with some additional calculation and knowledge about your pigments).

If you perform a flame test, you could use a spectrometer to learn about elemental composition.

</comment></comment><comment><USER11> rze

</comment><comment><USER11> .-</comment>


Who is today's deepest thinker? - <AUTHOR> http://www.quora.com/Who-is-todays-deepest-thinker <comment><USER2> So far, I count one woman on the original list and none so far suggested here. If you want to add names, maybe more interesting to think of some women, and think about how you judge men and women differently.

I named five men, but I'm very impressed by the work of Ruth Barcan Marcus. Why did her name not come up?

</comment><comment><USER3> Scott Aaronson (<http://www.youtube.com/watch?v=SczraSQE3MY>)

</comment><comment><USER2> 5 off the top of my head: Amartya Sen, Dana Scott, Alasdair MacIntyre, Martin Wolf, Michael Dummett.

</comment><comment><USER4> No Roger Penrose?</comment>


The man who recorded, tamed, and sold nature sounds to America - <AUTHOR> http://www.atlasobscura.com/articles/the-man-who-recorded-tamed-and-then-sold-nature-sounds-to-america <comment><USER2> I've started a hobby to make similar "Soundscape" recordings in recent months, for example the wharf in Santa Cruz, [https://soundcloud.com/user-74007570/soundscape-santa- cruz-w...](https://soundcloud.com/user-74007570/soundscape-santa-cruz-warf-1)

I am using a Shure MV88 stereo microphone attached to an iPod, relatively cheap compared to the expense Mr. Teibel probably went through.

It's a great way to relax, just sit quiet with headphones and monitor your audio levels. Then, edit around noise pollution, such as loud motorcycles and airplanes using Audacity.

A relaxing hobby!

<comment><USER3> I got a 3dio free space for this purpose, and it is awesome. [http://3diosound.com/](http://3diosound.com/) [https://m.soundcloud.com/moultano/bird-blind-at-the- cincinna...](https://m.soundcloud.com/moultano/bird-blind-at-the-cincinnati)

</comment></comment><comment><USER4> If you're interested in field recordings, I highly recommend the work of Chris Watson.[0] He has some amazing albums featuring the sounds of nature in some incredibly beautiful places.

[0][http://www.chriswatson.net/](http://www.chriswatson.net/)

</comment><comment><USER5> There are some fantastic binaural nature recordings that can be found on the iTunes Store when searching for Gordon Hempton.

<comment><USER3> [http://soundtracker.com/](http://soundtracker.com/) Best coding music.</comment></comment>


Show HN: Quiin – Modern Speed Dating - <AUTHOR> http://www.quiin.app <comment><USER2> All I see is "Log In" and "Sign Up". "Learn More" and "Need Help" just circle back to the same.

Not going to Sign Up just to check it out...

</comment><comment><AUTHOR> Hello,

Launching the Quiin soon as a bootstrapped project would love as much feedback as I can get.

The first event will probably be in a month as the back-end etc is all finished just doing some testing now.

Cheers,</comment>


UK Is Leading the Way to Become a Global Bitcoin Hub - <AUTHOR> http://techcrunch.com/2015/07/31/uk-is-leading-the-way-to-become-a-global-bitcoin-hub/ <comment><USER2> "While existing private digital currencies have economic flaws which make them volatile, the distributed ledger technology that their payment systems rely on may have considerable promise," the Bank of England wrote in February.

So, can someone explain to me, how the distributed ledger ( blockchain ) can be used without necessarily betting on the digital currency itself functioning well ?

<comment><USER3> You don't need a currency to have a blockchain. A group of counterparties could work together to create their own closed/permissioned blockchain as a decentralised mechanism for recording transactions of, say, securities or real-time gross settlement.

This is what companies like Eris Industries and Hyperledger/Digital Asset Holdings are focused on.

<comment><USER4> They can but I'm very wary of systems that don't have Bitcoin's closed loop of economic incentives for maintaining the blockchain.

</comment></comment></comment><comment><USER5> UK is _Leading the Way to Tax and Regulate Bitcoin_

</comment><comment><USER6> Except for that whole encryption backdoor stuff.

</comment><comment><USER7> Ha, that's a laugh given the first two UK banks with whom I dealt ( Santander and Ulster Bank ) refused to transfer _my_ money, from _my_ UK accounts, to Bitstamp's account in Slovenia.

I even went down to the branches to try but the tellers could only say that it was a system-imposed block.

Credit to Halifax for not having blocked that account at the time. Certainly they took their pound of flesh in international 'transfer' fees, though...

<comment><USER8> Could you not have used Transferwise?

<comment><USER9> Transferwise doesn't process transfers to bitcoin exchanges: [https://transferwise.com/blog/2013-04/notice-to-bitcoin- user...](https://transferwise.com/blog/2013-04/notice-to-bitcoin-users- april-2013/)</comment></comment></comment>


Google is making its own tablet, & in 6 months, you can buy it - <AUTHOR> http://venturebeat.com/2011/12/19/google-is-making-its-own-tablet-in-6-months-you-can-buy-it/ <comment><USER2> It seems odd that they ignore the fact that Nook and Kindle Fire are Android tablets, though I suppose they are only considering tablets that have explicit Android branding.</comment>


Pipefy – Organize and run all your processes in one place - <AUTHOR> http://www.pipefy.com/?ref=hackernews&utm_source=hackernews

<comment><USER2> This app is amazing. This is the first time i've seen business process execution done right. I've looked at all kinds of BPMN modeling + Execution engines and they just flat out are too cumbersome to use and they never get the UI right. Having worked in various manufacturing companies for over 15 years, I would say that you guys have a chance to really make a huge impact to the business community with this product. I have tons of feedback / questions / product enhancements. What is the best way to get those over to you?

<comment><USER2> Product Enhancement Requests:

1) For fields: Can you add an auto-complete short-text field OR allow for free text to be added to a select list

2) For Fields: Can we have a calculate-able automatic number type of field that could be created automatically based on various tokens such as:

Token types:

'static text' \- static text that appears as is 'dd' \- the current day 'mm' & 'mmm' \- the current month in digit or character format 'yyyy' & 'yy' \- the current year '999' \- an n-digit number that autoincrements for that phase or pipe

3) Can labels have a type and a label field filter on that type?

</comment></comment><comment><AUTHOR> Hi Guys! I am founder of Pipefy! We're a management tool that helps startups to organize and run their processes in one place. We have free templates based on the best practices of A/B Testing, Agile Software Development, Bug Tracking, Content Marketing, B2B Sales Pipeline, Product Roadmap and others...

Today we finally finish our private beta and are open for free sign-ups! Would love to hear your feed-backs!

<comment><USER3> I played around a bit and really like the templates. Makes it easy to quickly get organized around typical startup tasks.

Where's the pricing page?

It's pretty difficult to get a team to commit to a new product without having some idea of the future cost.

<comment><USER4> +1 for pricing, and a suggestion: start accepting money as soon as you can. I think this post summarises it quite well why it's important [http://thenextweb.com/entrepreneur/2015/06/13/43-lessons- gro...](http://thenextweb.com/entrepreneur/2015/06/13/43-lessons-growing- from-0-to-1-million-in-revenue-twice/)

Good luck and thanks for the great product!

</comment></comment></comment><comment><USER5> Great app!

<comment><AUTHOR> Thanks!</comment></comment>


Are you sure? The dialogue that shows you don't care - <AUTHOR> https://medium.com/@jmans/are-you-sure-the-dialogue-that-shows-you-don-t-care-30c4b5dd0fd7#.wz6sf02zv <comment><USER2> There are many operations that due to their consequences implementing a proper undo is more trouble than it's worth, so a blanket statement about confirmation dialogs like that cannot be accurately made.

That said, there are a lot of situations where the article does have a point and an undo button is an objectively superior choice.</comment>


Show HN: Anoncat, stay Anonymous while sharing and chatting - <AUTHOR> http://www.anoncat.com/

<comment><USER2> Um, need more info?

Anonymous but not over https? Yes, you said you're gonna add it at some point, but it doesn't inspire much confidence. You should start with that.

Also, architecture? The about section doesn't say much. And you store messages(but not IPs) to what end?

<comment><AUTHOR> Thanks for the feedback! The reason messages are stored is to broadcast the newest messages to a user on join

<comment><USER2> Ok. Good luck with your project, but since that's generally regarded as a huge undertaking, my advice would be to more precise on your definitions and try to explain the architecture, the tradeoffs and the expectations one might have from your service.

</comment></comment></comment><comment><USER3> Other people I'm sure are letting you know as well, but it's returning a 502 now from all the HN traffic and it doesn't look like there's a cached copy anywhere

<comment><AUTHOR> I took it offline, had too much load after several DOS attacks. Rate limiting is now in place (like it should be from the beginning) and the site is back up!

</comment></comment><comment><USER4> I did: setInterval(function(){socket.join("rooms:" \+ 'hn', {}, function(chan) {chan.send("new:message", {content: 'message from a BOT', nick: 'nick', chan: 'hn'})});}, 10);

There is obiously some security problems. ;)

<comment><AUTHOR> My friend did the same, really took its toll on the servers and I was forced to take them offline. Rate limiting is now implemented, thanks for pointing this out!

</comment></comment><comment><USER5> Anonymous over HTTP - is that a joke?

</comment><comment><USER6> I think the name, anoncat, is very clever. Maybe I'm predisposed for cat-like- things. But anyway the application is very clever too.

How come you store the chat messages?

<comment><USER7> Then you'll love [https://crypto.cat/](https://crypto.cat/)

</comment></comment><comment><USER8> Needs an https endpoint :)

<comment><USER9> He can use Cloudflare for now. Free plan has HTTPS too.

<comment><USER10> Nothing says anonymity like a global CDN that "infected" an incredible of websites. No thanks! Keep it local on your server please.

<comment><USER11> Is that why I have been seeing a Cloudflare redirect message at most sites I've visted this week?

<comment><USER10> The captcha one? As a Tor user for casual browsing it is really a slap in the face to see that on websites I considered supportive of privacy.

</comment></comment></comment></comment></comment><comment><USER12> Nice UI.

Is the code available? How does it compare to [https://crypto.cat/](https://crypto.cat/) ?

<comment><AUTHOR> Code will be released at some point when I'm no longer embarrassed over it. I bet it's not something anyone should look on for learning Elixir best practices

</comment></comment><comment><USER13> Looks nice!

I see you allow file uploads. How do you handle file storage, isn't that potentially expensive (DOSing your bank account)? And what about legal problems (copyright infringement and illegal stuff)?

<comment><AUTHOR> I don't have much disk space available so if the limit is exceeded I will delete files that have not been downloaded recently. Active files stay longer. Legal problems I have not put much thought into, but anything reported or found by me will be deleted immediately. Client side encryption and decryption could come in the future.

</comment></comment><comment><USER14> I can't figure out how to chat. Enter isn't working to send messages. Also, is there a way to set nicks, like in IRC?

<comment><AUTHOR> Are you using Swype keyboard or some exotic keyboard? The return key on those keyboard have a strange behaviour that I will debug some day. No way to set nick, they are randomly generated for each browser.

</comment></comment><comment><USER15> It's down now, presumably from the message spam.

</comment><comment><USER16> aaaand its dead.</comment>


How to Correctly Detect Credit Card Type - <AUTHOR> http://creditcardjs.com/credit-card-type-detection

<comment><USER2> Hi, my credit card company is not listed there, yet it exists: my IIN is 6371.

I'm afraid this is not completely accurate at all. There are many credit card IINs and those are just a very few and will not work with some international cards (including international visa cards). Those numbers are issued by the American Bankers Association - in accordance to ISO 7812. They are not attached to a credit card flag, but to a company and a single company can have only one IIN. What happens is that Visa is composed of many companies in many countries, that's why they have many IINs which may or may not start with the same numbers, there are no strict rules about that.

The number this website calls 'prefix' is actually named IIN and it's composed of 6 characters, not 4 (nor 2 or 3). They are disposed in groups of 4 for a variety of reasons and no issuer owns whole lots of IINs.

The only completely correct way to detect a credit card is to just contact ABA to obtain a list of issued IINs.

This is what an issued IIN looks like, we also have many:

[https://drive.google.com/file/d/0B-Sa2A0cesh4eDVMY3NwQ3ZEVlZ...](https://drive.google.com/file/d/0B-Sa2A0cesh4eDVMY3NwQ3ZEVlZfQllyNEdmdHliekdXenNV/edit?usp=sharing)

I also built a thing to help me parse those numbers (ruby):

[https://github.com/eduardordm/iso7812](https://github.com/eduardordm/iso7812)

<comment><USER3> I suppose the idea is to determine the so called "card scheme" (Visa, Master, etc), not necessarily the IIN. E.g. for some payment processors, the merchant service charges are different according to the card scheme (it does't depend on the issuer). I undertand this is a simplification and it might not work for cards that don't belong to major networks, but it's good enough for a lot of businesses.

For example, if I have a business here in Japan, I doubt I could easily charge a card issued by your company (I'll be happy to be proven wrong).

Ps: brasileiro aqui.

<comment><USER2> Oi!!

The general idea is this: IIN is issued to visa branches around the world each branch can only have one IIN. Problem is, visa is not the only issuer of visa cards. Many banks and financial institutions can also issue in lieu of visa and have their own IINs as they please. My visa credit card starts with 2 because it was issued by an airline under a mileage program. I never had problem using it online but most websites won't show the correct card type.

Merchants are not charged according to a card type, the charges applied to merchants have nothing to do with visa. Visa is only doing processing service for a bank. Banks are the ones who charges merchants and pay visa a percentage of the fee the bank charges you. Because banks can't handle the volume of merchants, they usually have gateways or other companies to do that for them.

My company also issue visa cards and we use the same IIN: 6371.

<comment><USER3> Thank you for the clarification. However, my point is that some gateways _do_ charge according to the card type.

</comment></comment></comment></comment><comment><USER4> Please don't rely on this.

For example of the extra detail that is really involved, see: [http://en.wikipedia.org/wiki/List_of_Issuer_Identification_N...](http://en.wikipedia.org/wiki/List_of_Issuer_Identification_Numbers) \- e.g. 504837 is ATM only despite looking like a MasterCard.

Card identification also occasionally changes - Diners was bought by MasterCard, Visa used to be 13 digits, etc.

I'd be really wary of hard-coding this anywhere. If it passes the Luhn algorithm and the first digit is ok, consider just passing it on to your processor and seeing if it gets approved. Add a black list of known-not-to-be- valid prefixes if you'd like. But a whitelist of valid prefixes will break one day without warning while also not really being the full list of valid prefixes you think it is.

If you really need to be doing this, you can pay for a regular feed from a processor, but the only use case I've ever seen for truly needing that was to identify debit cards by number.

I've had cashiers force through faked manual auths on 19 digit private bank debit cards, which I assume is fraud disguised as incompetence. But I think dealing with a few weird cases (with proper auditing in place) is better than declining a legit card because they expanded the valid prefixes and your code wasn't updated.

<comment><USER5> > Diners was bought by MasterCard

MasterCard didn't acquire Diners, it was just a partnership where Diners cards were branded as MasterCard and processed through MasterCard's network. Later Discover acquired Diners, and now they're processed through Discover's network.

But fair point - brand prefixes occasionally change, and if you hardcode them they'll eventually become out of date.

</comment></comment><comment><USER6> Another usability tip on credit card forms: Don't use drop-downs for the expiration date.

People are just typing them directly off the card, let them type them. Don't force them to deal with large and annoying select boxes. Stripe checkout[1] is a good example of how to do it (though by no means were they the first to do this, just a popular example).

1: [https://stripe.com/docs/checkout](https://stripe.com/docs/checkout)

<comment><USER7> I can type right into a drop down, and 99 times out of 100 it will do the right thing.

(Sometimes it's weird with a list of states, where it might be sorted by the state abbreviation while showing the state name or vice versa.)

<comment><USER8> agreed but on mobile I find spinning through the drop-down more annoying than typing the exp date.

<comment><USER9> I really hate the spinner for all the date selectors on iOS - it's cute, but a keypad is way faster.

</comment></comment></comment></comment><comment><USER10> Why is detecting credit cards even useful?

I know what card I have, you telling me "Yep that's a VISA card" isn't really that helpful. Yes, I might enter the first four digits wrong and see the wrong card icon light up may help me a little, but aren't I just as likely to enter the last 12 digits wrong. In the case of VISA you're pretty much just telling me "Yep, that first one is a 4".

<comment><USER11> Wouldn't it save the user one click to select what card they've got?

<comment><USER12> I think the GP is questioning whether that piece of information is even necessary to process the transaction.

<comment><USER13> "We can't take American Express".

It's a valid thing to say, and a valid thing for you to detect and notify the user about. You know, before they finish typing everything else they have to type in.

</comment></comment></comment></comment><comment><USER14> Why does it even matter if you show the credit card type when the user is typing it in? If the first 6 numbers determine the card type, then handling card type can be done on the backend. Why make the effort to show users information that they already know, ie. card type?

<comment><USER15> I'd say in part because you want to give people a UX they are comfortable with. Sites for years have been asking for "Card type", and so a user may suspect something is wrong if they don't need to enter it and show no indication you know what it is.

<comment><USER16> That seems unlikely, but I've certainly been wrong about UI questions before. I'd be very curious if anyone has any data supporting this idea.

<comment><USER17> No data, but as a user I do expect to see a card type selector or indicator, even though I rationally know its superfluous.

</comment></comment></comment></comment><comment><USER18> The root lesson here is pretty simple but important: you should usually avoid using regular expressions in places where readability and ease of update is a concern.

Using a complicated one line regular expression to do all the magic is fun, but its a nightmare to maintain and figure out how it works later on.

</comment><comment><USER19> The data structure they mention using is an 'inversion map' which in their case is a mapping of numeric ranges to values.

I did some quick searching and didn't find it... I wonder how they implement a key search in the inversion map. I assume you do something like populate a tree with the range transition points and then you can search in O(log n).

A search on the tree would have to find the node with the highest value that was <= the requested value, or the lowest value that was >= the requested value.

I assume the work of constructing the tree would have to be amortized over multiple searches to make it worth the effort. Could you do better than O(n) _without_ building a tree?

In creditcardjs.com's case, they have overlapping ranges, which means you can possibly return multiple values for a given key.

</comment><comment><USER20> Would be nice to combine this with [skeuocard]([http://kenkeiter.com/skeuocard/](http://kenkeiter.com/skeuocard/))

</comment><comment><USER21> I'm using jquery-payment from Stripe. Should I switch?

<comment><USER22> You should be fine. I use it along with the technique in this blog post to make a nice stripe form that dynamically displays the card logo....

[https://yoast.com/checkout-field-validation/](https://yoast.com/checkout- field-validation/)

</comment></comment><comment><USER23> There's a small bug with the security code tooltip. Click the ? to open the tooltip (shows AMEX), focus the card number field, select-all (cntrl-a/cmd-a), then type "4". It still shows AMEX in the tooltip instead of visa. Closing it and opening it will still show AMEX.

</comment><comment><USER24> Relevant to the post.

Gizmodo (strangely) posted an interesting article on how on credit card numbers work: [http://gizmodo.com/how-credit-card-numbers- work-1493331190](http://gizmodo.com/how-credit-card-numbers-work-1493331190)

</comment><comment><USER25> Interesting to read about inversion maps. I'm a bit confused - why would I want to purchase a license vs. using something open source like [https://github.com/wangjohn/creditly](https://github.com/wangjohn/creditly)?

</comment><comment><USER26> Visa starts its 16 digit string with "4" Mastercard starts with "5" Amex starts with "3" and only has 15 digits Discover starts with "6"

</comment><comment><USER27> worth noting: [https://github.com/kenkeiter/skeuocard](https://github.com/kenkeiter/skeuocard)

<comment><USER28> 4147 20XX XXXX XXXX broke the design.

</comment></comment><comment><USER29> This seems hopeless all the time the prefixes actually overlap. e.g. according to this, both Laser and Maestro use 6304

</comment><comment><USER30> I'd rather have one clean regex than dozens of lines of code to do the same thing.

</comment><comment><USER19> I think the correct answer is: "Don't bother"

</comment><comment><USER31> previous discussion: [https://news.ycombinator.com/item?id=6692075](https://news.ycombinator.com/item?id=6692075)

</comment><comment><USER32> Or you could just use stripe. Just saying ;).

</comment><comment><USER33> Does this integrate with Recurly?

</comment><comment><USER34> $299!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

<comment><USER35> How many develop hours do you think it takes to get a full feature checkout working?

From the comments here I believe that some more work is needed for the card detection, however, to 'roll your own' with your employer paying? Could cost more than $299.

Personally I think there is a lot to be said for basic checking and having a drop-down for the card type with the accepted card types spelt out for people. Oh, and with a Paypal option for those that don't like putting their card details into random websites.

<comment><USER36> It's hardly a full feature checkout..

Correct me if I'm wrong, but it just seems like a user-friendly form with client side validation. You still need to integrate it with a payment processor, hook it into your checkout process where you capture delivery, billing and order information.

I also think it's not worth $299, especially when each license is per-website only.

</comment></comment></comment><comment><USER26> Amex starts with "3" Visa starts with "4" Mastercard starts with "5" Discover starts with "6"</comment>


Jepsen: RethinkDB 2.2.3 reconfiguration - <AUTHOR> https://aphyr.com/posts/330-jepsen-rethinkdb-2-2-3-reconfiguration <comment><USER2> Slava @ RethinkDB here.

It's been a pleasure working with Kyle on doing an exhaustive analysis of RethinkDB and tracking down bugs revealed in the second test. Our lead engineer wrote a detailed analysis of our findings (linked from the blog post, but I wanted to link it again): [https://github.com/rethinkdb/rethinkdb/issues/5289#issuecomm...](https://github.com/rethinkdb/rethinkdb/issues/5289#issuecomment-175394540). For anyone interested in the details, this is a good read!

</comment><comment><USER3> It is very encouraging for myself, CTO of a company that uses RethinkDB, to see the efforts that RethinkDB go to ensure quality in their product and the willingness to allow Aphyr to potentially uncover problems lurking under the surface.

Thanks again to Aphyr and the team at RethinkDB for going to such lengths to discover, document and fix such failure conditions. Going to have to read through this thoroughly tonight.

</comment><comment><AUTHOR> As someone employed in building complex systems, I appreciate the takeaways listed during the discussion:

        RethinkDB's engineers noted three takeaways from tracking
        down this bug. First, fuzz-testing—at both the functional
        and integration-test level, can be a powerful tool for
        verifying systems with complex order dependence. Second,
        runtime invariant assertions were key in identifying the
        underlying cause. A test like Jepsen can tell you that the
        cluster can exhibit split-brain behavior, but can't tell
        you anything about why. The error messages from those
        leader and log order assertions were key hints in tracking
        down the bug. Rethink plans to introduce additional runtime
        assertions to help identify future problems. Finally, they
        plan to devote more attention to issues which suggest—even
        tangentially—consistency errors.

</comment><comment><USER4> Compose released RethinkDB 2.2.4 today. [https://www.compose.io/articles/rethinkdb-2-2-4-available/](https://www.compose.io/articles/rethinkdb-2-2-4-available/)

</comment><comment><USER5> Fantastic work on this. Seriously, I LOVE RethinkDB. I've used it for my last three projects, and it's exactly what I've been waiting for, blending a relational database with nosql one. So glad this is getting exhaustively reviewed for quality purposes.

</comment><comment><USER6> Whoaaaa. Membership is where things get nasty, this is awesome. Punting on dynamic membership due to it's extreme difficulty to get right is usually a good idea for many projects.

I'm still struggling to understand what happens in a RethinkDB "reconfigure", especially around this epoch timestamp. Where does the wall-clock time come from, the raft leader of the shard?[0] I also need to read more and understand these value's necessity over any other generation id/sequence number type thing, I'm not sure I follow why they are used given the linked bug report[1]

Also, after embarrassing myself earlier in the week[2], I'm trying my best to read every link in a post before making absurd claims. It's my much deserved penance. It seems there is one link that is broken in the post that I was curious to see due to my ignorance around Rethink's epoch timestamp stuff[3].

[0]: [https://github.com/rethinkdb/rethinkdb/blob/a90bb08051603621...](https://github.com/rethinkdb/rethinkdb/blob/a90bb0805160362125a03024eb9f309e578408c0/src/clustering/table_manager/table_metadata.hpp#L50)

[1]: [https://github.com/rethinkdb/rethinkdb/issues/5289#issuecomm...](https://github.com/rethinkdb/rethinkdb/issues/5289#issuecomment-175394540)

[2]: [https://lobste.rs/s/cnthlp/the_verification_of_a_distributed...](https://lobste.rs/s/cnthlp/the_verification_of_a_distributed_system/comments/poc7h7#c_poc7h7)

[3]: [https://aphyr.com/data/posts/330/link](https://aphyr.com/data/posts/330/link)

<comment><USER7> A new epoch timestamp is generated when you either first create a new table, or when you use the "emergency repair" operation to manually recover from a dead Raft cluster (usually one that has lost a majority of servers).

The wall-clock time comes from the server that processes that query.

Whenever the epoch timestamp changes, replicas will get a fresh set of Raft member IDs, and it's expected that they start with an empty Raft log.

Where exactly the epoch timestamps come from is not really relevant to this bug. With the bug fixed, any given node will only accept multi_table_manager_t actions that have a strictly larger epoch timestamp than what they have right now. That is enough to guarantee that they never go back to a previous configuration, and never rejoin a Raft cluster with the old member ID, but a wiped Raft log.

<comment><USER6> I guess I'm just confused how this clock becomes a trusted source of truth for forward progress? Is there a way of asserting that the clock makes forward progress that I don't understand?

EDIT: Or is it that it's not required to show forward progress? Still reading the rethinkdb source & docs, thanks for the information so far.

<comment><USER8> During normal operation, RethinkDB uses the standard Raft protocol for managing configuration operations. The Raft protocol only uses the clock for heartbeats and election timeouts. So we're not using the clock as a trusted source of truth.

However, a Raft cluster will get stuck if half or more of the members are permanently lost. RethinkDB offers a manual recovery mechanism called "emergency repair" in this case. When the administrator executes an emergency repair, RethinkDB discards the old Raft cluster and starts a completely new Raft cluster, with an empty log and so on. However, some servers might not find out about the emergency repair operation immediately. So we would end up with some servers that were in the new Raft cluster and some that were still in the old Raft cluster. We want the ones in the old Raft cluster to discard their old Raft metadata and join the new Raft cluster.

The process of having those servers join the new Raft cluster is managed using the epoch_t struct. An epoch_t is a unique identifier for a Raft cluster. It contains a wall-clock timestamp and a random UUID. When the user runs an emergency repair, the wall-clock time is initialized to max(current_time(), prev_epoch.timestamp+1). When two servers detect that they are in different Raft clusters, the one that has the lower epoch timestamp discards its data and joins the other one's Raft cluster. The UUID is used for tiebreaking in the unlikely event that the timestamps are the same.

So the clock isn't being used as a trusted source of truth; it's being used as part of a quick-and-dirty emergency repair mechanism for the case where the Raft cluster is permanently broken. The emergency repair mechanism isn't guaranteed to preserve any consistency invariants (as the documentation clearly warns).

<comment><USER6> Ahh ok! An interesting approach. For some reason I'm uncomfortable with it but I need to spend more time reasoning about what failure mode rethinkdb uses care about.

I'm still not sure I fully understand the cases where this could occur, as I'm used to a very different approach to consistent operations that depends highly on physical infrastructure.

</comment></comment></comment></comment></comment><comment><USER9> What fantastic write-ups. Thanks to aphyr for all the hard work, it's an invaluable service to the community.

</comment><comment><USER10> That was a beautiful and thoroughly enjoyable read, actually of the level where moderately technical decision makers can start understanding the underlying complexity of maintaining trustworthy distributed systems (and the lengths to which one needs to go in order to truly start trusting something). Just because you implement raft doesn't necessarily mean leadership is always guaranteed under all circumstances - there are always considerations influencing the system, and all parts are intertwined :)

</comment><comment><USER11> Rethink has been my gotodb since last year. Absolute love it. Just waiting for your windows release.</comment>


Ask YC: Getting started with OODB - <AUTHOR>

With all of the talk going on about MagLev, I'm realizing I'm a bit out of touch with OODB. Does anyone have any good recommendations on where to get started? I'd like to evaluate it for myself, but I don't see a standard OODB setup that people are using for themselves.<p>Any recommendations? <comment><USER2> Part of the reason for there not being a "standard" setup is that there are tons of OODBs, and they are all implemented a little differently.

Some of the major ones are Objectivity/DB, Versant, ObjectStore, GemStone (which comes in Smalltalk and Java flavours, where the former is a more mature and flexible product) and InterSystems Caché. Caché is the odd one out; it's object database as well as an SQL database as well as a MUMPS app server, and while it has plenty of support for things like Java and .NET, it's fundamentally a MUMPS system. To most of today's programmers it smells a bit weird.

OODBs have traditionally been intimately tied to the language you write your application in because they usually attempt to seamlessly add persistence as an extension of the application's object model: that is, when you create normal language objects in RAM, they become persistent on disk. As a result, you tend to pick an OODB based on the language you use, and once you've picked the OODB, you tend to stick with that language.

OODBs started out with C++, but automatic persistence was quite awkward and necessitated inheriting your classes from the OODB's own class libraries and doing a lot of calls to the OODB runtime. The OODB firms quickly latched onto Java when it became a serious contender in the late 90s. The reason is simple: It's really easy to make persistence transparent and elegant in Java. OODBs typically provide post-processing tools that munge the Java bytecode -- disassembling your code and adding persistence calls.

With persistence in place, all you have to do is set up a schema (typically by letting the OODB tools "sniff" your classes) and then add transaction code to your app. For all the transparency, it's actually a bit invasive, and OODBs are typically very strict about accessing instances in a transactional context. You generally don't store long-lived references to objects, and there are special requirements for sending objects to other threads.

As for specific products, I was never happy with any of the OODBs I tried back in the late 1990s. Objectivity and GemStone seem like the most mature ones, but they never provided evaluation versions so I could not try them out; they've got the enterprise bug, so they're expensive and not very open in terms of documentation, code availability and so on. In fact, you will have to turn a few stones on the GemStone site to even find the GemStone OODB products. If you are interested in MagLev you might want to look at GemStone/S, since it's essentially the same thing.

For Smalltalk there is also the open-source Magma database, which sounds promising. For Java there is an interesting open-source project called Neo (<http://www.neo4j.org/>), a "netowrk database" which unlike the aforementioned OODBs don't actually attempt to integrate with your application's object space; instead, you create Node objects and attach attributes to them programmatically. If you're going down this route there's also CouchDB, a pure-data "document database".

<comment><AUTHOR> I think this might seriously be one of the most helpful replies I've seen on YC - Thank you!

<comment><USER2> You're welcome!</comment></comment></comment>


"Jumping off the gw bridge sorry." FB Status Before Suicide.  - <AUTHOR> http://www.nytimes.com/2010/09/30/nyregion/30suicide.html?src=ISMR_AP_LO_MST_FB

<comment><AUTHOR> "He loved music," Mr. Jung said. "He was very dedicated. I couldn't tell if anything was wrong."</comment>


Expert Advice for Men: Don't Mention Bitcoin on the First Date - <AUTHOR> https://www.cryptocoinsnews.com/expert-advice-men-dont-mention-bitcoin-first-date/

<comment><AUTHOR> _♫If you liked it then you should have put a block chain on it♪_</comment>


Ask HN: How can a person with web dev skills make $500-$1000 per month? - <AUTHOR> Hey all,
I am a college freshman and my summer break (80 days) is coming up in a few days. Wanted to do something productive. (Couldn't get an internship).
I have the prerequisite HTML/CSS/JS + one back end lang. (Ruby + RoR) skills.
Also since I've got 80 days of free time, would it be better to invest this time in, say, getting a high score on TopCoder? <comment><USER2> Getting a high score on TopCoder does not get you any closer to landing a consulting client. Instead, you should contact people who have budget and business problems, and convince them that giving you money solves business problems. This will easily sail over $500 to $1k per month. (I don't know what I'd charge in your position, but I'd be opening with "more than you can even conceive of asking for." Wait until you get "NO WAY" from 5 people before you walk down rates. I predict the present economy is unable to count to five.)

This assumes that your level of Rails skill is sufficient to solve business problems, but out of the universe of all possible problems, many of them are tractable for the same level of skill as required to successfully complete the Rails Build A Blog In 15 Minutes tutorial.

<comment><AUTHOR> Thank you Mr. McKenzie for taking out some of your time to reply to my post, it is much appreciated, as are all your helpful posts on your blog.

I should have provided a bit more context, I'm from India and I was specifically looking to earn in dollars. $8000/year is akin to coasting here, I don't think I'd meet any local clients who'd pay anything near $500 for a gig. Would it be possible for me to get American clients just through email? What do you think about passive income, say, from selling WordPress themes on themeforest, or something similar?

I mentioned TopCoder because I wanted to get better with algorithms/ds, considering the present reality of code-on-whiteboard sort of interviews for a stable job in the major software companies.

Hopefully my Rails skill is sufficient :-)

(Sorry for any grammatical mistakes, English is not my primary language.)

<comment><USER3> You certainly can get clients through email, and I can think of no more valuable skill you could practice than the art of composing a really good email to a consulting customer who lives twelve time zones away. It is not especially difficult to earn $500 per _day_ with that skill, plus the skills you already have. Algorithms, shmalgorithms.

Your English looks flawless to me, by the way, so don't sell yourself short: you can learn to write like a pro, you may already be there, and _describing what you have done and what you are going to do in written English prose_ is where the money is.

Are you actually a Wordpress themer? Learn just that much PHP and you can get all kinds of little gigs, doing work like customizing themes for people's Wordpress or Drupal sites. The advantage of learning a package, like a CMS, is that they lend themselves to little jobs, because most of their code is not customized and oftentimes the custom code is, shall we say, easy to improve. And if you are looking to fill time for a few months - and practice those vital pitching and customer-communication skills - little jobs might be nice.

Incidentally, at some point you might really want to practice whiteboard interviews, but if I were to do that I would specifically practice whiteboard interviews, not TopCoder or algorithms. Whiteboard interviews are a specific skill all their own. That skill is at least as much about being able to think out loud as it is about what you are actually thinking about. Knowing more algorithms might not help. I have found it more valuable to be able to implement bubble sort while telling jokes about bubble sort than to know what quicksort is.

</comment></comment></comment><comment><USER4> Get a database of small web dev agencies (companies that have around 2-3 people at the most) and offer subcontracting position. You are likely to get at least one or two positive responses if you write to hundred such companies. That should easily help you sail over $500 a month.

<comment><AUTHOR> Thank you for your advice. Do you think this would work if I contacted small American firms through Email? I'm from India, and $500 is a lot of money here, I doubt I'd find many companies willing to spend that much.

<comment><USER4> Of course it does. Charge for the value your provide and if you are good enough, firms don't hesitate.

</comment></comment></comment><comment><USER5> Hi vshan, Incidentally, I am looking forward to build a Webapp and exploring the options. Let me know if you are interested to take up the project, we shall discuss more (please share your email id)

<comment><AUTHOR> Hi enigami, this sounds very interesting. My email is vinaybhat001_at_gmail_dot_com.

</comment></comment><comment><USER6> Get a github account, write some code and put it up there. Create a blog and share what you're coding. Then when you contact agencies you can point them to a representative of your work.

</comment><comment><USER7> Go do day labor or work construction or be a barback or something--Craigslist has gigs as well. Easier, and you'll meet people.

<comment><AUTHOR> I'm from India, and construction pays about 50 Rupees a day-- about a dollar. I was thinking more along the lines of a SaaS business or perhaps, freelancing on Odesk or something similar. Thank you for replying to my post.

</comment></comment><comment><USER8> Word of mouth is the best way to start, and how I started. Honestly, Facebook Groups and local pages are awesome for this. Just post a casual ad with your email address. That should bringing you in enough jobs to easily make that amount of money.

Just out of curiosity, where are you located?

<comment><USER9> He said elsewhere he's in India.

</comment></comment><comment><USER10> Probably not a popular answer amongst HN, but Wordpress.</comment>


Why Our Whole Thinking on Autism is about to Change - <AUTHOR> https://medium.com/p/a8e5e25fd8ee

<comment><USER2> I'm autistic and is proud of it. I came to realize that what happens inside my head is not what matters (at least to outside observers). What matters is my outside world output (actions). I used to be clueless with regards to social conventions. I just didn't get it naturally like the others. The good thing is one can learn, but only if that person is willing.

<comment><AUTHOR> Well said! The social world is a tricky one. And you just seem great so I'd love to get you a free copy of my book before its released next week if you want - just shoot me an email at firstname.lastname@example.com</comment></comment>