skysight-inc/HackerNews huggingface dataset:
I have actually worked on a code base like you're describing, on a contract basis, for a client. I loathe maintenance programming, so the relationship didn't last very long -- just a few months. So:

1. Make sure you have a rock-solid contract in place with the client that will ensure that you get paid, get paid well, and get paid often. Receiving a check in the mail makes it easier to look at the code. If your payment terms are anything like, "payment-upon-completion of ...", or, "paid net 30 after invoice", or anything like that, you simply won't want to work on the code.

2. If "soul-crushing", "depressing", or "makes me want to hang myself" are phrases you'd use to describe the code or your state of mind when looking at it, then go into this project knowing that you're not going to last long. There are people who genuinely enjoy working on stuff like this. You aren't one of them.

3. Everybody that says "rewrite" is dreaming. It is impossible to rewrite something that large without breaking something and spending too much money. Re-factoring a function is doable. Re-factoring a thousand-line file is doable. Re-factoring part of a database is doable. Re-factoring all of it all at once is starry-eyed fiction. Not gonna happen.

4. But, if taking ownership of this code base is something you want to do, then add re-factoring time in to your agreement with the client -- something like, "20% time spent replacing bad code" -- and focus on the tiniest little ugly thing you can find, and re-factor that. Start on it, don't stop until it's done. Keep it in small bite-sized chunks.

5. Make sure you're getting paid for time spent just getting familiar with the code base. If you work with it long enough you'll actually get pretty familiar with most of it, but you want to do that on their dime, not yours.

6. Get help. They surely realize by now that they've got a mess on their hands. Talk with them about whether or not you can bring on additional help. If they flat-out refuse, run. (That is what killed my work with my client; I wanted to move into a position where I managed a junior programmer and focused on code rewrites and higher-level stuff; they refused, I quit. They wanted an employee, not a contractor.)

7. Version control and a sane bug tracking system (Mantis isn't horrible) are must-haves. If they don't have these, again, make sure they pay for it.

Dealing with a code base like this one is as much about state-of-mind as anything else. Either you can handle it or you can't. No amount of advice here will make it more palatable to you if you're not the sort of person that's OK with inheriting a disaster.

Also, even if you've got some kind of agreement in place with the client already, it sounds like you've just now gotten your first look at the code. This, in my opinion, makes it totally OK to go back to the client and re-negotiate. You can open it with, "I'd like to work with you, but now that I've seen the project that you want me to work on, I can understand why this has been a problem for you, and I need to make sure that we can come to an agreement that will work for both of us so that I can fix this for you." (Or something.)
My secret weapon is a folding editor called Code Browser. http://tibleiz.net/code-browser/ -- with this, you can do a non-destructive (well, it only adds comments) folding of the source. This is a very fast way to get a better view of what's going on. I've used it many times when trying to make sense of legacy code.

That is, if you choose to go through with it. My real advice would be to avoid it altogether as many others here. It's going to be extremely frustrating no matter how you attack the problem.
Another nice fiction with a similar theme: http://en.wikipedia.org/wiki/Fitzcarraldo
I was in this exact same situation two years ago, only with an eCommerce platform which shall remain anonymous. The client had gone through 4 companies, trying to get the project built and finished. Nobody had been able to wrangle it clean.

Reluctantly, I took on the project, and started working through it. What I initially estimated would take me a month to untangle ended up taking a year. That's an entire year in the snake pit. And since it was eCommerce, there was serious money on the line when it came to bugs. And there were hundreds that I found.

Just understand the commitment you're making. Make sure your client has the money and the time to make things right. Ultimately, in my project, the client insisted on quick hacks to keep competition at bay, and the code dissolved into a mess. I decided I couldn't keep working with a codebase that was never given a chance.

Understand what you're getting yourself into. Because you're taking over the responsibility of loading a massive crap ton of software into your head for diagnosis. How long do you want to have fragile, crappy, lazy code in your head? Forget about bring superman, you're not going to save a million lines of code, you're going to become the builder of the hacks that work around absurdity. Make sure you understand that.

The burden of broken code you're responsible for, that's always broken in production is like nothing I've ever encountered. Make sure it's worth it.
Founders are game industry veterans.

A recent proof that Supercell founders know how to execute is that they changed their focus from Facebook games to iPad and have released two successful and polished iPad games in a short period of time. Both Clash of Clans and Hayday are hitting top grossing lists. And they have a third polished title, Battle Buddies, coming out soon.
He's already shorted the market and is now executing the short-sell version of a pump-and-dump ... or maybe he's actually ethical and doesn't trade in the companies he analyzes. How would we know the difference?
I am OK with this when this will be easily uninstallable, at least they will get some money (and more money can lead to better system).
This seems like a pretty clear example of HN comments being full of flat criticism and naysaying with very little in the way of helpful feedback.
I find it distasteful because it means that in searches which naive users may be accustomed to being local searches of their computer, those search queries are also being passed to some third-party (Amazon) API. If they're interested in this revenue stream, I suspect Ubuntu isn't going to make a big deal of this information leakage at installation time.
I found this essay exasperating, but YC doesn't "flip startups to VC". That's not how it works.
The author is investor in Supercell ;)
Why don't they just ask for money from users? Have two versions: an ad supported one which people can easily remove the ads, and a paid version that doesn't come with the ad package by default, and maybe a few extra "premium" perks like wallpapers, themes, whatever that aren't in the FOSS repos together with extra backup space. They could charge on a par with OS X, say a total of $29 for the next two versions.
I've never understood why ED is always the example of trivial medicine. Maybe I'm the only one who wouldn't go on living with no sex ever again. They weren't even working on it until they found a promising treatment by accident.
You mentioned people have no idea what Fray is, then proceed to not mention what it is.
Lucky winner of $120 million jackpot from California comes forward
Minecraft is a game (If anybody is not clear, why it's downvoted)
Cell phones need far more intelligence for phone calls
You type too much:

sudo dpkg -P unity-lens-shopping
From the actual link:

http://www.omgubuntu.co.uk/2012/09/online-shopping-features-...

>For example, when you want to search for “dishwashers” on Amazon you can just enter “Dishwashers” in the Dash and a small line of “suggested items” from Amazon will appear.

>The same happens when you search for a local file or app from the Home Lens.

>So yes, you can expect to see self-help guides on compassion when trying to launch Empathy.

>‘More Suggestions’ is a strange turn of phrase; most people don’t tend to expect product suggestions when looking for their e-mail app. But I can cede that it’s a far better name than that used in development: ‘treat yourself’

Showing ads when you search locally seems a tad much and a waste of system resources. Isn't this equivalent to showing shopping ads based on keyword searches in Spotlight and the Windows Start menu?

Edit: Just realized that I sometimes type keywords to find local files matching filenames and content that's personal in nature. Does this mean all those keywords are sent to Amazon and perhaps data mined to show personalized results?
> edit 2: but to answer the question as asked, it would be way cheaper to use even a full-blown set of heavy earth-movers (and crew) than to pay the guy $10/h, 10h/day, 300 days/year for 22 years (which would cost $660k)

Not to mention the lives that could have been saved if the road was built faster with heavy machinery. I wonder how many people died waiting for that road to be built.
Sprockets ported to .NET
Ask HN: Generate a bunch of demo data from a scheme?
Hello,

I saw on Hacker News a script that generates demo data based on the type you request, so if you need a first name you called ->first_name or something and it made one.

Does anyone remember what it is called?

If not does anyone know of a good script to allow me to generate demo data for a presentation that would include all the basic profile(first name, image, last name, age, etc)/post(title, body, lorum ipsum, etc) types of data?
You're not by default searching just programs when you search via Unity in the first place.

The default for me is a combined pane that shows recent apps, recent files and downloads. If I start typing a search term, whichever categories has matches show up.

If I want a specific category, such as just applications, I can select that.

Maybe they'll change the defaults, or ask question during install, but I suspect most of the people who might care will easily figure out how to remove/disable it.

(Frankly Unity is the most productive UI I've had since my Amiga days. I was planning on installing a tiling WM before I tried it, but then I ended up staying with Unity because it was such a smooth experience, even with far less tweaking than what I'm used to have to do.

My most frequently used apps are all just one key combination away. Everything else one key + search. I run most stuff full screen, but with the global menu enabled in most apps, most apps waste very little space even when I "just" have them fill all the available space. It's the closest approximation Amiga-style screens using workspaces I've experienced on Linux.

The only thing I hate is the loss of spatial file browsing)
For a more playful and, some would say, practical view, read "Winning Ways for Your Mathematical Plays" (http://en.wikipedia.org/wiki/Winning_Ways_for_your_Mathemati...)
But still, they want to see serious progress within a month (eg. large number of bug fixes).

You need to sit down with them and explain that just isn't possible, then explain clearly what is possible, and what the options are (painful rewrite in parallel to maintaining the old software, or painful and slow refactoring), and just how much it's going to cost them. They aren't going to like either option but it's better for them to understand upfront exactly how much of a problem they have, and that the problem was not necessarily with the previous contracting companies, but with their codebase.
It's weird. Who Canonical thinks their customers are? Unity + ads is not something developers enjoy, and I'd guess 90%+ of Ubuntu desktop users are developers...
I will not use it.

If I need truth about something, I will do research to find out. I do not need app and I do not trust an app for that.
One day we could have "compilers" to catch most your/you're, their/there/they're, effect/affect errors, but then what about the dynamic typists!?

Though I don't have any problem with new short phrases like "text me" or even "friend me" (though I'm not sure just how long that one will hang around since it seems rather FB-specific). "Calling" wasn't always something you did with a phone, after all. And "send me a text message" sounds so stiff compared to going from "call me" to "text me." So I don't think you'll be able to effect change there.
Frankly, if they give me Amazon results only, that's fine by me. I often end up buying from Amazon even when they're more expensive due to Prime. If I could buy without even going to their website, that'd be perfect.
National Venture Capital Association
Spaceport is built, but who will come?
Ads in an operation system? No thank you.
Absolutely. They have obscured this simple fact in unnecessary details. Also the phrases like "You dont need boilerplate code anymore" are highly misleading.
Communicating with a beam of light
For what it's worth, that's a real publication, not Demand Media. The article should have netted him a couple orders of magnitude more than $25.
180k-Year-Old Mutation Allowed Humans to Become Vegetarians, Move Out of Africa
My dad went from helping out at my grandfather's high street shop to designing satellite test rigs, and ending up specialising in conveyer systems of all things.

My partner's dad went from painting ships in Chatham dockyards to helping design and build nuclear submarines, power stations & containment facilities, and ended up working in nuclear medicine.

Neither of 'em went to university.

Continual on-the-job learning doesn't seem like a terribly new thing...
I love Unity. It's the best Linux desktop I've had. I've used Linux on my desktop since '95, and Unity is the first Linux desktop UI that I feel is as snappy and productive as my Amiga used to be (yes, seriously)...
you can get idea about how its done from, http://www.html5rocks.com/en/tutorials/streaming/screenshare...
Azure is actually very fast, and S3 has historically been a bit less than reliable.

(Full disclosure: I work for Microsoft, but not on Azure.)
A great idea indeed! My only concern is privacy. I shudder at the thought of sharing my phone number/IMEA number online.
Ok, moving to Linux Mint next. Any other suggestions?
Rightfully scary ... Why would you eschew the well defined protections of XMPP in the first place? You could still place your "proprietary control characters" inside the Jabber messages.

I'll stay well clear of WhatsApp until they get this fixed!
There is more here about the current sad state of pharmaceutical research: http://pipeline.corante.com/archives/2011/01/17/reboxetine_d...

According to the accepted animal model reboxetine ought to be even better than sliced bread, yet in the clinic is performs no different from placebo.
BIND 10 zones in memory
Yes.

I have relatives who died due to a lack of health care. They felt sick for a long time, but only got treatment once the chronic problem became acute. Unfortunately, when a chronic undiagnosed cancer condition becomes acute, it means that it has metastasized and the survival rates drops precipitously. Lack of health care meant that the sick person died in pain instead of getting better early on and living for many more years. (Nota bene: this is a USA story - I am under the impression that this would not happen in basically any other western democracy)
P.S. Ok, the following is not thought out much at all and is very incomplete. My point, if I can better make it, here, is that you limit users' exposure and risk via the micropayment channel. And thereupon say, if the current balance does disappear (stolen, gaff, etc.), it's simply "not the end of the world" for that user. Fix the problem and move forward.

On the receipts side, I have less to offer in terms of ideas for control of fraud. (E.g. accumulating masses of mis-appropriated micro-transactions.) For identifying and addressing user claims of mis-appropriated transactions. Etc.

So, I sort of have what I see as "step 1": Keep the users "safe". I imagine step 2, "control fraud", has some technical remediations.

And, overall, keep this system separate, in it's own transactions "box", away from the larger banking and payments system. Compartmentalize. And then solve, within that more limited scope.

--

Technically, this seems quite feasible. However, the regulatory infrastructure gets in the way. I'm not arguing for mindless "deregulation". (Or, as it were in recent years, also lack of enforcement.)

But it seems there needs to be a new class of payment for these things. A user has a limited value account presenting limited exposure/risk. Money can be pushed into it from a regular bank account, but it's an irreversible, one-way flow. The user, as an example, puts in $20, $30, $50 per month and then uses this to make low-overhead micropayments. Since exposure is limited, regulatory overhead can be kept lower. And... regulation can in turn help ensure that such accounts and micropayments are created and do exist. (E.g. Conventional banks: You must support this interface to micro-payment providers as part of your license or charter. In return, you face no liability beyond possibly restoring a mis-directed withdrawal of capped value made to "charge" one of these micro-payment accounts.)

I'm no banker. But it seems to me that micropayments need a regulatory infrastructure that reduces/caps risk, and that also in-turn squeezes out needless and overly expensive overhead.

Sort of like a pre-paid Visa card, but online. (And preferably with lower transaction fees.)

Why would society do this? Why do we protect intellectual property, increasingly to the point of criminalizing infringement (and so subsidizing enforcement)? Society attaches value to this. Well, I think a good part of society attaches value to compensating and enabling (legitimate) content creators. In terms of a news, many of us want to see an informed society -- one informed by independent, self-standing reporting and not just propaganda.
Ubuntu, Redhat, SuSE just to name three of the big distro's that have been part of commercial operations from the start...
First and foremost, eric: it is in his best interest to inform everyone about his opinion. If more follow, his short option can only bring more profits.

Second of all, being right in opinion about market is the best damn PR you can imagine. After all, its all about profits. If you "guessed" market good enough in the past, you more likely attract rich investors going forward.

So as much as this guy can short the stock for $5MM himself and keep his mouth shut, it is much smarter to short it for the same amount, wait for others to join helping his position to grow, and if hes right on his bet, attract investors with $50MM in the future.
are you willing to open source that api port?
I would have used dynamite, but to each his own.
I wish Whatsapp would make their system more secure, remove that one-device at a time non-sense and then provide a nice official API and voice chat for it.
The market will continue to go up until it doesn't anymore.

Technical Analysis is your only friend.

Or to put it another way; if the fed is pumping money into the market it only makes it easier for others to exit.
Groovy 2.0 isn't really used because it's so new. E.g. you can't use Groovy 2.0 with Grails until Grails 2.2 is released.
Great post! I had no idea that Ruby supported _ for "don't care" in block declarations like that.

Ever since I first saw it in Prolog, I've loved the idea of having a special symbol for "don't care", and I find the examples using it in this article to be much more immediately clear than the ones with unused variables (once you know about the _, at least). While it doesn't provide the same level of functionality here as in Prolog, being just a nice little indicator of unuse here, using duplicate names for unused variables, feels much more sketchy to me -- a non-underscore variable name just doesn't stand out as immediately noticeable in the same way.

And allowing duplicate names as a general rule, not just for one special case, seems a much more likely thing to trip up inexperienced programmers in the future. Say someone was lazy and used "x" as their unused variable, and someone newer to the language came along and didn't notice the duplication and actually used the x variable for something?
Yeah ... been there and done that. I've also added the PA volume control as recommended by others. Funny that one problem can be solved by two completely opposite actions (or in my case remains unsolved in both).
Actually this is not a real tool that you should use every day. I just created that to clarify and demonstrate the insecure authentication and message transmission methods of WhatsApp.
Thank you! Do you think there's any way to not rewrite the entire thing?
Not until the PHP API on Github is back on. They had to remove it due to legal issues.
http://programmers.stackexchange.com/questions/155488/ive-in...
@CompileStatic is a great idea even if I prefer approach like Dart or ActionScript partial typing.

Groovy closure used dynamic scoping rules not unlike 'this' in JS which makes Closure a corner case for the static analysis performed by @CompileStatic.
Verizon ships its iPhone 5 unlocked
What Canonical/Ubuntu should do is some text like this:

"When you use Ubuntu we receive affiliate revenue based on your usage. How would you would like the money distributed?"

Then have some sliders like the Humble Bundle to proportion it to the program authors, GNU/fdo etc, EFF and Canonical. Everybody wins that way - folks who don't like Canonical can set their share to zero percent. And just by using the system you cause the appropriate people and organizations to be rewarded.
I used 10.04 for quite a long time and am now on 11.10 without Unity, I grew quite tired of always having incredibly outdated packages on 10.04 (the great utility of "sudo apt-get install and it will always just work" being the only reason I haven't switched to Windows or Mac yet). That being said I still use 10.04 on all of my servers
I'd say the number of people who do object oriented C right is as high or higher than the people who do C++ right, for a given set of people. It's just simpler, with fewer leaky abstractions.
I agree, it would probably be easier to pay for a service if people really wanted it.
I think there is a middle ground. I see that startups have 3 phases:

1. The first phase is figuring our scalable business model. That includes product, customer acquisition, etc. For this phase the best is that you are bootstrapped or having just small investment. At the end of this phase, you should be profitable or your natural/viral growth should be like Facebook in early days.

2. The second phase is growth. For this phase, you might need VC money since during growth profit might not be enough. Or you might decide that this is "lifestyle" business.

3. The third phase is optimization.

Now, the problem with some startups is that they jump onto phase 2 too early. And I have feeling that some SV startups (not all - but one pumped via techrunch and similar) jump to second phase too early. I think it is ok if phase one is extended by 6 months or even one year - that is just a rounding error if you are going to be big. No need to rush.
She is getting a lot of flak from the party, though. Might not be a senior member much longer.

Also, the pirates still don't seem to be 100% clear how to deal with copyright. They didn't actually say they want to dismantle it completely.
In which Java basically has taken over the world of enterprise programming. Contrary to fringe languages like Haskell and the like.
More a feature tar pit, yes.
Gittip is one of the most interesting charity concepts I've seen these past few weeks.
How dare they attempt make money in return for the tens of thousands of hours I have spent using their free product.
I think there is a real need for an open *nix desktop that is friendly to a broad base of users - which is how I see Ubuntu. If a canonical/amazon "itunes" is the way to finance it, then fine. I'd rather them monetize a peripheral service, perhaps an itunes-esque offering, and support a strong linux desktop market, than see them waste away.

But I worry about slippery slopes ... will rightsholders demand DRM that subverts openness?