China is blocking most Google search queries - <AUTHOR> http://shanghaiist.com/2010/03/30/the_googlecn_googlecomhk_lockdown_h.php

<comment><AUTHOR> More specifically, all queries entered from the Google html web forms. I can still search from the search / url bar in Chrome. The block is indeed, as the article states, keyed off of the rfai parameter in the queries.

Also, Forbes picked up on the story quickly as well ([http://www.forbes.com/2010/03/30/china-blocks-google-tech- ma...](http://www.forbes.com/2010/03/30/china-blocks-google-tech-markets- firewall.html?boxes=techchanneltopstories)), but I found the info from The Shanghaiist more useful.

</comment><comment><USER2> Amazon S3 has recently started to come under the block here, which is making Shanghaiist not work for me - their static CSS files are served direct from S3 buckets.

<comment><USER3> This is the kind of thing worrying me more than a single search engine being shut out. Once infrastructure services start to suffer it becomes effectively impossible to do (internet) business in China without VPN.

I've been thinking about setting up a 'dashboard' website much like Google's services dashboard that goes beyond Google's services and includes access to websites essential to run a modern internet business.

Here's my list, please add to it:

      Google search
      Wordpress / Tumblr / Other blog services
      Twitter
      Facebook
      Google Appengine
      Amazon AWS / EC3 / Mturk / etc ...
      other cloud service providers?

<comment><AUTHOR> Even with a VPN, the Chinese environment is harmful because VPNs are slooow (relatively speaking).

</comment></comment></comment><comment><USER4> Is this a surprise? Who exactly is going to stop them?

They own half the world's debt and most of the USA's including the trillions borrowed to fund the two wars going on. They will just get a severe finger wagging from the state department.

What can anyone do to change this, we can't even support the people in Iran when they are actively fighting their government.

If half the American corporations left China, China would simply make clones of those companies or just seize their remaining assets and use them for themselves (like Russia does).

</comment><comment><USER5> Google is now saying that this is a technical glitch on their end. [http://online.wsj.com/article/SB1000142405270230473910457515...](http://online.wsj.com/article/SB10001424052702304739104575153360362231700.html?mod=WSJ_hpp_LEFTWhatsNewsCollection)</comment>


Idea: Multifocus Photography - <AUTHOR> http://www.graphpaper.com/2009/08-21_idea-multifocus-photography <comment><USER2> The idea represents a fundamental misunderstanding of optics. Multiple pictures would only be required under low-light conditions when a suitable tripod is unavailable or to capture a subject in motion (both cases require a higher shutter speed, and therefore a larger aperture). In either case, a single camera could not capture the same subject in the same position and with the same framing, either due to subject or camera movement. The continuous- focus problem was solved a long time ago, first by the pinhole camera, then (when faster films began to appear) by photographers such as the members of Group f64.

If you want to learn a bit more about the subject, there is a great book called "The Ins and Outs of Focus" that is now available as a free download:

<http://www.trenholm.org/hmmerk/download.html>

</comment><comment><USER3> Interesting. This reminded me of a thought that I had when I was watching Avatar in 3D: the 3D effect was always focused on a specific part of the scene, and if you focused your eyes on a different part, it looked blurry.

After I thought about it, it made sense: they can only create the 3D effect for a specific focus, otherwise they'd have to provide an individualized effect for every viewer.

I wonder if/when we'll see a solution for this.

<comment><USER3> Good analysis of the 3D focus problem: [http://blogs.suntimes.com/scanners/2009/12/avatar_3d_headach...](http://blogs.suntimes.com/scanners/2009/12/avatar_3d_headaches_look_at_th.html)</comment></comment>


Show HN: Parallelise pipelines of Python async iterables - <AUTHOR> https://github.com/michalc/asyncio-buffered-pipeline <comment><USER2> Am I the only one struggling with async/await in _any_ language?

I did my fair share of tornado/twisted/zeromq ioloop programming, and even though I completely agree that it gets messy real quick, I always "got it".

With async/await though, I always struggle and need a really long time to get a clear picture of what is happening.

Maybe my mental model of how it works is not optimal so I would love for people to describe how they "read" async/await code.

I typically see await very much like I would read a "yield", except that instead of yielding a value, it just yields a promise to the ioloop that will "next()" once it resolves.

Still, it seems every language is adopting it, so I guess à majority of people find it simpler to reason with, I just don't :(

Note: the same applies for async/await in JS. I can easily get my head around the "then" style, but struggle with async/await. A bit less than in python though.

<comment><USER3> Try to grasp coroutines outside the async/await framework. Alternatively, try to understand corutines within the framework as state machines, like so:

        async def foo():
            conn = await DB.connect()
            results = await conn.query("SELECT bar, baz;")
            restresult = await REST.get("somewhere.else.prod.example.net/v1/BAR", id=results.id)
            return restresult.xyz

->

        class foo():
            future = None
            conn = None
            results = None
            restresult = None

            def call(self):
                self.future = Future()
                future = DB.connect()
                future.add_done_callback(self._db_conn)
                return self.future

           def _db_conn(self, fut):
                try:
                     self.conn = fut.get_result()
                except:
                     self.future.set_exception()
                     return
                future = self.conn.query("SELECT bar, baz;")
                future.add_done_callback(self._results)

          def _results(self, fut):
                try:
                     self.results = fut.get_result()
                except:
                     self.future.set_exception()
                     return
                future = REST.get("somewhere.else.prod.example.net/v1/BAR", id=self.results.id)
                future.add_done_callback(self._restresult)

          def _restresult(self, fut):
                try:
                     self.restresult = fut.get_result()
                except:
                     self.future.set_exception()
                     return
                self.future.set_result(self.restresult.xyz)

<comment><USER4> I think this bottom-up approach is the best way to understand. Using libevent or libev for a while is a great way to understand the power of async.

Async re-merges functions that have been shattered due to having to block.

<comment><USER3> There are some projects which highlight what the language is doing versus what a library is implementing on top of that (e.g. asynker). I found that a great help in figuring out "what" async "is".

</comment></comment></comment></comment><comment><USER5> I had a lot of trouble writing and maintaining an asyncio Python codebase. It's still hard to find library support, and there are "function coloring"[1] issues that tend to make asyncio usage spread.

So I started using multiprocessing and multithreading available via concurrent.futures. I built a wrapper package called `ori`[2] that lets you build chains of threadpools and processpools without having to enter the Python asyncio kingdom.

[1]: [https://journal.stuffwithstuff.com/2015/02/01/what-color- is-...](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your- function/)

[2]: [https://ori.technology.neocrym.com/en/latest/ori.poolchain/#...](https://ori.technology.neocrym.com/en/latest/ori.poolchain/#module- ori.poolchain)

</comment><comment><USER6> So what this does is introduce a (configurable) buffer between chained async generators. So this does not introduce any kind of multi processor parallelism, just makes an async generator easily be able to wait on multiple iterations in parallel. So basically the need for queues is abstracted away, looks quite nice if your use case requires something like this

<comment><USER7> Yeah the title is an oxymoron.

"Parallelized async"

<comment><AUTHOR> Hi, author here,

I was slightly torn on the usage of the word "parallelise", in that yes, CPU- wise, no tasks will progress in parallel.

However, the point of the library is to allow certain parts of a pipeline to progress at the same time in the real-world. In the example, they are calls to asyncio.sleep, but in real cases, they could be HTTP requests. As in, the bytes of the request/response will be going across the wire at the same time, so the total wall-clock time of (certain) pipelines will go down.

So, I claim "parallelise" _is_ appropriate.

<comment><USER7> I am familiar with all of the cheats, delaying evaluation, kicking the can onto the network and pretending that everything _isn 't_ just being fed into a mutex on the other side.

And for writing to disk, async is basically the only way to "parallelize" such operations

I just think its inappropriate because, if I was looking for a parallelization library like multiprocessing, and I found this, I might waste 15 minutes or so before I figure out that this isn't parallel, it's just async.

Async is okay, but it does nothing to improve performance, like what parallelization does. Async provides good UX, parallelization provides good performance. Conflating the two just muddys the water for the people who like to do high-performance-computing.

</comment></comment></comment></comment><comment><USER8> Concurrency/Parallelism is the number one reason I move a project from Python to any other language. It's one the few areas where Python can't provide a gracious frontend or an acceptable runtime, but it is very impressive how much the community is willing to do to mitigate the challenges.

<comment><USER9> Process/Thread pools help to mitigate the brain damage in Python significantly, but I hear you. Python's concurrency story is the main reason I started looking at other languages for a better concurrency story and it's why I picked up Clojure as a second language.

</comment></comment><comment><USER10> How does this compare to something like Rx? [http://reactivex.io/languages.html](http://reactivex.io/languages.html) is it not applicable because generators are pull based an observables are push based? Could the generator be wrapped in an observable (as I commonly do with promises which are eager) to compose them that way?

</comment><comment><USER11> We have something very similar to this that we wrote at my work.

Ours is based off Twisted, which works pretty similarly to the new async stuff in python3.

The thing ours does, that I can't tell if this one supports or not, is you pass it a list of functions you want it to call (in python3 you would just pass it coroutines I suppose, but in Twisted an async function gets scheduled automatically, so you need to pass it in an uncalled state), and then you specify the "width" of the pipeline, and it runs through your list of calls, ensuring that "width" number of calls are in flight at a time.

It's a super useful little utility to have around.

</comment><comment><USER12> Another way is to use Trio - [https://trio.readthedocs.io/en/stable/](https://trio.readthedocs.io/en/stable/)

</comment><comment><USER13> I think something like this should be in the standard library.

<comment><USER14> It is! You just need to use asyncio correctly and put coroutines you want run in parallel in tasks. It's the second example on the asyncio documentation for coroutines and tasks: [https://docs.python.org/3/library/asyncio- task.html#asyncio....](https://docs.python.org/3/library/asyncio- task.html#asyncio.create_task)

<comment><USER13> Hmm, so you're saying that this library is not really needed? I'll look into this.

<comment><AUTHOR> Hi, author here,

While yes, running a coroutine in a new task is in the standard library, that is only a component of what this library does, which is:

\- given an async iterable,

\- iterating over it in a new task, into a buffer,

\- and then returning an iterable that yields values from this buffer as it's filled.

I don't _think_ this logic is in the standard library, at least not at [https://docs.python.org/3/library/asyncio- task.html#asyncio....](https://docs.python.org/3/library/asyncio- task.html#asyncio.create_task) from what I can see.

<comment><USER15> Yeah, this actually looks pretty cool, it's a nice way to abstract a common pattern which is otherwise quite tedious, namely, that of spawning a bunch of tasks and have them feed each other work via asyncio queues.

Have you thought about making it work as a decorator?

<comment><AUTHOR> Indirectly: the initial version was a single function, so could have been used in a decorator easily enough.

The issue is what happens on exceptions to avoid tasks hanging around forever. Exceptions propagate "forward" in the pipeline fairly automatically. However, getting the ones "behind" the exception to notice: that was tricky. The best I came up with was the bit of state wrapped up in buffered_pipeline that notices the exceptions and cancels the tasks.

</comment></comment></comment></comment></comment></comment><comment><USER16> Fantastic, I've been wanting something like this since before async.

What is the mechanism used to parallelize, threads, processes or something else - it's worth mentioning in the readme.</comment>


RetroArch-AI-with-IoTEdge: Use Cognitive Services to Translate Retro Video Games - <AUTHOR> https://aka.ms/RetroArch-AI-with-IoTEdge-Github <comment><AUTHOR> I built a thing recently that I thought might be appreciated here:

Using IoTEdge with Cognitive Services Containers on top of lakka.tv to translate Retro Video Games: [https://github.com/toolboc/RetroArch-AI-with- IoTEdge](https://github.com/toolboc/RetroArch-AI-with-IoTEdge)

Curious what you all think about the idea? Personally, I was hoping to use this to translate some games that I picked up recently in Tokyo. Would an ability to play foreign games via machine translation on the fly be something people would actually use?</comment>


Musk and Tesla are doing much better than headlines suggest - <AUTHOR> https://medium.com/the-future-is-electric/musk-and-tesla-are-doing-much-better-than-headlines-suggest-9091d8ea59d0 <comment><USER2> Who upvotes this? The backlash against Musk and Tesla is solely through Musk's behavior. He acts like a penny stock fraudster and the negative press he receives is because of the Koch brothers? Surely Soros also owes my girlfriend a lot of money for protesting. Having created great products is no excuse for this kind of behavior.

<comment><AUTHOR> The article is not talking about a backlash it is simply stating the number of negative articles is a part of a coordinated campaign. Musks tweets do muddy the waters and created their own controversy. I think sans his tweets the argument could have been made more clear. Now everyone will just point to the tweets.

</comment></comment><comment><USER3> Maybe, but it's Musk's own tweets that really get people's attention, and you can't blame outsiders for them.

<comment><USER4> But you can blame the mainstream media for not also reporting all the good news about Tesla. It seems clear they have made an editorial decision to only tell bad stories.

It's especially puzzling because the MM is very concerned about global climate change, and that problem can't be solved withuout EV's, so you would expect them to be big Tesla boosters. Instead they seem to be following the Koch brothers directions.

<comment><USER3> I think you underestimate the power of personal drama to drive away other news. "Tesla sales up" isn't so exciting outside the business / car enthusiast pages.

Musk, on the other hand, is a celebrity. That means everything he does gets a lot of attention whether it's important or not. He successfully used personal drama for many years to gain attention. Recently this celebrity focus turned on him.

A conspiracy isn't needed to keep the media focused on celebrities; to the extent one exists, it's redundant.

</comment></comment></comment><comment><USER4> I'm not surprised there is a massive, coordinated attack against Musk and Tesla. What surprises and disappoints me is that the mainstream media has fallen for it so completely.

One theory I have heard is that the media gets a big part of its advertising revenue from the ICE auto manufaturers, and they have been pressuring them. I don't know if that is true, but it sounds plausible to me.

<comment><USER5> The mainstream media acting like congress courting lobbyists isn't too surprising at this point. Their profits and margins are down from their peak and they were getting bought out by billionaires since Rupert Murdoch at the very least and the trend has continued. They have had an increasingly luddite bent and have grown openly hateful of tech companies as they found themselves losing to fact checking websites and social media in accuracy and wide spread reach. Furthermore they spare the actually widespread hated telecom monopolies like Comcast - who advertise frequently with them. Not soley them but they have many reasons to be biased. Plus their tendency to go with what they think will drive views and money.

Tesla's valuation is something that should be legitimately swingy in my opinion - their future path while it has longterm viability how long until setbacks slow advances or allow others to catch up or surpass them. There are plenty of pioneering companies who made great strides in a field only to ultimately go bankrupt. Electric cars are a clear part of the future given efficiency and many reasons to improve batteries aside from them but Tesla being the one to end up in the lead much less a winner on year by year time tables is less certain. Disclaimer I own a few shares of TSLA in case it becomes the next big thing. A small loss so far but it may rise again.</comment></comment>


Remember Rust with Anki - <AUTHOR> https://www.argpar.se/posts/programming/remembering-rust-with-anki/ <comment><USER2> Personally, I never use a pre-made Anki deck. It feels like skipping over the initial learning period that I'm trying to lock-in with further study. Making every card I use myself means that I won't be totally baffled the first time it comes up, and there's a good reason I added it in the first place.

Using a pre-made deck just feels like a barrage of random information like this: [https://twitter.com/zbgolia/status/1138489910757920769](https://twitter.com/zbgolia/status/1138489910757920769)

<comment><USER3> Agreed; but once reading through [https://doc.rust- lang.org/stable/book/](https://doc.rust-lang.org/stable/book/) it is nice to have a deck like this. I wish it would be standard that all docs and books would include an Anki deck. I cannot remember squat without practice.

</comment></comment><comment><USER4> I strongly recommend Anki, not just for learning Rust but for learning anything. It is a really amazing and underutilized tool. Not everyone likes flash cards, and it won't fix that, but it does make them far more effective.

</comment><comment><USER5> It would be helpful if there were a few sample cards added to the blog post.

<comment><USER6> Agreed. Here on my phone in the gym, I'm really curious about the cards. To see them, I'd have to find a computer - last I checked I can't upload a deck from ankimobile.

<comment><USER7> Here's a few screenshots [https://imgur.com/a/OMvlzij](https://imgur.com/a/OMvlzij)

</comment></comment></comment><comment><USER8> On one hand, I understand how beneficial is to learn a new programming language. On the other hand, having to constantly beaten by mixing up simple language syntax, googling how to find an element in an array, or even create an Anki deck to revise from time to time is so funny to me.

The one thing that actually helped me to jump between languages and platforms is Haxe. Just use the same syntax and API for the basic stuff, and put the focus on actually building the program. I still have to understand and know well about the target (be it C++, JS, or Python), but the time and the mental effort saved from googling about basic syntax and standard APIs is massive.

</comment><comment><USER9> This just isn't complete without rewriting Anki itself in Rust.

</comment><comment><USER10> While Rust is great, one of the things I love with LISP (Clojure) is once you spend 3 min learning the syntax you know it or can guess the syntax in 99% of cases. No need to look up how to do something complicated, just look at the order of arguments.

</comment><comment><USER11> I did the same thing for Java about a year ago:

[https://ankiweb.net/shared/info/647806244](https://ankiweb.net/shared/info/647806244)

<comment><USER7> I'd love one of these for Elixir/Erlang and probably more so Haskell.

</comment></comment><comment><USER12> If you need flashcards to remember syntax, you're probably not writing/reading enough code.

<comment><USER13> If you're writing 'enough' Rust, you're probably a Mozilla employee.

<comment><USER14> I've been writing almost exclusively rust in my day job at ThreatX for about 3 years now. It's getting picked up more and more in production everyday. It's a great, modern, maintainable, secure alternative to C/C++. I couldn't imagine doing another greenfield project in C again.</comment></comment></comment>


Ask HN: How to connect with developers/startups who are looking for a designers? - <AUTHOR>

Hi HNers, I need your advice. I am designer with a good portfolio and 6+ years of experience.
I am looking for some projects/jobs as freelancer. Where to start looking for a people/startups
that need their projects (web/mobile/marketing material) designed? I can deliver fast,communicate well and
prove my work exp with my portfolio. Do you know anyone who is looking for a designer? Thanks in advance for any advice<p>ps. My email is: email@example.com (if you want to see portfolio or have a job offer/advice) <comment><USER2> I know that this is under development, and it looks like it addresses your issue: [http://adune.co](http://adune.co)

<comment><AUTHOR> Thanks for sharing. I saved this link so we will see what happens when they launch.

</comment></comment><comment><USER3> Another route is to go to your local developer meetups – even if the topic isn't directly related to you – and ask around.

<comment><AUTHOR> This is good advice and probably one of the best methods to meet people. I am currently looking for some other options( online communities) as there is not enough developer meetups in my area. But thank you for advice, I appreciate it

</comment></comment><comment><USER4> Where's your portfolio?

<comment><AUTHOR> Hi Kevin, I have sent you an email with link to over 100 designs I have done. Please take a look. Thanks</comment></comment>


History API broken bad in iOS 9.3 - <AUTHOR> https://forums.developer.apple.com/thread/36650 <comment><AUTHOR> My cordova application's history management stopped "randomly" working with "SecurityError: DOM Exception 18" exceptions. The reason (mentioned in the link I found) is a limit that has been recently introduced by apple to prevent a security flaw.

It doesn't make any sense for me. This might break a lot of applications and Websites that rely on the History API.</comment>


Price manipulation in the Bitcoin ecosystem - <AUTHOR> http://voxeu.org/article/price-manipulation-bitcoin-ecosystem <comment><USER2> A very weak article - is it really surprising that someone who had access to the back end was able to buy enough to drive the price up?

There is a better version of the story here: [https://willyreport.wordpress.com/2014/05/25/the-willy- repor...](https://willyreport.wordpress.com/2014/05/25/the-willy-report-proof- of-massive-fraudulent-trading-activity-at-mt-gox-and-how-it-has-affected-the- price-of-bitcoin/)

</comment><comment><USER3> All they do make a regression analysis and say that two traders traded on days the market went up. Given you can actually track every transaction you would think they would be able to point to size of the transactions, percentage of daily volume, or something more interesting. Instead they simply tell you the average amount the rate increased in days these guys traded.

Weak.

<comment><USER4> But their conclusions are fair, they don't overreach and call for more study on the matter as any scientist should do.

 _As mainstream finance invests in cryptocurrency assets and as countries take steps toward legalising Bitcoin as a payment system (as Japan did in April 2017), it is important to understand how susceptible cryptocurrency markets are to manipulation. We encourage the nascent cryptocurrency industry to work with regulators and researchers to share anonymised transaction data so that more confidence can be placed in the veracity of exchange rates._

<comment><USER3> But they didn't show manipulation. They showed two parties trading on up days.

<comment><USER5> Heard of the Look Elsewhere effect?

Obligatory XKCD: [https://xkcd.com/882/](https://xkcd.com/882/)

<comment><USER4> Not really relevant here however.

And they call for more study to confirm or deny their finding. So far so good.

It's people that might overact in a way or another, this article is just a piece of data.

</comment></comment></comment></comment></comment><comment><USER6> I haven't read this paper, but I remember it being theorised that Mt. Gox operated on a fractional reserve by using bots to manipulate the price.

That after being "hacked" and losing the coins, they kept operating even though they knew they couldn't payout everyone. They tried to make up the losses by manipulating the market against their users.

</comment><comment><USER7> I thought it was common knowledge that cryptocurrencies get pumped and dumped. And they're unregulated so it's legal to do so if you are a whale.

<comment><USER8> This is not about pumping and dumping, it's about misappropriating client funds. Using your own money to pump is debatable. Buying Bitcoins with money you do not actually have (but promise to be available for withdrawal at any time) is fraud.

</comment></comment><comment><USER9> I don't see the relevancy to today's Bitcoin price? Presumably MtGox was able to execute the fake trades because they didn't have to provide the money for it? It was simply a number in the database, if the dollars couldn't actually be withdrawn?

Sure, another market could try to pull the same stunt, but do they even have the same scale nowadays? There are many more markets than at the time of MtGox.

<comment><USER10> I don't think many people claim this things can happen in such scale any more.

I see this article as an additional proof that the spike back then was caused in large part by the ponzi scheme MtGox was.

(Having said that, there were also other good news back then that helped the price - like the hearing in US Senate regarding crypto, that went very well)

</comment></comment><comment><USER11> Talking about price manipulation, maybe somebody here from MIT knows if this is something official, or - manipulation? [http://litecoin.mit.edu/](http://litecoin.mit.edu/)

<comment><USER12> What's that?

</comment></comment><comment><USER13> _Due to the unregulated, decentralised environment in which they operate, cryptocurrencies are under constant threat of attack._

Due to the fact they have money, financial systems are under constant threat of theft and fraud.

FTFY

<comment><USER10> Also, such attacks make the system more robust in long term.

Kind of like open source systems end up safer long term, because every single day people are trying to find bugs in their source codes.

<comment><USER14> except that every update introduces two new buggy features for each bugfix, while the usability is not always great except where copied from existing solutions

</comment></comment></comment><comment><USER15> An interesting analysis that Nanex twitted some weeks ago: [http://parasec.net/transmission/order-book- visualisation/#sh...](http://parasec.net/transmission/order-book- visualisation/#shinanigans)

The visualization code (R) is available here: [https://github.com/phil8192/ob- analytics](https://github.com/phil8192/ob-analytics)

</comment><comment><USER16> This article could be a tweet with that table.

</comment><comment><USER17> TL;DR: Researchers claim to have proof that the 2013 spike to $1,000 was engineered through fraud. It's unclear how much relevance this has to today's far deeper markets. Which isn't to say there isn't fraud going on today, as even a casual glance at ICOs will show, just that it's going to be that much harder to manipulate the price.

 _In recent work, we show that the first time Bitcoin reached an exchange rate of more than $1,000, the meteoric rise was driven by fraud (Gandal et al. 2017). We leverage a unique and very detailed dataset to examine suspicious trading activity that occurred over a ten-month period in 2013 on Mt. Gox, the leading Bitcoin currency exchange at the time. We first quantify the extent of the suspicious /fraudulent trading activity and show that it constitutes a large fraction of trading on the days the activity occurred. We then show how this trading activity affected the exchange rates at Mt. Gox and other leading currency exchanges_ [at the time].

<comment><USER18> It is commonly accepted that the mxGoT willy bot was the cause of the price rise in 2013 from 200 to 1000 dollars.

History

Gox started as a trading platform in 2010 by McCaleb. He sold this to Mark in 2011. It is rumored that Mark was using customers BTC to expand Gox or/and it was already sold to Mark missing 80,000 BTC. When the price started to go up, Gox was forced to create the willy bot to try and buy back (at a higher price) the bitcoins they missing as they were running a technical fractional reserve). The willy bot drove the price up because it was always buying and in turn defeated its own purpose as it ended up bankrupting MxGot by driving the price so high that they could never hope to recover the missing btc. I wonder if they had not created the bot if they could have made GoT solvant again over a longer time frame.

This sort of thing is still happening, Poloneix is rumored to be inside trading, There was a DDOS attack a few days ago which caused price drops and it is rumored the Dossers were shorting the currencys on the exchanges. One of the exchanges had such little liquidity that a whale was able to dump eth yesterday causing a massive price drop on one exchange (which I am prety sure they then used to buy up cheap coins but you never know)

Anyone activity trading in Cryptoland is at the mercy of these whales, they are mainpulating price, daily pump and dumps on alts and no regulartion

That said, I cannot stop watching it all, i just hlod coins I like the technical merit of

Some light reading

History of Gox [https://en.wikipedia.org/wiki/Mt._Gox](https://en.wikipedia.org/wiki/Mt._Gox) Information on McCaleb selling to Mark talk of missing 80k [http://www.thedailybeast.com/behind-the-biggest-bitcoin- heis...](http://www.thedailybeast.com/behind-the-biggest-bitcoin-heist-in- history-inside-the-implosion-of-mt-gox) Links on Willybot [http://www.coindesk.com/bot-named-willy-did-mt-goxs- automate...](http://www.coindesk.com/bot-named-willy-did-mt-goxs-automated- trading-pump-bitcoin-price/) Poloneix insider [https://coinidol.com/suspicion- of-insider-trading-at-polonie...](https://coinidol.com/suspicion-of-insider- trading-at-poloniex/)

<comment><USER19> This is just what stock exchanges were like in the 19th and maybe early 20th centuries. Reading "Reminiscences of a Stock Operator" which covers the period ~1890s-1920s I was stunned by how common (relative to now) inside trading, price manipulation and short squeezes were.

Most of these are now prohibited which I'm sure doesn't eliminate them but it makes them much less common - short squeezes in particular are now very very rare. BTC markets obviously won't have any restrictions.

Amazon link for anyone interested in the book (make sure you get the annotated edition): [https://www.amazon.co.uk/dp/0470481595/](https://www.amazon.co.uk/dp/0470481595/)

<comment><USER20> Short squeezes happen all the time. Look at the ticker RH in the past few months, or AMD over the past couple days!

<comment><USER21> I think perhaps a better example would be the bulk shipping industry during November of last year; take a look at DRYS in particular. $5 to $120 in a week, followed immediately by a breakdown right back to $5. (It's split a bunch of times since then, so the adjusted prices on a current chart are different, but what's important to note is the exponential shape of the price action in conjunction with absolutely zero fundamental reasons for a price increase.)

</comment></comment></comment></comment></comment><comment><USER22> I have potential sources that the top trading firms in the world were involved in the manipulation.

<comment><USER23> Sources or potential sources? That makes a huge difference. A potential source that something is true means nothing. A source _at_ one of the top trading firms willing to verify this would be newsworthy (if confirmed).

<comment><USER22> Source is not _at_ one of the top trading firms, but _was_ at one of the top trading firms.</comment></comment></comment>


Apple Submits Updated Campus 2 Plans to Cupertino - <AUTHOR> http://www.appleinsider.com/articles/11/12/06/apple_submits_updated_renderings_plans_for_cupertino_spaceship_campus.html <comment><USER2> It's interesting to look at these renderings in the context of the story from a couple of days ago about working out at the office (<http://news.ycombinator.com/item?id=3314922>).

Treadmills in a conference room are certainly better than sitting all day. But instead of a treadmill, I'd rather just work in an office where I could go outside and take a walk. I hope more companies will start thinking about office design in the way that Apple has, even if they do it on a smaller scale.

<comment><USER3> When I worked at Apple, I lived about half a mile from campus. I'd often go a week without even getting into my car; I could walk to everything important, including grocery stores. There were three very good bookstores within a 20 minute walk [now all out of business, btw].

I miss that.

<comment><USER4> I can't imagine life _not_ being that way. I live in NYC and can walk to everything important, or take a short subway ride to anything else. I've gone months without getting in a car- if I ever move I think I'd miss that a lot.

<comment><USER5> Same here in Victoria, BC. (population: ~300,000) I think downtown living in most cities is similar.

<comment><USER4> Wow, someone from Victoria! That's a rarity. I went to UVic and lived in Vic for about three years. Getting around in Vic without a car is definitely a little more difficult, mostly because the bus service is so cruddy.

Still, I miss Victoria. I try to get back every year for the Beerfest.

<comment><USER5> Small world :) There are at least a few of us here on HN (that I know of).

Everything I need is downtown so I rarely bus anywhere. Living out by uvic would be annoying without a vehicle though.

</comment></comment></comment></comment></comment></comment><comment><USER6> One can only applaud this. You do wonder sometimes why companies spent so few $$ on relaxing office buildings. Looking into nature increases productivity and well-being; also there are a lot of findings on how to organize work floors for optimal collaboration etc. Most companies are just not interested. Doesn't make sense to me (except for short-term profits).

<comment><USER7> I was watching 'The Pixar Story' the other day and they talked about the campus they opened in 2000. Jobs talked about the importance of 'unplanned interactions' and workplace being key to the success of a creative company.

[http://www.armchaircommentary.com/2011/10/amazon-goes-to- pix...](http://www.armchaircommentary.com/2011/10/amazon-goes-to-pixar.html)

"Main Building

The Pixar campus opened in 2000. It was built on the location of an old canning factory and the factory vibe inspired the architecture. Steve Jobs, one of the Pixar founders was heavily involved in the design. He wanted Pixar's main building to serve as a central gathering place where employees would come several times a day to interact and share ideas. In service of this goal a cafeteria, coffee shop and the employee mail room were clustered within steps of each other within the atrium of the main building. Pixar lore is that Jobs was so obsessed with the idea of all employees venturing to this area at least once a day that he advocated for only having one bathroom on the campus. He was overruled."

<comment><USER8> For the curious, "The Pixar Story" is available on Netflix Instant

[http://movies.netflix.com/WiMovie/The_Pixar_Story/70083532?t...](http://movies.netflix.com/WiMovie/The_Pixar_Story/70083532?trkid=2361637)

</comment></comment></comment><comment><USER9> It's beautiful. After many decades of Silicon Valley turning from orchards and trees into strip malls and office parks, it looks like Steve wanted to take a little slice of the Valley and turn it back. The building itself takes up a very small part of the land.

</comment><comment><USER10> It's a simple concept. Make a place that people want to be and they'll come and they'll stay. Steve knew that he leaned heavily on each and every one of his employees, and that they delivered. I speculate that this was his vision on how to extend those people even further, by exciting them about the simple state of being on the Apple campus.

</comment><comment><USER11> That's one kickass walled garden... just what I'd expect from Apple. ;)

</comment><comment><USER12> This building is amazing on so many levels. It's got a very Zen quality to it, the symbolism of the full circle, and to my geek mind it reminded me of the iPod click wheel (wonder if the restaurant area is where the "menu" would be? :-P) It almost feels like last Steve's last One More Thing...

</comment><comment><USER13> Apple ought to make these images available in resolutions suitable for desktop backgrounds...

<comment><USER14> Who needs porn when you can have renderings of a corporate campus!

</comment></comment><comment><USER15> My wife is a landscape architect. I think she likes Apple even more, now.

</comment><comment><USER16> When I worked for HP, they were constantly trying to shut down buildings or do things which made the office spaces less desirable to employees to save money.

It's good to see Apple making things better.

</comment><comment><USER17> PDFs also aren't working for me. Does anyone know if there is a higher-res picture of the rendering posted? I would love a version as close to 1920x1080 as possible! ([http://cdn.iphoneincanada.ca/wp- content/uploads/2011/12/Scre...](http://cdn.iphoneincanada.ca/wp- content/uploads/2011/12/Screen-Shot-2011-12-06-at-6.01.01-PM.png))

</comment><comment><USER18> The darker colored roof perhaps suggests photovoltaic arrays rather than a high albedo roof as depicted in the original rendering.

</comment><comment><USER19> Does someone have a mirror of the plans? The links in the article don't work for me because of the load.

<comment><USER20> Doesn't look like much has changed from <http://techcrunch.com/2011/08/13/apples-new-headquarters/> which has links to scribed uploads.

</comment></comment><comment><USER14> The big PDFs aren't loading for me. Is the idea that the boxes on the bottom are the parking lots, and everyone needs to walk across the big field to get to the building? How far is that? Is there handicapped parking somewhere else?

<comment><USER20> There are 2 levels of parking underneath the main building. <http://www.scribd.com/doc/62205913/FloorPlan-Cross-Section>

<comment><USER14> Is there also some other 4-level parking structure somewhere? The scribd documents don't zoom quite enough to actually read the text.

<comment><USER21> That big diagonal looking structure seen in the site plan is a 4 story car park, with 3 levels sunken below grade (depending on which side of the structure you are looking at).

There are an additional 2 levels of parking below the main building, and a few other auxiliary buildings, including a remote physical plant.

</comment></comment></comment></comment><comment><USER22> the proposed vehicle circulation routes appear at odds with the renders. having a road running immediately around the outside of the building will certainly ruin the "embedded in nature" aesthetic they've got going on there.

<comment><USER23> A road? Were you looking at the floor plan for one of the underground parking levels?

<comment><USER22> first diagram in the link is traffic flow. there's a blue circle going all the way around the building. appleinsider has kindly cropped out any sort of legend, i suppose it could be underground though.

<comment><USER23> Ahh, you're right. I took a look at the PDFs and the blue circle indicates emergency access routes.

</comment></comment></comment></comment><comment><USER24> For those that have been following the development of the new Apple campus, there aren't a lot of changes from when the plans were first released several months back, so no need to click through to the article.

</comment><comment><USER25> Am I the only one seeing this?

[http://f.cl.ly/items/3M3D0X1Q3i3i0k2U3B3y/AppleCampusSpinner...](http://f.cl.ly/items/3M3D0X1Q3i3i0k2U3B3y/AppleCampusSpinner.gif)

</comment><comment><USER26> I wonder how the workspaces will be arranged; it seems like it might be tricky to mitigate glare on a glossy display with natural light coming in on all sides.

<comment><USER21> They could do a few things about it. The building is designed with big 10' horizontal louvers covering the facades, which will diffuse a lot of light so it isn't as intense. They can also coat the glazing with special film to reduce the effect. Additionally, it helps that the floor plates are really deep.

</comment></comment><comment><USER27> No words can describe how freaking awesome this is.

This could be one of the most influential and inspiring buildings in the world.

Up there with the Burj.

<comment><USER28> May I suggest you have a look at some of these in google image search:

pier luigi nervi

centre pompidou paris

lloyds of london

frei otto gridshell structure

norman foster masdar

norman foster gherkin

zaha hadid bmw factory

zaha hadid wolfsburg

jean nouvel institut du monde arabe

renzo piano padre pio

jean nouvel quai branly

schlumberger research centre

madrid barajas airport

Thats kind of a random selection from the 'hi-tech' taster menu.

</comment></comment><comment><USER29> Meh.

While it is certainly interesting from far away and above, very few people will see this building from that perspective. On the ground, this is going to look like a rather dull 4 story glass and concrete wall. There is nothing iconic or immense about it to the average visitor.

As far as I can tell, the wow factor is limited to those with helicopters.

</comment><comment><USER30> Am I the only one that fails to see what is so special about a donut shaped 4 storey building in a park like setting?

</comment><comment><USER31> cupertino.org seems to be down :(</comment>


WorkFlowy for iPhone - <AUTHOR> http://itunes.apple.com/us/app/id551139514?mt=8 <comment><USER2> I'm assuming this still has the 500-item limit like the full site?

It bugs me a little when apps aren't full-disclosure about their freemium model (Nothing in the app store description indicates it's anything but free to use). It seems sleazy, like they're waiting for you to start using and depending on it before telling you that you'll have to pay to get the most out of it. I'd rather know that I'm evaluating a paid product up front.

<comment><USER3> The referral policy on workflowy is quite good, if you want to try it. I have like 5k items on my list since I promote it heavily among my friends, but hardly use anything more than 1k any month.

</comment></comment><comment><USER4> I'm kind of sad to see this isn't a native app. Kinda happy as that was something I was cutting my iOS teeth on.</comment>


Ask HN: Owning a company while on H1B - <AUTHOR> I know similar questions have been asked several times and many times the response has been "you can't start a company and work for that company while on H1B without proper employer-employee relationship".
But this question is slightly different: Can I incorporate and own a company while I am on H1B and work for my sponsoring employer? I won't generate any kind of income from my company any time soon (may be never), the company is just for liability protection for me.
I know I can start a company in my home country, but I prefer having a US entity. <comment><USER2> Standard IANAL, or an accountant.

Personally, I wouldn't bother incorporating unless you have investors or creditors. Or if a tax person says it's in your best interests. You can blow a lot of money on lawyers and tax preparers for no good reason.

A corporation (or LLC) doesn't protect you from being sued. Anyone can sue you at any time for anything. If someone wants to sue you, they'll sue both you and the corporation. Even if you defeat the lawsuit, you'll still be on the hook for a big ol' lawyer bill.

Also, if you plan on borrowing money, a bank won't lend you money unless you have collateral. Until your company has assets, such as inventory, accounts receivable, publicly traded stock, a building, etc., anytime you want to borrow money you'll have to personally sign for it.

</comment><comment><USER3> Honestly, the laws are weird, please talk to an immigration lawyer. Many will do a free or low-cost initial consult.

It pains me to say it, but don't listen to the HN commenters - they may make you think something is fine that isn't fine, or may make you stressed about something that is fine, etc.

</comment><comment><USER4> Liability protection from what?

If you have a company and don't do any work for it, then you can't possibly be liable for anything because you didn't do anything.

If you did something then you did work for the company which is something you're not allowed to do.

Ultimately consider that if it ever comes up, you'll be dealing with a suspicious immigration official, who has the power to deport you and no reason to give you benefit of the doubt.

You will be deported if you fail to convince him that you registered a company but didn't do any work for it. And I don't see how you can claim that with a straight face. Your explanation of wanting liability protection doesn't make any sense.

<comment><AUTHOR> I want to launch one of my pet projects, I am not sure when I would receive my green card. Instead of launching the service on my name, _thinking_ an LLC would provide better liability protection.

I talked to an attorney who said I can incorporate a company and should be fine as long as there is no payroll. But I am skeptical going down this route.

<comment><USER5> What kind of attorney did you talk to? Business law? Immigration? Did you pay for this advice or was this just a casual chat?

I'm not an attorney but I think you got some bad advice. Working on hobby projects while on a visa is fine. Owning a business while on a visa is fine. Transferring IP you worked on while on a visa to a business you own while you're still on the same visa is an area I wouldn't play around with. Even if it is fine I can see lots of potential headaches any time you deal with immigration in the future.

</comment></comment></comment><comment><USER6> It is unfortunate but the reality is that H1B laws are very complex just like most US visas. You already know you cannot work for that company. So what is the point in just setting up a company ?

If you want to do your pet project, why not just build the project just as your own project. Don't work on it as a business including doing things like sales,marketing etc until you get the green card. What is the issue with that ?

If you are questioned about this company while entering the US from outside, you could get yourself into trouble. It is very hard to convince the immigration officials that you have a company but you don't work for it. So technically it is legal to create a company while on H1B but in practice, you are opening yourself to unnecessary scrutiny.

It sucks but that is the truth. Accept it, get the green card and then work on your company.

</comment><comment><USER7> IANAL but yes anyone can own a company or start LLC, even foreigners outside of the US.

However, on H1B you cannot work for such LLC, you will be in violation of your visa status. But I am not sure if non-income generating, administrative task such as filing annual reports count as working for your own company. You should check with a lawyer on this.

Finally, owning an LLC may create future issues with immigration. Even if you don't violate your visa, immigration officers may assume that you did. It might be easy to clear up with additional documentation but I would not risk it.

</comment><comment><USER8> I am interested in doing something similar. Please PM me and we can discuss about this. Creating an LLC will allow me to market it better and have UI freelancer work for me. I want to bring in a development agency who does the work. Are you thinking something in the same lines?

</comment><comment><USER9> My advice: Hire an immigration attorney if an informed answer to the question is important.

Good luck.

</comment><comment><USER10> Since you said its for a pet project, I am not really sure why you need a company but if you really want one why dont you open in our mom's name in your own home country (assuming its an online business)

</comment><comment><USER11> Short answer - yes you can. Though, it's a serious hassle since you need to have someone running the company from A to Z for you. You can only be a passive owner/investor. That's it.

</comment><comment><USER12> IANAL, but yes, you can.</comment>


PhD or Not PhD: that is the question - <AUTHOR> http://matt-welsh.blogspot.com/2010/09/so-you-want-to-go-to-grad-school.html <comment><USER3> This is a very fair view of the scene, and it all rings true. But do remember that it is written by a professor.

Speaking as someone who has been seduced into academia on multiple occasions by my friends who are professors: They are hopeless optimists. This is not their fault. Indeed, it is a precondition for their existence: just as you would not be surprised to find that most of the creatures sitting on top of a high crag have wings and can fly, you should not be surprised that most professors, and especially most tenured professors, are completely besotted with their lifestyle and can barely conceive of anything else. Darwin has seen to this. The academic environment is all about selection pressure.

For example, this essay is by a particularly self-aware and wry professor, so he's able to joke that "getting a PhD costs you a house". But self-critics don't last long if they go for the jugular, so he doesn't point out that, if you wish to _continue_ doing research after your PhD, it's going to cost you another house, and another: Postdocs pay better than graduate fellowships, but still only half what industry pays, if that, and even less if you calculate the _hourly_ rate. And then to go any further you will need to start writing grants, and administering students, none of which is exactly research. Then you probably won't get to keep your job writing grants because it's hard to get the grants, and hard to get tenure... [1]

So, take this fellow's advice to heart, but be sure to also have a beer with a _real_ cynic before spending fifteen years in pursuit of academic nirvana.

\---

[1] I never studied CS, so maybe the grass is greener over there and CS is some kind of abundant academic paradise where grants flow like water. But I kind of doubt it.

<comment><USER4> One of the things I miss about academia is the ability to do whatever the hell I wanted too outside of work. This allowed me take on some fairly lucrative consulting jobs during the course of my PhD. Although I haven't looked too hard, it seems to me that once you get into industry it is very difficult to work on anything on the side without having to worry about things like IP restrictions. I think in California it is illegal for companies to try and restrict you from doing extra work outside contract hours, but from what I gather it is hard to find companies anywhere else that will agree to such a thing (well at least here in the UK). Actually it is one of my pet theories that this law is a significant contributing factor to the number of companies started in Silicon Valley. I'd be interested in hearing about any experiences people have had in avoiding such restrictions on after hours work, especially in the UK.

</comment></comment><comment><USER5> " _The only reason to do a PhD is because you love doing research._ "

Can't stress this enough. A lot of people do grad school just because they didn't like a string of jobs they had, think they need more training to switch to a certain specialty, or even just because they're still basically searching for what they want to do in life. Those are all excellent questions to ask yourself before taking another job, and also excellent ways to go into grad school with exactly the wrong attitude and become a huge dropout risk.

I got lucky and learned all this without having to go to grad school. My first job out of college was at my college because I turned my undergrad job into a fulltime role and the grad students were the only other people on that part of campus that were close to my age. The biggest difference between the ones that enjoyed the experience and those that _didn't even make it to the end_ was that the dropouts still didn't know exactly what they wanted to do in life, so they thought they'd try research only to get chewed up and spat out by tenure- starved associate professors.

</comment><comment><USER6> There is another approach to a PhD that this article did not mention. A couple of my friends are doing a PhD with the aim to be professors at much lower ranked universities where the research pressure isn't so high and the emphasis is more on teaching. They want the easier, more relaxed life that it offers.

One of them is more interested in teaching, and he wants to have the relaxed atmosphere of a lower university so that he can spend his free time (including whole summers) on his music, which is his true passion. The other one is a pretty involved family man, and he wants a laid back, relaxed job with some academic freedom to do interesting things and the ability to spend a lot more time with his family than a normal job would offer.

They're both midwestern folk, and are happy living in relatively rural areas in states that I suspect most HN users wouldn't dream of living in.

For some reason, the high powered paper-excreting types tend to look down on this approach or at the very least completely overlook it. I don't quite understand why.

<comment><USER7> Indeed this is a lovely route. Maybe I don't want to be in the cutting edge. But I want to be a great teacher. Someone that disseminates knowledge in a way that makes sense for the students. Someone that is influential en students lives and maybe those students will go and become great researchers.

So yes being "just" a great teacher is a worthy goal on its own.

Even if you don't discover anything new.

<comment><USER8> I completely agree and am thankful for the professors who take their teaching job seriously. To look at it from the opposite perspective, I dropped out of (a very good, top five in my field) grad school because I realized I wasn't brilliant and realized if I entered an academic career I would basically be a teacher. And I suck at teaching. And I had little interest in getting better.

I had other reasons for dropping out and have sometimes considered the above to be just a bad justification for a bad decision, but more and more I think that whatever my true reasons, it was a valid reason and a good decision. It would have weighed me down knowing that I was actually pretty bad at my primary productive role in society.

</comment></comment></comment><comment><USER9> I'm not really sure why the OP says that the Master's has more coursework than the PhD. At least in my Master's program at UMD, the PhDs have to take the same amount of classes as the Master's students. The only difference is that in the Master's, after you're done with your classes, you either write a thesis or a scholarly paper (for non-thesis based), and you're done. If you're a PhD student, you finish your classes, then you spend the next few years working on research towards your dissertation.

He might be referring to more work for an MS Comps, which is the non-thesis Master's. Instead of writing a thesis (which counts as 6 credit hours) you have to take 30 credit hours worth of classes, and half of those classes must be "MS Comps," where at least 50% of your grade in a class (at least here at UMD) must come from exams. I am doing a thesis-based Master's, so I guess you could say I am able to take all my classes just as a PhD student would - <USER2> that in most classes there is a research project due at the end of the semester on a topic of your choosing. This allows you to shape the course to your liking and interests.

For me, being a Master's student has afforded me just as many research opportunities as a PhD student; I just won't be here as long.

<comment><USER10> He means that the students finish up their coursework during their Masters program, so the PhD work is usually entirely research. Thus during your Masters program, you frequently don't get a good idea at all of how the PhD program is.

<comment><USER9> I'm not so sure that's what he means. If you look in the comments, the OP says "Ah yes. I should have pointed out that this article only applies to PhD programs in the US (in Computer Science). ... A UK PhD, for example, is rarely seen as equivalent to a US-based PhD, precisely because it is so short and does not typically involve coursework."

For the universities I applied to, you are still required to take classes in the PhD program. Even if you already have your Master's and decide to go for a PhD at another university, your class credits may not transfer (in fact, I was told at a graduate visit day at UMD that they don't accept credit from MS programs other than their own), so you might even have to do the required coursework all over again while going for your PhD.

Personally, I was able to find a graduate research assistantship my first semester here at UMD, whereas most of the incoming PhD students are in teaching assistantships. I feel like I'm getting a good taste of how research/the PhD program.

<comment><USER10>
      >> I was told at a graduate visit day at UMD that they don't accept credit from MS programs other than their own

I don't know how common this is.

I know lots of people (probably most) that get their Master's at a different place than their BS, but don't know any that got a PhD at a different place than their Master's - maybe because as you say the barriers to moving are too high. People that aren't happy where they got their Master's don't get a PhD at all.

(My experience is with the U.S. system)

</comment></comment></comment></comment><comment><USER11> Almost 20 years ago, I went back and earned my PhD in computer engineering after serving a 4 year military commitment I incurred for my ROTC scholarship.

A few things I should point out: 1) You _can_ finish in 4 years. I did. You just have to be organized and not allow your advisor define your pace. I finished ahead of some of my undergrad peers who went straight through. They waited for their advisors to tell them when they were ready. 2) I did my PhD mainly because I wanted the challenge. Life isn't just about money. I had fun doing it, I learned a lot about myself and my field, and I'd do it again. 3) The payoff isn't just the credential. Having done it, I am no longer intimidated by things I don't know how to do. 4) This quote is silly: "Once you have a PhD -- and even during the process of getting one -- you are able to be your own boss. Rather than working on someone else's vision, you are the one to define the vision" You don't need a PhD to be your own boss, and getting a PhD is not a ticket to being your own boss. That quote leads me to think the author doesn't have much of a clue about the world outside academia.

</comment><comment><USER12> "If you are serious about going to grad school, I do not recommend [working in industry "for a year or two" and then appling to grad school "later."]"

This suprised me. It is what I did, as well as several other people in my year. The difference in maturity and competency between the people who have worked in industry and those who haven't is night and day. In my experience, people who have spent time in industry are _much_ stronger PhD candidates.

<comment><USER13> That might be true, but it's irrelevant. The right question to ask is, "what will make me better off after 7 years? 2 years exp -> PhD or PhD -> 2 years exp?"

I suspect PhD -> work is better, since the 2 years of industry experience will probably be at a higher level.

<comment><USER14> It really depends on the industry. There are two factors at work, speaking as an interviewer. Experience trumps everything, really. You will learn more about being a real, working programmer in one year of doing it than in 5 years of study. Remember that we're not here to _write code_ , we're here to solve problems using code as a tool. An important tool, sure, but there is more to it than that.

Secondly a PhD is really an apprenticeship to be an academic. A PhD who is not on that track needs to have a good story as to why.

Starting in industry after a PhD doesn't put you any higher on the ladder than a fresh BSc graduate.

<comment><USER8> _Starting in industry after a PhD doesn't put you any higher on the ladder than a fresh BSc graduate._

Where you enter the industrial career ladder depends mostly on the kind of experience you would get in industry, but you can get that kind of experience in a PhD program, too, possibly much faster. If you work on a large software project, collaborate with other people on software projects, plan and execute programming tasks, make presentations, and teach undergrads, you'll be hired well above the level a good fresh graduate would. Your initial position will reflect some conservative doubt about the quality of your experience and how well you will adapt to the "real world," as we rather unfairly like to put it ;-) but it will still be a significantly higher and better-paid position than a fresh grad would get, and you'll be prepared to move up quickly to a senior position. Of course, the depth of knowledge you obtained in your specialty will mean nothing, and your research skills will mean nothing to the people who hire you, but your ability to organize yourself, think methodically, and execute long-term projects will separate you from your competition and make you an obvious candidate for quick promotion.

On the other hand, if all you learn about in grad school is your research topic, and you manage to get by without developing any of the skills I mentioned above, you will indeed be starting from square one, in the same position as a 22-year-old except with less energy and less time before you die.

</comment></comment></comment></comment><comment><USER15> On masters vs PhD: here in the Netherlands you have to do Bachelor -> Master -> PhD. I don't think it's at all common to skip masters and go straight to PhD. And pretty much anyone who completes bachelor continues with master.

<comment><USER14> Some UK courses now are 4 year MEng vs 3 year BEng + optional 1 year MSc (FWIW I started on the former and ended up doing the latter for various reasons).

<comment><USER16> In Scotland there used to be 5 year MEng courses - very popular starting points for PhDs.

</comment></comment></comment><comment><USER17> Is it really as miserable as PhD Comics makes it seem?

<comment><USER3> Not necessarily for any particular person. So much depends on your personality and that of your adviser, coworkers, and other prominent folks in the field.

But all the bad things happen to _someone_ , often one of your friends. For a Ph.D. holder reading PhD Comics is an exercise in nodding with recognition.

And I haven't read all that much PhD Comics so I don't know if it plumbs the real depths. Do characters in the comic become suicidally depressed? Do professors drive talented eighth-year students to drop out by making crazy demands on their time? Do students find themselves drafted as poorly paid, no- equity employees at their adviser's startup company? I saw all of that happen to one friend or another in the real world.

<comment><USER13> _Do professors drive talented eighth-year students to drop out by making crazy demands on their time?_

This is a pretty rare occurrence. The talented eighth year student, I mean, not the professor making crazy demands on time.

Another very common occurrence, mostly absent from PhD Comics, is a professor failing to kick out an untalented/unmotivated student in their second or third year. The result is that the student wastes 5 more years in the fruitless pursuit of a PhD, eventually dropping out due to neglect by their adviser.

Getting to a tenured professorship is a tournament. Many apply, but only a select few will win. The problem is that very often, no one tells you when you were eliminated. They just let you carry on as if you still have a chance.

<comment><USER3> I absolutely agree: The hardest thing in academia is to get honest feedback. Partly because telling academics that they are not going to succeed is like kicking puppies, but more because of the conflicts of interest: To succeed as a prof you _need_ to attract good students, and a prof with a reputation for judging students harshly might have trouble recruiting. Academic adviser is one hell of a job: You must advocate passionately for your students, and you must also correct them, and you must motivate them, but you should give them honest advice...

</comment></comment></comment></comment><comment><USER14> Interesting what he says about US vs UK PhDs, given that Cambridge has just overtaken Harvard in the world rankings.

<comment><USER18> I recommend the anonymous comment starting: _It's unfair to characterize a UK PhD as "a good US Master's thesis"..._ [http://matt- welsh.blogspot.com/2010/09/so-you-want-to-go-to-...](http://matt- welsh.blogspot.com/2010/09/so-you-want-to-go-to-grad- school.html?showComment=1284106457670#c5898977344578639248) — it's pretty fair and accurate.

<comment><USER14> The thing with the UK system is we specialize a lot earlier. A 16 when you choose your A-levels you are already making choices, then you go to university to focus on one subject, there's no "choosing your major" after a year or two. And it's not even the case that the US system produces noticeably better generalists; UK people just pick that up as they go.

<comment><USER18> That's true, but as you say UK students aren't necessarily that tied down. I moved (in the UK) from a physics undergrad to research in machine learning and statistics. This sort of move is common.

</comment></comment></comment></comment><comment><USER19> Good article, nice balanced view of both sides.

I have always had on my someday list to do a PHD in developing a quantitative model for information security risk using power laws because I believe it is something that is badly needed and something I am passionate about. I started to explore the problem here: [http://rakkhi.blogspot.com/2010/07/security- return-on-invest...](http://rakkhi.blogspot.com/2010/07/security-return-on- investment-roi.html)

Could I do this online while doing my full time job? What are some universities that are quite cost effective and would support this type of online / distance learning model for a PHD?

<comment><USER20> Northcentral University does an online PhD in CS for 27k GBP. You could also talk to folks at Open University. They have a wide range of MPhil and PhD interests and might advise you. And yes, you can do a PhD and work at the same time. Depends what motivates you and makes you happy. If you cannot wait to be productive and find things out, the sky is the limit. Just watch out for burn out...

<comment><USER19> Thanks for that. 27k still a decent chunk of money - wonder what my return on investment will be for that.

Think its going to stay on my someday list for now, who knows if by software as a service business does well I can focus on a PHD full time while the money still keeps coming in

</comment></comment></comment><comment><USER21> I've never seen the appeal of grad school CS. I love programming, making money, learning, creating, building, reading and writing, but I can do _all_ of these things outside of grad school. And do them much cheaper and faster and with greater flexibility. I can even try to push the state of the field forward, if I wished. (Personally, I don't care about this aspect.)

</comment><comment><USER22> No effort is ever lost. (The saying of an ancient Buddhist teacher).

<comment><USER23> ...Though some effort is more valuable than other effort. "Success or failure" is usually a false dichotomy.</comment></comment>


How Google Routes Around Outages - <AUTHOR> http://www.datacenterknowledge.com/archives/2009/03/25/how-google-routes-around-outages/

<comment><USER2> Interesting article - I was affected by the apps outage which only lasted about 1hour, so it was not that big of an issue. I suppose more than anything, the biggest concern for Google are software bugs as opposed to hardware issues...

Puts perspective on when we make updates to our production server! Although the scale is obviously exponentially larger for google, outages and bugs makes us all stress out in a similar manner ;)</comment>


Show HN: PanoPanda – service for sharing panoramas - <AUTHOR> http://panopanda.co

<comment><USER2> At a glance, it doesn't seem like they're doing anything panorama-specific. The input must already be a "high resolution image" (presumably stitched) and the output is simply a map tile viewer, with the input image sliced up into squares at different zoom levels. Their lack of panorama support shouldn't be a huge issue in the majority of cases, as long as the images are cropped vertically. If you want to capture and share panoramas, there are pretty good options like Occipital's 360.io or Google's Google+-only Photo Sphere. Not sure if there are any great options for sharing high-resolution panoramas, but maybe PanoPanda could grow into that?

</comment><comment><USER3> Hah, reusing Leaflet is a smart move !

I have 3 remarks:

\- I'd like to be able to download the panoramas. They look like a particularly good fit for wallpapers

\- If I can't download them, I'd like to see and explore them in fullscreen

\- The "back" button doesn't work if you opened a direct link to a panorama

Nice work anyway !

</comment><comment><USER4> Read that as PedoPanda, because Pedo Bear[1] has scared my subconscious. Might not be an issue with the general population.

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

<comment><USER5> Not that it matters for anyone outside Finland but "Pano" means "Fuck" (ie, to have intercourse but a dirtier word) in finnish.

</comment></comment><comment><USER6> I thought the point of viewing panoramas was that it was seamless at the edges? I.e. it wraps around. PanoPanda does not do this, and it seems like it's just a simple app to "view image at different zoom levels + panning".

</comment><comment><USER7> Nice work. How well does it work on mobile?

<comment><USER8> On an iphone 5 I can't scroll past the first image.</comment></comment>


Picnik Shut Down by Google - <AUTHOR>

I received this email in my inbox:
Official Announcement: Picnik is closing
Since joining Google in 2010, we have been creating editing magic in Google products while continuing to keep Picnik awesome. But now we get to focus on even awesomer things. Picnik will be closing on April 19, 2012.
Your photos liberated Amazing photos are created in Picnik, so we have launched a new feature, Picnik Takeout, that easily downloads your photos to your desktop in convenient zip files. You may also elect to copy your photos to Google+ where you can store and share your creations. You may request your photos at any time and use this handy tool as many times as you like until our closing date of April 19, 2012. Learn more.
Premium Refunds To our primo Picnik Premium members, we'll begin processing a full refund of your current membership fee within a week of this announcement. By "in full" we mean the whole darn thing. Yep, this means even if you are on your very last day of an annual membership, we will refund you the entire $24.95. Just because we want to say thanks.
Now the Good News - Free Premium for ALL! To express our gratitude for your support over the past 5 years, Picnik Premium is free for everyone! Use Picnik in all of its premium glory, for free, from now until our actual closing day. Touch-up, Textures, Advanced, and more are all free for you to use!
We have been incredibly proud of building a product that is used and beloved by so many of you. We continue to be amazed and humbled by the photos you create and we are immensely grateful for all of your support, creativity, and passion.
We are excited by the photo-editing fun we have already brought to Google products, like Google+, where you can find many of your favorite Picnik effects in Creative Kit. We encourage you to visit Google+ and give it a whirl.
Please visit the Help Hub for more information on our wind down, and check the Picnik blog for updated information on our April closure.
It's been awesome, Team Picnik <comment><USER2> <https://news.ycombinator.com/item?id=3491497></comment>


Ask HN: How should I apply for U.S. jobs as a non-resident? - <AUTHOR>

I'm a software developer living and working abroad. I'm not an American citizen, but have lived in the U.S. for a better part of a decade as a student and obtained an advanced engineering degree from a top school while there.
Recently I've been thinking of applying for jobs in the US - the incredible variety of both startups and established companies seem like great places to learn and build oneself as a professional.
Probably relevant - I don't have a work VISA or a green card (I did apply for one), and I'm married + baby. I have several questions:
1. Where to start? This is a vague question, I know, but I'm looking for input from someone who'd be considering non-resident applicants: the checklist I should follow, planning ahead, etc.
2. Am I being realistic? I mean, as far as interviewing goes, this won't be simple to either side, even if I'm considered as a valid applicant.
3. Any other advice that's relevant to myself and others who might be thinking about or in the midst of doing just this?
Thanks! <comment><USER4> I don't know from experience, but since I've considered doing the same I'll write down what I know.

Assuming you aren't a Canadian citizen, the usual way is to apply for several companies who are willing to sponsor a H-1B visa and get an offer from one of them. Until a few years ago the number of applicants used to be way over the H-1B visa cap, so you had to go thru a lottery even if your application was OK. This was the number one reason I never even applied.

<http://www.workpermit.com/us/us_h1b.htm>

But recently the number of applicants has sharply decreased and is below the cap, so if you get the offer and pass all the requirements (have a college degree, etc) you should be able to get it.

One problem with H-1B is that if you lose or quit your job you have to get another job within 30 days. Personally I'd avoid early-stage startups because of that rule: I wouldn't want to be in a position to find a job that quickly.

Another possible problem is that your spouse can get a visa but cannot work (until you both get a green card, which might take a long time).

You should check out the websites of companies you'd like to work for and see if they do the H-1B thing. Also, check the list of top visa sponsors:

<http://www.myvisajobs.com/Reports/Top-Visa-Sponsor-2011.aspx>

I hope this helps.

<comment><USER5> >> you have to get another job within 30 days. <<

I don't think you get any days at all, you have to get the visa approved for transfer BEFORE you quit your existing job otherwise you're out of status. I strongly recommend anybody planning to do this to check with a lawyer. According to what I found on the net (I am not a lawyer):

      Under current law, H1B visa has no stipulated grace
      period in the event the employer-employee relationship
      ceases to exist.

(from <http://en.wikipedia.org/wiki/H-1B_visa> )

      the applicant becomes out of status when the applicant
      loses his or her job. The laid off H-1B worker will be
      considered out of status even though he has valid H-1B
      visa in his passport or valid I-94 card."

(from <http://faq.visapro.com/H1B-Visa-FAQ12.asp> )

<comment><USER6> This is law. But in practice if you will get new job in reasonable time - <USER2> should be ok. But of course - this is grey area and you'd better secure new job before leaving old one.

</comment></comment></comment><comment><USER7> I watched non-US students and post docs battle this all through my time in graduate school. Our system here in the US is completely backwards when it comes to training, and then keeping, the world's brightest. Country of citizenship plays a role, as do soft skills that "mesh" with whatever US business culture you want to enter. If I was trying to do this, my introduction email letter would be along the lines of:

"Hi, I'm [name] and I want to work for [specific person/department] at [company]. I earned my [schooling] at [top school] and those [multiple # of years] are like gravity pulling my family to the US. [Something about returning to stay and having my baby grow up in the US]. I know that the visa process can be a pain, so let's chat about working for [company] and clearing the paperwork out of the way."

An introduction like this makes it clear that: 1\. You're comfortable with colloquial English 2\. You're here to stay and build 3\. You have a family and aren't going to walk the aisle for a green card. 4\. The visa process is one you're familiar with and will attack.

Good advice for all candidates to any job in the US, whether you are a citizen or not, is to get your resume in the hands of people that do hiring, and not human resources.

</comment><comment><USER6> To get first H-1b you need established company (once you are here you can change employers much easier). Most startups will not qualify due:

a) revenue - they have to have positive cash flow showing constant income allowing them to pay for your work (you have to be full time employed for H-1b visa). This can be proved by contracts and tax returns.

b) number of citizens/perm residents employees. I heard this and I bet this is not a law, but probably a rule - USCIS looks for 5 "local" employees per 1 foreigner.

c) Time between filling papers and getting into US will take at least 6 months. Add some preparation time for lawyer. Startups usually can't wait that long. This may be mitigated if you can work for this company remotely.

You can go my route - I obtained first visa with small company by working for them for 2 years remotely and then asking them to sponsor a visa. I paid all fees. Once got there I found better local job. H-1b visa can be transferred to another employer and this process takes only 2 weeks with premium ($1000) processing.

Another route - apply for a job in big corporation. These companies often have processes allowing them to wait 6 month and pay all associated fees if you are good enough. Again, this big company can be just first bridge to get there, 'cos right after you got there - it is much easier to get new/better job.

<comment><USER8> @c I believe the expedited service only takes two to three weeks, but I don't know how much other paperwork is involved that might add up to 6 months.

<comment><USER6> You are correct. But You can't start work before October 1st. Since application are being accepted from April 1st (and you'd better apply in first day) - there is 6 month gap.

</comment></comment></comment><comment><USER9> To answer your original question, you want to get an H1-B visa. This will require the extensive cooperation of your prospective employer, and is far likelier at a large, established business with established immigration processes. Depending on the marketability of your skills, though, it is a perfectly realistic thing to do.

But more broadly, one way or another the US is going to experience a massive fiscal contraction over the next few years, and holding down a job here might become difficult. Why the US in particular? (I'm in the US on an H1-B, and married to a USian whose parents need care, so I'm here for a while, but definitely worried about what the US is going to look like in five years time.) (Yes, I'm going for the marriage visa.)

</comment><comment><USER10> If you're fresh out of college (even with an advanced degree, i.e. PhD) and don't have much in terms of industry experience, you might find that some employers are not willing to go to the effort of sponsoring you for a H1-B.

An alternative, short-term solution, is to apply for a J1 internship visa. If you are a student or if you graduated in the last 12 months, you are eligible to work as an intern for up to 12 months, after which you must return to your home country.

It's worth noting that you would have to work as an intern, so you might not get paid as much as a full employee, but it is possible to change your visa status at the end of your internship if your home country states that it doesn't require you to return.

This means that if a company isn't willing to sponsor you for a H1-B because you're unproven, you can do an internship for a trial period and if you make yourself indispensable, they might be more willing to sponsor you afterwards.

It's a bit of an ugly workaround, but in theory it works! (Disclaimer: I am not a lawyer, but this is an avenue I have been researching a lot recently and I believe that what I have said is true. Do your own research before committing to anything)

</comment><comment><USER11> It depends a lot where you are from and what citizenship do you have.

If you are from Canada, some countries in the UE and a few others, it is pretty easy. You can even apply for the work permission when arriving in the USA.

For other countries, you have to find a job an go through the H1-B process (expensive for the company) and that can take a few months. Waiting for the green card will take even longer (4 or 5 years).

So most people that I know that came to the USA, they got a job in a large company (microsoft, etc) that applied for their H1-B. After arriving to the US, they applied for the green card themselves.

hope it helps..

<comment><USER12> Can you elaborate on applying to work permission when arriving to the US? From what I knew you ned a visa before arriving to the US.

</comment></comment><comment><USER13> I just went through the H-1B process and moved to USA in the beginning of this year. I'm not an American citizen obviously and I also studied in a university outside America.

My answers to your questions:

1\. Where to start?

All major tech companies at this point would be willing to sponsor H-1Bs for promising candidates. Very early-stage startups will be hesitant to sponsor them (it's expensive both in terms of money and time). So try interviewing with companies like Amazon, Google, Facebook, Yahoo, Microsoft, LinkedIn.

2\. Am I being realistic?

Well I can't speak to your CS skills but considering that you claim to have an advanced degree from a top school in USA, I don't see why you would have problems interviewing and getting a job.

3\. Other advice

For the past couple of years (since the financial crisis), the no. of H-1B applicants have reduced drastically and hence there are fewer applicants than the per-year H-1B cap. This is great news - all you've to do is meet the visa requirements, get a job offer from a good company, and let the company sponsor your visa, and you're done. This wasn't the situation a few years back when there used to be a flood of applications within hours after the application process was opened (usually on Apr 1 of every year).

But you still have a small issue - applications open in April and the earliest you can travel to USA is in Oct of that year. So you've to think about the timing issues and see if your employer is willing to wait for you for that long. Generally this is not a problem with big companies since they're always hiring and they can always fit you in. It all depends on how good a candidate you are and how desperate the company is for you really.

</comment><comment><USER14> Just be upfront about your situation in your cover letter. It'll save everyone time. Put it in your first introductory paragraph.

From my limited exposure, it does seem like most companies are willing to sponsor for the right candidate. Even small startups seem to have the capability to do so.

One thing to keep in mind is relocation costs. Larger companies will often help with this. Smaller companies might expect you to carry this burden yourself. You should figure out the cost and figure if you can cover it - <USER3> not, this is something else you should be upfront about.

</comment><comment><USER15> Are you considering just on site jobs? You may try to work remotely. I work like that without any visa for many years. It takes a bit longer to find a contract but it works very well for me.

</comment><comment><USER16> H5 visa is good option too. You have all rights as normal USA citizen and no restrictions.

It lasts for 3y and can be extended for another 3y (I'm not sure what happens after 6y total..).

If you are unemployed for 45days visa will terminate (and you need to leave USA), but renews automatically when you get a new employment (in 3y period).

See more here: <http://www.kateraynor.com/z-visa/h5-visa.html>

<comment><USER17> Never passed into law: [http://en.wikipedia.org/wiki/Secure_America_and_Orderly_Immi...](http://en.wikipedia.org/wiki/Secure_America_and_Orderly_Immigration_Act)

<comment><USER16> My bad. Thx for info!</comment></comment></comment>


Ask HN: Best sites to market a mobile app? - <AUTHOR>

I'm building a tech startup simulator (www.hipsterCEO.com) and have submitted it to the usual sites for early coverage (148app.com, Ars etc) - can anyone out there suggest other sites I should contact? <comment><USER2> [http://mobile.smashingmagazine.com/2013/07/12/top-ten-app- pa...](http://mobile.smashingmagazine.com/2013/07/12/top-ten-app- part-2-marketing-launch/)</comment>


Steve Jobs giving an in-house speech at Apple, circa 1997 - <AUTHOR> http://www.youtube.com/watch?v=vmG9jzCHtSQ

<comment><USER2> Thanks to Apple people from third world countries have better education? No. They have free access to the internet? No. What has Apple really achieved, apart from having all their shops packed with people looking for cables, adapters, plugs, docks and batteries that only work with their products?

I'm having a deja vu moment. A company selling proprietary software and hardware? Yup, I've seen that before.

</comment><comment><USER3> So simple, and yet still so relevant.

Back then, "57 Channels and Nothin On"; today, 10 mbps.

I wish my company could return to such a clear message.

Love them or hate them, Apple has its act together.

</comment><comment><USER4> Awesome speech, but world changing? no..</comment>


Ask HN: Protect computers against malware? - <AUTHOR>

I have some clients using my applications. Since the Internet become cheap in Tunisia, all people went online and the result is hundred of viruses and malware attacking their computer.
The problem is even worse: they become addicted to the net + Anti Viruses software like KasperSky and Macafee are doing nothing.
This result for system instability. My clients are running windows, so I wonder if anyone has previous experience in this field.
How can you protect non tech-savvy people from viruses? <comment><USER2> How much control do you have over the computers? Just the power to suggest whatever best practices they can understand?

If you can, get them to stop using internet explorer, and stop logging in as root. Using a separate drive or partition for data, and making a practice of reinstalling the OS from the CD whenever they're infected can be good, too, especially if you can make a known-good image with all their applications and the latest patches.

Successful security involves a certain mindset, though; and if the owner of the system isn't willing to adopt that mindset, your efforts will only go so far.

</comment><comment><USER3> Tech savvy people should already know how to prevent viruses. Use Firefox. Don't download random crap.

<comment><AUTHOR> sorry they are non-tech-savvy.. of course!</comment></comment>


Hacker House South Bay Forming - <AUTHOR> https://post.craigslist.org/u/ODYr0wek4BGDsZfsWGbpQw/r5nz5 A Hacker House around Mountain View to Santa Clara is forming.  Check it out if you are interested. <comment><USER2> You've linked to the management page for the post.</comment>


Monte Carlo profiling - <AUTHOR> http://stackoverflow.com/questions/3045556/how-to-profile-my-code/3068045#3068045 <comment><USER2> It doesn't have to be a slow function either, it could just be a function that's getting called a ridiculous number of times.

Back at Electric Cloud I was working on debugging an apparently live locked build process using our tool (this was back in 2004) where make would run forever with the CPU pegged.

It turned out that the particular build tree structure (at the file level) was somewhat pathological for our tool and we were traversing the tree a ridiculous (exponential) number of times relative to its size. We were doing this to constantly calculate a value that depended on sub-tree size.

After ages trying to narrow down the bug I just went into the debugger and broke in to look at a particular data structure. After doing this a few times I noticed that I was always in the same function.

Memoizing the function fixed the problem.

</comment><comment><USER3> This is how common profiling tools (such as gprof) actually work.

"Profiling also involves watching your program as it runs, and keeping a histogram of where the program counter happens to be every now and then."

"The run-time figures that gprof gives you are based on a sampling process, so they are subject to statistical inaccuracy."

\-- <http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html#SEC11>

<comment><USER4> This is also (roughly) how profiling JIT compilers (like most JVMs) work. The method that needs the more expensive optimizations applied to it is the one that gets the most samples.

</comment></comment><comment><USER5> Also known as Poor Man's Profiling (see <http://poormansprofiler.org/> or [http://webcache.googleusercontent.com/search?q=cache%3Apoorm...](http://webcache.googleusercontent.com/search?q=cache%3Apoormansprofiler.org) as it seems the site's down).

It's a pretty good technique, actually.

</comment><comment><USER6> $ pstack PID

Combine with watch

$ watch pstack PID

On RHEL6 pstack is in gdb RPM package.

(bonus: shows all threads)

<comment><USER7> Yes, I've used this and it's great for anything where you want a C-stack backtrace.

As a variant, if you want a language-level backtrace in an interpreted language, you can:

\- set up a signal handler which dumps a (perl, python, etc) level backtrace

\- hit the program with the signal a few times

<comment><USER6> Great idea!

My Python server processes during testing handle 2 signals SIGUSR1 & SIGUSR2.

SIGUSR1 : runs guppy memory usage & leak profiling (<http://guppy- pe.sourceforge.net/>)

        import guppy
        _hpy = guppy.hpy()
        log(...,_hpy.heapu(),...)
        log(...,_hpy.heap(),...)
        log(..., <other _hpy info>...)

SIGUSR2 : open an interactive console using rconsole (<http://code.google.com/p/rfoo/>) and let me log and muck around with live object while the server process keeps running.[NOTE: don't use on production systems, it opens an RPC port that lets anyone control your process remotely!]

            from rfoo.utils import rconsole
            rconsole.spawn_server()

Then on the console:

             $ rconsole

</comment></comment></comment><comment><USER8> I can't help but boggle at the suggestion that in this day and age there are programming environments where doing this is less work than running a real profiler. I mean, come on, profilers that can't handle recursion or that can't show higher than function level granularity?

<comment><USER9> Well, it means compiling with profiling, running, visualizing the output, and then figuring out the hotspots. That takes some amount of work. (Or you run with valgrind, in which case it runs so painfully slow that before you've gotten to the slow part, you've gone home...)

Compared to that, firing up the debugger and hitting break is pretty easy. If the hotspot is like core meltdown hot, it's probably faster.

<comment><USER8> Plenty of tools don't require recompiling anything for profiling. Running the program once for profiling seems like it should be less work than running and interrupting it 10 times (heck, a lot of tools won't even require restarting the program if it already happens to be running). Visualizing the output by function or by something more fine-grained should be a matter of a single command. And if it's easier to manually find the hotspots by looking at a bunch of stacktraces than the profiler output, there's something badly wrong with said output.

Now, I'm sure there are special circumstances where this method is the right thing. But that's totally different from it apparently being suggested as best practice to newbies.

</comment></comment></comment><comment><USER10> There are actually ways to profile python functions on a per-line function (e.g. the line profiler from Robert Kern: <http://packages.python.org/line_profiler>)

</comment><comment><USER11> Wow, I didn't know this technique had a name :) I used it today trying to figure out why a SharePoint application was eating up the CPU - break into debugger 6-7 times and 3 of those happened to be in the same function call or its children in the stack trace - problem found!

<comment><USER12> My team was writing a Linux-based PABX and a round of changes had caused lockups - but a weird kind. The machine was there, but just not responding. It wasn't dead, just maybe 100K times too slow. But when I hit alt-sysrq to shut the machine down and it responded instantly.

So I wrote an Alt-Sysrq handler that dumped the stack of the running process. The failed one was usually the one running so it was pretty easy to find, and then the stack trace told us enough about why it was deadlocked to make a fix without needing more investigation.

It was essentially just a one-sample sampling (monte-carlo) profiler.

</comment></comment><comment><USER13> It also works to find out in which loop a process is stuck in, and in this case with 100% accuracy :)

</comment><comment> eric-hu For people that have done this with success: how many times of closing an app do you consider a "few" times? Wouldn't you need to repeat this enough to make the result statistically significant--or is it more like a rule of thumb?

</comment><comment><USER14> For Java, running jstack a few times can be much faster and easier than tying up to a profiler and often will show your bottleneck or problem right away.

</comment><comment><USER15> aka "sampling profiler" as opposed to "instrumentation profiler"</comment>


Show HN: Chrome extension to hide Gmail inbox by default - <AUTHOR> https://chrome.google.com/webstore/detail/inbox-when-ready/cdedhgmbfjhobfnphaoihdfmnjidcpim?hl=en&gl=001 <comment><USER2> I am a Safari user but would use the hell out of this. I have my hotkeys set to go to a non-inbox view but would love to block it entirely until I actively want to see stuff.

<comment><AUTHOR> Thanks for your feedback @tosbourn. I only released this today, but if the Chrome extension proves popular I'll definitely look at porting this to Firefox and Safari.</comment></comment>


What If You Bought All 292M of the Possible Powerball Combinations? (US) - <AUTHOR> http://www.theatlantic.com/business/archive/2016/01/powerball-ticket-all-combinations/423930/?utm_source=SFFB&single_page=true <comment><USER2> Over drinks we had this discussion, $584M would buy you every possible combinations. Guaranteed win and, the $930M payout would be a tasty 60% profit! Unless someone else had the same idea, then you would split the winnings and end up with a quick 20% loss! What is worse, if some random person managed to get the right combination you would still lose 20% of your money.

There is a great statistical process in here for some bayesian.</comment>