Ask HN: Is it just me or has the quality of links on HN improved significantly? - <AUTHOR> .. Especially the front page! I can't get enough reading the insightful articles and viewing the videos.  If the content had indeed improved, what changed? What measures contributed to it?<p>EDIT: I mean the quality of tech/startups content.  I usually ignore political posts. <comment><USER2> I'd say it has definitely decreased significantly.

There's way more marketing posts and "tech news" which are nothing but barely informative opinion pieces around something. Quite a lack of quality content compared to years before.

<comment><USER3> I agree. I haven't checked the front page much. Feel free to flag if it doesn't meet the requirements, as per guidelines:

"Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably off- topic. "

Unfortunately, barely informative opinion pieces isn't in that list.

</comment></comment><comment><USER4> Yes, I've also found that it has. The most likely reason is that either someone (mods) is vetting them to ensure that the high quality posts stay up, or maybe the community itself is doing the good thing by upvoting the good quality posts and downvoting the bad ones. Or maybe, its a combination of both!

<comment><USER5> Posts can't be downvoted. They can only be upvoted, ignored, or flagged.

And everything on the front page gets there by being upvoted by readers.

<comment><USER6> I think you can downvote after getting 500 karma.

<comment><USER7> Not posts. Only comments can be downvoted. Posts can only be flagged.

</comment></comment></comment></comment><comment><USER8> No, I haven't noticed improvement, but my model of improvement may not necessarily be one that we share. I see a more thought-diverse community as an improvement. We learn from those who don't share the same views as us. Hacker News hasn't offered the opportunity for that to happen. I see valuable dissenting opinions buried at the bottom of the comments section all the time. This is for a variety of reasons, not just the opinions of the community. Two categorical reasons include architecture and design. Hacker News is designed to facilitate group-think. The timing of comment submissions and lack of nuance in the voting mechanism make it especially problematic for promoting thought diversity.

<comment><USER9> I think you're arguing that the platform should help with finding thought- diverse comments, but how should it decide for you?

If you want those comments, you scroll down. It seems the problem is that those comments aren't being prominently featured at the top. Should they?

Also, I see plenty of comments that I disagree with being voted to the top. The key aspect is that they are well-thought comments, very polite and bring interesting information. I usually upvote those comments myself.

In summary, I don't think the platform can fix its users.

</comment></comment><comment><USER10> I think the more meta and wide ranging the subject matter, the better, because there's something for every user of HN to comment on, and oh do users love to snipe on specific sections of an article. Meta content is like crack for users. Narrowly constrained articles seem to be ignored.

</comment><comment><USER11> Given that I'm a data engineer I have a bias towards this, but I love how many SQL articles have been posted lately.

</comment><comment><USER12> The site still feels more inclined toward political discussion than it used to be. There were the occasional explosions like when Chelsea Manning was arrested and when Schwartz committed suicide, but the site used to feel more technical... at least to me. I have no hard data.

I would love to see demographic data on users and how they have changed over time as well.

<comment><USER13> More political for sure. And more nytimes, Bloomberg links that I am likely to have already read either directly or through other channels.

And seriously, do we really need another link talking about how awesome Rust is?

<comment><USER8> The Rust phenomenon isn't unique. It happened with every other major breakthrough technology ever since Hacker News has achieved critical mass. We are going to be bombarded with whatever is leading change. New endeavors that aren't leading change fizzle out of existence from the front page.

<comment><USER13> You're right - I wrote that in jest. I was first to complain but I truly do like the content that makes it to hacker news and the way in which it is ranked. I would say 9 times of 10, I'm surprised to see what's on the front page because it's definitely not the mix of information I normally consume. It's cool to see what people are doing and think about new frameworks like rust and clojure and even erlang.

</comment></comment></comment></comment><comment><USER14> No, I disagree.

</comment><comment><USER15> True that!</comment>


Show HN: 100% offline Shamir's Secret Sharing GUI - <AUTHOR> https://simon-frey.com/s4/ <comment><USER2> Hate to be this guy, but things trying to be like this should implement a CSP with `connect-src 'none'` (and `form-action: 'none'` and `self` restrictions on everything else). Otherwise I can't be assured that the secrets won't be sent off without disconnecting my network interface.

<comment><AUTHOR> The problem with connect-src 'none' is that is does not allow the webassembly to load than (as this is loaded via js)

`Content Security Policy: The page's settings blocked the loading of a resource at [http://localhost:8080/wasm/wasm.wasm](http://localhost:8080/wasm/wasm.wasm) ("connect-src").`

For now I only added `default-src: 'self'; form-action 'none'` to the index.html

<comment><USER3> Why not just embed the wasm directly in the webpage?

<comment><AUTHOR> Funny I came up with the same idea about 10min ago :D It is now directly embedded via a data uri.

This allows to set `connect-src: 'data'`

</comment></comment></comment></comment><comment><USER4> While SSSS provides information theoretic security, there are a couple of security gotchas. One example is that it leaks the length of a secret unless padding is used. In practice this isn't usually an issue, since many applications (like this one) use SSSS for sharing fixed-size symmetric keys.

A more concerning gotcha is that this scheme doesn't produce verified shares (i.e., shares lack integrity). An adversarial or forgetful share holder can submit a bad share and within this scheme, you'd have no way of being able to prove that they did this. All any of the participants would know is that the resulting secret is wrong, whatever that means for the application (e.g., the AES key doesn't successfully decrypt a ciphertext).

<comment><USER5> Can't these problems be solved with another layer like signing with a pubkey where the private is thrown away after issuance? And then maybe some error correcting algorithm to avoid forgetful users?

<comment><USER6> Signing the shards was the first thing I thought of as well. This will completely thwart bad shards from being mixed into the decryption.

</comment></comment></comment><comment><USER7> I didn't know the algorithm: [https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing](https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing)

<comment><USER8> A fun fact is that this is one of only two algorithms in

[https://en.wikipedia.org/wiki/Category:Information- theoretic...](https://en.wikipedia.org/wiki/Category:Information- theoretically_secure_algorithms)

The idea is that there is no amount of computational capacity or mathematical insight that could permit an attacker to break this algorithm, even in principle. That contrasts with other primitives which are often insecure given an efficient P=NP solution (guess the right answer and check that it was correct). With the one-time pad and Shamir's Secret Sharing, the attacker has no meaningful way to check whether the guessed answer was correct or not.

(Both algorithms have a requirement for random input, and the information- theoretic security argument assumes that the attacker could never predict any information about your randomness source, which might not always be true if you're running on real hardware. If you're driving the algorithm with the output of a CSPRNG, the information-theoretic security may reduce to the security of your CSPRNG, which is _not_ information-theoretically secure, for example because an attacker who could somehow guess the CSPRNG seed and offset could potentially confirm that this guess was right.)

Another way of thinking about this is the a brute force attack on a security system requires a way to detect when your current guess is right. This is why, for example, the RSA encryption challenges would always have a plaintext starting with "The unknown message is:". This assumption isn't necessarily that unrealistic if you know that the plaintext of an encrypted message is a particular file format. Apparently a huge amount of military cryptanalysis, once governments started building special-purpose hardware for brute-force- like attacks, consisted in trying to find and refine ways to usefully detect when the attack had succeeded, given relatively great uncertainty about the nature of the plaintext. It also appears that many of those plaintext- recognition ideas are still classified (!).

In an information-theoretically secure algorithm, there is _no_ way to detect a successful break of the algorithm because all plaintexts are equally possible and equally likely given only the evidence of the ciphertext. That means that the ciphertext itself doesn't contribute any new information about the plaintext, so there's in some sense nothing to worry about from sharing the ciphertext with an adversary.

<comment><USER9> Haha, and I was thinking "Wait, is one-time pad the other one?" before clicking! Too bad, since one-time pad is only theoretically secure. Too many ways to break it in practice.

<comment><USER10> Well, if used correctly, it _is_ practically secure, and otherwise it's not really a one-time pad.

</comment></comment></comment></comment><comment><USER11> This is really cool! Very small suggestion, I'd put Minimum required shares ahead of Shares so that it follows the m-of-n order.

<comment><AUTHOR> Nice UX improvement. Will add it

Edit: Added

</comment></comment><comment><USER12> Shamir is one of the suggested ways to restore crypto in case of death with more decentralized trust. You select 20 friends and give them each one of the keys, then at your funeral 10 or more of them come together to unlock your wallet and execute your will. But it has a big problem: rot.

It needs to be accompanied by a system that ensures everything is still in tact. The system would ping every key holder every X months and have them prove they are still in possession of their key. If a problem arises the wallet owner is alerted to deal with it. Otherwise she gets an all clear report.

The annoying thing tho is now there is a centralized 3rd-party database of all your key holders. Part of the security is nobody knowing who's in on it. Imagine a wallet with $100M. That database starts becoming valuable. So the service would have to be zero-knowledge or hosted, but now you're hosting stuff, and not just any stuff, the most valuable stuff, requiring top security.

<comment><USER13> I have usually seen multisig as the recommended way, not Shamir.

One Shamir vs multisig article : [https://medium.com/clavestone/bitcoin- multisig-vs-shamirs-se...](https://medium.com/clavestone/bitcoin-multisig-vs- shamirs-secret-sharing-scheme-ea83a888f033)

<comment><USER4> [removed]

<comment><USER12> The only thing I don't like about that is that it is dependent on the network. Some cryptos don't have multi-sig for example. It's a full system, you have to be aware of protocol changes and such - Shamir is straight math and works on any type of key independent of the system. Trade-offs as usual I guess.

</comment></comment></comment></comment><comment><USER14> Very cool.

FYI the whole page breaks if you accidentally delete the "shares" value or type 0, requiring a refresh to revive it.

<comment><AUTHOR> Thanks for that bug report! On the go right now, will fix this in about 3 hours!

Edit: Fixed

</comment></comment><comment><AUTHOR> Aaarg. The save to local file does not work as of javascript fetch not being able to load local resources. Anyone any ideas how to cirumvent that problem. (The webassembly is loaded via fetch())

<comment><AUTHOR> Yay, got that fixed with data urls :D Now works also as downloaded file.

</comment></comment><comment><USER15> > You can find the code on Github and this website works completely offline. > Save it to your computer (Ctrl+S) in order to not loose access to the s4 in > case this website will be down at any point in the future.

I'm also seeding this on Beaker. hyper://467f73aff5af260ab04a4f064fa8cd7fda6f23fed4ff227bc29514c3381a2087/

<comment><USER16> I've put it on IPFS too. [https://ipfs.io/ipfs/Qmdg6io4ZbdRdW92yUjeL2DHhcdNF3jCF2XWwDs...](https://ipfs.io/ipfs/Qmdg6io4ZbdRdW92yUjeL2DHhcdNF3jCF2XWwDs6MKWntU/)

IDK what Beaker is exactly, but the nice thing about IPFS is that this hash is guaranteed to correspond to this commit: [https://github.com/simonfrey/s4/commit/1d169cb33761b57569e52...](https://github.com/simonfrey/s4/commit/1d169cb33761b57569e52e4e0b11cc2baa1ad8e2) \- it can't be modified (by me or anyone else) in the future.

<comment><USER15> This seems to be a good fit for IPFS, since it's a single page with no absolute paths.

While Beaker does let me update the source code at that location - you can also link to the current version permanently by adding the version number (46, in this case) to the end.

hyper://467f73aff5af260ab04a4f064fa8cd7fda6f23fed4ff227bc29514c3381a2087+46/

</comment></comment></comment><comment><USER17> Nice work and extra points for being super responsive to bugs/fixes/recommendations from comments :-)

Reminds me of something similar: [https://iancoleman.io/shamir/](https://iancoleman.io/shamir/)

<comment><AUTHOR> Yepp I do know about that one, but it is based on an outdated js library :/ [https://github.com/amper5and/secrets.js](https://github.com/amper5and/secrets.js)

</comment></comment><comment><USER18> Placed on IPFS as well because why not.

[http://ipfs.io/ipfs/QmZqRpnRgvBPbP65pdyD2fYhDh9VDEW4EGb5kM41...](http://ipfs.io/ipfs/QmZqRpnRgvBPbP65pdyD2fYhDh9VDEW4EGb5kM41EVY7BZ)

<comment><USER12> Are you pinning it on your server, is that how that works?

</comment></comment><comment><USER19> This is really neat! I found a minor issue; changing the number of shares on the decode panel (after a successful decode) seems to freeze the output; using a recent firefox on linux.

<comment><AUTHOR> Thanks for reporting! Fixed :)

</comment></comment><comment><USER20> Love to be this guy, good way to crash the browser. Set share size to 1000+ and Enjoy!

<comment><AUTHOR> The GUI starts to look quite shitty around 10 shares already. Something I should work on.

The above mentioned 1000+ share problem could only be solved by a limit, but I would be in favor of not limiting users here.

p.S. On firefox it only chrashes the tab

</comment></comment><comment><USER21> Interesting. But what about ssss?

Also, I vaguely recall that results may be implementation specific, in that shares must be combined with the same app that produced them. So is this implementation compatible with others?

<comment><USER4> SSSS is Shamir's Secret Sharing Scheme.

Sort of. Different apps may use different finite fields. The math should be the same as long as you're computing everything modulo the same integer. It is also possible that some apps may encode shares differently. For example, I've seen some apps base64-encode each share where others keep them as integers.

</comment></comment><comment><USER22> A very minor nit: Your placeholder text begins "What every message", where I'm pretty sure you meant "Whatever message". Initially confusing until I figured out what you meant.

<comment><AUTHOR> Damn. This should not have happened. Thanks for that note:) Will change that asap

Edit: Fixed together with other spelling mistakes

</comment></comment><comment><USER23> I am not able to decrypt when I set the minimum shards to 3 out of 5. Works with 2.

<comment><AUTHOR> Thanks for that report! Is a problem with the javascript. Should be fix in about 20 min

Edit: Fixed

</comment></comment><comment><USER24> Hate to be this guy, but it doesn't work with unicode.

<comment><AUTHOR> Thanks for reporting! The encryption actually works with unicode (as it is go) but apparently vue.js does have a problem with it.

Will check how to solve this :D</comment></comment>


My GitHub Game Off 2012 Roguelike - <AUTHOR> http://ondras.github.com/star-wars/

<comment><USER2> Scary from an intellectual properties perspective, but I love how you switched to the "Star Wars" context as way to motivate using the (required) concepts of "push", "pull" and "clone".

The "fork" I'm not so convinced about, but being innovative is of course cool and I do love my 3-way from ancient arcade games which it made me think of.

<comment><USER3> How is it scary from an intellectual properties perspective?

LucasFilm is very nice with their properties, permitting just about anything to be used unlicensed so long as there isn't a profit being made (they even support people doing it sometimes)...

</comment></comment><comment><USER4> Cool idea, but it's not really clear to me when I'm able to reflect lasers. Is it completely random? I think the game would be a lot more challenging with less reflecting. I kill way too many guys without meaning to.

<comment><AUTHOR> Reflecting happens with 50% chance. Which is far less than what we see in traditional franchise :-)

</comment></comment><comment><USER5> Very nice!

Two minor control issues: waiting in place with . does not regenerate health and force like movement does, and non-numpad number keys don't work for movement (useful on a laptop).

<comment><AUTHOR> In place wait is probably a bug and should be fixed soon. Not sure about non- numpad numbers though; their topology is far from being useful...

<comment><AUTHOR> ...aaand fixed!

<comment><USER5> >> In place wait is probably a bug and should be fixed soon. > ...aaand fixed!

Doesn't look that way; it still doesn't regenerate health and force.

> Not sure about non-numpad numbers though; their topology is far from being > useful...

True, but it beats not having diagonals at all. I've gotten used to playing roguelikes with the number row, and it becomes quite usable after a while.

</comment></comment></comment></comment><comment><USER6> I love rougelikes. I'll give it a try on my lunch break.

Here's my entry: <http://news.ycombinator.com/item?id=4853421>

Good luck in the Game Off!

</comment><comment><USER7> Here's my entry bro - <http://news.ycombinator.com/item?id=4853042>

</comment><comment><USER8> Any way to restart without the tutorial?

<comment><AUTHOR> Unfortunately, no.

<comment><USER8> Probably a good thing, as the only way I've found to do well is to hide in good terrain, which I can do while dealing with Mickey Mouse.

</comment></comment></comment><comment><USER9> First reaction - oh cool, this works on my phone!

"Enter to continue" - "Enter" what? Like, a key?

</comment><comment><USER10> A bit too realtime for my liking, but awesome idea and execution :)

<comment><AUTHOR> The game is strictly turn-based, there is nothing realtime in it...

</comment></comment><comment><USER11> nice idea. the gameplay is not too thrilling, but still it's quite funny to play for let's say 2 minutes...

</comment><comment><USER12> Really nice

</comment><comment><USER13> Brilliant!</comment>


Advertising in Mobile Games is Broken - <AUTHOR> http://blog.betable.com/advertising-in-mobile-games-is-broken

<comment><USER2> There's plenty of room for innovation in the mobile game ad space.

I actually do like the strategy of making the ads part of an achievement system for the game. This would work especially well for localized ads. For example, if you reach a certain level on a game, get $2 off your sandwich at Subway. This allows for brand exposure and funnels people into the physical stores.

</comment><comment><USER3> My wife stopped letting our son play Angry Birds on her phone because of the scantily clad ladies advertising "meet sexy singles in your area". When will Adblock Plus port to Android?

<comment><USER4> Sorry, but AdBlock on a game like Angry Birds IS stealing.

Rovio certainly has a lot of money, but other developers aren't so lucky -- and many are barely scraping by.

Try investing nearly $5000 and seven months of your life in developing a game that's being ad supported, where your income relies on ads, and then watch people joke about blocking them. It sucks, trust me.

<comment><USER5> I don't disagree with you, but drcube's point is a serious and valid one. It also smells like an opportunity for devs and/or ad networks to provide much better targeting. Ad-supported games for kids should be able to get kid- appropriate ads if the developer or the parent so choose. I haven't done enough ad-supported game development to know if that kind of thing is currently possible, but its something I would look into if a 5 year old were using my ipod regularly.

<comment><USER4> It's a tricky problem, actually.

My game as an example: Almost half of the users are under 18, but most of the other half are in the 18-35 range (according to Flurry metrics, which guesses what the age of a user is based on what OTHER apps on the device are reporting -- I'm not asking them myself).

Unless I ask each user how old they are, I can't know whether or not to serve them ads. And if I DO ask them, then people often feel like I'm prying too much. ESPECIALLY if I'm asking if they are under 15 (and finding out they're under 13 would cause COPPA to kick in [1]).

I already have the "no adult ads" selected in my ad provider, which is supposed to block singles ads, but I've seen them come up anyway. Presumably if I fed them an age that I'd gotten from a user they would be filtering the ads more, if only to target them better.

Don't know.

[1] <http://www.coppa.org/>

</comment></comment></comment></comment><comment><USER6> Probably the only way to really make ad-supported gameplay a reality would be to flip the model up-side down: Design the game around the ad itself.

We've seen a few of these (the Burger King Xbox games come to mind). Some of them are actually fun to play.

Unfortunately, this sort of work doesn't come cheap.

<comment><USER2> I have to disagree with this strategy. At my company we have made a few one- off games for advertisers and it is always the same story. The advertiser loves the games but the users don't.

The problem with this strategy is that if you're designing a game for an advertiser, they are the ones you have to make happy because they provide the $$$. Users will always be a second priority.

<comment><USER7> For this strategy to work, it has to fit into why the users love the brand. For instance, for Sneak King (the Burger King XBox game), the game fit in with what the brand's audience found cool and funny, and that was key to its success.

</comment></comment></comment><comment><USER8> So their only solution is to move the intrusive ads to being part of achievements, and thus cheapening them in the eyes of the players?

Sorry, but in my eyes, that's actually worse.

<comment><USER7> Well, that's Kiip's solution, but I think it's an elegant one. Beats pop-over ads anyway.

Honestly, I think the game industry should be looking for other ways to monetize their content.

<comment><USER9> I'm there are much better solutions out there, the gaming industry has always been quite good at this.

Remember how we fixed pirating of games? By making levels non archievable if you are using a pirated version.

<comment><USER10> See, I thought companies reduced (you can't stop) piracy of games by making their content so awesome that people wanted to pay for the game. Examples include Valve and Blizzard's lineaup.

<comment><USER11> Actually, Blizzard is reducing piracy by requiring you to connect to their servers to play the game and sending an army of lawyers after anyone who attempts to create their own servers. Most of the content in StarCraft II disappears the moment you aren't connected to BNet, and what was left over disappears 30 days later. Diablo 3 will not work at all unless you are connected to BNet, and WoW is an MMORPG. S2 has taken a similar approach: their game does nothing unless you can connect to their servers.

I'm not sure what Valve's approach has been. Does it also involves reducing the quality of the games offered by not including LAN play?

</comment></comment></comment></comment></comment><comment><USER12> Josh from Tap.Me here. We are taking a game design approach to solve this problem in a no-popup or banner ad way. More Google AdSense. Here is why we are doing it right: <http://tap.me/wp/2011/05/game-flow-and-in-game- advertising/>

We think the players should have the fun they are there to have and will appreciate it when brands add value to that experience vs. get in their way.

<comment><USER13> An ad in the comments of an article about how annoying ads in games are. And the article itself turns out to be a sales pitch at the end. Is this... is this double-irony?

<comment><USER12> Just letting readers know about our option in the space. There are few comments about how no one is taken an adSense approach to how in-game ads work and I wanted to let people know that we are.

Yes it's ironic ;).

</comment></comment></comment><comment><USER14> Strange to me that people are talking about better ways to serve ads in games and apps instead of alternative revenue streams to ads. Ads suck no matter how you position them in your app.

</comment><comment><USER15> Frankly I don't really see why the article focused on mobile games. The argument against in-game ads being distractions can be applied to advertising in general: billboards on the highway, commercials during tv shows, newspapers filled with page long ads, etc.

however kipp does sound like a good idea - but it might require heavy changes from developers to their game mechanics.

<comment><USER6> I don't mind the subversive TV advertisements - the can of coke in the bedroom, or the kid playing Xbox while their parents try to talk to them. What's really irritating is when the show comes to a complete halt for what amounts to a product demo (my wife watches Bones and the WP7 bits really bugged me).

Ubisoft has tried in-game advertisements with several of their Tom Clancy games, and its just about as bad. Yes, I'm going through a casino, turn a corner and there's 5 posters on the wall for Prince of Persia. Riiiiiight.

On the flip-side, I wonder if gun makers have any sort of deals with developers - any teenage boy can probably rattle off the names of 10 different machine guns. The same goes for car brands and Gran Turismo/Forza.

<comment><USER7> "On the flip-side, I wonder if gun makers have any sort of deals with developers - any teenage boy can probably rattle off the names of 10 different machine guns." haha oh wow, that's an eye-opening comment. Could be on to something

</comment></comment></comment><comment><USER16> Is "...is broken" the new "...considered harmful"?

<comment><USER7> There's a pretty big difference between the two. Broken means it doesn't work the way it's intended to work.

</comment></comment><comment><USER17> I don't get why it's broken? Any numbers/data to share? Why does Angry Birds contain ads if they're broken? Honestly, not trying to be a dick, just trying to understand the problem.

<comment><USER12> These guys make plenty of cash with those ads. The bigger problem is that it is one of the only options they have and it comes with the price tag of some users complaining about the experience.</comment></comment>


Microsoft confirms 1.5 million Windows Phone 7 handsets sold since launch - <AUTHOR> http://thenextweb.com/microsoft/2010/12/21/microsoft-confirms-1-5-million-windows-phone-7-handsets-sold-since-launch/ <comment><USER2> so now the days of being able to use HTML5 targeting mostly Webkit to build amazing Mobile Web Apps are over.

Back are the days of ugly IE hacks, frustrating testing and rewriting stuff so it works in IE6.

A heartfelt "thank you" to Micrsoft for screwing over countless web developers who finally felt that they were able to really express themselves at least in the mobile world.

Also, dear customers, please understand that from now on any mobile work you are giving us will be much more expensive because Microsoft decided to release a phone OS in 2010 with a browser engine basically from 2001 (I hear it's not quite IE7).

And, dear end users, please understand that because of Microsoft, we won't be able to supply you with all the amazing new features in your mobile apps as quickly any more because, now, we developers will have to do additional work to make sure that whatever we are creating works in that new OS Microsoft released that runs a browser from 2001.

Myself? I'm off to hide in a dark corner and cry.

<comment><USER3> Couldn't you bundle webkit with your app?

<comment><USER4> Isn't it a .Net only platform? No native code?

<comment> tomh- At this point, for most developers the choice is Silverlight (.net/c#) and XNA (for games). I think only a limited amount of publishers are able to publish native c/c++ applications.

</comment></comment></comment></comment><comment><USER5> What's with all the hate for WP7? I've used a handful of devices now and they were a real treat to play with. I think it's amazing how they have re-imagined the way people should use their phones. They've been quite innovative with the OS, and even their packaged apps are kind of awesome too.

For instance, the mail and contacts apps are probably better than those on competing platforms.

Bing maps was arguably the nicest mapping app on the market until Google just released Maps 5.0 for Android.

On top of all of that, it's a treat to develop Windows Phone 7 apps, and I'm excited to see what people create.

All in all, it saddens me that you guys seem to hate on WP7 for basically no reason whatsoever, and I personally think that it's amazing what Microsoft has done to revive their mobile operating system.

<comment><USER6> They abused whole IT ecosystem with Windows for years. That is the main reason for the general distaste against Microsoft.

</comment></comment><comment><USER7> Link to the actual "interview": [http://www.microsoft.com/Presspass/Features/2010/dec10/12-21...](http://www.microsoft.com/Presspass/Features/2010/dec10/12-21AchimBergQA.mspx)

 _Another is phone manufacturer sales – phones being bought and stocked by mobile operators and retailers on their way to customers. We are pleased that phone manufacturers sold over 1.5 million phones in the first six weeks, which helps build customer momentum and retail presence._

<comment><USER8> I've heard that all Microsoft employees are being given a free WP7 phone. Given that they have ~100K employees, that's a sizable number.

<comment><USER9> Microsoft employees and interns--that is, blue badges--are being offered reimbursement on the purchase of a Windows Phone 7 device through mid-June (in the US; non-US sites are handling things differently). Not every US employee has taken advantage of the offer due to no availability from Sprint and Verizon or just because they didn't want to yet.

<comment><USER10> Specifically 2010 Summer-Fall interns. Even more specifically, it requires a data plan. The FTEs have a different deal—I don't remember how it works.

</comment></comment></comment></comment><comment><USER11> This is phone manufacturers selling 1.5 million phones - does that mean actual activations or does that mean it includes inventory sitting in stores. It sounds like the latter to me.

<comment><USER12> This is phones sold to distribution, not phones sold to consumers.

<comment><USER13> How many stores sell smart phones?

I'd ballpark it at 1 per 5000 people (that's what it seems like in my city) - so that's 60 000 in North America (or 25 phones a store). It seems like a lot of that could be stock (or all of it, 25/store doesn't seem like a lot of stock).

[refinement of numbers much appreciated]

</comment></comment></comment><comment><USER14> Personally, I find the UI very, very appealing. But will not purchase a WP7 phone until a proper browser becomes available, even Opera Mini will suffice.

On a related note, how come all the mobile JS frameworks neglect Opera?

</comment><comment><USER15> I wonder if they are actually sold and activated? Microsoft has a history of inflating sales numbers. I imagine this may mean that they shipped 1.5 million to the carriers, but most have not been activated. I have seen them on sale at a two for one, which leaves me to believe that they are not selling well and carriers are trying to dump them cheaply.

</comment><comment><USER16> Not to forget that ~90k Microsoft employees got the WP7 for free which is a massive 6% of the active user base!

<comment><USER10> Nope, only blue badges.

</comment></comment><comment><USER17> To be honest those numbers don't seem all that great considering Microsoft is running a buy one get one free deal with both AT&T and T-Mobile. It'll be interesting to see how the activation rate changes once those deals expire.

AT&T: [http://www.microsoft.com/windowsphone/en-us/cmpn/buy-one- get...](http://www.microsoft.com/windowsphone/en-us/cmpn/buy-one-get-one.aspx)

T-Mobile: [http://www.microsoft.com/windowsphone/en- us/cmpn/t-mobile.as...](http://www.microsoft.com/windowsphone/en- us/cmpn/t-mobile.aspx?cmpid=14304302)

</comment><comment><USER18> The _real_ question is do any of your friends use Win7 phones? Not one of my friends do and many of them use Win7 on the desktop. The number activated is probably a lot lower. 1.5 mil is not that large of a mobile/internet number.

</comment><comment><USER19> I know all of the MS Fulltimers had the option of getting a free one for Christmas this month.. Wonder how that bumps up the numbers :)

</comment><comment><USER20> Well they say the next version of the windows phone will include some ability to write some html 5

</comment><comment><USER21> This is not sales to consumers, this is sales to distribution channels.</comment>


Schneier on Security: Software Problems with a Breath Alcohol Detector - <AUTHOR> http://www.schneier.com/blog/archives/2009/05/software_proble.html <comment><USER2> The analysis sounds suspect to me.

 _2\. Readings are Not Averaged Correctly: When the software takes a series of readings, it first averages the first two readings. Then, it averages the third reading with the average just computed. Then the fourth reading is averaged with the new average, and so on. There is no comment or note detailing a reason for this calculation, which would cause the first reading to have more weight than successive readings._

The code is computing an exponentially weighted mean. Read that last sentence of the quote again, the analysis has it backwards. The _last_ sample carries more weight, not the first.

Now, type "uptime" at your unix prompt. Those last three values are computed the same way and have been for decades. (There are three different weighting factors used in them instead of the 1:1 implied in the text here.)

The exponentially weighted mean is useful when you care more about the most recent values and when processor resources are highly constrained. It may be what was intended, or maybe not. Generally you would use a weighting factor to make the earlier factors not fade into oblivion as fast as these do, but I'm not going to take the word of someone who can't correctly describe the algorithm in his report.

And the bit about turning off the illegal opcode interrupt... the premise is that some sort of failure would alter the program memory in such a way that one of the opcodes became illegal, yet the program would continue to function but produce erroneous results. I'd have to say the probability of this is vanishingly small, in fact, given valid opcode density for microprocessors, much smaller than an instruction being mutated to a legal opcode that somehow allowed the program to still run but produce erroneous results.

I guess I should complete with my doubts about 3. Just because the A/D reads 12 bits doesn't mean you have 12 bits of data. If the 8 low bits are noise there is no information loss in dividing by 256. You have to understand the machine to know if this is a problem.

<comment><USER3> While I am for software transparency when it matters, I do have to say I'm much less excited about the software being gone over by lawyers (or programmers in the pay of lawyers).

Give me a page of C code, and I can find ten faults. I can complain about variable naming schemes, I can complain about indentation I don't like. I can complain even if it's actually my preferred indentation, because you won't even know better. I can _always_ complain about architecture because there are always pros and cons, which means I can play up the cons and ignore the pros, along with ignoring the fact that we have to use _some_ architecture and "perfect" was never on the table. I can say this other architecture should have been used instead, and get you involved in a battle of pro and con analysis that is a perfectly good engineering discussion but will sound like dissembling on the witness stand. I can complain about the bug fix for an issue that _I_ can't imagine how it comes up, but came up in testing. I can, basically, complain all day long, even if it is literally the best C code ever written.

Now, I grant that history suggests I'm unlikely to encounter the best C code ever written in one of these contexts, but my point is that since _nothing_ can survive lawyer scrutiny, lawyer scrutiny is actually information-free.

The solution to "Not having any software standards" can't be "Requiring absolute, unattainable perfection", because the only sane response to _that_ is to stop writing software.

The _real_ question is not "Is this software perfect?", but "Did it function correctly?" And I'd be a lot more comfortable if somebody took the source code and the hardware and actually showed a case where it is wrong by physically producing that case, and not just theorizing about how the software might go wrong.

All that said, for all I know this thing's a pile of crap. Certainly if I had to lay money, that's the way I'd bet. My point is more that this writeup doesn't meet my standard for determining that it's a pile of crap, and as much fun as it may be to pile on law enforcement, if the price is letting the "lawyerly-perfection" standard pass without comment, that price is not worth paying!

<comment><USER4> Bill of Rights, Sixth Amendment:

"In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial...and to be informed of the nature and cause of the accusation; to be confronted with the witnesses against him..."

</comment></comment></comment><comment><USER5> If the readings are, in fact, averaged in the way described by the article, the device is useless and should not be allowed as evidence since such a scheme permits a single outlier reading to produce an erroneous result.

</comment><comment><USER6> Computer Operating Properly interrupt: anyone else think this sounds like a National Semiconductor processor device? ISTR they had an interrupt labelled COP.

When was the last _decade_ National made a processor, anyway?

<comment><USER7> Motorola called their watchdog module a COP in the 8 bit lines.

National still makes MPUs (<http://www.national.com/appinfo/mcu/>) and IP (<http://www.national.com/analog/compactrisc/architecture>)

I've never seen a natsemi micro in the wild, however.

</comment></comment><comment><USER8> _This is an excellent lesson in the security problems inherent in trusting proprietary software_

This sentence made my day, given who is using it and how often it's being used.

</comment><comment> old-gregg This should be applied to SaaS as well: something needs to be done about GPL parasites hiding "in the cloud".

If you're building on top of GPL, users of your cloud software should be able to download your code, examine it and modify/deploy on their own servers.

<comment><USER9> Wait, this article had nothing to do with the GPL. The GPL is almost entirely unrelated to the notion of code audits and transparency. Lots of code licenses and business models allow for (or even promote) that approach.

Why did you bring the GPL into this?

<comment> old-gregg You are right, I got carried away a bit here.

The article reminded me of reddit storing my password in plain text, which wouldn't go unnoticed if their code was open. [yes, I know they eventually released their code, which was very kind of them]</comment></comment></comment>


Why C++ sucks (2016 edition) - <AUTHOR> http://dorinlazar.ro/why-c-sucks-2016-02-edition/ <comment><USER3> I go a little deeper and more esoteric with my big gripe with C++... _why can 't it be parsed with a simple LALR(1) parser_?

Donald Knuth summed this up much more elegantly than I could ever hope to do so, in his six character critique of C++:

a < b > c;

 _What the hell does that mean_? What it means is that you cannot determine the meaning of those six characters without knowing in advance the types of a, b, and c. Is it an odd-but-valid C comparison? (a is less than b and b is greater than c) Or is it a template declaration? You cannot know these things without context.

Back when I studied compiler theory and was reading the Dragon Book, the simplicity, elegance, and precision of the LALR(1) parser design really touched me. And it was implemented on every Unix box with lex and yacc. This is how you write a compiler! This is how you understand structure precisely! To be syntactically valid, a statement must have one and only one meaning.

C++ cannot be parsed without interpreting variable types at parse time. LALR(1) does not work. It never has worked. C++ has been broken on this front since the 1980s, when it was just a preprocessor that cross-compiled to C. Why? What possible benefit is there to giving up that core bit of parser discipline?

"Because it's _powerful_!", someone sneers, as if that condescension justified bad design. "Because templates are so hard!" another whispers. But what about this?

a [< b >] c;

If the template declaration tokens were [< >] rather than < >, they wouldn't overload the comparison operators. The meaning of Knuth's example would be unambiguous, and both could be parsed without grief - both by machines, and by human eyeballs. This isn't difficulty. It's just not thinking through the consequences.

But that's okay. Smoke enough of that << and >> crack, and you'll soon forget those tokens are bitwise shift operators, not i/o. Sigh.

<comment><USER4> Of all the complaints I can think of regarding C++, the one I care least about is the difficulty in disambiguating the grammar... Languages exist to help humans, not compilers. Of course, C++ often fails in that regard as well.

Aside, a pox on the house of bottom up parsers. Anyone trying to produce useful semantic errors out of a bottom up parser understands how god awful they are to work with. There's a reason both GCC and clang use hand rolled recursive descent parsers...

<comment><USER5> > Of all the complaints I can think of regarding C++, the one I care least > about is the difficulty in disambiguating the grammar

Compile time speed? Refactoring? Jump-to-definition? Autocomplete? Intellisense? Those are all important for UX, and a tricky-to-parse grammar makes those things mighty challenging.

<comment><USER6> Visual Studio does an almost-perfect job of this, and what is missing is not because of the parsability of C++. What's your point?

</comment></comment></comment></comment><comment><USER7> I'm sorry, but from the point of view of technical merit these opinion based rants are starting to feel really disingenious.

Scott Meyers has written lots of good stuff on how to use C++ properly.

Yes, C++ is the rocket-octopus in a razor armour, equipped with automatically foot targeting shotguns and all the rope to hang every developer twice.

Yes it the best tool everywhere? No. Is it my favorite language? No. Is it absolutely essential for value producing programmers around the globe? Yes.

The thing is, the rocket-octopus infestation is so wide that we've learned to use it to our advantage (after a few missing foots but hey - rockets!) and understood how to deal with it's kinks and warts. We've got pretty good tools to wrangle it (Visual Studio is actually pretty good, IMO), and boy, can it go places.

The ecosystem is the main reason it's as alive today as it is. I would much rather take my iridescent paradise bird F# to work, but the sad thing is, the poor thing does not survive yet everywhere where the rocket octopus does. My pet python is much more well behaved but unfortunately it still does not have hassle free rockets nor can it survive in high performance scenarios with even more wrangling than the octopus does.

<comment><USER8> You know what? I'm going to take the controversial opinion that C++ is both the best tool for everywhere and my favorite language.

C++ really has only one downside. It's hard to learn. Almost all complaints about it really boil down to not knowing the language well enough.

But so what? Because once you know it well...

Once you know C++ really well, you understand what it means to have no compromise.

It has the best performance and the highest level abstractions in one package.

It has both amazing safeguards against programmer error and the ability to break all of them if you need to.

It has great portability while still giving you full access to all he platform specific features.

You can feel just as at home writing a web browser or a website in C++.

I could go on.

You get all this good stuff and really it only really takes a few years of seriously using the language to get that good. What is a few years in a 40 year career?

Also, don't believe the bullshit of "nobody really knows C++" that a lot of people claim. You can find dark corners of any language. The reason they are dark corners is because they don't come up in real code.

<comment> loup-vaillant > _It has the best performance and the highest level abstractions in one > package._

The highest level abstractions, are you kidding me?

I am currently writing a little interpreter in C++. I would have used Ocaml, but the rest of the project is in C++. Well, just try to write an abstract syntax tree in C++. In languages such as ML and Haskell, this is easy:

      type expression = Litteral    of value
                      | Symbol      of string
                      | Funcall     of expression * expression
                      | Conditional of expression * expression * expression
                      | While_loop  of expression * expression
                      | Sequence    of expression list

And I'm pretty much done. Now in C++:

      </comment></comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--
      #ifndef __Expression_h__
      #define __Expression_h__

      #include <cstdint>
      #include <string>
      #include "Value.h"

      namespace Script {

      class Expression;

      class Expression {
      public:
          enum Tag {
              litteral,
              symbol,
              funcall,
              conditional,
              while_loop,
              sequence
          };

          union Val {
              Value                   *litteral;
              std::string             *symbol; // or a true symbol?
              std::vector<Expression> *composite;
          };

          Expression(const Value&);
          Expression(const std::string&);
          Expression(Tag, std::vector<Expression>*); // takes ownership
          ~Expression();

      private:
          Tag _tag;
          Val _val;
      };

      } // namespace Script

      #endif // __Expression_h__
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--

Don't forget the cpp file either:

      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--
      #include "Expression.h"
      #include <cstdio>

      using namespace Script;

      Expression::Expression(const Value& val)
          : _tag(litteral)
      {
          _val.litteral = new Value(val);
      }

      Expression::Expression(const std::string& sym)
          : _tag(symbol)
      {
          _val.symbol = new std::string(sym);
      }

      Expression::Expression(Tag tag, std::vector<Expression>* exprs)
      {
          if ((tag == funcall     && exprs->size() == 2) ||
              (tag == conditional && exprs->size() == 3) ||
              (tag == while_loop  && exprs->size() == 2) ||
              tag == sequence) {
              _tag = tag;
              _val.composite = exprs;
          } else {
              std::fprintf(stderr, "Expression constructor: Invalid Expression\n");
              exit(1);
          }
      }

      Expression::~Expression()
      {
          switch (_tag) {
          case litteral   :
              delete _val.litteral;
              break;
          case symbol     :
              delete _val.symbol;
              break;
          case funcall    :
          case conditional:
          case while_loop :
          case sequence  :
              delete _val.composite;
              break;
          default:
              std::fprintf(stderr, "Expression destructor: broken class invariant\n");
              exit(1);
          }
      }
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--

I may use smart pointers instead of doing my own RAII by hand, but that's still a hassle. Some may point out that my ugly unsafe union type is not the way to to this, I should use a class hierarchy and polymorphism. But just imagine the sheer amount of code I'd have to write.

C++ is a low level language. It's high level pretense is nothing but a thin veneer that cracks under the slightest scratch. Or, someone show me how to implement an abstract syntax tree in less than 20 lines of code. I'm lenient: Haskell and ML only need 6.

(Yes, I'm using Sum types, a feature that's pretty much unique to ML languages. But no, that's not cheating: providing enumeration and unions but somehow failing to combine them into sum types is a serious oversight.)

<comment><USER9> I think you're deliberately making it more verbose than it needs to be. The class definition could be condensed into:

        class Expression {
          enum Tag { litteral, symbol, funcall, conditional,
           while_loop, sequence } _tag;
          union {
           Value *litteral;
           std::string *symbol; // or a true symbol?
           std::vector<Expression> *composite;
          } _val;
        };

And you could probably use templates or macros to autogenerate most of those constructors/destructors automatically.

<comment> loup-vaillant > _I think you 're deliberately making it more verbose than it needs to be._

I swear I am not. This is will be production code, for which I earn my salary. Your code is terser, but still fundamentally the same as mine. It's still unsafe (we could access the wrong union member), and it still has to work around incomplete definitions and the lack of trivial constructors (I wouldn't use pointers otherwise).

Automating my constructors and destructors would be amazing. Unfortunately, I don't know how to do it —not without writing over a hundred lines of cryptic boilerplate first.

</comment></comment></comment><comment><USER10> Regarding using 3rd party libraries: you don't simply "reference a library". You include their source code into your project, and compile them together.

Ideally, both your project and the referenced library should be using CMake, and the library's CMake file should be referenced from your project's CMake file. If the library doesn't use CMake, you write a CMake file for it.

This is the only approach that worked well for me on all platforms. So, save yourself the trouble and just use CMake. Yes, I know it has a horrible language, but it's like the PHP of build systems: it works and lots of existing libraries use it, making it easier to use them in your own project.

<comment><USER11> Yap pretty much. I used C++ for a while then switched to C and Python and other languages for a decade then had to do some C++ for a bit again. And I was desperately trying to properly reference and link against some libraries. And then finally just dropped the source tree in my project and everything worked. It felt so dirty.

<comment><USER12> Git submodules work pretty great for this IMO. Rather than incorporate a snapshot of the source, pick a commit hash. Still frozen at a point in time, but you get to move which one you're using (or point to your own fork!) whenever you like.

</comment></comment></comment><comment><USER13> So don't use it? These "Why X Sucks" posts mostly seem like clickbait rants an author writes when they have a frustrating programming day. C++ is a huge language used all over the place, it's been here awhile, its pitfalls and warts are known, it can be cumbersome to write, but it's fast and there are a huge number of quality libraries for it. It's hard to write in. We know. Use it where it makes sense, use something else where it doesn't.

If you want native code with fast speed and a nice development environment, give Rust a try if you haven't already.

<comment><USER14> >> give Rust a try

Or Pascal. Combined with Lazarus, we have a nice open source Delphi-like environment. Really cool, eh?

Rust might be an option for C++ folks who likes functional programming :D

</comment></comment><comment><USER15> > I had an array of widgets. Those widgets had textures. Those textures were > copied over and over and over again, because containers can do that, so I > had to go back to rethinking the storage class for the widgets.

Actually, he didn't _have_ to rethink it, and many people don't - instead, their code just copies things. Avoiding copying increases the chance for mishandling ownership and deleting a still-used object (or you can use shared_ptr, an then at some point the reference counting involved might get slower than the overhead of gc.) Beating gc in terms of memory footprint and speed without adding bugs is possible, but not necessarily trivial - and it's often very easy to lose to gc instead.

There are many good reasons why no language ever copied C++'s approach to "values" and "references", where every type can be passed either by value or by reference and redefine copying, assignment and now "move semantics." The proliferation of unnecessary copying is one of those reasons.

<comment><USER16> Perhaps he should have put the textures in a central container and have the widgets use a reference to the texture item?

I would think that adding textures as a child of the widgets would imply that he WANTED the textures copying. I wouldn't put child items into an object unless I wanted them copying too, as their lifetime is tied up with their parent object. The problem is not containers - it is more with his design and him wanting to control the lifetimes of child textures.

<comment><USER15> Well, define "problem." Naive, correct C++ code will copy objects because it's the simplest way to make sure each object has one obvious owner and won't leak without having to write memory management code or fiddling with smart pointers, which have non-trivial semantics. Yeah, you can avoid the copying, but C++ definitely encourages it in the sense of making it the path of the least resistance.

</comment></comment></comment><comment><USER17> I think the failings in this article stems from a misunderstanding on how to use C++ correctly, and just compares it to a language the author is more familiar with, C#. C++ most definitely has a lot of faults, but at the same time, I've seen and worked with some truly awesome code bases using C++. And the above statement can be used for nearly every language that rapidly evolves (C++ pre 2011 was... well, a pain in the a __to use).

All in all, I do wish these articles wouldn't make it to the front page of HN, because they don't really add much value to the community, but simply acts as a negative rant, not adding anything constructive.

<comment><USER18> > All in all, I do wish these articles wouldn't make it to the front page of > HN, because they don't really add much value to the community

In my opinion the positive value provided by [legacy tool X is really bad] is if you read it like [X is being used not for technical merit but just because of momentum and the fact that we have grown comfortable with it and we really should be adopting alternatives Y or Z at a faster rate than we do]. Titles of articles are often "X is bad" or "X considered harmful" or some other inflammatory clickbait title. That's unfortunate, but it's how the web works.

If just a handful of people read these posts, nod, and then take a look at Rust (for example) then that's value. Yesterday X was git, on saturday X was glibc, today X is C++ and so on.

<comment><USER19> I think the discussion such an article generates has value. I've learned about some nice C++ tools in this thread that I may not have otherwise.

</comment></comment></comment><comment><USER20> As a C++ dev for 10+ years, I wanted to hate this article and say it was all wrong but a lot of what makes me efficient with C++ now is avoiding the problems that the article publicizes.

However, I do believe that every language has its own problems at least as severe as C++.

</comment><comment><USER21> In support, I would mention the following:

[1] Mike Acton's talk: [https://www.youtube.com/watch?v=rX0ItVEVjHc](https://www.youtube.com/watch?v=rX0ItVEVjHc)

[2] ZeroMQ article: [http://250bpm.com/blog:4](http://250bpm.com/blog:4)

[3] Cat-V harmful page: [http://harmful.cat-v.org/software/c++/](http://harmful.cat-v.org/software/c++/)

</comment><comment><USER22> Yeah C++ is annoying at the beginning... but just dedicate yourself for 10-15 years, it'll become a piece of cake!

<comment><USER21> Yeah right, and after 10-15 years you'll be able to perform tasks without a problem that a 2-year experienced programmer can perform in a scripting language if (s)he wants to be expressive, or C if (s)he wants to achieve performance.

"Clever solutions give rise to artificial problems that can require even more cleverness to solve".

Not to mention the mad scientists sitting in ISO conference rooms constantly thinking "how can we top our previous clevernesses?". So good luck with the language being the same in 10-15 years.

<comment><USER23> These kinds of ridiculous statements poison the discussion and make it devolve into a complete mess. Stop that!

1) C is very difficult to use correctly even with the best guidelines and intentions. My best bet for avoiding memory errors is being super-careful (read: super-slow) AND using static analysis AND using Valgrind to check afterwards. The last two steps are mandatory.

Contrast this with C++, where just by using smart pointers, vector and array I can eliminate a whole bunch of typical C errors.

2) Scripting languages solve different problems than C++. The typical C++ tasks can't be performed by your programmer with 2 years of experience no more than they could by the same programmer if they had 40 years of experience.

<comment><USER24> Static analysis and Valgrind are wonderful.

This being said, I think I was six months into using 'C' when I mostly stopped having memory errors. Mainly, you construct the operations against memory objects based on building up series of constraints. This is less trouble than it sounds.

You learn to conform to the expectations of the language and libraries. And you use less of 'C' than there is to use. And when things get past a certain level of complexity, I tend towards making them state machines.

Should you have to do that? I have no idea. I do agree that based on most other people's 'C' code, it does appear to be painful for a great many people.

<comment><USER23> Do you have some example? I can't really picture the series of constraints that you mentioned...

<comment><USER24> RAII type things are part of it. The rest is simply making sure all the constraints are met. The fewer operational constraints, the better.

For text I/O parsing, just be semi formal about it at least. Check your indices, be careful of integer overflow and be judicious in the use of floating point. Use block I/O instead of the finer-grained things in stdio.h .

Have instrumentation built in that you can enable to capture test vectors ( if you have the resources ). Error counters can tell you a lot.

the mechanism of choice for managing complexity tends towards state machines and sometimes message passing.

That's a start.

</comment></comment></comment></comment></comment></comment><comment><USER9> This is more of a "why C++ programmers suck", but the main gripe I have is with programmers who seem to be obsessed with stuffing as much of the latest C++20 (or whatever they're at now) features as possible into the code they write, making it more verbose and bloated than necessary. The fact that these features now exist, somehow makes people want to find a use for them. The same phenomenon doesn't happen with C because the language is so much simpler.

 _and today the first thing I suggest to people is to stop thinking that C++ is a superset of C_

I think that's the problem. It's certainly possible to use its features sparingly, as an object-oriented superset of C, resulting in the code as performant as C but less verbose, which is IMHO the main attraction of the language. Going crazy with the abstraction is what turns it into a mess. (Compare the similar "use as much as possible, and maybe more" behaviour often encountered in the past with design patterns, and the huge OOP-ifying of everything when OOP just started becoming popular. Maybe in a few years C++ will settle down with most code being written in a saner subset, with only sparing use of the advanced stuff...)

<comment><USER16> I thought that the latest C++11-onwards additions made code less verbose because I don't have to write so much code as the STL has a LOT more in it? And don't have to write so many explicit constructors, destructors, move operators, assignment operators etc.?

The code is much simpler when I look at my C++11 code compared to C++03.

</comment></comment><comment><USER25> On a more serious note, just take the Google coding style and strike out everything it says about exceptions. Boom! A relatively painless C++. You don't have to use every trick in the book.

</comment><comment><USER26> As a long time C++ programmer C# felt ... it felt good. Yeah, the memory and the non-native binaries make it a non-starter for most things I do. But wow, I loved it.

<comment><USER27> In the early nineties I found myself faced with spending a year learning to program in C++ with Microsoft foundation classes or giving up on Windows programming. After ten years started sh*tcoding in C#. I feel like I missed out on a lot of pointless suffering.

<comment><USER28> Yes, Win32 API/MFC was a frustration, but then I've discovered Delphi/VCL. I never liked Pascal so I was really happy I've found about Borland C++ Builder. I did some N-tier apps with it, it was a pleasure to work.

<comment><USER16> Didn't Borland suffer a massive brain-drain and all the developers left after the C++ Architect mismanagement? The VCL is full of bugs isn't it? And suffers horrible redraw and flicker the last time I used it (years and years ago!)

</comment></comment></comment></comment><comment><USER29> Quoting author's comments:

> If the Modules standard is adopted, half of the issues are gone, I think.

Agreed. Had there been a sane module system + package/dependency manager + CLI/build tool like almost every "modern" language does, C++ would be much, much more usable.

</comment><comment><USER30> "The split between source and headers, which makes project management quite slow. If you make all header libraries you'll have a lot of copied code – the binaries will be larger. You'll have to recompile that code every time you want to use it."

You can't say "the split between source and header sucks" just because it's painfull to use it wrong ("all header libraries") !

(All header libraries are justified when you're dealing with highly templated stuff, but in this case you have no way to avoid recompiling this code every time you use it, as each required template instance needs to be generated anyway - smart compilers will get rid of duplicated instanciations).

The split between source and headers is a key to good encapsulation. From a software design point of view, it's good way to break long dependency chains.

<comment><USER31> Spoken like a true c++ fanatic. Good encapsulation does not require splitting things up in different files that are later conditionally merged back together by a dumb non language aware text pre processor. Other languages manages this fine without it. And "Template instantiation"? Thats an implementation detail I don't want to think about.

C++ does have its nice parts and it does have its uses but some parts truly are shit, get out of the Stockholm syndrome and admit it.

<comment><USER30> No need to be rude!

Let's get this straight: I'm not advocating for the preprocessor here. I will happily put it in the trashbin where it belongs as soon as I have support for modules in C++ (By the way, 90% of the code I write is written in the D programming language, which has modules, and no preprocessor).

I'm advocating for interface files.

Whatever mechanism you use, you still need a way to separate interface files from implementation files. Interface files can be header files, they can be java files containing a single java 'interface', they can be "D interface" files (.di). It doesn't matter which mechanism you use for this, as long as you have a way for your caller not to depend on the implementation of callee (which might, for example, directly depend on a specific audio API, for example).

My point is, if you want the caller to be properly isolated from the implementation of the callee, having to maintain signatures in an interface file is unavoidable.

</comment></comment></comment><comment><USER32> I hope he is better in C++ than creating frontend for websites.

</comment><comment><USER25> Site is clearly not served with C++. :-)

<comment><USER33> Yes, and that's a pity. And I will fix that as soon as I get my hands on it - I never knew that I needed to write that web backend myself. This site proved me wrong :D

<comment><USER25> Even just reverse proxy in front (written in C++, naturally) would have probably saved the situation.

</comment></comment></comment><comment><USER34> A lot of people insist on avoiding the use of "using namepspace x" in .cpp files. This makes no sense to me, it makes things a lot easier to read. It never seems to cause a problem, and it's trivially fixed if a conflict shows up due to a header change later.

<comment><USER35> > It never seems to cause a problem

It does if you want to use unity builds at some point down the road. For my app it took the build time from 25 minutes to 2 - 3 minutes which is critical when doing CI on a lot of operating systems and with a big build matrix.

<comment><USER34> I am not familiar with unity, but why should it slow down builds?

<comment><USER36> From a quick google, unity builds are akin to #include-ing every file in the project (yes, the .cpp files too).

</comment></comment></comment></comment><comment><USER37> Not sure what to make of this.

Specifically:

× There is quite absolutely no need for some fancypants IDE. Use a text editor that can indent stuff automatically and maybe has some syntax highlighting and you're good to go and write all the code you want. Yes, even C++!

× The split between header files and translation units is ugly, especially if part of your class can be in a translation unit and part of it is templated and must be in a header file. But if your class is all-header, you just have a single file (which may be compiled into more than one block of code for templates); if your class is not templated, you just have a nice little header with your comments and the implementation hidden away. Yes, you may need to add a new field to both your header and your constructor implementation if you want it to be different in different constructor calls, but that's hardly avoidable?!

× The C preprocessor might be ugly sometimes. Don't use it if you think that. Everything will be fine. You'll be okay.

× Namespaces are extremely useful to separate different sets of functions and classes. I find std::vector and boost::program_options::options much more readable than StdVector and BoostProgramOptionsOption. There's only so many letters in the alphabet, names will need to be long eventually. If you really don't like namespaces, just use using generously.

× Portability is fine between decent compilers on decent operating systems. Yes, Microsofts Visual Studio sucked big time for a long time and if you want to use a Unix-native compiler on a weird platform, things might be strange. But I haven't seen a Unix yet where I couldn't compile my code.

× Not sure what to make of the next paragraph, are they just complaining that they can't keep a mental model of some header files in their mind and that this must absolutely be the fault of the language?

× I don't get the issue with std::chrono::duration. The reference is clear, the code is not too horrible and the C# code isn't even better?

× Hint: \n does exactly what you want.

× push_back() and emplace_back() are two very different things and I'm glad that they're different functions, as that makes it very clear whether you're copying stuff around or constructing it in-place.

× The (few) bits of the boost library that I used so far were amazingly well documented. Yes, if you want to dig a little deeper, you may have to read some not-so-easy to understand code, but have you seen the code that powers your lovely C# runtime? Do you think it would be substantially easier to understand?

<comment><USER38> I'm exclusively an emacs user, but I would definitely like better IDE functionality. I use the builtin fast jump-to-file and text based autocompletion, plus SilverSearcher powered text search and it is fine 90% of the time.

Still I would love to have working jump to definition/declaration/reference, type and context exact autocompletion, semantic based highlighting and on-the- fly error checking. I do not care much for refactoring support except maybe basic renaming help.

There is EDE, but in my experience it fails very quickly on anything beyond trivial projects. There are a few clang based indexing/autocompletion engines (I favor rtags) which can do all of the above amazingly well, but they are not impressively fast and in my experience any setup I tried bitrots extremely quickly.

<comment><USER39> Use rtags. Its great.

</comment></comment></comment><comment><USER40> C++ is very, very hurt by not having a base Object type from which all other types derive. Because of this, we get templates, and templates suck a lot.

Generics in Java are even worse. All of the idiocy of C++ templates + Java type-erased containers, none of the benefits. I've been bit way too many times by Java generics just forgetting what type they contain.

Generics in C# are slightly better, especially in that there are a lot of different types of constraints you can apply to them. When applied judiciously, they can greatly simplify a lot of code. They are work best when everything is specified "correctly" with interfaces. Hold on a sec...

Sometimes I think templates/generics is all just a hack to get around the fact that I can't add interfaces to types I didn't define myself. When I'm designing a wholly closed system, I'm often going the old-old Java way of explicit interfaces for everything. It just keeps you honest about state encapsulation, which then keeps you honest about state transitions, which then basically just makes the program write itself.

So if you have a system like that, C# generics and its constraints work _really_ well. But probably the entire reason you wanted generics in the first place was to not have to write all those interfaces. And you still can't add interfaces to things that you didn't write.

But at least you can write extension methods for them.

Of course, you can't get all the way to an algebraic type system with it. It makes you think you can. But you can't. That hurts.

<comment><USER41> > Sometimes I think templates/generics is all just a hack to get around the > fact that I can't add interfaces to types I didn't define myself

You can though. They're called free functions. Types should only expose their basis functions[0] as members, keeping their surface small. Once you have that small set of reasonable functions, you can write free functions to do everything else. Sometimes if several of your operand types share a minimal set of basis functions it's useful to make these algorithms templates. That's all.

Scott Meyers was writing about this stuff 20 years ago. Here's a 15 year old example[1]. Here's another, more recent, article[1] by Walter Bright, which compares the approaches of C#, C++ and D.

This is the reason why C++ has the 'madness', as some people see it, of function overloading and Argument Dependent Lookup[3] and, soon, a Unified Call Syntax of its own.

So you want all classes derived from an Object base. Fine. What are you basis functions for Object?

[0] [https://en.wikipedia.org/wiki/Basis_function](https://en.wikipedia.org/wiki/Basis_function)

[1] [http://www.drdobbs.com/cpp/how-non-member-functions- improve-...](http://www.drdobbs.com/cpp/how-non-member-functions-improve- encapsu/184401197?pgno=3)

[2] [http://www.drdobbs.com/cpp/uniform-function-call- syntax/2327...](http://www.drdobbs.com/cpp/uniform-function-call- syntax/232700394)

[3] [http://en.cppreference.com/w/cpp/language/adl](http://en.cppreference.com/w/cpp/language/adl)

</comment></comment><comment><USER42> What about Embarcadero C++ Builder (old Borland)? [http://www.embarcadero.com/products/cbuilder](http://www.embarcadero.com/products/cbuilder)

It has a very good IDE.

Easy to add external libraries.

You don't need to use the ugly STL because it comes with it's helper classes for almost everything (the VCL library).

Nobody using it?

<comment><USER43> I use it for a living, and I cannot recommend that piece of shit.

The IDE is alright, except the IntelliSense, if you can even call it that, becomes unusably slow in sufficiently large (really, just non-trivial) projects. The 32-bit compiler mostly supports C++98, with a couple C++11 features and a few missing C++98 ones. Don't expect to be able to use many open-source C++ libraries. The 64-bit compiler is a fork of an older version of clang, so you get more C++11 support but some of the Embarcadero extensions are missing (yeah, code isn't even _syntactically_ portable between 32-bit and 64-bit C++Builder).

The compiler ICEs if you look at it funny and the general solution to fixing a build problem is to restart the IDE. If you have a syntax error, you can basically guarantee that it won't report the correct error location (usually it'll give you some system header files).

The debugger is nice enough (it's basically a really shitty reimplementation of 1/10th of GDB, with a more-or-less functional GUI slapped on top) until it crashes, which thankfully is much rarer than the compiler.

Using external libraries is easy enough as long as they're packaged as C++Builder or Delphi components. Unless, of course, you manage to fuck up the install process (quite easy) in which case you'll be editing a few registry keys (yup). If you're trying to use a regular C++ library—assuming, of course, that it sticks to C++98 features and doesn't use SFINAE—then you usually only have to edit the library's code a bit to work around C++Builder's quirks and you're set. Oh yeah, and you can't use C libraries built with MinGW (C++Builder uses its own object file format), which means you're stuck with C89 (and a little bit of C99).

VCL makes the STL look positively dazzling. Templates were inconsistently bolted onto the VCL, so usually you've got TObject* pointers and casting. VCL objects can't be stack allocated, because... reasons? VCL's memory management is extremely unclear, but it's mostly reference counted (explains the heap- only restriction)... probably.

There's a reason nobody's using it. It's a fucking piece of trash that needs to die already.

/rant

At least there's been enough outcry at my workplace that we're switching to C# for the next project.

<comment><USER23> Such a shame. Borland couldn't compete with MS (partly due to some dirty tricks MS used) and they've been on a downward course for a long time - <USER2> sold their developer tools divison a long time ago.

C++ Builder was the C++ version of Delphi, a major productivity booster for Windows development. I remember using version 1.0 - it was truly amazing how fast one could develop UI applications with it. I would say it was about as easy as using Xcode's interface builder, when the competition was basically coding MFC classes (or WinAPI!) by hand. It had database bindings and one could link controls with data sources in a WYSIWYG interface in the time it took to put a button on the screen with MFC.

However, it was expensive and the compiler was not as good as MS's. I never had the chance to use it profesionally, everyone was using Visual C++. As the years passed I forgot about Borland...

Luckily the legacy of rapid application development lives on in Qt: it's open- source, cross-platform, with a strong community and uses modern C++ tooling.

<comment><USER16> wxWidgets is also good as an alternative to Qt, but with a smaller community. I use it and don't have any problems with it (a few bugs in the wxAui classes though).

I think everyone left Borland after their C++ Architect project was binned, the Kylix attempt ("building font metrics..."), they changed their name and core idea, and the Delphi language designer was head-hunted to design C# for Microsoft (unless I am mistaken??).

They released a PHP editor but I can't see them selling much of that.

</comment></comment></comment></comment><comment><USER38> > Notice the "unreadable code" from C#, even the portability issue (hint: \n > does not always do what you think it does).

No, it does exactly what you think it does (unless it is a binary stream), it adds an end-of-line to the stream. If the underlying platform needs a "\r\n", the stream will do the conversion.

<comment><USER33> Yes and no. std::endl is not an alias for '\n', for good reason.

</comment></comment><comment><USER44> I still love C++, in spite of its C underpinnings that make writing safe code an almost impossible task in large teams, unless one controls what everyone is doing.

However, whenever I see SFINAE mixed with type traits, decltypes and arrow return declarations, I am not sure if I still love it that much.

</comment><comment><USER45> Contrarian opinions can be useful and valuable. However I don't see much substance in this article. Could someone list what this person has done to make their opinion worth something?

<comment><USER33> I can confirm that absolutely nothing of import. I think that the attention shown to my rant is overblown, although I do enjoy the good points made by a lot of commentators here.

</comment></comment><comment><USER16> I do not see how his example of STL vs LINQ is hard to read. I think this article is just a rant.

</comment><comment><USER46> Then try writing an operating system in C# (or any fun language) and we can talk later which language sucks. C++ is an awesome tool when used for the right job.

<comment><USER47> I feel like this is a bad argument to be making. If a language's "level of suck" were based on its ability to write operating systems, then the massive boost in programmer productivity we see today from languages which sought to depart from that domain wouldn't exist. Tangential to that, I consider Rust a "fun" language compared to C++, and it is definitely capable of doing anything C++ can do[1].

By the way, Midori[2] was written in C#. Granted it had its own AOT compiler and started to diverge into a different language, but nevertheless, it was C#. I'd suggest looking through Joe Duffy's blog posts[3] as he explains it better than I could.

[1] [https://github.com/redox-os/redox](https://github.com/redox-os/redox) [2] [https://en.wikipedia.org/wiki/Midori_(operating_system)](https://en.wikipedia.org/wiki/Midori_\(operating_system\)) [3] [http://joeduffyblog.com/2015/12/19/safe-native- code/](http://joeduffyblog.com/2015/12/19/safe-native-code/)

</comment></comment><comment><USER48> >I suggest to people is to stop thinking that C++ is a superset of C. It is, but let's forget that.

Hard to take any article seriously that makes such a glaring and naive point. C++ is not a superset of C and if the author really knew the language well, he would not make this point.

<comment><USER33> In my post I suggested to watch a presentation. Watch it, you'll understand what Kate Gregory argues, and I completely agree with her point of view.

<comment><USER48> I will watch it, thanks. But that won't change the fact that C++ is not at all a superset of the C language, they are genuinely different languages. Objective-C however _is_ technically a strict superset of C. All C code runs as expected in Objective-C. This is not true in C++ where the same C code might compile and produce different output when run in a C++ context, or that several C idioms are not possible in C++.

</comment></comment></comment><comment><USER49> "What does the 11 from C++11 mean? The number of feet they glued to the octopus to make it a better." This</comment>


Thoughts on Performance - <AUTHOR> https://drewdevault.com/2020/02/21/Thoughts-on-performance.html <comment><USER2> Software devs face so many struggles nowadays I do not think they have control over anything anymore. Most are coding against high-level APIs on top of memory hungry operating systems that are doing god knows what in the background. caching is everywhere and the things you think are realtime are often smoke and mirrors. what todo? wait until a new update comes out? throw more hardware at it?</comment>


C++, C# and Unity - <AUTHOR> http://lucasmeijer.com/posts/cpp_unity/ <comment><USER2> This is one of a number of replies to modern C++ not being a good match for modern game development needs.

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

I think this is quite an exciting time for realtime software development.

Moore's Law petered out, at least for single core. and our tools haven't changed much since the 90s. Now we're able to pull away from C++ into languages that are safer and faster to iterate with, while giving up none of the efficiency - in fact we can gain speed ups. .

<comment><USER3> I like C++, even used to teach it during the late 90's, but I also think that if Java and C# had been more aggressive with their AOT compilers, instead of focusing on JIT and disregard what other type safe languages were doing, much less people would feel forced to make use of C and C++.

Imagine having a C# experience with Delphi like RAD AOT compiler tooling instead, for example.

<comment><USER4> If Java and C# focused on AOT compiler, certain features, like dynamic reflection, could not be implemented efficiently.

If So, Java and C# was exactly like C++ with only the syntax differs.

<comment><USER3> Eiffel, Oberon variants, Modula-3, Delphi beg to differ.

</comment></comment></comment></comment><comment><USER5> Anyone know about any C++ projects/tools that can help enforce vectorization?

Of course, you could create a benchmark test that detects a performance regression, but I am hoping for something more sophisticated like tagging a scope to indicate that it should result in a certain group of AVX instructions.

<comment><USER6> If it fits your use case you can use std::valarray<T>. See here: [https://godbolt.org/g/JBSvuH](https://godbolt.org/g/JBSvuH)</comment></comment>


The Metric Maven – A Bridge Too Far? - <AUTHOR> http://themetricmaven.com/?p=8591 <comment><AUTHOR> TL;DR: all countries use their own definition of sea level, and this can cause issues when building bridges between countries. There is a proposal to standardise on a global sea level or distance from earth's centre, but politics may be involved.</comment>


FSF Petition for Freedom in Education - <AUTHOR> https://www.fsf.org/blogs/community/sign-this-petition-for-freedom-in-the-classroom <comment><USER2> I up-voted this because I agree that large institutions should have the resources to not use Zoom/Meetings/etc. and should use open standards instead.

That said, I think it is fine for individuals to use one of the proprietary video platforms to talk with their parents, etc. I think organizations should be held to higher standards than individuals who are juggling getting work done, maintaining family and friends, etc.

I dropped my paid membership to the FSF a few years ago because in my own lifestyle I rely on closed platforms like Apple Watch + AirPods, etc. to enhance my life. I release software under open source licenses (I favor dual LGPL and Apache 2 licensing) and the books I write, even though I charge for them, are released under a Creative Commons license so (with some restrictions) people can share them.

Anyway, I find it a tricky balance between software and information freedom vs. friction free life.

</comment><comment><USER3> The Orwellian statement "Freedom is Slavery" applies to the EFF and FSF more than any domain I've seen.

Like it or not, the Apple 1984 ad was all about how computers oppress people by exposing their innards: talk to business people and they will say you "get your hands dirty" if you spend any time reconciling the contradictory mess of desires people have with a computer's ability to show you the logical outcome of that contradictory opinion. In the U.S. they will give that job to an Indian, and the Indian would give the job to a Dahlit if they let Dahlits get an education enough to do it.

People don't remember that the Mac was the first computer that didn't come with BASIC or some other tool that would let you program it. We learned the hard way in the next 30 years that the computer programs you whether or not you can program it...

So when people like the "FSF" describe what they think of as "Freedom", most people think that is being a slave to the transistor and mathematics. What the "FSF" describes as "Slavery" is perceived by neurotypicals as "Freedom to let somebody else Slave on your behalf"

<comment><AUTHOR> Your statement about the Mac not shipping with BASIC is incorrect. Basic interpreters were available by default since the Apple II.

<comment><USER3> The Apple ][ has two BASIC interpreters (the integer basic Woz wrote and the Applesoft basic licensed from Microsoft.)

The original Mac was a demo -- with 128MB of RAM it struggled to do anything at all, with 512MB you had some room to work with. Original development for a mac was done on a different computer.

There was no compatibility between the Apple ][ and the Mac. Apple did not realize how long the ][ would last. If they'd known that, and known that Motorola was going to abandon the 68k, they might have come out with something like this earlier:

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

which could have evolved an entirely different direction and avoided more than one of the near death experiences the Mac went through.

<comment><AUTHOR> Thanks for the detailed reply.I still fail to see your point and it's relation to software freedom.</comment></comment></comment></comment>


Microsoft Azure in Plain English - <AUTHOR> https://www.expeditedssl.com/azure-in-plain-english <comment><USER2> This and the AWS in Plain English are both awesome. Is there an equivalent for Google Cloud Platform?

<comment><USER3> +1, though GCP is quite good with descriptive naming. I think it would get "spot on" in many more categories than AWS/Azure in this comparison.

Compare: "Elastic Block Store" vs "Persistent Disk", "Security Group" vs "Firewall", "Lambda" vs "Cloud Functions"

<comment><USER4> Agree 100%. For instances, you have standard, high memory and high CPU and custom. Super easy to make sense of rather than crawling through webpages to understand what each type of instance mean. For example: AWS has r, t, m, g, p instance types. When you look at the whole platform, naming, gotchas etc AWS creates lot of cognitive overhead for developers. I find Google cloud far easier to use, partially due to things like these.

</comment></comment></comment><comment><USER5> This is cool - one item I think is wrong/misunderstood is Big Data > Data Lake Store.

It has nothing to do with ETL, it's basically just "HDFS in the cloud" [1] and a successor to using blob storage/regular old storage accounts for distributed/Hadoop-ish workloads.

[1] [https://azure.microsoft.com/en-us/services/data-lake- store/](https://azure.microsoft.com/en-us/services/data-lake-store/)

</comment><comment><USER6> Re-post from the AWS thread ([https://news.ycombinator.com/item?id=13442022](https://news.ycombinator.com/item?id=13442022)).

That's a good high-level list, although the comparisons don't always match up. For example, I'd say Traffic Manager is more like Route 53 than ELB (which only works within a region).

If you're after something a bit more in-depth (but covering less services) then I wrote a three part series last year. It may be a little out-of-date, but most of it still applies. Azure now supports MySQL, for example.

1: [https://unop.uk/on-aws-vs-azure-vendor-lock-in-and- pricing-c...](https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing- confusion-part-1/)

2: [https://unop.uk/on-aws-vs-azure-vendor-lock-in-and- pricing-c...](https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing- confusion-part-2/)

3: [https://unop.uk/on-aws-vs-azure-vendor-lock-in-and- pricing-c...](https://unop.uk/on-aws-vs-azure-vendor-lock-in-and-pricing- confusion-part-3/)

Edit: Should that "puts da" be on that page?

</comment><comment><USER7> This. This is absolutely brilliant. I have worked with Azure for years, and mostly love it - but I learned about a few services, that I never knew what were.

Great work, ExpeditedSSL

</comment><comment><USER8> It seems that Azure naming is a lot better than Amazon, perhaps so much so that this guide is not even needed

</comment><comment><USER9> Microsoft themselves publish a comparison document of services with AWS: [https://docs.microsoft.com/en-us/azure/guidance/guidance- azu...](https://docs.microsoft.com/en-us/azure/guidance/guidance-azure-for- aws-professionals-service-map)

</comment><comment><USER10> I don't think Service Fabric is like AWS Lambda. Azure Functions is AWS Lambda.

<comment><USER11> Yeah, Service Fabric is more like micro-services for when you need to be able to do rolling deployments and automatic roll backs. It's something half-way between a cloud service and Function/Lamda (plus you need to buy four VMs minimum)

<comment><USER12> Service Fabric is more like Microsoft's Mesos or Kubernetes.

</comment></comment></comment><comment><USER13> If it only was easy to starting playing around with Azure. Only to activate the account they require proper, bank issued, credit or debit card. They explicitly refuse to accept prepaid cards even though they are VISA/MasterCard (BTW the same problem with Google Compute)... or am I doing something wrong?

<comment><USER14> My problem is not activation but rather that their free tier is too limited in terms of what services you can use.

Say I need an AD with two users, just to play with some stuff I can build for customers with "real" AD implementations? No can do, I'm supposed to pay full whack for AD like I actually _needed_ it to manage a domain. Screw that. I should get a free tier with, say, up to five users or objects (just enough to get an object or two for each common type) or some call limit. As it is, I just let my trial expire and now I won't even think about building anything around AD unless absolutely forced.

<comment><USER15> I'm not sure what's missing from the free tier that you're looking for. It includes 500k objects. All I use is the free tier for testing against SSO, so maybe it doesn't cover your use case.

[https://azure.microsoft.com/en-us/pricing/details/active- dir...](https://azure.microsoft.com/en-us/pricing/details/active-directory/)

You get

</comment></comment></comment><comment><USER16> "Cloud services" should not be named "Azure IaaS" because Azure IaaS is named Azure IaaS.

<comment><USER17> What's the difference between the two IaaSs?

<comment><USER18> Short answer - Cloud Services is the old stuff. Virtual Machines is the new stuff. Never use cloud services for new projects. I wouldn't event include it in the article

<comment><USER19> Sure it's old, but Cloud Services and VMs are two different things and there's only a little overlap (in the sense that VMs creates availability groups and can load balance endpoints). Cloud Services offers machine provisioning via a packaged file that contains the code to run, configuration and other important bits.

Any reason you recommend it to not be used for new projects? (yes, I understand it's ASM and not ARM and shows up as "classic" in the new portal, but you can still get quite a lot out of it that you can't easily get with VMs or App Services).

<comment><USER18> The reason I don't recommend it is that it clearly has not future. It is not deprecated or killed, but it is kind of frozen. Will continue to be supported but no new investment there. it missed the train, and this train is going places, so you really want to be on it.

Yes, Cloud Services and VMs are two different things, however, Azure's IaaS was built on top of this concept up until when they migrated to ARM and VMs. The way it used to be, was that Cloud Services was Microsoft's PaaS, and when they introduced IaaS (Yes Azure had PaaS first), they built it on top of cloud services. So essentially IaaS built on top of PaaS. Most people would expect it to work the other way around, and so that's exactly what they did with the new stuff - They invested heavily in re-doing the entire IaaS stack, and then built PaaS components on top of it. Regarding ARM, VMs, the new stuff- We call it 'new' to differentiate from the 'classic' stuff, but it shouldn't be considered as such. It is old enough, stable enough and it the recommended way to do stuff on Azure.

If you are doing just IaaS - there's no question there. Use the ARM model. Cloud Services did have nice features mostly for programming model, and code deploy, but there are ways to do that with ARM as well. There is not a single direct replacement to Cloud Services, and it makes the transition harder. this is because the new model has different architecture and layering of the stack. If you are looking for these features, I recommend looking at a PaaS framework in the new stack like Service Fabric.

</comment></comment></comment></comment></comment><comment><USER20> I love how the slogan on the main page written "Bam! ..." It takes attention and you actually read further. Nice small trick.

</comment><comment><USER21> Very good overview. One point that I disagree with, Cloud Services:"Run stuff but worry a fair amount about configuration and patching." We run a bunch of cloud services and MS are responsible for patching, I would describe it more as PaaS that IaaS.

We built this in our product to help visualise how the services fit together:[https://my.sharpcloud.com/html/#/story/f7522de0-98ff-4d02-8e...](https://my.sharpcloud.com/html/#/story/f7522de0-98ff-4d02-8e9c-8655f661fd53)

<comment><USER22> Im somewhat confused on that as well: cloud services is not the EC2 equivalent. VM is.

Also, if you run VMs, you most definitely are on the hook for patching.

</comment></comment><comment><USER23> Very useful, as is the one for AWS. Yay! though if these things are being touted as "plain English" they should probably steer rigorously clear of smart-ass insider references (no matter how full of cheer the writer may be feeling at the moment) because that's probably how these titles and terms came to be so opaque in the first place. But, again: yay!

</comment><comment><USER18> There are so many fundamental mistakes here that I don't even know where to start.. Nice idea though. (I am a cloud solution architect with Microsoft)

<comment><USER24> How about a couple of the most egregious so we can judge, do you have issues with their explanations of the core services or maybe just the more niche stuff like the Media Services?

<comment><USER18> core ones. See above my comment

</comment></comment></comment><comment><USER25> so service fabric is API Gateway and Lambda in one product?

Sounds good and removes a bunch of complexity, I guess.

<comment><USER26> No, I found that a bit wrong. it's more like Mesos+Marathon, or Kubernetes. It's a cluster management solution that manages your services or processes and their rolling deployments. can run on-prem on your linux or windows machines, or managed on azure with a portal. You can host any executable (or containers). And it does reverse proxy for you too.

<comment><USER27> Exactly! I found their description a bit inaccurate too. I am yet to see a true service offering on other platforms like service fabric. [Disclaimer: I work at MSFT]

</comment></comment></comment><comment><USER28> Azure in REAL plain English: Microsoft AWS</comment>