Ask HN: Frequent "Apple ID locked for security reasons" - <AUTHOR> Every couple of months (three times in the last half year) I get a message out of the blue on my MacBook or iPhone that my Apple ID has been blocked for security reasons. I can then reset it (using two devices, or one device and a "trusted" phone number), so it's just an annoyance. But was wondering a) whether others experience that, b) whether it could be used by malicious actors as a denial-of-service attack. <comment><USER2> Shahid Kamal Ahmad (game developer, used to work for Sony) complains about took Twitter all the time, including this morning. He's never been able to get to fixed.

[https://twitter.com/shahidkamal/status/977235204380286976](https://twitter.com/shahidkamal/status/977235204380286976)

</comment><comment><USER3> I haven't really experienced it as much as you. I do wonder if you use a VPN. That might throw some red flags if you are logging in from various places. I know GMail has this issue for me when I am on a VPN.

<comment><AUTHOR> Interesting point, I frequently use VPNs.

BTW, I found another developer complaining about it:

[https://invalidpatent.wordpress.com/2016/12/08/how-an- attack...](https://invalidpatent.wordpress.com/2016/12/08/how-an-attacker-can- lock-you-out-of-your-icloud-account/)</comment></comment>


Show HN: Displayplacer – macOS cmd line util to configure multi-monitor layouts - <AUTHOR> https://github.com/jakehilborn/displayplacer <comment><AUTHOR> This one's for the multi monitor devs using macOS.

macOS regularly forgets my pixel perfectly aligned monitor layout. I wrote displayplacer so that I could describe and apply monitor layouts (resolution/orientation/positioning) through the terminal. Now, upon plugging in, if my displays are all mixed up I hit a hotkey mapped through BetterTouchTool to apply a displayplacer profile.

Under the hood this is using Quartz Display Services to manipulate the displays. Let me know if this is useful and if there's any feedback.</comment>


Ask HN: Please review my project, Done.io - <AUTHOR>

Done.io (http://done.io) is yet another task manager (it was previously called pat.io and was reviewed here ~1 year ago). Since then it's gotten a full API, a way better UI and name, and some needed functionality.
It introduces the idea of "shifts", items that you need to do but don't want to worry about right now. I find it works very well as an adjunct to other, more full-featured systems, as my "stuff I really need to worry about right now" list.
Enjoy, and thanks. <comment><USER2> Hotlink: <http://done.io>

You don't even sell me on your product before you attempt to get me to sign up.

How about

\- a features page (ala <http://gridspy.co.nz>)

\- a public demo todo list (perhaps anyone can make public todo lists)

\- the ability to create a list using only cookies and no sign up

Suffice to say I didn't sign up. Do you really need my email?

</comment><comment><USER3> Your site is missing a "Take a tour" page. You need to at least include some screenshots of the product or a video. Also, how is your product different from other task managers like Remember The Milk?</comment>


Congress considering fining car hackers $100K--maybe even if they own the car - <AUTHOR> http://qz.com/526908/congress-is-mulling-whether-to-slap-100000-fines-on-americans-who-hack-cars-maybe-even-if-they-own-the-car/ <comment><USER2> Congress is stupid and wants to fine wrong dudes. It should fine car _producers_ $100,000 for every hack on a car.

</comment><comment><USER3> Good news for the likes of Volkswagen I guess</comment>


My First ROR app: Comments/Suggestions Appreciated - <AUTHOR> http://wisbit.akeelali.com/

<comment><USER2> can barely see the text.

<comment><AUTHOR> Thanks for the feedback. I'm assuming you're referring to the book/category list (which requires a hover to turn blue). I will change that. Thanks again!</comment></comment>


Cyclist Deaths in New York City: Accident or Crime? - <AUTHOR> https://www.nytimes.com/2019/08/21/nyregion/bike-deaths-nyc.html <comment><USER2> > Umar Baig barreled through a red light at a terrifying speed and T-boned an > S.U.V., sending it flying across the street into José Alzorriz, a > cyclist,(...) killing him instantly.

> Mr. Baig, 18, has not been charged.

> Running a red light alone is almost never considered reckless driving, even > though in Mr. Alzorriz's case, it had fatal consequences.

Not being a US resident, this is unbelievable to me. Is this only NY or all states?

Compare with France:

\- A person who kills someone while driving a car is automatically charged with involuntary manslaughter: the killing implies the driver's recklessness

\- The penalty for involuntary manslaughter is up to three years in prison; if the driver was willingly reckless (for instance, deliberately ran a red light), the penalty is upgraded to five years

\- The only way to exoneration is proving that the victim was blatantly reckless themself or suicidal: if someone jumps right in front of your moving car, for instance

<comment><USER2> Article was updated:

> Mr. Baig, 18, was arrested on Wednesday and charged with manslaughter.</comment></comment>


Versioning Your Home Directory - <AUTHOR> https://martinovic.blog/post/home_git/ <comment><USER2> For dotfiles I use the workflow from this comment [https://news.ycombinator.com/item?id=11071754](https://news.ycombinator.com/item?id=11071754) with a keybase encrypted repo

<quote> I use:

        git init --bare $HOME/.myconf
        alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'
        config config status.showUntrackedFiles no

where my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal commands like:

        config status
        config add .vimrc
        config commit -m "Add vimrc"
        config add .config/redshift.conf
        config commit -m "Add redshift config"
        config push

And so one…

No extra tooling, no symlinks, files are tracked on a version control system, you can use different branches for different computers, you can replicate you configuration easily on new installation. </quote>

<comment><AUTHOR> This is a pretty great approach, I agree. My version does not offer you a way to easily use multiple repositories.

I will probably have to use this approach at some point as my config continues growing.

</comment></comment><comment><USER3> I used to do this (using CVS, at the time), for keeping the configs and projects on my desktop and laptop in sync, as well as for having backups. Quick small notes:

* I split everything into topical modules, which were immediate subdirectories of the home directory, partly so the little laptop didn't have to install everything.

* There was a "config" directory that included most of the typical home directory dotfiles, as well as things like fonts. It had a small shell script in it, for keeping symlinks from the home dir up to date (e.g., "~/.bashrc" was a symlink to "config/bashrc".

* Not everything was in CVS. Photos, for example, were backed up separately.

* It was good to have my server Internet-accessible, since a few times I'd walk for an hour to work from my laptop, and realize I didn't have the latest version of my code.

* Nowadays I would probably use Git, only for the sake of standardizing, but the simple model of CVS was nice for this purpose. (I also knew many other fancier SCM systems, but intentionally went with a simple one.) Also, the repository was just in RCS format (files with reverse deltas of diffs), so, on rare occasions that I made an oops (like accidentally committed a huge file I didn't intend to), I could just SSH in and fix it manually.

* I had various servers for this over time, starting with my desktop, and then a PC in the closet, then a colo server, and then (my favorite) a small home RAID server I made from a fanless Atom board and Debian (which was effectively silent, running years 24/7 before I finally took it out of service, still working; one drive had to be replaced during that time, but was RAID mirrored).

</comment><comment><USER4> That's probably the worst possible way of versioning your home besides, possibly, making a zip of your whole home directory every time you would otherwise to a commit.

Just use a snapshot-enabled filesystem. ZFS works awesomely, BTRFS too (but it's not released as stable and production ready AFAIK) and LVM can have snapshots too (take a look at the snapper project by Red Hat).

Just use ZFS and snapshot the whole filesystem.

<comment><USER5> How would you transfer a snapshot to another machine? That's the use case.

<comment><USER6> There's always zfs send and zfs receive, but these don't work automatically.

<comment><USER7> The ZFS tools don't really cover the case of ignoring a bunch of transient files in your home directory that you don't want to sync around. Things like browser temp files, etc.

<comment><USER4> You know, this aspect of versioning a home directory is basically why home directories aren't versioned very often.

That being said, if you want to "version your home directory", I think that zfs is the best approach.

Also, transient files and browser temp files should reside on /tmp AFAIK... So that's less of an issue. If you application is writing temporary files outside of /tmp, then it's probably a bug.

<comment><USER7> Take your chrome browser history. That doesn't really belong in /tmp, but it's also not something that's going to sync around well with zfs, either.

</comment></comment></comment></comment></comment></comment><comment><USER8> Just use yadm, it's far less effort than trying to do it manually with git.

[https://yadm.io/](https://yadm.io/)

</comment><comment><USER9> The vcs-home website has more tips for version control of home directories:

[https://vcs-home.branchable.com/](https://vcs-home.branchable.com/)

<comment><USER10> vcsh + mr works well for me.

One feature of this pair (unique to them?) that I find useful is the ability to apply different subsets of my repos to any given account's home directory.

</comment></comment><comment><USER11> I use a combination of GNU stow and keybase's encrypted git repos to store my dotfiles. It works pretty well and ensures I don't have to maintain a gitignore.

</comment><comment><USER12> I use Dropbox to sync my home directories across machines. I specifically want them to sync but _not_ version. The reason is that I'll be working on one machine (say at the office), want to continue typing and testing on another machine (say at home), and specifically do NOT want to commit in the half- finished erratic state things may be in.

Dropbox deals with syncing across machines on in instantaneous basis so that all machines have the same thing at every instant, allowing me to change location or machine and keep working. Git deals with versioning.

<comment><USER13> Be careful with git repositories shared in Dropbox in this manner. If you are running an ide on multiple machines, the idle ones might do some crazy things to your .git tree. You can look for signs of trouble by running "find .git/ -name ' _conflict_ '".

<comment><USER12> Yep I've had this happen before. I'm usually careful to close IDEs but 99% of the time I just avoid IDEs. In the worst case I just copy in-progress source files and re-clone the repo. I don't really have a good alternative to a syncing folder across locations.

<comment><USER13> I've set up scripts that periodically grab my working state (unpushed commits, stage, and local diffs) for certain git working trees and push the changes to a directory in Dropbox.

The scripts also do a periodic "git fetch origin" in a broader set of local git repositories, so I usually have up-to-date code locally even if I haven't been keeping things synced manually.

</comment></comment></comment></comment><comment><USER14> Meh. I treat my home dir as a scratch space and symlink important things to version controlled and synced subdirs.

Too many things come and go to justify a git workflow to me. And git ignoring wide swaths of private data seems haphazard at best.

</comment><comment><USER15> It's not perfect, but IMO yadm ([https://yadm.io/docs/overview](https://yadm.io/docs/overview)) significantly improves some of the git tedium here.

It's like discovering that there's a special type of hammer just for the task you're doing. You know hammers. You hit lots of things with hammers. The new hammer is a little different, and to be honest you could make do with the old hammer in a pinch, but once you've spent a little time pounding away with the _right_ hammer, you may suspect the world needs more types of hammer.

</comment><comment><USER16> A simpler solution would be to use SRC for the individual files for which you wanted versioning.

[http://www.catb.org/~esr/src/](http://www.catb.org/~esr/src/)

</comment><comment><USER17> I backup to B2 using Restic. It dedupes while also storing each version with a tag. It's not as fancy as git with the diffs... but my home dir is full of git repos and they are backed up of course.

You can mount your whole backup using FUSE and browse around, or restore to some other directory. Multiple computers? Multiple folders to backup? All handled. It's got ignore/include for your binaries and bundled dependencies and whatnot.

Edit: encrypted by default.

</comment><comment><USER18> I used to version whole home directory, turned to stow + dotfiles recently, reasons:

1\. maintaining .gitignore is kind of annoying.

2\. I don't need all my configuration files on some machines, say a remote sever, you can just stow what you need instead of adding many files to your home.

3\. it's not convenient setting up an environment when you already have many files in home, for git clone to a directory not empty is not allowed.

<comment><USER19> my .gitignore is set to ignore everything with a wildcard and un-ignore a few hidden directories where i'm likely to place new files (e.g., .vim, .zsh)

</comment></comment><comment><USER20> I have gone one step further for my computers at home (a desktop and a laptop) and have put most of the stuff in my home directory in a git repository, not just configuration files. That way I keep those two synchronized. The thing I do not have in the git repository is media files because they are too large. Instead I just backup the media files about twice a year.

<comment><USER21> For media files, git-annex [1] is really great. It makes it easy to create redundant backups by cloning the repo on additional devices and using annex to sync the content across all of them from a single worktree.

[1] [https://git-annex.branchable.com/](https://git-annex.branchable.com/)

</comment></comment><comment><USER22> I don't like the idea of putting your whole home directory under git.

First of all for most files manual versioning is overkill; you probably only need to share them and for that something like for Dropbox or Syncthing; this together with a file system that supports snapshots gives you most if not all that you need with much less work (no commits).

There are also some things that I don't want to share between computers for a reason or another (for example, some of my ssh keys). I know I can use .gitignore, but I prefer the opposite approach (state what I want to include, not exclude).

I do version my configuration scripts, but I keep them in a subfolder and symlink them to their proper place. This also allows me to selectively decide what should be shared on a given machine and what not.

</comment><comment> matt-snider I previously tried configuration management using various techniques. First the plain home git repo, then rcm [1], then briefly stow.

What I found, is that while these systems all worked reasonably well, I ended up writing out several manual steps in README files (e.g. install packages xyz, create user/group, create directory, enable systemd unit, replace {some_template_var} in fileX before copying, etc).

Ansible seemed like a reasonable solution so I switched to that and it's worked out very well for me.

Pros: \- all steps can be encoded as config (config-only updates can still be run using tags) \- a fresh install can be ready to use in minutes

Cons: \- overhead encoding copy operations \- slower then alternatives if just updating config (e.g. stow or rcm)

</comment><comment><USER23> I use this: [https://github.com/holman/dotfiles.git](https://github.com/holman/dotfiles.git)

Dotfiles are stored in git, and run a script that creates symlinks to those dotfiles

<comment><USER24> I do something like this, but I lean on GNU Stow[1] to manage the symlinks.

My ~ directory tree, early on in setting up a new system, might look like:

        ~/
          .config/
          dotfiles/
            i3/
              .config/
                i3/
                  config
            zsh/
              .config/
                zshenv.d/
                  README.txt
              .zshenv
              .zshrc

When I want to use a package, I cd to ~/dotfiles and run:

        stow zsh

Running that sets up symlinks rooted one directory above, ~. Now ~ looks like:

        ~/
          .config/
            zshenv.d/ -> ../dotfiles/zsh/.config/zshenv.d/
          dotfiles/
            (as earlier)
          .zshenv -> ../dotfiles/zsh/.zshenv
          .zshrc -> ../dotfiles/zsh/.zshrc

Because ~/.config already existed, stow made the zsh symlink inside it. If ~/.config hadn't existed, stow would have symlinked it from ~/dotfiles/zsh.

To remove the symlinks stow set up:

        stow -D zsh

I did eventually set up a wrapper script to pass a few default arguments to stow, to ignore certain files I use for documentation. But stow does all of the work of managing the symlinks.

[1]: [https://www.gnu.org/software/stow/manual/stow.html#Introduct...](https://www.gnu.org/software/stow/manual/stow.html#Introduction)

</comment></comment><comment><USER25> My home directory is currently dotfile hell. I can't think of any reason to implement version control that outweighs the time and effort it would take to properly clean and maintain the directory.

</comment><comment><USER26> I use chezmoi. Better than symlink hell, cleaner than this.

[https://github.com/twpayne/chezmoi](https://github.com/twpayne/chezmoi)

</comment><comment><USER27> In Windows this happens by default with File History.

It also supports automatic backups to an external storage.

</comment><comment><USER28> For dotfiles, a good workflow seem to have a git/hg repo and combine it with GNU stow.

[http://brandon.invergo.net/news/2012-05-26-using-gnu-stow- to...](http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage- your-dotfiles.html)

<comment><AUTHOR> Just learned about GNU stow. It's a very useful tool.</comment></comment>


What is happiness? - <AUTHOR> http://happydays.blogs.nytimes.com/2009/05/25/happy-like-god/ <comment><USER2> Happiness is not worrying about being happy. To quote a the Baz: "If you succeed in doing this, tell me how."</comment>


TEDx – Do you really know why you do what you do? - <AUTHOR> https://www.ted.com/talks/petter_johansson_do_you_really_know_why_you_do_what_you_do/ <comment><USER2> I imagine the police could easily do the same thing on a suspect lineup, or when eliciting a description.</comment>


Show HN: Amon – Hack accounts using oauth tokens - <AUTHOR> https://github.com/captn3m0/amon/

<comment><USER2> I think supporting single sign on services like this: [https://github.com/ojarva/sso-frontend](https://github.com/ojarva/sso- frontend) might be beneficial.</comment>


Operating Systems: Three Easy Pieces - <AUTHOR> http://pages.cs.wisc.edu/~remzi/OSTEP/ <comment><USER2> Using this textbook right now for my grad-level OS class (I'm a student). Definitely one of the most readable textbooks I've ever used -- the authors actually try to impart some personality into the writing. I'm not 100% sold on how they divide the book into 3 parts -- virtualization, concurrency, persistence -- since not everything in an OS fits precisely into one section (e.g., multi-core scheduling is in virtualization but could also fall under concurency). Still, for the price (free/$10 enhanced PDF/$22 softcover) I'd heartily recommend this book to anyone, and I hope it quickly becomes _the_ standard OS book.

</comment><comment><USER3> I love this book so much. It is a treasure. You can tell from the text the Remzi and Andrea are natural educators, and their sense of humor makes you want to read more.

Years ago when I used this book, I was blown away by the clarity and concision of their explanations for non-trivial technical content. In particular, their treatment of scheduling stuck out to me. To my knowledge, no other OS textbook explains scheduling in such an intuitive way -- the typical treatment is more like "meh, here's the zoo of scheduling algorithms". In this book, they start with a long list of workload assumptions, and discuss the optimal scheduling policies under these assumptions. As they relax assumptions, the optimal scheduling policy changes.

Also, OSTEP seems to be in a better position to solicit feedback from readers / professors using the book than other operating systems textbooks. Remzi was quite prompt and appreciative when I sent some suggestions.

</comment><comment><USER4> It's not clear from the headline, but version 1.0 of the book has just been released:

[http://pages.cs.wisc.edu/~remzi/OSTEP/combined.html](http://pages.cs.wisc.edu/~remzi/OSTEP/combined.html)

Available on Amazon as of today.

</comment><comment><USER5> 2015: [https://news.ycombinator.com/item?id=10182727](https://news.ycombinator.com/item?id=10182727)

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

</comment><comment><USER6> I've been studying Real-time operating systems (RTOS) and it's fascinating. While they're incredibly basic, they offer a stepping stone into larger more complex systems with file system, multi core, etc. RTOSes emphasize on "real- time" or predictability while general operating systems, they focus on throughput.

I recommend looking at FreeRTOS source code or building one from scratch.

</comment><comment><USER7> I took the class this textbook is used for a couple of years ago at UW. Andrea was a fantastic teacher and it was the easiest presentation of the material I'd ever found! Seriously, read this textbook. It's full of wit and information.

</comment><comment><USER8> This is a really really good book on Operating Systems. Before this I had read ([http://codex.cs.yale.edu/avi/os-book/OS9/slide- dir/index.htm...](http://codex.cs.yale.edu/avi/os-book/OS9/slide- dir/index.html)), which is itself a really good book, but this one seemed more funnier and less dry, and I think reading two OS books gives you a little different perspective from each.

<comment><USER9> I was looking for the dinosaur os book in this thread!

</comment></comment><comment><USER10> This is the best book on os handsdown. Does anybody know smiliar kinds of books for computer science subjects

</comment><comment><USER11> Surely this is some kind of joke.

What, a college textbook that doesn't require the purchase of a new edition every year, or local insert that isn't part of the public text, or online homework code? Yeah, right.

<comment><USER12> This was my profs book: [http://linear.ups.edu](http://linear.ups.edu)

I still ended up buying the hardcopy, but it was nice having it online for free.

Sophomore year of college I released that I could buy a nice iPad, torrent my course books, and come out ahead.

The online homework code is such a racket.

</comment></comment><comment><USER13> I took Remzi's (one of the authors) advanced os course when I was in Wisc as a graduate student 8 years ago. I would say it's the best course I've ever had.

</comment><comment><USER14> I took this course at UW undergraduate and it was by far the most important and enjoyable class I took in college.

Always read the footnotes in the text ... they are hilarious.

</comment><comment><USER15> I've used it for my university course regarding OS. But after the theorical approach I've found incredibly useful to work directly with the OS-level code (JOS OS, pretty fun), if someone is interested: [https://pdos.csail.mit.edu/6.828/2012/](https://pdos.csail.mit.edu/6.828/2012/)

<comment><USER16> Oh neat, JOS is an exokernel I haven't seen before.

<comment><USER15> Virtual Memory Management seems like magic before looking at the code, that feeling remains a little bit even after gazing at it if you ask me :)

<comment><USER16> Yeah, exokernels tend to do VM management in a more split way than you might see in other OSs that might be obfuscating the underlying concepts. I'd take a look at how xv6 does it, as that's about as simple as it gets.

</comment></comment></comment></comment><comment><USER17> Hands down one of the best textbooks on a CS topic that I have read. It was actually FUN to read. If your trying to get started in OS fundamentals and such this is a great book to start with.

</comment><comment><USER18> I bought and read the hardcover (0.91) and it was great, but the new version has enough new stuff i wont feel bad buying another softcover copy, while happily supporting the authors.

</comment><comment><USER19> One of the best CS textbooks I've ever read. I recently reached out to my OS prof because I couldn't remember the title. Funny to see it posted on HN a couple days later.

</comment><comment><USER20> From a few days ago: [https://news.ycombinator.com/item?id=18104600](https://news.ycombinator.com/item?id=18104600)

<comment><USER21> You just linked the parent thread. It did come up in a conversation about xv6: [https://news.ycombinator.com/item?id=17592560](https://news.ycombinator.com/item?id=17592560)

<comment><USER20> You're quite right -- mea culpa.

</comment></comment></comment><comment><USER22> I've been reading it in my spare time for a few years now (I read slow). I've thoroughly enjoyed it, and learned a lot.

</comment><comment><USER23> Great textbook

</comment><comment><USER24> This is good!</comment>


BlackBerry Z10 Launches Pre-Order Page returns 404 - <AUTHOR> http://ca.blackberry.com/smartphones/blackberry-z10/buy-preorder.html

<comment><AUTHOR> don't recall Apple or any other major competitor launch follows with a 404 for pre-orders</comment>


Amazon Is Selling Cheap, Real-Time Facial Recognition Technology to Cops - <AUTHOR> https://motherboard.vice.com/en_us/article/3k4dq5/amazon-rekognition-facial-recognition-cops-body-cameras <comment><USER2> Previous discussion [https://news.ycombinator.com/item?id=17126150](https://news.ycombinator.com/item?id=17126150)</comment>


Google demands movie studios comply with subpoenas - <AUTHOR> http://www.businessinsider.com/r-google-demands-movie-studios-comply-with-subpoenas-2015-6http://www.businessinsider.com/r-google-demands-movie-studios-comply-with-subpoenas-2015-6

<comment><USER2> Article seems to have disappeared from businessinsider.com.

Alternate link "[http://www.reuters.com/article/2015/06/02/us-google- subpoena...](http://www.reuters.com/article/2015/06/02/us-google-subpoenas- idUSKBN0OI1XQ20150602").</comment>


SemanticUI – HTML for the simple man - <AUTHOR> https://github.com/nerazzuri/SemanticUI

<comment><USER2> You might want to choose a better name: [http://semantic- ui.com/](http://semantic-ui.com/)

</comment><comment><AUTHOR> Just something i started this morning, so very much in a proof of concept phase...let me know what you guys think.</comment>


Apple Not Able to Open Stores in India Without Selling 30% Locally Sourced Goods - <AUTHOR> http://www.macrumors.com/2016/05/25/apple-retail-stores-in-india-waiver-denied/ <comment><USER2> Before people get out their pitchforks.

These laws in India are a direct result of 200 years of British 'free' trade. Imagine the amount of damage something like NAFTA has done to the american working class - multiply that with 200 years.

While america was in its infancy - before it industrialized - it too used protectionism as a way to allow its local industries to grow, how is it bad if India is trying to do the same thing ?

The indian unemployment/underemployment problem will laugh at the face of the European/American moaning about jobs. Just to give you an interesting statistic - 85% of student loans in India is under water ( compared to 50% in america ).

There was this interesting story of engineers in India accepting jobs as pions ( gaurds/watchmen ) for a miserable 200 dollars salary a month. Could you imagine yourself in that position ? So I do not fault the govt for these laws or else there will be serious civilian unrest.

Indian markets, products and the economy in general is really bad and unsophisticated. There is no way they can compete with american, European and Chinese companies.

Of'course some bureaucrats within the Indian Govt uses this as a way to extract wealth from foreign companies who want to set up shop in India. But that is a corruption problem rather than an argument against the law. Even simple law in India is hard to enforce due to corruption, the reward greatly outweighs the risk.

Hopefully things will improve in India.

<comment><USER3> I'll add that America is the most protectionist country according to Credit Suisse: [http://www.businessinsider.in/The-country-that-imposes- the-m...](http://www.businessinsider.in/The-country-that-imposes-the-most- restrictions-on-trade-might-surprise-you/articleshow/49170319.cms) (Couldn't find link to original report)

Worked out well for America. Protectionist laws are a legitimate tool for social and economic progress.

<comment><USER4> Your links cites a report that itself gets its numbers from the "Global Trade Alert," which is an org that aggregates a variety of trade-related actions published by the governments of each country. _Only a fraction of these are actually related to governments being protectionist._ A huge number of these "actions" appear to be _petitions by companies_ inside a country for trade investigations against other companies or nations. Another big chunk appear to be listings of every law enacted that gives even a few million to some factory in a given nation. Not unsurprisingly, the aggregator just lists a bunch of state laws in the US.

The fact that America, with its very transparent political/legislative/corporate-grievances system would be recorded more often by this aggregator, is not surprising. In other words, this aggregator is going to be biased to record more trade-related events coming from more transparent nations that have more corporations located inside of them, and whose corporations will tend to try to resolve their trade disputes in the courts.

But I guess you couldn't be bothered to investigate the numbers when you could just cite BusinessInsider.

<comment><USER3> Argonaut, are you suggesting that the chart shows transparency of nations?? That's inferring a lot from one chart :) I don't think America is the most transparent country in the world.

Credit Suisse did the research and reported the chart+numbers.

From Global Trade Alert's website: 'Global Trade Alert provides real-time information on <i>state measures</i> taken during the current global downturn that are likely to affect foreign commerce.' It is not a list of petitions by companies.

Here's the original report from CS: [https://doc.research-and- analytics.csfb.com/docView?document...](https://doc.research-and- analytics.csfb.com/docView?document_id=x657558&serialid=CKNMlWfHjw7rZyk%2BUGmvnQWrpsyCCwGev4oQ/ngdrE8%3D\(Chart) appears on page 20)

And Trump is all about protectionism. If America wasn't the most protectionist country before, it certainly will be very soon.

<comment><USER4> Credit Suisse just copied the numbers from Global Trade Alert. Did you even look at the reports on the Global Trade Alert website? Or did you just read the "About" page?

Mentioning Trump is just FUD and indirection. You can mention him if he's elected and if he manages to enact protectionist policies.

<comment><USER3> Yes I did look through GTA's site and about us page. I looked at GTA and it's a highly respected research org. And CS is a very competent investment bank. So I do believe their research.

You are attacking a straw man. Find me another data source that refutes GTA and Credit Suisse.

Peace.

<comment><USER4> This is a terrible argument from authority. You didn't actually look at the GTA data, did you? I did, and most of it falls into the categories I outlined in my original comments.

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> > Apple was expected to receive an exemption from the rule, earning a > recommendation from country's Department of Industrial Policy and Promotion, > but the ministry of finance has decided Apple's products do not fall into > the cutting-edge technology category. A source told Reuters Apple did not > provide enough material to justify the exemption.

So did Apple just submit a crappy application? Or is the ministry not following the spirit of the law?

I won't pretend for a moment that I know anything about Indian law though, so I have no idea who's to blame here.

<comment><USER6> How do Apple's products qualify as "cutting-edge technology"? Or, phrased differently, would Samsung also qualify? HTC? LG?

What differentiates "cutting-edge" from "just another widget" in the consumer electronics sector?

<comment><USER7> > How do Apple's products qualify as "cutting-edge technology"?

If Apple does not qualify as "cutting-edge technology" then what does?

If a store is selling to consumers, it's inherently going to be not at the very edge of development.

If Apple can't be approved for this exemption, this exemption makes no sense.

<comment><USER6> _If Apple does not qualify as "cutting-edge technology" then what does?_

When I think cutting-edge, I usually think highly specialized medical or military tech - things that a only a small set of people can design/build.

But, it is a pretty flimsy phrase and could be open to abuse. Which is why I asked if other consumer electronics companies have succeeded/failed to obtain a waiver.

<comment><USER7> > When I think cutting-edge, I usually think highly specialized medical or > military tech - things that a only a small set of people can design/build.

Sure, that is the absolute cutting edge.

But you don't need retail stores to sell specialized medical or military technology.

</comment></comment></comment></comment></comment><comment><USER8> The title seems like the setup for a joke. Are we sure 30% of code from apps in the app store wasn't produced by outsourced programmers in India?

<comment><USER5> You don't buy App Store apps from the Apple store, you buy hardware, so that's not relevant.

Though if Indian programmers had contributed to the software that comes preinstalled on the products sold there, I wonder what would happen. Does "locally sourced" only apply to physical manufacturing?

<comment><USER8> > You don't buy App Store apps from the Apple store, you buy hardware, so > that's not relevant.

Totally right. I wasn't thinking about this correctly.

> Though if Indian programmers had contributed to the software that comes > preinstalled on the products sold there, I wonder what would happen. Does > "locally sourced" only apply to physical manufacturing?

A very good question. How much should the software count towards what something _is_ compared to the hardware, and how much would Apple value iOS compared to the hardware design of a new iPhone. I imagine traditionally it would be quite a bit more, but Apple also invested in a foundry and produces their own chips, so that definitely increases the hardware side valuation.

</comment></comment></comment><comment><USER9> For anyone not reading the article, note this is about Apple _stores_ and not Apple _products_. As the article says, Apple products are currently and will continue to be sold through third party distributors (eg, the Indian equivalent of Best Buy).

It is a little bit weirder a sort of protectionism than most of us think about, and a little bit harder for me to care about personally.

</comment><comment><USER10> They could sell local apples, maybe?

</comment><comment><USER11> What's 30%?

30% of sales by unit, sales by price, items for sale, floor space? Or something else?

<comment><USER12> At least 30 per cent of the value of procurement of manufactured/processed products shall be sourced from Indian small industries.

So for high margin product like iphone, they're going to base it on cost of good or (materials). There's probably some fudging room.

<comment><USER11> For each product? You can't sell any product unless 30% of it was made in India?

<comment><USER12> oh no definitely not. For company product aggregate.

[http://www.franchisetimes.com/May-2015/How-Indias- investment...](http://www.franchisetimes.com/May-2015/How-Indias-investment- laws-affect-franchisors/)

'All multi-brand retail operations with FDI must be locally sourced with at least 30 percent of the value of manufactured/processed products from Indian "small industries," which have a total investment in plant and machinery not exceeding U.S. $1 million. '

Quite a tall order still.

<comment><USER11> But then how can you know how much will sell ahead of time?

Suppose I have exactly two products, one fully sourced from India, one sourced elsewhere. The legality depends on whether the first sells more than a 7:3 ratio over the second, which can't be determined before actually selling.

<comment><USER12> You're right and I don't know the details. But I assume you'd have to provide plausible sales projection data to the authority, and then have periodic audits.

</comment></comment></comment></comment></comment></comment><comment><USER13> Seeing a lot of neo-liberal economics dogma here in the comments, and so would like to recommend this excellent book: [https://www.amazon.co.uk/How-Asia- Works-Success-Failure/dp/1...](https://www.amazon.co.uk/How-Asia-Works- Success-Failure/dp/1846682436).

It has an excellent account of how manufacturing (supported by heavy protectionism from the state) was a crucial component of the Asian miracle in nearly all countries. IMO India really needs to go through a round of manufacturing expansion, preferably in the high-tech sectors.

<comment><USER14> You mean paleo-liberal economics dogma? Just about all mainstream economists ever agree on free trade.

(Though in this case, they are just banning Apple Stores, apparently, not Apple products. So it doesn't really matter too much.)

</comment></comment><comment><USER15> I'm not surprised... [http://www.dailymail.co.uk/news/article-2325502/Map- shows-wo...](http://www.dailymail.co.uk/news/article-2325502/Map-shows-worlds- racist-countries-answers-surprise-you.html)

</comment><comment><USER16> This does not make sense based on my own experience of launching phones in India with Intex, Spice and a few other Indian manufacturers. 'Indian' smartphones are all made in Shenzhen. There is no smartphone manufacturing in India. So how can Intex and Spice sell their phones in India if their phones are made in China like the iPhone is?

<comment><USER17> Vendors like Spice and Intex are Indian companies. Companies can sell imported products in India, they just have to pay import duty on it.

India have FDI restrictions in retail sector to prevent big box retailers like Walmart from destroying local retailers.

Most of the popular brands including Apple already sell in India, but they have to partner with a Indian retailer to do so.

</comment></comment><comment><USER18> Irrespective of Apple being able open stores, one has to remember India is really tiny market for Apple widgets. There is no comparison to China in term of market size. Apple shipped around 1.7 million phone in India in 2015. This may look lot but going ahead I think they are going sell quite less than that as there is no 2 year upgrade cycle.

<comment><USER17> Apple sales are weak in India because iPhone is overpriced in India, prices of Apple products in India are a lot higher than US. In 2015, over 100 million smartphones were sold in India.

Apple sells iPhone 6s 16 GB for $920 in India[1], while you can buy comparable Android smartphones from manufacturers like Xiaomi and OnePlus for $300 to $400

Sweet-spot price for Indian middle class is $300 to $400 and they typically upgrade in 1 to 2 years.

[1] [http://www.apple.com/in/iphone/compare/](http://www.apple.com/in/iphone/compare/)

</comment></comment><comment><USER19> I'd wager India are holding out for a 1 billion dollar bribe like the Chinese got! [http://www.reuters.com/article/us-apple-china- idUSKCN0Y404W](http://www.reuters.com/article/us-apple-china-idUSKCN0Y404W)

</comment><comment><USER20> For computer goods, what does 30% sourced refer to -- just the physical hardware? What about the software that goes into it? And what weight is given to software -- the development time / cost, or are there other metrics?

</comment><comment><USER21> Great! good on you India

</comment><comment><USER22> this is the same as the 35% tariff suggested by donald trump for all nafta products, just in another form and many steps back from global trades. does that mean apple can finally open its own produce market by selling locally sourced apples, apple pies, apple cider? or it's even better that apple could just place some automatic packaging factories next to its warehouses in india and by volume i believe it's more than 75% of apple's main product.

</comment><comment><USER23> I'm totally in support of this policy. Controlling companies and making sure they understand clearly that they exist only at the pleasure and the whim of the government is the only way to bring our world back from the corporatist brink.

<comment><USER24> > Controlling companies and making sure they understand clearly that they > exist only at the pleasure and the whim of the government

Worked out well for the Soviet Bloc

<comment><USER25> So much fervor for the rights of a government created legal fiction?</comment></comment></comment>


Ask HN: What are the different means of distributing software? - <AUTHOR>

I just realized that I've gone through school and worked for a few years without really appreciating the differences between the different means of distributing software.
For example, if you write a Java app, presumably you give people a jar to run, and this requires your users to have Java installed (I think?). On the other hand, if you write an app in C, I assume that they don't need anything installed? Or perhaps they need libc which can be assumed to be on every modern OS?
These are the kinds of questions I have. If anyone could give me some material to read or explanations I would really appreciate it.
Thanks! <comment><USER2> Honestly this is a huge topic that I think has as many facts as opinions. And to be fair, you are not alone, rarely have I hired a new/recent grad that knew how to do deployments well, unless they had internships that taught them or built some software to deploy themselves. Experience is what helps. For resources to use, I think your best bet is narrowing the topic some to a specific language (or 2) you are working in (and ideally target OS or OSes), then it is a lot easier to help you with resources. e.g. targeting Windows and _nix is tougher then targeting_ nix alone, or Windows alone, regardless of language.

As for my opinion: I do not believe there is one language that has the lock on easy/hard deployments, some definitely make it more challenging but overall they all have their good and bad parts. In my experience, C/C++ can be both the easiest and hardest to deploy. For example, I did a small sample console level C++ program running on OS X for someone a while back, literally copy and run, super simple. On the other end we have developed a sophisticated piece of imaging software for a client in C++ that uses the GPU etc. It has required about a week of time to get the build to work on linux and OSX machines, and we are still tuning it. This is simply because there are so many pre-reqs that have to be configured properly and generally built for the specific machine and OS to get the most out of the software and hardware.

At the same time, Java's promise of write once run anywhere is reasonable for many things, but you'll find generally is a bigger challenge then initially anticipated. .NET is honestly probably the easiest in my experience to deploy for Windows environments, and I am fond of Node.js apps on _nix as they are pretty damned easy too (npm really is a huge reason why).

As for things to watch, you already have the right idea, its library, library version, library location in some cases, DLL Hell on Windows still isn't totally gone, binary compatibility on _nix, etc. And just because you write something in C doesn't mean you won't have deployment issues, as the versioning of libraries and features you use can become very specific. At the same time, C/C++ is one of the most deployable languages across devices, but that comes at some complexity.

</comment><comment><USER3> web-based: javscript usually, unity and flash also are a possibility. At one time Java was the choice for this, but not so much anymore.

desktop: usually a compiled binary. I've also seen flash and unity compiled to native binaries. Bytecode languages like Java and .NET are also a possibility.

app store: iPhone and Android</comment>


Built By Google - <AUTHOR> http://blogoscoped.com/archive/2010-01-10-n57.html <comment> bjelkeman-again A quite dystopian vision, with the main character is essentially powered by a future Google, which in its turn is powered by the main character. A very tightly coupled future which doesn't seem to point to much individual freedom. I think the future is quite different. 1 hour of work and 7 hours of play? Nah. Then you can easily compete by just working a bit more and soon only those that work more are competitive. Humans are very creative and find different uses for their tools than this.

<comment><USER2> _1 hour of work and 7 hours of play? Nah. Then you can easily compete by just working a bit more and soon only those that work more are competitive._

Your assumption is that we will need to compete to meet our needs, and I don't think that's necessarily the case: competition within a population only matters when resources are scarce and our efforts have a significant effect on the value of those resources relative to the background level that exists regardless of our presence.

Given that to any sufficiently advanced AI we will be less intelligent than our housepets are to us, I think it's a stretch to imagine that we'll be economically relevant at all. When you have two dogs, they don't _need_ to compete with each other to do very well - you feed them based on what they need, regardless of what their relative levels of effort would merit in an environment that didn't include you, the owner.

In other words: if we have a peaceful coexistence long enough for computers to truly surpass us (which should not take very long once they reach our level), the table scraps that they hopefully toss down to us will probably render irrelevant anything that we could produce ourselves. And if they don't offer table scraps, we're pretty well screwed, because they're the de facto owners of all the resources since we have no significant power to wield against them and we don't have anything valuable enough to offer in trade.

"Friendly housepet" is probably the status we should be shooting for when we achieve AGI, honestly. Cooperative scenarios fail quickly because after a short time we would have precious little to offer an advanced AGI, and the antagonistic scenarios only end one way, with humans losing a disastrously one-sided battle.

Edit: grammar (need to drink coffee _before_ posting on HN from now on)

<comment><USER3> Have you read The Metamorphosis of Prime Intellect?

<http://www.kuro5hin.org/prime-intellect/mopiall.html> [http://en.wikipedia.org/wiki/The_Metamorphosis_of_Prime_Inte...](http://en.wikipedia.org/wiki/The_Metamorphosis_of_Prime_Intellect)

</comment></comment></comment><comment><USER4> Wow, that was really boring. Replace everything with "Microsoft", and this could have been written 15 years ago. Use "IBM", and it would have been 25 years ago. There are many great techno-dystopian stories, but this is a rank amateur attempt. The print version would have red pen in the margins: character development? story arc? unnecessary detail!

If you liked this story, you are required to have read Snow Crash.

<comment><USER5> Not really... the focus on advertising is much more Google-specific.

The real clunker in this story is that with such advanced technology (mostly AI-complete, as others have pointed out), humans are largely irrelevant, and therefore so is advertising as well as any work we might wish to do.

The only way to "fix" this would, I suppose, be to posit a truly symbiotic AI relationship, where these strong AIs can only exist with constant interaction with human thought processes. However, if that was the case, the author should really make this clearer.

</comment></comment><comment><USER6> If you enjoyed that you'll probably enjoy Doctorow's Scroogled: <http://craphound.com/?p=1902>

</comment><comment><USER7> Brings this to mind (albeit indirectly) <http://xkcd.com/603/>

Variation is probably the most resilient feature of humanity, which I think is commonly overlooked in these sorts of dystopisms. Well written, though, and a fun short read.

</comment><comment><USER8> That was a little bit creepy read. Google is and will be quite influential for next 10-20 years, but it would definitely have strong competitors and computers wouldn't be called "Google".

<comment><USER9> Are you sure? People already use "google" instead of "search", they might start using it also instead of "computer" in next few years... You never know! Especially when Chrome OS is just around the corner...

</comment></comment><comment><USER10> How will Google dominate in the post-scarcity society? Google makes its money on the fact that market players need to find each other. It's just an interesting thought-experiment, but if Google has made everyone's lives so easy (assuming that scarcity has essentially become all but extinct because Google gives everything else away), why would anybody need to advertise their goods?

<comment><USER11> One thing that Google, in their current or projected business model, will never overcome is: the scarcity of natural resources.

Food, water, building materials, and energy. Commodities by technology, but still essential for life.

</comment></comment><comment><USER12> For the first time in my life, I read something about the future that sounds realistic... but still scary...

<comment><USER13> I completely disagree, the author is definitely taking it too far. Not in terms of technology, but in terms of Google dominance.

<comment><USER12> Google will dominate _because we don't care_. It's written in the text and I see it everyday with people moving to Chrome and all that.

I think that the author makes a mistake when he talks about Google as being one thing. It's much more likely that it will brand itself with different names just like Pepsi having hundreds of brand without us knowing it.

<comment><USER14> _Google will dominate because we don't care. It's written in the text and I see it everyday with people moving to Chrome and all that._

That only works if _we don't care_ and they're better than the alternative. If we don't care who handles our email, Google and Yahoo have to fight based on something other than brand name.

 _I think that the author makes a mistake when he talks about Google as being one thing. It's much more likely that it will brand itself with different names just like Pepsi having hundreds of brand without us knowing it._

Have they ever done that? What Google service do I use without knowing it's run by Google?

<comment><AUTHOR> Blogger? Youtube? Doubleclick? ...

You know. HN readers know.

The rest knows?

<comment><USER14> You sign in to Blogger and Youtube with your Google account.

Doubleclick is a good point, though. Of course, you know if you place ads on the site (there's a "Google" in the URL) and you know if you buy the ads. So I guess consumers don't know. Would they care, if they did?

<comment><USER12> I sign in to HN with my google account...

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> Most of the things described in this article are AI-complete.

</comment><comment><USER16> The best part of that page was the ad for the Google Nexus One at the bottom that Google chose to show me. But I don't care, because Google does a pretty good job.

</comment><comment><USER17> man. future google is only a marginally-better cattle farmer than the current ones. it seems we're more efficiently used, and for less time, but we're still animals on a farm. when's that going to change?

</comment><comment><USER18> And also, by the year 1985 we will all have flying cars.

</comment><comment><USER19> Excellent Asimov-like short story..

</comment><comment><USER20> the world described would have singularity-ed "long ago".</comment>


Data Dividend Project - <AUTHOR> https://www.datadividendproject.com/ <comment><USER2> Comments moved to [https://news.ycombinator.com/item?id=23601333](https://news.ycombinator.com/item?id=23601333).

Normally we'd have merged the other way, since this is the canonical source and was posted earlier, but people are complaining about not being able to read the site.

</comment><comment><USER3> > Access from your Country was disabled by the administrator.

Cutting off entire countries at the level of firewall rules seems almost dehumanizing.

<comment><USER4> I wonder why in the current year™ this isn't considered racist too.

EDIT: I'm getting downvoted and I don't know why. When Trump issued travel ban on citizens of Iran, Iraq, Libya, Somalia, Sudan, Syria, and Yemen it was considered racist. I don't see how banning users from other countries using some other arbitrary measures is any less racist.

<comment><USER5> It will be just give it time.

At previous positions I've banned entire countries like China from our backend. The truth is some companies do zero business in Country X, so it makes sense to outright ban them to avoid the headache.

You should see the traffic I would get from people in china trying to hack in our backends. The funniest bits were seeing people trying to hit /phpmyadmin

</comment></comment></comment><comment><USER6> Unable to access this site in Hong Kong: "Access from your Country was disabled by the administrator."

For anyone else with this problem, here's an archive link: [https://archive.is/h3PWJ](https://archive.is/h3PWJ)

</comment><comment><USER7> The online "user data" business model is identical to the highway, or the magazine, or the mall, or the airport business model. You create traffic by providing access at or below cost, and make money by selling ads to all the traffic you create. Should highways, airports or magazines pay users money from the revenue they generate by selling ads around their high traffic properties?

Another consideration is about the proportion of an ad's cost that can be attributable to the data these companies have, which depends on the degree to which the ad is targeted or not. For example, are keyword-tied search ads and the money Google makes from them related at all to any data they may have on you?

Furthermore, any attempt to account for the "price" of used data (basically just something to id you online) should be matched by a valuation of the true value this companies offer in compensation. In the case of google: what's the value to users from having fast, accurate search; petabytes upon petabytes of free content (from the mundane to the educational) on youtube ($5 - $9/mo if you go by Disney+/Netflix prices); and entire office suite ($5 - $12/mo looking at many SaaS/Office 365) kept up to date; a quality email client ($99/yr for Hey); a free OS for your phone and computer (Android/Chromebooks); a high quality global mapping service w/ turn-by-turn GPS ($300 devices back in the day?); a Calendar ($3 - $9/mo looking at competitors), 15GB of cloud storage; unlimited storage for all your photos in the cloud (say the average user has 50Gb of photos, thats $3 - $9/mo).... and I could go on. In the case of Facebook I believe there is genuine value in having a directory of all your friends/acquaintances/family, and a repository for memories either there or on instagram.

I see the techlash and policies like this data-dividend as a very natural impulse from society to get a spoonfull from the honeypot these companies created. Just because it is natural doesn't mean it is right. Our economic model is premised on the idea that the fruits of your labor/property/ideas are yours to keep, however spectacular they may be. Keep in mind that this policy does nothing to change the way this companies operate, or question their overall effects on society.</comment>


Turbulence at Mt. Gox Creates Arbitrage Opportunities For Bitcoin Traders - <AUTHOR> http://www.thegenesisblock.com/turbulence-at-mt-gox-creates-arbitrage-opportunities-for-bitcoin-traders/

<comment><USER2> They're not actually arbitrage opportunities because there's no liquidity. All these exchange hang-ups are why the spreads look so unbalanced, and it's not like traders aren't racing incessantly to correct it.

Unless you have fiat in all the exchanges, bank accounts in multiple countries, and large amounts of cash on hand, you don't really have a chance here. Like most amateur arbitrageurs, you'll just going to end up in the red after all the delays and fees.

<comment><USER3> Sort of. Arb means risk free and cost free gains, so this could still count. Lower liquidity could be considered a risk, but some people would take the gains and not care about immediately cashing out, esp since you could trade back to BTC once prices normalize and cash out on the alternate exchange before the withdrawal hiatus is even over.

The bigger issue is the funding costs across exchanges, but the fact that it goes down between events signals that arb-neutral differential is lower than during the event-driven spikes he points out.

</comment></comment><comment><USER4> No it doesn't. If you can't actually get your money into/out of the exchanges then you can't execute on the arb. Just because you see crossed books doesn't mean you can actually make money on it.

</comment><comment><USER5> Can someone make an ETF for Bitcoins please? This would help liquidity a lot IMO and also help the competition of the exchanges to get rid of the above- the-market withdrawal fees.

I'm thinking not even a real ETF as in having real market participants that can redeem shares. Even if someone can incorporate a small corporation, have a initial offering of a million shares at 10 dollars. That's a $100 million dollar worth of BTC that one can trade in the over the counter market. I don't mind paying the 0.5% administration fee whatever.

Reddit thread where people discuss this idea: [http://www.reddit.com/r/Bitcoin/comments/19hxuv/bitcoin_etf/](http://www.reddit.com/r/Bitcoin/comments/19hxuv/bitcoin_etf/)

EDIT: Apparently, there are already shell companies listed on OTC for sale so that one can simply take over their tickers instead of filing all of the paper-work.

[http://www.mergernetwork.com/index/public-shell-companies- fo...](http://www.mergernetwork.com/index/public-shell-companies-for-sale/;) Can someone buy one and then maybe put another 100K worth of Bitcoins as assets? Or raise funds via Kickstarter?

<comment><USER6> Check out [http://kraken.com/](http://kraken.com/) which is currently in beta.

(Disclaimer: Owned by my employer... but 2+ years development, it should bring something new to the area.)

<comment><USER7> What does margin trading have to do with an ETF?

<comment><USER6> Trading feature: [https://en.wikipedia.org/wiki/Margin_trading](https://en.wikipedia.org/wiki/Margin_trading)

Thing to be traded: [https://en.wikipedia.org/wiki/Exchange- traded_fund](https://en.wikipedia.org/wiki/Exchange-traded_fund)

Place to trade with said feature on arbitrary things: [http://kraken.com/](http://kraken.com/)</comment></comment></comment></comment>


Ask HN: Best way to auto-organize 16GB of pics - <AUTHOR> I have 16+ gigs of pics that I have no easy way to organize. What methods/applications do you use to organize all your pictures? <comment><USER2> Hash them and store them in folders by the first few characters of the hash.

You said 'organized', but didn't say HOW.

If you don't tell us what kind of organization you're looking for, there can be no meaningful answers.

</comment><comment><USER3> I use Apple's Aperture. I have around 200GB of photos organized in there.

When I dump a flash card to the computer (using Aperture), I then remove the card, and delete it manually on the camera.

Then I go through a quick pass in aperture rating everything that is just a poor/duplicate shot as '-1', so that it can go into my deletion bin. Ones that are exceptional get marked to '1' at that point. Most don't get rated. This is a really quick pass.

Then I make a second pass where I can start making more decisions.

A third pass is generally required to figure out what is really decent, worth uploading/printing/retouching.

Fortunately, 16GB of photos isn't too much to organize. Around 450-500 images on my camera.

<comment><USER4> "When I dump a flash card to the computer (using Aperture), I then remove the card, and delete it manually on the camera."

A safer way would be to keep at least two copies of your photos at all times. I delete mine from the card only after they are on my hard drive and backed up on an external drive.

</comment></comment><comment><USER5> Depending on why you need them organized, using Amazon's Mechanical Turk to tag photos based on content might be a viable solution.

</comment><comment><USER6> we store around 500gb of photos currently. They are stored with two classifications. Our photography studio and our family photos. Both are organized chronologically with a top level folder that is the year. Within that folder we have 1 through 12 for the months and then each month is divided up to events (and sometimes the specific date).

All of the photos are backed up daily to a 1TB RAID1 NAS and monthly to a single 1TB hard disk that rotates to my mother in laws house. My rule of thumb is three copies if you don't want to lose it.

It is important to keep in mind that 16+ gigs of photos is only going to grow over time. That is where we started too.

</comment><comment><USER7> Here's what we do.

We have 120GB of photos from the last 4 years (when our first kid was born). They are in folders:

      - Year
      - Month (starting with #, ie "5. May"
      - Outing (ie "Air & Space Museum")

Photos that are just around the house are in the root of the month folder.

This makes it easy to search for specific events and vacations (based on the descriptive "outing" folder name), but the weakness is that it's hard to find a particular 'round the house pic if we forget what month it was taken.

</comment><comment><USER8> I always found Picasa's organization of photo's pretty useful.

It automatically categorizes the photo's by date, you can also set it up to do automatic/guided facial recognition.

Another nice feature is the integration with a lot of online services.

<http://picasa.google.com/>

Demo video: <http://www.youtube.com/watch?v=gYO2uhrIZJ4>

<comment><USER9> I use digikam on KDE (Kubuntu) and tag images - it, like most does geo tags and date ordering automatically (so you can search by calendar or using a map to locate where|when images were taken).

I've just checked and I have 8500 images which surprised me a little.

Picassa is really good - I tried to get it to tag my images with facial recognition data but I couldn't do it without switching over and I'm happy with digikam for now. I'm rather hoping this feature will appear (perhaps via GSoC; <http://libface.sourceforge.net/file/Download.html>) in the next year or so.

iPhoto does excellent facial recognition and works rather well on large volumes or images (based on my limited play with it of about an hour or so).

</comment></comment><comment><USER10> I do not use this personally, however, friend's of mine REALLY like organizing their photos on FaceBook. There they can tag photos, share photos, and even hide them.

My suggestion, upload them to FaceBook. Note: I am telling you something that I personally would do, but if you do not mind it then go ahead.

Use your friends as MechTurks; I mean who knows you best? FaceBook does have an album limit of 1000, but you can have unlimited albums[1]. Have your friends tag things, comment, and generally help you! After all that is said and done, spider your albums.

I do like the 'back upiness' to all of that, but I do not know if FaceBook preserves the originals. I do know that they store your photos for up too, if not more than, one year after the deletion date.

[1][http://developers.facebook.com/docs/reference/rest/photos.up...](http://developers.facebook.com/docs/reference/rest/photos.upload)

</comment><comment><USER11> There's really no solid way to auto-organize photos besides the organizing a photo suite like Picasa will do based on album names and such.

You've just got to sit down and go through a couple hundred pics and sort them, call it a day, do another couple hundred pics tomorrow, ad nauseum until you're done. Then make sure to stay on top of organizing new photos as they come in.

The hidden benefit is you wind up looking at all your photos! That's what you have them for- to look at! And without motivation, the odds are slim you'll look at them all. (If you're a professional photographer and the photos are not of your life/family/friends but that of your clients, obviously just organize by client/job/)

P.S. there is ONE real sorting method- extract the metadata and divide into folders based on date. It's not very good, but it's the only one I know of you can automate.

</comment><comment><USER12> I have 25gb pics without video, storing in folders by year-place or year- event, and having all that stream to picasa + google online storage (cheap, 5$ per year for 21GB).

This way you have all pictures online to annoy friends from any computer + picasa does the face detection, so you only have to add non-human tags for later searches (I'm usually lazy).

Anyway, picasa makes it easy to find a particular photo even if you don't have it tagged, works both on mac and pc, and also flawlessly works with online storage.

</comment><comment><USER13> The regular way to do this would be just trudging through them after grouping by date or something.

A cooler way (albeit significantly harder, at least until it's working) way to do this would be to consider it an AI classification problem... maybe with enough training (as you go, since you'll be organizing anyways), it can start to suggest categories, so you can just hit accept as you fly through your pictures!

</comment><comment><USER14> OS X users — Use MetaDataMover to move and rename automagically based on embedded metadata. I have folders for year, month and day. The file name includes the camera name (we have several) and a sequential #. We try to remove poor photos as soon as we download them. In 30 years you're not going to want to look through gigs of photos, you just want to see the best (and most memorable) ones.

</comment><comment><USER15> tl;dr: I version control mine so I have backups, can share them with my mother, and here are some scripts that will help you do part of that.

I wrote a script to extract the dates and rename each photo to the date:

<http://www.mcvoy.com/lm/jpg2date>

and you use it like

jpg2date *.jpg | sh -x

Then, like other people, I organize them by YYYY/MM/photos.

I also version control them in BitKeeper which has a binary asset mode (BAM) that works really well for this sort of thing. It wraps the photos in a pretty decent CRC, can use hardlinks for checkout (I can checkout 60GB of photos in a second), and because it is a distributed SCM I can push them to my mom's place in Florida where I have her mac's screensaver pointed at them.

So California has to fall into the ocean and Florida needs to blow up before I lose my photos. And I take that part pretty seriously, losing the photos would suck. Not because they are great, just because they are the record of my family.

I also put the entire lot up on the web (well, less anything that would make our nazi police think it's kiddy porn, no shots of the kids playing in the bath, don't get me started on how retarded our society has become). That script is written in our little programming language, L, but you could translate it to perl easily:

<http://www.mcvoy.com/lm/photos/etc/igal-it.l>

and it generates the layout here:

<http://www.mcvoy.com/lm/photos>

I need to put some html in there so you don't have to manually move month to month but you get the idea.

</comment><comment><USER16> Write a short program to extract the meta data from your photos, organize them in clusters of dates and volia they are organized.

</comment><comment><USER17> Nice question. I got about 200GB all organized within iPhoto. Size comes from the pictures being mostly saved in RAW. Still, iPhoto becomes slow. I moved the library to an external hd to have free space on my internal one.

I fear the day I got to dig through every picture I made and decide if it is worth keeping or not. :-/

<comment><USER18> I'm thinking out loud here but I believe most people fear that day so I'm wondering whether a service which everyday would ask you to choose between a couple of pictures (say order 10 pictures), you would easily get at least 1000 pictures per years organized. Does it sound any good?

<comment><USER19> How about a service where you can pay people to do it for you, maybe, say, 10 cents an image?

<comment><USER18> The immediate problem I see with it is how does that person know how to do it my way? At least when I look at some pictures from a trip I don't always choose the most obvious as my favorite, there's some emotional aspect to some picture that is much more powerful than just the quality of the picture itself.

That said, maybe I'm in the minority and it would actually work!

</comment></comment></comment></comment><comment><USER20> I love iPhoto Library Manager (<http://www.fatcatsoftware.com/iplm/>). I doubt you'll find anything completely automatic... well other than wccrawford's hashing idea.

</comment><comment><USER21> it probably depends on what the pictures are of and what you need to use them for in the future.

</comment><comment><USER22> If what you want is to organize by date taken, have a look at this ruby script: [http://al3xandr3.github.com/2008/11/25/ruby-foto- organizer.h...](http://al3xandr3.github.com/2008/11/25/ruby-foto- organizer.html)</comment>


Alarm over voter purges as 17m Americans removed from rolls in two years - <AUTHOR> https://www.theguardian.com/us-news/2019/aug/01/voter-purges-us-elections-brennan-center-report <comment><USER2> I don't understand how this isn't a bigger story. This purging is massive, and smaller purging arguably had a bigger effect on the 2016 election than any Russian interference.

It was most recently pulled off in Georgia as well: [https://www.theguardian.com/us-news/2018/nov/10/georgia- elec...](https://www.theguardian.com/us-news/2018/nov/10/georgia-election- recount-stacey-abrams-brian-kemp)

In Georgia, Kemp won by ~58,000 votes, yet in a similar tactic, they:

> • In the three months leading up to election day, more than 85,000 voters > were purged from rolls under Kemp. During 2017 668,000 voters were purged, > according to the Atlanta Journal-Constitution.

> • Of those 2017 numbers, investigative reporter Greg Palast told Salon, > 200,000 people left the state, died or moved out their district, making them > legitimate cancellations. However, through litigation, he got the entire > purge list. "Of the 400,000 who supposedly moved, our experts will tell a > court that 340,134 never moved – wrongly purged," Palast told the Guardian, > saying people had been purged for not voting in an election or two.

> • Furthermore from 2012 to 2016, 1.5 million voters were purged – more than > 10% of all voters – from records, according to a 2018 report from the > Brennan Center for Justice. In comparison, 750,000 were purged from 2008 to > 2012.

<comment><USER3> The article mentions a purge of 107k voters in, what I thought, was a reasonable approach to regulating polls.

> In July 2017, more than half a million people were removed from Georgia's > voter rolls. Of those, 107,000 were purged because they had decided not to > vote in previous elections and they failed to respond to mailed notices from > the state.

Ignoring notices from the state often have larger consequences than not being able to vote in a specific district...where you can't prove you live. Even if you were to vote in a general election, you could register without prompting from the state. Ignorance of the law and such, the state did it's minimal duty, in this case.

Given the disparity in numbers being thrown around, it's hard to know what's factual and what's misconstrued. Either way, informed consent is what US citizens seem to mobilize around. Getting cancer from eating sausage? Shoulda said it was a danger on the box. Removed from the voting roster because you didn't receive notice? Tough.

<comment><USER4> There is absolutely no purpose to these purges, except to stop legitimate voters. Considering these are people who did not vote in some prior elections, it seems unlikely that they would now suddenly start voting multiple times. Plus, of course, in-person voter fraud is basically non-existent: there is about one case for every ten million votes, and almost all of them are due to negligence.

"It's the law" is also a strange argument when it's the law that's being criticised.

<comment><USER5> I serve as a voting officer in my county.

The voter role is a database.

This is database maintenance.

It is necessary.

Every voter should verify that they are signed up to vote in the one (1) place where they pay federal income tax.

People who have property in multiple states are among the weakest links in the system, as getting an absentee ballot for a place where you have a legitimate residence tends not to be hard.

<comment><AUTHOR> Did you read the article? It's talking about anomalous purging of voters.

<comment><USER6> _Please don 't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."_

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)</comment></comment></comment></comment></comment></comment>


Counting Lattice Paths - <AUTHOR> http://www.robertdickau.com/lattices.html <comment><USER2> Ooh! I love these problems.

One variation on the lattice problem is to pretend the lattice is actually a set of city streets with stoplights on each corner. Let's say you want to walk the lattice; at each corner you take the route that has the green light or wait.

The question I always wondered was--is there an optimal algorithm to cross the city that works for any timing pattern on the lights without knowing the timing pattern for the entire grid? The answer seems emphatically "no". You can prove this simply by having the lights at the corner of the lattice stay red indefinitely (or arbitrarily long period of time, call them "pernicious lights"). In that case any path that ends up on the corner of the lattice will be slower than all other routes. It follows from this that you need more than just knowledge of the local lights. (I believe the proof extends to all nodes by adding more pernicious lights.)

Any other fun lattice problems?

Edit: For clarity.

<comment><USER3> Following your example of city streets this reminds me of an algorithm my friend wrote for walking through a grid city with a slope.

Let's say the west corner of the lattice is the highest part and the eastern most corner is the lowest part but the gradient is not constant. The city has many local maximums and minimums, where you will walk downhill on one street just to turn towards your destination and be forced to walk up again.

His algorithm attempts to minimise the amount of energy he needed to exert to walk from point a to the bar. He said "never walk downhill, unless it's the last hill". In other words when faced with an intersection, take the path with the least slope.

<comment><USER2> Indeed. This seems similar to my problem.

I started thinking about the streetlight problem decades ago in Portland, which has a grid in the city center. The specific question was what if I just always went with the green light to cross the grid? In the streetlight case this clearly leads to bad outcomes if the length of the red light time is unbounded. Your conditions would seem to limit the cost of a bad decision to the number of nodes you cross times the maximum height difference between west and east ends of the grid.

However, if you don't somehow limit the number of ups and downs between nodes, then the "take the downhill" algorithm seems to have the same issue as walking through streetlights. All you have to do is assume a large number of ups and downs within a block.

In both cases it seems that to bound the "sub-optimality" of solutions there must be a bound on the cost of moving between nodes in the grid.</comment></comment></comment>


Google Announces APIs Scheduled for Shutdown - <AUTHOR> http://www.readwriteweb.com/archives/google_announces_apis_scheduled_for_shutdown.php <comment><USER2> There seems to be at least one lesson here for developers relying on Google's good will.

Take your pick:

a) Don't rely on Google to keep services around forever

b) Ain't no such thing as a free lunch

c) Google has only one true product, and it's advertising

d) <feel free to add more>

Despite extraordinary profits, Google is really starting to tighten the reigns. I'm guessing that speaks to a feeling of market saturation. They may no longer be on a breakneck growth curve like in the old days.

<comment><USER3> > c) Google has only one true product, and it's advertising

I would argue that Google's one true product is _you_ (the user, and data about that user). Advertising is simply their primary (currently?) means to sell that product (you) to other companies/businesses.

<comment><USER4> With adsense they can still sell ads even if they do not have 'you'.

... only guessing of course. have no idea if gmail makes more with ads than the whole of adsense.

<comment><USER3> You make a good point.

I imagine (very much a guess on my part) that Google would prefer to have eyeballs on their own impressions of adsense than those on other sites though -- because there would be no payout in those cases.

Still, I would think that serving ad impressions on 3rd party sites is likely a large part of their current business. Maybe those are just eyeballs they rent as appose to own then. ;)

</comment></comment></comment></comment><comment><USER5> My coworker and I spent the last several months building an iPad app on top of the News Search API. And now all that work is for naught! That is a serious bummer.

<comment><USER6> You can use the NewsCred API (developer.newscred.com) if you want. We'll make it free forever if you email me.

</comment></comment><comment><USER7> This make me think about something Fred Wilson said at TC Disrupt ...

Don't be a Google Bitch, don't be a Facebook Bitch, and don't be a Twitter Bitch. Be your own Bitch. (link: [http://techcrunch.com/2011/05/23/fred- wilson-be-your-own-bit...](http://techcrunch.com/2011/05/23/fred-wilson-be- your-own-bitch/))

I've spent the last few days trying to use the terribly documented (and frequently changing) Facebook API ... and I wonder, why am I putting myself through this abuse? FB is not unique here ... Twitter's APIs are pretty flakey too in terms of how often they fail. It made me realize that my objectives and that of my API's provider are clearly not the same.

I love APIs but I'm tired of getting beaten up by them. </rant>

<comment><USER8> Perhaps there's a SaaS opportunity to build an intermediary API for these other services. It would present a single, sensible, unified API to developers, and would negotiate all of the crappy APIs of other services on the other side.

Facebook changes their API? No problem, API Intermediary simply updates its Facebook API calls once, maintaining the same developer-facing API as before. Google Translate gets deprecated? No problem, API Intermediary just switches translation providers to Microsoft.

Of course this would be a ton of work to build and maintain, but therein lies the value to others. Because of that, it probably couldn't be free (who would want that headache for nothing?) and it would probably not always offer the full range of capabilities that direct API access would, but it may still be profitable.

<comment><USER9> I believe there is an opportunity.

I believe the biggest hurdle with Enterprise adoption of SaaS is data integration and effectively all SaaS vendors combined are building the tower of babel. We are a SaaS company, we only use SaaS products and we probably have about 15 of them. Some of them integrate because they partner with NetSuite, other are stand alone and that is OK for now but for true Business Intelligence we need them to integrate. Infomatica is doing a booming business, inpart to the SaaS demands.

<comment><USER7> Interesting... what functionality does Netsuite offer? Sorry ...noob question :p

</comment></comment></comment></comment><comment><USER10> They're shutting down the translate API? I hope they're releasing a replacement - it's incredibly powerful, though I can't see how it commercially benefits them.

<comment><AUTHOR> That one surprised me the most. Message at <http://code.google.com/apis/language/translate/overview.html>:

 _"The Google Translate API has been officially deprecated as of May 26, 2011. Due to the substantial economic burden caused by extensive abuse, the number of requests you may make per day will be limited and the API will be shut off completely on December 1, 2011. For website translations, we encourage you to use the Google Translate Element."_

Surely "abuse" means they built something people want. Sad that they don't seem to think it would be worth their while to charge for it.

<comment><USER11> Perhaps "abuse" means toys like this: <http://www.translationparty.com/>

<comment><USER12> That's not abuse... they could easily have blocked a single website. I'm thinking it would have to be spammers using google translate to generate content or something.

</comment></comment></comment></comment><comment><USER13> The only API's I've used, that are being shut down, are the Translation and Image Search. I had a little app that looked up the original word and translated word then displayed images; that way I had a better reference to what that word meant(Rosetta Stone). It was just a toy, but I'm sad to see it go!

</comment><comment><USER14> Shutting down the Wave API seems to be the final nail in the coffin since they decided to discontinue Google Wave, in August of last year.

[http://googleblog.blogspot.com/2010/08/update-on-google- wave...](http://googleblog.blogspot.com/2010/08/update-on-google-wave.html)

</comment><comment><USER15> That is a bummer. I guess the question is; what are the alternatives for the translate API?

<comment><USER16> Microsoft's translator api -<http://www.microsofttranslator.com/dev/></comment></comment>