Thinking Functionally with Haskell - <AUTHOR> http://pragprog.com/magazines/2012-08/thinking-functionally-with-haskell

<comment><USER2> Interestingly I've never seen the parallels between the Unix way and functional programming. But it makes perfect sense. Code programs/functions that do one thing and do them well. However, that's how code should work in general. That's what we got functions/methods for in the first place.

I agree, functional programming is great but sometimes I just see ideas being sold as "functional" that apply to programming in general. Splitting programs into smaller parts that are easily solvable and work in a predictable way is one of the most fundamental parts of coding.

Sure, that's not all there is to it, but I'm a little bothered that it's being marketed as the new thing.

<comment><USER3> The parallels to Unix are strong enough that having an actual pipe operator can be very useful. I frequently write code that looks something like this:

        List.map data ~f:(fun elem -> ...)
        |! List.find ~f:( ... )
        |! Option.map ~f:( ... )

(This is OCaml, not Haskell, but the syntax is similar.) The definition of the '|!' operator is quite simple:

        let (|!) x f = f x

<comment><USER4> Yes, in fact F# has that built in as |> , which I've taken to using in Haskell as well. Though it's a bit more intuitive to me when it has the lowest precedence like so:

        (|>) :: a -> (a->b) -> b
        (|>) x f = f x
        infixl 0 |>

There infixl 0 means infix operator with _l_ eft associativity and 0 precedence.

Then you can use all sorts of expressions inbetween:

         (5 + 3 |> show) ++ " times" |> putStrLn

Also, tying this back to one of the article's ideas, this piping-like syntax for doing things really manages to take away the emphasis from the function and put it back on the data. It isn't all about functions after all!

</comment></comment></comment><comment><USER5> I wish PragProg would do a (whole) book one Haskell. The current ones just aren't very good.

Books such as "Real World Haskell", the "gentle guide" and "Yet Another Haskell Tutorial" all manage the rather unbelievable feat of making many Haskell concepts unnecessarily complex, unintuitive and hard to understand -- not something you want for a language that is already on the complex side. For example, RWH goes into an absurdly complicated sample scenario (a parser, iirc) to introduce the reader to monads, and never slows down to go back to first principles. YAHT does the same thing.

Monads have a reputation for being hard to understand, but I think this is mostly the fault of the current literature; monads are conceptually simple, yet every book manages to botch their explanation, making the learning curve particularly steep for non-FP programmers.

<comment><USER6> I think parsers are a decent way to introduce monads, and I really like the way Graham Hutton's _Programming Haskell_ does it, by demonstrating parsing without even using the word monad, and then in a later chapter on IO, saying "oh hey and this thing is called a monad and we used it once before!"

And I disagree a bit about RWH... I'm in the middle of it now I think it's great, filled with meaty examples that aren't too complicated at all and are generally pretty concrete. Maybe I'm just not far enough in yet? There are bits where it goes off into the weeds (the chapter on JSON goes so far as to fiddle about with character encoding IIRC) but I just can't imagine a PragProg book could do much better, without sacrificing depth.

<comment><USER5> The problem is that RWH teaches Haskell with "real world" examples that actually do useful stuff (such as the JSON chapter), and high-level theoretical concepts such as functors and monads are subtle and complicated enough, especially for FP newbies, that they need to be taught from first principles, not by wading into the deep end by showing a real-world implementation of a parser.

Personally, my "eureka" moment was reading the "IO Inside" [1] page on the Haskell wiki, which explains the IO monad in a way that made it click for me, as a imperatively-trained programmer. You can think of the IO monad as a way to force a compile-time dependency between I/O operations by having each IO- performing function take a "baton" value (the "IO" instance) as an argument, as well as return it. The explanation of how Haskell retains the appearance of purity in the face of impure I/O by passing an instance of RealWorld around is genius. That's a brilliant way to start out explaining monads, and it's something simple that you can use to explain the other monads such as the state monad (which the IO monad is built on).

I haven't tried the Hutton book yet.

[1] <http://www.haskell.org/haskellwiki/IO_inside>

</comment></comment></comment><comment><USER7> Wow, I attended a university synonymous with Haskell. 15 mins of reading here and I've just had an epiphany that eluded me in all those years.

A most insightful post, thank you very much.

</comment><comment><USER8> i'd like to see somebody think non-functionally with haskell

<comment><USER9> Like this: <http://kormacode.blogspot.se/2011/11/c-style-haskell_10.html> ?

<comment><USER8> i liked it, thanks</comment></comment></comment>


How your phone screen can lead to increased risk of cancer, diabetes and obesity - <AUTHOR> https://www.abc2news.com/news/national/how-your-phone-screen-can-lead-to-an-increased-risk-of-cancer-diabetes-and-obesity <comment><USER2> So... You need to basically use your phone at night so much that you get sleep deprivation (!) before any of these risks kick in.

I feel like these articles are really dumb, and I'm not even very smart. I feel sorry for really smart people having to put up with these kind of articles. Must be like torture to see all stupidy dripping off the page. :)

<comment><AUTHOR> It can be useful to see what non-technical audiences are reading.

It's not sleep deprivation, it's the "quality of sleep". Apple implemented Night Shift on iOS due to customer demand. Blue-blocking lenses have sold in the millions.</comment></comment>


Show HN: A feedback tool done differently (my first SaaS) - <AUTHOR> As a product manager I've used different feedback tools and almost never liked the design and experience of the widget.
And pricing of some existing tools is just way too high, at least for indie makers or small businesses ($35 for 100 responses...).
That's why I've launched Freddy Feedback (today!).
You can find it on www.freddyfeedback.com.
Curious to hear your feedback (very meta ;-)). <comment><USER2> It looks pretty neat, but I'm not going to pay before trying something out. I don't even necessarily need to use it on my own site, but seeing the themes, customizing the widget, etc. I'd want to play with it before paying money.

By the way I really like the website and how you've laid the features out. Looks like a really neat tool.</comment>


Capgras Delusion - <AUTHOR> http://en.wikipedia.org/wiki/Capgras_delusion

<comment><USER2> I have no idea how this is on Hacker News, but Capgras is both fascinating and tragic. The tragedy is when a family member is alienated as a result. The patients that I have worked with who had Capgras due to dementia have sometimes had this delusion in relative isolation to other changes, whereas the patients I have seen who had it due to schizophrenia often had a variety of related and unrelated delusions.

Sadly, when it is related to dementia it usually doesn't clear. When it is related to schizophrenia, it often clears in days to weeks with medication.

<comment><USER3> It was featured on NPR this morning: [http://www.npr.org/templates/story/story.php?storyId=1247456...](http://www.npr.org/templates/story/story.php?storyId=124745692)

</comment></comment><comment><USER4> See also: Phantoms in the Brain by V.S. Ramachandran, which discusses Capgras and lots of other awesome neurological conditions:

[http://www.amazon.com/gp/product/0688172172?ie=UTF8&ref_...](http://www.amazon.com/gp/product/0688172172?ie=UTF8&ref_=sr_1_1&s=books&qid=1269956748&sr=8-1&linkCode=shr&camp=213733&creative=393181&tag=dustcurt-20) (referral link)</comment>


Facebook Dating Launches Today with Instagram Too - <AUTHOR> https://medium.com/futuresin/facebook-dating-launches-today-with-instagram-too-bdaa65d51970 <comment><USER2> More data for FB to consume, and share.</comment>


git playback - <AUTHOR> http://codingfearlessly.com/2012/05/14/git-playback/ <comment><USER2> This is a good idea, and something that I think would be interesting beyond seeing just how people solved katas, but I think that it would be much much better if you had the transition between commits happen in place instead of sliding in. The sliding transition makes it so much harder to see what changed, whereas if you just had the visible code change in place instantly, people can jump back and forth between two commits and easily see what has changed. Maybe even give the new code some highlights or something to make it stand out.

Plus a slider to see where you are in the timeline would be sweet.

Great idea!

<comment><AUTHOR> Good point, fade-in (or something else, I'll probably try a couple of different things) should make a lot easier to see what happened from commit to commit.

Two great suggestions, thanks!

<comment><USER3> I dropped by the thread to suggest the fade-in as well.

It'd also be super nice if there was a header for each view with the commit message/description :)

</comment></comment></comment><comment><USER4> This seems like a nice idea, but - this could be just me - my commits are rarely a couple of changed lines. I usually commit on an "entity" basis where I make one class/module/function along with the tests for it and commit.

Maybe a tool like meld[1] (which already supports diff-ing between your working copy and HEAD) gaining this capability to step through commits would be quite useful.

Still good idea, though!

[1]: <http://meldmerge.org/>

<comment><USER5> That's how people usually work with traditional centralised VCS, but with a DVCS like git the "commit early, commit often" strategy is viable. You should try it - create a branch for your new class, commit to it as you go, then when it's done, commit it back as a merge on mainline.

<comment><USER6> I completely don't see the "commit early, commit often" idiom working. It may be a viable method of deployment, but I honestly fail to see how it would improve commits.

For me, the "atomic commits" strategy is still the way to go. Whether it's early, or often, doesn't matter to me. In that regard, nothing has changed since I've switched to DVCS. I might even go so far as to say, if you've changed commit strategies since switching to DVCS, you weren't using your centralised VCS correctly.

The "branch early, branch often" strategy is an entirely different matter though.

</comment></comment></comment><comment><USER7> I think fade effect would be better, because it's easier to see what changed.

</comment><comment><USER8> Perforce has something similar though not exact called Time Lapse View

<http://filehost.perforce.com/downloads/media/tlv/tlv.html>

I've been missing this in git for sometime..

<comment><USER9> That's really cool. I use their tool p4merge for diffing and merging for TFS (shh) and git and it's awesome. They offer it as a separate download, would be great if they opensourced this :D

<comment><USER8> I don't think since this is deeply integrated into their SCM. Git playback evolving into a time lapse view would be awesome.

<comment><USER9> I wonder what their license/patent is on this application, would it be untoward to imitate this style without repercussions?

<comment><USER8> The way I understand (correct me if I am wrong) is that Perforce's value add with features like this is what makes it sticky. So from my gut they will have some patents on this.

But that said, I had once used <http://code.google.com/p/svn-time-lapse-view/>

The experience wasn't usable at all since there was no caching, prefetching etc. Each move of the slider resulted in a web request.

But git is a different story …. :-)

</comment></comment></comment></comment></comment><comment><USER10> Not sure I see the advantage over "git log -p [filename]", which includes diff formatting, color coding, and commit log messages.

<comment><USER11> diff formatting is not the easiest / most humanly parsable format to read.

<comment><USER12> Neither is source code. Both take practice to master. Both are worthwhile.

</comment></comment></comment><comment><USER13> This is pretty cool. If you could figure out some nice CSS3 transition effects for the application of a patch diff it would be even cooler. Like lines sliding and other lines moving down. Maybe with a little bubble up that fades in the Gravatar of the person that made the commit as those lines appear or disappear.

This might be more than just a nice to have. Our eyes are a lot better at detecting small motions than they are small differences. So if you are looking at a big file and keep going through the playback like this, a small change at the bottom that might have missed your attention before will now be very obvious.

<comment><AUTHOR> That would awesome. Have no idea how to do it, but if it's possible, I'll try to figure it out :)

Thanks!

</comment></comment><comment><USER14> I was working on a similar idea earlier this year, but wanted to see the line changes from one version to the next. See <http://dl.dropbox.com/u/1184374/chat-server.js.html> and [https://github.com/WilDoane/GitDataCollection/blob/master/an...](https://github.com/WilDoane/GitDataCollection/blob/master/analysis- tools/OutputCommits.sh)

</comment><comment><USER15> The describe_string_calculator function (the stuff on the left-hand side of the slides) seems like a pretty bizarre way to describe the spec: all it does is define functions, some of which also define functions, but none of which is ever called, or is even callable, as far as I know (maybe with some black magic). Suppose that custom delimiters didn't work: how would this help you discover that?

<comment><USER16> The description of the video the example was taken from (<http://vimeo.com/8569257>) notes that the tests are done using his (Gary Bernhardt) own Mote framework (<https://github.com/garybernhardt/mote>)

From a quick look, it does indeed use some very black and rather... funky magic to locate and call the inner functions.

</comment></comment><comment><USER17> Playbacks can be a great way to learn. I believe git does not provide enough data about the programming process. I am creating a version control system where playbacks are first class citizens. With playbacks developers can create stories about how their code evolved.

<http://www.storytellersoftware.com>

</comment><comment><USER18> I don't see why a transition effect helps at all. Just switch directly to the next version, I say.

If you are doing a transition, what would be cool would be if it could actually somehow detect individual text moves and deletes and insertions and animate those. Otherwise I don't see a transition as helping.

</comment><comment><USER19> Really cool. Any chance you would want to use <https://github.com/amoffat/pbs> in the script? I know how painful writing anything in bash is :)

<comment><AUTHOR> I considered ruby and python, but decided to write it in bash. It's a little bit harder, but I did not want to have any dependencies on runtimes/frameworks :)

<comment><USER20> ...any runtimes except *nix (or cygwin), that is.

</comment></comment></comment><comment><USER21> Git playback of git-playback repo gives a blank screen and navigation buttons do not work. Is this because of HTML escaping is missing. Or is the script limited to python src alone?

<comment><AUTHOR> Yes, HTML escaping is missing. That'll be one of the first things I'll add. Probably relevant: <https://github.com/mmozuras/git-playback/issues/2></comment></comment>


Jeff Bezos dismisses idea of a backup plan, says we must protect Earth - <AUTHOR> http://arstechnica.com/science/2016/10/jeff-bezos-dismisses-idea-of-a-backup-plan-says-we-must-protect-earth/ <comment><USER2> I think they are both right. We want earth to be a beautiful "residential district" AND we want a backup plan.

<comment><USER3> Does Amazon run without backing up its data???

Agreed ... and not that I want to cast aspersions, but I can't help but noticing _his_ space company will play no role in setting up an off planet backup except for maybe providing a rocket engine.

</comment></comment><comment><USER4> Makes sense to me. In the near term "space as industrial park" sounds more plausible than colonizing mars. Certainly we would want to live on other planets _eventually_ but the economics have to catch up first.

</comment><comment><USER5> In reality, a "backup plan" for humanity would come down to a few lifeboats for a very few. We wouldn't be saving humanity, just it's DNA.</comment>


Auditing your Docker instance down to a 'Bare Necessity' footprint - <AUTHOR> https://medium.com/@aneeshep/working-with-dockers-64c8bc4b5f92 <comment><USER2> I do note the amount of containers that start off by installing gcc, make, autoconf et al, use that to building something, and then just bundle all that into the container.

</comment><comment><USER3> Next step is to automate that on build...</comment>


The Culture Keeping Women Out of Tech Jobs - <AUTHOR> http://fivethirtyeight.com/datalab/the-culture-keeping-women-out-of-tech-jobs/

<comment><USER2> Extremely weak article for 538.

It talks about how > 50% of bachelor degrees in STEM are earned by women(according to the NSF). Then it talks about how ~39% of STEM jobs are held by women(according to a different org with probably different standards - the ACS).

Why don't they care about the great injustice being perpetrated against men by women earning more than their fair share of degrees in a field? Why don't they account for the differences in bookkeeping between the NSF and the ACS?

Why doesn't it compare these numbers and the degree-to-work dropoff to other non-STEM fields?

Then it talks about "27 percent said they find their careers stalling due to workplace sexism". Why don't they talk about how that number relates to other fields? Or how it relates to mens numbers for the same question in the same field? Or the same question in different fields.

<comment><USER3> This kind of comparison requires scientific rigor and unfortunately, may not result in the desired answer for a given viewpoint. It's much easier to go on incomplete numbers mixed with emotion. I don't blame the people advocating for more women: tech salaries are fairly high and it's better for them that they work in tech than something like garbage collection.

Software is an industry of truth. I have seen my share of deadweight (male only) and nothing kills a fledgling company faster. Hire competent people who you get along with. Fire people who don't produce. Don't hire someone just because of their gender. It's unfair to all and is actually sexist...

<comment><USER4> 538 branded itself on providing that level of rigor before getting the desired answers. This article feels really out of place for this particular source.</comment></comment></comment>


Ask HN: Do you need a college degree to get successful in cyber security? - <AUTHOR> I am 18 years old. I had a deep interest in hacking/security from when I was 13 years old.
From then I am trying to learn hacking/security on my own. Many times I have wasted my time on really shitty tutorials, books and articles that misguided me and made me to directly jump into hacking/security things without knowing the basic CS. And I had wasted a lot of time in that.
Now, from some years I have been learning Cybersecurity (especially web application security), Networking, Python, JavaScript and CS.
I have also found two valid bugs in a big company and reported them about it.
I have failed in my final year of High School in Maths. It's not like I hate Maths but the curriculum of my countries education system completely sucks! They don't actually teach the really Maths.
So, I cannot get an admission into a college right now, even if I want to. I will be giving exam of Maths again after 4-5 months.
My questions:
1. Is there actually a need to have a college degree in CS to get successful (get a good job) in the cybersecurity field?
2. How difficult is it to get past HR of a company to get a job in cybersecurity without having a college degree?
3. Do people without a college degree get paid less? <comment><USER2> Yes, it's too damn hard, yes. :) Work you math.</comment>


Bin Ladens Audio Message to Obama (Subtitled in English) - <AUTHOR> http://thesecuritytimes.com/?p=826&sms_ss=hackernews <comment><USER2> Does anyone here seriously believe Bin Laden is still alive? Why are these tapes posted as fact when circumstantial evidence points strongly to him having dies in December 2001?

At the very least it should be entertained that they may be fake.

<comment><USER3> Yes, I imagine some do. The U.S. MSM continue to act as if he is alive and the various messages that keep popping up are likely to be from him. That, for a lot of people, represents the _normal_ point of view, from which any deviation, however well supported, is suspect. (See the Wikipedia article on ObL for the sad results of this phenomenon.)

<comment><USER2> Like the mainstream media supporting the "Saddam Hussein Weapons of mass destruction" line. Well that turned out to be true, so no problem there.</comment></comment></comment>


Most affordable remote user testing service - <AUTHOR> https://userbob.com/?utm_campaign=hackernews

<comment><AUTHOR> If your site's bounce rate is higher than you'd like, you can find out why users are leaving your site by doing some user testing. UserBob provides the most affordable remote user testing service where you can ask users to do something on your site while they record their visit and discuss what they like and don't like about your site. The normal rate is $1 per user per requested minute. So for $10 you could have five users try out your site for a couple of minutes each. Then watch the recorded videos and decide on what needs changing. Keep iterating and testing to get the lowest bounce rate possible.

30% discount code for HN crowd for a limited time by using this link: [https://userbob.com/?utm_campaign=hackernews](https://userbob.com/?utm_campaign=hackernews)</comment>


Fear of Launch - Lessons Learnt for Developers - <AUTHOR> http://www.reynoldsftw.com/2009/02/fear-of-launch-lessons-learnt-for-developers/

<comment><USER2> I have a massive fear of launching (just did it 1.5 hours ago). Before launching I wrote this cover letter to my "future employers" to help relieve some of the tension:

[http://killall.dashnine.org/2009/02/i-may-need-a-new-job- bec...](http://killall.dashnine.org/2009/02/i-may-need-a-new-job-because-my- boss-is-a-jerk/)

<comment><USER3> Since people skim cover letters, I would work in that you are joking right in the beginning.

</comment></comment><comment><USER4> The original article has a perfectly usable headline. Please use that.

<comment><AUTHOR> Done - you're right.

<comment><USER4> Thanks!</comment></comment></comment>


What is this hidden script doing on Hacker News? - <AUTHOR>

I noticed today that NoScript was blocking the `causes.com` domain on Hacker News. After looking at the HTML source of news.ycombinator, I noticed this:

    <script src="http://www.causes.com/moment_of_silence.js">
            showText: true;
            text: 'Learn more';
            url: 'http://causes.com/momentforsandyhook';
    </script>
 Can anyone explain what this is? Is it for charity? Why is this javascript being run, but nothing indicated on HN about it? <comment><USER2> To add to what others have already said, this is the original site that shared the code you saw:

<http://www.webmomentofsilence.org/>

And it was, for a brief time, discussed on HN, though not in any official capacity:

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

</comment><comment><USER3> Apparently it's this: <http://drupal.org/node/1872074>

</comment><comment><USER4> At 9:30 am there was a 'moment of silence' modal popup that came across HN and limited access to the site. The popup linked to here[1] and appeared with the message to 'Honor the Victims of Sandy Hook', and then encouraged us to support gun violence prevention.

I too was wondering what was going on until I realized that Paul Graham was one of the supporters of the project at Causes.com.

[1] - [http://www.causes.com/causes/807161-stand-with-sandy- hook/ac...](http://www.causes.com/causes/807161-stand-with-sandy- hook/actions/1716727?ctm=cat_nav_2)</comment>


A personal finance app, coming soon. - <AUTHOR> http://wadded.im

<comment><USER2> 408 when trying to sign-up :(</comment>


Depression and Programming - <AUTHOR> http://www.robsheldon.com/blog/depression-programming/

<comment><USER2> I enjoy the insight in this area. It's something I often think about, and we share some thoughts on the matter. "Is there something unique, or at least less common, about programming compared to other professions?" I think there is too. It's the reason why I actually lean towards design and marketing, because my roots have been in programming, and my roots have been riddled with depression. It's more than a coincidence, even if I might be a severe example.

</comment><comment><USER3> > "thanks, now here's the next thing I need you to do."

Hits home. When I still had time to practice guitar, everyone knew me as "that really talented guitar player", but now that I'm a programmer in a corporation, most of my friends don't even know what programming is, and in my job nobody knows If I'm a good or a bad programmer, not even my boss.</comment>


VHS tapes in the Internet Archive - <AUTHOR> https://archive.org/details/ephemeralvhs <comment><USER2> "We're No Dummies! We Don't take Drugs"

You gotta love how when you go through old tapes and other media, you find hilarious crap like this.</comment>


Ask HN: What to do when there isn't fluidity in coding? - <AUTHOR> I've been coding on and off for over 10 years.  I can get stuff done by banging my head against the wall but it's never been fluid.  I still am always fixing silly bugs and forget the tools I'm using if I don't use them on a daily basis etc.   So I don't have side projects or after work projects.  Anyone ever experienced this? Is it fixable? <comment><USER2> Now, I would estimate the chances of this being your issue somewhere below 20%. But for me, there was a time when coding was a joy, I was completely in the flow writing efficient code, tweaking data structures to squeak out more performance, and generally loving building stuff and learning stuff, getting a thorough understanding of how things work from Maxwell's equations to high- level languages.

Then after spending a few years in employment, the environment getting more and more toxic (and less and less about technical excellency and more and more about dirty politics), you can lose sight of how that stress gradually eats away at you. Ultimately, I just couldn't work anymore, I couldn't focus. I started having panic attacks. I was completely lifeless, fatigued all the time. I would later find out that my endocrine system had become completely out of whack. Long story short, it took me well over an year to get to be barely functioning again. I had a lot of anxiety symptoms, and clearly fit 100% most technical descriptions of burnout (but don't put too much weight to it, after all burnout is just a label attached to a set of symptoms). But worst of all, you become very cynical. Your brain gradually gets rewired to model the world as a cold, harsh, evil environment, where most everyone is against you. You end up in a state of learned helplessness, you fall victim to avoidant behavior to sooth this permanent state of doom that you're feeling.

The way out is learning to relax. Learning to rewire your brain, to have fun again. Learning to solve your anxiety problem. Following the steps from a book like "Anxiety & Phobia Workbook" by Edmund-Bourne is almost mandatory. Exercising regularly is mandatory. Depending on how deep you are in the hole, how much social support you have, this may be one of the hardest thing you achieve in your life (keep in mind that most drug addicts never make it out alive - see "In the Realm of Hungry Ghosts" by Gabor Mate).

In short, it may be that you stress yourself too much. Life can and should be a joy. What I've described above is my experience, which is closer to one end of the spectrum, but even if your issues are much more minor, the same rules apply. But again, the chances are small that anxiety is the source of your issues, given the limited information in your post.

</comment><comment><USER3> I feel much the same way. But let me start off by saying that I think being able to get into "flow" or "fluid coding" is actually a rarity, something I need to plan for. It means things like working from home for a few days in a row to really get into things, and I can make huge progress (velocity at least double for those days).

The office environment just isn't a place for good flow. Too many distractions, emails, slack, meetings, people, commuting, etc. This isn't to say that I don't get some work done at work, but it's certainly not efficient. Sadly most people I have worked with don't care that I'm not being efficient, they care that I'm working on whatever they want me to work on (which may or may not be the right thing).

My suggestions on this are to try to automate your tools, like writing scripts, and writing notes about your development procedure, even if they are only for you. I have a alias for a file that has all sorts of commandlines that can run anywhere and really helps me remember what it is I needed to run.

Many times, these notes have eventually gotten pushed to something like confluence, and are useful for other people, so they love them. They aren't copious, or descriptive, but the bare minimum to help me remember what I need to do.

Context switching can also make you associate your work environment with being distracted. Then even when you aren't being interrupted every 15 minutes you worry you might be, which becomes a problem of itself.

Despite what every growth hacker / struggle porn story tells you, you don't need to have side projects or after work projects to be successful. They are supposed to grow out of interesting things you care and have passion for, not be another job on the side. Don't worry about that at all. Spend that time to de-stress and enjoy life.

</comment><comment><USER4> If there's no way to reduce the number of tools, languages and environments you use. Then perhaps a memorization tool like shortcutfoo ([https://www.shortcutfoo.com](https://www.shortcutfoo.com)) could be of help.

And if you're using many different editors, then maybe learn VIM and use a vim plugin in all of them.

</comment><comment><USER5> Context switching is computationally expensive, a lot more so in brains. You should set aside a few days to work on a project when you feel like it, we 're not machines. It can be a weekend or part of a holiday, but in my experience banging against the wall and unable to achieve flow is very unproductive.

</comment><comment><USER6> > _forget the tools I 'm using if I don't use them on a daily basis_

Looks like you answered your own question. The more you do something, the more fluid it becomes.

</comment><comment><USER7> For me it always depended on the language. LISPs help me a lot because it's easy to iterate on real code in the repl. I'm not too great at just writing out a large program before running it. I have this need to test out every little bit of code. With verbose OO languages sometimes it's faster to google than to actually run the relevant code so that kills my fluidity.

</comment><comment><USER8> I work in lots of different languages and what I do is I try to keep most of my tools consistent between languages.

For example I try to stick to the Idea suite of IDE's. I use it for java, ruby, Go, Rust, JavaScript, and some others. This way my editor and shortcuts are always the same, debugging is mostly the same, etc.

</comment><comment><USER9> Are you constantly switching languages and environments? Maybe try to focus on the ones you're best at.

</comment><comment><USER10> Old. I've thrown monitors across the office, broken phones (landline), been moved across the office. It's part of the process. I've learned to control and use. Flow is a rare - but a beautiful thing you have to earn.

</comment><comment><USER11> If it's any help, I've been using anki (spaced repetition software) to keep my useful-but-not-frequently skills sharp. I feel it's effective for programming languages and shortcuts.

<comment><USER4> How do you do that for programming languages? Are there existing cards for that?

<comment><USER12> I've found that using pre-built decks of flashcards is not useful. I at least need the experience of building the deck in order to make it useful.

</comment></comment></comment><comment><USER12> > forget the tools I'm using if I don't use them on a daily basis

I've found Anki flashcards useful too.

</comment><comment><USER13> What tools are you using?</comment>


API that uses neural networks to scrape product data - <AUTHOR> https://mlscrapedemo.herokuapp.com/ <comment><AUTHOR> Hello,

Over the past few months I've been working on a neural-network based web scraper for e-commerce websites. The aim is to be able to scrape product data from any product page (so far it extracts the name, price, main image URL and technical specification of the product).

I've developed a working prototype of the API along with a demo page (with rate limits so please use it within reason! ) in order to get some feedback before I carry on with the project.

Because the API is only a prototype, there are some features which are currently missing but will be added later on - for example: • Only English sites that use GBP, EUR or USD are supported • I haven't finished integrating my computer vision algorithms, which means that in some specific situations, the API might not detect a strikethrough and will therefore mix-up the "current price" of the product with the "old price" • The service is running on a hobby heroku server so the API takes a few seconds longer than it otherwise would.

I would appreciate any feedback on the API, in particular: • Is there any other product data that you would like to see (e.g product ID, delivery costs, etc)? • What sort of applications would you use this API for once it's fully developed? • Apart from e-commerce sites, what other types of websites would you like to see an API for (e.g news websites, real estate listings, etc)?

<comment><USER2> We really need a service like this.

We are a furniture e-commerce. Our vendors don't provided detailed product feeds. We have to rely on scraping.

The most difficult part of scraping the data is that we need to scrape all the product options (Material, Color, Size ...)

each option is a different SKU. see [https://www.article.com/product/11833/sven-charme-tan- sofa](https://www.article.com/product/11833/sven-charme-tan-sofa)

We also need to build nlp models to understand product dimensions and weight (useful when estimating shipping fee)

<comment><USER3> Hey - if this is true my company already has a pretty good solution for getting product info in a standard format from 10s of thousands of websites. My company also has to gather, format, and estimate dimensions and weight because we do only international shipping. Try out a random product url on zipx.com for an example.

Should we talk? My email is in my profile. I think there might be several ways your company and mine can help eachother actually...

<comment><AUTHOR> Thanks for getting in touch, I've just sent over an email

</comment></comment></comment></comment><comment><USER4> Well done for getting it set up! How are you training your model? Feeding in scraped product pages alongside metadata from an API to train it? And what are your training sources?

Very nice idea, looking forward to seeing how it develops!

<comment><AUTHOR> Yes that's pretty much it - using a mix of ecommerce APIs and manual work to create data, and then using that as training data

</comment></comment><comment><USER5> Sounds like a lot of room for costly error. See door dash pizza arbitrage.

</comment><comment><USER6> Interesting project.

Are there any prerequisites for the product page URL?

I just tested it out on a few e-commerce websites (fashion) and all the values returned from the product pages were null

<comment><AUTHOR> It's currently a prototype, so I haven't fully finished integrating all the computer vision algorithms which means that it may miss some data in certain situations - but the purpose at this stage was just to see if this is something people would genuinely use and to get general feedback to help me decide what features to prioritise going forward.

<comment><USER6> Got it.

I have a side project I've been meaning to finish, where I would definitely use something like this (basically identifying price arbitrage opportunities across luxury fashion retailers).

I will bookmark and keep an eye out for your progress.</comment></comment></comment>


AOL: Mike Arrington Is No Longer Employed By This Company - <AUTHOR> http://www.businessinsider.com/aol-mike-arrington-not-employed-by-aol-2011-9

<comment><AUTHOR> _Then this morning, Arianna Huffington told us Arrington no longer worked for TechCrunch at all – that Arrington will merely be welcome to contribute unpaid blogs to the company, as long as he stays within AOL's blogging guidelines._

Not much I can add other than.. that sucks. I hope Michael starts a new blog instead because it was primarily only his posts I cared for anyway.</comment>


Ask HN: Is there a way to report users who're spamming HN with links? - <AUTHOR>

I clicked on the New Posts section a minute ago and half the page was filled with links advertising web development/drupal/iOS app services by a certain user .. is there a way to report users?<p>Also, does HN prohibit someone from posting too many items in a very short span of time? these posts seemed to have been posted in quick succession. <comment><USER2> Flag them.</comment>


A heuristic algorithm for factoring larger numbers using machine learning - <AUTHOR> http://carelesslearner.blogspot.com/2015/01/a-heuristic-algorithm-for-factoring.html

<comment><USER2> It's a parody blog.

</comment><comment><USER3> Hmm, not terribly interesting without some O() work. It may well be possible to solve the problem this way, but it may still be an NP solution.</comment>


Remotely Attacking Network Cards (or why we do need VT-d and TXT) - <AUTHOR> http://theinvisiblethings.blogspot.com/2010/04/remotely-attacking-network-cards-or-why.html <comment><USER2> "Advanced" network cards support IPMI with a protocol called RMCP, which runs over IP and can be delivered remotely. The cards implement IPMI/RMCP with an RTOS running on embedded RISC CPUs. Like every card with an embedded RTOS- running processor, they're coded in C.

There are two things that fall out of this.

First, when you write a protocol stack in C, you create memory corruption flaws. It's hard to name any piece of C code that has avoided this problem. Microsoft spends tens of thousands per dot release to have some of the best testers in the industry fuzz bugs out, and they still slip up. Dan Bernstein managed to let an LP64 overflow slip into qmail.

So, thing one: the trend towards more advanced network cards (and storage processors and motherboards and offload boards and etc etc etc) moves us to a place where our underlying hardware is vulnerable to software flaws, even if our operating systems and application code is extensively assured.

Secondly, the x86 security model moving forward is based on the idea that the chipset can assure that known-good code is running, and that the known-good code can use new chipset features to sandbox code, either in VMs or with runtime protection features. This model was designed _mostly_ to defend against attacks originating from application and OS flaws.

But that model fails badly when the assumptions it makes about attack vectors fails. So, for instance, if you can take over the RTOS running on a network card, then however much Intel and AMD have planned to eventually deal with IO- level attacks, the systems deployed today get trounced by the DMA controller. Right now, if you can program the DMA controller, you win.

That's (I think) what Rutkowska has been saying for the past several years. She's right, of course. But the reality is that anything we do to address this problem architecturally is going to be unsound for years to come. So the immediate thing we need to do is test our complex hardware to raise the cost for attackers of discovering and exploiting these kinds of vulnerabilities.

<comment><USER3> What about using a language immune to buffer overflow for the embedded controller? I know such languages can be made. (For example, one could implement a Smalltalk using formal methods, with an eye towards eliminating buffer overflows.) I'm not sure there currently exists a language suitable to implement such embedded controllers.

(Smallest Smalltalk image I know of was 45k. Squeak can be stripped down to ~ 350k, which is about half the size of Perl's runtime footprint in the 1990's.)

<comment><USER2> The people implementing these images don't even care enough to have their code reviewed (the vulnerability here appears to have been trivially fuzzable). They aren't switching to Smalltalk to deal with a problem they haven't even considered.

<comment><USER3> I'm not advocating that. I'm just pointing out that secure languages for embedded programming must be possible.

</comment></comment></comment></comment><comment><USER4> Here's what's going on at a high-level.

1\. Somebody discovered a security vulnerability in the implementation of a network protocol (i.e., a bug). The bug can be exploited remotely apparently. Which means that somebody from far away can break into your machine if your software has this bug.

2\. This was used by someone else to push forward their agenda. In particular, their point is that newer dynamic root of trust trusted technologies are better than older static root of trust technologies. The goal of these technologies is to make a piece of code execute securely (i.e., without being compromised or modified by an attacker). Static root of trust can make a piece of code execute securely only by trusting _the entire_ software stack from boot time until the execution of the piece of code. Dynamic root of trust bypasses this entire software stack -- it allows you to just verify that the piece of code hasn't been modified before it's being executed.

3\. Now, the bug from step #1 can (in theory) be used for someone to "break" into the persistent storage of the NIC and compromise the NIC "forever" by changing its firmware to a "bad" firmware. This won't be caught by the static root of trust technology because such technologies do not typically check the firmware of a NIC card at boottime. And thus, in theory, the dynamic root of trust is "better" because it doesn't rely on making sure that the entire software stack remains uncompromised.

Now .. my opinions.

a. Remote vulnerabilities are very problematic because they lead to remote exploits. The lesson here -- get very experienced/senior/skeptical designers to implement networking protocols. Here's where it's worth hiring the smart guy. Implementing a new protocol in C from scratch is crazy. I'd fire this guy if he worked for me.

b. Dynamic root of trust is better than static root of trust on paper. In practice, dynamic root of trust is very hard to implement in a way that stays secure while doing something useful. When executing in "secure" mode with dynamic root of trust, you cannot use interrupts which basically means that's almost impossible to do anything useful (like sending or receiving a network packet).

</comment><comment><USER5> Is there a "tl;dr" equivalent for an article that's completely buried in initialism soup?

<comment><USER6> tl;dr - Nothing is secure. Even Intel's specially designed Trusted Execution Technology (close to the Trusted Platform idea) has known flaws. You can be hacked at levels which you cannot control (firmware). It's tricky (not a script-kiddie level exploit), but possible and many existing holes are not published/known, because researchers would rather do something interesting than uncover yet another bug using the same technique. If you have government- level influence, start complaining to Intel (et al.).</comment></comment>


The Sound and the Story: Exploring the World of Paradise Lost - <AUTHOR> https://publicdomainreview.org/essay/the-sound-and-the-story-exploring-the-world-of-paradise-lost <comment><USER2> Shameless plug, you can download a high-quality ebook edition for free at Standard Ebooks: [https://standardebooks.org/ebooks/john-milton/paradise- lost](https://standardebooks.org/ebooks/john-milton/paradise-lost)

</comment><comment><USER3> A facinating review. Having never read the book/poem, I now want to. Though I suspect I will come to a differnt interpretation than the reviewer, it was interesting to read his take on it.

> I don't think that the version created by Milton, blind and ageing, out of > political favour, dictating it day by day to his daughter, will ever be > surpassed.

He is clearly in awe of this work, but I don't like it when reviewers make remarks not previously commented on at the very end of their review. "Our of political favour". Perhaps to others it is obvious what he means by this? But he doesn't discuss it at all in the review, and it seems almost like a subtle jab left right till the end. Is it simply because it is a religious work? Or is the idea of sin politically incorrect now? It seems like a rather silly remark to make by somebody that is clearly so well read and open minded about literature.

<comment><USER4> Milton and politics: [https://en.wikipedia.org/wiki/John_Milton%27s_politics](https://en.wikipedia.org/wiki/John_Milton%27s_politics)

Milton was active during the time of the English revolution which was transformative in regard to the divine right of kings, and the role of the state, and representative parliament. It is not a jab: Sin was a central concept to religious wars. Catholicism could annul sin, the purchase of indulgences led directly to the religious wars of the reformation which proceeded the English Revolution by only a few generations, and continued to echo down the years: Puritanism, and the establishment was an ongoing battle.

Milton's works were suppressed at times. He lived under sufferance of the potential for harmful consequence for his writing.

<comment><USER3> Ah, I interpreted his statement as meaning it was out of political favour _right now_ , rather than being out of political favour at the times it was written or published.</comment></comment></comment>


Ask HN: use ads or charge customers - <AUTHOR>

I'm looking into writing an iPhone app that will require the use of a backend server.  In order to self-fund the server(s), I need to get some form of revenue stream from the app.  But I'm not sure if I should put ads on it, or charge a nominal fee.
If I put ads on the app, obviously this is a continuous revenue stream, but I'm worried about the user experience.  If I charge a nominal fee (0.99 most likely) then I get a one-time bump, but then have to keep paying for the servers myself after that.
So I'm leaning towards putting ads on my app, but I'm not sure if it's a big deal having ads, or if the money would even be worth it?  Any insights anyone could provide on this? <comment><USER3> Without knowing what your app is, it isn't easy to say which revenue stream would be better suited for you. However, saying that WhatsApp operate in a sector which has several free rivals and is a paid app, and is successful so it doesn't really matter what type of app you have because, if it is a good app then people are prepared to pay for it.

Nevertheless, have you considered offering _"2 versions"_ of your app?

As you could offer a "Lite" Version which has 1-2 features missing and Ads (including offering to upgrade to the "Paid" version) and a "Paid" Version which has the 1-2 missing without Ads. What is important however, is that the 1-2 features that you remove are essentially _bonuses_ and not core to the operation of the app but rather _a nice feature/addition to the app_.

With regards to the user experience, just ensure the ads are incorporated into the design/experience of the app when you are creating it rather than making it feel as if they were just added at the end in order to make revenue from the application as this will reduce the affect upon the user experience from a users point of view - Although don't make the ads so integrated that they don't annoy users to pay to remove them (i.e. from your "paid" app) - <USER2> still need to be slightly annoying as you will get people paying for your app just so they no longer see the ads.</comment>


ReBreakCaptcha: Breaking Google's ReCaptcha v2 Using Google - <AUTHOR> https://east-ee.com/2017/02/28/rebreakcaptcha-breaking-googles-recaptcha-v2-using-google/ <comment><USER2> From previous recaptcha discussion[1] it seems like the going rate for solving recaptcha's is $2 for 1000 solved, or as low as $1/1000\. This method would actually be more expensive than that at $6/1000[2]

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

2\. [https://cloud.google.com/speech/pricing](https://cloud.google.com/speech/pricing)

<comment><USER3> Similar to my other comment, as a normal user, I'd happily pay 1/10th a cent (as long as it went to the grey market, and not the website or google) to bypass a recaptcha.

<comment><USER4> That incentive only works if a website's primary captcha use case is spam avoidance. Most websites that use captchas have a vested interest in preventing you from being able to bypass them by tossing money around. Paying to remove captchas is fundamentally unlike similar proposals (like paying to remove advertisements) that are designed to make innocuous users' lives easier because captchas aren't solely designed to prevent spam, nor are they designed as a passive revenue stream.

For example, one common use of a captcha is, essentially, rate-limiting in a non-spam prevention context. It's arguable that rate-limiting should be implemented _differently_ , but captchas are actually fairly effective for rate-limiting regardless. Websites that feature things like gift card numbers typically put captchas on lookups and validations to prevent people from simply brute-forcing them (especially if they do not use gift card pins). In scenarios like that, you don't _want_ spammers to be able to bypass captchas, but if they fundamentally can, at least it costs them money.

On the other hand, explicitly supporting captcha avoidance as a revenue stream, however, presents malicious users with the same opportunity that parents get if you offer to fine them for being late to pick up their children from daycare. You've just implicitly given them a choice that was not really allowed before, and they'll happily pay you directly instead of the shady API they have to use to get rid of the captcha.

So to sum up - captchas aren't fun, but in principle you really don't want there to be a consistent method for cheaply bypassing them (whether grey market or officially supported) if the expected value of doing so is significantly higher than the cost.

</comment></comment></comment><comment><USER5> Found something mildly interesting playing around with this. One of the network requests when you ask for audio is this: [https://www.google.com/js/bg/Kv2WsNzHE5GULL- TmjqX5N4dnwt4D3c...](https://www.google.com/js/bg/Kv2WsNzHE5GULL- TmjqX5N4dnwt4D3cPVKm_UbfMct4.js)

Which presents this, in a comment at the top of the returned js:

Anti-spam. Want to say hello? Contact (base64) Ym90Z3VhcmQtY29udGFjdEBnb29nbGUuY29t

That decodes to: email@example.com

<comment><USER6> Some background on the code:

[http://stackoverflow.com/questions/21762076/why-does- gmail-u...](http://stackoverflow.com/questions/21762076/why-does-gmail-use- eval)

</comment></comment><comment><USER7> When I was at Yahoo we had a HackDay where there was one team that used Flickr data to make a captcha that asked for tags for an image it displayed. Another team used Flickr data to look at images and automatically tag them...

</comment><comment><USER3> Wow. I want this as a browser plugin. The image recaptchas are extremely time consuming (maybe I click the wrong images, or they're just punishing me for logging out and clearing cookies...), and I don't want to futz with the audio ones.

<comment><USER8> Yeah, it's really brutal. I find the new recaptchas which I hit almost every time are much more exhausting than the old text-based ones, and probably much easier for a machine to solve to boot.

<comment><USER9> The worst are the questions like "Click the images with a store front" what the hell is a store front? Especially in today's world.. Is a garage a store front? Is a hot dog stand a store front? Same with like "Click the images with cars" but there's a crossover. Is that a car? Is a station wagon a car?

<comment><USER10> I've found it's best to just not think about it too much. CAPTCHAs are, after all, designed to "tell Computers and Humans Apart". You're a human, so just pick whatever seems reasonable and move on. If the system doesn't accept your answer, that's _its_ fault, not yours.

</comment></comment></comment></comment><comment><USER11> Is this a PoC bug bounty type of deal, or "here's a neat tool that can beat reCaptcha" type of deal? Seeing a bunch of comments about wanting a browser plugin that exploits this, but I'm wondering if that would be legal or not after reading (from HN several weeks ago) about the ticket scalpers who automated TicketMaster's site and were charged with fraud. The case isn't exactly analogous, but it's close enough to make me wonder.

[https://motherboard.vice.com/en_us/article/the-man-who- broke...](https://motherboard.vice.com/en_us/article/the-man-who-broke- ticketmaster)

<comment><USER5> They did, indeed, get charged with wire fraud, and entered guilty pleas[1].

The EFF and others were pretty dismayed with this, and felt it should have been a civil, and not criminal matter.

Since that time, Congress also passed a "Bots Law" that specifically spells out gaming online tickets as _" treated as unfair or deceptive acts or practices under the Federal Trade Commission Act."_ [2] I suspect this opens a door for larger fines as well.

[1] [https://www.wired.com/2010/11/wiseguys-plead- guilty/](https://www.wired.com/2010/11/wiseguys-plead-guilty/)

[2] [https://www.congress.gov/bill/114th-congress/senate- bill/318...](https://www.congress.gov/bill/114th-congress/senate-bill/3183)

</comment></comment><comment><USER12> Maybe they should have dubbed this ReNotBreakCaptcha?

        > I've testing in 3 examples, and none had the correct answer: first one only detected 3 out of 6 numbers, the seconds had 10 digits, one of them wrong, and the third couldn't recognise.
        > Also, it seams that google implement a max number of retries for audio challenge."

</comment><comment><USER13> Captcha-replacement - [https://hashcash.io/](https://hashcash.io/)

<comment><USER14> this is not a captcha replacement at all. the constraint on proof of work functions is that they are compatible with mobile users which puts an upper bound on the approach.

custom work (even in the presence of scrambled approaches) and servers instead of mobiles both make this approach problematic.

</comment></comment><comment><USER15> It was already prooved in 2012: [https://arstechnica.com/security/2012/05/google-recaptcha- br...](https://arstechnica.com/security/2012/05/google-recaptcha-brought-to- its-knees/)

But, it is not exploitable - when Google identified high volvume attacks, the voice captcha is changed into a more complex voice which cannot be identified via this tool.

A Proof of Concept was already created by AppSec Labs, in Sep 2016: [https://www.youtube.com/watch?v=4yec- vxN0BY](https://www.youtube.com/watch?v=4yec-vxN0BY)

</comment><comment><USER16> What success rate have you seen? Google intentionally fuzzes parts of the audio and tries to induce false positives.

Also, does google offer an audio captcha every single time? Even for very high risk profiles?

<comment><USER17>
      > Also, does google offer an audio captcha every single
      > time? Even for very high risk profiles?

It might be a legal requirement from the ADA.

</comment></comment><comment><USER18> You can automatically bypass ReCaptcha v2 using a captcha solving service with [https://www.captchasolutions.com](https://www.captchasolutions.com)</comment>


Vast Majority Of Software Patents In Lawsuits Lose - <AUTHOR> http://www.techdirt.com/articles/20100924/02132911143/vast-majority-of-software-patents-in-lawsuits-lose.shtml <comment><USER2> There are no controls on this study. Lawsuit-happy companies appear to only win a small portion of their suits, but why? Is it because they have patented things that shouldn't have been? Bad lawyers? I can't being to imagine all the different things that could cause this.

And that's even before we compare it to other non-patent lawsuits.</comment>


FreeBSD 12.0 is now available - <AUTHOR> https://lists.freebsd.org/pipermail/freebsd-announce/2018-December/001856.html <comment><USER2> I've had the chance to meet several of the developers at the BSDCan conferences; kudos people, you really deserve it.

I moved to BSD world when Debian adopted SystemD and I am happy that I did. It is often said that Linux is more stable then Windows, well BSD could be considered like Granite compared to Linux. I really love it. OpenBSD for the edge, and FreeBSD for internals and workstations.

The driver updates are very welcome too, getting my video card to work 4k@60Hz was a bit of a task finding the correct driver, but I see this update addresses that too.

Once again, thank-you to everybody who contributes.

<comment><USER3> As someone who hasn't used BSD, but is considering it for a small server (not mission critical, so OK for me to be learning with), could you expand on the major differences to you between OpenBSD and FreeBSD (vs possibly other options)? When you say you like OpenBSD "for the edge", do you mean cutting- edge, or edge network equipment? Thanks!

<comment><USER4> OpenBSD is more conservative and security-minded, so I'd say network edge. Interestingly though, its laptop hardware support has historically been better.

<comment><USER5> OpenBSD devs actually tend to use OpenBSD on their own systems (and most of them own ThinkPads), which, weirdly, is not the case with most FreeBSD devs, who run something else on their desktop.

<comment><USER6> This isn't necessarily a fair characterization of FreeBSD devs, although it's probably pretty close. I'd guess about 50-50 FreeBSD vs Mac users.

<comment><USER7> I'm guessing this is because macOS pulls from FreeBSD on a semi-regular basis.

<comment><USER8> Maybe they pull some things sometimes but I get the sense their command-line tools in general are just unmaintained and collecting dust. Do you have a citation that they pull regularly?

FWIW:

~ man rm | tail -n1

BSD January 28, 1999 BSD

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> I have been trying out FreeBSD 12 as a desktop using the "TrueOS" distribution[1], as a UNIX user it has been very refreshing. I did this because the Ubuntu 18.04 experience felt to me strongly that the Linux community was focused on turning the desktop into a Windows clone.

[1] [https://www.trueos.org/](https://www.trueos.org/)

<comment><USER10> Does BSD have a packet system like APT? How about troubleshooting? I guess there is way less info out there than in Linux.

<comment><USER11> The only resource you need is here:

[https://www.freebsd.org/doc/handbook/](https://www.freebsd.org/doc/handbook/)

This is the first and only resource you have to hit when the question is: "how do I do that in FreeBSD?"

Section 4. answers your second question.

There is no less information about BSD than "Linux", it is simply that BSD has no advertisement or companies behind pushing it...

<comment><USER12> "There is no less information about BSD than "Linux", it is simply that BSD has no advertisement or companies behind pushing it.."

Which is ironic since huge companies like netflix, sony, citrix, netapp and others make appliances based on FreeBSD and contribute a ton of code (Note, i am not at all disagreeing with your statement, i just find it ironic).

IX Systems does push behind it a lot and does advertise it: [https://www.ixsystems.com](https://www.ixsystems.com)

I have heard people complain because the handbook needs updating in some areas, but to be fair it is an open source handbook and people can make submissions to help make it better.

<comment><USER11> Maybe I am wrong, but as far as I remember IXsystems is pushing TrueOS and some other appliances like FreeNas.

My point was simply aiming to underline that there is no analogue of RHEL or Centos in the BSD world. If you decide to endorse BSD you know you are on your own and you have to contribute to the project. The BSD license seems a bit more appealing to this huge giants than the GNU one. Fixing bugs and contributing to the code base is the reason why I love the project.

For purely educational reasons you can learn more in 5 minutes using BSD, than in 10 years with Ubuntu (what is it that one learns with Ubuntu actually?).

The handbook is just awesome. If people complain about it, it is just because they never looked at how documentation is written in the average in computer science (is software documented at all?).

</comment></comment></comment></comment></comment><comment><USER13> The biggest thing I'm waiting for with FreeBSD is the TLS sendfile work that Netflix has done. They have said a few times they are open to open sourcing it, but the code needs to be cleaned up.

Also I'm interested in whats been going on with concurrencykit[1]? I saw it got imported into the kernel a couple years ago[2]. What's the progress on incorporating concurrencykit?

[1]: [http://concurrencykit.org/](http://concurrencykit.org/)

[2]: [https://www.freshbsd.org/commit/freebsd/src/309260](https://www.freshbsd.org/commit/freebsd/src/309260)

<comment><USER6> Netflix's TLS sendfile probably won't ever be imported. It isn't full TLS, just single-key output. It works for Netflix because they control the client software and if the client requests a re-key or other session change, they can just drop the connection and let the client reconnect. It isn't really obvious how it would be cleaned up to be general enough to import, and it would be a ton of work with little payoff.

ConcurrencyKit is imported and used for efficient read-mostly datastructures in FreeBSD 12, mostly in networking applications such as IP routing and link- level address caching (i.e., ARP in IPv4 Ethernet). It's also used in network interface drivers, HWPMC, TCP, and the linuxkpi emulation layer (to emulate RCU).

You might be interested in this blog post: [http://scalebsd.org/blog/2018/06/16/UDP-and-epoch-for- livene...](http://scalebsd.org/blog/2018/06/16/UDP-and-epoch-for-liveness- guarantees) and [https://www.freebsd.org/releases/12.0R/relnotes.html](https://www.freebsd.org/releases/12.0R/relnotes.html) .

<comment><USER14> I don't think it would be desirable for the kernel to handle rekeying, the socket should get sent back to userspace for that. That would probably require some wrangling, and it's certainly easier to do it in a good enough fashion rather than try to clean it up and get it upstreamed, but it's not impossible. I'm certainly guilty of not getting enough energy around upstreaming patches too, though.

<comment><USER6> > I don't think it would be desirable for the kernel to handle rekeying, the > socket should get sent back to userspace for that. That would probably > require some wrangling, and it's certainly easier to do it in a good enough > fashion rather than try to clean it up and get it upstreamed, but it's not > impossible.

Sure; I agree. I tried to address that under "It isn't really obvious how it would be cleaned up to be general enough to import, and it would be a ton of work with little payoff."

After all, you have to integrate with OpenSSL (or whatever) on the userspace side somehow too. And OpenSSL is contrib code, so we can't just hack it willy- nilly.

<comment><USER15> OpenSSL already has integration for Linux's similar kTLS support (bulk transmit encryption only; all other alerts, renegotiation etc punted back to userspace). If you wrote it to provide the same API then the OpenSSL support side would be easy.

[https://github.com/openssl/openssl/blob/d6c3c1896cf3c0d69bc2...](https://github.com/openssl/openssl/blob/d6c3c1896cf3c0d69bc27da923d63f8130b13ca0/include/internal/ktls.h)

<comment><USER6> Thanks, I didn't know about that. That makes it seem a lot more viable.

</comment></comment></comment></comment></comment></comment><comment><USER16> My 10 year old Dell XPS M1330 with Intel Core 2 Duo T8100 and 4 GB RAM with original HDD still running strong, had 11.2 installed on it. I just finished updating it to 12.0 release without any issues. I have only good things to say. I use Xfce. The filesystem is ZFS.

A while back, I took a snapshot of /root and installed Gnome 3. It was too big for my laptop. I rolled back. The snapshot and rollback were amazingly fast.

I find FreeBSD more cohesive. I have not tried it on modern devices, but my experience with it on my decade old laptop and VMs is extremely positive.

A similar cohesiveness is achieved only when I handcraft my Arch. Maybe, it is just the feeling.

</comment><comment><USER13> Sweet, I've been waiting for VIAMGE to be default for awhile. VIMAGE was the main reason I custom compiled FreeBSD for the last few years.

<comment><USER17> Does this finally make jails on-par with containers as far as full isolation (with this adding the network element) ?

I'm a BSD noob.

<comment><USER13> Jails are containers and provide more isolation then Linux containers.

</comment></comment></comment><comment><USER18> Neat! I haven't yet found the commit that did it, but it appears that dtrace's stop(), which was broken in 11.2-RELEASE, now doesn't cause kernel panics.

Also interesting:

> The dtrace(1) utility has been updated to support if and else statements.

I believe that it's only a change in the front-end parser and that logic of this sort is still implemented via the old predicate/multiple clauses trick, but some syntactic sugar is still welcome.

<comment><USER6> > I believe that it's only a change in the front-end parser and that logic of > this sort is still implemented via the old predicate/multiple clauses trick, > but some syntactic sugar is still welcome.

Correct.

</comment></comment><comment><USER19> The only thing keeping me away from using BSD is the WiFi support. If it started supporting 802.11ac, I'd switch in a heartbeat.

<comment><USER13> Yea kinda a bummer that I had to buy a USB dongle for a brand new XPS-13 I wanted to install FreeBSD on. I knew I had to, and considering the rest of the hardware was supported I considered it a fair trade off, because I really wanted a FreeBSD dev laptop.

I would like to help with the lack of wifi drivers situation, I'm solid programing in C, but writing network drivers seems intimidating.

<comment><USER20> I got roped into writing network drivers for a research project back in undergrad.

The actual work to be done was fairly straightforward; the difficulty was collecting all the different undocumented hardware APIs and figuring out how to use them. :P

<comment><USER21> Then it might be even harder to do it right in Linux than FreeBSD. It is because Linux's ABIs change so frequently that you have to stick to some distributions to follow even if you want broader support :-)

</comment></comment></comment></comment><comment><USER22> Aawww, I just upgraded my home server from 11.1 to 11.2, now I have to do it _again_? Fortunately, upgrading FreeBSD is a lot more convenient these days than it used to be.

<comment><USER14> FreeBSD 11.2 continues to be a supported release. There's no _need_ to upgrade at this point. Also, from experience, unsupported FreeBSD releases generally continue to work as well as they did while they were supported (which is to say, pretty well); they don't turn into a pumpkin when support stops.

<comment><USER22> I was half joking. When I first got to know FreeBSD, the way to upgrade was to rebuild from source and then perform all kind of magic incantations to merge the new configuration files and whatnot. freebsd-update(8) has made this whole experience much more convenient. I consider myself a competent Unix user, but I am glad these days I do not need to be a wizard to keep things working.

I guess I will upgrade my trusty home server over the holidays, and I am looking forward to it. ;-)

<comment><USER22> FWIW, I just upgraded my VPS today, using freebsd-update(8), worked like a charm.

</comment></comment></comment></comment><comment><USER23> Any practical advantage of using *BSD on workstation over Linux at this moment? I heard that most of BSD developers use macOS, so the hardware compatibility is terrible.

<comment><USER24> The hardware support isn't all that bad, but FreeBSD is indeed pickier than Linux or Windows :-). Reasons why I like it include excellent documentation (light years ahead of anything in Linux land), ports & friends (things like Poudriere), and ZFS. I also like Capsicum but I don't use it much.

If that's relevant to you, it also doesn't use systemd (I don't mind it because I learned how to use it properly, but I'd certainly love a break from troubleshooting it...)

</comment></comment><comment><USER25> I setup my (decade) old laptop as a server running on FreeBSD. And the elaborate documentation is a real lifesaver, especially as someone who is new to the ecosystem. Even, for the obscure hardware specific setup (yea, looking at you sony vaio), I could find relevant information on their forum which interestingly had relevant information from ages ago.

Really great job guys and thank you! Can't wait to upgrade!

<comment><USER26> Could you share what you found, by any chance? I've been having some trouble configuring GRUB for Linux on an old VAIO with UEFI (kinda works, but required weird workarounds and seems still flaky); I'm really interested in any success stories with booting OSes on their hardware.

</comment></comment><comment><USER27> I was so close (about a nanometer!) to adopting FreeBSD as my desktop OS due to it's plethora of software, amazing package management, great usage of RAM, and roots in true Unix, but one sad day, I installed WINE. It was working with all the applications I expected it to, except for one... Steam. The WINE version was too old. I tried and tried again, even compiling it straight from the staging git branch, but it didn't compile. Alas, FreeBSD is my server OS. It keeps my at least a bit sane knowing I have FreeBSD somewhere in my home.

</comment><comment><USER28> I was considering setting up a new desktop machine with either OpenBSD or DesktopBSD (which is based on FreeBSD). Does anyone have any recommendations on which to choose? Any interesting experiences using BSD as a daily driver?

<comment><USER29> I've been using FreeBSD on my desktop and notebook for the past 3 years and I have nothing to complain!

Granted, I do not have the habit of playing games or using large, unsupported software (say, Photoshop and friends). My daily applications consist of Emacs and Firefox, so my feedback may be limited in scope.

I'm not sure what the status is, but last I checked Electron did not work on FreeBSD. If you use something Electron-based, you might want to take a look at it.

I also am unable to access my iPhone filesystem and to watch Netflix movies. But for both cases, I blame the vendor and not FreeBSD. A VM on bhyve quickly solves the problem.

<comment><USER20> What kind of overhead does bhyve have? Is it on the order of KVM?

<comment><USER6> Overhead for the host, or the guest? Host is comparable — majority of the cost will be memory allocated to the guest.

Guest overhead will vary by workload. I know for example that virtio-net performance lags Linux, because virtio-net was designed for Linux skb's and doesn't align well with FreeBSD's mbufs. Give it a shot and see how it compares, I guess.

</comment></comment></comment></comment><comment><USER30> As a long term FreeBSD user who was bitten by recent (8 up to 11) source update issues I would have loved a disclaimer upfront: "we broke it again" or "we finally got back to normal"....

<comment><USER31> Going from 8 to 11 you would probably be best off by backing up your data (do this anyway) and making a fresh 11 install. Reinstalling apps is super easy with pkg.

I've never seen an OS updater that is happy to jump 3 major versions at once, especially since the old one has fallen off of even legacy support.

<comment><USER30> I am not talking about 8 to 11 in one go. With 8.x I experienced the first literally broken source update and a few came after that.

I've switched from Linux to FreeBSD in 1999 because I was fed up with chunky/broken binary updates. One used to be able to compile 3 versions ahead on a running system and boot into a working, clean setup. I am lazy, of course I tried (and succeeded most of the time).

But since 8 even the standard practice of migrating one major version at a time as well as updates from latest n.x to m.0 was broken for people who did not drink the "pkg and freebsd-update!" kool-aid. My allergies to that are raid controllers not supported by GENERIC kernel and a general preference to include into software only what I need - make.conf makes that really easy and maintenance is a breeze simply because we're not hit by as many security issues.

</comment></comment></comment><comment><USER32> "pNFS server support"

Very welcome suprise! I was excited about pNFS four years ago, but couldn't find any open source system to play with. Finally it is time for some mirrored pNFS testing.

</comment><comment><USER33> No BBR yet.

<comment><USER34> Can you explain what BBR is? Thank you.

<comment><USER33> Sorry, good point. its a modification to how TCP backs off under loss, and then re-approaches the prior rate. Traditional TCP does an exponential back- off and recovery model. This takes a long time to get back to the fastest achieved rate. Its a very jaggy sawtooth. BBR gets back to the prior rate faster.

BBR is a very fast recovery algorithm. Its not always very "fair" to other forms of TCP. BSD and Linux both have kernels which allow selection of different methods of backoff. BSD has cubic, and some other choices, at this point only Linux appears to have the BBR method integrated. It is in test in the BSD stack (I believe)

If you have sole use of a host, and want to do long-distance file transfer, with loss, BBR can sometimes get you things faster. If you're in a Data Center (DC) BBR can cope really well with dumb switch packetloss, getting you significantly faster recovery.

</comment></comment></comment><comment><AUTHOR> Some of the highlights:

         * OpenSSL has been updated to version 1.1.1a (LTS).

         * Unbound has been updated to version 1.8.1, and DANE-TA has been
           enabled by default.

         * OpenSSH has been updated to version 7.8p1.

         * Additonal capsicum(4) support has been added to sshd(8).

         * Clang, LLVM, LLD, LLDB, compiler-rt and libc++ has been updated to
           version 6.0.1.

         * The vt(4) Terminus BSD Console font has been update to version 4.46.

         * The bsdinstall(8) utility now supports UEFI+GELI as an installation
           option.

         * The VIMAGE kernel configuration option has been enabled by default.

         * The NUMA option has been enabled by default in the amd64 GENERIC and
           MINIMAL kernel configurations.

         * The netdump(4) driver has been added, providing a facility through
           which kernel crash dumps can be transmitted to a remote host after a
           system panic.

         * The vt(4) driver has been updated with performance improvements,
           drawing text at rates ranging from 2- to 6-times faster.

         * Various improvements to graphics support for current generation
           hardware.

         * Support for capsicum(4) has been enabled on armv6 and armv7 by
           default.

         * The UFS/FFS filesystem has been updated to consolidate
           TRIM/BIO_DELETE commands, reducing read/write requests due to fewer
           TRIM messages being sent simultaneously.

         * The NFS version 4.1 server has been updated to include pNFS server
           support.

         * The pf(4) packet filter is now usable within a jail(8) using vnet(9).

         * The bhyve(8) utility has been updated to add NVMe device emulation.

         * The bhyve(8) utility is now able to be run withing a jail(8).

         * Various Lua loader(8) improvements.

         * KDE has been updated to version 5.12.5.

<comment><USER35> And the biggest highlight that wasn't mentioned anywhere in the release notes for some reason…

(drum roll)

64-bit inodes!!

<comment><USER36> I assume that is 64-bit inodes for UFS2 ?

I would be concerned about the ability to fsck a UFS2 filesystem with enough inodes in it to require 64-bit inodes... As late as 2010/2011 fsck would fail to allocate enough memory to successfully repair a filesystem with <200M inodes ...

I have it on good authority (the author of UFS) that there is no reason to use UFS instead of ZFS unless you are severely memory constrained.

Perhaps I misunderstand the new feature you are highlighting ?

<comment><USER37> No, various kernel entry points have been modified to be able to handle 64-bit inode numbers. UFS itself still uses 32-bit inode numbers.

</comment></comment></comment></comment><comment><USER38> please delete this comment, I was commenting on the wrong thread!

<comment><USER39> This article is about FreeBSD, not Firefox.</comment></comment>


K7: a standard library for the V8 Javascript interpreter - <AUTHOR> http://github.com/sebastien/k7/tree/master <comment><USER2> This group <http://groups.google.com/group/serverjs> (kicked off by this post: [http://www.blueskyonmars.com/2009/01/29/what-server-side- jav...](http://www.blueskyonmars.com/2009/01/29/what-server-side-javascript- needs/) ) is working on a cross-interpreter standard library, a module system, etc. It just started last week, but people from many of the major server side (and some client side) JavaScript projects are already involved. If you're interested in helping out, take a look.

</comment><comment><USER3> Also check out <http://www.jsconf2009.com> where JavaScript developers will be rallying to discuss how to use JavaScript to build cutting edge mobile, desktop, server, and web applications. If you have any interest in deep JS tech, you should be there.

</comment><comment><USER4> If you're having problems building it on Darwin, try this one: <http://github.com/isaacs/k7>

(Pull request sent.)

</comment><comment><USER5> Awesome. I've been wanting something like this for a while, but have been too busy with my projects to start it.

<comment><USER4> Same here!

I've been kicking around some ideas to put V8 to use, but the lack of file and curl access was a huge roadblock that I haven't had time to work past.

Thanks!!</comment></comment>


Airbnb could plan to IPO by late 2020 - <AUTHOR> https://techcrunch.com/2018/06/29/airbnb-could-plan-to-ipo-by-late-2020/ <comment><USER2> Last time I traveled, I found a bunch of the places I saw on Airbnb listed on other sites for cheaper. More alarming, there were significantly more negative reviews on these other sites (even on a site like Booking), than there were on Airbnb.

I'm sure Airbnb will continue to grow, but it seems awfully saturated to me already. I'm amazed at how many listings there are for my neighborhood (in NYC). All these hosts with a dozen locations that they barely maintain. Hard to find verify a host actually cares about a place they rent.

<comment><USER3> I've noticed Airbnb reviews tend to be very generous. I'm not sure why.

I recently stayed with a friend at an Airbnb in Amsterdam. The bedroom had noise and smoke from a neighboring bar until around 5am, making it very difficult to sleep, even with the windows closed.

I didn't book the Airbnb, but I checked the reviews afterwards. Several people mentioned these problems, but still gave the place 4 or even 5 stars.

I'm not sure what would warrant a 1 star review for these folks short of an absolute nightmare.

<comment><USER4> At least for folks in the US, a five star rating system usually is:

1: absolute nightmare 2: N/A 3: N/A 4: It was pretty bad 5: Acceptable or better

<comment><USER5> Is that specifically for Airbnb? It isn't the case for Amazon, app stores, TripAdvisor, or Yelp. among other places. Why would Airbnb be different?

<comment><USER6> Late response, but I think it has to due with social pressure. You may meet the host in person, and feel bad about giving someone you know "personally" a bad rating. Additionally, they are also rating you as a guest, so it may be awkward if you gave a bad rating when they give you a good one, so people skew the ratings up.

</comment></comment></comment></comment></comment><comment><USER7> Current headline listed in HN: "Airbnb could plan to IPO by late 2020"

Actual headline on TechCrunch: "Airbnb aims to be 'ready' to go public from June 30, 2019, creates cash bonus program for staff"

That AirBnB could be ready for an IPO in 1 year is the way important date.

</comment><comment><USER8> Interesting considering that a lot of cities and countries started war against this business model, it's highly regulated, restricted or completely banned.

<comment><USER9> That's not even remotely a concern as far as their IPO goes. Airbnb's business is a spectacular success and will remain so. There's no serious threats on the horizon, that includes regulation and competition. They smashed their own 2017 forecast numbers, delivering $2.6 billion in sales and were profitable.

<comment><USER10> I use a few platforms, including airbnb, when I look for accomodation. What makes airbnb better? The only different thing I noticed is that they validate my ID.

<comment><USER11> Of course the obvious answer is network effect, but I guess you're saying that's negligible here? I think I agree. I also think that a decentralized version, which can more easily avoid censorship, will deliver more value.

<comment><USER12> Is there a decentralized _anything_ that has been successful outside of email?

<comment><USER13> DNS, although the individual registries are each centralized.

<comment><USER14> The great Dyn attack of 2016 would disagree with you in practice.

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

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> I have a question, why do companies go public later into their lifespans? If I was Uber wouldn't I want to go public within a year or two of extreme success (2013-2014) where my popularity and reviews are higher to garner more interest and therefore more buyers at a higher initial price? Instead its maybe 8-10 years after launch where regulations and lawsuits have attacked the business model. Correct me if I'm wrong just wondering.

<comment><USER16> Part of a CFO's job is finding the cheapest capital source for the companies growth, sometimes that raising private equity and sometimes that is raising public equity (from IPOs).

Also, being public is a resource drain on the organization. You have to comply with SEC guidelines, employees have to be watched for insider trading, all of your company financials and other details are now public for the world to see. Sometimes the burden doesn't make sense for a high growth company.

</comment></comment><comment><USER17> So I will revise my expected date for the next stock market crash to 2021 then.

Retail is dying, nobody is buying or selling houses, there are the US tariff wars, more countries are buying/selling energy without buying dollars first, the UK is heading for Brexit, the Euro is heading for Brexit, Quantitive Easing has yet to come home to roost and there are plenty of bubbles.

Meanwhile, everyone has a job and tourism is booming.

I imagine the AirBnB advisors know more than me about these circumstantial factors and would not want to be doing their big sale on the wrong side of the inevitable recession/crash.

Best make hay whilst the sun shines.

<comment><USER18> > nobody is buying or selling houses

You must not live in the US then. Housing prices are climbing to all-time highs because of demand.

<comment><USER19> Yes, Redfin shows some of the properties at least in Seattle area are being sold at an exorbitant price (way more than asking price). Too few houses, too many buyers!

<comment><USER20> Yup, I purchased a house in the Seattle area in 2016 for 12% over the asking price. This year it appraised for 58% more than what we bought it for. Houses are regularly selling for over >10% over asking prices as soon as they're listed</comment></comment></comment></comment>


Why You Should Know C++ - <AUTHOR> http://www.unknownprogrammer.com/2009/10-reasons-you-should-know-cpp/

<comment><USER2> I'll go for a point-by-point critique.

Point 1 tacitly assumes that learning C++ not only teaches you a common subset of many other popular languages, but also is the easiest way to learn said subset. This is wrong: a lot of simpler languages can teach you the same, e.g. JavaScript or pre-1.5 Java.

Point 3 says a given code sample in the wild has higher probability of being in C++ than any other language. This clashes with my impressions.

Point 4 assumes that the main difficulty of C++ is due to pointers and manual memory management, and that knowing your way around those issues will help you in other programming areas anyway. This sounds wrong to me: C shares those "difficulties" with C++ and isn't generally regarded as a hard language. The difficulty of C++ mostly stems from design decisions unique to C++ and useless elsewhere, like template metaprogramming or the dangerous combination of manual memory management with exception handling.

Point 5 implies that C++ invented parametric polymorphism and that this facility is essential to make algorithms work on a variety of data types. Wrong on both counts: ML and Ada generics predate C++, and Smalltalk-like dynamically typed languages solve the same problem without type parameterization.

Point 6 assumes more libraries have C++ interfaces than C interfaces, which is wrong by an order of magnitude at least.

Point 9 assumes most programmers are more interested in performance-oriented and algorithmically complex projects. Can't give statistics here, but I'm a data point to the contrary: I love UI and frontend work.

Point 10 is valid.

My own reasons for knowing C++ are a combination of point 10 and the need to muck around with <http://mapnik.org> \- the only C++ library I ever found useful. And its code sucks, I'd kill for a C/Python alternative.

</comment><comment><USER3> Wow, I like C++ (at least, more than most), but I don't agree on any of those points.

In fact, I am sad to say that unless your job requires it, I can't really think of any reason to learn the language. It relies on a mixture of paradigms that are easier learned from other languages where they are isolated. And for lolevel stuff, you are better off learning C.

<comment><USER4> What's the point of using C when most modern programs on modern operating systems are written using frameworks that are a form of objectified C?

All serious development frameworks nowadays for desktop applications are either C++ or Objective C. Most native libraries are one of the two. Even the driver SDKs are mostly build on an object oriented approach.

And learning C++, you will know C. Your opinion is a popular opinion among web developers and people who do not do desktop development, but in the real world, it has a lot more advantages to learn C++ instead of C.

<comment><USER5> Windows API is pure C. GTK is pure C. And these are quite serious (and not exactly obscure) development frameworks.

<comment><USER6> Have you subclassed any GObjects lately? Or otherwise implemented custom GTK widgets? If so, you might know why GTKmm exists (nevermind that PyGTK, GTK# etc are arguably the intended ways to use GTK.) There is a good reason everyone in the Linux world screamed with glee when Nokia LGPLed Qt, and C++ (even the basic stuff) is a big part of that reason.

<comment><USER7> No qt is the reason. qt is well designed and thought, contrary to gtk. And it's not because qt was written in C++.

</comment></comment></comment></comment></comment><comment><USER8> No discussion of C++ should go without mentioning the C++ FQA (Frequently Questioned Answers). It carefully explains every single thing wrong with the language, and there's a LOT to explain.

<http://yosefk.com/c++fqa/>

Skip to <http://yosefk.com/c++fqa/defective.html> for a great overview. And if anyone ever mentions "templates" again I'm gonna smack them hard.

</comment><comment><USER9> My reason not to learn C++: There are so many things one should know, that it is not rational to learn all the arcane details of C++. Every decision to learn something is an implicit decision not learn everything else.

<comment><USER10> If you know any other object-oriented language, it's easy to make the case that you should learn C and skip C++.

</comment></comment><comment><USER11> 3\. Code samples in books are more likely to be in Java or Python than C++.

6\. Libraries are more likely to have native C bindings than native C++ bindings.

<comment><USER12> I agree, most of the points seem to apply more on C than on C++.

Also this:

        10. You will hardly be seen as a hacker if you don't know C++

there are enough kernel hackers that are excellent C programmers, but don't know C++ that well.

and this:

        8. There will always (or, at least, for a very long time) be a niche for C++

There will also be a niche for COBOL programmers. That doesn't mean you should learn COBOL.

<comment><USER13> Just keep in mind that making a career out of maintaining other peoples' C++ legacy code is a highly optimized way to become the bitterest person in the world.

</comment></comment></comment><comment><USER14> Life is too short for c++. That's what I always say (even at job interviews..)

<comment><USER15> There are indeed so many things to learn, but as a developer or someone who would be in the development world (be it building tech startups, developing software, etc) there is a must-know set of tools. C/C++ happens to be very high on the list. And learning more really doesn't hurt.

Not just C++, but also learn C, Java, Perl, Python, Erlang, Lisp, PHP, Shell Scripting, Assembly, Ruby, along with their most used libraries/frameworks. The more diversify your skillets, the better you can use the right tool for the moment, improving performance of that, lower development time. (Eg. A spoon can be used to build a house, but it's hardly the best tool out there).

This way, want to hack up a quick content management or low computational front end system, whip out your php/python/ruby with your favourite framework out. Got a bottleneck at high cpu or memory bound place, rewrite that piece in C/C++. Need to deploy a cross platform app really quickly, Java. Want to bind or write a test for a bunch of tools, use Python or Perl. The list goes on.

Summary: Learn More, use the right tool, do less, get more accomplished.

<comment><USER16> "C/C++" is not a single language, by all means learn C.

<comment><USER15> One should learn both. If you spend the time to learn C, might as well spend a tiny bit more and learn the C++ concepts as well. There are ton of pure C libraries, but a lot of algorithmic stuff in C++ STL/Boost kinds, knowing both C and C++ is essential, each by them selves wouldn't necessarily help one too much.

</comment></comment></comment></comment><comment><USER10> I agree with everything but (1), (5), and (10).

(1) Other languages may be influenced by C++ (especially at a syntactic level, and, superficially, in their object models). But those other languages are far easier to learn and become facile with than C++ is. Point (1) advocates for learning languages in the wrong order.

(5) Templates and generic programming are just tools to mitigate the badness of C++.

(10) Though a majority of the smartest hackers I've worked with know C, a minority of them are C++ developers. And that still leaves plenty of room for smart people who know neither language.

</comment><comment><USER17> "You will hardly be seen as a hacker if you don't know C++"

Yeah right! You are "seen as a hacker" if you write code that is useful to others and/or is brilliant in some respect. Nothing to do with knowing a particular language.

If knowledge of a specific language _is_ a criterion, I'd rather have someone be an expert in C/lisp/smalltalk/haskell/prolog.... C++ originates or embodies no concepts that weren't discovered or done better elsewhere.

e.g: An expert smalltalker is more likely to understand OO than a C++ programmer.

</comment><comment><USER18> > your reputation as a programmer will be lower if you don't know it

I _could_ learn C++, or I could learn Smalltalk, Scheme and Haskell in the same time and mental space.

</comment><comment><USER19> I like to use C++ just as a better C.

Things like single line // comments and not having to declare all your variables at the top of your functions is really useful.

STL is also really useful in that you don't have to (badly) reinvent basic data structures like vectors and maps. Of course, STL also means reading compiler errors that are pages long... :-/

<comment><USER13> C99 has single line // comments. It also has the restrict tag.

About the idea of C++ as a better C, See "C++ - The Forgotten Trojan Horse". ([http://ejohnson.blogs.com/software/2004/11/i_find_c_intere.h...](http://ejohnson.blogs.com/software/2004/11/i_find_c_intere.html))

If you're using C++ for the STL, keep in mind that the ML languages (OCaml, SML) also have compile-time parametric data structures, and they infer and check their usage for you.

They also have a _proper_ module system, so when you change a private variable, you don't have to choose between linking errors or recompiling damn near every piece of C++ code in your source tree.

They're also pretty fast.

<comment><USER6> The ML family of languages is my favorite (second only to C++, natch.) but their brand of parametric polymorphism is equivalent in C++ to MyTemplate<T*> (or, if you like boost, MyTemplate<reference_wrapper<T> > would be more accurate.) They are not the same as MyTemplate<T>. This is by choice of ML language implementors, as they see it as a defect of C++ that every template instantiation has to be compiled independently. Instead, they turn static compile-time polymorphism into run-time dynamism using indirection and function pointers. (Maybe MLton doesn't do this, but I know GHC does.)

It's the difference between C's qsort and C++'s std::sort. The latter blows the former out of the water when sorting small things. This brand of polymorphism is unique to C++ and until someone does it better (which no one seems to have any interest in, except maybe Walter Bright) then C++ will always be "the best C."

<comment><USER13> This is why I said "pretty fast", not necessarily faster than C++. Using ML means trading a small percentage of C++'s raw speed for code that can be debugged, adapted, etc. with much less trouble. I have found this to be a more than reasonable trade-off in virtually all cases.

</comment></comment></comment></comment><comment><USER20> In the context of code sampled, the difference between Java and C++ (and PHP and Javascript and a few others) is trivial and will hardly affect your understanding of the code. These are all part of a family of languages with C-style syntax.

</comment><comment><USER21> When I first started programming, people would say the same kind of things for learning some form of assembly. 10 years from now people will probably be making an article like this for Java and C#.

</comment><comment><USER22> really? with python/ruby/clojure/erlang/lua/js coming up in the world? ... i thought this was going to be a 1991 article.

</comment><comment><USER23> I feel the most compelling reason to use C++ is that it is one of the de facto programming languages in competitions.

<comment><USER13> This is the same reason I drive a NASCAR stock car to work.

Seriously, the defining aspect of most programming competitions is that you're making a program as fast as possible, _whatever it takes_. C++ rewards this: if you keep sinking an order of magnitude more effort into it, you can seemingly always shave off another tenth of a percent of the time. There are some cases in which this is actually relevant (many involving graphic rendering, a niche I work in, PS), but they're really a _tiny_ part of programming.

It makes sense to code them in C++ (or C), but it's really not the best fit for more general development, which usually places a higher priority on being able to deliver an adaptable and correct solution.

</comment></comment><comment><USER24> Didn't we do this discussion already when the last C++ article was posted?

</comment><comment><USER25> Wall Street runs on C++.

</comment><comment><USER26> If you want to be a master of the machine use C/C++; if you want to be a slave use Java; If you want to be a slave of a slave then its C# for you. Simple :)

( Disclaimer : My comments are limited to only the above 'popular' languages in discussion. Also I program purely on *nix, so I am not aware of your other dark or better worlds out there )</comment>