Ask HN: What's the best investment you've made? - <AUTHOR> Public or private market — what's the best investment you've made? How sure were you when you made it that it would pan out as it has? How long did it take to pan out? And have your investments (number of investment, amount per investment) increased or decreased over the last ten years? <comment><USER2> I'm neither a VC nor rich, but the best investment I have made in terms of raw return was into myself when I started my computer servicing business with a capital of three hundred bucks right after high school.

It is pretty straightforward to reach a six-figure profit in consulting over a couple of years, and I'd be glad if I could just "repeat" this performance with a larger amount of money.

An experienced VC once answered my question about why he is flying first class and visiting us lame fucks in a third-tier town in Europe for two days and how he could justify spending so much money on us. He said it doesn't matter if he flies first class or not because if their investments don't work out they run out of money anyways, and if they do work out they make so much money that everything else becomes irrelevant. This put some things in the startup world for me in perspective, and I am trying to be not too harsh and frugal with myself since then.

<comment><USER3> He is spending it on himself by the sounds of it.

<comment><USER4> It also sounds like it's not even his own money...

</comment></comment></comment><comment><USER5> An apartment building in a gentrifying neighborhood. I was pretty sure it would pan out, since it's within walking distance of a train stop and had attractive early 20th century architecture. It's still panning out, as my equity keeps growing. The mortgage will be paid off in 13 years.

I have not been able to buy another income property since then as I had to buy a home for myself in the intervening time.

The biggest takeaway from the experience for me is that you should not buy a home for yourself, then rebuild savings for several years and subsequently buy an income property. Buy the income property first, and then let the tenants carry the mortgage. I doubt I would have bought another property if I had bought my home first.

<comment><USER6> Do you manage it yourself, hire a manager, or contract with a management company? The effort of dealing with maintenance and bad tenants seems like a big turnoff, and acting as HR for a management staff almost as bad.

<comment><USER5> I manage it myself. It's less than a part-time job, maybe several hours a month on average.

</comment></comment></comment><comment><USER7> Best investment I have made was investing in sending my younger brother to a 3 month rehab program. I have made business and real estate investments that have paid off well but none can compare to investing in my brother.

I was very unsure when I first made it. He is 1 1/2 years clean and doing extremely well. I don't think he would be with us today otherwise so I consider it an investment well made.

</comment><comment><USER8> I am more curious to know how did this question is in the front page of the website with less than 10 points, in less than 5 minutes of posting, and zero comments (at least by the time I wrote this comment).

And just to answer the question, I am not a fan of investments, after three failures during the past years where I lost more than 50% of my money after making the bad decision to buy stock from three banks around seven years ago, then with all my patience I waited and waited to realize that the stock was going down by the hour, after five years I decided that I didn't want to lose more money and sold, and lost exactly 54% of my initial investment.

Way to start my adulthood eh? :D

<comment><USER9> Ask HN posts rise faster than links, I believe, but maybe dang can clarify.

<comment><USER10> Also, other posts on the front page were stale. Most were over an hour old with, at the time I saw this one, only one other post under 1 hour.

</comment></comment></comment><comment><USER11> The best investment I made in terms of money? Married my wife. Having a life partner that understands money and makes sure I didn't make stupid money decisions is the best investment. It pays off in so many ways.

<comment><USER12> Wow, this is an interesting definition of investment. I've always considered my wife to be a blessing, but you are right -- a good wife is a great investment as well.

<comment><USER13> I've thought about it like this for the last couple of years: Finding a good partner is the most important decision you can make. After all of the promotions and successful business deals/ventures, if you fail to do so, chances are you'll lose ~50%. Easier said than done though.

</comment></comment></comment><comment><USER14> Philadelphia 76ers to beat the Chicago Bulls a few years ago in the NBA playoffs. Payout was something like 11-1 and our model had implied probability at something like 45% for Philadelphia.

Made like 50k.

<comment><USER15> Sounds to me like this wasn't your only bet of the year. How long have you been predicting NBA games (or other sports)?

<comment><USER16> They never mention the ones they lost ;)

<comment><USER17> I'm inclined to believe him. [https://en.wikipedia.org/wiki/Taylor_Caby](https://en.wikipedia.org/wiki/Taylor_Caby)

</comment></comment></comment></comment><comment><USER18> I don't remember the exact numbers but in 2013 I bought some tesla calls planning to sell them in a few weeks and hopefully make a few bucks. I forgot to sell them and when the contract expired they were in the money (TSLA had gone up almost 300%). Etrade bought the shares on margin on my behalf, and when I next logged into my account I was first shocked to see I owed Etrade about $16,000 and then amazed to see that I owned about $50k worth of tesla shares (on a maybe $1000 investment, I don't remember what the premiums were at the time).

So the short answer to your question is, dumb luck and sheer stupidity.

</comment><comment><USER19> Best investment (outside of investing in myself) was buying into Ethereum when they first announced it. In the 2-3 years since, that's been up nearly 50x.

<comment><USER20> I've only invested in two things outside of my 401k: Yahoo and Ethereum. Yahoo at $50, and Ethereum at $16. I am horrible at investing. I spent $200 on Yahoo and $40 on Ethereum, since I was just messing around, but damn do I feel discouraged.

<comment><USER19> Investing in spaces you don't know or don't have strong hunches is difficult. I'd recommend just putting money in index funds unless you feel really, really strongly about an investment and/or have some special knowledge of the space or company.

Though, in the long run, losing $250 while getting your feet wet in investing isn't that bad.

</comment></comment></comment><comment><USER21> 401k + boring old index funds. I started putting in as much as I could since my first job out of college. Still not even 35, and have already seen plenty of returns. Will I be the only person in my generation to be able to afford to retire?

<comment><USER12> You will not be the only one. Join the community at r/financialindependence

</comment></comment><comment><USER22> Best investment: Started farming just before the commodities boom.

Worst investment: Still am farming after the commodities bust. Luckily I enjoy it.

<comment><USER10> How did you get into farming? I have, and am considering, access to a family farm that presently just breaks even on farm income (poor wheat yield, but also some portion rented out for cattle), but makes a profit off of oil. I've contemplated learning and moving into the industry, also as a way to get out of the city (however small the one I'm in presently may be).

<comment><USER22> I grew up on a farm, so I had some involvement my whole life. The first year of my own business, I rented everything, and have slowly started growing from there.

Having people to give advice has been huge. If I were to do it again, I would want ensure I have that in place beforehand, be it family members or otherwise. The developer part of me is so used to being able to find all the answers online, but a lot of the farming knowledge is simply passed through the generations.

</comment></comment></comment><comment><USER23> A cheap state school computer science education. It paid for itself the first year I worked as a software developer.

<comment><USER24> For me it was English lessons, when I was 16 my mom paid less than 200 dollars for a year of English lessons in a shitty English school, I didn't want to study English at the time and I was angry because she did it without asking me (teenage me was really dumb). My English may not be perfect, but that year of English lessons pays itself several times every single day with my salary.

</comment></comment><comment><USER25> Student loans. Total investment will end up being something like $200k with interest included. Lifetime value added to my income will easily reach $4 million. 20X+ return.

<comment><USER26> I'm assuming you mean that you loan out money to students? Otherwise, that's likely a skewed calculation.

<comment><USER25> No, I mean my student loans. My salary is far above what I would earn without the degree. The day before I graduated, the best job I could get was a gas station attendant. The very next day I had an offer for an engineering position making 5x the hourly rate. Since then, my salary has quadrupled.

</comment></comment></comment><comment><USER27> Side projects as an investment of time (and learning). I know this is not really answering the question, but side projects have always gotten me my next job (moreso than any current place of employment) because they are a living portfolio and very easy to point to. In addition to showing I can ship a product. I credit side projects with nearly tripling my salary in just under 5 years.

</comment><comment><USER28> Index funds, mutual finds, ETFs, ect. Treat stock like vegas money.

The problem with stock is that it's very hard to beat the market, unless you work full time at researching what you invest in.

Be careful with real estate. What goes up will go down. Don't assume that "real estate always goes up" when no one can afford to buy a normal home with a normal salary.

</comment><comment><USER29> Relevant xkcd [https://xkcd.com/1570/](https://xkcd.com/1570/)

</comment><comment><USER30> 40€ invested in a bike helmet. I fell head first on a pointy rock wich broke the helmet (almost) open but my head was untouched. I left them a FB message and re-invested in the same model. By any length the best investment in my life. Other than that, continous self - education.

</comment><comment><USER31> I've made several great investments, including one that is currently paying out over $6,000/mo. However, these payments are made to someone else, because I always, always sell early. The markets are a painful place to come to know oneself.

I do have one tried and true piece of advice: invest in index mutual funds over managed ones. Their "average" return routinely outperforms most actively managed mutual funds. Worst case, you haven't paid a lot of management fees to the person who has lost money for you. (This is less true than in the past because traders now arbitrage against index funds. Nimble traders exploit the fact that index funds are mandated to buy certain positions.)

Don't use stockbrokers. If they really knew what they claim to know then they'd be fabulously wealthy without your help.

Burton Malkiel's Random Walk Down Wall Street is a good read.

</comment><comment><USER32> Mining bitcoin before it's first big spike to about $30. I remember the most efficient 3d cards were selling at a 50% premium on ebay as they were very difficult to find.

This was followed shortly by my worst investment, keeping my bitcoin on mt gox.

Anyone involved in the law suit? Any estimates as to how much we can expect?

<comment><USER13> Mark is out on bail... But I'm sure his inbox is full (if he's even allowed to use a computer at this point).

Your next best bet would be Jesse Powell of Kraken, I believe he's the one in charge of the bankruptcy.

Sorry for your losses.

</comment></comment><comment><USER33> I turned $1000 into $1800 in 15 min on an Apple WWDC options play. Not only did I make $800 I also learned to never mess with options again.

I turned $415k into $530k in 2 years from real estate from an insane booming market. Combine that with Brexit dropping interest rates to make for a rock- bottom refinance, and the mortgage is paid off via rent, so it's a passive income stream that has only expanded on it's profit margin since the refi.

I've also had a x10 startup exit but at small money ($3k -> $30k) but I'd consider that a net loss given how much time/reduced salary I put into it.

I think the key learning is diversification has won out - for every loss I've ever had, it was hedged against the multiple income/investment vehicles which have put me in the green over the last 7-8 years.

</comment><comment><USER34> Bought a domain name for $5,000 and sold for $350,000. Bought another domain name for $10, sold for $45,000

<comment><AUTHOR> Amazing. Care to share the names?

<comment><USER34> First one: NDA'd. Second one: chijia.com

</comment></comment></comment><comment><USER35> Probably my collection of Magic: The Gathering trading cards, if I were to sell them these days. ;)

The best investment that I actually converted to cash was AAPL that I bought in 2009, and sold in 2015.

<comment><USER23> I sold my collection years ago for about $1000 altogether. I started playing during 3rd Edition, had 4 of each dual land, a handful of older cards, and 4 of pretty much every card worth a damn from ice age until around when 7th edition came out. I doubt that $1000 came close to even breaking even on how much I spent on the game. However, if I still had those cards today, it would be a very different story. I never considered the cards an investment, though. I just liked playing the game at the time.

</comment></comment><comment><USER36> There are two that immediately come to mind for me. The first, and clear winner, was buying $200 of FB at ~$24, as I was currently running Facebook ads (which ultimately totalled $2M that year) that were wildly successful. It panned out extremely fast, as the rise in stock price had just begun when I purchased. I sold enough to break even when it tripled, sold a bit more around $100, and still have a bit.

The other one is somewhat tongue in cheek, but the ultimate ROI was essentially infinity. In 4th grade, I bought a pack of Pokemon cards. I got a Blastoise. I sold it to a classmate for $32. I then bought another pack. It contained a Blastoise.

EDIT: To clarify, I purchased that $200 in FB very early in my career, when it was a very major purchase. I own more than the original purchase now, as I bought more later, but I'm speaking solely about the original investment.

</comment><comment><USER37> > _what 's the best investment you've made?_

Bought stocks in late 2009/early 2010 when everyone said the world was melting down. I think I got into SPY around ~115, and it's almost doubled since. I just wish I had more money at the time; my return isn't so sexy in absolute terms.

</comment><comment><USER38> I did a computer science degree. it's taken about 2 years from when I started it to pay off in spades

</comment><comment><USER39> Coding bootcamp. Paid itself off in <4 months.

<comment><USER7> Very cool! What bootcamp?

<comment><USER39> Prime Digital Academy in Minneapolis, MN. Luck played as much of a part as anything else. The tech scene here is very much an applicant's market, and I doubt I would have gotten as high a paying job, as quickly, in another city.

</comment></comment></comment><comment><USER40> Apple in 2005. I was taking an investments class in community college and this was the investment decision I made as part of a homework assignment/project. Of course, sold too early to buy a house and ...

</comment><comment><USER41> The best investment I ever made was purchasing an old banged up Porsche 911T from a movie studio and keeping it garaged for nearly 13 years. I sold it for nearly 70 times the amount I bought it for.

</comment><comment><USER42> Bought a two bedroom flat when I was nineteen in a notoriously bad part of town, that was right at the edge of a gentrifying wave (and within walking distance of university). Got a flatmate who paid my whole mortgage and 50% of the bills then sold it when I finished uni for 3x what it cost me after doing minor repairs and a bunch of cosmetic work.

</comment><comment><USER43> My best investment was buying back shares from our VC investor after a few years, shortly before our startup took off. The investor lost interest in the Internet due to other failed investments (ca. 2002) and I was confident enough to pay off the price of the shares using my salary.

</comment><comment><USER44> Bought 150 shares of Apple in the late 90s (before it had a 7/1 split)

</comment><comment><USER45> Using my own money to attend conferences when my company didn't have a budget. I think spending money on your education/self improvement is the best thing you can invest in.

</comment><comment><USER46> Tesla at ~$30/share.

<comment><USER10> Slightly under. I'd been watching it and the price dropped from ~35 to ~28. I had the extra cash in my brokerage account, so I bought in. Did not expect that return.

<comment><USER46> Yeah it's been pretty crazy. At the time I was considering Nokia over Tesla...glad I made the right choice.

</comment></comment></comment><comment><USER47> My career. Every move to drive my career forward that involved doing things that were hard and scary rather then doing the same thing familiar things indefinitely.

</comment><comment><USER48> Fresh out of college, putting as much as allowed in my 401k.

</comment><comment><USER49> Learning to program.

</comment><comment><USER50> Shorting JPY when the LDP came back into power. I was dead certain that currency devaluation would be a major policy for them.

</comment><comment><USER51> The Ethereum crowdsale. I sold a small part of that recently, at ~60x profit.

</comment><comment><USER52> Have bought an expensive domain name for my business.

Also the worst investment yet.

</comment><comment><USER53> Yet to make one.</comment>


3,000th blog post - <AUTHOR> https://www.johndcook.com/blog/2019/01/29/3000th-blog-post/ <comment><AUTHOR> I still fondly remember the time when the blog's masthead was the image of a sailing ship reminiscent of the HMS Endeavour.

The always interesting and excellent content was what made me want to return and read more. The strong image of ship and the matching last names of ship captain and author made the blog recognizable enough that I did.</comment>


Ladyada hosts Andrew "bunnie" Huang on Ask an Engineer [video] - <AUTHOR> https://www.youtube.com/watch?v=gZeCvEa7OqI <comment><USER2> When I was in 6th grade I found Ladyada's website, that really annoying one with the white dots you had to click, and saw her newest project, minty mp3. I was really impressed and thought I would never be able to design circuits that well. It was already my goal to be an electrical engineer. Then a year or two later Andrew released his book "Hacking the Xbox", I read that in one sitting. Really awesome work. I was just floored by the confidence to go to all that work setting up a bus tap like that to extract the initialization code.

Anyway, these two have been people I've been envious of at times and inspirational figures at others. A little random, but I thought I would share.

<comment><USER3> I'll second these sentiments. In college, I caught her build log of the original Game Grrl. Seeing her take commodity objects and clone systems and turning it into a lovely end product was my spark to get into the world of hardware.

Her, Andrew Huang, and Ben Heckendorn are wonderfully inspirational creators and hackers that I've on countless occasions referenced and consumed all sorts of projects and ideas from.

<comment><USER4> When I was 3rd or 4th grade I would spend a lot of my free time on the internet reading the BenHeck forum. I got a lot of inspiration from the various diy portable builds and broke a lot of game consoles trying to emulate them.

</comment></comment></comment><comment><USER5> [https://youtu.be/gZeCvEa7OqI?t=29m9s](https://youtu.be/gZeCvEa7OqI?t=29m9s) Bunnie demonstrates his introspective phone collaboration with Snowden

[https://youtu.be/gZeCvEa7OqI?t=1h17m41s](https://youtu.be/gZeCvEa7OqI?t=1h17m41s) and his microcontroller for papercraft, Chibitronics

<comment><USER6> Bunnie was part of this great documentary on Shenzhen,

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

</comment></comment><comment><USER7> Around 17:45, is he talking about a _basis_ and other keys being a linear combination of basis vectors?

<comment><USER8> There's an example of a similar attack here:

[https://cryptome.org/hdcp-4attacks.htm](https://cryptome.org/hdcp-4attacks.htm)

<comment><USER7> Thanks. I don't know anything about crypto so I was just poking in the dark. From the resource I think I wasn't that far off but there's a lot I didn't understand (understood concepts but not consequences).

</comment></comment></comment><comment><USER9> Resonates really well with this blog post where the author explains how people are in constant contact with technology, but lost the skills to understand how it works.

[http://www.coding2learn.org/blog/2013/07/29/kids-cant-use- co...](http://www.coding2learn.org/blog/2013/07/29/kids-cant-use-computers/)

</comment><comment><USER10> As a hardware-first kind of guy, I really identify with bunnie. Would love to do the kind of stuff he is doing.

</comment><comment><USER9> Almost two hours explaining why DMCA is a direct cause why young Americans are going to be shitty engineers.

</comment><comment><USER11> I read that as LadyGaga and was feeling really confused.</comment>


BlueStacks Brings Over 750,000 Android Applications To Windows 8 And Surface Pro - <AUTHOR> http://techcrunch.com/2013/02/12/bluestacks-brings-over-750000-android-applications-to-windows-8-and-surface-pro/

<comment><USER2> Emulation doesn't help the platform that gains the emulated applications it just kills off any incentive for developing for the platform in the first place and the quality of applications goes down over time. The applications are, of course, also non-native and that brings with it the inability to take advantage of unique features of the platform. In the case of Windows 8 where it is trying to catch up to an older established platform (android) by adding value this is entirely counterproductive.</comment>


Oracle acquires Dyn - <AUTHOR> http://www.streetinsider.com/Corporate+News/Oracle+(ORCL)+Enters+Agreement+to+Acquire+DNS+Provider+Dyn/12270020.html <comment><USER2> Inspired by other Oracle-bought products, perhaps they can make it so you can only update your DNS if you use their proprietary Java client, which uses an out-of-support version of Java even though Oracle own Java, and which tries to install adware every time you install/update it.

(An out-of-date Java being a requirement of a recentish version of Oracle Financials, and Java on Windows defaults to installing browser toolbars every time. Because Oracle need those extra few cents from tricking users.)

</comment><comment><USER3> There is a open source alternative: [https://www.nsupdate.info](https://www.nsupdate.info) You can roll your own or just use the one they setup. [https://github.com/nsupdate- info/nsupdate.info](https://github.com/nsupdate-info/nsupdate.info)

The project is well maintained and they focus on security.

<comment><USER4> I also setup a Dynamic DNS service, on top of Amazon's Route53, over at [https://dhcp.io/](https://dhcp.io/)

Unfortunately I had to suspend new registrations due to abuse, but the code is open and available on github:

[https://github.com/skx/dhcp.io/](https://github.com/skx/dhcp.io/)

</comment></comment><comment><USER5> Damn no! should i move to another dynamic dns provider then? have to check my router for which are supported :(

<comment><USER6> roll your own with Amazon Route53? that what i am thinking of doing...

<comment><USER4> There are a few guides out there, for example:

[https://willwarren.com/2014/07/03/roll-dynamic-dns- service-u...](https://willwarren.com/2014/07/03/roll-dynamic-dns-service- using-amazon-route53/)

[https://www.flynsarmy.com/2015/12/setting-up-dynamic-dns- to-...](https://www.flynsarmy.com/2015/12/setting-up-dynamic-dns-to-your-home- with-route-53/)

I setup a simple service to do the same thing, but unfortunately I had to close new registrations due to abuse. The code is open and available at github though:

[https://github.com/skx/dhcp.io/](https://github.com/skx/dhcp.io/)

</comment></comment></comment><comment><USER7> I have been unsing [https://freedns.afraid.org](https://freedns.afraid.org) for 3 years. Seems to be a good service.

</comment><comment><USER8> What percent of Oracle acquisitions don't end in either purposefully shutdown or shutdown due to management failure?

</comment><comment><USER9> I created my own service a while ago, use [https://github.com/longsleep/mydyns](https://github.com/longsleep/mydyns) as pointers if you want to roll your own. I am certain there are plenty of similar solutions to run your own dynamic DNS.

</comment><comment><USER10> Awful! Just finished evaluating them and went with DNSMadeEasy instead. Doubly glad of that decision now...

</comment><comment> noir-york Symantec buying LifeLock, Oracle buying Dyn... hurry hurry get your acquisition in before Thanksgiving!

<comment><USER11> Wait until they can repatriate offshore money next year. That will trigger a lot of acquisitions to just spend the money somehow.

<comment> noir-york Interesting point.

</comment></comment></comment><comment><USER12> earlier submission with more discussion: [https://news.ycombinator.com/item?id=13005172](https://news.ycombinator.com/item?id=13005172)</comment>


Meaningful VC Exits: Can Your Startup Generate Venture-Scale Returns? - <AUTHOR> https://medium.com/jme-venture-capital/meaningful-vc-exits-2bb5702776e2#.8n0f7ypx0 <comment><AUTHOR> This made the math crystal clear for me in a way I have not seen laid out before.</comment>


Baptism by Fire: A New York Firefighter Confronts His First Test (2014) - <AUTHOR> http://www.nytimes.com/interactive/2014/06/22/nyregion/rookie-new-york-firefighter-faces-first-test.html?ref=sonny <comment><USER2> I really hate this kind of writing. After five paragraphs, I still don't know where it is going. What a waste of my time.

<comment><USER3> What part of "Baptism by Fire: A New York Firefighter Confronts His First Test" did you find unclear?</comment></comment>


Comcast To Compensate Throttled BitTorrent Users - <AUTHOR> http://torrentfreak.com/comcast-to-compensate-throttled-bittorrent-users-091222/

<comment><AUTHOR> The answer is $16. You can get $16 for being throttled.</comment>


The Self-Medicating Animal - <AUTHOR> https://www.nytimes.com/2017/05/18/magazine/the-self-medicating-animal.html?rref=collection%2Fsectioncollection%2Fscience&action=click&contentCollection=science&region=stream&module=stream_unit&version=latest&contentPlacement=5&pgtype=sectionfront&_r=0 <comment><USER2> Probably the most significant excerpt from the article:

The broader implication here is that some animals may be practicing a kind of science, observing cause and effect, experimenting and learning. The University of Oxford evolutionary psychologist Robin Dunbar argues in his book "The Trouble With Science" that not only is science not unique to the West or to the developed world, but that it's not exclusive to humans. "Science is a genuine universal, characteristic of all advanced life-forms," he writes. It's how living things figure out the world around them.

<comment><USER3> What is an advanced life form?

<comment><USER4> I guess "intelligent" seemed to loaded to describe mere animals.

</comment></comment></comment><comment><USER5> But if a person does this we call them a criminal and punish them.

<comment><USER6> There are plenty of things that animals do that earn disapproval, even horror were they done by humans to other humans.

The praying mantis decapitating and devouring her mate, is one example. Infanticide and cannibalism are quite common in the animal kingdom. Many sex acts engaged at by animals and especially insects would be considered deviant if not simply insane were humans to carry them out. The list goes on and on.

That said, I'm completely against the War on Drugs. But saying animals use drugs is not a very convincing argument against it.

</comment></comment><comment><USER7> Ants do something similar:

[https://www.newscientist.com/article/dn28077-ant-knows- how-t...](https://www.newscientist.com/article/dn28077-ant-knows-how-to-self- medicate-to-fight-off-fungal-infection/)

Survival instinct is pretty strong.

</comment><comment><USER8> Saw the headline and was expecting to see an article with a study about cats eating grass. Not so, but nevertheless an interesting read.</comment>


Making a Local Web Server Public with Localtunnel - <AUTHOR> http://www.twilio.com/engineering/2011/06/06/making-a-local-web-server-public-with-localtunnel/ <comment><USER2> There was a post about <https://showoff.io/> here not long ago. Seems they are doing quite similar things, except showoff.io costs a little. I didn't really compare features, though.

<comment><USER3> Localtunnel was mentioned there with quite a large discussion.

<http://news.ycombinator.com/item?id=2468324>

<comment><USER4> Ah, memories.

</comment></comment></comment><comment><USER5> i understand the case where you don't have a box with e.g. port 80 available and need to use their server as an endpoint, but otherwise is it really that hard to remember ssh -L and -R syntax as the article suggests?

i also don't really see where you'd need to tunnel and serve production traffic from your dev machine versus having a proper staging environment and testing there. that has "bad idea" written all over it.

> we're all starting to see the benefits of having a production-like > environment right there on your laptop so you can iteratively code and debug > your app without deploying live, or even needing the Internet.

actually, real professionals have seen these benefits for ages. that is SOP for good programmers.

<comment><USER6> A lot of great startups were engineered by non-"real professionals", meaning they had little to no formal training in software development and/or little to no experience developing software in a professional setting. A lot of SOP is learned along the way; it is not always so obvious at the outset.

<comment><USER4> Correct, but I'd also like to point out the self-taught freelancers, small web dev shops, and/or hobbyist hackers that like to build things in a way that's comfortable for them. I wrote that in that way ("we're all starting to see") because it's something I've noticed in the real world (even here in the Valley) that is not necessarily common knowledge yet.

</comment></comment></comment><comment><USER7> This is probably a bad idea. If you don't have access to or control over your local firewall, there is most likely an organizational reason for that (security). Opening up your development webserver to the public Internet without asking permission from your IT department first is a good way to either get hacked or to at least make some enemies within your corporate security department.

If you have access to your firewall, why not just open it up yourself?

<comment><USER8> > If you have access to your firewall, why not just open it up yourself?

If I want to temporarily open up my dev server so I can demo something to a client, this is beneficial because 1) it's a single line in my local terminal, not 30 clicks in a crappy router web admin and 2) it disappears as soon as I close the tunnel, I don't have to remember to undo the firewall changes.

</comment></comment><comment><USER9> I wrote a post a little while ago about DIYing this for people doing Rails/Rack apps on Mac who've got an nginx box public somewhere. It also uses a wildcard DNS trick to let you do all your apps with a single tunnel

[http://pogodan.com/blog/2011/05/03/reverse-ssh-tunnel-any- ra...](http://pogodan.com/blog/2011/05/03/reverse-ssh-tunnel-any-rack-app- with-pow-and-nginx)

</comment><comment><USER10> I like that this makes it easier to steal unreleased code, demos, etc by just enumerating all possible subdomains of localtunnel.com that are 4 alphanumeric characters long.

<comment><USER4> Yeah, if you wanted to make the effort. Ease of use was definitely the primary metric being optimized here. Perhaps it's not as important to have a short, speakable URL; in which case it could be a SHA1 hash or something. Maybe URL shorteners can play the above role if needed. What do you think?

<comment><USER10> Obscuring the URL from brute forcing would make it difficult to find random information site-wide (but using a hash is probably asking for trouble; just generate a long random string).

However, if I knew a specific person were using this service (which, since this is a public website whose URL you share with one or more other people), I could find other ways to find it and then break the application or server behind the firewall and have access to a multitude of juicy information to steal. It's kind of like saying to an attacker: "hey, instead of attacking a random web server you could attack the developer's workstation!" Black hats like lulzsec, etc would have a ball.

I recommend a simple username/password combo at the very least to prevent unauthorized access. The whole 'access-behind-the-firewall' concept still gives me the heebie jeebies though, and I think short of a VM on the developer's workstation I would be very afraid to use such a service.

</comment></comment></comment><comment><USER11> PageKite.net does something similar

<comment><USER12> Clickable: <http://pagekite.net/>

Thanks for the mention! Yes, we're similar, but built on more flexible technology (pure python, no ssh required, we can tunnel more protocols, etc.). Our solution is also open source for those who don't want to rely on a third- party front-end.

If people are trying it for the first time, I kinda recommend trying the new 0.4 release, it is way more user friendly than the old 0.3 which we consider 'stable'.

<comment><USER13> Although I haven't used any of the software, I greatly prefer the pagekite website to either localtunnel's or showoff-io's. Thanks for providing a depth of well-organized content. That said, you could benefit from simplifying your quickstart page and featuring it more prominently.

<comment><USER12> Thanks for the kinds words and the feedback! We got lots of good feedback last time these things were discussed here on HN, hopefully we've made some progress.

Regarding our quick-start, we absolutely agree - except rather than simplify it, we'd prefer to get rid of it altogether by improving the UI of the product itself to the point where it doesn't need so much explaining. That effort is ongoing and should launch later this summer. :-)

</comment></comment></comment></comment><comment><USER14> ok, I've use it for over a year now and it works well, but I still don't get why it gets reposted here for the 4th time.</comment>


Remember How Google Was Before the Internet? - <AUTHOR> http://smartstartup.typepad.com/my_weblog/2008/01/the-internet-ha.html

<comment><USER2> Fair warning to those who modded this up: These submissions are Y-combinator tests in disguise. Anyone voting for submissions from this classified pile, categorized as the-dumb-trap, is secretly disqualified from applying to the startup school.

<comment><USER3> This is hilarious, I think if anything it qualifies this blog for funding..

</comment></comment><comment><USER4> I remember well. You had a choice between chocolate chip or plain cookies and once an articulated truck pulled up and dumped 35452 tins of Spam on my lawn.

</comment><comment><USER5> Lolz!</comment>


Don't say you weren't warned - <AUTHOR> http://www.roughtype.com/archives/2012/02/dont_say_you_we.php <comment><USER2> There are even more dramatic revolutions to come. Look at what people like Kurzweil are predicting <http://www.youtube.com/watch?v=WPqjYrLhDnk> in context of things like Watson and videos like this <http://vimeo.com/20928952>

I think within 2-4 decades humanity (as we know it now) won't even be relevant.

<comment><USER3> _I think within 2-4 decades humanity (as we know it now) won't even be relevant._

Relevant to whom?

</comment></comment><comment><USER4> Ted Nelson was saying pretty much the same thing at about the same time!

<comment><USER5> As was Vannevar Bush in 1945, whose paper _As We May Think_ directly influenced both Nelson and Engelbart.</comment></comment>


Go 1.1 Function Calls - <AUTHOR> https://docs.google.com/document/d/1bMwCey-gmqZVTpRax-ESeVuZGmjwbocYs1iHplK-cjo/pub <comment><USER2> Russ Cox is a g'damn genius. You can spend hours being fascinated by his code and writing: [http://research.swtch.com/](http://research.swtch.com/)

<comment><USER3> Not only that, he's really helpful on the Golang Google group in answering questions to all programmers, new & old. What really hooked me onto Go was both the helpfulness of the Google group as well as the nice people on #gonuts.

<comment><USER4> > What really hooked me onto Go was both the helpfulness of the Google group > as well as the nice people on #gonuts

Same here, which is why I like to idle in the channel when possible (and occasionally answer questions when I can).

People often underestimate how much impact the community behind a language has. The Go community has been one of the friendliest, and also one of the most willing to share its knowledge.

FYI, it's #go-nuts, just in case anybody reading this is inspired to check it out.

<comment><USER5> I don't think it's accidental that people used to the same about the ruby community.

<comment><USER6> I find the Ruby community is still very friendly (maybe I am just reading too much into the past tense of your statement) and I was so delighted when I found out that the Go community was the same.

When reflecting at certain events a few years ago I remember that I was put off from learning <a language> because I stumbled upon some hostility within the community (I was just an observer in the incident, but it still affected me).

Reading some of the comments made me realise the friendly community and "healthy ecology" of a programming language are _very_ important (Disclaimer: that's my personal experience).

</comment></comment></comment></comment></comment><comment><USER7> OT: if Google thinks you have an account (based on a cookie I guess) it requires you to login to access this document. So you either need to login or delete the cookie or enable incognito/private mode to access the document.

Why doesn't google treat non-logged in users the same as those w/o an account?

<comment><USER8> > _Why doesn 't google treat non-logged in users the same as those w/o an > account?_

I wager what they actually want to do is treat those without an account the same as those who are not logged in, but realize they can't get away with that quite yet. (That is to say, I suspect that they would _like_ to turn away all users without accounts.)

<comment><USER9> That's a baseless assertion.

I'd assume (and I have no insider knowledge) that it's because Google assumes if you have a Google account that you probably want to be logged into it when using Google products. Otherwise it would suck if you tried to do something that requires an account and were told "log in" and then had to refresh the page, potentially losing state. The up-front login avoids some usability issues there. (Of course there are many ways to approach this, this is merely my hypothesis.)

<comment><USER10> With some insider knowledge: Because this document is commentable for (some) Googlers, though you don't see the comments on the /pub version that is accessible externally. Docs would rather force you to verify your state (Logged in or anonymous) than having some things 'not work' because you're expecting permissions from login cookies you don't have.

</comment></comment></comment></comment><comment><USER11> Wait. This is pretty much just "closure conversion," which is a standard, and widely known technique. Did I not read carefully enough?

<comment><USER12> In the abstract, sure; but what it was doing before was also "closure conversion". The interesting bit is in the specific implementation details.

Closures need the combination of code and data. There are multiple implementation strategies to pair the two together though. Delphi, for example, has implemented method pointers for a very long time as a pair of pointers, one code and one data.

When I added anonymous method support, that wouldn't fly because it doesn't handle account memory management (Delphi is not garbage collected). So I implemented a different form, using COM-style interfaces, where the code pointer is the first method after QI, Addref and Release. Since Delphi had auto-refcounting support for COM pointers, this solved the dynamic closure allocation problem; and since it was language independent, it solved the C++ interop problem.

</comment></comment><comment><USER13> There's a list of various Go design documents maintained on the Go wiki:

[https://code.google.com/p/go- wiki/wiki/DesignDocuments](https://code.google.com/p/go- wiki/wiki/DesignDocuments)

There are a lot of interesting reads in there.

</comment><comment><USER14> I got something like a 30% speed up switching go 1.0 to go 1.1 with some code that used a closure.

It is number crunching code (random forests) but go 1.1 is faster then gccgo as well (though i haven't tried the latest version of that).

</comment><comment><USER15> Not much to look at, but you can easily play with bound instance methods like the r.Read example in the doc at the playground: [http://play.golang.org/p/lnfidH3usx](http://play.golang.org/p/lnfidH3usx)

</comment><comment><USER16> Ios disallows dynamic code generation at runtime - what other environments could Go target with these restrictions?

<comment><USER17> Native Client, Android, ummm, pretty much any environment that is encapsulated in a sandbox.

<comment><USER16> Ah yes, Native Client. I assume Android allows it since it runs V8.

<comment><USER17> I guess Android has a different kind of sandbox than most typical software fault isolation based sandboxes (e.g. NaCl).

Its more reminiscent of plan9's per process namespaces than anything else. [http://plan9.bell-labs.com/sys/doc/names.html](http://plan9.bell- labs.com/sys/doc/names.html)

Regardless, the main issue that was preventing Go from running on Android was the linker's inability to link go pkgs as a shared library. Fortunately support for external linking on ARM is scheduled to land in the go1.2 release.

[http://tip.golang.org/doc/go1.2#gc_changes](http://tip.golang.org/doc/go1.2#gc_changes)

When it comes to go support for NaCl, llgo is imho the most promising solution for that. [http://github.com/axw/llgo](http://github.com/axw/llgo)

</comment></comment></comment></comment><comment><USER18> is 10 possible combinations of function and call a good thing? it seems odd to me. are other languages like that? having such a large number(?) seems to imply that the language has lots of special cases. which is worrying, isn't it? wouldn't it be better (all other things being equal) to have a smaller number of ways that function calls work?

<comment><USER19> It's fine since all the detailed goop is at the implementation level. Programmers need not care.

Making a distinction between known and unknown calls in the implementation is not only a good thing, but in a language with first-class functions it is all but inevitable because the performance win is so large. (The majority of calls are known, and known calls can be compiled significantly more efficiently than any general purpose call machinery.)</comment></comment>


Response to 'I'm turning 30 and I've produced no amazing art' - <AUTHOR> http://splinter.com.au/turning-30-all-ideas-no-execution

<comment><USER2> ... _my first app, which allows you to enter your 20 favourite recipes. It will then choose a week's worth of dinners at random, and compile a combined shopping list for you, and let you tick off the items as you purchase them. Now the market has decided that this idea isn't worth paying $1 for._ [...] _I can only conclude – the idea sucked._

This actually doesn't sound like a bad idea at all, and would definitely be something I'd get if I stopped working late and started cooking more. Anyhow, a good idea and a strong implementation do not guarantee success.

I'd guess one reason it didn't sell well is because nobody thinks to themselves "Oh, I need an app that randomly picks meals I already know how to make and gives me a grocery list." Rather, this is an app that people will stumble upon and decide whether they think it is useful or not. Perhaps the missing ingredient for this app's success was neither idea nor execution, but rather marketing and a bit of well-timed publicity.

Edit: Found the app ([http://itunes.apple.com/us/app/random- chef/id438618418?mt=8&...](http://itunes.apple.com/us/app/random- chef/id438618418?mt=8&ls=1)), and I would double down on my wager that it is a marketing/presentation problem: those first 2 screens definitely do not look very appealing. I'd scratch the paper texture--or if you really do want a paper texture, use something that you'd actually write a grocery list on, and not an ancient manuscript. The multiple different fonts throughout the app don't help with the readability or the presentation. Anyhow, the idea still sounds good, but how do you expect people to think it is well implemented when the first two pictures they see look like a mess!

<comment><AUTHOR> (OP here) Yup, that's the app - surprised you found it!

Hmm... If you think all it needs is a visual makeover and some marketing, how about I give you the source code and remove my version from the app store, and you can make it over and see how you go? If you have some success, all i want is for you to give me some marketing tips, let me know what you did that worked. Anyone up for this? My email's on my blog.

<comment><USER3> I would hope he found it!

A good app should be easily discoverable. Like if I plug in grocery list, dinner, automatic, or some combination thereof it should pop up everywhere.

Execution doesn't mean just coding something out and deliverying it. Execution means marketing, sales, business process, documentation, team building, and on and on.

Just like an idea is about vision, dream, purpose.

</comment></comment></comment><comment><USER4> I had always assumed that "execution" incorporated more than the act of getting a program functional.

You can imagine another version of YouTube with the exact same functions and launched at the same time that never quite took off. I would blame such a failure as an execution failure, not an idea failure.

Maybe working on 10 apps in the past year is another factor. Would really pushing 1 or 2 of those apps and iterating and improving on them been more fruitful?

To consider "executing well" as getting to a functional piece of software is a very narrow programmer point of view, and not a business/entrepreneurial point of view.

</comment><comment><USER5> Concluding that ideas are as valuable as execution because two poorly executed (but still executed) apps performed better than well executed seems to assume that everyone with the same idea could execute at all.

One surely has higher odds if success, if they were to execute every idea, without evaluating its value, than someone with perfect ideas but no ability to execute.

</comment><comment><USER6> I got more out of this post than the original post but this post wouldn't have been written if not for the original post. I think the author of the original post just needs to build some of his ideas with the capacity and attenion span that he currently has, and good things will happen, and he'll get the practice he needs.

</comment><comment><USER7> Pity those of us who have neither ideas, nor the ablity to execute them.

<comment><USER8> Just by reading hacker news daily, you will build up ideas and skills (to build skills I recommend going through the more tutorial-based posts on HN). Most people don't even know what HN is, so you're already a step ahead of them.

I'm guessing you're into programming so pick a few languages and learn them in your spare time - [http://stackoverflow.com/questions/194812/list-of-freely- ava...](http://stackoverflow.com/questions/194812/list-of-freely-available- programming-books)

For idea development, keep reading posts on HN, TechCrunch, GigaOM, VentureBeat, etc. Spend a few minutes daily writing down words / trends you notice for startup ideas / startups that are doing well and others that are doing bad. As you do this more and more, you'll start to notice really great trends, and you can iterate on them. Also for ideas, go through your day and write down every pain point on a sheet of paper (the writing part is important, typing it in isn't as useful!). As you build up both pain points and trends, you'll get the hang of mixing / mashing ideas!

<comment><USER9> I find HN, Techcrunch are great for technical trends. But in terms of ideas, I find "regular" forums to be a better bet. Reason is b/c you want to create something that targets a bigger audience. So I would recommend broadening your horizons, hang out in places like CafeMom, Pinterest, Sparkpeople, etc.</comment></comment></comment>


Here's How John Paulson Made $5 Billion Last Year - <AUTHOR> http://blogs.forbes.com/robertlenzner/2011/01/29/heres-how-john-paulson-made-5-billion-last-year/ <comment><USER2> John Paulson is really interesting in that he really played the entire credit cycle. He shorted it and then turned long at the right time and has been profiting from the recovery.

Most of the other guys who shorted the bubble got the part after wrong. They expected these doomsday/cataclysmic scenarios which never arrived.

I think the underlying lesson is that as an investor, when you are thinking of big picture themes, you really have to keep an open mind and have a willingness to change positions. Soros demonstrated that with his career.

There are tons of one hit wonders in the investment world because they let their egos get the better of them.

<comment><USER3> There was an interesting article in the Boston Globe the other day about this:

 _There's no great, complex explanation for why people who get one big thing right get most everything else wrong, argues Denrell. It's simple: Those who correctly predict extreme events tend to have a greater tendency to make extreme predictions; and those who make extreme predictions tend to spend most of the time being wrong — on account of most of their predictions being, well, pretty extreme. There are few occurrences so out of the ordinary that someone, somewhere won't have seen them coming, even if that person has seldom been right about anything else._

[http://www.boston.com/bostonglobe/ideas/articles/2011/01/09/...](http://www.boston.com/bostonglobe/ideas/articles/2011/01/09/that_guy_who_called_the_big_one_dont_listen_to_him/?page=full)

</comment></comment><comment><USER4> The article is a waste of time. Just explains that he charges high fees and makes more when his clients do.

Perhaps someone can comment on the positions that paid off.

<comment><USER5> The position is not that interesting (as I understand it): He bet that the world was over-levered beyond reason. That was not a terribly uncommon thought in '05-'08 (anyone paying attention knew the math didn't add up). The interesting part is the enormous size of the bets he made, that he was able to make them, and that he got the timing right. Don't know that anyone will write that article, though...

<comment><USER2> Nobody needs to write another article about it. It has been profiled to death.

He used CDS to bet on the bubble collapsing and then bought gold, bank stocks, distressed debt, and bet on mergers to play the recovery.

</comment></comment></comment><comment><USER6> I'm really surprised to hear that he sees gold outperforming for the next five years. With so much appreciation in the last two-three years I wouldn't have thought it was a hedge against anything.

<comment><USER7> If one thinks the market is going to go down and wants to hedge seems another alternative is to go long the dollar like UUP instead of GLD, since the dollar is inversely correlated with the market. A higher dollar makes investing in US companies more expensive for foreign investors.

</comment></comment><comment><USER8> And he'd have made a lot more if he just let YC handle those 15 billion dollars :-P

<comment><USER9> I doubt that YC has $15 billion in opportunities every year. They also focus on using their expertise and networks to help their startups, so having 1,000 YC startups wouldn't work.

<comment><USER8> Okay. Maybe if there were 15 YCombinators spread around the world then?

Either way, startups vs. subprime mortgages.. Think about it.</comment></comment></comment>


Ask HN: How do you develop on OS X - <AUTHOR>

Do you use a virtualized environment or just install stuff locally on the computer. Any merits of using one over the other besides performance ? Looking to have a place to muck around in all kinds of languages and technologies, starting with Java, and eventually whatever fancies me (couch db, python, nosql etc) without messing up my main pc so that I dont have to format/re install stuff.<p>I ask because I know installing stuff on linux/unix 'sprays' files all over the place but not sure how it works on OS X. I have used OS X but only developed on Windows so far. <comment><USER2> I'd definitely recommend using a virtual machine; even if I were running Linux I'd be using one. You can install your SSH key on the VM and have an iTerm2[1] profile which connects directly to it. I also use SSHFS[2] for shared directories so that I can edit my code in MacVim and TextMate, but run code and tests on the VM (note: I run headless VMs, attempting to run two GUIs in parallel on a MacBook Air wouldn't be pretty).

[1]: <http://www.iterm2.com/> [2]: <http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS>

<comment><USER3>
      > I'd definitely recommend using a virtual machine; even if I were running Linux I'd be using one.

Why?

<comment><USER4> For me, it's to keep software versions consistent between development and production. Our servers run Ubuntu LTS, whereas I'd probably be using something more up-to-date if I were running Linux locally.

<comment><USER3> Ah, yeah, that makes a lot of sense. I haven't had to deal with that sort of problem yet - thanks for the explanation!

</comment></comment></comment></comment><comment><USER3> I can't say that my setup is for everyone, but this is how I develop on OS X:

      * iTerm2 - much, much better than Terminal
      * Vim / MacVim - I use both, but most often just use the command line version instead of MacVim.
      * iTunes - music!
      * pip - ridiculously good python package manager.
      * IPython - a better REPL for Python

And that's it. It's very simple. If you're into NoSQL, I've gotten mongodb running very easily. I haven't had to reformat/re install anything, ever, and I've been developing on OS X for about 6 years now.

</comment><comment><USER5> Running postgresql on os x is a bit of a pain but brew gets it right. I don't care much for the heavy weight virtualization on mac osx. I have a separate proxmox box for that. On the mac, I use: python, virtualenv, pip, flask, postgresql, aquamacs (with emacs starter kit for python, and github mac.

</comment><comment><USER6> I'd use a VM if you're running things like mysql, nosql stuff, etc. OSX it seems like everyone has a different way of installing things, on a Linux it's just "sudo apt-get", plus if you have issues there's more documentation and forums for Linux users than Mac.

<comment><USER7> It would be worth checking out homebrew for installing stuff. It's pretty good.

</comment></comment><comment><USER8> I guess it depends on what you're writing. Using rbenv and bundler keeps ruby apps in check, but if you want to install a whole load of stuff, you could take a look at Vagrant (<http://www.vagrantup.com>).

<comment><AUTHOR> Initially writing Java, will be using a app server (tomcat or glassfish) along with a DB (either oracle or mysql). Looking to work with their enterprise technologies.

</comment></comment><comment><USER9> For Python, virtualenv is the way to go.

For PHP development, I used to run a VM, but at this point I just run XAMPP.</comment>


Why the C programming language still rules - <AUTHOR> https://www.infoworld.com/article/3402023/why-the-c-programming-language-still-rules.html <comment><USER2> The web is such a trashfire

931 requests 113.17 MB / 38.24 MB transferred Finish: 1.68 min DOMContentLoaded: 1.48 s load: 6.54 s

After 50 sec, still loading at more than 1 request per sec... I dont even know what I did to break it. Works fine in incognito mode though

</comment><comment><USER3> link without paywall?</comment>


Announcing Spark 1.3 - <AUTHOR> https://databricks.com/blog/2015/03/13/announcing-spark-1-3.html

<comment><USER2> This is a really great release, I'm excited to start playing with DataFrames! One question if anyone from Databricks reads it - what about GraphX? Will it also get the same level of attention that SQL, Mlib and Spark core got recently? e.g. is adding support for Gremlin (or any other graph query languages) on the roadmap? what about an R API for GraphX? Is that planned? p.s. when is GraphX planned to exit Alpha?

in any case, great product, nice usage of Akka and Scala, and a very intuitive API. I feel lucky to be working with it on a daily basis.

<comment><AUTHOR> GraphX actually graduated from Alpha in Spark 1.2.

We have a few important improvements and changes to GraphX planned for 1.4, including Java API, and possibly a Python API.

</comment></comment><comment><USER3> I guess the DataFrame API needs to be spelled out for me. Does this mean RDDs will be deprecated in the future if the new DataFrame is faster? As someone who's gateway drug into programming was R it's been fun to watch data frames grow across programming languages. I'm a huge fan of Python's Pandas library and very interested in Spark.

<comment><USER4> The DataFrame is an evolution of the RDD model, where Spark knows explicit schema information. The core Spark RDD API is very generic and assumes nothing about the structure of the user's data. This is powerful, but ultimately the generic nature imposes limits on how much we can optimize.

DataFrames impose just a bit more structure: we assume that you have a tabular schema, named fields with types, etc. Given this assumption, Spark can optimize a lot of internal execution details, and also provide slicker API's to users. It turns out that a huge fraction of Spark workloads fall into this model, especially since we support complex types and nested structures.

Is the core RDD API going anywhere? Nope - not any time soon. Sometimes it really is necessary to drop into that lower level API. But I do anticipate that within a year or two most Spark applications will let DataFrames do the heavy lifting.

In fact, DataFrames and RDDs are completely inter-operable, either can be converted to the other. This means that even if you don't want to use DataFrames you can benefit from all of the cool input/output capabilities they have, even just to create regular old RDDs.

<comment><USER5> > It turns out that a huge fraction of Spark workloads fall into this model, > especially since we support complex types and nested structures.

The first step of all my Spark tasks is "turn this RDD[String] into an RDD of parsed JSON", or turning CSV into case classes.

What JSON parser will dataframes be using? I presume Jackson?

</comment></comment></comment><comment><USER6> Out of curiosity, is anyone using Spark in production? We're evaluating whether we should invest in Hadoop or Spark. They're certainly not mutually exclusive, but I would rather invest fully in Spark than have infrastructure split between Spark and Hadoop.

<comment><USER7> I believe one of the key advantages of Spark over Hadoop is being able to run the full stack on a small environment (single machine) and do all the coding there without the need of a cluster just for development.

<comment><USER8> This is why I like cascading [1]. It has a higher level API on Hadoop. It also works in local mode with little change. I've actually used out to do transformation work from local files (csv), join them into structured documents and dump them into ArangoDB. I liked it so much I wrote a third party library to work ArangoDB in Hadoop[2].

1 cascading.org/ 2 [https://github.com/deusdat/guacaphant](https://github.com/deusdat/guacaphant)

</comment></comment></comment><comment><USER9> Thanks for the hard work. When can we get the long-awaited ORC file support, including predicate-pushdown?

</comment><comment><USER10> Our experience with Spark has been horrendous. Very unstable. Marginal improvements. Big hassle.

Would strongly advise you to consider hadoop. We also used storm and found it to be much stable.

Databricks makes a lot of noise though.

<comment><USER11> Can you share the specifics of your experience (the cluster size/use case/etc.)

I am partly asking this because you clearly feel strongly about this topic (your account was created an hour ago, most likely to comment on this).</comment></comment>


JavaScript is the new Perl - <AUTHOR> http://ocpsoft.org/opensource/javascript-is-the-new-perl/ <comment><USER2> Perl never had a monopoly on a runtime environment with an install base of pretty much everyone who owns a computer, tablet, or smartphone. Sometimes it's not about engineering principles.

If native mobile apps end up de facto replacing the open internet, that could change, of course. But I hope the internet remains, warts and all. And as ARM chips improve, and DOM APIs are expanded, and JS engines become more efficient, and the HTTP spec is ever more optimized for web applications, I think in the end the browser will survive.

<comment><USER3>
        >> Perl never had a monopoly on a runtime environment with an install base of pretty much everyone who owns a computer, tablet, or smartphone. Sometimes it's not about engineering principles.

This.

</comment></comment><comment><USER4> > we still haven't seen our "Java of the browser"

Haven't we?

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

</comment><comment><USER5> > Still, you don't see that many big Python and Ruby shops either...

But we keep seeing a lot of PHP shops. Does this mean that PHP is better suited for "large scale projects?" I'd very much doubt that.

The ease of learning a language and it's availability are very important factors in the popularity of a language. Javascript scores well in this regard. Really, I am not too worried about Javascript's impending doom. Unlike Perl, it continues to remain a favorite "target language" making it further entrenched in most ecosystems.

</comment><comment><USER6> Already posted 3 times before to HN this year:

\- <http://news.ycombinator.com/item?id=5016848>

\- <http://news.ycombinator.com/item?id=5014218>

\- <http://news.ycombinator.com/item?id=5020893>

NB. Only the first post has comments.

</comment><comment><USER7> Javascript is fairly new, Perl hass been around for ages. So there is a lot of old code knocking about that was written quickly and by people who quite frankly did not know what they were doing. Perl5 is actually extremely readable and if you are any where near a decent developer you will understand it. I have worked in loads of companies and bad code is bad code no matter the language. I have have seen some Java code that made me want to give up development for good, and don't get me started on legacy browser javascript code.

<comment><USER8> "Perl5 is actually extremely readable"

@!&?

<comment><USER9> Absolutely, it is when following readability guidelines and write documentation. Using obfuscation style is a mess and will never help anybody but the developer ego who believes he is smarter than everybody. But that's a pitty to act like that cause it create pain for maintainers and even for yourself.

</comment></comment></comment><comment><USER10> I'm actually taking a Perl class at the moment, and enjoying the heck out of it. CPAN is awesome.

</comment><comment><USER11> Sounds to me like the classic apples and oranges comparison.

In my opinion Javascript's evolution has become a requirement more than just a story of success. It was the de facto standard language for browsers but with big lacks of performances. Browsers vendors worked to improve it and everything was only a natural consequence of the evolution of the World Wide Web.

Perl's history is completely different. Perl has always worked behind the scenes, and still does it greatly. It has a stable, rock solid, very performant and widely spread runtime.

Let's just call things with their names and use them for the purpose they are born and everything will look less confusing.

More than else, always remember: You can write FORTRAN in any Language.

</comment><comment><USER12> so much hate in the developer culture. i rather get shit done.

</comment><comment><USER13> > JavaScript just waiting for the next technology to come around and make it > look like Perl does today: pervasive, but lacking enterprise adoption on > large applications.

How about CoffeeScript?

Also, I worked on some pretty "big" JS projects (in terms of scale, not popularity) and I found Javascript really easy to maintain, you just have to plan ahead a little, but I do agree that the syntax is a slightly bit not to my liking, but it is not horrible.

Also, what type inconstancy is he referring to?

<comment><USER14> Somebody hasn't seen "wat". <https://www.destroyallsoftware.com/talks/wat>

<comment><USER15> The fun thing about JavaScript's type coercion and concatenation is that you can use it to create fun brain benders like this:

      +[[+!+[[]]]+[![]][+[[]+[]]]++] === 10

This evaluates to true. Cookie for anyone who can explain why!

<comment><USER13> I gues it could be because + infront of an empty array returns 0. So, when you do !+[] you get 1. What you pasted it a bit of a labyrinth, but if someone bothered to keep track of it, they could definitely find ten 1s in there. It's not why, it's a how.

I hope someone figures out the rest and gets a cookie! :D

</comment></comment></comment></comment><comment><USER16> I don't see how Java's idea of type safety is particularly useful for anything, its type system is almost entirely useless.

I've yet to see compelling arguments for why it might be better in "large" projects.

<comment><USER17> It may not be the greatest, but at least it's better than JavaScript's broken type system. It does catch at least some problems prior to runtime.

The most compelling arguments regarding this matter are often in the form of personal experience working with large applications. JavaScript code bases don't scale well past around 10,000 lines of code and 2 or 3 developers at most. Languages like Java, C, C++, C# and Ada, on the other hand, can relatively easily handle software systems with millions of lines of code, worked on by hundreds or even thousands of developers spread globally.

<comment><USER18> Its type system is not particularly complex, but it is robust - it doesn't, for instance, coerce strings-with-numbers-in-it into numbers. Sure, you don't have sum types, etc, but at least it behaves in predictable ways.

</comment></comment></comment><comment><USER19> These subtle JS rants every other day are kind of annoying. Comparing JS to Perl gives a new but still wrong angel on an old tedious discussion.

JS weaknesses are overrated: anybody can grasp all quirks within an hour and after few days you get used to them (besides there just a few and great standard libs like underscore making JS a rock-solid base) and JS' bad parts won't stand in your way anymore. Those who aim for perfection won't get shit done anyway. They look for the academically structured Rails apps (or replace with any other bloated framework) with half a second respond times and breaking after every 0.0.1 update of Rails. In my view JS is damn perfect and I can think of anything better right now. JS and its ecosystem (especially the awesome npm) gives you anything to write elegant, well maintainable code bases ten leagues higher than any script language like PHP and on the same level like Ruby or Python.

JS is not a hack written in ten days. JS is a wonderful and modern language, more innovative than most other language out there, it's a masterpiece of a language. People complain because it's different: it doesn't follow the traditional OO, there're no strict monolithic frameworks which teach them how to structure code and most are just overwhelmed with functional programming and event loops/call backs/asynchrony because they were just used to something different. This is not being arrogant it's just that people don't like change or hoping all the time for something better instead of being happy with what they have now.

You can create and maintain very large code bases in JS without any Coffee or other layers of abstraction (there enough examples out there). Most people are just not used anymore to think theirself about structuring code since there was always somebody who did the job for them (Rails, Django, etc.).

You don't need to compile to JS -- JS is also not the new assembly of the net because hundreds are building weird languages on top providing useless syntactic sugar and again old-age OO, it's already a very high level language allowing you to do ANYTHING and structuring you code exactly as want. Nothing will stand in your way.

And Javascript is so fast, you get C class performance with a dynamically typed language. No need to compile after every single change or deploys are fast and easy without sending huge binaries to the servers. There's no other language providing this speed for such little cost, no other.

To understand JS' beauty and to get the "flow" you have with other languages and you do not get with JS you have to do two things: invest time and try to forget what you learned. And if you still don't get there spend more time with JS. It's not JS which failed.

JS haters and other downvoters: not agreeing != downvoting

<comment><USER20> It might just depend on one's previous experience. I've not been very impressed with Javascript the language. I've been a C++ programmer for years, so I'm well practised at being happy with what I have now rather than wishing for something better. But I find it difficult to be happy with a language that doesn't have proper block scope and won't even check function arity. (Dear computer, stop being so damn lazy.)

But, sadly, it fills a hole that nothing else does.

<comment><USER19> [http://www.quora.com/Why-was-JavaScript-designed-without- blo...](http://www.quora.com/Why-was-JavaScript-designed-without-block-scope)

</comment></comment></comment><comment><USER21> Mh... "those who hate Perl hate it because it's "too hard to maintain" and too "strange.""... No.. i hate perl because it's too easy to write really, really bad code and non-obvious how to write good code.

<comment><USER22> There's one obvious way to write good Perl code: read the documentation. Perl has tonnes of it. There are bugs in there of course, but most of it is very good. Also try to visit perlmonks.org once in a while - they're good there. Everything else is just a reason to be lazy and not care about the code you write.

<comment><USER23> And, Perl has an awesome community, let's not forget that. They do love clean code and all (modern Perl is very easy to read and understand IMHO), but are aware that in the end you want to get the job done.

Time and again, the question "are there any useful ideas or features in language X that we can borrow and implement in Perl?" has been posed by prominent people in the Perl community. Which is the opposite of the "not invented here" syndrome.

</comment></comment></comment><comment><USER24> don't take it lightly of the fact that javascript could theoretically become the most popular language for decades, mainly due to browser support.

<comment><USER9> Hope they could create a kind of huge centralized 'CJSAN' repository as CPAN [1] is. I've checked some existing projets [2] but it can hardly list some hundred modules. NPM [3] is great, but it should himself be integrated into a larger JS repository in the same way Cpanminus [4] is integrated inside CPAN.

[1] - <https://metacpan.org/>

[2] - <http://plugins.jquery.com/> \- <http://jamjs.org/> \- <http://jsfromhell.com/>

[3] - <https://npmjs.org/>

[4] - <https://metacpan.org/module/App::cpanminus>

<comment><USER9> And check out how CPAN is an active modules repository :D

<http://stats.cpantesters.org/statscpan.html>

</comment></comment></comment><comment><USER25> Nope. It is new Java.) Haskell is today's Perl, if you wish.

<comment><USER26> Modern Perl is today's Perl.

<http://www.onyxneon.com/books/modern_perl/index.html>

<comment><USER9> Also check out the excellent 2012 Ovid's _Beginning (modern ) Perl_ \- <http://ofps.oreilly.com/titles/9781118013847/>

</comment></comment></comment><comment><USER27> Using any technology in hopelessly idiotic ways when better tools (and more importantly, _appropriate_ tools) exist will turn it to the new [previous- tech-used-in-hopelessly-idiotic-ways].

This dilemma is as old as programming itself and will only go away when we introduce public flogging as punishment* for wrongly applying the "laziness is a virtue" dogma.

* Developers are people too (mostly) and I don't condone public violence against them. Private violence is OK.

<comment><USER28> Please recommend a better option for running code in a web browser.

...

...

...

There is no php, or rails, or asp alternative here as there is with perl. Correct me if I'm wrong, but the closest thing I've found is 1. NaCl 2...?

<comment><USER27> This isn't about running code in the web browser. This is a greater problem of offloading what is better off as being server-side processing on the browser.

<comment><USER18> This comes off as very dogmatic. There are good use cases for single-page or few-pages webapps. I'm likewise more comfortable server-side, but I can understand why you would want this sort of thing.</comment></comment></comment></comment>


Ask HN: Type systems in natural languages? - <AUTHOR> After learning Chinese and reading through Aditya Mukerjee's "করো: Translating Go to Other (Human) Languages, and Back Again" [slides][0] from Golang 2017, I was reminded again of the curious resemblance of [Chinese classifiers][1] (especially measure words) to a type system of sorts.<p>I was wondering if anyone here had done any reading on comparisons, what we can learn, or whether any experimental programming languages had been implemented using natural language classifiers.<p>[0]: https://speakerdeck.com/chimeracoder/kro-translating-go-to-other-human-languages-and-back-again-golang-uk-2017<p>[1]: https://en.wikipedia.org/wiki/List_of_Chinese_classifiers <comment><USER2> How about grammatical gender in French, German, etc.?</comment>


Chile earthquake pics - <AUTHOR> http://cryptome.org/info/chile-quake/chile-quake-01.htm

<comment><USER2> Pictures and news about the earthquake are all over the news. Please keep Hacker News to hacker news. :-)

Here is something more interesting for number crunchers: <http://wcatwc.arh.noaa.gov/chile/chileem.jpg>

<comment><USER3> What is that image showing me?

<comment><USER2> Change in water "height" in centimeters.

<comment><USER4> Is this the overall peak change or just a snapshot of a certain time?

</comment></comment></comment></comment><comment><USER5> What stuck out to me in these images compared to Haiti was that you saw police and workers there. Inspecting the damage, cordoning off damages buildings, it seems that they've at least got a functioning government.

</comment><comment><USER6> Chile con carnage. Pictures are rather reminiscent of the Northridge quake, and, sadly, SoCal is overdue one of these nasties..

</comment><comment><USER7> Two interesting facts:

        China earthquake Magnitude 8.0 2008-05-12 Epicenter: 31.021°N 103.367°E
        Haiti earthquake Magnitude 7.0 2010-01-12
        Chile earthquake Magnitude 8.8 2010-02-27 Epicenter: 35.846°S 72.719°W

See the pattern?

        512
        112
        227

And what's the most weird part is, if you locate China earthquake epicenter in Google Earth, then turn 180°, you'll get to nearly the exact epicenter of Chile earthquake.

<comment><USER8> > See the pattern?

No.</comment></comment>


Software Engineering: Coping When You Must Repeat Yourself - <AUTHOR> http://jjinux.blogspot.com/2010/11/software-engineering-coping-when-you.html

<comment><USER2> I wholeheartedly agree with the author where he talks about documentation. Documentation is presentation, and you present to different audiences. You will repeat concepts.

However, duplicate code is the greatest sin in software design. Almost every good practice or rule we have conjured is an attempt to reduce code duplication. Redemption comes in the form of abstraction. How could anyone defend duplicate code?

The author mentioned two kinds of duplication in tests. The first is a case of "You're doing it wrong." Here is a good rule of thumb for tests: if you find yourself copy-pasting between the code you wrote and the test you write for that code, you are not testing the code. Find an alternative way to test it. You will find a lot more value in it.

The second is a discussion of setup and teardown being repeated. You are writing a lot of extra noise. Perl's Test::Class, for example, allows you to write _one_ setup and teardown for all the tests in a Test::Class child. Reduce copy-paste by grouping together classes of tests. Even without a nice test framework, setup and teardown are trivial to implement yourself. Don't write tests that are a series of lines in one large main function.

 _Sometimes you can factor out this duplication. However, in less dynamic languages like C, it may not always be easy to do so._

What does this "less dynamic" mean? The example is easy to refactor into a function for both:

        stuff(1);
        call_something_unrelated();
        stuff(2);

C can abstract. It is not as good at abstracting as Lisp (what language is?), but there are solutions for most situations.

Don't ever accept the idea that code duplication is legitimate.

</comment><comment><USER3> DRY when it makes things simpler. Sometimes you would have to make things so much more complicated in order to completely not repeat yourself that it ends up not being worth it if it's not maintainable or difficult to debug what it's doing.

The point of DRY is to keep things simple and more maintainable. If DRY ends up making things more complicated and less maintainable overall then hold your nose and use your judgment. DRY makes some people miss the forest for the trees; KISS is better than DRY, which ought to be subservient to it.

</comment><comment><USER4> Overeager DRY-ing can also bind together unrelated code. Two areas might only overlap for a fleeting period before rightfully diverging.

<comment><USER5> If your DRY code is "excessively bound", then by definition you have repeated yourself. The binding which must be expressed on both sides is repeated on both sides. A better language could factor it out.

For any given excessive binding, the "better language" that can factor it out may not yet exist... but then again, you might be surprised. One of the most interesting things about learning Haskell is to see the way that community has used Haskell to refactor out code that you would literally never even conceive of factoring out in another language. The "magical mystical monad" is nothing less and nothing more than the refactoring of a certain common, recurring bit of code; it is worth your time as a developer to progress your Haskell knowledge to the point that you understand what I mean by that, even if you never use Haskell itself. In fact the recurring code in question is actually very, very small, and I've gone from confused about why they do it to astonished at how obvious it is in hindsight and how thoroughly we've screwed up a very simple concept for lo these sixty years.

<comment><USER4> Insightful - Thanks.

</comment></comment></comment><comment><USER6> I completely agree. I think DRY is a very single-developer orientated aspect. There is value in repeating your self or copy and paste programming as that can enable further polish and customizing where DRY causes more intense mental activity to keep everything clean.

Inspired new blog article: [http://blog.mathgladiator.com/2010/11/avoid-dry- for-product-...](http://blog.mathgladiator.com/2010/11/avoid-dry-for-product- development.html)</comment>


Startups - Is all press good press? - <AUTHOR>

Have been lucky enough for my new startup Shoply (social commerce platform) to have been featured on a few major blogs recently.
The features were positive and I am super grateful for them, but they  contained factual errors regarding our feature set and competitive landscape etc which as a result erroneously bought into question facets of our strategy.
We provided the blogs with information prior to their posts which obviously contained the correct information and tried to ensure the journalists were well informed prior to posting.
If you've had similar occurrences in the past, how have you dealt with them?
1 - Contact the journalist and risk being a pain and jeopardising a future relationship by asking for the post to be put straight?
2 - Policing the comments and trying to get the correct story across there?
3 - Just let things be. And live by the motto "all press is good press"? <comment><USER2> This happened to me recently. This is what worked for me:

Email the journalist privately (not via the post's comments). Say you've found a small error. Explain it and its fix. Then apologize for not being clear in the first place (which is at least a teeny bit true). Close with an invitation to talk by phone or email or Skype.

The two journalists I got in touch with were super friendly and nice. They genuinely cared about being correct.

</comment><comment><USER3> Given blog posts are pretty painless to correct (unlike hardcopy news stories which may require an embarassing retraction), I would think a very friendly request to "correct an unfortunate misunderstanding" would be worthwhile...</comment>


Show HN: I built an unstoppable database for reporting police misconduct - <AUTHOR> https://policeaccountabilitynow.org/ <comment><USER2> How will you prevent this from filling with spam? Are you manually approving submissions in some way?

</comment><comment><USER3> Where is the actual data kept? if IPFS is just the file system then where is the storage?

<comment><AUTHOR> On the ethereum blockchain + anyone can replicate our pinset on IPFS by running the following:

> ipfs-cluster-follow pan-backup-cluster init > [http://ipfs.policeaccountabilitynow.org:8080/ipfs/QmWR7Ko9pg...](http://ipfs.policeaccountabilitynow.org:8080/ipfs/QmWR7Ko9pgZm1tRSGmBuL5Jvkpx6aPzifsYXWowBAkRAo9)

Full docs: [https://policeaccountabilitynow.org/docs/ipfs- access/](https://policeaccountabilitynow.org/docs/ipfs-access/)

</comment></comment><comment><USER4> "unstoppable", how?

<comment><USER5> Presumably referring to it using IPFS - which means there's no central hosting for the cops to try and shut down...

Looks like the [http://dapp.policeaccountabilitynow.org](http://dapp.policeaccountabilitynow.org) domain and the bundle.js it's hosting could be targeted, but all the content for the (single) report comes from urls like [https://damp-lingering- feather.kovan.quiknode.pro/b7169106fd...](https://damp-lingering- feather.kovan.quiknode.pro/b7169106fd1d071a8a96fd71df44b7315563d0cd/) \- which would presumably be available from any other public IPFS gateway (or directly from IPFS)

<comment><USER3> I don't think anything is actually stored on IPFS is it? There must be a centralized server somewhere with the actual data. IPFS is just the file system, not the storage.</comment></comment></comment>


Do Scientists Prey? Albert Einstein Answers a Sixth Grader - <AUTHOR> http://www.lettersofnote.com/2012/05/dear-einstein-do-scientists-pray.html

<comment><USER2> Pray, not prey :)

<comment><USER3> Yes, indeed. This exceeds my tolerance for programmer spelling. I strongly suspect the author of that headline is a native English speaker. O the shame. :)</comment></comment>