Ask HN: How do you push website updates to live? - <AUTHOR> Hi everyone, I wanted to reach out to the community to see best practices for pushing updates to live sites.
I run an e-commerce site running a php shopping cart system. The way the shopping cart is structured is admittedly a bit complicated, which makes me nervous when I push live updates to the site.
Currently, I have a hosted dev site where I make changes, and when I'm ready for a release I manually change the files in the ftp. Not the best solution, especially considering a high chance of user error.
What is the standard practice for pushing updates? Git would make more sense, but implementation seems daunting. Any advice is appreciated! <comment><USER2> > _Git would make more sense, but implementation seems daunting._

Do you use version control now? If not, do it immediately. Initiating a git repo is very easy. You can use a boilerplate repo if you don't understand how gitignore works[1]. You should also look into gitattributes files.

If "implementation" means "deploying from a git repo", there are a million tools to do this. It's built into GitHub and BitBucket now, but you can also use Elastic Beanstalk or CodeDeploy on AWS. Azure and GCP have similar tools.

> _What is the standard practice for pushing updates?_

Bare minimum is having a way to trigger a deployment from a particular commit in git.

Best practice would be a full CI/CD server. It sounds like you probably don't have unit or end-to-end tests, but if you did, the CI/CD server would run the tests on any individual commits and report errors to you.

You could have manual or automatic deployments based on the latest commit on certain branches.

There's a lot to understand and unpack here, but there are also a ton of SaaS products to make it easier.

Honestly, though, you're a lot better off just moving to Shopify...

1\. [https://github.com/Partyschaum/php- boilerplate](https://github.com/Partyschaum/php-boilerplate)

<comment><AUTHOR> Thanks for the response, I really appreciate it. I'll look into the tools you suggested. Our current processes are archaic and overdue for an upgrade.

> Shopify I wish I could -- my industry requires some custom work that Shopify > can't provide. It's frustrating, but I'll admit it's refreshing to be > exposed to these new challenges. I guess I'm just a bit late to the party :)

</comment></comment><comment><USER3> Keep it simple, if it is only you making changes and your primary business is selling on the site and not the software then just use something like rsync or ssh/scp etc and script it. At most use something like ansible, chef or puppet.

If your primary thing is the software and you are deploying many times a week, then it can make more sense to have more sophisticated controls, but even then as one person a few scripts is usually plenty good enough.

If your primary business is the products you sell and not the software, I would be curious why you chose to build a shopping cart/e-commerce solution. There are so many good solutions out there it is usually just a distraction to build your own unless you have hit a large scale or are in just such a custom niche that nothing works for your product/service unless you write it.

<comment><AUTHOR> Primary business is selling products, and we have been building off an existing solution because of regulatory requirements.

Fortunately when everything is complete we would only need to focus on upkeep and maintenance, but it would be nice if we set a system in place now to avoid pain down the road.

<comment><USER3> Cool, yea regulatory is one of those niche things that can require a custom solution for sure.

I personally like Ansible especially when going from manual to automated as you can incrementally add to it but get using it quickly. Overall Ansible is pretty simple and it is super flexible without adding unnecessary complications. You can have it run your tests and make sure they all are passing before it moves the new software as live.

Plenty of consultants are available and can set it up for you if you need it done fast or it really isn't hard to learn if you have a little time.</comment></comment></comment>


Using Nvidia Jetson and OpenDataCam to Explore Computer Vision and IoT Analytics - <AUTHOR> https://www.hologram.io/blog/using-nvidia-jetson-and-opendatacam <comment><USER2> I have a Jetson nano. Really disappointing device.

The cpu is terrible. I bought it to experiment with reinforcement learning, with a model with low, but non trivial, cpu needs. Unfortunately it's so non performant that I never was able to do anything useful with it.

The Ubuntu distribution that works with it is still being updated, but still based on 1804. Decrepit python makes for poor ai ml experience. Poor cpu means fresh install of some basic python packages takes overnight. Need to combine package updates with apt, with python install with pip --user, just to get packages working. Recent openai gym packages won't even install.

The default desktop is Ubuntu's absurd gpu/cpu toasty warmer. Even idle, the heat sink feels like a fire hazard.

Had high hopes, ended up being a poor use of $100

</comment><comment><USER3> Thanks for the share. I love this! Curious where you typically get these _cases_ for Jetsons (not just this model, but all different models.) I have found many to be lacking, especially when attaching cameras.

This prevents me from playing with IoT ML projects, because otherwise, it these look...scary -- a chip with a bunch of wires hanging out.

<comment><AUTHOR> A lot of times someone like Sparkfun will have lots of developer kit items and cases. For the Jetson Nano you can do a quick Google search to find something on Etsy or Amazon.</comment></comment>


AWS or Google cloud platform? - <AUTHOR> I'd like to find out which service best fits my needs. I am working on a react-native app that will require some back-end processing for actions in the app, sending and receiving messages and keeping track of users and usage etc.
I don't want to go into a lot of detail, and I am definitely out of my depth as far as either of these two services are concerned.
I'd like to know if anybody has hosted an app on either AWS or google's cloud platform and what I need to do to prepare my app and myself for this task.
thanks- <comment><USER2> I would suggest using a simpler service like Firebase (by Google) - [https://firebase.google.com](https://firebase.google.com).

It has a SDK and very good up-to-date examples and documentation. Most of the nitty gritty of creating a server, APIs and authentication is abstracted away. The service includes analytics and allows you to create 'cloud function' which are written in js so you should feel at home there if you're creating a react app.

This comes from experience of creating a few apps with AWS (no real google cloud platform experience). For creating new apps mobile/web nowadays I use Firebase as its much easier to start up.

Slight change of tack perhaps from your original question, but hope that helps. Good luck!

<comment><AUTHOR> ok, thanks, i'll look into that. i was reading the documentation for AWS last night and think i definitely need something simpler.

thanks

</comment></comment><comment><USER3> I guess look at cognito on the AWS side and firebase on the GCP side. Both have pros and cons. At this stage I'd go with whatever is easiest to get running and meets your needs.

One thing to keep in mind is AWS has been around 5 years longer than anyone else and that can for sure be felt in breadth and maturity of features.

</comment><comment><USER4> Looking at your needs, I'd say the two would be identical.

I'd even advise you to use a "higher-level" service like a PaaS (I find Heroku great) or even a MBaaS (like Firebase).</comment>


Mossack Fonseca and Panama Papers Leak: What everyone else is not telling you - <AUTHOR> https://medium.com/@msuworld/mossack-fonseca-panama-papers-leak-what-everyone-else-is-not-telling-you-de0bdc09df1#.i84lfzgd5 <comment><USER2> "One: This is not actually a leak"

It is a huge data leak.

"Two : This is a very mere share of Worlds Monetary Corruption"

I think it's very illustrative.

"Three : This is a business Opportunity for Media Organizations"

Yes it is.

I've learned nothing from this article. Yes we don't have access to the leaked data and this is frustrating because we only get selected morsels. Writing contrarian drivel is not the way to address this.</comment>


How to Find the Perfect Startup Job: "Start with 'When'" - <AUTHOR> http://genuinevc.com/archives/2011/2/3/how-to-find-the-perfect-startup-job-part-i-start-with-when.html <comment><USER2> Great advice - early as early as you can stomach or after the train has left the station. Most folks gravitate towards the middle ground where the risk/reward isn't really there.</comment>


SEC charges Mark Cuban with insider trading: SEC official  - <AUTHOR> http://www.reuters.com

<comment><USER2> As this link doesn't provide much info and the news will likely be taken down from the reuters homepage at some point it might be better to focus discussion over at <http://news.ycombinator.com/item?id=367013></comment>


Bitcoin-like currency - <AUTHOR> I was wondering... how difficult would it be to develop a successful, secure, but very basic crypto currency like bitcoin and have a Venmo/PayPal app to transfer? I'm not good at coding or programming, I just have a vision that can change the world in a particular industry that needs efficiency. <comment><USER2> There are a number of competing coins in this space right now.

These include [https://request.network/#/](https://request.network/#/) and [http://stellar.org](http://stellar.org)

The first one, REQ, is specifically about to release a "Request" button, similar to the PayPal pay button, that web developers can put on their sites.

(This is not investment advice. I am not an advisor.)

</comment><comment><USER3> I have actually modified Bitcoin for fun, and there are lots of tutorials on how to do it, but they do require basic knowledge of programming to expect much success.

Instead try search google for "altcoin creation service" or something similar there are many services. I have no idea how reputable they are or their history, but I have seen at least 3 different companies that do it.

</comment><comment><USER4> _" Whatever the mind can conceive and believe, it can achieve" -Napoleon Hill_

I'm no expert programmer (Jr Rails dev), but am interested to see how difficult this is to do. Perhaps if not too difficult, I can try and help you with a prototype or point you in the right direction?

More than anything I believe in the power of vision for change which you seem to have found in your idea.

<comment><AUTHOR> Thank you! I would love to discuss my idea with you, when you have the time.</comment></comment>


VuePress: a static site generator that excels at working with documentation - <AUTHOR> https://forestry.io/blog/vuepress-brings-your-documentation-to-life/ <comment><USER2> VuePress pulls in nearly a thousand transitive dependencies. In light of recent security incidents[0][1] and the relative ubiquity of poor security practices[2] in the npm ecosystem, that seems like an unacceptably large attack surface.

I don't want to have to worry about somebody injecting malicious code or cryptocurrency miners into my website by compromising a little-watched transitive dependency in my static site generator.

[0] [https://blog.npmjs.org/post/175824896885/incident-report- npm...](https://blog.npmjs.org/post/175824896885/incident-report-npm-inc- operations-incident-of) [1] [https://blog.npmjs.org/post/173526807575/reported- malicious-...](https://blog.npmjs.org/post/173526807575/reported-malicious- module-getcookies) [2] [https://www.bleepingcomputer.com/news/security/52-percent- of...](https://www.bleepingcomputer.com/news/security/52-percent-of-all- javascript-npm-packages-could-have-been-hacked-via-weak-credentials/)

<comment><USER3> But this is a static site generator. They can't take over your server if you're just serving up stuff from S3.

<comment><USER4> They can't take over your server but they can inject a script tag with a cryptominer for all of your users to run. It's not the end of the world because you're just out a few dollars in electricity but it would be embarrassing.

<comment><USER5> Stupid question, does anyone do this on purpose? (i.e. With the consent of the client side). In a way it seems like a good way to make income for content (say a blog post) rather than all the ad profiling nonsense that goes on now.

<comment><USER6> I noticed that the nazi/terror/nationalistic organisation Nordic Resistance Movement uses [https://coinhive.com](https://coinhive.com), since they probably can't use ads. Coinhive apparently takes a 30% cut, and on my 2014 15" MBP I get a hashrate of around 50 / second. Some napkin math:

      ((50 hashes / s * 100000 vistors * 5 minutes)) / average hashes per block[0]) * block reward [1] * 0.7 ≈ 70 USD cents.
      [0]: 54272216853
      [1]: 4.11 XMR, 1 XMR ≈ 90 USD

So for spinning the fans for 10 0000 people for 5 minutes while they reads your blog post, you get 0.7 USD.

<comment><USER5> Thanks! That is strangely fascinating. So I am guessing your average laptop runs at about 20 watts so 20 x 10000 x 5/60 = 16.67kwh So depending on where you live you might pay 0.3$/kwh so 70 cents for about 5 dollars worth of electricity. So only makes sense if you can keep a lot of people on your page for a very long time...

</comment></comment></comment></comment></comment></comment><comment><USER7> I'm using VuePress to auto-generate a static, non-interactive site from a set of Vue components and some input data that's updated daily. For me it serves the purpose of a batteries-included way to render Vue to HTML, without messing with SSR libraries, webpack, or Babel configurations myself. I find Vue's composability a much tidier way of doing things than the file-inclusion-based setups typical of systems designed for static site generation.

That said, I've had to write a Python script to do some pre- and post- processing on the VuePress files. Generating a single README.md whose front matter contains my input JSON; stripping out script tags, as there's currently no way to prevent VuePress from generating them in the first place; minifying the HTML; injecting some extra tags; moving files around. There's a bit of a mismatch here between my use case and VuePress's primary role as a documentation generator.

I'd love to be able to call into VuePress as a library, instead of running it as a separate executable, and, for example, pass it my input data directly instead of writing it out to a temporary file for it to read back in. This is something I plan to toy with implementing once I get some free time again (currently bogged down with preparing to give a talk).

</comment><comment><USER8> I said it before and I'll say it again: VuePress is impressively easy to get started with. Running `vuepress dev` in an empty directory is all you need to get started.

Also, I really love the decision to make `README.md` files act as the `index.html` files. This has the benefit of making your docs easy to read from your projects Github repo.

Looking forward to seeing how it progresses.

<comment><USER9> How much vue do you need to know to heavily customize a theme?

<comment><USER10> Not much at all, all .vue files in the components directory gets registered globally, so if you create a Navbar.vue file, you can use <Navbar /> anywhere in your theme. Easiest templating system I've ever used. If you learn a bit of how passing props work, you're golden!

Some info on vue single file components: [https://vuejs.org/v2/guide/single- file-components.html](https://vuejs.org/v2/guide/single-file-components.html)

Props documentation: [https://vuejs.org/v2/guide/components- props.html](https://vuejs.org/v2/guide/components-props.html)

<comment><USER11> Do you know if registered globally = pre-loaded or are they only loaded as encountered / needed? Just wondering if you have to be careful how many components you put in that directory. Not for purpose of templates of course, but for the unique Vue components that you can put in page content.

</comment></comment></comment></comment><comment><USER12> Is this in the same space as Sphinx and Doxygen? The VuePress docs only have a trivial markdown example.

<comment><USER13> No this is only for markdown, so will not have the same breadth of features and tooling as Sphinx or Doxygen.

</comment></comment><comment><USER14> How does it compare to docusaurus, gitdocs, and a variety of other tools out there?

<comment><USER8> I haven't dug into those, but I assume one of the biggest differences is the ability to use Vue components inside your markdown files.

</comment></comment><comment><USER15> I guess there's no such thing as too many static site generators...

<comment><USER8> That's progress

</comment></comment><comment><USER16> vuepress also generates SEO friendly docs, eg when compared to docsify, but on the flip side docsify has full text search, while the default vuepress theme only searches headers (but since its seo ready most third party search will work ef algolia, google).

</comment><comment><USER17> I'm enjoying the weekend vue articles that have appeared lately.

</comment><comment><USER18> All these static site "generators" seem pretty silly. If you're going to make a static site then just make a few template pages by hand in html then copy and edit them to fill with whatever content.

It works even better if your webserver has server side includes (SSI) turned on. Then you can make header/footer/sidebar/etc templates and just insert them with a line in the page templates.

<comment><USER19> Because one of the things that keeps people engaged in maintaining a website is being able to fiddle with it, and the cost of fiddling with the layout of a truly static site is a lot higher than intuition would suggest.

Because you have to take the odds of making a stupefying, drop-everything mistake on any one page and take it to the nth power. That's O(c^n). That's an order of complexity that I haven't even bothered contemplating in so long that _I had to look up the notation_.</comment></comment>


Ask HN: How do you evaluate a lawyer? - <AUTHOR>

How can you evaluate the skill and ability of a lawyer?  Especially in a foreign country where you don't know the language (but the lawyer knows english)? Or if you don't have friends who will be able to give your recommendations. Most lawyers don't have blogs, user reviews or other rating services that you can use to evaluate them with.  Things like immigration, business, and other such things. <comment><USER2> Look for a local firm that has an office overseas. Then, the local lawyer will be ultimately responsible for the work done there and you have recourse in case something goes wrong. Big law is pretty much fungible these days, there is really very little difference between one firm and another. If you have a contentious matter, it's a little bit different, but if you can you should try international arbitration rather than use the legal system of either country.

</comment><comment><USER3> It's really tough if you aren't one (probably akin to the often-mentioned difficulty non-technical folks have evaluating programmers).

But there are a few places to start. First, Martindale-Hubbell is a respected reviewer of legal talent and provides ratings.

Second, if your lawyer happens to be a "SuperLawyer" you're probably in good hands. SuperLawyers represent the top 5% of a given field as voted by their peers.

Hope that gets you started.

</comment><comment><USER4> If it's a US or Canadian lawyer try searching for their name on <http://www.talkburst.com/> \- anyone with a name can be reviewed now.</comment>


Why developers should go to conferences - <AUTHOR> http://mat-mcloughlin.net/2013/10/02/why-developers-should-go-to-conferences.html

<comment><USER2> > They are often expensive affairs and its hard to justify the cost and time > you will need off to your boss.

s/hard/impossible/

'The VP says we have an O'Reilly books online subscription, use that instead'.

I am not joking.

<comment><USER3> I had the same experience with my previous employer. I made sure I negotiated at least two conferences per year with my current employer.</comment></comment>


Show HN: Beautiful React UI components for your next project - <AUTHOR> https://github.com/appbaseio/reactivesearch/blob/dev/README.md <comment><AUTHOR> Hi HN! This is a Show for the 2.0 release of ReactiveSearch.

What is this for:

\- Building data-driven apps with React (or React Native), e.g. search UIs, dashboards, feeds.

\- Building Elasticsearch UIs: components can query an Elasticsearch index that is hosted anywhere and supports all major ES versions (v2, v5 and v6).

Key highlights in this release:

\- Compatible with any Elasticsearch index hosted anywhere.

\- Comes with over 30 pre-built components which are common in building data- driven UIs.

\- Can be extended to work with your own UI components. (Really handy if already have a designed component and want it to work with Elasticsearch).

\- We also provide designer templates of all our components, which is helpful for creating pixel-perfect UIs.

\- Consistent API for web and native mobile apps (Native version of the lib is in alpha today)

You can see a post for building an e-commerce UI using Reactivesearch - codeburst.io/how-to-build-an-e-commerce-search-ui-with-react-and- elasticsearch-a581c823b2c3.

A lot of sweat and love has gone into building this, would appreciate any helpful feedback, improvements we can make, or issues you may be seeing. :-)

</comment><comment><USER2> The title made me think it was just another materialize fork, while it's actually an Elasticsearch UI lib, maybe that's the reason you didn't get they much attention. Nice work, I'd suggest a repost with a less generic title ;)</comment>


HCL buys Notes from IBM - <AUTHOR> https://www.theregister.co.uk/2018/12/07/hcl_18bn_ibm_software/ <comment><USER2> While Notes was justifiably hated, I had two somewhat good experiences with it.

1\. The recurrence model for meetings and the like was way more featureful than anything I've seen since.

2\. The CEO of my company at the time dictated that the Notes devs/admins change the email interface such that in order to click "reply-all", you had to navigate to a separate screen. This all but eliminated all stupid company wide email storms, and should be in _every_ email client.

For that we paid a heavy price in CPU and Memory use, as is Notes wont.

<comment><USER3> Meanwhile I've had so many frustrating experiences of group conversations amongst a few people where reply all doesn't get pressed, and then the conversation bifurcates. I've always thought reply all should be default.

<comment><USER4> It seems like the simple solution is to detect when there is more than one address that a reply could go to, and if so, on clicking reply have a sub-meny that asks whether you want to reply to all or one person (and maybe list recipients with the Sender at the top).

You still get a single click to reply for single senders, but any ambiguity needs to be dealt with, but usually only with a quick additional click.

I routinely experience this where I want to reply all in my work Gmail, but the default is reply to sender, and I end up having to re-send the email a few seconds later so everyone sees it (if I'm lucky and notice. Otherwise other people just never see what I intended them too).

</comment></comment></comment><comment><USER5> Domino had a NoSQL document database with reliable multi-master replication before they were cool. It could have been a great platform for cloud applications but IBM never saw the potential and let it languish.

<comment><USER6> That is an accurate, succinct summary of the story, but IBM also made it non- viable as a SaaS back-end because the license was paid per CPU core. There was literally no way to both scale an app and keep the cost competitive with other platforms.

<comment><USER5> Sure that was one reason. I think the lack of support for multi-tenant applications was just as serious an obstacle for SaaS.

<comment><USER7> I worked on a team that built a SAAS around 1998 on Notes/Domino. IIRC, we had a Notes database template and created replicas of it for every tenant.

I believe we accomplished all of this using some crazy LotusScript. We pushed really hard to get our product out before Lotus could release Instant Team Room.

</comment></comment></comment></comment><comment><USER8> My recent experience is that there are still a _lot_ more Notes deployments in the wild than I'd thought.

It could make a kind of perverted sense for HCL to own a product a huge amount of consulting/outsourcing money is being spent on. Either to ease the decline and capture more of that marketshare (e.g. 'we own it so you should hire us to get rid of it for you') or to try and reinvigorate that product and recapture some of those captured $$$s (e.g. 'it's already deployed for you and instead of paying us big bucks to remove it, pay us medium bucks to add Feature A you really need').

<comment><AUTHOR> "We will get rid of it for you and migrate you onto our managed Exchange service for only $xxx,xxx/month."

<comment><USER9> The enterprise software world scares me.

</comment></comment></comment><comment><USER10> Very few people know this, even inside of IBM:

Notes is literally an Eclipse plugin.

There. Now you can really hate it and feel totally justified.

<comment><USER11> Maybe it is now? Notes predates eclipse by quite a few years.

<comment><USER12> Notes used to be a native-ish desktop app. The UI had a native Windows implementation but Notes had a distinctive Notes UI look and feel. It wasn't that great, and pretty horrid on a Macintosh. The architecture was well- separated in that every Notes node was a UI layer and a Notes server, and would have supported truly native UIs. The Eclipsification of the Notes UI was not an improvement, and bloated the heck out of it.

Notes had an app development platform and runtime for forms, workflow and things like that. Adding Eclipse muddled that aspect of the architecture, too.

<comment><AUTHOR> I was at Lotusphere the year Notes 4 was announced and we gave it a standing ovation.

If you'd ever worked with Notes 3 you would know why.

</comment></comment></comment></comment><comment><USER13> The sale is a lot more than just Notes. Includes a lot of IBM software. Seems to be more of a customer base acquisition than software acq.

</comment><comment><USER14> Finally, this gives every one an excuses to move off Notes as it is no longer with IBM. My previous company use Notes since Lotus Notes era and email was a bloody mess for something that should have been very simple.

</comment><comment><USER15> Who in their right mind will buy Notes ?

<comment><USER16> Well, given the installed base and utter pain in the butt to move off the platform, a company can make a good living supporting it for a long while.

<comment><USER17> True, but one has to wonder if the business cases to just keep milking the existing user base, or if there will be any attempt at selling new installations.

New license seems like a hard sell, unless HCL invest heavily in both Notes and Domino.

<comment><USER16> It's probably a really hard sell unless they really can make a case for easier development and maintenance for internal applications over web technologies. I too don't see that happening without some investment. I really think its a "serve existing customers" play with some contract fulfillment potential for specced app projects.

</comment></comment></comment></comment><comment><USER18> I quite liked notes, nice idea, did a few courses changed companies never looked at it again Damn it ja, open source the thing to get some relevance

</comment><comment><USER19> Notes 4 launched my software development career, so I will be forever grateful to it.

</comment><comment><USER20> A mediocre outsourcing company buys software from another mediocre outsourcing company? How exciting.

<comment><USER21> Mediocre software.

<comment><USER22> I see you've never had the chance to experience the glory that is lotus notes.

You'd wish it was mediocre.

<comment><USER23> Yes, calling Lotus Notes mediocre is a compliment of the highest order.

</comment></comment></comment></comment><comment><AUTHOR> I know it's normally frowned upon, but I changed the headline from "HCL picks up Notes, spanks total of $1.8bn at Honest John's IBM software sale"

<comment><USER16> The Register often has fanciful headlines, so I would bet your not alone on rephrasing it.

<comment><USER24> They cover stories I don't often see elsewhere (especially UK-centric tech news) and go into great detail, but I hate the writing style. I know it has a popular following but I feel it gets in the way of otherwise fantastic content. Can anyone recommend any alternative sites with similar breadth and depth but a more professional style of writing?

<comment><USER25> They are extremely professional and their technical content is excellent.

I suspect that those stuck in the IT trenches want some light-hearted relief?

It is peculiarly British (albeit with an office in Australia too), which doesn't suit everyone - you may get ribbed if you post a comment that is US centric.

The writing style and the headlines often comes across as childish, but some of the seemingly childish stuff is associated with gags that have been running for years, or reflecting current events in the UK, or just good old British humour!

I am a colonial - so my opinions matter didly squat.

<comment><USER24> I'm Scottish, so I do get the context and humour. I just feel it often gets in the way of the stories and the great journalism going on at the Reg. Sometimes the pun-filled headlines feel like a brain teaser to be deciphered or a page from Private Eye - great if you're after some light comedy, not so great if you want to skim the industry headlines for the stories that really matter to you.</comment></comment></comment></comment></comment>


Facebook Triggers Same Hormone As Cuddling - <AUTHOR> http://www.allfacebook.com/facebook-releases-same-hormone-as-cuddling-2011-04?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+allfacebook+%28Facebook+Blog%29 <comment><AUTHOR> I guess those scientists got bored of looking for a cure for cancer!

<comment><USER2> Do you honestly think that the scientific community is incapable of working on more than one thing at once, or are you just a troll?

<comment><AUTHOR> Oh c'mon! I'm just wondering how they secured funding to prove this hypothesis. I'm part of the scientific community and I know how difficult it is to justify your research projects.</comment></comment></comment>


Global Variables Considered - <AUTHOR> http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2011-03.html#e2011-03-29T20_13_25.htm

<comment><USER2> There is a side to this particular issue that the writer does not touch on: the _pedagogical_ side.

When I read this article, I find myself wanting to know something: was the student _told_ not to use global variables? If so, then the answer to why the grade was reduced, is easy: the student did not follow instructions.

Not long ago, I spent a number of years teaching a 4th-semester university programming class. I required my students to follow a _relatively_ detailed (for a class, anyway) set of coding standards. These standards were not necessarily the best they could have been; however, I made no apology for them, because I was trying to help my students learn to build software within externally imposed constraints.

After all, anyone who works on a sizable software project -- other than the person running the project -- will almost certainly have to adhere to standards they did not write. There is a good chance that some of these will be standards they are not fond of. That's just the way large projects are. And giving students practice in dealing with this, is, I think, a good goal for a software development curriculum to have.

So, is it reasonable to downgrade a student's work severely for including a global variable? That's debatable. But it is _definitely_ reasonable to downgrade for blatant failure to follow instructions. Furthermore, "use no global variables" is, if not the best rule in the world, certainly not a terribly unreasonable one.</comment>


Ask HN: How can I do professional networking without LinkedIn? - <AUTHOR> <comment><USER2> Twitter? Depends on your focus, I think. Dev Twitter is pretty nice for me.

</comment><comment><USER3> Dev.to is great blogging and community platform. Twitter is also good.

<comment><AUTHOR> How about without social media or platforms in general?

</comment></comment><comment><USER4> Good question, personal website with a regular blog maybe?

<comment><USER5> Agreed you'll basically own your content and In that process you'll learn how to put your content to the right audience and you'll learn about marketing. It's hard at first but i found having my own blog more rewarding</comment></comment>


2010 ACM programming contest problem set - <AUTHOR> https://cm.baylor.edu/ICPCWiki/attach/Problem%20Resources/2010WorldFinalProblemSet.pdf

<comment><USER2> If you are wondering why the problems are so simple it's based on the rules:

 _the contest is scheduled to last five hours

Each team will be provided with a single computer and a calculator. All teams will have equivalent computing equipment.

Contestants may not bring any printed materials or machine-readable versions of software or data to the Contest Area. Contestants may not bring their own computers, computer terminals, calculators, or other electronic devices to the Contest Area._

[http://cm.baylor.edu/ICPCWiki/Wiki.jsp?page=World%20Finals%2...](http://cm.baylor.edu/ICPCWiki/Wiki.jsp?page=World%20Finals%20Rules)

</comment><comment><USER3> why do PDF's have [scribd] in the link? It has nothing to do with scribd. Wouldn't [pdf] be better?

<comment><USER4> A long time ago, all submitted pdfs were redirected to scribd, iirc. Now you just get an optional link.

</comment></comment><comment><USER5> ahh the good ole days of ACM competitions ... real world isnt nearly as fun ... sniff sniff</comment>


Show HN: Spotsy – iPhone app to discover the world through Instagram - <AUTHOR> https://itunes.apple.com/us/app/spotsy/id714622289?mt=8

<comment><USER2> If I had an iPhone I'd take a gander.

I like [http://geophoto.grabeh.net/](http://geophoto.grabeh.net/) for looking at photos around the world, but that may have something do with the fact I built it.

<comment><AUTHOR> Cool! Does this use the Flickr API?

<comment><USER2> Indeed it does - via Node.js - the code is here: [https://github.com/grabbeh/geoflickr](https://github.com/grabbeh/geoflickr)

</comment></comment></comment><comment><USER3> In a way this is kind of a workaround to the original Color app idea right? Not exactly the same, but color wanted you do be able to see photos of other people around you that weren't your friends, kind of the same concept, which is cool.

<comment><AUTHOR> Yeah, there are definitely similarities to what Color was trying to do. Originally I made the app to only see photos close by, but realized most users wanted to see other places.

It also uses Instagram photos so there's already a ton of useful content, unlike Color's approach.

</comment></comment><comment><USER4> I don't have an iphone and can't try the app.

Is it similar to [http://smwh.re](http://smwh.re) and [http://www.travyde.com/explore](http://www.travyde.com/explore) ?

<comment><USER5> Hey man, thanks for linking Somewhere. Funny how Travyde totally stole my design! I'm glad their whole website is awful.

</comment></comment><comment><USER6> I'll check this out - I had a similar idea last summer while attending large festivals. That it would have been nice to see what people were posting on instagram around me. I'll give this a try next time I'm in a populated area!

</comment><comment><USER7> I've been looking for an application like this for a while now. I had toyed with a few that simply didn't fit. Now I have an application that will help me plan kayaking trips, vacations, events, etc. Great work!

<comment><AUTHOR> Wow, that is so awesome to hear! I hope you enjoy using the app.

</comment></comment><comment><USER8> A good lesson people can learn from your app is that you offer a good chunk of functionality and what to expect before logging in and that motivates the end user to login and keep on browsing. Awesome work!

<comment><AUTHOR> Yeah, that was an important feature for onboarding new users. I wish people didn't have to log in, but Instagram (understandably) has API limits that require logging in once you have a lot of activity.

</comment></comment><comment><USER9> Nice work.

I've always wondered why Instagram has made it so difficult to find photos by location.

Update: why do you require my Instagram username/pwd when they support OAuth? Not a fan

<comment><AUTHOR> RE not using OAuth: I did that because users had a lot of trouble using the oauth login, so I basically just pass the users credentials to the oauth page. If you prefer oauth just press "Forgot Password" in the login popup and press the go back link, it will bring you to the standard Instagram login and will work the same.

<comment><USER9> that worked. I'd probably feel comfortable if there was just a disclaimer that said you don't store credentials on the login page. I'm probably too trusting but I like it when product designers are thoughtful enough to explain what is done with credentials/data.

</comment></comment></comment><comment><USER10> Not really useful when so many geolocated images are so random. I don't necessarily want to see people's selfies or food pictures if I'm trying to see pics from a certain location.

<comment><USER11> please do provide some feedback / insight on what you'd like to see. thanks!

<comment><USER10> Well, if I'm just wanting to check out photos, I want to see actual photos of the places. Not people taking selfies, close-up shots of food, or photos that are not relevant.

The value of spotsy, however, is that you get to see which local spots have the most instagram photos associated with it, which provides value in a different sort of way.

I can see the usefulness of the app in that regard, but not as a photo browsing app.

</comment></comment></comment><comment><USER12> Instagram's search-by-geo-coordinates endpoint is one feature that makes the API so valuable and interesting...Other services have it, of course, but Instagram's version has higher value because geolocation is turned on by default...I read somewhere that maybe 2-5% of Tweets have geodata, whereas Instagram content is at 30 to 50%.

The investigative newsroom ProPublica (disclosure: my former employer) had a fun use-case, in which they knew of a lobbyist-politician ski resort retreat, looked up the location of the resort, and then used Instagram's location/date filters to see who was on the trip (at least one lobbyist posted a photo from their own publicly identifiable account): [http://www.propublica.org/nerds/item/a-super-simple-tool- to-...](http://www.propublica.org/nerds/item/a-super-simple-tool-to-search- instagram-by-time-and-location)

<comment><USER13> We need to develop a social norm that sharing something is not necessarily permission to publicize it. There's lots of contexts where it is probably fine, but I think there are also quite some contexts where it isn't so fine.

I'm not trying to get up on a high horse and preach, it's just kind of gross to completely change the sort of attention that is being directed at something that someone shared.

I know that some of the response to this will be to not post it publicly if you don't want people to see it, but that's exactly the thought I want to push back against, just because something is available at a public url doesn't mean it is a cool thing to point reddit at it.

<comment><USER12> I agree that social norms need to become better (i.e., people need to be better and more decent), but you have to consider why publicizing this info (not in this particular case, but for any given person and any given content) is not considered illegal in the United States, currently: such a law would almost certainly be used to squash freedom of expression.

This has been the case long before Instagram and the Internet becoming mainstream, including the denial of requests for public government records and the photography of police actions on the purported concern for privacy.

I know you're only talking about social norms...but such things influence and are influenced by law and regulations...I'm just pointing out that it doesn't exist in a vacuum.

<comment><USER13> Sure.

I suppose part of the problem is that we talk about privacy, when really it's publicity that has changed. The situation where basically every individual can create recordings and publish them to the entire world is actually somewhat novel. We reach for analogies about privacy, but really we need to think about what sort of rights people have to their own publicity.

<comment><USER14> What about the idea that maybe our ideas of privacy / publicity are shaped by what we're used to rather than any universal laws. In other words, if we were to grow up in a society that didn't experience much privacy maybe we'd just accept it as the norm.

I'm not making a judgement which is better. The old way or some other way. Only trying to point out the fact that we had more privacy in the past isn't in and of itself better. It just is.

<comment><USER13> I only expressed it implicitly above, but I am making a judgement about what is better. I would absolutely prefer it if people did not casually direct the internet ray-beam at people that are not interested in its attention. At the same time, I would like those other people to be able to use the internet without paying intense attention to the consequences of each action they take.

If that makes me some sort of stodgy conservative that has been shaped by the past, so be it.

</comment></comment></comment></comment></comment></comment><comment><USER15> Wow, this is nicely done, very neat. Great job!

Just out of curiosity, is this a native app? I really like the animations of the modal windows, I wonder how you made them so awesome!

<comment><AUTHOR> Thanks a lot!

Yes, it is a native ios app. For animations I used [https://github.com/zrxq/UIView- EasingFunctions/](https://github.com/zrxq/UIView-EasingFunctions/)

For animations, it's very important to use the right easing function to make it fit the feeling you want to evoke.

For instance, I used a keyframe animation for the login modal when you close it to not log in. It evokes a feeling of disappointment because it awkwardly swings down because you are not logging in :)

</comment></comment><comment><USER16> In Tokyo it's just pictures of food.

I wonder if there was a way to detect pictures of food automatically so it could be filtered out.

<comment><AUTHOR> I know what you mean, it sounds like you want to search or explore by categories. So, when you want to see landmarks, you only see those, but if you wanted to see food, you could filter by that as well. Thanks for the feedback.

Also, these results will be different at different times of day.

<comment><USER17> Not sure exactly how your app works but maybe you can use the API to check for tags on each photo you load. If any tag contains some word that would relate to food, then just don't load/display it.

<comment><AUTHOR> I think it's more about finding out what type of location it is: restaurant, bar, club, park, concert venue, whatever. Then filter by that. Rather than the individual photos.

But I like the idea of a "no food pics" option :) Instagram is infamous for stuff like that.

</comment></comment></comment></comment><comment><USER18> the flip book animation/interaction is top notch. good job!

<comment><AUTHOR> Thanks! My good friend @alexsailer did a killer job on designing the app and interactions. I modified this example to create the effect: [http://corgitoergosum.net/2013/03/16/from-js-to- uicollection...](http://corgitoergosum.net/2013/03/16/from-js-to- uicollectionview-building-a-custom-roulette-wheel-stack-control-in-ios/)

</comment></comment><comment><USER19> this needs an image classifier, which is not so easy to build.</comment>


Loopback-next – Build modern applications that require complex integrations - <AUTHOR> https://github.com/strongloop/loopback-next <comment><USER2> If you haven't already, you should read the article on writing v4 and why it is happening: [https://loopback.io/doc/en/lb4/Crafting- LoopBack-4.html](https://loopback.io/doc/en/lb4/Crafting-LoopBack-4.html)

</comment><comment><USER3> Having used loopback version 2, moving to version 3 was relatively easy. I don't think it will be the same from 3 to 4.

Introducing MVC architecture is good - I'm yet to go through the code, but I'm guessing this will be inline with how Laravel is built.

But, why TypeScript? This seems like a strange decision to me.

<comment><USER4> I've used Loopback for a while as well. IMO, TS is a welcome change, I'd be happy to write APIs in it and I'd prefer it to untyped libraries.

It's hard to understate how nice it is to have your editor autocomplete functions, argument order, object shape, etc. It's a real productivity booster, gets you sanity checking out of the gate and makes the framework discoverable. This is a good decision. I can't make any cogent argument against it, aside from dependency bloat.

</comment></comment><comment><USER5> If you're looking for something similar and not in alpha state go check out nest.js [https://nestjs.com/](https://nestjs.com/) Its embracing MVC, supports TypeScript and DI. Really sweeet.

</comment><comment><USER6> Only concern with the loopback project is the licensing for the database connectors, at least mssql. Can anyone using this in an enterprise setting weigh in?</comment>


SQL Databases Are An Overapplied Solution (And What To Use Instead) - <AUTHOR> http://adamblog.heroku.com/past/2009/7/8/sql_databases_are_an_overapplied_solution_and_what_to_use_instead/

<comment><USER2> There's definitely a lack of imagination when it comes to proponents of NoSQL solutions, and this article shows no exception. While we do want to store, for example, an entire e-commerce order in a single operation we also don't necessarily want to retrieve it that way. That type of storage makes otherwise simple operations considerably more difficult. Do you want to know how much you made in sales today? How many of widget #453 are still in stock? The most popular items for sale? The least popular? Start writing code.

The other example of a user profile seems to be the perfect fit for storage in a single table, so I don't why that's there. Now, do you want to know how many users logged in this week? How about you want to delete every account that hasn't been accessed in a year? Much more slow code.

Every article about NoSQL goes on and on about the supposed advantages, but rarely talks about the considerable disadvantages. And honestly, for most people, the advantages are simply not worth the trade off. I fear that we'll have decades of e-commerce stores written with document stores and mountains of code slowly chugging away to calculate the basic stats that any business needs.

<comment><USER3> Did you use any NoSQL solution seriously? Let's see some examples (imaginary python-like interface, so I don't have to be language/backend-specific). Like you say: Start writing code.

Do you want to know how much you made in sales today?

        sum(amount in db.filter(type='order', date=xxx))
        -vs-
        SELECT SUM(amount) FROM order WHERE date=?

How many of widget #453 are still in stock? (IRL it's never that simple, but...)

        db.filter(type='stock_widget', part_id=453)['amount']
        -vs-
        SELECT amount FROM storage WHERE id = 'widget 453'

Most popular:

        for r in db.filter(type='item', date=xxx): histogram[r['part_id']] += 1
        histogram.sort_value()[0].key()

What I wanted to show is - you're writing the same amount of code for both cases. In some databases (like Tyrant) you can also run the script server-side and just report the result if you prefer. Also depending on the database, you don't need to read the whole record every time - you can just request a list of fields in most of them.

Have some fun with a NoSQL database before rejecting it for reasons like the ones you mentioned... It's also not always about processing speed - I could use either solution, but coding for TT is just simpler than for any SQL in most of what I do (see how my db.filter examples give you the solution in the current language, but queries are just... queries that you have to run and retrieve results (I'm ignoring SQL-LINQ now)).

<comment><USER2> The question is what is this doing:

        sum(amount in db.filter(type='order', date=xxx))

If you're iterating every order in the database to apply your filter or to calculate the most popular items then you wasting a huge amount of processing power and RAM for something an RDBMS can do very efficiently. It's not an advantage that your incrementing values in your programming language of choice either, it's a disaster.

As for API, you can hide the SQL pretty well behind an abstraction as well. But there is an advantage to using SQL itself -- the database engine analyzes your query and produces the most optimal way to get the answer you want. You're choosing to write poorly optimized code instead.

<comment><USER4> You don't seem to understand how stored views work. This computation cost is felt at insertion time and is not theoretically worse than the exact same computation cost at insertion time in a rdbms to build almost identical index structures.

What current _implementations_ of rdbms's gain you is the ability to write completely ad-hoc queries and get reasonable performance most of the time. This is an implementation advantage, not a theoretical advantage.

<comment><USER2> I understand that you can have indexes -- which, in my opinion, seems to defeat the purpose of NoSQL in the first place. You take your unstructured data store and structure it.

Also, in the authors example the items are properties of the order. How exactly would you index on those?

</comment></comment></comment></comment></comment><comment><USER2> From the article, on where relational databases are appropriate:

 _> Small records with complex, well-defined, highly normalized relationships._

Why do the records need to be small? And honest, in software development, a large amount of your data is going to be well-defined and easily normalized. The author provided 2 examples that would fit perfectly in a relational database.

 _> The type of queries you will be running on the data is largely unknown up front._

Or the types of queries you are running are more than just retrieving a single record or simple list of records. I'm afraid a very large number of queries fall into this category.

 _> The data is long-lived: it will be written once, updated infrequently relative to the number of reads/queries, and deleted either never, or many years in the future._

Yes, a relational databases are for storing long-lived data. For temporary data, you could use an in-memory table or just some other solution entirely. There's no need to mix your permanent data with your temporary data. Databases handle writes and deletes extremely well (in bulk even) so I'm not sure what the author was getting at here.

 _> The database does not need round-the-clock availability (middle-of-the- night maintenance windows are no problem)._

What kind of middle-of-the-night maintenance does a relational database need? I've been running at least one database for several years straight without any downtime or maintenance.

 _> Queries do not need to be particularly fast, they just need to return correct results eventually._

Relational database queries aren't particularly slow -- in fact, RBMS are heavily optimized to return data very quickly. In the vast majority of cases, this is going to be more than fast enough for nearly every application.

 _> Data integrity is 100% paramount, trumping all other concerns, such as performance and scalability._

Damn straight. I want the data coming from my data store to be 100% correct always. If I need to trade performance for correctness then I can easily add some caching. But I'm not sure how document stores would solve this any differently.

<comment><USER5> I can only assume the reason this was at negative 1 was most people interested in this topic are already on the (not just SQL) bandwagon. IMO, scaling is a non issue for most well designed websites and as computers get faster this only becomes more apparent. There is a significant advantage to separating complex sites into independent modular components and a only tiny fraction of sites need to scale beyond this point. When you actually need to expand fine, go down that rabbit hole but, for most people it's a complete waste of time.

PS: I suspect the main problem developers actually have with SQL databases is they there ORM is significantly less powerful than SQL. All to often developers focus on row as object and forget the power of more abstract data structures.

</comment></comment><comment><USER6> I think more specific context on "SQL databases don't scale" might be appropriate here, especially for the noob hackers that are figuring out just which technology to use in building their first or second apps. Is it worth ignoring defaults and conventions on a simple Rails app and not use an SQL based db? Probably not? And I reckon that Heroku itself hosts a good deal of apps where "will this db scale?" isn't really relevant. I could be wrong.

Another question worth knowing the answer to is how much of hassle it is to switch horses midstream (from a well normalized SQL db to something else), after there are some data in the tanks.

Maybe this is Adam's recommendation specifically to the dreaming-big community, which I can certainly appreciate. And maybe everyone should be dreaming big.

</comment><comment><USER7> Gridspy monitors power usage in real time. My original plan was to effectively stream the live data through the database as it passed from collection (sensors) to display (on the website). The frequent writing to and polling of the database to keep data "live" was absolutely killing performance.

Now I have moved to a Twisted application that aggregates the data and does occasional writes into the DB. It can answer webserver queries for the latest data out of its internal datastructures and streams live data to the user's browser via Orbited

See <http://blog.gridspy.co.nz/2009/09/database-meet..>. (the database side)

and <http://blog.gridspy.co.nz/2009/10/realtime-data..>. (the whole application structure)

[I posted this on the original site too]

</comment><comment><USER8> I liked the definition of "transient data" - I've been promoting Redis for that kind of thing but I didn't have the vocabulary to explain what I meant (I've been staying "stuff like stats and counters"). Defining transient data as being frequently written, infrequently read is useful too.

<comment><USER9> I have been describing this type of data as "high velocity" to my friends, and they seem to get it.

</comment></comment><comment><USER10> Hang on, SQL databases are poor at highly structured things like an order and that's the sort of thing suitable for a document database?

</comment><comment><USER11> It doesn't feel the author has real world experience on relational databases. Let's see :

"Small records with complex, well-defined, highly normalized relationships."

Maybe, but not necessarily. Example? Call Data Records for a phone billing application. While there may be relationships in the inserted rows, even to other databases (i.e. customer information) the data stands pretty much on it's own. The challenge is to get floods of data into a single table, so that it can be later sliced and diced for billing purposes.

"The type of queries you will be running on the data is largely unknown up front."

Excuse me? This is so very wrong. I don't even no where to start. _EVERY_ good RDB application is designed in a way where (ideally) all queries are known up- front. If you have to guarantee response times (i.e. think of a cash withdrawal at an ATM) you absolutely _MUST_ control the queries that run on the db. Ad-hoc analysing and reporting _MUST_ be relegated to dedicated, possibly replicated databases.

"The data is long-lived: it will be written once, updated infrequently relative to the number of reads/queries, and deleted either never, or many years in the future."

Mostly so, but absolutely not necessarily the case. I work on an application where the entire data is toasted after a couple weeks and in fact: today and yesterday would suffice.

"The database does not need round-the-clock availability (middle-of-the-night maintenance windows are no problem). Queries do not need to be particularly fast, they just need to return correct results eventually."

This is so full of crap, I won't even get into it

"Data integrity is 100% paramount, trumping all other concerns, such as performance and scalability"

Yes, 100% integrity is paramount, but most certainly not at the cost of scalability, let alone performance.

Recently, methinks, there are a lot of proponents of new and improved data management capabilities, who see their little walled environment, but seem to have no whatsoever experience running databases in a real business. A normal (even big, huge or multinational business) does not have those "cloud-data- management-requirments" that very, very few companies really have.

</comment><comment><USER12> Consider the source: Heroku needs an alternative to Postgres to be a true competitor to AppEngine.

There's something that never gets brought up in these NoSQL discussions: SQL Databases don't scale _down_. They aren't very good in multitenant situations where you have a lot of random small-fry users -- you end up just sharding the users across a bunch of different master-slave pairs, and hope that they don't step on each other's toes. Because they take up real resources even if not being used, it's difficult to pull off a freemium model.

<comment><USER13> SQLite scales down fine, FWIW. It's just not appropriate past a certain amount of concurrent writes, but it's great for prototyping and smaller services.

<comment><USER12> That is a clever idea I'd not thought of, but it isn't really multitenant -- it just pushes the problem down into the filesystem.

It also requires a discontinuous transition to a different SQL database once you graduate from being a small-fry, and from there you're in the same boat as everyone else trying to scale that to multiple machines without application changes.

<comment><USER13> I'm not sure what you mean by, "it just pushes the problem down into the filesystem". Could you explain?

On the upside, SQLite will take disk space, memory, and CPU proportional to _actual_ usage, and compared to (say) Ruby or Python, it's a drop in the bucket.

As to the discontinuous transition between it and a bigger system, sure. It's a trade-off. So is worrying about scalability plans during early prototyping, though.

<comment><USER12> If you're building a multitenant distributed system like GAE, the SQLite blob needs to be stored in a distributed system too, even if you don't need to handle concurrent access.

<comment><USER13> Got it. SQLite also explicitly notes that its locking does not work properly with many broken implementations of NFS (<http://sqlite.org/faq.html#q5>), so that's not an option.

</comment></comment></comment></comment></comment></comment><comment><USER14> Although this topic is frequently discussed on HN, and the portion about document stores is well-hashed, I found the tidbit on binary assets/file uploads very interesting, as I had only used disk before.

<comment><USER15> Yeah, I was happy to find out about Tokyo Tyrant as well, had never seen it mentioned.

</comment></comment><comment><USER16> There is no explanation of why a filesystem is a bad place to store "binary blobs".

If you're collapsing the metrics that you're storing _IN SQL_ there is something _really_ wrong going on.

Logs are OK to store in SQL, assuming you're scraping your logs properly and are logging the proper things. Logging every clickthrough in a relational database is somewhat insane. Logging 10 minutes worth of aggregate clickthroughs is perfectly fine. If you think logs should be a ring buffer I challenge you to tell that to any admin of a system that is subject to laws governing the length of time you must store logs (which is pretty much all e-commerce?).

<comment><USER17> Meh, I record a couple million page views to a MySQL database (as a new row for every page view) every day, for 6 years. Works fine. I don't expect a million new users to show up any time soon.

<comment><USER16> six billion five hundred seventy million rows?

<comment><USER17> Yes, I do actually have billions of rows. See <http://www.w3counter.com>

</comment></comment></comment></comment><comment><USER18> I agree wholeheartedly with this article except for the part about s3/cloudfront being the only tool for storing binary assets. MongoDB's GridFS extension does a fine job of handling files in the database since they shard and replicate just like database records. As for serving them out, you can run it on a cheap unmetered server using nginx + <http://github.com/mdirolf/nginx- gridfs>

</comment><comment><USER19> I can feel the sincerity of the author, but ultimately I think he's wrong that the solution to this is NoSQL.

It really would be nice to send an e-commerce order as JSON data and have my database know what to do with that. I think we still need the flexibility and power of a relational database behind it, but if someone extended PostgreSQL to take records the way CouchDB or others take records, and taught it how to store into rigid, joinable, relational tables, that would be just great and would help a lot. All of the advanced and relational functionality would still be available when needed, but by default, if one could write and retrieve data in a default format that had been mapped onto tables, etc. previously transparently from the database, that would be awesome.

<comment><USER20> I think you just described inserting to a SQL view. Never done it myself, but sounds helpful.

</comment></comment><comment><USER21> Does Heroku offer any alternate persistence engines? I thought they were PostgreSQL only.

</comment><comment><USER22> I love the document record pattern. I use this on google app engine, which is a tad tricky to use as a relational db. It actually ends up being way simpler and faster. For instance, you can model an app with just one "table" (Kind). You can put say a user id primary key, then have blob binary data fields which store your serialized document records. The reason it's so fast is all you're doing is a simple index scan to lookup all the data you want. It also makes it really simple to store items into memcached/memcache.

</comment><comment><USER23> I disagree with the comment "SQL databases don't scale". If you've got a decent database architect, scalability (not capacity), stops being an issue.

</comment><comment><USER24> These noSql people are missing the point of relational modeling, that you can easily incrementally evolve your data model. It's why object databases never caught on.

SQL databases are absolutely beautiful and elegant when you think of them in terms of the codd relational model, in my opinion the best thing that computer science has produced so far.

The only limitation of relational databases currently is their lack of automatic infinite horizontal scaling on commodity servers, but hopefully someone will solve that soon.

<comment><USER16> if by "solve" you mean "completely redesign modern RDBMS's" you may be waiting for a while. i'm no expert, but my limited understanding is that most of these services provide a singular interface to a database. to be "automatic infinite horizontal scaling" they'd need to support an infinite number of interfaces on any of these commodity servers. i could be wrong, because again i don't fully understand them, but i think that means basically implementing the equivalent of an 'intelligent' distributed parallel fault-tolerant file system. at that point i figure you could add "lots of glue" (heh, understatement?) to MemcacheDB, MemcacheD, MemcacheQ and some other crap and get something similar. but i could be crazy.

<comment><USER24> The google appengine datastore is moving in the direction of being a full sql database, and I bet oracle have people working on it (because appengine, salesforce and aws is a threat to their business), so I don't think it's all that far-fetched.

<comment><USER25> Appengine's GQL is a very limited subset of SQL. The only queries which can be performed are those that can scale well, so it's doubtful that even simple things like JOINs will be supported in the future.

[http://code.google.com/appengine/docs/python/datastore/gqlre...](http://code.google.com/appengine/docs/python/datastore/gqlreference.html)

<comment><USER24> Appengine datastore works by creating indexes for every query. In relational databases you make joins execute fast by creating indexes. I don't see why joins couldn't be added to appengine.

<comment><USER22> I believe there's a few reasons. one is that the google file system blocks that bigtable runs on and "reads" for your query could be on any number of machines. been a while since I read the google architecture papers but I would recommend it to all. it is fascinating how they implemented gfs, bigtable, chubby lock, etc. the work around is essentially to write your own code that does what a database does - something to the effect of getting a list of keys for the records you are interested in and using that to then scan just the area in your data structure you want.

<comment><USER24> It hasn't got anything to do with that. Creating an index on a join means that possibly hundreds of indexes need to be updated every time a you make a write - but that is where appengine would actually shine since those writes can be parallelized to hundreds of machines. It could easily make postgres/mysql/oracle redundant.

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> Yeah, Heroku should put up or shut up until they start offering alternate NoSQL databases (and no, MongoHQ is not an alternative because of network latency).

Interesting article though.

<comment><USER27> As they are hosted on EC2 couldn't you use Amazon Cloudfront with them without too much trouble and with no latency issues? <http://aws.amazon.com/cloudfront/>

The main issue would be integrating Cloudfront with Rails not getting it to run on Heroku. (A quick search doesn't show much support for using Cloudfront with Rails in general)</comment></comment>


Ask HN: How do you feel about "Git metrics" evaluating developers? - <AUTHOR> I've seen a number of tools recently related to measuring "developer metrics" by examining git data. Gitprime (now owned by Pluralsight?) and waydev.co.
I'm curious to know what developers on the receiving end of these tools think - are they invasive? Are they useful? Does it feel weird being "watched" in this way?
Like any tool, a lot depends on how these metrics are used - and who's looking at them and making what kind of judgments.
I can see the value on some level as a means to potentially improve developer efficiency...but I'm curious to know how that actually plays out <comment><USER2> I feel like this is partially getting into a technical vs social problem where if you're tracking peoples' "new LoC writte, existing LoC edited, number of commits per day, comments per PR on other people" type of stuff you end up with bullshit artists optimising for maximum analytics impact, good devs being penalised for "slacking off", and all sorts of other crap that comes with trying to optimise for these effects.

It's kind of like how in a proper team where there is already trust and no micromanagement, everyone continues to do their work and remain productive no matter what, while often in a team where management does not care about ICs and treats them as disposable, and the they only show up for an income, are hourly, or just churn out crap in volume, they're gonna slack off as soon as your back is turned.

It entirely depends on their use, ask the team(s) involved first, and the level of trust. You'll be strung out to hang if your team already doesn't trust you and now you want to throw this "surveillance watchdog garbage" at them.

If your team trusts you as management, you may get some kind of buy-in as to how some graphs may help them work smarter, but at that point it's likely something they don't _need_, and if you start forcing value judgements off that data there's a high chance they're going to resent you for it.

<comment><AUTHOR> I agree that trust is fundamental to tools/metrics like this, and will determine how they're used. What I find interesting (concerning?) is that they seem to be marketed towards managers/VPs/CTOs exclusively (people "outside" the team) to better understand what's going on _within_ the team, which seems flawed (but also makes sense, considering who's making buying decisions). I understand the value proposition of "getting the most" out of your (expensive) engineering team, but presenting a product in this way seems to set the stage for "misuse" right off the bat. Maybe I'm biased, but it feels like these tools might be more palatable if framed to help ICs improve and understand their own behaviors within a team

</comment></comment><comment><USER3> What do you want to optimize for?

If you have tools that use git to pull metrics to see who your "best" developers are, don't be surprised if developers create or use tools to optimize their changes for the metrics rather than add value to the codebase.

See [https://en.wikipedia.org/wiki/Cobra_effect](https://en.wikipedia.org/wiki/Cobra_effect)</comment>


Strategies for implementing user authentication in serverless applications - <AUTHOR> https://serverless.com/blog/strategies-implementing-user-authentication-serverless-applications/ <comment><USER2> I find it slightly bemusing to hear JWT called "a growing favorite for serverless projects". I thought we'd past the favourites phase years ago and now we're on to the backlash phase.

Or maybe that's just HN?

<comment><USER3> Not sure what there is to backlash against with JWT, when implemented correctly.

<comment><USER4> One of the biggest issues is revocation, i.e. you can't. Sure, you can always keep track of JWTs and refuse to accept ones that have been revoked, but congratulations, you've just invented session tokens (albeit more complicated).

<comment><USER5> A slightly more sensible revocation scheme would be to keep a counter attached to the user in the database. For the cost of a single int in your database you can bulk invalidate all the tokens for a specific user: just increment the counter and make sure to not accept tokens with the counter too high or too low.

But yeah at that point you might as well go for session tokens as you need a db request anyways.</comment></comment></comment></comment>


Java Was Strongly Influenced by Objective-C - <AUTHOR> http://cs.gmu.edu/~sean/stuff/java-objc.html <comment><USER2> Wow, a pointer to an old page of mine, that's weird to see on HN. This post was originally from comp.sys.newton.misc, back when I was a PhD student. Here was the thread:

[https://groups.google.com/d/topic/comp.sys.newton.misc/Kb0Jo...](https://groups.google.com/d/topic/comp.sys.newton.misc/Kb0JoVv2ljA/discussion)

The discussion was originally about Java on the Newton, and someone had made the goofy suggestion that Java was based on NewtonScript. Patrick Naughton jumping in was an interesting ending to the thread.

As a side note: four years later I actually wound up writing the only version of Java released on the Newton (Waba).

<http://cs.gmu.edu/~sean/projects/newton/waba/>

<comment><USER3> That is quite cool! I wrote a JVM for the PalmPilot in 1998:

<http://www.cs.utah.edu/~mcdirmid/ghost/>

Lots of fun fitting the 1.0.2 class libraries into 180K (out of 256K available, needed some space to run in!).

</comment></comment><comment><USER4> Well Objective-C was influenced by Smalltalk, and nearly every modern OOP language was also heavily influenced by Smalltalk. And of course there has been over the years a lot of cross-pollination between Smalltalk and Java. Hotspot was written by the team that had originally marketed a Smalltalk VM, Gilad Bracha co-authored the JVM 2.0 specification and was also involved in the Strongtalk Smalltalk implementation, and of course one of the key developers of Hotspot, Lars Bak, is now working on Dart which is basically Smalltalk with Javascript syntax.

<comment><USER5> I can't help but think that ARC has pretty much killed garbage collection. Why use garbage collection at all when you have a static equivalent that works just as well?

<comment><USER6> ARC is terrible, I've had far more errors with it than I ever did without.

<comment><USER7> Do tell, please.

</comment></comment></comment></comment><comment><USER8> Which is why Objective-C++ is so much fun to have available in your Mac/iOS programming toolbelt: it's the best and worst of two completely different C-derived object-oriented language lineages in one schizophrenic package.

<comment><USER9> It's a terrible Frankenstein monster but it can be pretty useful. My most popular iOS app is a synthesizer with a UI in Obj-C and a DSP core in pure C++. Interfacing the two is pretty trivial thanks to Obj-C++.

I've been considering a port to Android but all the JNI boilerplate I'd have to write is putting me off.

<comment><USER10> I'll agree that JNI is inelegant, but having recently written a small amount of JNI glue with the NDK for a hobby/side project, I have to say, once you get going it won't be a big deal. If that's really the only barrier to an Android port, I say bite the bullet, sit down and do it.

<comment><USER9> I need to do it anyway. I'm taking on more and more Android work and I know sooner or later I'm going to have to dig into the native layer. Thanks for the words of encouragement.

</comment></comment></comment></comment><comment><USER11> So how comes that they missing out all the cool features like "performSelector", "respondsToSelector"? Sure the whole OOP part may comes from Objective-C (SmallTalk to be precise) but the dynamic parts were poorly executed.

<comment><USER12> Not to mention the fact that they completely ignored class methods.

No, static methods do not count.

<comment><USER13> Out of curiosity, why do statics not count for class methods?

<comment><USER14> They are closer to global functions that are attached to classes and don't support inheritance the same way as instance methods. e.g. if a subclass implements a static function with the same signature as its parent, and you call it with the parent class, it invokes the parent class version instead of the subclass version.

Class-side methods in Smalltalk are inherited, working with classes (as an object) is analogous to how instance-side methods work with instances (also objects). So e.g implementing and using factory methods are simpler in Smalltalk and similar languages.

Edit: grammer and typos.

</comment></comment></comment></comment><comment><USER5> That might explain its complicated syntax. Better than obj-c but worse than nice languages like Ruby or Python.

Also, if they were influenced by Obj-C then why on earth didn't they bring over the by far most useful feature of the language, caegories?! Or maybe categories were a later addition?

I have been developing Java for 15 years and ObjC only for two but categories are seriously the best thing since sliced bread. Anything missing in the libraries? Just add it!

<comment><USER9> A lot of the newer JVM languages provide better equivalents to Obj-C categories. Most of them also let you mix in instance variables along with methods. Check out Scala or Kotlin for specific examples.

<comment><USER15> Objective-C categories nowadays can include instance variables :-)

<comment><USER9> Really? Since when? Do you have a link to docs? I've seen some hacks involving associated references but it was my understanding that categories were not allowed to add instance variables because Apple would have to make member access much slower to allow that kind of extension.

<comment><USER15> My bad: they are allowed in class extensions, which are similar to but not the same as categories.

Given how the new non-fragile ivars are implemented, it _should_ be possible to add ivars anytime before the first instance is created (so load time should be OK), but that has apparently not been implemented, class extensions only work for code compiled together.

So I guess no dice, apart from associated objects or the old indexed-instance- variable tricks:

[http://markmail.org/message/b5aqssv3iowcsw2i#query:+page:1+m...](http://markmail.org/message/b5aqssv3iowcsw2i#query:+page:1+mid:b5aqssv3iowcsw2i+state:results)

Alas, those tricks break on bridged CF classes that have incorrect metadata:

[http://markmail.org/message/yourm4nkghaf3bak#query:+page:1+m...](http://markmail.org/message/yourm4nkghaf3bak#query:+page:1+mid:pb57oyiiyp3vfomn+state:results)

(Checked on 10.8, instance-size for CF objects still incorrect)

</comment></comment></comment></comment></comment><comment><USER16> Fascinating that this snippet is from comp.sys.newton. I've forgotten all my NewtonScript, but do remember the richness of the Newton programming model.

</comment><comment><USER17> I'm twenty-one and the email referenced something called "Excited Live". Can anybody explain what that was? Google hasn't been much help.

<comment><USER18> Excite Live! was one of the many services (circa ~1996) offered by Excite, which was kinda-sorta like Yahoo (search, web site directory, etc, etc) but is mostly remembered today as the company that could have bought Google for pennies but passed on it.

<http://en.wikipedia.org/wiki/Excite>

<http://www.excite.com>

I briefly worked for Excite entirely by accident, but my tenure there was pretty brief due to an odd situation. I was originally hired by Novo Media Group who at the time was in the final stages of a merger with McKinley (known for the Magellan search engine), and McKinley's Sausalito offices were closer to my home (Novo was in SF and I was living in Marin) so I was located in that office under the assumption that both offices would soon be serving the same company but the deal with Novo fell through, Excite bought McKinley and things got weird and I left.</comment></comment>


3 Reasons Why Virtual Reality Will Kill the Office - <AUTHOR> http://blog.venturepact.com/3-reasons-why-virtual-reality-will-kill-the-office/ <comment><USER2> I have been hearing this pitch since approximately 1995; always five years to mass adoption. Not holding my breath for flying cars, either.</comment>


Alternatives to Amazon EC2 - <AUTHOR>

I was wondering what are the best alternatives to Amazon.
I use both Amazon (past 6 months) and openHosting (past 3 years). OpenHosting has been nice, with the occasional service disruption but really good technical support by people in the know. I am using their old infrastructure (vServer) but they have a new version out that looks cool (KVM). http://www.openhosting.com/cloud-hosting-features/hosting-demo/
What is your preference? <comment><USER2> <http://orionvm.com.au> is cool, easy to use and stupidly fast. (Disks 60% faster then a raid 10 of 15K SAS disks, #1 in a whole suite of benchmarks <http://orionvm.com.au/blog/3rd-Party-Performance-Benchmarks/>)

Currently Australia only, although if you are in the US and find it interesting, email me.

</comment><comment><USER3> Linode, if you don't need the cloud way of doing things (it is much harder to create your own image and use it on multiple servers, though doable it isn't the recommended way).

Things like stackscripts and on demand servers make it closer to the cloud style but not really. They are a good VPS provider with good support and reliability.

<comment><USER4> upvote for linode, I'm using them for my personal server for over a year and I'm very satisfied.

They have an API for which you have documentation, stackscripts and other goodies, try it out.

You can go with slicehost as well, although I haven't tried them.

</comment></comment><comment><USER5> <http://www.softlayer.com/> seems to be a good provider. Haven't used them as yet but will be making the switch from Amazon as soon as all of my instances are up.

</comment><comment><USER6> I'm a rackspace guy.

<comment><AUTHOR> What is it that you like about rackspace?

I have never tried them, but they seem pricey, and I get the feeling that when you try to get technical support in this very big providers you deal with some intern or temporary worker who has been there for 6 months, not the people who set up the datacenter from the ground up.

Also small companies know their only chance is to never loose a customer.

<comment><USER7> Rackspace support leaves much to be desired but it's 100x better than even Premium EC2 support (in my experience).</comment></comment></comment>


Countdown to Mars Curiosity Rover landing - <AUTHOR> http://mars.jpl.nasa.gov/msl/ <comment><AUTHOR> 21 hours 6 minutes as of this submission. Now closer to Mars than the Moon is to the Earth</comment>


SpyPhone: See how your Apple iPhone privacy can be violated - <AUTHOR> http://seriot.ch/blog.php?article=20091203

<comment><USER2> >[2009-12-15] I'm glad to announce that I will be presenting an enhanced version of this talk at Black Hat DC 2010.

The bigger scandal would be if this vulnerability hasn't been fixed at this point, almost a year later.

</comment><comment><USER3> I doubt apple would approve malware in the app store.</comment>


The Myth of America's Tech Talent Shortage - <AUTHOR> http://m.theatlantic.com/business/archive/2013/04/the-myth-of-americas-tech-talent-shortage/275319/ <comment><USER2> > That, they say, boosted both wages and employment for U.S. born scientists > and engineers. There were undoubtedly winners and losers; while average > salaries rose, some older Americans almost certainly gave up their jobs to > younger immigrants with fresher skills. But if the paper is right, that > price seems worthwhile in the grand scheme of things.

I'm sure those _older Americans_ also agree the change was worthwhile.

Why wouldn't those _older Americans_ not be happy with the fact they've lost your job, safe in the knowledge their former company is now making an increased profit selling their job to a younger, cheaper imported worker.</comment>


France's Data Protection agency issues their maximum monetary penalty to Google - <AUTHOR> http://www.cnil.fr/english/news-and-events/news/article/the-cnils-sanctions-committee-issues-a-150-000-EUR-monetary-penalty-to-google-inc/ <comment><USER2> €150,000 is a drop in Google's ocean.

Better would be to fine any public company a percentage of their market cap or something comparative that matches the fine to the size of the company.

That would provide a true penalty that discourages large multi-nationals from abusing local laws.

<comment><USER3> In US dollars, roughly $200,000. This action probably cost the French government more in bureaucrats' salaries than it got from Google.

If the fines are this small, it's pretty clear that the legislators who passed this law were not interested in creating a serious deterrent.

<comment><USER4> It's possible that they didn't knew what they were after... Also we should not underestimate the power of stupidity, in all ranks of society.

<comment><USER5> They implemented a 'cookie directive' where websites are supposed to ask permission to set cookies. They not only didn't know what they were after, they had no idea how to get there or where they were starting.

</comment></comment></comment></comment><comment><USER6> That would be a very harsh penalty for me. I'm not sure if my dry cleaner would survive a fine like that either, but I'm not sure about their cash reserves.

</comment><comment><AUTHOR> Just a note: 150,000€ is indeed the maximum penaltly allowed by law for this, see [http://www.legifrance.gouv.fr/affichTexteArticle.do;jsession...](http://www.legifrance.gouv.fr/affichTexteArticle.do;jsessionid=6BC8BF44AE3B0026A0D3466947518B0C.tpdjo05v_3?idArticle=LEGIARTI000023784589&cidTexte=LEGITEXT000006068624&dateTexte=20140108)

</comment><comment><USER7> Google's right to fight these charges. Things like the EU cookie directive are stupid laws that allow legislators to pretend to be doing something but do nothing beyond making websites less user friendly.

<comment><USER8> Which of the four requirements listed do you object to?

<comment><USER9> All of them. This is outrageous. Nobody is forced to use Google and their privacy policy is Google to decide and their users to accept or not, no government intervention is needed. The only party that should be fined is the French government for spying on its citizens without their consent and with total disregard for the citizen privacy rights using the French version of the prism program.

<comment><AUTHOR> says the guys who surely have read all the privacy policies he supposedly agreed to… right?

<comment><USER9> So what? I chose to agree with the policy. The state doesn't have any right to get into my decision to agree willingly to a legal contract with another private party. This is just legal State racket at work, and hypocritical on top of that when the government is the only one here spying on me without my content. Screw them. This despicable government that doesn't create anything but debt and harasses people who are actually trying to work and racket innovators who actually create value instead of debt. Maybe if Google went bankrupt, they'd get some money from the state, but Google being innovating and profitable? This is unacceptable for the State and it just has to racket them and punish them for being successful. I'm disgusted by my government who by the way tonight just voted for a law that forces amazon to charge more for its books so retail can compete. Yeah, really, screw them. I don't need their "protection", I just want the State to let us be.

<comment><USER10> The state has exactly the right to regulate contracts. We don't actually live in the libertarian dream you are pretending we do. Many people like to live in a democracy where money is not the only form of power, but where _votes_ are powerful too.

<comment><USER9> > We don't actually live in the libertarian dream you are pretending we do.

What? Our constitution already protects our rights to freely sign legal contracts between each others. Since when is that a libertarian thing? TIL.

> Many people like to live in a democracy where money is not the only form of > power, but where votes are powerful too.

Who's talking about money? People are already free to accept or not their contract with Google. What you want is allow people to vote for other people to be forbidden to sign a contract of _their_ choice with Google, you want people to vote to restrain other's freedom. That's the opposite of freedom and what our constitution is about.

<comment><USER10> Which country's constitution are you referring to? In any case, the government clearly has the right to regulate what contracts can be legally entered into.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> How much damage was caused by Google? What amount($) of damage? Did citizens complain in court? Who was hurt? Is this punishment "just in case" Google becomes Evil? In contrast, governments have a proven track record in this domain, and the french gov just passed new laws _against_ online privacy that even the NSA wouldn't dare dream of. Guess what? People talk about Google, not about these laws.

<comment><USER12> You generally don't sue to protect these rights, you complain to the data protection authority.

<comment><USER11> Google is no evil. They don't misuse data. But they got fined.

Spammers all around the world are evil. They misuse data. The CNIL should fight them. Governments are evil. They collect and misuse data. The CNIL should protect us.

But the CNIL doesn't. It just wastes public money. They go after Google because it's so easy. The government needs a get-rich-fast scheme: CNIL sues Google.

They're not here to make things better or protect us. They just "do their job" but they do it in the most stupid way.

</comment></comment></comment><comment><USER13> Frankly, I'm not sure why Google puts up with France's shit anyway. I would have thrown my hands up with that news snippet thing and simply stopped using the news snippets or listing those news sites in France. After those sites saw a massive drop in traffic, I'm sure they'd leave Google alone. For a little while, at least.

</comment><comment><USER14> Fixed fines are silly, make it a percentage of revenue or profit. Give them a real incentive to change.

This sort of thing is done with speeding fines in several countries (link: [http://www.digitaljournal.com/article/295905?tp=1](http://www.digitaljournal.com/article/295905?tp=1))

<comment><USER15> >Fixed fines are silly, make it a percentage of revenue or profit. Give them a real incentive to change.

What do you think Google's claimed revenue/profit in France would be, in that case?

</comment></comment><comment><USER16> EU: next time when you make a law, allow a penalty of 150,000,000 Euro for starters. After repeated violations increase to 1,500,000,000 . Double each year. Then Google will listen.

</comment><comment><USER17> Oh I don't know how it is a _penalty_.

<comment><USER18> it doesn't even come to close to the "cost of business".

</comment></comment><comment><USER19> Let them search cake is likely the response.

</comment><comment><USER20> holy cow, that's not even 3 people's salary. who thinks that's going to be effective?</comment>


Students' Understanding Of The Equal Sign Not Equal - <AUTHOR> http://tamunews.tamu.edu/2010/08/10/students%E2%80%99-understanding-of-the-equal-sign-not-equal/

<comment><USER3> I don't recall ever in my life seeing a math equation with an empty parenthesis on one side.

Is this some American method of teaching math? It's bizarre.

<comment><USER4> I don't think it is. From my own recollection the usual notation would be more like:

4+3+2 = ? + 2 or 4+3+2 = _ + 2

Along with instructions asking something like "What number would make this true?" And usually it wouldn't be so trivial (though still not difficult, except perhaps at the time):

4+3+2 = _ - <USER2>

Maybe it's just Texas?</comment></comment>