Ask HN: Going the cloud way - Linode or DigitalOcean? - <AUTHOR>

Having struggled a lot with our current VPS, finally decided to go the cloud way.
[Those interested to know more about what we've been facing can refer to my two recent threads:
1. https://news.ycombinator.com/item?id=6348903
2. https://news.ycombinator.com/item?id=6367198 ]
We're now trying to decide between linode and DigitalOcean.
One major difference between the two that we think we've found is that while DO offers SSD storage, linode (we think, again), has regular hard drives.
What do you all suggest? Linode or DO? Or something else? <comment><USER2> Linode is straightup incredible. I've been with them for about 5 years now. Almost every year they've given some sort of free upgrade -- I still pay the same amount I did 5 years ago and I now have something like 10x the bandwidth, a bit over 2x the storage, 2.8x the RAM, etc. AND faster processors. They're a company who seriously know their shit, and they're FAST.

The $20/mo base can be a bit much for some usages -- I still have a few $2-7/mo boxes from LowEndBox for various side projects, but for anything I really care about, I wouldn't put it anywhere but my Linode.

<comment><USER3> My experience with Linode left a very sour taste in my mouth. Their security leaves a lot to be desired. It cost me, and clients, a fair amount of money and grief. Their hardware might be good, but their policies are lacking. I do not recommend anyone to use Linode.

<comment><USER4> You've written the same thing twice in this thread, without giving specifics.

Which Linode specific security policies caused you what specific "grief"? And what provider do you use now?

I know (1) they were late to the two-factor-auth party, (2) had a break-in where credit cards numbers were stolen, (3) a targeted attack that was used to compromise some bitcoin hosts.

I am aware of these incidents and still give full marks to Linode. The hardware is incredible. The hard disks are speedy. The network connection is very fast. My $20/mo is working much harder at Linode than it would at Amazon. :)

I've been hosting a lightly-used disk- and network- heavy app for a few months now. Never had a problem so far.

<comment><USER3> The credit card break in caused me a _lot_ of grief. It just blew my mind how something so important would not be treated as such. If you do not take care of the basics, I cannot trust you with my code.

For most of my smaller needs, I use webfaction (web hosting and vps). Which has been very good. Costs more, but their support is very good. Bigger things go to Amazon.

I did not have hardware issues with Linode. Wish you the best of luck. Hopefully they have learned and taken security seriously since the last breach.

<comment><USER4> OK. FWIW, I do not consider credit card number theft to be a big deal (I just lost my wallet a couple of weeks ago). I know I am probably in the minority on this.

That said, they should have an option to pay by paypal to outsource this risk to somebody else. I always pick paypal when I have the option to do so.

There's a saying that guarding diamonds and coal to the same extent is unwise. :)

Good luck and thanks for your reply!

</comment></comment></comment></comment></comment><comment><USER5> Linode may have "regular" hard drives, but they're fast. I ran a legacy PHP commerce package for a client and it would log gigabytes of data due to deprecation warnings, I wasn't as knowledgeable about downgrading and freezing packages as I am now, but Linode handled it fine. I think they're 10k RPM SAS drives, so they're quite fast.

On the other hand, Linode gives you access to 8x Xen CPUs from the base package. While to get the same out of DigitalOcean you need to pay $160/mo. The pros/cons I see are:

DigitalOcean: SSD, RAM (2x), and therefore price (for low CPU apps) Linode: CPU, HD space, transfer (2-4x)

<comment><USER6> Linode is working to upgrade to ssd. [https://forum.linode.com/viewtopic.php?t=10406&f=26](https://forum.linode.com/viewtopic.php?t=10406&f=26)

</comment></comment><comment><USER7> Based on the pricing, the security leaks, and the technology, Linode strike me as one of the 'old' breed of hosting providers, who are trying, but struggling to keep up with newer companies.

I've got an account with Digital Ocean, and while they can be a little slow releasing kernel updates, they've been great so far. Good performance, great price, good support.

</comment><comment><USER8> Toss a coin. VPS offerings are more or less a commodity nowadays. The price difference is ignorable for a person at first world income levels? Linode is a full cup of coffee price more expensive than Ocean over a month. The specs will be exactly equivalent shortly, if not already. Unless you happen to end up on the same machine with an abusive neighbour, you'll be fine.

</comment><comment><USER9> I can't comment on DigitalOcean, but I've been using Linode for a couple of years and have been happy.

They've offered several free hardware upgrades (CPU cores, transfer, storage) and one optional upgrade (Doubling RAM) that set me back an extra five cents a month.

I haven't had any issues, but from what I have seen Linode is very responsive.

</comment><comment><USER3> I have used both, would choose neither. Linode has awful security, and security policies. Digital Ocean's offerings were not consistent and rather unstable/buggy. Some of their OS images did not work. Their support was a bit on the slow side for me.

I've had really good luck with Webfaction. Do look into them.

<comment><USER10> Can you give some specifics about the security issues you saw at Linode?

</comment></comment><comment><AUTHOR> Clickable previous thread links:

1\. [https://news.ycombinator.com/item?id=6348903](https://news.ycombinator.com/item?id=6348903)

2\. [https://news.ycombinator.com/item?id=6367198](https://news.ycombinator.com/item?id=6367198)

</comment><comment><AUTHOR> Thanks to all who have responded.

We've decided to try each one-

DigitalOcean - already ordered, up and running (very well too)

Linode - will order soon

OVH - already ordered (per my comment below), now trying to figure out a way to pay them

</comment><comment><USER11> Neither. Forget VPS. Upgrade to a dedicated server (which beats a VPS in every category) for just $40/month with OVH.

<comment><AUTHOR> @AznHisoka: Thanks for the reminder. Are you associated with/use them?

After you told me about them in my previous thread, we checked them out and actually ordered a server there. Turns out the only payment option they have is PayPal. We tried to make cc payment via paypal but they would make just a test transaction (successfully) and then say, can't process. We tried four times, with the same results. OVH support wasn't much help, except saying PayPal is the only available option now.

In the meanwhile, we found this:

[http://www.webhostingtalk.com/showthread.php?t=672553](http://www.webhostingtalk.com/showthread.php?t=672553)

and this:

[http://www.majidkhosravi.com/ovh-review/](http://www.majidkhosravi.com/ovh- review/)

I wonder what this is all about.

<comment><USER11> I currently have 4 servers with them. Are you using their French/European servers or their US-based ones (or Montreal)?

They don't offer much tech support, but they do fix basic issues like failed Hard Drives, RAID, etc pretty quickly. You pretty much have to do everything yourselves, but that's the point of a dedicated server.

In the end, you can't beat the price, and that's why I went with them. With the Paypal, I could use my CC with them.</comment></comment></comment>


Ask HN: Would you use simple profit/loss web app? - <AUTHOR>

I'm currently developing a Profit/Loss web app that allows users to see if they are in the red or green. It is in an extremely simple format, easy to use, and provides great insight into how a business is doing. I have plans for adding more robust functionality but want to see if people are interested by the concept. Thanks! <comment><USER2> I think QuickBooks is least for any business, for auditing purpose, espcially for filing tax report.

Myabe you can find users among eBay sellers or individual Amazon sellers.

<comment><AUTHOR> Good idea, thanks for the thought. I imagine that people would like to use something simple like this for basic finance needs. Something like a sprinkler/lawn care business, computer repair, etc. Eventually increasing capabilities but starting simple with businesses that don't have complex numbers to crunch. Thanks again for the input.

</comment></comment><comment><USER3> Only if it is a reliable application. It must have the export do spreadsheets feature, because I don't want to type all the information if the services go down.

<comment><AUTHOR> Awesome, thanks for the feedback. I agree on the import/export. We had planned to have this feature in to begin with but its great to here it reiterated.

</comment></comment><comment><USER4> I wouldn't. It's amazing how quickly you go from "simple spreadsheet" to "this is a real pain - I need proper accounting software".

<comment><AUTHOR> Very good point - thanks. I think simplicity is always the key with finances. Thanks for the feedback.

</comment></comment><comment><USER5> Not thrilled about putting financial data on a web app. Excel is a very useful (private) way to figure out red vs. green. Just my $.02!

<comment><AUTHOR> Interesting, thanks for the feedback. I figured security/privacy was a sticking point for most people. We're looking at doing this for companies rather than personal information so I'm not sure if that changes much or not. We have a couple people interested (are currently building it for 1 client) but I'm trying to get a feel for the market first.</comment></comment>


How relevant is UML modeling today? - <AUTHOR> http://codebetter.com/blogs/jeremy.miller/archive/2009/09/12/how-relevant-is-uml-modeling-today.aspx <comment><USER2> I've been writing software for 20 years, and aside from my employer paying for a course on UML a few years ago when it was all the rage, I have never, ever seen UML seriously used.

Not that I've ever worked at Microsoft or any massive "pure software" groups; I've basically worked in "get stuff done" smaller software groups. However, I suspect these small groups are far more common. When push comes to shove, code _is_ the design documentation.

Beyond that, I've always had practical issues with UML's need to specify everything. How often is that valuable? Any given box-and-stick-diagram-with- labels is bound to be pretty clear, whether or not it does things the UML way. I would be annoyed if someone wasted extra time (and, likely, money) on a UML- aware tool, when it would have been faster and as useful to just sketch something.

I've also tended to rely on automatically-generated-and-therefore-always- correct diagrams (e.g. Doxygen, through GraphViz). This is especially true given that the majority of my documentation, even outside the code, leans toward plain text formats (e.g. man pages, simple text files, reStructuredText, or HTML). My reliance on those formats forces documents to be on the short side, which also helps avoid the risk of inconsistency with the code.

<comment><USER3> I think you've never learned UML.

UML is a tool, a language. It's not a process, nor does it require that you specify anything. It's just a way of talking at a technical level.

I've been in the software field for 25 years delivering production code in a lot of venues. I _always_ use UML as a way of doodling and talking about the way we're going to attack a problem.

Remember the four Cs of modeling: communication, coordination, collaboration, and consensus. There is a 5th C, Control, but it's bad medicine. Once you think that UML controls stuff, you run off in to architect astronaut land drawing lots of complicated diagrams with lots of little details.

That's what people think of when they think of UML, and it's about the furthest thing from the truth as you can imagine.

Just to rant a little bit more, a couple of years ago I wrote an agile project management tracking tool. As part of that, my customers and I had a 30-minutes requirements meeting. From that I created an analysis model. From that I created a database and a DAL. The whole process took about 2 hours. When people wanted changes, I could change the model and have the database and code change in 5 minutes. It left me to work on the UI and Business Logic and not be wiring stuff up everywhere.

UML can be nothing more than a bunch of boxes with arrows between them. In fact, 95% of UML is never or very rarely used by effective projects.

Tools can be very useful or they can cut your arms off. Doesn't make the tool bad or good. It's just a tool.

<comment><USER2> It is good to hear that UML has some uses, even if I had always assumed this was most applicable to larger teams or companies. Can you comment more on the specific parts of UML that your models used?

I do tend to think of your 4 Cs as all the same, though. In my experience, a team is either working together effectively or it isn't, and either achieves all of those "Cs" or none of them. I would even add that, often, a team lead must forego the "consensus" and simply make a decision. (This can even be true when dealing with customer requirements; occasionally, a software architect's design decision ultimately delivers a better thing than what the customer technically specified.)

<comment><USER3> So just look at UML as a formal way of talking and you'll be fine. The secret here is that pictures can convey bandwidth much higher than words. If you understand that, then UML is just a way to draw pictures without ambiguity.

For communication, a lot of times I'll be describing something to another programmer on the phone -- or he'll be describing it to me. As they talk, I jot down what I think he's saying in lighweight UML. Then I show it to him by email or webcam or something. It identifies a lot of discrepancies very quickly.

For collaboration, many times in a group we'll tag-team a problem by drawing up our idea of what we think it looks like. Either we trade-off, or everybody draws separately, or one person leads until the group replaces him.

For consensus-building, a lot of times you'll have a subcontractor or person who's remote who is proposing some kind of work for the team. They can do a stand-up, or a presentation, or whatever, but the key thing is usually when they communicate their technical solution in terms of a diagram. This is very useful when talking about how a screen should flow, for instance, or about how a third-party tool acts.

For coordination, a lot of times external groups want to be "in the loop" but don't have time to attend meetings and don't want a lot of paperwork. A lot of times an email with a couple of pictures attached can give them the gist of what's going on technically without a 50-page doc being there.

To differentiate between the Cs, ask yourself: is the communication two-way? One-way? Formal? Informal?

Modeling is just a high-bandwidth version of talking, that's it. I can say more in a model in 10 minutes than I could in 4 hours of explaining.

But, like every freaking thing else in software engineering, people become too attached to it and it has developed all these features that nobody needs. And so it gets abused.

To specifically answer your question, class or domain models seem to work for a LOT of stuff. Sequencing is good at showing things in layers, and Activity Diagrams is just flowcharting on steriods. To give a concrete example of using them, many times when the team is estimating a story and isn't comfortable with the details, we'll take 15 minutes or so and sketch out an activity diagram of how it's supposed to work. That usually either fixes the problem or gives us more questions to go answer :)</comment></comment></comment></comment>


Warren Buffett on newspapers [pdf] - <AUTHOR> http://online.wsj.com/public/resources/documents/LettertoPublisherandEditors.pdf

<comment><USER2> Our Rochester, NY USA paper just raised rates 50% for subscribers and are backing that with an online version of the paper that looks exactly like the print version. I canceled my subscription.

I want local news. I want to pay a reasonable rate (was $12 / month for 5 day delivery, now $18 / month). I don't care for an online version that looks just like the printed paper. I would sign up for a reduced (like $6 / month) version delivered to my iPad (or similar) that just had the local stuff (no AP, stocks outside upstate NY, no national sports, etc) because I do care about what's going on locally. I get the national stuff for free online lots of places, I can't get the local stuff easily.

Buffett seems to agree with my take, it'll be interesting to see where Birkshire takes their papers wrt the internet.

<comment><USER3> Just want to point out how insane is is that none of us would price even the most basic SaaS product at less than $30/month, but people balk at paying $18/month to have a professionally edited newspaper printed and DELIVERED TO THEIR DOOR.

Newspapers are so hosed.

<comment><USER4> SaaS products have support costs. Newspapers are media - they're produced, replicated a bunch of times, then consumed.

<comment><USER3> Ever received a letter to the editor? Legal threat from a story you published? Had someone get fired over a piece you wrote and had to deal with the guy's family having to sell their house. These are extreme examples, but newspapers have support costs, too.

<comment><USER5> As a reporter! These are all VERY real considerations, and very very VERY common. i wrote stories that contributed to a few local elected officials getting the boot. I've had people threaten legal action on my stories too. There are lots of things most people never see/think about concerning journalism. (edit: while there are some reporters who are assholes and who relish getting people fired, most decent ones agonize over whether they are reporting accurately and fairly. Such was the case with Woodward and Bernstein).

Also, the local news thing Buffett talks about is so true. Why would you run national news in a local paper people are buying when folks can get it free from CNN ? or a blog?

I think there's a healthy mix that hasn't really been found yet. The NYT has a decent model of 10 articles a month that seems to have been working well so far. I also _really_ like the thing that that foreign company "Piano" is doing (I had a very similar idea. It's like cable subscriptions but for newspapers).

I'm not ready to say newspapers are dead yet, but they're mighty close, especially if they don't come up with a new business model. =\

</comment></comment></comment></comment></comment><comment><USER6> Although he doesn't mention it here, Berkshire also owns about 18% of the Washington Post:

[http://en.wikipedia.org/wiki/List_of_assets_owned_by_Berkshi...](http://en.wikipedia.org/wiki/List_of_assets_owned_by_Berkshire_Hathaway)

Not sure if this is related at all, but Adrian Holovaty (co-creator of Django, founder of EveryBlock) also worked at the Washington Post -- he has been a big proponent of the hyper-local strategy for Newspapers (the original reason why Django was developed).

Probably a coincidence, but maybe there's some latent hyper-local vibe in the halls of the Washington Post.

<comment><USER7> Yer absolutely right. Hyper local is the only way to win as a newspaper. Sure, you can just reprint the AP stories on the big international news of each day, but a better tactic is to post pictures of locals on the front page, and to let them voice their opinions in the op-eds and column sections.

An Ohio paper did this just right a number of years ago, though I forget which city it was. It wasn't the Cox News towns, so not Dayton...

Anyway, this local Ohio paper's tactic was to replace its business section with a "Mothers" section, with info for local mothers, like day-care news, preschool listings, parenting tips, and info on places to take toddlers during the day. It worked extremely well, and the paper then opened an online forum for these Mothers, who then became the most common users of their Website.

I'm a journalist, as some of you may know. The thing that really makes a printed outlet work is its readers. They should be able to be a community, in the physical sense, rather than the social network sense. It's tough for magazines to make meatspace reader conncetions, as they are national. But local newspapers, they're a perfect place to build local communities.

<comment><USER6> In "Made to Stick", they profile a newspaper called "The Daily Record" in Dunn, North Carolina. Their penetration into their local area is 112%. Quote from the owner:

"The fact is, a local newspaper can never get enough local names. I'd happily hire two more typesetters and add two more pages in every edition of each paper if we had the names to fill them up."

Look at the front page

<http://www.mydailyrecord.com>

All local stories (and a pay wall -- perhaps the future of Berkshire owned papers)

</comment></comment></comment><comment><USER8> I think in a way he's talking about newspapers getting back to their real roots as being genuine 'NEWS' papers. That's instead of the trashy gossip magazines that so many of them have turned in to.

<comment><USER9> I think he feels newspapers should return to their original function of writing their own (local) news and doing their own investigations. NOT 'copy/paste' all the Reuters-news. We've got the web for that kind of news.

<comment><USER10> The problem is that the cost of generating and distributing that local news is not sustainable in the face of internet technologies.

Witness this: I'm at a graduation celebration in Wisconsin this weekend, and all the parents attending throughout the day are very involved in student athletics. One of the kids was running in a track competition out of town with the rest of the school. The results were texted immediately throughout this small town. Another parent was tweeting the play by play of the track meet.

These are tech savvy 40 year olds, completely bypassing the print world. What can print offer them? Maybe a pic or two? They've got those instantly via FB. If this crowd is doing it, it's over for print papers.

And since online papers either need a paywall or higher revenue for ads, they just can't compete.

<comment><USER11> You were witnessing the people who are directly connected to the event, either through a member of the team or through the school. What about the other 500, 5,000, or 20,000 people in the town that didn't care enough to have instant notification, but still want the information even if it's a day later? That's where you make money.

<comment><USER12> _What about the other 500, 5,000, or 20,000 people in the town that didn't care enough to have instant notification, but still want the information even if it's a day later?_

How many events in that class tend to happen? Anybody who cares about a high school track meet is either there, or connected via Twitter/FB/whatever with the people who are. Larger scale events are bipolar: they're either not of immediate interest (new highway construction announced), ignored entirely by most people (the President is in town), or people want to know what's happening _now_ (chemical spill, bomb threat, school shooting...)

The one thing that can be said about local print newspapers is that they aren't the best vehicle for disseminating _any_ of the above news topics except possibly the big-but-not-of-immediate-interest kind.

Finally, the ultimate fate of the newspaper cannot possibly be understood by anyone who, as in Buffett's case, admits he doesn't understand tech.

</comment></comment></comment></comment></comment><comment><USER13> Interesting strategy. Focus on the only advantage local papers have -- the deep local connection -- and build the strategy around that. Might be a leaner newspaper with a smaller readership... but that will happen anyways.

Coupling this 'deep local' focus with a better social media strategy could help them survive. If you become THE source for all local news + provide an easy way for things to be shared / discussed via FB / Twitter, etc you can bring your competitive advantage to the digital realm.

<comment><USER14> The question I have is - with low readership numbers how do you support a news room that can provide in depth local coverage?

<comment><USER15> By focusing your reporters just on the more in-depth stuff and running rewritten press releases for everything else, essentially.

</comment></comment></comment><comment><USER16> I love how Warren Buffett uses plain language in everything he releases. It's easy and pleasant to read for simple folk like me.

<comment><USER17> I consider it a sign of intelligence to be able to speak about complex issues in a plain and straightforward manner.

</comment></comment><comment><USER18> Clay Shirky does not agree with Buffet's reasoning:

[http://www.shirky.com/weblog/2012/05/warren-buffetts- newspap...](http://www.shirky.com/weblog/2012/05/warren-buffetts-newspaper- purchase/)

</comment><comment><USER19> To give a little more context - this letter was sent after an announcement that Berkshire Hathaway was purchasing all of the newspapers owned by Media General.

<http://www.mediageneral.com/press/2012/may17_12.html>

</comment><comment><USER20> The only newspapers I read anymore are local newspapers that are free to read. I still feel like online resources are a terrible way of finding out whats happening around you. I read news online, but I read about shows and events in local papers.

<comment><USER21> I'm curious your thoughts on Patch. Personally, any local news I read I get from twitter of facebook via Patch

</comment></comment><comment><USER21> It seems to me that Patch beats a local paper any day. The argument that making a paper hyper local somehow saves it from having to compete with the Internet just seems off to me.

<comment><USER6> I just took a quick look at Patch and it looked like very superficial robo- generated news from public sources (police blotter, HS sports schedule, stock photography). It doesn't look very readable. Here's an article that puts words around a calendar

[http://chelmsford.patch.com/articles/softball-team-to- face-n...](http://chelmsford.patch.com/articles/softball-team-to-face-newton- in-miaa-tournament)

This article is probably just auto-generated for town (it's about the view of Venus we are getting right now).

[http://chelmsford.patch.com/articles/chelmsford-look-up- venu...](http://chelmsford.patch.com/articles/chelmsford-look-up-venus-is-in- transit)

There are some articles better than these, but not much -- perhaps it's better for other towns.

Here's what a hyperlocal newspaper looks like:

<http://www.mydailyrecord.com>

Real names and faces of people the residents know. The articles aren't Pulitzer prize winning, but they're not just autogenerated.

You can't compete with auto-generated on price, but it doesn't seem hard to write better articles.

<comment><USER22> patch isn't entirely auto-generated, there are reporters and editors working for them

<comment><USER6> I'm sure -- I clicked around randomly and my impression was that the articles were generic and auto-generated. Sadly, it might be able to compete with what passes for local news some places, but my local paper is much better.

The key to local news is local names and faces -- stock photography and localized generic news isn't going to cut it.

</comment></comment></comment></comment><comment><USER23> "I have some strong political views, but Berkshire owns the paper - I don't."

Why can't all CEOs think this way?

<comment><USER24> Buffett is notoriously liberal in both his political views and the way he runs Berkshire Hathaway. He's given alot of leeway to his direct reports (CEOs of the companies they own), not because he's some prescient slacker with a time machine, but because he invests and owns companies that

a) he can understand clearly the business model (i.e., few-to-no pure technology plays, no internet/social)

b) are profitable but maybe not growing gangbusters as time goes on (or because the particular industry is slow-growth)

It's a sound strategy. It won't get you big scores like investing in facebook (wokka-wokka!), but it just feels right and lends itself to safer returns. Messing with the flow like a corporate raider (a la Carl Icahn) is just not in Berkshire DNA.

<comment><USER25> Above all, Buffett invests in companies that have a solid management team in place. Otherwise his hands-off approach would never work.

</comment></comment></comment><comment><USER26> There has been a strange trajectory of print and online media. You had print businesses that dominated the news market (now suffering). Suddenly the Internet came around and people's main source of news was via the web (now booming). Large print and online establishments do not personalized and local content.

People now want quality and relevant content. Therefore local print newspapers may be a lucrative place to be. Utilise the benefits of online, with the relevant content of local. Build a community.

Buffett is a smart investor. If he sees some value in newspapers then there has to be something there.</comment>


Customer Lifetime Value Calculator - <AUTHOR> http://randylubin.com/customer_lifetime_value/ I build a simple Customer LTV app over the weekend.
For more info on the topic:
My blog post about the app - http://blog.randylubin.com/post/15575039202/new-app-customer-lifetime-value
Fred Wilson on the topic: http://www.avc.com/a_vc/2011/04/ltv-cpa.html <comment><AUTHOR> A simple LTV calculator I built over the weekend...

For more info: my blog post on the app - [http://blog.randylubin.com/post/15575039202/new-app- customer...](http://blog.randylubin.com/post/15575039202/new-app-customer- lifetime-value)

Fred Wilson on the topic - <http://www.avc.com/a_vc/2011/04/ltv-cpa.html></comment>


Markdig and Error-Free Programming in F# - <AUTHOR> https://danielbmarkham.locals.com/post/80708/technical-tuesdays-markdig-and-error-free-programming-in-f <comment><USER2> I'm an F# developer, so I'm usually psyched to see F# articles on Hacker News. In this case, though, I can't even tell what this is supposed to be or why I should care.

<comment><USER3> Same here, after the video i couldn't tell why would this guy want to finish to the end. He could go with one big try\catch exception that returns empty array in except block.

</comment></comment><comment><USER4> There's nothing in here about error free programming that I can see, just some fairly basic static typing. Never mind the lack of templating and not treating HTML like the tree structure it is (wrt modifying image sources).</comment>


Love in Translation: Learning about culture, communication, and intimacy - <AUTHOR> http://www.newyorker.com/magazine/2016/08/08/lauren-collins-learns-to-love-in-french <comment><USER2> Maybe it's a reflection of my circumstances - but this reminds me more of a difference in class than language. I was born to two uneducated parents in a poor, rural coal town in Pennsylvania and then later married a woman whose parents were educated and wealthy and whose family had been at least upper- middle class for generations.

To me, at times, I feel her and I speak different languages, use different words, have different intonation and expressions and idioms - in both behavior as well as language. My 'pensyl-tucky' accent and manners, mostly worn away from living elsewhere, still betrays to other American English speakers that I may be of a 'lesser kind'. I have no idea of the author's background, but her description of it sounds closer to 'lower class' American - one in which persona hasn't been formed by years of restraint, discipline, obedience, and expectation. Whereas, her husband seems more like he would be from a wealthier, urban American family. And, inferring from his families' fleeing Spain during the Marxist revolution, maybe it goes back a bit.

When I travelled to Paris for the first time with my wife and her family, they asked me what I thought. I told them that it seemed more similar to any American city than that American city would seem to where I had grown up. And, they seemed shocked that I would say such a thing. But, having had to fit into their culture (not the other way around), I sometimes feel like a foreigner.

<comment><USER3> Thank you for writing about this.

Unfortunately, study [1] shows that children who grow up in less wealthy households, know 18000 fewer words by the time they are 5 than a child that grows up in a wealthy family leaving a very clear disadvantage early on.

[1] The Beginning of Life

<comment><USER2> That's interesting. Why would they learn fewer words? Do the less wealthy just talk less? Or, do they learn other words that are then culled from their vocabulary?

<comment><USER4> There is no way to say this without sounding like an asshole, so I'll just forego trying to sugarcoat it: I can read perezhilton.com without ever having to look up a word. Reading the Economist, I have to look up at least one word every week. Growing up, I never knew a single person reading the Economist or the equivalent; while reading the spatial-and-temporal equivalent of perezhilton.com was though of (by my larger environment, not my nuclear family luckily) as something that was almost intellectual, because hey, it was _reading_.

(I'm a non-native English speaking currently middle class European from a semi-rural area and from a working class background)

</comment></comment></comment></comment><comment><USER5> A fascinating read, I recently started dating someone who is Hungarian, I'm British (subtype: English, subsubtype: Yorkshireman) and I've really enjoyed the cultural differences between dating someone from my own culture and someone from hers.

Did lead to the the strangest complement I've ever ever received - "You are the least English Englishman I've ever met"

</comment><comment><USER6> I can tell you that's a very detailed article from someone whom might be struggling learning french but is nonetheless very knowledgeable about french culture and its intricacies.</comment>


Distortion-Free Wide-Angle Portraits on Camera Phones [video] - <AUTHOR> https://people.csail.mit.edu/yichangshih/wide_angle_portrait/#supp <comment><USER2> I always wondered why Zorin's original work [1] didn't make it to photography nor 3D rendering/gaming; we basically had 2 decades of ugly perspective distortions everybody got used to.

[1] [http://graphics.stanford.edu/~dzorin/perception/sig95/index....](http://graphics.stanford.edu/~dzorin/perception/sig95/index.html)

<comment><USER3> I can't quite see why this is a hard problem. Surely simply converting to a spherical projection would do the job?

<comment><USER4> But then straight lines become curves. This maintains straight lines.

</comment></comment></comment><comment><USER5> I would have liked to see the results compared to ground truth. ie a picture of the person taken from the center the lense.

And i would have like to see more false-positive rejection. e.g. stuff that gets detected as a face but isn't- at the edges of photos, but really that relies on the robustness of the face detect heuristic, so it's a short and sweet heuristic that will make people look more normal at the edges of photos.

</comment><comment><USER6> I think some of their examples are either fake or not shown in full.

[https://i.imgur.com/eRP0fZc.jpg](https://i.imgur.com/eRP0fZc.jpg)

Look at the top-right corner.

<comment><USER7> The examples are not shown in full, because they also correct for nonlinearities in the lens projection. [https://people.csail.mit.edu/yichangshih/wide_angle_portrait...](https://people.csail.mit.edu/yichangshih/wide_angle_portrait/shih_sig19_supp.pdf)

The image on the left is a rectangular crop of the image after lens correction, the one on the right combines lens correction and their warping method. That combination allows them to pull in a few pixels that would've been outside the rectangular region otherwise.

</comment></comment><comment><USER8> Going into this paper, i expected they would be correcting for barrel distortion. I was disappointed to read that they instead:

>we formulate an optimization problem to create a content-aware warping mesh which locally adapts to the stereographic projection on facial regions, and seamlessly evolves to the perspective projection over the background.

Reminds me of this person who wrote a youtube tutorial with the factually incorrect title "Manually correct perspective in Photoshop". He did not correct the (already correct) perspective, but rather selectively distorted parts of scenery photographs so bridges looked "vertical". In fact, he was making those parts of the image no longer conform to the mathematical photo projection. Instead of picking a better-suited image projection, that video and this paper selectively fudge parts of the image to use a different projection.

[https://youtu.be/BocAGkS8yRQ](https://youtu.be/BocAGkS8yRQ)

</comment><comment><USER9> Wow, Let's hope it will be included in the next release of Camera apps of major phone OSes

<comment><AUTHOR> Given that the authors are all from Google, I guess we can expect this to be working on the coming Pixel 4 at the very least.

<comment><USER10> This is actually already working on my Pixel 3 right now.

<comment><USER11> Samsung's camera app as well on the newer Galaxy phones

</comment></comment></comment></comment><comment><USER12> What about testing it for aerial imagery?

<comment><USER13> It works by detecting faces and using a different projection for them. How exactly would this be useful?

</comment></comment><comment><USER14> what projection do our eyes use?</comment>


Show HN: 100 Million Books for Android – Discover All the Books Ever Published - <AUTHOR> https://play.google.com/store/apps/details?id=com.canonofman.hundredmillionbooks <comment><USER2> I'm not crazy about the idea of artificially limiting your app to prevent "app addiction". In fact, the idea that I can only load one snippet every 30 minutes, prevented me from even trying it. It sounds needlessly frustrating.

It also, to me, sounds more addictive than just being able to flip through snippets until you find something interesting. Instead of being able to just use the app when I want something interesting, you've made it to where I have to regularly check the app for updates until I find something interesting.

I would give it a try if the rate-limiting was optional.

<comment><AUTHOR> The initial goal was to make a background app that ran on its own with 0 user input (books would change on their own every few minutes, and the user would just see what they saw, thus creating a sense of serendipity...that's the whole point of the project).

But that approach didn't work because of technical limitations on hybrid apps (Doze and App Standby are very aggressive). The result—30-minute delays until the user can load another book to prevent app addiction—is essentially marketing spin to cover up this technical shortcoming.

It's a subtle change, and the practical result would've been similar, but it would've felt less artificial...perhaps that would've been more acceptable to you.

So yeah I'm not sold on the approach myself. I half-heartedly released this for Android and am playing wait-and-see before I release for iOS.

It's totally possible I'll end up going another way with this...likely away from mobile altogether. Thanks for checking it out.

</comment></comment><comment><AUTHOR> This is an Android version of a Chrome extension that did extraordinarily well on here back in May of last year.

It occurred to me afterward that I should've titled this post

> _Show HN: 100 Million Books for Android – An Anti-App (Not Addictive, Not > Social)_

in light of all the attention smartphone addiction, digital privacy, etc. have been getting recently.

It was built from the ground-up to be unlike most apps...I posted about that here:

[https://medium.com/@100millionbooks/100-million-books-now- ha...](https://medium.com/@100millionbooks/100-million-books-now-has-an- android-app-err-anti-app-8ac814fb1f91)</comment>


Scene bust triggered historic drop in 'pirate' releases - <AUTHOR> https://torrentfreak.com/scene-bust-triggered-historic-drop-in-pirate-releases-200904/ <comment><USER2> Awesome. Now we can see if the movie and media industry experience a correlated rise in profits and settle this question whether "piracy" damages these industries once and for all.

<comment><USER3> At what point have people become so entitled that they think they should be able to consume all the content they want for free because they are slightly inconvenienced by price or availability.

If you don't feel like paying, don't watch it.

If you don't feel like finding out what service a show is on, don't watch it.

If you don't like the fact that you need to subscribe to multiple streaming networks to watch the shows you want to, don't subscribe and don't watch the shows. Having 5 streaming services to subscribe to is still infinitely better than cable.

If you think piracy "sticks it to the man", you'd do a better job by not watching a show and not talking about it. Pirating the Mandalorian and gushing about it to friends, family, and the internet just helps Disney.

Edit: Please downvote me, I enjoy finding out how many people consider media consumption a fundamental human right instead of the luxury good that it is.

Regardless, ask yourself how you'd feel if the film, video game, or book you pirate was made by a close friend. Would you tell them you pirated their product? And if so, why?

As a video game creator whose digital games cost nothing to copy and distribute, I can assure you that piracy directly affects my ability to continue making games.

<comment><USER4> Eh. We have subscriptions to 4 different video streaming services, and still sometimes download TV shows directly to ensure we can watch them e.g. on holiday in a different country without VPN backflips. Even more so if they have ad breaks (e.g. GoT on NowTV in UK); I don't mind paying, but I do mind ads. Not to mention higher quality due to bandwidth dropping lower at peak times, if the service can't keep up (I'm looking at you, NowTV).

I've bought Thief 2 & 3 and bunch of other games twice now, on original CDs / DVD and on Steam or GOG, and used No-CD cracks for the originals for convenience.

<comment><USER3> What you are doing isn't piracy though. You've paid for the content and are working around crappy DRM. That issue is entirely separate from the piracy itself.

Pirates love to conflate their activity with the noble pursuit of freeing the world from DRM. Maybe that is true for the people on the 'scene', but the countless millions of people torrenting their releases are doing it because they simply want something for free. Your actions are very much the exception.

<comment><USER5> What he is doing is legally considered piracy.

</comment></comment></comment></comment></comment><comment><USER6> It's much easier to pirate the content and have a single source of media than trying to figure out which pay service a show/movie is available on.

'Piracy' of tv/movies won't go away until that problem is solved.

<comment><USER7> I'm not blaming you as you aren't the one to set them in the first place, but the goal posts keep moving!

Two decades post-Napster we finally have what everyone wanted all along: an easy, cheap way to watch _almost_ every movie without leaving the couch / listen to _almost_ every song from _almost_ any device.

But now it's not good enough unless it's literally every piece of content from a single origin 0_0

<comment><USER8> > Two decades post-Napster we finally have what everyone wanted all along: an > easy, cheap way to watch almost every movie without leaving the couch / > listen to almost every song from almost any device.

That may be almost true for music, but is not remotely true for movies. Sure, recent releases are usually available on _some_ streaming service, but back catalog movies are often only available on DVD/Blue ray. The big streaming services are not great for movie catalogs (Netflix is much worse than it used to be). We have regressed from the Blockbuster days in that regard.

<comment><USER9> > but back catalog movies are often only available on DVD/Blue ray.

Do you have examples?

Disney for instance are destroying the Disney Vault.

</comment></comment></comment></comment><comment><USER10> One of the biggest successes of the music and movie industry is getting everyone to call unlicensed distribution "piracy".

It equates a completely non-violent act with a very violent act that was once a capital crime.

<comment><USER11> The perception of piracy has changed though, not without help of the content industry. I bet they would prefer us to call it "terrorism" nowadays.

<comment><USER12> There have already been nudges into that direction:

[https://torrentfreak.com/uk-government-video-urges- advertise...](https://torrentfreak.com/uk-government-video-urges-advertisers- to-boycott-pirate-sites-160329/)

</comment></comment></comment><comment><USER13> What would people consider the ideal realistic system?

Something fair to content creators, distributors, and consumers.

I, personally, would like to be able to purchase one time "unlimited" licenses (like buying a book or a DVD) that can be easily validated by the publisher's web API and enable non-subscription content to be served by netflix/hulu/amazon/etc.

To enable (for example) streaming an amazon show through netflix. Presumably, streaming providers would (assuming the cost on an individual movie/series basis would be too small to be practical as a single payment made by me at time of consumption) include low-cost "Bring your own content" add-ons to subscriptions that would cover distribution costs through aggregate balances between providers.

<comment><USER14> Some of the streaming music services do something like this. They scan your local music library and unlock those tracks to stream regardless of your subscription accesses. I used Google Music for this a while back.

<comment><USER15> Mp3.com That was attempted back in the day with CDs. It did not end well.

"To make the service easy to use, MP3.com did not require users to load their own music into the virtual lockers. Rather, a user merely had to insert a copy of the music into the CD-ROM drive of a computer, at which point MP3.com would verify that the person had possession of a CD, then the company would automatically put a copy of the music into the person's virtual locker."

"However, the lawsuit by the record companies asserted that MP3.com had violated copyrights by creating the digital database of albums to which they held the copyrights. In April, U.S. District Judge Jed Rakoff ruled that MP3.com had infringed companies' copyrights."

"In the ensuing months, MP3.com reached settlements with four of the record companies, including Sony Music, Time Warner, EMI Group and Bertelsmann. Details of the settlements were not made public, but analysts estimated the company paid $20-million to each company."

[https://www.tampabay.com/archive/2000/08/29/mp3-com-chief- de...](https://www.tampabay.com/archive/2000/08/29/mp3-com-chief-defends-web- database-of-copyrighted-music/)

</comment></comment></comment><comment><USER16> What motivated people in the piracy "Scene", knowing they risk jail time ?

<comment><USER17> Man vs. Society? For some us, it's just fun to give the world the middle finger. :shrugs:</comment></comment>


Shuttleworth: Python needs to focus on future - <AUTHOR> http://www.heise-online.co.uk/open/Shuttleworth-Python-needs-to-focus-on-future--/news/111534

<comment><USER2> IMO PyPy is Python's best hope. PyPy can be used to make a new python runtime that supports multiple cores more elegantly.

<http://codespeak.net/pypy/dist/pypy/doc/home.html>

</comment><comment><USER3> "Python had missed a chance to in the ninties to become embedded in browsers, an opportunity that went to JavaScript..."

I didn't know this. Does anyone have a reference?

<comment><USER4> I don't know about any serious efforts to embed python into browser, but the point is valid. Due to recent Chrome developments, the bright future is with Javascript.

</comment></comment><comment><USER5> Sounds like he's taking a stab at Python's reticence over removing the Global Interpreter Lock.

<comment><USER6> There's a branch of Python that removed the GIL. On single-threaded stuff, it's slower than regular Python.</comment></comment>


Graph: How long it took Facebook, Twitter and Google+ to reach 10 million users - <AUTHOR> http://eu.techcrunch.com/2011/07/22/graph-how-long-it-took-facebook-twitter-and-google-to-reach-10-million-users/ <comment><USER2> Stupid graph, that's comparing apples and oranges. Yes products are identical, but the distribution is totally different.

Facebook intentionally was only on college campuses. It let them scale slowly and work their way up the chain so to speak.

Twitter was crushed by growth and didn't have an existing user base to tap into.

Google+ growth is impressive, but it's built on top of how many Google Accounts, GMail accounts, Chat accounts and so on? It was designed from day 1 to get to the same 700+ million users that Facebook had.

I doubt either twitter or facebook ever considered the idea of getting a billion people to use them when they launched.

Also, even more than Buzz or Wave, Google+'s only value lies in inviting your friends. So, people invite their friends. It's like a social game, it only is fun if other people play it. It is in everybody's best interest to invite their friends, otherwise you are just sharing with Google's servers. If I wanted to work on a wave, it was with 1-5 people, if I want my social network on Google+, I'm going to invite 100+ people.

Apples. Oranges.

<comment><USER3> OK, yes, apples and oranges, but it is not a "stupid" graph.

The graph provocatively illustrates that google+ could steamroll over facebook in a very short time, if they play their game right.

<comment><USER4> It in no way illustrates that, for the reasons programminggeek provided.

Google+ is making a huge splash, that is about the only meaningful statement that this graph illustrates. It doesn't suggest that they could dethrone facebook because there's a hell of a lot more to making a good social network than how quickly it gets ten million users.

For me and my friends, google+ is a dead zone. I signed up to check it out, and barely have looked at it since. I would like to use it some day, when more of the people I really want to connect with are on it, but there's really no certainty that it will make it to that point.

Until then, be very wary of false extrapolations.

</comment></comment></comment><comment><USER5> It's a bit easier when you already have a user base of billions.

Edit: So I disagree with the article entirely, it's not interesting at all.

<comment><USER6> Agreed, that having a huge user base of another product helps.

But did Google Wave or Buzz take off that fast? I don't think Wave ever probably got to that many users.

<comment><AUTHOR> Thats true,part of it maybe that we were a bit tired of FB . Also there was a sense of hype around the launch of Google + which we didnt have in Wave or Buzz.

Even though I use FB more than any other social networking websites, I still think many of their features suck a lot (photo album, chat). It bothers me that they have been in business for so long , but they have failed to incorporate better features . For me the way FB was frantically responding to Google+ seems silly. They should have done these way before. Can anyone explain why FB had to wait for adding new features until Google+ was launched.

<comment><USER7> Google Wave and Buzz were published with minimal fanfare, and used a paradigm unfamiliar to Facebook users. Google+ is so familiar, and became so quickly wrapped up with everything else in your Google account, that transitioning and participating were easy.

<comment><USER8> In Google+'s case, would you say that a single blog post on the day it launched was anything beyond "minimal fanfare"?

</comment></comment></comment></comment></comment><comment><USER9> Also interesting to compare these timespans to other networks, like telephone and fax. Not sure how accurate these figures are, but for a ballpark: <http://img.photobucket.com/albums/v201/kaap/fig3.gif>

<comment><USER10> Since no one has yet brought up Metcalfe's Law:

"Metcalfe's law states that the value of a telecommunications network is proportional to the square of the number of connected users of the system (n^2)"

"The law has often been illustrated using the example of fax machines: a single fax machine is useless, but the value of every fax machine increases with the total number of fax machines in the network, because the total number of people with whom each user may send and receive documents increases. Goods characterize the first component or intrinsic network effect. Services fall under the second component of network effects known as complementary.[6] A social networking site works the same way as the fax machine described above. The greater number of users with the service, the more valuable the service becomes to the community. Deriving from Metcalfe's Law, every new "friend" accepted or added on these social networking sites makes the user's profile ever more valuable in terms of the law. Positive and negative outcomes take place with all network effects involving a service of this sort. New jobs, relationships, and opportunities arise with more people coming together, however, if not used correctly, services of this type can lead to distant relationships."

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

(If you read the Wikipedia entry, also read about "Reverse Effects")

</comment></comment><comment><USER11> Yeah, and new Facebook features probably get 10 million users overnight. So what?

</comment><comment><USER12> Two weeks is how long it took for me to get as many spammy adds on Circles as I have gotten on Facebook in 6 years.

These stats are a complete joke. Almost any major google launch gets this type of initial surge. That google is happy to celebrate and even cite this type of stats tells me they are looking at the wrong metrics.

How about: how many people have given up fb for google plus?

</comment><comment><USER13> I think the real test will be September: how many students have moved across to running their Social Networking through Plus, as opposed to Facebook or something else.

Once terms begins I suspect people will form around one network or another as their primary tool, so if Plus hasn't managed to get full social groups across and active by then, they may well default to Facebook as their primary social network for organising and sharing. Alternatively, I could see Hangouts managing to grow as a chat/skype substitute even if social groups were generally staying on Facebook as their Events and Sharing site.

</comment><comment><USER14> Replace Facebook with Google Search and Twitter with Gmail, then add in Orkut for good measure. That would be an interesting graph.

</comment><comment><USER15> > _It doesn't really require much more explaining than this_

Ugh...actually it does: <http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/25593>

</comment><comment><USER16> I think this article was written to drive traffic only. The author is comparing apples and oranges and he knows it.

</comment><comment><USER17> Most of the people I know on Google+ got their invite after asking on Facebook or Twitter.

</comment><comment><USER18> Alternate title: "How long it took Google+ to reach 1.3% of the number of Facebook users"

<comment><USER19> I'd like to see the graph of how long it took Facebook, Twitter and Google+ to reach 100 million users. Oh wait, Twitter and Google+ aren't even close to that.

Google+ is still a novelty. That doesn't mean it won't eventually become something useful, but right now I have 20 people in my circles, and not one person posts anything. It's more accurate to say there are 10 million accounts on Google+, not users. Users implies people actually use it.

<comment><USER20> Wikipedia says that Twitter has about 200 million users. The last figure I heard a while back was about 150. <http://en.wikipedia.org/wiki/Twitter>

</comment></comment></comment><comment><USER21> Instead of hockey stick growth, would this be like light pole growth? ;)</comment>


Kushner's team seeks national US coronavirus surveillance system - <AUTHOR> https://www.politico.com/news/2020/04/07/kushner-coronavirus-surveillance-174165 <comment><USER2> Well Kushner did such a good job on Middle East peace having "read 25 books" I'm sure he'll do a stellar job on managing a coronavirus surveillance system...

Proof if ever that your parents can pay for you to go to Harvard, you can wear an expensive suit, marry your way into influence and can still be useless.</comment>


3 YC Companies That Have Gained Some "Traction" - <AUTHOR> http://snapshot.compete.com/scribd.com+jamglue.com+justin.tv <comment><USER2> Traffic seems to be a very poor metric for comparison in this case.

<comment><AUTHOR> The angle of ascent seems interesting. Scribd is YouTube for Docs and they're growing like it.

<comment><USER3> Scribd managed to get 9 front-page links on Digg, and a couple on Reddit, in the last month. That is why their traffic is up so fast. Personally, I assumed that the Scribd guys were posting these high-traffic pages themselves in order to get noticed by diggers and redditers.

Every scribd page that I looked at (from Reddit and Digg) could have been done just as well (and in some cases, substantially better) as HTML, using any blogging software (e.g. WordPress, blogger.com) instead of Scribd. The value- added features it offers (basically, a worse-is-better reimplementation of Adobe Acrobat, and collaborative editing) only caused me discomfort.</comment></comment></comment>


How to make fewer errors at the stage of code writing - <AUTHOR> http://www.viva64.com/en/a/0070/

<comment><USER2> Tangentially related (section 3 talks about this): why would you ever disable code using the && false idiom?

You could just remove it (and rely on you source management system to get it back) or you comment it out (where you will at least get syntax highlighting to help you spot the dead code).

It happened multiple times to me that I missed a tucked in &&false while I was porting older code to a new API. As the code was disabled anyways, I could have spared myself the time of patching it up.

Now sure, if you are just testing something during development, this might be a viable way to disable code, but something like this should not be committed. Please use proper comments or better, just remove the code.

In this light I don't understand why the article is even trying to suggest syntactical "improvements" (adding parentheses doesn't make it more readable IMHO), when the complicated expression should have just been rewritten to

        UINT uFlags;
        uFlags = DST_ICON | DSS_NORMAL;

No condition, more readable and less runtime overhead. And whoever committed this got the pleasure of committing "red lines" (git shows removed lines as red and being able to remove stuff always feels good)

<comment> T-R I've definitely spent a good while in the past trying to decipher the intent of someone who used &&alwaysFalseExpression - Is it a bug? Am I overlooking some subtle side-effect somewhere? If they just wanted to turn the code off, they would have just commented it out...right?

</comment></comment><comment><USER3> Understand the problem you are trying to solve. Accept no substitutes.

Get good with your tools (whether that be IDE, knowledge of the language, APIs etc)

Test your assumptions mercilessly

If you write code as though nobody will ever see it and nobody cares, the code will suck. If you write code as though for the best, most respected and most intelligent hacker(s) you know, the then code will be better. Write code as though you have an important audience that cares deeply about the result.

Yes, you can sprinkle the code with comments explaining to your important audience how awesome you are and what a clever piece of coding something is. And this is actually a good thing, since these become focal points for mercilessly testing your assumptions :D

</comment><comment><USER4> It seems to me that the most common errors in C/C++ are memory leak and/or corruption issues. Coming from someone who's background is in managed/garbage collected languages, doesn't using a managed language help to avoid these common mistakes?

I know that it's still possible to leak memory in C#, like not releasing event handlers, but it's very difficult, if not impossible, to corrupt memory without using unsafe code. In those cases you're probably more likely to be careful with how memory is used or manipulated anyway to avoid causing corruption with the managed code.

<comment><USER5> I would say that the most common errors are because there is no built-in string type (at least in C) and lot of library function expects null terminated strings.

And these are hard to get right, because they are very prone to off-by-one errors, and novice programmers tend to write string manipulation routines from scratch, which leads to corruption.

Use libraries (e.g. bstring or std::string in C++) that do that for you, and you won't have problems.

Regarding memleaks: you can leak database handles, file handles and other resources in managed languages. In C/C++ memory is one of the resources you also take care of. In C++ there are also destructors and you can use RAII to handle most of the cases without thinking.

</comment></comment><comment> T-R > _Align everything you can in code_

Yes. Makes code easier to read _and_ makes it easier to refactor if you use an editor with column select/multi-line caret.

<comment><USER6> I personally detest people who do this, outside of things like tables (i.e. structured constant initializers) and comments on type definitions. If there's a high degree of regularity in the source that you're trying to expose, there's probably a better way of doing it - extracting out common variables, using a table lookup, adopting acronym conventions for regular parts along any given axis which have the same length, so that the code naturally lines up without ugly random rivers of space down the middle.

Unsigned types, on the other hand, are just evil. Way too many people use an unsigned type because they think it represents an invariant that this value will never be negative, that it has some kind of documentation or safety aspect, but that's just wrong. Unsigned types don't act according to the intuitions of most average programmers, and things as simple as for-loops are incredibly easy to get wrong with them (e.g. think about the most common idiom for iterating backwards in C derivatives). If I had my druthers, mixing signed and unsigned ought to expand the expression to the next larger signed type that can represent the range of both (and error out if there is none), and there ought to be separate subtraction / decrement operators specifically for unsigned types. 'u += -2' where u is unsigned would be a type error - assigning a signed value to an unsigned location.

<comment><USER3> Sometimes I arrange my variable declarations so that they make a picture of something in profile...

... don't hate me because I'm beautiful ... :D

\----

On a more serious note, something I have noticed working on large projects with other programmers, is that if each programmer has their own distinctive style and conventions, then you can tell straight away by looking at it who wrote it, and more importantly _who modified it_.

Thus if Billy (who is an idiot) modified something written by Sheila (who is like unto the goddess of inspired poetry in wisdom and understanding), and the whole is broken, you can pretty much bet that it is Billy's modification that has broken it, and you can spot his bits straight away, this makes debugging a _lot_ easier.

I think this is one of the more unfortunate side-effects of things like checkstyle and other forms of overly restrictive style enforcement. The more we sand-paper everybody back to the same (low) level of code appearance, the more information is lost for what I like to call "forensic debugging".

<comment><USER6> I strongly agree with this as well - however, when I need to overhaul a huge portion of the codebase, I may end up normalizing tabs and spacing somewhat; e.g. tabs between 'if', 'while', 'for' and '(', spaces between function / array name and '(' or '[', etc.

That is to say, I don't mind everyone being free to format code how they see fit, just don't be surprised if in rewriting or modifying it, it gets "fixed" differently.

I'm currently doing this right now at work, hence my vehemence. There's even things like this in class definitions:

        int const * const	FooBar // Yes, that's a tab
            (Foo foo, Bar bar)

which at first glance can end up looking like instance variable declarations instead of methods.

</comment></comment></comment></comment><comment><USER7> A better approach to #5 (Do not copy a line more than once) is to make a "template" copy of the line, which will fail to compile, and then make a bunch of copies of that.

Example:

Template line:

        EnableWindow(GetDlgItem(hwndDlg,),);

Copy/paste:

        EnableWindow(GetDlgItem(hwndDlg,),);
        EnableWindow(GetDlgItem(hwndDlg,),);
        EnableWindow(GetDlgItem(hwndDlg,),);

Final edit:

        EnableWindow(GetDlgItem(hwndDlg, IDC_PRIMARYSTATUS), TRUE);
        EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIMESPIN), FALSE);
        EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIME),);

Now when you try to compile, but forgot to update something (such as the missing boolean in the last line), the compiler will complain.

</comment><comment><USER8> For languages that support it, use lambda functions judiciously - too much of them make code really error-prone and hard to debug. (Not the most wide-spread problem, but came across this today)

Also check for null!!! ;)

<comment><USER9> Your experience is _the exact opposite_ of what I was promised by the functional programming community. Can you please elaborate on how lambdas are giving you trouble?

<comment><USER8> Don't get me wrong, lambdas are really useful and elegant, I just think they should be used when there is a purpose other than simply making the code succinct - such as limiting scope. I've seen people use them instead purely to reduce the number of lines of code, which I think in the end makes it less readable and harder to debug.

</comment></comment></comment><comment><USER10> Well, this one is not impressive, but I find it useful for C-like languages, Java included:

        if (5 == somevar) { ....

If you accidentally write "=", you'll notice.

<comment><USER11> Many compilers (gcc and mxmlc come to mind) simply warn you if you try to do "if (somevar = 5)" and suggest an extra set of parenthesis to shut up the warning, if that's really what you wanted. Python throws a syntax error.

</comment></comment><comment><USER12> 7\. Don't write code in C

<comment> loup-vaillant I know it sound unhelpful, but it isn't. If you can avoid low-level, unsafe languages like C and C++, by all means do so.

Chose a high-level language like Python, Haskell, Lisp… Anything with closures and automatic memory management, provided it let you fall back to C when you really need it.

Outside maintenance, few project need to use C or C++ _all the time_.

</comment></comment><comment><USER13> In C++ you should be using the typesafe functions std::fill and std::copy instead of memset and memcpy.</comment>


Elixir v1.8 released - <AUTHOR> https://elixir-lang.org/blog/2019/01/14/elixir-v1-8-0-released/ <comment><USER2> Maybe a better link: [https://elixir- lang.org/blog/2019/01/14/elixir-v1-8-0-releas...](https://elixir- lang.org/blog/2019/01/14/elixir-v1-8-0-released/) . One thing about that blog post that really caught my eye:

> _There is only one last major feature planned for upcoming Elixir versions, > which is the addition of mix release to Elixir itself, streamlining the > experience provided by packages like distillery._

Aside from having native support for releases, which would be killer, I was really struck by the idea that the language will be basically "finished". You rarely see that in software these days, but I think there's a lot to be said for trying to get to that point.

<comment><USER3> Being that the language is user-extensible, where do you see it going in the future? Will "finished" mean feature-complete, or will we see anything worth incorporating into the language?

This isn't directed specifically at you, but to anyone who might have ideas.

<comment><USER4> The Elixir team took a deliberate step to limit the features built into the language itself, and prefer non-core solutions developed as external packages instead.

For example, they recently scrapped plans on building property testing into the language core.

Which is something I find very refreshing, TBH, having worked with the JS ecosystem, I somehow find this approach to be rather relieving for some reason.

</comment></comment></comment><comment><USER5> Congrats on continuous progress of the team.

But I have a question. I took an online Erlang class and I actually ended up really liking the Erlang syntax once I got used to it. To me now, Erlang is now far more readable than Elixir.

I understand Elixir is designed for the Rubyist, but I'm curious how is the experience of others who have looked at both Erlang and Elixir.

<comment><USER6> Elixir have better syntax because it's familiar.

I did play around with Erlang a few time. I really love the comma and period. It really nest and group the function patterns together.

For Elixir you just have to put them near each other. The function are enclose in a do/end block. And you put those similar pattern function next to each other. I believe you can move those pattern function around.

Other than that I can't recall much else. Prolog syntax is foreign but I'll admit I can see myself learning Erlang pretty fast since the language isn't "big" compare to Java or Scala. Like wise Elixir is a small language too with added macro (I don't recall Erlang got this) feature. Elixir also have better tooling baked in (mix/hex, doc, lint, etc...).

Also the Erlang community sucks. This is my personal experience but I vividly recall attending a meetup. The group meetup have a discussion about Erlang's adoption and how to get better adoption. I told them Ruby got popular because RoR other wise people would have chose Python and call it a day. Erlang should really have a killer framework like a web framework. Everybody thought it was ridiculous.

And you know what? Elixir came along and so did Phoenix. Phoenix may not be the only thing that got Elixir popular, Elixir got toolings from the get go. Jose and those people are from the industry they know what was needed. They came from Ruby.

<comment><USER7> > Elixir have better syntax because it's familiar.

Which syntax is "better" depends on how you measure. I'm a big fan of Erlang's "minimalistic" syntax. It means I might have to write a bit more code, but it also means that the code, once written, is very explicit.

> Like wise Elixir is a small language too with added macro (I don't recall > Erlang got this) feature.

Well, Erlang does have simple macros (-define(MACRO(Var1, Var2), {some_expr, #{ var1 => Var1, var2 => Var2 }}).) but they are nowhere near as powerful as Elixir's system. There is merl ([http://erlang.org/doc/man/merl.html](http://erlang.org/doc/man/merl.html)) which allows for something quite similar, in particular if it's combined with parse transforms. I haven't used it and haven't seen usage in the wild, though.

> Elixir also have better tooling baked in (mix/hex, doc, lint, etc...).

That I give you, while rebar3 is already a huge step forward compared to what we had before, mix's out-of-the-box feature-set is really nice.

> Also the Erlang community sucks. This is my personal experience but I > vividly recall attending a meetup. The group meetup have a discussion about > Erlang's adoption and how to get better adoption. I told them Ruby got > popular because RoR other wise people would have chose Python and call it a > day. Erlang should really have a killer framework like a web framework. > Everybody thought it was ridiculous.

This is a bit harsh. You can't derive "community sucks" from "the ones at this meetup didn't share my opinion". I don't share it either. I think the main thing holding Erlang back is the current out-of-the-box tooling (rebar3 is not included in the OTP distribution) and its general performance.</comment></comment></comment>


Need Some Feedback on the Python Job Positions Aggregator - <AUTHOR> http://www.pyjobs.xyz/#refer <comment><USER2> Menu bar overlaps heading on mobile. iPhone 6, chrome.

<comment><AUTHOR> Thanks for reporting, bro! Gonna change it xD</comment></comment>


Ask HN: Is market for productivity apps dead? - <AUTHOR> There are tons of productivity apps which were made in the past 5 years.
Everyday hundreds of productivity apps are released and users are not in a mood to install new apps.Can there be any app in future which can be as successful as evernote ? the tech community says vr will be the next big thing. If you start building a productivity app now , can it be successful ? <comment><USER2> Not sure if it's dead, but there are sooo many of them, and they typically encapsulate someone else's idea of what leads to productivity. So, it's hard to find one that fits exactly how you'd like to work, and of the several I tried, there is always ONE big thing that keeps me from adopting it fully.

So, it's not dead, but it's a very crowded space, and discovery is a challenge. It's the classic red ocean. If you're going to build something, I'd spend the time elsewhere.

<comment><USER3> Hm, in a way, no one really makes "one size fits all" apps, because if everyone did that, there'd be no way to stand out in a sea of hundreds of basically identical apps.

So instead, these apps often follow the unix philosophy "do one thing and do it well". Unfortunately this means now there's a sea of hundreds of apps that do things in their own particular way, so as a user you also have to figure out not only which particular way you like best, but which ways you hate and can't use at all.</comment></comment>


Seattle Startup School May 31st Sixhourstartup.com - <AUTHOR> http://sixhourstartup.com/conference

<comment><USER2> $99 is generally a really good deal for a conference. Only people like Paul Graham can put on stuff like Startup School for free.

This was organized by a group of Seattle Hackers who are just trying to do a good thing. No ulterior motive. No goal of profit. No hustle for sponsors. I know the people putting it on-- they are decent chaps... And I know a couple of the speakers (in fact, I might be on a panel).

WTF is the point of attacking the event?

</comment><comment><USER3> "Like Startup School, but more expensive and with people you haven't heard of!"

<comment><AUTHOR> Six Hour Startup runs monthly free events on every Second Saturday of the month her were we build really great cool projects like timelope.com, poormikes.org. (our next project is on May 10th.

The conference is being run as close to at cost as possible. This isn't comdex, and we have a huge number of college student discount admissions.

The goal of the event isn't to have a bunch of famous people lecture at you, (although we have some really cool seattle based speakers attending) its to give you the hands on tools you need to build a great startup. At the end of the day you will have a hackers guide to getting your company up and running.

<comment><USER3> Yeah, don't mind my snark -- you guys are doing good work, keep it up!

</comment></comment></comment><comment><USER4> Gee, the people from Sevenhourstartup.com are going to be pissed when they hear about this.

Six? Seven's the number, man!

Sorry, been reading reddit too much. Seriously, it sounds cool, and if I was anywhere near Seattle I'd go.

</comment><comment><USER5> I'm looking forward to this event. As an entrepreneur just starting out, I'm hoping this event will help me learn more of the basics of running my own company, and help me to understand the day-to-day of the startup world.

I've got to say I've learned a lot just reading Hacker News and the articles referenced here, but having in-person events to go to helps a lot.

</comment><comment><USER6> Sounds like a great event! I think some News.YC users, many attendees of the most recent Startup School, were reacting to the purposely chosen words "Startup School" in the submission title, which begged for a comparison.

</comment><comment><USER7> I will be there! Will be great for local startups to get some great information on how to form a company, building it up, etc.

</comment><comment><USER8> This conference sounds awesome. As an efficiency consultant, I can't think of anything better than getting all your business basics taken care of in a single day!

<comment><USER9> This comment sounds suspicious. As a long-time News.YC reader, I can't think of anything more obviously sockpuppetish than a newly created account whose first comment is a breathless puff for an obscure conference!

<comment><USER7> I know this person and the people doing the conference and trust them both. Feel free to contact me directly nathan (at) npost (.) com if you have any questions.</comment></comment></comment>


A/Bingo split testing now on App Engine, built for Khan Academy - <AUTHOR> http://bjk5.com/post/10171483254/a-bingo-split-testing-now-on-app-engine-built-for-khan

<comment><USER2> Hearing about this made my week.

<comment><USER3> Hearing about this make me sad because my App Engine is Java-based :(

<comment><USER2> Some options:

1) The code is available under MIT and the docs are CCed and specifically designed to make it easy to clone this. At least three people have successfully done so, in a variety of programming languages, web frameworks, and technology stacks. If programming Java is not difficult for you, block off about a week or two and _bam_ problem solved.

2) If you have access to vast amounts of cash but your programmers are just too busy delighting people to write an A/B testing framework, you could hire me to rewrite the whole codebase in Java. This would only cost you low five figures.

3) If you don't want to program and don't have tens of thousands lying around but do have tens lying around, Visual Website Optimizer is a great option for $CHEAP.

4) If you have neither programming skills nor tens of dollars then you may want to reevaluate whether A/B testing is a huge need at this point in your life.

</comment></comment></comment><comment><USER4> I do not think you can just stop the test when you find something you think is significant

<http://www.evanmiller.org/how-not-to-run-an-ab-test.html> 'If instead of deciding ahead of time, "this experiment will collect exactly 1,000 observations," you say, "we'll run it until we see a significant difference," all the reported significance levels become meaningless. '

Reading the stats.py it looks like you might be doing this.

</comment><comment><USER5> Wow... this is awesome! I was literally looking around this week for exactly this kind of framework. Fantastic work, and definitely plan on using it.

Thanks to Ben and Khan Academy!

</comment><comment><USER6> Troy Goode wrote a port for ASP.NET MVC, ABsolutelyMaybe. I've had good luck with it. It wasn't too difficult to migrate from the default storage engine, which is serialization.

<https://github.com/TroyGoode/ABsoluteMaybe></comment>