Defensive Bash programming - <AUTHOR> http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/ <comment><USER2> The article mentions so many topics, but misses almost all important ones.

* First of all, use proper quoting. There are so many possibilities for file names, command line arguments, etc. that every unquoted usage of a variable is essentially a security risk.

* Then, start your script with "set -e", which stops the script whenever one of the commands fail, instead of blindly continuing and messing things up. This is the most important option for robust shell scripts.

* Also use "set -u" which makes the script stop on undefined variables. This includes $1, $2, etc., so it provides checks for missing arguments for free.

* In addition to "set -e", also set "set -o pipefail", otherwise a pipe will only break if the last command fails, while with "set -o pipefail" the pipe fails whenever any command of the pipe fails.

* After that, you may continue with spacing issues in "for" loops, and that you should not pipe the "find" output directly (instead, use either "-print0" \+ "xargs -0", or use "-exec"), and similar stuff.

When you got all of this right, and only then!, you may start worrying about the (relatively) minor issues mentioned in the article.

<comment><USER3> Unfortunately, you cannot depend on `set -e` (or `set -o errexit`) to work as expected in all cases. This usually means any non-trivial bash script is forced to do its own manual error handling, e.g. via ` || die`.

[http://mywiki.wooledge.org/BashFAQ/105](http://mywiki.wooledge.org/BashFAQ/105)

<comment><USER4> That's interesting, but I disagree. The cases in the linked article are uncommon. Most of the time set -e does what you want.

And to the examples in that page: I am unconvinced by examples 1, 3, and 4. In (1), it's your business to know what the exit status of let is, and behave accordingly. In (3), you wrote the function f(), so it's your business to make its exit status correct. Similar for (4).

These are unconvincing examples that seem to deliberately walk into minefields.

<comment><USER3> FWIW, I can assure you I did not deliberately walk into minefields while developing my recent bash project, and yet I've struggled with `errexit` and `errtrace` to the point where I've ceased to use them, preferring to just ` || die` everything which may possibly fail. Although you may say that simply choosing to use bash is self-defeating already...

Have you reviewed the examples on this page, linked from the FAQ?

[http://fvue.nl/wiki/Bash:_Error_handling](http://fvue.nl/wiki/Bash:_Error_handling)

<comment><USER4> Respectfully, this is nuts. You consider it a problem with 'set -e' that, if someone runs your script via

      % bash foo.sh

then a '-e' on the shebang line of foo.sh will be ignored. That's a more general issue, separate from -e. You can say users who do that deserve what they get (not unreasonable IMHO), or you can use a 'set -e' within the script. But don't say it's a problem with -e. It's actually a problem with running command interpreters on arbitrary files.

I can't read any more of these examples. I think you need more experience with shell, or maybe we have incommensurate approaches/expectations.

I'm not of the view that using bash/sh in itself is a bad choice. There are lots of problems that it's well-suited for, and I myself use sh scripts a lot (with a linear flow that can go on for hundreds of lines). In particular, I don't think python is a good replacement for my use cases.

<comment><USER3> What are you talking about? Are you reading the same page as me?

Let me quote [http://fvue.nl/wiki/Bash:_Error_handling](http://fvue.nl/wiki/Bash:_Error_handling) Caveat 1:

        #!/bin/bash -e
        echo begin
        (false)
        echo end

Executing the script above gives:

        $ ./caveat1.sh
        begin
        end
        $

This has nothing to do with "ignoring the '-e' on the shebang line."

This is bash ignoring the exit status of the explicit subshell, even though `errexit` is set.

</comment></comment></comment></comment></comment></comment><comment><USER5> The first rule of defensive bash programming should be: quote everything. Incredibly, the article doesn't mention quoting at all, doesn't even use it silently in examples.

<comment><USER6> I always recommend people use zsh for scripting instead of bash--it gets word splitting right. Most of my sysadminny scripts start with #!/bin/zsh these days. It would be really nice if Linux distros came with zsh installed automatically!

For some reason the shell quoting behavior never seems to get brought up when comparing zsh and bash. It is, IMO, the most important distinction between the two shells.

<comment><USER7> As someone who's never used zsh - you don't need to quote stuff in zsh?

<comment><USER6> By default, no. Word splitting only happens when you request it: ${=words}. It reminds me of ,@list in Lisp, which is a warm and fuzzy feeling.

</comment></comment></comment></comment><comment><USER8> Generally, bash is for quick and dirty things I want to automate. I'll go to perl or python if I need anything more complex.

The amount of effort put into these examples is already way higher than my personal sniff test for "Should I be doing this in something besides bash?"

<comment><USER9> That might be chicken-and-egg. By following more rigorous practices, bash might become more acceptable to you for more complex tasks.

<comment><USER10> Nope. The amount of rigor required to sanitize Bash or any other descendant of sh or csh is not worth it. There are problems such as the lack of real return values from functions that no amount of discipline can solve, and the rigor required to solve things like crazy word splitting is too hard to consistently get right.

</comment></comment></comment><comment><USER11> If you do have the choice, the first rule of defensive bash programming is to not program in bash. But otherwise it was a great article.

</comment><comment><USER12> I freaking love "set -x" and wish every language had an equivalent. When I switch from bash to another language I miss "set -x" deep in my soul.

<comment><USER13> ruby [http://unroller.rubyforge.org/](http://unroller.rubyforge.org/) python [https://docs.python.org/2/library/trace.html](https://docs.python.org/2/library/trace.html) perl [http://search.cpan.org/~mjd/Devel- Trace-0.10/Trace.pm](http://search.cpan.org/~mjd/Devel-Trace-0.10/Trace.pm)

</comment></comment><comment><USER14> You can use the pipe | as a continuation at the end of a line. No need to use the backslash escape then. i.e. you never should need to use | \ at the end of a line.

<comment><USER15> Right, this is a style choice. He explicitly mentions '| \' as a bad example.

[https://google- styleguide.googlecode.com/svn/trunk/shell.xml...](https://google- styleguide.googlecode.com/svn/trunk/shell.xml?showone=Pipelines#Pipelines)

</comment></comment><comment><USER16> Defining a function for is_file as [[ -f $blah ]]; seems like defining a function for var++ as increment_one() ...

<comment><USER17> I get why that seems silly, and I write shell all day (for provisioning Vagrant machines where I don't need Puppet. I'm still yet to work Ansible properly...), so I know exactly what that command does.

But to some of my coworkers who don't write shell very often at all, it would make the script far clearer (which is useful as they need to be able to edit it on the fly) to those who don't know shell

<comment><USER18> Encouraging coworkers to learn the proper syntax seems a better choice than hiding it with personally chosen abstractions (albeit more readable).

<comment><USER19> The "proper" syntax is dumb. I've never considered writing functions to get around it, but seeing this makes me want to contribute some builtins to bash.

<comment><USER18> The correct answer. ^^^

</comment></comment></comment></comment></comment><comment><USER20> And yet he pipes from ls...

<comment><USER21> What is wrong with piping `ls`?

<comment><USER22> It's usually redundant. for i in * <\--> for i in `ls`

</comment></comment></comment><comment><USER23> Yes, of course. Use more bashisms, wait for bash to change its behaviour in those bashisms (it already happened and was not that rare) and happy debugging.

<comment><USER24> Given the current glacial pace of bash development?

The problem is that the only other 'standard' shell scripts can rely on is POSIX/Bourne, which is a bit anemic. Back in the days, this was the realm where the Korn shell was supposed to reign. And amongst commercial unices, it actually _did_ help (the license of ksh88/93 prohibited widespread BSD/Linux use). But sadly most of the features that zsh/bash copied or invented themselves concern the UI, not programming capabilities.

I've seen some pretty big programs in ksh93 and it was half-way decent. Then again, quite often you shelled out to awk/grep/ed and had to fight _their_ incompatibilities... I don't really miss those days.

On the other hand, sometimes I wish Linux scripters/programmers would be forced to use a _slightly_ incompatible system now and then so that they don't assume that the whole world is GNU. I'm not misanthropic enough to say that said system should be IBM AIX, though.

<comment><USER23> > the only other 'standard' shell scripts can rely on is POSIX/Bourne

Have you seen POSIX? Have you read Bourne shell documentation? I haven't. The former is expensive, the latter is not that easy to get. I have read Single UNIX Specification, though, which is available on-line.

> But sadly most of the features that zsh/bash copied or invented themselves > concern the UI, not programming capabilities.

Shell is not intended for regular programming. It's intended for small automation scripts. If you need to write anything bigger, choosing shell over Perl, Python or Ruby is a fundamentally bad idea. BTDTGTT.

And do you know how much of SUS-guaranteed shell syntax you use, anyway? Do you know what is a bashism and what is in the specification, so you can claim SUS-compliant shell has too weak language?

<comment><USER25> > Have you seen POSIX? Have you read Bourne shell documentation? I haven't. > The former is expensive, the latter is not that easy to get. I have read > Single UNIX Specification, though, which is available on-line.

What is the distinction you are trying to make?

 _Single UNIX® Specification, Version 4, 2013 Edition_

 _Technically identical to IEEE Std 1003.1, 2013 Edition and ISO /IEC 9945:2009 including ISO/IEC 9945:2009/Cor 1:2013(E), with the addition of X/Open Curses._

[https://www2.opengroup.org/ogsys/catalog/t101](https://www2.opengroup.org/ogsys/catalog/t101)

IEEE Std 1003.1 is also known as POSIX.1. You can read it online. It documents the shell command language. [http://ddg.gg/?q=1003.1-2013](http://ddg.gg/?q=1003.1-2013)

See also the POSIX FAQ: [http://www.opengroup.org/austin/papers/posix_faq.html](http://www.opengroup.org/austin/papers/posix_faq.html)

EDIT: Source to bourne shell's manual is here, [http://minnie.tuhs.org/cgi- bin/utree.pl?file=V7/usr/man/man1...](http://minnie.tuhs.org/cgi- bin/utree.pl?file=V7/usr/man/man1/sh.1)

There's also a PDF version, look in volume 1: [http://plan9.bell- labs.com/7thEdMan/bswv7.html](http://plan9.bell-labs.com/7thEdMan/bswv7.html)

</comment></comment></comment></comment><comment><USER26> I thought that UPPER_CASE variables were a bad idea? Doesn't the bash world generally accept that you should use uppercase only for enviornment variables, and lowercase for variables in the script's context?

<comment> Anthony-G The author specifies using upper case for _global_ variables – not for local variables. I'd consider that to be a useful technique and practice it myself. I also agree with minimising the use of global variables in the first place.

</comment></comment><comment><USER27> Is threesome kind of secret code embedded in the typos?

</comment><comment><USER28> Corporate gateway seems to not like this domain:

This web site ( www.kfirlavi.com ) has been blocked because it has been determined by Web Reputation Filters to be a security threat to your computer or the corporate network. This web site has been associated with malware/spyware. Reputation Score for www.kfirlavi.com: -7.1

Reputation scores can range from -10 (worst) through 10 (best).

<comment><USER29> I can't see anything there that looks troubling. Maybe it was hacked at some point or the domain used to be used for evil before the current owner got it.

Or your corporate filter is having an off day or is just rubbish...</comment></comment>


Microsoft's new 'M' programming language - <AUTHOR> http://thecoffeedesk.com/news/index.php/archives/74 <comment><USER2> So you are imagining what this language is and then complaining about it?</comment>


The Baloney Detection Kit: Carl Sagan's Rules for Critical Thinking - <AUTHOR> https://www.brainpickings.org/2014/01/03/baloney-detection-kit-carl-sagan/ <comment><USER2> I read the Demon Haunted World by mistake a long time ago and it really challenged my belief system at the time. But then little by little it won me over.

Not without damage in the form of missed education opportunities, I managed to overcome a lot of the bullshit magical thinking that had managed to cloud my thoughts in my teens and early 20s.

It's interesting to me, just today I've been respectfully challenging a friend for their belief in some or other Covid conspiracy. After some introspection, I realised that the ire this raised in me and which I was directing at my friend, was actually anger at my young self for the years "lost" in the form of education not pursued.

What a day.

<comment><AUTHOR> Thanks for sharing. Sagan's work has also had a profound impact on my life. I miss him and his wisdom terribly.

</comment></comment><comment><USER3> 'Arguments from authority carry little weight — "authorities" have made mistakes in the past. They will do so again in the future. Perhaps a better way to say it is that in science there are no authorities; at most, there are experts.'

It'd be interesting to see what is left after applying this consistently to scientific announcements. E.g. much of the pro climate change arguments I see are: all the scientists think it is happening, so it must be happening. Not saying they are wrong, but why should only science get a pass when it comes to argument from authority?

Science is not the only field with experts, and it's hard to argue that only scientific expertise is real expertise without going in circles (which requires an expert in philosophy to avoid ;).

<comment><USER4> We put our faith in the scientific institution. (And if we are religious, political or etc, we put our faith in the appropriate institution for that too.)

Fact is, virtually all knowledge about what lies beyond our personal sight and understanding is authority-based.

Maybe that's unavoidable.

The key feature of science could be said to be the institution of the rule that, to be considered truly high-quality, a model must have a strong experimental reference.

Or you could say that the key feature of science is that we get such high- quality models that experimental reference is unnecessary. Which is a little scary. It's like we're just creating a more-airtight dogma.

(Wow, they're actually downvoting you.)

<comment><USER5> I've noticed a fairly big distinction in what I learned as science and the philosophy of science as it was practiced up until around the last 20 years or so and now.

Science was based on rigorous falsification. Scientists actively tried to prove themselves and other scientists wrong. Science has always been more about, 'well we know it's not all of these things, so it's probably that until we prove that wrong too'.

Sometime in the last couple decades, it's stopped being like that. Instead it's, 'my models and data say this, so it is this and everything else is wrong'.

Science at this point is really only authority driven because journals and even governments charge exorbitant prices for access to them, cutting out a vast majority of the population from actually partaking in any part of the scientific process.

When all you get is contradictory news reports on a handful of selected research from journalists that barely understand what they're reading, you're going to be stuck with an elitist authority driven system.

There's zero reason for this in todays world other than control and profit. Even within the scientific community, there's 'caste' systems, financial guardianship and other such barriers, keeping again, many people from learning and partaking.

Science isn't hard, it isn't magic, it's a systematic way of looking at the world through observation and falsification. That is all science is. Anyone can do science. I've taken groups of kids, volunteers and many people and in short time, taught them to do science.

It's just people don't really get taught to do this. It's easier to control a population that's trickled information through 'authoritative' sources than it is one that's educated and capable of thinking for themselves.

This is stuff I was literally taught in school, by other scientists. Like, we were actually taught that most people need to be given only the information they need to know, because essentially they're too dumb to understand and scientists should just run things in the world. I'm not making this up, we were actually told this by several of our professors.

<comment><USER6> Science was never purely driven by falsification, or authority or anything. It was actually never pure, it was always driven by an equivalent of "hey, it works on my machine" and proven by successful application in some engineering or other practical discipline.

That broke since the late 20th century because science got much broader than any possible application.

<comment><USER5> I agree with that to an extent too. Actually, the whole history behind the modern scientific method and the various competing philosophies behind science over the centuries is pretty amazing and I recommend anyone that's interested to start here:

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

And go on to.read the referenced papers by Kuhn and others. There's a lifetime's worth of stuff to be studied there.

The thing is, much of our modern scientific progress has been through following these principles

>1\. that there is an objective reality shared by all rational observers

>2\. that this objective reality is governed by natural laws

>3\. that reality can be discovered by means of systematic observation and experimentation

>4\. that Nature has uniformity of laws and most if not all things in nature must have at least a natural cause

>5\. that experimental procedures will be done satisfactorily without any deliberate or unintentional mistakes that will influence the results

>6\. that experimenters won't be significantly biased by their presumptions

>7\. that random sampling is representative of the entire population

The main issues I see these days fall around 5, 6 and to a lesser extent 7. Agenda driven, ego based research is prevalent in a lot of fields these days, tied directly into that authoritarian mind set. Scientists must be correct, the people funding their research must get the results they desire and to bring 7 in their, sampling will be done to skew results to that effect.

I've witnessed this first hand on projects where industry would have been impacted by results. In the case of one project, tens of thousands of dollars were spent mitigating absolutely nothing, while the actual issue was ignored because that would have cut into profits of the largest company in the community. I had a water sampling cup in my hand still, when they told us to stop and sample elsewhere after we found pH spikes suspiciously near some runoff. Those high pH samples never made it into the report.

In the case of my own project, our results would have impacted an active mine, so we were told by government not publicly release our results, under threat of loss of funding.

This type of bullshit occurs in every field of science. This type of bullshit is why authority driven science is not real science and is holding back human progress and honestly, puts the entire human race and much of life on Earth's continued existence at risk.

<comment><USER7> And perhaps

\- that it is possible for humans and/or machines to understand and/or describe said natural laws

\- that it is a good idea to attempt to do so

(e.g. scientific progress could lead to technology that eventually makes it impossible for anything to live on the Earth)</comment></comment></comment></comment></comment></comment>


Tell HN: iPhone app update approved in less than 6 hrs on a Sunday - <AUTHOR>

I submitted an update for one of my iPhone apps this afternoon, probably after 1:00pm. I just noticed it has been approved and is now available for sale, less than 6 hrs later. It was a pretty big update that I did not think would be available until after the holidays so I'm a little shocked. Has this happened to anyone else? Does it maybe have something to do with the holiday break that's coming up? <comment><USER2> Apps appeared to go through very quickly last year just after the store reopened, I think this is probably down to most businesses have been organized enough to submit well in advance of xmas, so it just leaves the indies who are submitting either side of the store shut down

</comment><comment><USER3> My first submission went in on a friday aft (5pm-ish) and was approved tuesday morning. This was maybe 5 months ago.

I had expected much longer given the horror stories but I suspect they just shout a bit louder.

</comment><comment><USER4> I had a first time approval come through this Saturday. It was only 2 - 3 days after it was submitted. I did think that was pretty fast.</comment>


Wikipedia's new apps are even better for the developing world - <AUTHOR> http://gigaom.com/2014/08/01/wikipedias-new-apps-are-good-for-you-but-theyre-even-better-for-the-developing-world/

<comment><USER2> As much as I like the idea, this is somehow against net neutrality. I have trouble to make my mind about it.</comment>


The New Lenovo ThinkPad TrackPoint Keyboard II - <AUTHOR> https://www.lenovo.com/us/en/accessories-and-monitors/new-arrivals/KBD-BO-TrackPoint-KBD-US-Eng/p/4Y40X49493 <comment><USER2> For some inscrutable reason, this doesn't allow for wired use -- the USB wired connection is only used for charging. "For the love of God, WHY?!" etc.

I have the previous edition of this (both bluetooth and wire) and they're great. Yes, I bought the wired one shortly after I realised the above design decision.

Bounty paid for one of these, though. [https://deskthority.net/viewtopic.php?t=12329](https://deskthority.net/viewtopic.php?t=12329)

<comment><USER3> I have a few thinkpad keyboards lying around. The older or used ones are inexpensive and easy to get. It has occurred to me to wonder if an adapter could be fabricated to connect keyboard's tiny internal ribbon connecter to USB or PS2. I guess this guy made one for a standalone trackpoint:

[https://github.com/feklee/usb-trackpoint](https://github.com/feklee/usb- trackpoint)

which is an awesome idea, and also something I wish I could just buy.

So maybe a cheap pcb could be designed to connect the whole keyboard; build your own case. I'm picturing something CNC milled out of some classy hardwood.

I know I would pay for the board if it already existed, and I am convinced there is an opportunity here. I guess maybe I should bite the bullet and finally get around to learning some simple pcb design tools, but I wish someone would just scoop the idea :)

</comment></comment><comment><USER4> I can't justify $99 because the battery will eventually wear out and end up in the trash bin. Stop making throw away garbage!

</comment><comment><USER5> I've got the previous version of this and have been very happy with it. I may upgrade as this has a usbc port.

</comment><comment><USER6> Is there any justification for putting the left control anywhere but bottom left?</comment>


Ask HN: What technology/APIs do banks use to read and process cheques? - <AUTHOR>

Hi guys,
I've done some assorted googling on terms like "bank image processing API", "image processing API", "bank cheque reader" and so on...
Unfortunately, I haven't found a satisfactory answer. Has anyone here developed using a tool like this, or know anything about it? I'd love to know how this works because: A. I think the technology is fascinating and has the potential to be utilized in a variety of applications B. I've recently gotten into bowling, and would love to build a simple app that lets you take pictures (or scan) your bowling score and do some fancy stuff with it (of all the uses, this is what I want to do... ;)
Thanks! <comment><USER2> I don't know much about check processing but I used to work for the company that built the system the USPS uses to read addresses on envelopes (both machine printed and hand-written). Many years of research and development went into that system financed either directly by USPS funding to academia or through performance improvement contracts with industry. Over 10-20 years the systems went from being able to read only a fraction of the mail to the point where today they have practically replaced manual address keying.

There is probably a similar story behind check reading systems.

My impression is that although there are a number of commercially available OCR applications their performance is far from that of specialized proprietary systems such as those used by the USPS and banks.</comment>


Smoothie Charts: a small javascript charting library for live streaming data - <AUTHOR> http://smoothiecharts.org/ <comment><USER2> Nice, but beware that this kind of thing can be quite resource intensive (the triple chart demo takes over 60% of CPU on Chrome running on a netbook).

I was also wondering why this is done with canvas rather than SVG.

<comment><USER3> (I'm the author)

An initial version of SmoothieCharts used SVG, but I switched to Canvas because I got slightly better performance (which actually surprised me).

That's not strictly true - for very large charts, the SVG ones performed better, but I optimized for the common case.

Recently I've been experimenting with a WebGL version - it gives MUCH better performance than both Canvas (2D) and SVG, but only works on the most recent browsers.

<comment><USER4> Cool-- please do release the webgl one, if you finish it.

</comment></comment></comment><comment><USER5> Nice; animated transitions are great for maintaining continuity when data is changing. Handling changes in the y-scale can be another source of distraction, so it's nice if you're able to fix the domain (as [0,1] in your example).

In January, I wrote a tutorial on how to implement this sort of real-time graph in D3.js, using transform transitions. (Don't get distracted by the top example; it's intentionally wonky.)

<http://bost.ocks.org/mike/path/>

</comment><comment><USER6> I was pleasantly surprised this worked fine on my 3DS. No "script execution taking too long", no "page content too large".

It's nice that not everything requires jQuery these days.

</comment><comment><USER7> This library is very interesting. I have been working on an MVP for my startup that pushes and receives live data over a websockets. So far we have been unimpressed with most of the current libraries out there. The important thing is responsiveness, especially on mobile browsers.

I am currently using <http://rgraph.net> and redrawing the graph every so often to get the live feel. I would like to know how your graph performs compared to rgraph?

</comment><comment><USER8> i replied in an earlier thread about smooth.js, an interpolation library, about how it was something i was looking for a week ago.

really, that was only a small part of the problem. what i was actually looking for, was a small charting library for live streaming data. thanks!

</comment><comment><USER9> Looks neat. What about browsers support ? Can you use it from IE8 ?

<comment><AUTHOR> It works on Chrome, FF and Opera. It doesn't seem to work on ie8/9 (maybe canvas issues).

<comment><USER9> I think IE8 doesn't have the canvas element.

<comment><USER10> Explorercanvas will help you out here. I am not sure if it can keep up, but it performs very well. <http://code.google.com/p/explorercanvas/>

<comment><AUTHOR> Just tried it, renders nicely but it doesn't animate.

</comment></comment></comment></comment></comment><comment><USER11> Lovely stuff sir. Thanks for sharing.

</comment><comment><USER12> What advantage does this have over flot?</comment>


9-year-old created a portrait with 750 Rubik's Cubes. His 'superpower' helped - <AUTHOR> https://www.cnn.com/2020/01/18/us/dyslexia-rubiks-cube-john-cena-trnd/index.html <comment><AUTHOR> Nice work, kid.

 _"Dyslexic brains are very different. The right side is really strong, so they can be very artistic, very musical. I truly believe that he has this amazing ability because of dyslexia," (said his mother)._</comment>


License-To-Kill Policing to Get a Trial Run in Rio de Janeiro - <AUTHOR> https://www.bloombergquint.com/law-and-policy/license-to-kill-policing-to-get-a-trial-run-in-rio-de-janeiro <comment><USER3> Lol this is nothing new in Brazil. Police have been killing homeless and criminals since forever. Doesn't work. Its a society of desperation, poverty and life is cheap.

</comment><comment><USER4> So in other words Death squads - that level of escalation certainly won't end well at all for anyone quarter-decent. It will certainly lead to a self fulfilling prophecy - everyone with a rifle will be out to kill them, a rich opportunity for organized crime to go plata o pluma, and provoke counterattacks - including on softer targets like families.

<comment><AUTHOR> >> _and provoke counterattacks - including on softer targets like families._

Snipers are protected, no one knows their identity, they kill from 800m. Will they target Ministers as retaliation? Maybe the top gang leaders have that ability but the rest will go as cannon fodder.

Essentially Brazil made gun possession a capital punishment and two people from 800m away, judge, jury and executioner.

<comment><USER4> Unfortunately history shows that angry humans don't generally care that much about accuracy with their revenge as opposed to the first soft target.

From the scapegoating of millers by peasants partially because complaining about the ones actually taking advantage of them (clergy and nobility) would get you burnt at the stake or decapitated respectively (not to mention being disliked by both of the previous two for not fitting into the 'natural social order' of the castes).

The Bath School Disaster attack was a farmer who killed his family and blew up a school he blamed for causing his farm to face repossession - when the dynamite he used in the attack alone could have been sold to provide for the payment. The schoolchildren had no part in his misfortune - even given inability to take responsibility or think ahead people actually involved with tax policy would make far more sense.

Kent State had radicalized some into planning to bomb a ROTC dance in retaliation but they blew up their own loft building the bombs - the sad thing was that the planned plot actually still is /precise/ in terms of terrorists out for revenge.

Common actual stations just make things ten times worse - Vietnam Veterans got tarred as baby killers over My Lai. It is a phenomenon I have noticed, a twisted form of reputational 'karma' that injustice begets injustice - <USER2> always but often. By refusing to make an appropriate example of egregious murderers they left the entire force tarnished in reputation. Mere Vietnamese propaganda or dirty guerilla tricks didn't burn in the reputation like the incident.

This phenomenon isn't always right or wrong in itself (or possibly a matter for debate) but regardless is the consequences of past actions. A toddler sticking a fork into an electrical outlet and an assassin pricking themselves with a poisoned weapon both would die as a result of their actions but the justice, morality, and fault of the situations are antonyms.

</comment></comment></comment><comment><USER5> I'm surprised there is not more news coverage about this in the US. This seems like a dream example to promote on both sides of us politics.

</comment><comment><USER6> Seems like there will be no reason for the bad guys _not_ to shoot at law enforcement anymore.</comment>


Protocol for Asynchronous, Reliable, Secure and Efficient Consensus [pdf] - <AUTHOR> http://docs.maidsafe.net/Whitepapers/pdf/PARSEC.pdf <comment><USER2> Blockchains have been getting the lions share of attention for several years. PARSEC enabled networks, SAFE (MAIDSAFE) in particular, could change that. Blockchains have been battling energy usage, centralization and speed for awhile. Non-blockchain consensus should really open a lot of doors to allow decentralized, trustless, non-censorable solutions.

It will be interesting to see what other networks besides SAFE adopt this consensus mechanism.

</comment><comment><USER3> Without proof-of-work, what protects consenus from the sybil attack?

As I understood, after quick scan of the paper, consensus is achieved by simple majority vote.

So if I setup 10,000 docker containers running malicious nodes, I could take over the network and forge any blocks I want.

What I am missing?

<comment><USER4> They mention 1/3 of the nodes. How much of a weakness is this?

<comment><USER5> How does that prevent me from pretending to be any number of nodes I want; including, but by no means limited to, over 1/3 of the nodes? (Maybe you should first do a quick search to learn what a Sybil attack actually is?) They can shore this up by having some kind of Sybil attack prevention elsewhere, but given their statements about proof-of-work here it seems unlikely they would, for example, add proof-of-work elsewhere. It might be, based on skimming some blog post I found if theirs, that the goal of this is to help them shore up a proof-of-stake algorithm to deal with byzantine failures? That would be interesting, but is a more involved scheme then than just this part, and I actually don't think that is what they are doing either (as the connection in that blog post is mostly me reaching for something that works, not a direct connection made by the authors).

<comment><USER6> For SAFE Network, this is handled, I believe. Other networks that implement PARSEC will need to address it in some similar way.

In the case of SAFE, you can generate as many nodes as you want, but they must be valid nodes (doing the work that the network asks of them) for a long time before being promoted to a status that allows them to participate in consensus of a section. Any misbehavior on their part results in demotion or failure to be promoted. So each node would need to be a legitimate contributor to the network, with all that that entails, before being promoted to a status where their later misbehavior would matter. You would be creating real nodes, that used real bandwidth and real CPU resources and did real work that benefits the network, in order to infiltrate your evil nodes into the network. So, not an insubstantial cost to you.

Your nodes will be assigned into sections randomly, so it will be very difficult for you to manage to get multiple nodes with voting status, into a single section, and staggeringly difficult to get enough such that your nodes constitute 1/3rd of that section. Of course, exactly how difficult depends on network size (number of sections).

Finally, even once a node is assigned into a particular section, it will be reassigned to another random section at some interval, further decreasing your ability to take over a particular section.

<comment><USER7> > Finally, even once a node is assigned into a particular section, it will be > reassigned to another random section at some interval, further decreasing > your ability to take over a particular section.

Doesn't that on the flipside also mean that given enough time your malicious nodes will end up in the same section, allowing for a take over of that section?

<comment><USER8> As the network grows it becomes increasingly harder to do so, especially since you need to add increasing amounts of resources (bandwidth, disk space, and some cpu, for the proof-of-resource) to your attack.

This is not too dissimilar to what happens with CPU-only PoW consensus networks. Easy to attack in the beginning but less so as the network grows.

It will be interesting to see how the SAFE network will be bootstrapped. I'm sure there will be a significant number of malicious players waiting in line to disrupt it early on.

If it works, and I believe it can, IMHO this network will be one of the most important developments in decentralised systems in the past decade.

</comment></comment></comment></comment></comment></comment><comment><USER7> Nice! I found Hashgraph very interesting, but their patent stance made it a no-go for any serious DLT project. Glad that there is now a similar project without the attached patent! Let's just hope that it's not so similar that it falls under the original one.

Still need to dig deeper into it, and would love to hear other peoples' evaluations, but at a first glance, PARSEC could actually be a serious player in the DLT game.

<comment><USER9> Boom! Nailed it. As much as I love the hashgraph tech, it is not pure both with respect to the patent AND the few dozen 'overseers' (or whatever they will be called) that they will have in place. They really need to have an opensource concept. I warned the Swirlds team that their tech will be knocked off--patent or no patent--so they better get big dominance fast!!

</comment></comment><comment><USER10> A good point from the forum. "Now PARSEC won't be used in SAFE to let the entire network communicate and come into global consensus like for example Bitcoin does, instead PARSEC will be used by many small sections of the network to reach "local" consensus for the corresponding section of the network. The obvious attack vector here is to join one section with many nodes of your own to hijack that particular section. The idea is to make this attack infeasible by having the network occasionally relocate nodes (when they age/rank up), so an attacker doesn't have control over in what sections of the network its nodes are located. If this idea works as well in practice as it does in theory, attacking a section is about as hard as attacking the entire network (all the sections)."

So proof-of-work is inherently resistant to sybil attacks while PARSEC on its own isn't, so to tell the story properly the random but deterministic relocating of nodes needs to be included.

</comment><comment><USER11> I always felt that blockchain is a precursor technology like "Web 2.0", which laid the technical foundations (of Web APIs and micro-services) that enabled the explosion of mobile apps that followed.

If smarter people than me can mathematically verify the PARSEC algorithm as valid, it may lead the way for a radical change to the way information is propagated, secured and validated.

<comment><AUTHOR> Yes, I'm also looking forward to what the crypto engineering community has to say about this algo after it has been peer-reviewed more often. If it holds the promises then it will would be VERY huge.

</comment></comment><comment><USER12> No noises from the big names in crypto yet. I guess many are carefully going through it and preparing their questions and concerns. Peer-review can't come quickly enough. I can't wait to see how the world responds to this. Have MaidSafe really managed to pull this off?! I mean, WOW, if they have! Fingers crossed.

</comment><comment><USER10> Interesting to see PARSEC mentioned in this topical piece. [https://news.bitcoin.com/proof-of-work-coins-on-high- alert-f...](https://news.bitcoin.com/proof-of-work-coins-on-high-alert- following-spate-of-51-attacks/)

</comment><comment><USER13> Medium article that goes with the release: [https://medium.com/safenetwork/parsec-a-paradigm-shift- for-a...](https://medium.com/safenetwork/parsec-a-paradigm-shift-for- asynchronous-and-permissionless-consensus-e312d721f9d8)

</comment><comment><USER14> Refreshing to see a maidsafe submission here on HN.</comment>


MySQL bug, open for 13 years and counting - <AUTHOR> https://bugs.mysql.com/bug.php?id=199 <comment><USER2> You can point to any product (such as Chrome or Android) and there are a huge number of serious bugs that have not been fixed for over 10 years.

In this case, it is a bug that will only affect people who make certain assumptions. One comment sums it up:

"This 'bug' fundamentally breaks basic assumptions about how AUTO_INCREMENT generally works"

I think there's your problem: making assumptions about how AUTO_INCREMENT works. The documentation doesn't say anywhere that it is guaranteed to never use a deleted key again.

<comment><AUTHOR> I found it surprising that such a serious bug is still not fixed. But what you told makes sense.

<comment><USER2> I guess it depends what your definition of "serious" is. This doesn't sound like it would ever affect me.

As far as I can tell, it will only cause problems if you don't delete entries from other tables that have a foreign key pointing to that row. There may be some cases where you need to do that, but generally isn't it better to properly delete all the rows from other tables that use that foreign key when you delete the primary key?</comment></comment></comment>


Payment Gateway suggestions - <AUTHOR>

Payment Gateway suggestions for sending out Mass Payments(other than Paypal) in the US <comment><USER2> <https://www.wepay.com/></comment>


Why I'm So Tired - <AUTHOR> http://www.stanford.edu/~dement/tired.html

<comment><USER2> Ugh. This data is somewhat obnoxiously wrong.

\- The federal gov't employs ~2.8 million people, not 29 million [1].

\- State and local gov'ts employ ~17 million, half of which are education (a little ~6 million are elementary and secondary) [2].

\- Let me also note that the topline figure is about ~150 million jobs [1]. I have no idea where he cuts out the retired and young from.

Very quippy; very tantalizing to ideologues; very empirically inaccurate.

Ugh.

[1] <http://www.bls.gov/emp/ep_table_201.htm> [2] <http://www2.census.gov/govs/apes/10stlus.txt>

</comment><comment><USER3> Cute. But I would like to see a dynamically updating breakdown of all countries, for comparison, of all this data. Sadly, what governments publish may not be factual.

</comment><comment><USER4> Old... US population is at 307 million now... but still interesting.

</comment><comment><USER5> This brings me back to 1997...</comment>


SOLID design principles in C++: Open Closed Principle - <AUTHOR> http://www.vishalchovatiya.com/open-closed-principle-in-cpp-solid-as-a-rock/ <comment><USER2> I hate the SOLID principles. Especially that they're called principles when they should've been called design patterns at best. In our era of multi- paradigm software engineering OOP is nothing but a tool among others for structuring a program.

Designing all classes in your software to be "extensible in the future for new business requirements" is such a useless (and in most cases, harmful) goal. The number of classes and interfaces should be kept to a possible minimum. In fact, the number of lines should be kept to a reasonable minimum. Rewriting code is good. Refactoring classes to be more generalized (when it actually is needed) is good.

These so-called principles are such newbie traps and they go against the only principle in software engineering, the only law of the land that I recognize: your code should be simple and readable.

<comment><USER3> Your typical factory pattern is an example of the OCP; move the part that changes into its own class (a factory). The class that uses the factory is closed to changes, but open to extension (new factory types).

Perhaps it's not the SOLID principles that are bad, but they way you've seen them used? More important than the principles is how they're interpreted and implemented, I think.

</comment></comment><comment><USER4> Benefits of Open Closed Principle

\- Extensibility: Not true, unless you solve the expression problem either you pay while adding new types, or you pay while adding new functions

\- Maintainability: Not true, dressing code in layers of indirection is a recipe for unmaintainable code due to spaghetti control flow

\- Flexibility: At one point, you can't shove an accretive development model through the door, it's just too clunky and won't fit.

Also all those patterns that keep being mentioned (Factory ew) just highlight deficiencies in the programming language.

</comment><comment><USER5> Is it me, or is the recommendation of adding a level of abstraction less readable than the "bad" example using "by_size_and_color?" Additionally, another example of a developer coming in and making it more extensible when that is not the requirement 80% of the time.

Full disclosure, I'm not a professional C++ developer. I haven't touched the language in 20 years. However, I've attempted to keep up with its development since my hobby game development years in my teens.

<comment><USER4> It's overengineering for sure (or architecture astronauting).

</comment></comment><comment><USER6> Why not use enums and or bit wise operation to represent filters? Templates, categories and custom operators seem a bit too much to do simple bit logic.

</comment><comment><USER7> It would seem to make more sense to let the selection functional be a lambda. Neither the original code nor the resulting code are really all that great... It merely exchanges one form of code duplication for another. Nor is the Open Closed Principle in general all that great, as other comments are also noticing.</comment>


Mailplane preview integrates Rapportive - <AUTHOR> http://mailplaneapp.com/download/preview/

<comment><USER2> I have no idea how i lived without mailplane (drag & drop attachments, copy and paste images, growl notifcations) and also have no idea how i'd live without the data rapportive brings to the party.

<comment><USER3> If you dig Mailplane and have an iPhone, check out Mailroom: <http://itunes.apple.com/us/app/mailroom/id355023563>

We've been inspired by (and are also addicts of Mailplane) but hated Mail.app, so we started enhancing Gmail's Mobile UI.

<comment><USER4> Alex, how does your search on Mailroom compare to Remail? I loved Remail's wicked fast search on my iphone.

<comment><USER2> the gmail iphone web search is awesome, mailroom uses that.

<comment><USER3> indeed, we're wrapping the webkit UI of gmail mobile, which has standard gmail search baked right in. Our app lets you easily switch between multiple gmail and google for your domain accounts, gives you access to your iPhone's native address book, offline support, and a few other goodies...and there's a lot more in our development pipeline.

the entire feature process is similar to mailplane though: we look at mobile gmail and say "how could we take whats already there and make it beter" or "what's missing and how can we add it"?

Big upcoming features include things like HTML email reading and the ability to add attachments, both major features missing from Gmail Mobile.

</comment></comment></comment></comment></comment><comment><USER5> You can also add Rapportive as a UserScript to a Fluid.app instance of Gmail.

</comment><comment><USER6> I don't really understand; what's so special about Mailplane? It's just an email client right? What can it do that Mail.app or Outlook hooked up to your gmail account can't?

I must be missing something.

<comment><USER7> It can use Gmail's search features. (IMAP doesn't do that nearly as well.)

</comment></comment><comment><USER8> This may sound like heresy but I always find gmail search -- when I'm looking for something in the subject or sender -- to be a bit slow compared to search in a local mail tool like Thunderbird or Evolution or Mail.app.

If I need to search entire message bodies gmail is of course much faster, but often sender/subject search is all I need.

</comment><comment><USER9> I love Mailplane. I'm still looking for a solution this good for Windows/Linux.

<comment><AUTHOR> +1 for Mailplane for Windows</comment></comment>


Blink tag removed from Firefox - <AUTHOR> https://www.mozilla.org/en-US/firefox/23.0/releasenotes <comment><USER2> All snark aside, I wonder what the rationale was for doing this. It'd be a shame to load a website in a browser 20 years from now, only to see the site render incorrectly due to no-longer-implemented tags. Next, ?

It's tough, obviously, because we can't have cruft build up all over. But this seems like a fairly straightforward case that a browser could shim out in JavaScript by default. Blink is a pretty straightforward piece of internet history. It's not like <applet>, which, while also a piece of history, actually carries legitimate complexity/security risks.

<comment><USER3> Gecko was, afaik, the last major browser engine that supported <blink>. Chrome and IE don't, at least. Opera won't, after switching to, ironically enough, the engine called Blink.

So it's not exactly the same as removing : Other browsers already didn't support it.

<comment><USER4> Oddly enough Chrome/Blink still has the String.prototype.blink method to create a blink tag from a string. If I recall correctly it's actually part of an ES (not DOM) standard.

<comment><USER5> Wow. Because this surprised me so much, I just found out that if you open up a node REPL and type 'hello'.blink() you get '<blink>Hello</blink>' returned. So I guess it's an ES thing and it boggles my mind.

I was trying to find the ES standard where it's specified but I'll settle for this[1] instead. Interestingly enough you have quite a few HTML wrapping functions as part of the spec.

[1]: [http://javascript.spec.whatwg.org/#string.prototype.blink](http://javascript.spec.whatwg.org/#string.prototype.blink)

<comment><USER6> What could possibly be the use of that.

<comment><USER7>

That would make a blinking red dot. It'd be good for status lights, I guess.

</comment></comment></comment></comment></comment></comment><comment><USER8> This one might be a bit more important....

"Enable JavaScript" preference checkbox has been removed and user-set values will be reset to the default

<comment><USER9> The people that disable javascript either do it by accident and then stop using the browser or are nerdy enough to figure out how to turn off javascript in the configs. Javascript will also be configurable using plugins.

<comment><USER8> Yeah, they're trying to remove the settings that people set to goof up their browsers from the look of this. There's this one, too:

"Load images automatically" and Always show the tab bar" checkboxes removed from preferences and reset to defaults

<comment><USER10> Let this day go down in history as the day we declared our independence from the tyrannical Mozilla organization and their corporate-interest driven and oppressive removal of our freedoms and ability to customize our browser. We shall not be stricken down by their restrictive and non-representational releases of firefox... instead we choose to be empowered by the option to disable things such as javascript, and tabbed browsing because we understand these options to be self-evident truths for all browser users.

I am tired of having my freedoms stripped from my browser without any representation into the process. As a user of the browser I was not adequately informed of the upcoming changes nor was I given an opportunity to choose not to upgrade.

THIS MUST END

Contact me for further information, the revolution begins today.

<comment><USER11> there's bugs for each of these (which are open to the world and anyone can comment) all you have to do is to take a stance during the process. harder to do so after a bunch of various people (employed or not by mozilla) decided something.

pretty sure those options went off because enough people decided that the preferences/option panel was too complicated and these were the ones that telemetry indicated were the least used.

<comment><USER12> I would not be at all surprised if there was a high correlation between "People who turned off Javascript" and "People who declined to provide telemetry", so there could be some selection bias in those results.

<comment><USER13> People who understand what that setting did can still disable by going to about:config!

This is not a conspiracy, just making browser hard to break for people who check boxes and forget about these. For those, browser is broken!

Those who know what disabling JavaScript actually does still have a way to disable! Where does all the privacy talk come in between?

<comment><USER8> NoScript is a much better option all around. I know I've been using it since forever.

When I got my last company laptop without all these things set, I was surprised how painful it was to try and download anything without a proper adblocker and noscript. I don't know how people do it.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> What a fitting farewell. If you check the source, the item is wrapped in the old blink tag.

`<blink>Dropped blink effect from text-decoration: blink; and completely removed <blink> element </blink>`

Start up firefox and give it a nice sendoff.

</comment><comment><USER15> Aww, man. I love using <blink> (in FF) and <marquee> (in Chrome) when giving presentations, they're such crowd pleasers. At least Chrome still has <marquee>, I used it in a talk just 2 days ago. Hope they don't follow FF's lead.

<comment><USER16> Both of these effects can be recreated quite easily using CSS3 animations, by the way.

<comment><USER17> Plug: I wrote a JS lib that can be used to create a CSS3 <marquee> (please use sparingly): [http://lukifer.github.com/HoverForMore.js](http://lukifer.github.com/HoverForMore.js)

<comment><USER18> This creates some really nasty glitching when you hover over the text that scrolls in Safari 6.0.5

<comment><USER17> So it does. Strangely, the small example is unaffected. Thanks, I'll look into it.

</comment></comment></comment></comment></comment><comment><USER19> Fare well old <blink> friend. My high school memories of webrings would not be the same without you.

</comment><comment><USER20> Quite fitting that the <blink> tag originated with the Netscape browser[1] and now is removed in its descendant Firefox.

The idea was first discussed at a bar in Mountain View, CA.

[1] [http://www.montulli.org/theoriginofthe%3Cblink%3Etag](http://www.montulli.org/theoriginofthe%3Cblink%3Etag)

</comment><comment><USER21> It was as if millions of geocities sites suddenly cried out in terror and were suddenly silenced.

</comment><comment><USER22> | Their tags shall blink until the end of days.

from The Book of Mozilla, 12:10

</comment><comment><USER23> how about organizing a campaign to hire some protesters in front of mozillas office to bring it back?

( [http://www.vice.com/read/its-now-possible-to-hire-fake- prote...](http://www.vice.com/read/its-now-possible-to-hire-fake- protesters?utm_source=vicefbus) )

</comment><comment><USER24> What's neocities.org going to use now?

<comment><USER25> [http://stackoverflow.com/questions/13955163/imitating-a- blin...](http://stackoverflow.com/questions/13955163/imitating-a-blink-tag- with-css3-animations)

</comment></comment><comment><USER26> I found BLINK and MARQUEE so infuriating irritant that I used to binary patch them out in the browser executable. This was before the era of signed executables.

</comment><comment><USER27> Also worth noting: "New feature in toolbox: Network Monitor".

The lack of it was the last thing that was keeping me using Firebug.

</comment><comment><USER28> I wonder what abused tags today we will have a moment of silence for 10 years from now?

<comment><USER29>
...

<comment><USER30> How else would you display data?

<comment><USER29> You're right, everything else I can think of is worse for data, tables are pretty good for that (minus the weird vertical centering thing that sometimes happens in cells.)

But seeing tables being used for layout annoys me far more than the blink tag.

<comment><USER31> > But seeing tables being used for layout annoys me far more than the blink > tag.

How come? CSS positioning is pretty unintuitive, and sometimes it's just easier to get something working with tables. If the end results look fine, what's the problem? Table-based layouts aren't in-your-face like the blink tag was.

Oh, and don't view-source on HN ;)

<comment><USER29> My problems are mostly how easy it is to get lost if you're dealing with nested tables within tables (especially inside templates), and that they have to be completely read before rendering... although that may no longer necessarily be an issue with modern browsers.

I find divs and spans easier myself but I guess, yeah, at the end of the day if it looks fine and it loads fine then it's fine. Too much pain from hand- coding too many tables has made me twitchy and curmudgeonly.

 _Oh, and don 't view-source on HN ;)_

Oh, i'm aware... It's just too bad html doesn't provide elements that handle nested lists. If only. Ah well.

<comment><USER32> Isn't

 <///> Valid?

<comment><USER29> Yes, i was being sarcastic.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER33> I love the fact that in the release notes page, they used a <blink> tag around the message "Dropped blink effect from text-decoration: blink; and completely removed <blink> element".

</comment><comment><USER34> Don't worry, we still have the Web 2.1 version:

[http://cheese.blartwendo.com/web21-demo.html](http://cheese.blartwendo.com/web21-demo.html)

;)

</comment><comment><USER35> Mozilla didn't want to be responsible for causing seizures

</comment><comment><USER36> Thanks god for the upcoming support of custom html tags.

</comment><comment><USER37> Well, geocities will never look the same again.

</comment><comment><USER38> Damn, I seriously thought about posting this :)

</comment><comment><USER39> RIP</comment>


Virgin Australia administrators agree to sell airline to Bain Capital - <AUTHOR> https://www.theguardian.com/business/2020/jun/26/virgin-australia-administrators-agree-to-sell-airline-to-american-private-equity-firm-bain-capital <comment><USER3> The usual private equity playbook is to strip assets, load up the company with debt, and let it plummet into the ground, which is why Bain has both the name and reputation of a Batman supervillain.

However, Virgin Australia already has on the order of 6 billion in debt and virtually no assets (pretty much their entire fleet is leased). It'll be interesting to see how Bain plan to extract their pound of flesh here, when pretty much the only feasible strategy is to build a viable competitor to Qantas.

<comment><USER4> > _Bain has both the name and reputation of a Batman supervillain_

And like said supervillains, this caricature is largely a fiction.

In an analysis of "European companies around their buyout event in the period 2000 - 2008," private equity was found to "select companies which are less financially distressed than comparable companies prior to the transaction and that the distress risks increase after the buyout" [1]. Critically, however, "the distress risk in private equity-backed companies does not exceed the distress risk in comparable companies three years after the buyout," and, "despite this risk increase, private equity-backed companies do not suffer from higher bankruptcy rates than the control group."

More broadly, an analysis of "17,171 worldwide leveraged buyout transactions that include every transaction with a financial sponsor in the CapitalIQ database announced between 1/1/1970 and 6/30/2007" found bankruptcy rates around 6% [2]. This isn't exceptionally high.

Large deals get press. They also have a habit of involving overextension. As a result, the average private equity story is about things going spectacularly wrong at scale.

[1] [https://madoc.bib.uni- mannheim.de/31366/1/dp11076.pdf](https://madoc.bib.uni- mannheim.de/31366/1/dp11076.pdf)

[2] [https://pubs.aeaweb.org/doi/pdfplus/10.1257/jep.23.1.121](https://pubs.aeaweb.org/doi/pdfplus/10.1257/jep.23.1.121) _Table 2_

<comment><USER3> Sure, private equity can mean a lot of things, but for Bain, the caricature is appropriate:

• 1988: Bain put $10 million down to buy Stage Stores, and in the mid-'90s took it public, collecting $184 million from stock offerings. Stage filed for bankruptcy in 2000.

• 1992: Bain bought American Pad & Paper, investing $5 million, and collected $107 million from dividends. The business filed for bankruptcy in 2000.

• 1993: Bain invested $25 million when buying GS Industries, and received $58 million from dividends. GS filed for bankruptcy in 2001.

• 1994: Bain put $27 million down to buy medical equipment maker Dade Behring. Dade borrowed $230 million to buy some of its shares. Dade went bankrupt in 2002.

• 1997: Bain invested $41 million when buying Details, and collected at least $70 million from stock offerings. The company filed for bankruptcy in 2003.

<comment><USER4> > _for Bain, the caricature is appropriate_

Not mounting a general defense of leveraged buyouts. Just against the point that private equity, or Bain for that matter, tends to guide companies into bankruptcy.

It looks like Bain did about 68 deals in the 1990s [1]. About five of them went bankrupt, a 7% frequency. Even if we double that to 10, it's about a 15% frequency. That's high! But it doesn't suggest a norm.

By and large, private equity-backed companies _don 't_ end up in bankruptcy. That doesn't mean everything is perfect. But the facts don't sustain this line of attack.

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

<comment><USER5> Since we're down to argueing degrees...

Of course it's not deterministic. If 100% (or even 15%) went bankrupt, no one would finance them. It's impossible to get to this point.

Every deal is a snowflake, but the reductive caricature of Bain and "private equity leveraged buyouts" is: "(1)buy a company. (2) get your money back quickly by borrowing on behalf of the company (3) profit on your free option.

This caricature is not that far from the truth, as caricatures go, and it's a pretty good guideline to speculations about what they plan to do with Virgin Blue. My guess is that a covid-related bailout or stimulus will provide the capital.

Again, situations differ, but generally these deals don't capitalize a company... lenders do. What they bring to the table is risk tolerance and a mercenary attitude... much of it related to the free option they are exercising.

<comment><USER6> How can you argue that this strategy is a "good guideline" of what they are planning to do with this asset when it's only been the result of 15% of previous assets?

<comment><USER7> 1-out-of-6 might be high. But true, most businesses that are having to sell out are probably on their way out, so maybe 1-out-of-6 is low. Would have to compare relative numbers of roi to overall business

There's also the thought that they should be making their profits from the 85% that succeed, as opposed to not taking a loss on 15% which fail. But question then becomes who's actually losing out on these 15%? ie who's actually paying for the risk, since it seems like a "heads I win, tails you lose" arrangement if losses on 15% aren't being repaid by profits from 85%

<comment><USER8> I do not think "most businesses that are having to sell out are probably on their way out" is even remotely born out by fact.

Many businesses - Dell, Marketo, Informatica, have been bought by PE when they wanted to restructure or change their operating models. But, those companies are not dead or gone.

There is nuance here, and the data suggests that bankruptcy is not the end state of every PE buyout.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Virgin's unrealised value is in the government handouts and concession that are still to come.

Virgin is the second and only competitor to Australia's main carrier QANTAS, and sole carrier for some routes.

The government will not let them fade away. Big money and concessions will be forthcoming.

<comment><USER10> Why will Virgin be treated differently than Ansett? (I was pretty young when Ansett went bankrupt, but Virgin's reputation seems to have been "trying to be Ansett and make a duopoly again".)

<comment><USER11> When Ansett went broke Virgin had just entered the market (further undercutting prices), so there was competition to Qantas. Now what else is there?

<comment><USER12> There was a rumour that the AU government was willing to let VA collapse and hope that a foreign low-cost airline like Ryanair or Easyjet would enter the market. But it's unlikely any airline is in a strong enough position to make that kind of move at the moment. So they will likely offer a restructured VA the same kind of support as they'll offer Qantas.

</comment></comment></comment></comment><comment><USER13> I hadn't considered what happens when a company goes into administration, but I am surprised that it's another private company that is assigned to administrating it. I had always assumed it was a department in the government that handled the process.

<comment><USER3> There's an Australian company called KordaMentha that specializes almost exclusively in bankruptcies. (Or, at least to us laymen, never makes the news for anything else.)

[https://kordamentha.com/restructuring](https://kordamentha.com/restructuring)

<comment><USER12> Funnily enough, Korda Mentha came into existence as a result of two (or indeed, three) giant corporate collapses, one being Australia's previous second airline.

When Ansett Airlines went into administration in 2001, Arthur Andersen was appointed administrator, and Korda and Mentha were the partners put in charge of the business.

Then Arthur Andersen was forced to shut down as a result of its part in the Enron collapse, so Korda and Mentha started their own firm to handle the ongoing Ansett work.

[https://www.smh.com.au/business/when-ansetts-balloon-went- up...](https://www.smh.com.au/business/when-ansetts-balloon-went-up- kordamenthas-star-rose-20111120-1npbg.html)

</comment></comment></comment><comment><USER14> I hadn't heard of Bain Capital previously, but this article certainly doesn't paint them in a good light: [https://www.rollingstone.com/politics/politics- news/greed-an...](https://www.rollingstone.com/politics/politics-news/greed- and-debt-the-true-story-of-mitt-romney-and-bain-capital-183291/)

<comment><USER15> Yeah Virgin is going to be hollowed out and sold for scrap.

<comment><USER12> There's not much more it can be hollowed out. If it's not to continue as an operating airline, the only assets to be sold for "scrap" are the aircraft (they own about half their fleet), and there's not much demand for them right now, or for the foreseeable future.

But its brand, network and operating infrastructure have substantial value, so they'll get a much better return if they can get it operational and profitable again.

<comment><USER16> They can't sell the airplanes for scrap, because they don't own them - <USER2> Australia leases its planes.

<comment><USER12> They own about half of them according to the Forbes article below, including four of the five 777s they operate.

But even if you're right it only enhances my point; there's little "scrap" value in VA; it's either an operating airline or nothing.

[https://www.forbes.com/sites/willhorton1/2020/04/25/is- virgi...](https://www.forbes.com/sites/willhorton1/2020/04/25/is-virgin- australia-greater-than-the-sum-of-its-parts-perth-airport-seizes-planes-as- assets-dwindle/#1600884d73df)

<comment><USER17> The four they own, we're fitted with small cargo doors, as opposed to standard ones, to save pennies. Now, in a world of Dreamliners and A350s, The major life of a second hand 77W is as a freighter, but no one wants these birds cause they are not suitable for freight operations. So yes they own them, but no one is going to buy them.

John Borghetti and his team made a lot of stupid decisions during their decade at the helm. This really was the cherry on the top.

<comment><USER18> Is there no way to retrofit a larger door onto the aircraft?

<comment><USER19> I can think of two options, at opposite ends of the cost spectrum: a sawsall and duct tape, or send it back to Boeing for modification. One of those options is crazy reckless and the other crazy expensive. I will leave it up to the reader to decide which is which .</comment></comment></comment></comment></comment></comment></comment></comment>


Digg's MySpace Problem -- And What It's Doing About It - <AUTHOR> http://www.pehub.com/62600/diggs-myspace-problem-and-what-its-doing-about-it/

<comment><USER2> I went from slashdot to digg to reddit to HN.

Like an old disco, no matter how many times you remodel the dance floor people already found the hippest place around the corner.

And they're not coming back...

<comment><USER3> I like your analogy, but...

A website, unlike a disco, can make tons of money off the unwashed masses. In fact, Digg can probably make more off the masses who remain than the "hip" crowd who founded/left the site.

<comment><USER4> Clubs do well financially when they go mainstream. It means much more liquor sales. This is a lot like websites who also love it for increased ad sales. The problem is that the masses do eventually tire of the same club. That, or they simply get older and move on to do other things. Because the club is no longer the cool place, there are no/fewer replacements for the existing clientele who are shrinking.

The problem with Digg is its a social spot and subject to the same dynamics as clubs. Going mainstream isn't a problem. It's what they do afterward that is. Not to worry, just like in real life, the owners will make bank, leave/sell the old spot to naive buyers who think it'll be a good buy. They will then start something new. This happens all the time with entrepreneurs in similar industries like clubs and restaurants.

</comment></comment></comment><comment><USER5> Am I the only one to think that "social news" websites, from the perspective of the content publisher only work when the site is small enough?

I mean, the quantity of information being submitted to Digg, and maybe Reddit, is so huge it roughly gives a new story about 5 minutes of exposure in the first page of the New Stories section, and only in the specific feed, not the global one...

It makes me think that somehow, spreading something over Twitter, using our friends to do it, might achieve a better result...

<comment><USER6> Fun food for thought is that Slashdot has been around for 10+ years and is still very strong. And they have a huge user base. They must be doing something right. It is debatable if it is the editorializing or the comment moderation or both, or something else, but something works.

</comment></comment><comment><USER7> >>For starters, Digg is planning to launch a spate of new Digg sites centered around niche content. <<

So they are copying Reddit? Sounds like it lost all its "first mover mojo"

<comment><USER8> It's cool. We call us (reddit) their R&D department.

<comment><USER9> Do they pay well? ;)

<comment><USER8> No, not really. In fact, they don't even mention us when they release their new features that they get from us. ;)

<comment><USER9> That's a shame :( At least we all know who came up with the idea.

</comment></comment></comment></comment></comment><comment><USER10> _"If you're interested in rock climbing or knitting, Digg aims to have in- depth news for you to vote up or down on a separate home page."_

So, they are going to become another Squidoo / Mahalo type site? Sad. I haven't been to Digg in at least a year and I don't see anything on the horizon that might bring me back.</comment>


The Copyright Monopoly Should Be Dead and Buried Already - <AUTHOR> http://torrentfreak.com/copyright-monopoly-dead-buried-already-140803/

<comment><USER2> This is AT&T really vague article. I take pictures: why shouldn't I have the copyright monopoly for their use. What f someone takes them and are better at marketing (but shitty at taking pictures).

What you are after is the publishers and the labels, not the copyright monopoly.</comment>


Unclassified: nuclear reentry vehicle development [pdf] - <AUTHOR> http://www.afhistory.org/wp-content/uploads/APH-Fall-2017-Issue-1.pdf <comment><AUTHOR> The article starts at page 13</comment>


Ask HN: How long did it take you to go from Zero to Hero in Objective-C? - <AUTHOR>

I'm a web developer who has always worked with PHP, MySQL, CSS, JS (and libraries) and HTML. My employer wants to develop capabilities to put out some iOS apps, and I'm interested, too. I just started tearing through Apple's dev center, reading How-To's and whatnot. I have VERY limited experience with Java and C++.<p>How long did it take you? How motivated were you? <comment><USER2> About three days of watching the WWDC videos and Stanford Class videos.</comment>


Is Norway Leaving Its Tech Startups Out In The Cold? - <AUTHOR> http://techcrunch.com/2012/04/23/is-norway-leaving-its-tech-startups-out-in-the-cold/ <comment><USER2> Norway is not a good country for entrepreneurship, but a very good country if you need help. Don't know why we are so far behind Denmark and Sweden in tech startups though.</comment>


Show HN Aftermath: Releasing Followords.com this morning - <AUTHOR>

This morning I've submitted our project to HN. http://news.ycombinator.com/item?id=4099054
Got pretty helpful feedback. But that wasn't the only thing.
478 people requested invite out of 755. 63% conversion rate. Almost 9K unique visitor visited our website. At some point in the morning I was seeing 400+ active users on the website. Unbelievable. 35 people registered without telling them how to register. ( You cannot register directly, there is only a login form - but they figured out a way :)
http://imgur.com/Kbf9J
6K people visited directly from Hacker News, 1K from Twitter ( I guess Popular Hacker News post )
I was afraid that Nginx might not hold up, but that was not the problem. I wasn't ready for it! Stuck on my chair from 08:00 am till 02:00 pm. I am still feeling anxious.
People tweeted about us without using our application. https://twitter.com/#!/search/realtime/followords (even in Spanish)
Today another lesson learnt: So if you are working on a project. Release it. Ship it. Let people tell you how much your project, website or tagline sucks. Embrace it. Think about it, thank them and move on.
I need some sleep, tomorrow is another great day. Thank you all for your contributions. <comment><USER2> "I was afraid that Nginx might not hold up"

Seeing articles get nuked by a sudden spike in traffic tends to give one unrealistic assumptions about what servers can handle. Most can take quite a bit if you're serving mostly static content.

</comment><comment><USER3> Just wanted to let you know, there's a typo on your landing page. "Archieve" should be "Archive". Otherwise, looking good!

</comment><comment><USER4> "478 people requested invite out of 755." Does this mean 755 requested an invite and 478 got one?

<comment><AUTHOR> 755 opened the registration form, 478 completed it.

<comment><USER5> All you really need is an email.

Asking for first name and last name too, even if it's optional, will probably discourage some people when they see the form.

<comment><AUTHOR> If they're discouraged because I'm asking their names, than it's fine. There is nothing I can do about that.

<comment><USER6> Not to sound contrarian, but the 'something' you can do about that is to not ask for their first and last names.

I'm not suggesting that's the right or wrong approach, but you should ask yourself the following questions every time you ask the user to do _any_ thing, especially so when asking for their personal information:

\- Do I really _need_ this? Does the app break if I don't get it? Does the quality of the app diminish? Is there some measurable way in which this impacts me negatively?

\- Can I rely on this? Can it be verified? If a user enters his name as "Pinocchio Dandelion", can I say that it isn't? At this point, if it IS incorrect, refer back to question #1.

By my estimation, generally, if you're asking for names, and it matters, you should probably also be asking for credit card information, or some other way to vet that data. If you aren't expecting to bill them, you probably don't need to ask for it.

Of course, you might have something in the app that does need it that we can't see from the outside, but most commonly in these scenarios is that people _think_ they need the information and really don't, which means that you might have captured an even larger percentage of users in the signup funnel.

In regards to signups, you really really really want to make it as frictionless as possible. Once you have their email address, you almost certainly have a more 'committed' user than someone who hasn't filled out the form at all. If first and last names are nice for you to have (but not strictly necessary), then you can ask for them later, after you have their email address.

Once you have the email address though, that gives you the ability to try and lure them in further. Patio11 (as usual) has more detailed information on this topic, so I'll refer you to his posts as to why having an email address is a really good thing, but suffice it to say, it is.

<comment><AUTHOR> I totally agree with the question "Do I really need this?" No I don't. But there is an idea behind asking those information.

I don't care about their data. But I do care about them and I would like to see people who care about the app which will try to solve some problem of them. I would like to have a passionate user base(100s) rather than collecting 1000s of emails. I would like to talk with them, one by one and ask them if we can help them.

Some people told me there are similar tools, some asked me questions, some shared their love and interest to use the app. Some said "Landing page sucks" which I agree a lot! Some asked for a job.. I wouldn't get this if I was only asking their email address.

173 people even wrote something to remarks. Only 60 people did not write their names ( some of them did not write their names but put some remarks )

448 people filled out their name. Only 1 of them has name-surname "In Valid" and his email address is email@example.com I bet he is a bot.

First name - Last name fields are not required. People who follow Hacker News are already experienced Web users who knows clearly a sign of Required Field, they might easily skip it, but they did not. The rest of the emails are already indicating their name and surname.

If they don't care and they don't request an invite; which means I would be more efficiently spend my time.

It might have a better conversion rate without asking their name, but I don't care about the conversion rate that much.

Don't get me wrong, I am not against what you say, I am trying to rationalize the behavior with data.

<comment><USER6> It sounds like you have valid reasons for your rule-breaking, and that's a-okay by me. If we all followed the rules all the time, there wouldn't be any progress.

It also sounds like you're deeply passionate about what you're doing, which is great.

My only caveat to that is that it's hard to have both success at a grand scale and a dedicated group of users at the same time. If you're not looking to be successful, or aren't looking to strike it big (ala Facebook or Twitter), there is of course nothing wrong with that, but for the type of service you're operating, you'll have a harder time tracking statistical trends with a smaller audience I'd suspect, which could make the service overall less effective.

<comment><AUTHOR> As you might know, without committed users Twitter would not have # tag and @ sign. They have talked with their users at one point. They don't have an option. You have to.

What their advantage right now, Facebook already have 3200+ employees which also means users that they can get feedback. Twitter has the same nature. But believe me, they are talking a lot with their customers(advertisers), not with you or me, coz we are a small fish in the ocean. Our lives are not dependent on FB or TW, if we find a better app, we will sell them in a second.

That's also why I believe 37signals, Evernote, Dropbox are much more valuable brands than Facebook & Twitter. They might not have 100s million of users, but if you can't monetize, it does not matter

We will be going Freemium, but in a way that Evernote does. Not in FB or TW modal.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> I didn't see it this morning, but seeing this now and just signed up for the beta. I'm _still_ not entirely sure what it does, even after reading the linked thread, but I try to do whatever I can to support all the 'Show HN' threads, so even if it sucks, you've got my registration (and I'm not presuming that it will suck.)

Nginx is almost certainly not going to be your failing piont, and can certainly scale to beyond 400+ active users, assuming that it's configured correctly and on decent hardware. Your database could crash, or one questionable join could tear the whole thing down, but Nginx is probably the least likely component in your stack to fail.

As for the lesson learned, that's spot on, and one that I waffle on every now and again, even though I've done it and know it to be canon.

Best of luck. It's a space I've got a lot of experience in, and 'interestingness' vs. 'importance' isn't really gotten _right_ anywhere yet. Hopefully you've nailed it.

<comment><AUTHOR> Thanks Barry, interesting vs importance highly personal and it's a hard topic.</comment></comment>


Flickr/Yahoo Using Redis to speed up homepage - <AUTHOR> http://code.flickr.net/2013/03/26/using-redis-as-a-secondary-index-for-mysql/?yc=1

<comment><USER2> Good write-up of a sensible solution.</comment>