Why PHP is better than Python - <AUTHOR> http://www.leaseweblabs.com/2014/12/10-reasons-php-is-better-than-python/

<comment><USER2> You are completely missing the point.

The first problem is: reasons you've listed are stereotypical rants that young PHP developers say. Reasons #2 #4 #7 #9 are just false. For templating here you are: [http://tornado.readthedocs.org/en/latest/template.html](http://tornado.readthedocs.org/en/latest/template.html), the others you could find yourself. Moreover, reasons #3 #6 just don't matter (who cares about quantity of books on PHP? Do you need to read them all? Functions beginning from _ not being imported is not enough for your encapsulation needs?), and #5 #8 are completely subjective. Please don't say any more of that.

The second problem is: you don't understand that language is just a tool to solve your problem. You should find a suitable tool for your problem, not vice versa. While it is definitely easier to build classical websites (no websockets) in PHP, you won't be able to write a system daemon or SMTP server or a concurrent messaging server in PHP.

You shouldn't concentrate on one tool, it is slowing you down. Python is great when it comes to science: [https://wiki.python.org/moin/NumericAndScientific](https://wiki.python.org/moin/NumericAndScientific), you won't find this number of scientific packages anywhere but in Python. It also, in my opinion, is much better suited for API servers than PHP with its perfect Flask [http://flask.pocoo.org](http://flask.pocoo.org) and creepy but pretty fast Tornado [http://www.tornadoweb.org/en/stable/](http://www.tornadoweb.org/en/stable/).

There are dozens of languages that everyone should use in their specific domain. Erlang for stable concurrency systems, Go for productive network and system programming, PHP for building simple websites, Python and Julia for scientific applications, Lua for embedding, Perl for parsing and scripts, Clojure for general-purpose language with immutable structures and concurrency, Haskell for learning great new ideas.

Programmer should be able to program on everything, that's the difference between a programmer and just a person who needs a website.

</comment><comment><USER3> > 4\. Python is hardly used in the real world, while something as big as > Facebook is built on PHP.

Google used to run a lot of python and it's probably still the case. Youtube is built almost exclusively on python. Among many others.

<comment><USER4> FB had to build an actual compiler for PHP in order to get real performance.

</comment></comment><comment><USER5> No one is responding to this because it isn't worth responding to. PHP's libraries are a mess and while the documentation is pretty nice, it's not nice enough to make up for the other problems.

<comment><USER6> I am having trouble identifying if the article's author is trolling intentionally or not.

<comment><USER2> The same here.

</comment></comment></comment><comment><USER7> This top 10 list isn't very good, it seems like something written back in 2006 or 2007. Shared hosting? Forget that, buy a VPS or EC2 and host it yourself.

The only reason I would use PHP now is if the Hack language is being used and everything is reviewed for coding style.

</comment><comment><USER8> This list is ridiculous. I question whether the author has any idea what he's talking about.

        Python isn't used in the real world?

EVE Online begs to differ.

        PHP behaves as expected

...ahahahahaha.

</comment><comment><USER4> So, PHP is better because Python sucks? That is how I read their list. Also, I get lots of spam from leasweb ip blocks. Guess php is better for sending spam.

</comment><comment><USER9> Writing an "X is better than Y" post often indicates immaturity.

<comment><USER10> On the other hand, writing an "X is crap" post gets you tons of upvotes.</comment></comment>


I've given up using soap & shampoo forever - <AUTHOR> http://blog.seanbonner.com/2010/02/01/ive-given-up-using-soap/ <comment><USER2> I tried this when it made the HN rounds about a year ago. My results were over about three months and my primary reason was to assist treating moderate eczema. I stopped using all soap and shampoo and just stuck with hot-as-hell water. My skin did get better, but after about two months my hair began to naturally dread. After I looked back on my notes of this endeavor I decided to use some scent-free shampoo to prevent dreads. I use soap to clean up when I finish painting/working on a car or other dirty project. I also use it before I prepare food for my family and friends. My hair did never really 'feel' right, much more like a dogs fur than clean hair. It didn't smell bad it just felt different and didn't behave.

The interesting thing that came out of my tracking this impromptu 'shower log' of no soap use - I was able to correlate my severe eczema outbreaks with inhaling allergens. In my case, breathing in pine dust & glue particulate causes outbreaks. I now wear my painting respirator 75% of the time in the shop and have very few incidents.

</comment><comment><USER3> I stopped showering with soap and shampoo in high school after a bout of dry skin. After a transition period of length similar to the author's, I saw the same improvements. Today, I use soap (though not antibacterial) when cooking and whenever I'm covered in something like grease or rosin (hey, it happens) that could use the extra help soap affords. I only use the tiniest bit of shampoo to assist in getting the itchy little hair bits out after a haircut.

While I have personally gained from the benefits of this experiment, I'm not a fan of the rationalizations some use to justify minimalism/naturalism/whatever you'll call it -- the arguments that run along the lines of "we didn't need it years ago, why do we need it today?" As an engineer, I find this wholesale skepticism of technology especially repugnant. Thus, I really appreciate that Sean frames this in terms of experimentation and checking hypotheses--be they self or socially formed. That is cool.

</comment><comment><USER4> Cool story, bro.

It kinda makes sense; soap is for dissolving stuff that you can't rinse off your skin. The bits of your body which are covered by clothes generally don't acquire much such gunk, they just get sweaty. He still washes his hands using soap, so I'm not too concerned about his health. I'd like to see him maintain his "no soap" rule after a day spent working under a car, though.

</comment><comment><USER5> I heard about a similar story in college and decided to try it out over 15 years ago. My roommate's uncle was a doctor and a big fan of not using soap and shampoo. The first 2 weeks were tough - very oily. But I stuck it out and then my body adjusted. I could really tell that my body was producing less oil and I felt cleaner throughout the day. So I kept on going, and for the next 10 years I didn't use soap and shampoo in the shower. When people found out, most were grossed out. But it felt right. About 5 years ago, I started to use shampoo cause it would let me wash my hair faster (just using water takes longer). But I use a gentle and natural shampoo (current from Melvita). I still don't use soap cause I feel like it strips too much natural/good body oil from my body and isn't good for me. Anyway, it's refreshing to see a post like this. And in all places, at HN.

</comment><comment><USER6> I, too, tend to believe that the soaps, shampoos, and other smelly things we all buy and take for granted in modern life may not be the healthiest things for us. However, in my household, we've addressed the problem (as we see it, anyway) by: 1) Making our own soap and shampoo; and 2) Only bathing on an as- needed basis (which equates to about twice a week for me). I also don't wear deodorant/antiperspirant.

Seems to be working out so far. I have long hair (for a guy, anyway), and I have a tough time not using shampoo. I suppose, in theory, if I stopped using long enough for my scalp to stop over-producing oils to replace what's routinely stripped out due to washing shampoo, then it wouldn't be a big problem (that, or I'd simply get accustomed to the feeling of my hair with natural oils). Frankly, though, I'd probably be more inclined to simply start shaving my head to avoid shampoo.

Different strokes for different folks, and all that. Everyone has their boundaries when it comes to personal hygiene, and we should all respect those boundaries. However, upon close examination, the daily bathing/hygiene rituals modern (US, Western, ???) life does seem a bit excessive. If we didn't coat ourselves with so much "stuff" (deodorant, conditioner, hair spray/gel, perfume/cologne, etc.), it seems intuitive that we wouldn't need to clean ourselves as harshly or as often as we currently do.

Interesting topic, nonetheless.

</comment><comment><USER7> In my experience, this does not work.

I gave up on shampoo for about a month and a half, but I still used conditioner. I never used soap on my body when showering to begin with, except for _ahem_ the bottom area.

It actually worked for a little while; the conditioner dissolved the grease out of my hair (like dissolves like). But then for about a week my hair was determined to stay greasy and no amount of conditioner would get it out. So I gave up and started using shampoo again.

There's a reason that in the old days everyone wore hats or bonnets regularly.

<comment><USER8> Conditioner is meant to restore the moisture to your hair that shampoo takes. It makes sense that by only using conditioner your hair felt greasy.

<comment><USER7> Conditioners are designed to completely wash out of your hair with just water. It wasn't that the conditioner wasn't getting washed out, it was that at some point it was insufficient to deal with the grease issue.

At least it makes a whole lot more sense than trying to wash your hair with just water, which is completely incapable of getting rid of grease.

<comment><USER9> I think the point of the experiment is to get rid of _all_ chemicals. Like for shampoo, you don't know what the effects of the conditioner are, and what would happen to your hair.

<comment><USER7> Well obviously I wasn't following _his_ experiment. It was from a book on how to deal with my particular kind of hair (which is rather difficult).

<comment><USER10> In that case it's pretty disingenuous of you to claim that "In my experience, this does not work," seeing as you did not, in fact, experience this.

</comment></comment></comment></comment></comment></comment><comment><USER11> Water, especially hot water, is an unbelievably effective solvent (something often overlooked despite the fact that its known as the Universal Solvent).

Still, I'd worry about bacteria growth (which is, in my mind, the value added of soap) - though the author claims he smells better now.

<comment><USER12> I NEVER use soap to wash my hands. I almost never get sick.

I think it's down to technique.

a) use the hottest water you can stand. With practice you can get it pretty hot.

b) scrub your hands together completely, vigorously, and for a good 20 to 30 seconds.

<comment><USER13> At my university, the microbiology class did a test every year to see how well people wash their hands. They were instructed to was their hands in scolding water for four minutes with antibacterial soap. Turns out, even after that they still had more than half the bacteria left on their hands. This of course says nothing about whether you'll get sick.

EDIT: Also, don't try to pull any of this at a hospital. In those situations you can't afford to take chances (as in when others' health is at risk).

</comment></comment></comment><comment><USER14> I have been doing this for a few months. Some notes:

I always had oily skin, and it seems to me now my skin was likely overreacting to the use of soap as it now is a lot more stable and to me it just feels finally "right", no longer needing to so frequently wash my face. I also believe tone and texture are better.

Soap. I do use it when for whatever reason I become "actually dirty", like handling greasy stuff, or after swimming in a pool (chlorine or salt water), after outdoor play, etc. And yes, for the nether regions, er, daily.

Shampoo., It's definitely much easier with shorter hair, and during the warm months. As weather gets colder it's hard not to think I could benefit from a little shampoo/conditioner, most noticeably right out of the shower my hair becomes harder to manage and I have to make more "adjustments" as time passes. But during summer, no issues at all. Or perhaps is related to humidity? Anyway, I am sure I will be relenting and using some shampoo/conditioner the next few months.

For odors, I have a quite reliable barometer, my little daughter and wife always notice when it's time to get cleaner, and it is my observation that their admonishments have been conspicuously absent in the few months I've been doing this, still unbeknownst to them.

</comment><comment><USER15> I can't speak for soap but I know I have never used shaving gel/cream, or whatever you call it, in my 29 years. And it's all fine. So maybe these guys are just trying to get us to spend money.

<comment><USER16> I wish that worked for me. Every time I skipped the shaving cream, I'd get nicks all over the place, even with a fresh blade. Maybe my skin is thinner than yours. Do you just use water? Or do you use soap in place of shaving gel?

<comment><USER17> I also stopped using shaving cream. My method is as follows. Turn shower up just slightly hotter than will kill you. Sit on floor of tub and just let water soak your head and face. The extra distance to the floor of the shower is why the water should be hotter than is normally tolerable. Now just sit there and enjoy your sauna/steam. After a good time soaking I am now very relaxed and the hair on my face should be super soft. I then grab the razer, just a normal disposable, and do a blind shave while sitting under the hot water. When I'm done, turn the water temp down a bit and clean up the missed bits in a mirror. The whole process is very relaxing and easy and takes only a few minutes.

<comment><USER18> Soaking your face in scalding water is relaxing and easy?

I'm surprised this has so many comments (it seems to be #3 by comments on the first two pages), but I guess I'm not surprised that programmers don't wash their hair.

</comment></comment></comment></comment><comment><USER19> I stopped using shaving cream years ago thanks to this article: <http://www.lewrockwell.com/tucker/tucker65.html> Turns out using shaving cream makes you dependent on it.

<comment><USER20> I don't use it myself. I use olive oil if needed. Some people recommend using a thinner oil, but I like this and it works for me.

I also don't use conditioner. Never seen the point. My hair is just fine. I've gone without shampoo too, and just whatever soap I use.

<comment><USER21> You don't need conditioner (or, for that matter, probably even shampoo) if your hair's short. I only started using conditioner when I grew mine out.

</comment></comment></comment><comment><USER22> As a person with hereditary skin issues (both my dad and grandad have suffered for years, and now it's setting in for me), I'm definitely going to try it - my father and I already noticed a big shift when changing from scented to unscented shampoos and soaps - I'm willing to give the no-soap a go to calm down the rest of my skin - cheers. I'll comment again if I notice a sudden down-tick in the number of people willing to spend time with me ;)

<comment><USER23> I have given up soap, shampoo, deodorant...etc...due to serious health issues. For me, it was a gradual progression. I add salt to my bath water. If you have serious skin issues, I would recommend a salt water bath. Kosher or "canning/pickling" salt is better than table salt. A good quality, high brine sea salt is better still.

Good luck with this.

</comment></comment><comment><USER24> I haven't used shampoo since I was maybe 10. No problems to report.

<comment><USER25> Interesting. I used to shampoo my hair every day, but found out that the more you shampoo it the more oil your hair produces and thus the faster it gets "dirty". So I switched to only doing it twice a week and I have not noticed any negative effect. I think I am going to try dropping it altogether.

Do you use any hair products at all like gel or wax?

<comment><USER26> Do you have a source for that? I have super curly hair and in a futile attempt to manage it I researched hair care for a morning a few weeks ago.

If you didn't know curly hair tends to become dry towards the ends. This is due to the natural oils not being able to reach the ends because of the curls. I found a few sites advocating shampooing about once every two weeks to let the oils do their thing (along with moisturizing conditioner every day).

That being said my hair is still a mess so I'd love to see if I am "doing it wrong".

<comment><USER27> I also have super curly hair. I only use conditioner, no shampoo unless my scalp needs extra cleaning, which is very rarely. And I use hair products like gel and spray. Conditioner combed through my hair and then rinsed out removes all hair products. Check out the DevaCurl starter kit - it has "NoPoo" shampoo, which is shampoo without harsh sulfates, conditioner, gel, and spray. Their products are great for curly hair.

</comment></comment></comment></comment><comment><USER28> Are there any major studies regarding the effect of the increasing amount of chemicals we're taking into our bodies in the modern day?

<comment><USER29> Everyday I breath in tons of chemicals like nitrogen, oxygen, carbon dioxide, water vapor, etc. My height and, so I assume, lung capacity hasn't increased much over the last few years so I'd estimate that I've been taking in a constant amount of chemicals with each breath over this period.

</comment></comment><comment><USER30> I'm guessing the transition period can be made much more tolerable with a little effort. For example take a bottle of shower gel, and every time it's half empty fill it with water.

I'm tempted to try it. Last time I didn't shower for over a week (hiking trip) I remember my skin looked and felt surprisingly healthy. Hair too.

</comment><comment><USER31> I'll lay 10 to 1 that he hasn't.

<comment><USER32> I dunno. I've been completely shampoo free for about 10 months, and soap on anything but my hands is a pretty rare occurrence. Things seem to be going well for me. Your mileage may vary.

</comment></comment><comment><USER33> I've been doing no shampoo/soap only where it matters for about 6 months now and can only report positives. I don't smell, I still shower daily (showers being shorter now). Win in my mind.

</comment><comment><USER34> I'm on 2+ months. The first 2 weeks were pretty hard to deal with. Now I feel cleaner than before. I don't seem any less clean.

I don't use shampoo or any of that crap either, but I clip my hair weekly at 1/4".

A washcloth is key.

Now that's the weather is colder, my skin doesn't feel dry or cracked anymore.

It's no big deal, really. I pass the wife test, too. I don't have any mission or paleo-ideology behind it, I just read a couple blog posts and was minorly curious and tried it.

</comment><comment><USER35> Some of what i read was funny.You don't use soap but you use what amounts to a corporate advertising gimmick deodorant. Probably much worse for you on the whole. I don't use deodorant because I eat pretty well which I believe results in what your body excretes so the issue of deodorant isn't so important as I shower once or twice a day depending on activity.Good luck but I am not clear what is to be gained

</comment><comment><USER36> Interesting. His problem of dry skin went away. What about people that have oily skin?

<comment><USER37> Almost completely unscientific answer:

I have dry skin and can vouch for the fact that your body tends to "find a balance" if you stop using soap, and I would imagine that it would be similar for those with oily skin (it could be that you are creating a lot of oil because the soap is drying out your skin.

On the other hand, you may find that you just end up even oilier.

The only way to truly find out would be to test it yourself. You may just want to try a less drying soap so your body doesn't need to generate as much oil.

</comment></comment><comment><USER38> I've been trying to cut back on soap/shampoo for a few years now. Currently I shower daily, occasionally twice depending on workout schedule. I have a few natural, non/naturally scented soaps and shampoos which I use sparingly.

The one area where I really have noticed a need for shampoo is my beard and mustache - even when being extremely careful when eating, after a day or two it can start to get grimy. I typically rinse with water as needed and use Bluebeard's Beard Wash about 2x week. I've noticed a huge improvement since using a beard wash.

Love to hear if anyone has other beard advice.

</comment><comment><USER39> I have not used shapoo/soap for my hair and body for more than 10 years now(my skin was not happy with soap). Have not had any issues(and I shower everyday). Also I try to use hot water whenever I can instead of soap. In my case this has more to do with sensibility than for the environment. Also I feel that, not only shampoos & soaps may actually not be good for the body, the real way to have health hair and skin is having proper nutrition and good life-style.

</comment><comment><USER40> Also note that for some people problems like dry skin, dandruff and a few bowel issues can be caused by an over-abundance of yeast in the gut. A good preventative measure for this is to take coconut oil as a supplement.

</comment><comment><USER41> Talcum powder makes an effective deodorant in my opinion. Much better than the slide on gels in the market. However it lasts only for about 8-10 hours.

<comment><USER42> I use magnesium hydroxide, usually sold as a laxative. It is nearly the same thing as the active ingredient in most deodorants, except it isn't an antiperspirant nor is scented nor has a creamy consistency, etc. It's also really cheap, and you can buy by the liter.

</comment></comment><comment><USER43> How about using soap on half your body and objectively observing the difference? A lot of these self-run experiments run into confirmation bias.

</comment><comment><USER44> Y'know i just use very small quantities of both. It has helped the quality of my hair and my skin does not dry out anymore.

</comment><comment><USER45> I prefer washing with rest.

</comment><comment><USER46> Sounds to me like he's some sort of "born-again virgin".

</comment><comment><USER47> This seems like good advice for getting rid of bad habits:

"just because I did something yesterday is not a good enough reason to do it today"

Gotta keep that in mind.

</comment><comment><USER48> I've reduced my shampoo and soap usage after reading the same article with largely positive results. I'm not sure how I feel about no soap after ice hockey - will have to see. I've always used Dove and have avoided regular soaps, which leave your skin unhealthily dry. Ads for Zest always make me cringe - I don't want to squeak thank you.

I also lived in Shanghai for some time, where the air is filled with dust and dirt. I'm not sure I could go without soap there.

</comment><comment><USER49> The thing very few people realize is that you don't really get notably dirty or smelly underneath your clothes (exception being certain odor where the sun doesn't shine). If you work up a sweat for a long time, it's a different issue in terms of smell, but there's really not any dirt underneath the clothes to talk about other than epithelieals - which is nothing that water alone can't handle. I don't use soap when showering and I smell just fine, but I do use shampoo for my hair, and deodorant under the arms.</comment>


The Business Case for Formal Methods - <AUTHOR> https://www.hillelwayne.com/post/business-case-formal-methods/ <comment><USER2> I've long been intrigued by pure FP, advanced type systems and proof assistants from an academic point of view but haven't yet been convinced that the effort involved in learning such systems/methods pays off in most cases (without taking into consideration the costs you still have when you already know the methods well). I will still try to learn more about this, but without any strong conviction that this needs to be immediately useful.

By contrast, I've only more recently started hearing more and more about model checkers such as TLA+. The case studies in this blog post serve to give a good motivation for why such systems might be useful (as well as honestly presenting drawbacks; something that advocates of e.g. PFP rarely do). I would love to use something like that one day.

As an aside, I still think it's a disgrace how irrelevant empirical research is to most aspects of today's software development. Another blog post by the author cites a paper claiming that very simple testing, especially of error conditions, would be able to prevent a huge chunk of production bugs, but things like that are rarely talked about. The whole profession is unfortunately amateurish and always obsessed with fads and trends instead of taking a more analytic and empirical approach which makes me sad.

<comment><USER3> The Redex modeling tool [1] is an interesting point in this space. Its specialty is in making executable specifications of domain-specific languages. Redex models can be tested by the unit-testing framework of the Racket dialect of Scheme. There's plenty of excellent documentation on Redex, and it has some neat visualization tools. I've gotten plenty of value from using it for my research over the years, but suspect it'd be useful outside of academic research.

[1] [https://redex.racket-lang.org/](https://redex.racket-lang.org/)

</comment></comment><comment><USER4> Might want to show some examples in the "Why Not To Use Formal Methods" section too.

Somewhat old numbers from seL4: [1]

\- 2,500 lines of C code

\- 100,000 lines of proofs

\- ~7.6 person-years of full time work (with a lot of involvement from PhDs)

Interactive theorem proving definitely will not scale to significantly-sized C codebases anytime soon.

[1]: [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5597727/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5597727/)

<comment><USER5> Maybe C is just not the best tool for such code.

I would suspect that (subsets of) Ada, or, Rust, or maybe OCaml would be more fitting while staying on the industrial side. (Likely Haskell or Idris would be even easier targets, but their industrial adoption is quite limited.)

<comment><USER6> How does the industrial adoption of OCaml compare to Haskell? (The relative placement of Ada, Rust and Idris seems apparent.)

<comment><USER5> I know two large companies using OCaml to a serious extent: Jane Street (obviously) and Facebook (as Reason).

I can't remember any large company where Haskell would be front and center, but a number of smaller companies doing so exists. There was a post about running Haskell in production recently here on HN.

</comment></comment></comment></comment><comment><USER7> The case studies are all race conditions in distributed systems. Is TLA+ useful for complex serial systems like compilers, etc.?

<comment><USER8> It's possible to use TLA+ for complex serial systems, and it can def help there. The thing is that TLA+ is designed to be good at modeling concurrent problems, problems that have a lot of specific challenges you don't see in serial systems. So if you know your system is serial and nondeterministic, then you're probably better off with something that focuses on that part of the design space.

To paraphrase Edmund Clarke's Turing lecture[1], the problems of verifying software include "floats, strings, user-defined types, procedures, concurrency, generics, storage, libraries…" If you're not worried about verifying concurrency in your tool, you've got a more resources to devote towards verifying the other things.

That's also a space I don't have as much familiarity with, so I don't know what the best tools are there. My vague understand is that at that stage the problem "simplifies" enough that it's a lot easier to verify the code itself. Like how CompCert isn't just a model of a compiler, it's an actual correct compiler. So you can apparently work much closer to the code when verifying serial things.

At one point I got a bunch of people in FM to write provably correct versions of Leftpad.[2] Maybe one of those would work best for you? Note also that one of the examples uses proves Java code correct via inline JML annotations.

[1]: [https://amturing.acm.org/vp/clarke_1167964.cfm](https://amturing.acm.org/vp/clarke_1167964.cfm)

[2]: [https://github.com/hwayne/lets-prove- leftpad](https://github.com/hwayne/lets-prove-leftpad)

<comment><USER9> Do you really mean "nondeterministic"? AIUI, what people call 'TLA' was designed by adding a bunch of modalities (you can think of these as "monads" if you like[0]) for nondeterminism and "time" (state transitions) to standard propositional logic. The rest of it is really a matter of what's idiomatic, such as using the nondeterminism modality to account for spec refinement as well. So it would seem that TLA+ should be enough to deal with these cases.

[0] Or burritos. Mmm, burritos. /s

<comment><USER10> I think he meant to write _deterministic_. The exact nature of the logic TLA is not the relevant point here. TLA (and so TLA+) extensively relies on nondeterminism for things like specifying code at arbitrary levels of detail (e.g. you can say, after this step, the list is sorted somehow, without specifying how), interaction with the environment (the user performs one operation of the possible ones, or some arbitrary machine fails) or concurrency in its programming sense (the OS will schedule one of these several operations next).

<comment><USER9> I agree, mostly, but understanding "the exact nature" of a logic (or at least a properly-defined subset of it) is pretty important for using it effectively.

<comment><USER10> If you're interested, I've written a rather detailed explanation of the TLA+ logic. Part 1 is an introduction that explains the design from a UX perspective, part 2 is about the + side of the logic, and parts 3 and 4 are about TLA: [https://pron.github.io/tlaplus](https://pron.github.io/tlaplus)

</comment></comment></comment></comment></comment></comment><comment><USER11> The use of formal methods in NASA proves that they are useful and that the software industry should give it much more importance in my opinion.

[https://ntrs.nasa.gov/search.jsp?N=0&Ntk=All&Ntt=formal%20me...](https://ntrs.nasa.gov/search.jsp?N=0&Ntk=All&Ntt=formal%20methods&Ntx=mode%20matchallpartial)

<comment><USER12> It proves they are useful in the extreme circumstances that NASA projects represent.

It doesn't prove that they provide a good ROI for a business looking to ship CRUD apps yesterday.

<comment><USER13> Our mobile apps derive actually revenue and customer satisfaction, with budgets already hard to justify (high 7 and low to mid 8 figures) and alway live in a highly complex service and operational environment. If you added the cost of formal methods nothing would ever be approved at all. The alternative of not doing formal methods and having stuff that mostly works and makes us money and customers reasonably happy is good enough (not crud apps, not even sure wtf that is in a real business, is Facebook a crud app? (maybe crap app but still)).

I could see formal methods for things that might kill people as possible but even there spending all of your money to deliver perfect code vs still being in business with something good enough is an easy math for most CEOs.

<comment><USER12> Create Read Update Delete - often refers to apps that are largely concerned with entering and transforming data stored in a backend DB.

</comment></comment></comment></comment><comment><USER14> If we're going to talk about the formality of methods, let's remember that "collection of positive anecdotes with back-of-envelope guesstimates" is not what's meant by a "business case".

An ROI or IRR calculation might not have anything like the elegance of a proof, but it's a method and it's formalised.

</comment><comment><USER15> The next big breakthrough will be a program that can convert TLA+ directly into production code. And create all of the necessary tests, with a formal proof that the code is correct.

<comment><USER16> This is not always possible due to the halting problem [1] and Gödel's incompleteness theorems [2]. It is not always possible to formally determine/prove the behavior of a program.

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

[2]: [https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_...](https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_theorems)

<comment><USER17> Doesn't really matter if only unrealistic edge cases are unprovable.

<comment><USER18> The problem is, you don't know that. The software industry is this complex because obscure yet realistic edge cases happen much more often than you'd expect.

<comment><USER17> So the ones that aren't edge cases can still benefit greatly, rather than not at all.

<comment><USER18> What good is applying formal verification software to have proof that part of your input behaves properly, but edge cases are not proven? This is already what test cases do.

</comment></comment></comment></comment></comment></comment><comment> an-allen Saw Hillel speak at YOW! Melbourne. Great speaker. Prop comedy and formal methods. Highly recommend.

</comment><comment><USER12> That's not so much a business case as a contrived example. I absolutely would expect system testing and QA to find such a bug or the testing isn't up to scratch.

What you're proposing is that all engineers now effectively learn a new language and translate requirements into it. This expects requirements to be fully fleshed out themselves (a luxury few have these days) and relatively static (or everything needs to be reworked).

Good luck with that...

<comment><USER9> > I absolutely would expect system testing and QA to find such a bug

You can't test what you don't have. With design-based formal methods you can "fuzz" the high-level design and spot very real problems in it, before writing a _single_ line of ordinary code.

<comment><USER12> That's not what the article is claiming though, and in fact when the code is written is irrelevant to the business case. We're talking about spotting production issues before they arise.

The article makes the very strong claim that QA aren't going to catch the bug that arises from this design omission and it's going to cost your company money as everything goes wrong in the field.

I don't believe it would get that far IRL as any dev with a brain is going to spot it, and even so QA should certainly have test cases for this sort of situation if they're doing their job right.

You can argue this may be a better approach, and catch potential problems earlier, have at it. You can argue that there are classes of error that this will catch that normally you wouldn't (some of the preamble and larger scale stuff does seem to show this) But the illustrated example doesn't hold up to scrutiny and is overstated. As such I think it undermines the point that's the author is trying to make, because it looks to me like something we'd catch anyway.

<comment><USER19> I think the argument is if you've been around distributed systems long enough you will encounter race conditions. Sure, it's ok to say "Well, the testing infrastructure isn't up to snuff, so we just need to fix it" but at scale this is impractical.

Check out the fallacies of distributed computing[0]. If your testing system can simulate all of those edge cases, it probably looks a lot like TLA+.

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

<comment><USER12> I agree, once you've been around parallel and distributed computing for a while you do notice this stuff, which is why I think the example given in the article isn't a particularlyt good one - that's a _really_ noticeable design omission and I would expect it to be caught pretty early in any dev/QA process as the developer implements the functionality and thinks "Hey, what if .. don't we need to invalidate the other offers?"

I'm sure there are good cases for using TLA+, I'm sure there are situations where it's not only useful for catching errors before they even happen, but in which this more than offsets the upfront costs of the exercise.

I guess I just came away from the article not feeling that such had been demonstrated, in fact I came away with the feeling that the example was contrived to fit the agenda and didn't actually show much.

<comment><USER19> I think it's a great example. It boils down to simple code that may not be obvious how it behaves within a degraded network. Your dev/QA could even have the thought and actually test it but it work under ideal circumstances giving them false confidence.

I'll go out on a limb and say it is nearly impossible to design and build a test environment that can simulate all network conditions, so that even in trivial cases where a dev might _know_ for a fact that there is an issue, it'll be incredibly hard to reproduce it.

Maybe put another way, formal methods give cover to dev/QA to avoid shipping known but hard to prove buggy code. Bugs they will ultimately be held responsible for.

</comment></comment></comment></comment></comment></comment><comment><USER20> I like how it emphasized the "debuggable" aspects of FMs.

Most people believe FMs are not resilient due to their coupling with the spec. What if the spec changes?

Saying that FMs are a _debuggable_ form of specification, i.e. very close to debugging the design itself, turns that criticism on its head and shows that it is trivially the case that you can iterate on or prototype with FMs.

<comment><USER21> So what is a "FM"? Isn't it just any very high-level, preferably declarative programming language?

<comment><USER20> I asked for a comparison between TLA+ and Scala/Haskell to a dev that worked on the AWS application of TLA, this is what they responded.

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

You're right in a limited sense, except that it's not _any_ language, it's _particular_ languages that can count as a Formal Method in the sense of the OP (i.e. can do model checking in some kind of termporal logic).

</comment></comment></comment><comment><USER22> The problem is that explaining the upfront cost to 'the business people' is an issue. In many cases, budgets for dev are yearly and that is kind of an horizon for most people (even some who should know better), so even if i'm going to say that your TCO is probably (which is a problem in itself, but probably statistically) going to be lower with formal methods than without, that assumption is spread over many years. There are enough systems that require vast refactoring every year because they were badly done in the first case, but that's the concern of every year's budget/manager, not of the one sitting the current year.

That goes for verifying code as well, however that is even harder to sell as it's so much more expensive and even though I 'feel' it is a good idea, I cannot really estimate if the TCO would be lower than just patching with bandaids over the years.</comment>


Show HN: `diff arc0 arc3.1` - <AUTHOR> https://cdn.rawgit.com/laarc/notebook/757f7eff5cb26d2ae98dc732252d66fd0e6507c6/arc0-3.1.html <comment><AUTHOR> If you have questions, please ask! Using Arc in real applications has been such an interesting experience that I can barely shut up about how ridiculously fun it is.

Here are some unfinished notes about what the diffs mean: [https://gist.github.com/laarc/a07799e89940dc7c31c9](https://gist.github.com/laarc/a07799e89940dc7c31c9) It's interesting how short the diffs are vs how many features and fixes they deliver.

<comment><USER2> The only Arc application I know of is HN - can you show any other examples?

As a non-Lisp programmer, can you sell the benefits of Arc to me?

<comment><USER3> Here's an example of why arc/lisp are great:

        (mac awhen (expr . body)
          `(let it ,expr (if it (do ,@body))))

This basically add a new syntax to the language. How often did you do in python:

        some_value = my_function()
        if some_value:
          call_something_with(some_value)

With the small macro defined earlier, we can do:

        (awhen (my_function)
          (call_something_with it))

Basically, binding (my_function) to the variable named "it".

It's amazing to be able to add new syntax/features to the language without having to wait for a new version. Imagine if you could add any features you want to javascript or python without having to wait 5 years for the spec to be approved and implemented..

It's possible because the code is written in the same data structure that you use to manipulate normal values. I.e.:

        (let x 1
          (prn x))

Is the code of the program but _also_ simply a list of 4 elements. And since the code itself is a data structure that you can manipulate with normal functions, there's something called "Macro" in Lisp (not to confuse with C++ macros), which essentially are functions that receive code and returns code, instead of receiving values and returning values.

So: (some_macro (prn 1)). some_macro would receive a list of two elements (prn and 1) and could do some operation to it and returns some new code.. such as (prn 2), which will then get evaluated to print 2. Whereas (some_fn (prn 1)) would evaluate (prn 1) (which returns nil), and pass nil to some_fn.

That's why it's so hard to impress a lisp programmer with any other languages because if a feature doesn't exist, they can add it with a macro. I.e. Actors or OO, or whatever really.

<comment><USER4> I don't know much about LISP. What you showed looks nice and useful, but I would not consider it new syntax.

Is it possible to use this technique to introduce, say, infix arithmetic operators, or ObjC's dot syntax? Or can you just trade one S-expression for another?

<comment><AUTHOR> _ObjC 's dot syntax?_

Sure. That's easy in Lumen: [https://github.com/sctb/lumen/commit/6410c8cc2de66d1976515bd...](https://github.com/sctb/lumen/commit/6410c8cc2de66d1976515bdd71ab9b65c12cbf10#diff-910c7ff4864f437a8c67427b7b055657R70)

 _Is it possible to use this technique to introduce, say, infix arithmetic operators?_

Yep! I wrote a macro to swap any instance of `x with the previous expression. Meaning, it allows you to write:

      (foo `= (x `+ y))

rather than

      (= foo (+ x y))

The reason it was so easy to do this is because `foo is shorthand for (quasiquote foo). So the macro simply steps through a body of code, looks for any instance of quasiquote followed by an atom, and then swaps it with the previous expression.

But more generally, it's easy to write a macro to do whatever you want. If you really want infix expressions all of the time, I could imagine writing a macro which matches the pattern (... + ... + ...) and replaces it with (+ ... ... ...)

That's made-up notation, but the idea is just "look for some set of symbols, like + or /, which occur within a list in between all of the other elements, and then move the symbol to the front of the list."

The power is available to you, but whether you choose to use it is a separate question. Prefix notation tends to be a win for everything except math. And even for math, it's usually a matter of code formatting. Rather than

      (- (* 2 (/ (+ x y) (+ a b c))) 1)

try

      (- (* 2
            (/ (+ x y)
               (+ a b c)))
         1)

or

      (let u (+ x y)
        (/= u (+ a b c))
        (*= u 2)
        (-- u))

Once Laarc has support for indentation-as-parens, it'd look like:

      let u (+ x y)
        /= u (+ a b c)
        *= u 2
        -- u

which is rather pretty, and has no ambiguity. One of pg's essays on Arc mentioned this feature, and it seems like a good idea, so I hope to pursue it.

<comment><USER5> 0\. Is Laarc an arc variant you're working on? I don't see it on the github page.

1\. You might be interested in how my arc-inspired language did indent- sensitivity and infix: [http://akkartik.name/post/wart](http://akkartik.name/post/wart). For example, here's bresenham's line-drawing algorithm in wart: [https://gist.github.com/akkartik/4320819](https://gist.github.com/akkartik/4320819). There are more code samples at [http://rosettacode.org/wiki/Category:Wart](http://rosettacode.org/wiki/Category:Wart).

2\. Do you have a username on arclanguage.org? Perhaps we've met!

<comment><AUTHOR> It is indeed. I'm in the process of porting from Racket to Lumen. It's taking a bit, and it'll be tricky to add true greenthread support to js and lua, but it's a win so far.

Wart is freaking cool! Thanks for showing that. Whoaaa, you use tangle/weave! How do you like it / what do you think about literate programming? I was batting around the idea of writing code that way, but it seemed like tangle might not be the best solution. But I love your 000prefix naming scheme; I instinctively do that for branches. After reading through a few files starting at [https://github.com/akkartik/wart/blob/master/literate/000org...](https://github.com/akkartik/wart/blob/master/literate/000organization) it became pretty clear how wart worked, pretty quickly. I'm mainly wary of the "compile" step that using Tangle implies; do you find it slows you down much? Would you choose to do it that way if starting fresh?

 _What would a language ecosystem be like without any backwards-compatibility guarantees, super easy to change and fork promiscuously?_

It's fun to find someone has been mulling over the same problems!

I was considering taking Laarc in a similar direction:

      (import "akkartik/foo")

That would check whether the folder "../foo/akkartik" exists, and if not, clone foo from github.com/akkartik/foo.

It would also rewrite its own source code to look like:

      (import "akkartik/bar" "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15")

That means whenever someone clones your codebase, running the program would cause them to clone github.com/akkartik/bar using commit f1d2d2f9.

So it's static linking, basically. It's a guarantee that "This source code will always work, the same way (+ 1 2) will always yield 3. You could copy- paste this source code into a gist, and whoever ran it would end up running the same program."

That removes dependency hell / worrying about versions entirely. But it's not the right solution, and I've been searching for a better one. What do you think?

The problem is that it throws away the ability for the code to pull updates from library maintainers. If the import is "pinned" at commit f1d2d2f9, then you push a security-related patch to akkartik/bar, most existing code will stay vulnerable forever, because most code is never maintained after being written.

I was thinking of following that model, but using the convention that libraries are expected to use git tags in order to indicate major.minor.patch, and (import "akkartik/bar" "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15") will bump itself to the next commit if it's tagged as an increment of the patch version.

What kind of things have surprised you about Wart during development? Any unexpected pitfalls or interesting discoveries along the way? Thanks again for pointing it out!

By the way, were there any ambiguities with indentation-as-parens? I haven't thought about it rigorously, so I was just wondering if there are any corner cases to watch out for when I add it.

<comment><USER5> Thanks for the kind words! I'm particularly gratified that you found the literate/ subdirectory. There's some details about it at [http://akkartik.name/post/wart-layers](http://akkartik.name/post/wart- layers), but it sounds like you understand the point already so I'm preaching to the choir :)

 _" What kind of things have surprised you about Wart during development?"_

I stopped working on wart at some point for two reasons. First, I realized that I was falling into a blind spot shared with many contemporary programmers: blindly assuming that the way to improve the state of programming was by creating a new language. But there is more to programming than languages. Languages just happen to be memetically tempting sirens to chase after. Second, I painted myself into a corner with wart because I made it _too_ late-bound, so late-bound that it was incredibly inefficient and so hard to optimize. (I think it might still be possible, but I lost patience partly because of the previous point.) I still like my infix scheme and have a particularly soft spot for the way wart allows keyword arguments anywhere in any function call. See, for example, the use of _:from_ in a webserver implementation that makes everything so much clearer: [https://github.com/akkartik/wart/blob/ce64882c69/071http_ser...](https://github.com/akkartik/wart/blob/ce64882c69/071http_server.wart#L17). However, I've forced myself to harden my heart and ruthlessly ignore considerations of syntax, and focus on what I think are more impactful directions: conveying global rather than local structure of programs. More details: [http://akkartik.name/about](http://akkartik.name/about). In brief, I'm working on ways to super-charge automatic tests (by making them white-box, and by designing the core OS services to be easy to test) and version control (using the literate layers you noticed). It's a whole new way of programming where a) readers can ask "why not write this like this?", make a change, run all tests and feel confident that the change is ok if all tests pass; and b) readers can play with a simple version of the program running just layer 1, then gradually learn about new features by running layers 1+2, 1+2+3, and so on.

\---

 _" The problem is that it throws away the ability for the code to pull updates from library maintainers. If the import is "pinned" at commit f1d2d2f9, then you push a security-related patch to akkartik/bar, most existing code will stay vulnerable forever, because most code is never maintained after being written."_

I hadn't considered hard-coding hashes in imports, because it's historically been very hard to truly distinguish compatible changes from incompatible ones without introducing bugs. I think it's more important to give people control over upgrades than to try to improve over the current advisory+pull method of communicating security issues.

You're right that most code is never maintained after being written. But most code is also utterly unimportant to anyone including the author. So that failure of security is ok :) Trying to force concern about security only increases the moral hazard -- people get used to other people thinking about their security for them.

 _" were there any ambiguities with indentation-as-parens? I haven't thought about it rigorously, so I was just wondering if there are any corner cases to watch out for when I add it."_

The big insight, I think, is to not fear parentheses too much. A common failure mode of such approaches (like [http://readable.sourceforge.net](http://readable.sourceforge.net) and [http://dustycloud.org/blog/wisp-lisp- alternative](http://dustycloud.org/blog/wisp-lisp-alternative)) is to create too many new token types and lose the simplicity of lisp syntax. My approach instead is to a) just use parens sooner than look "outright barbarous" ([https://www.mtholyoke.edu/acad/intrel/orwell46.htm](https://www.mtholyoke.edu/acad/intrel/orwell46.htm)), and b) take it a step further and disable all indent-sensitivity inside parentheses.

Anyways, that's my two cents. The precise rules I use are at [https://github.com/akkartik/wart/blob/master/004optional_par...](https://github.com/akkartik/wart/blob/master/004optional_parens). (They're really in the first couple of sentences there.)

\---

 _" Whoaaa, you use tangle/weave! How do you like it / what do you think about literate programming?"_

Like I said above, I like it very much, especially in combination with tests and a notion of layers. Here's my take on why literate programming has failed so far: [http://akkartik.name/post/literate- programming](http://akkartik.name/post/literate-programming)

<comment><USER3> I've also been following your work akkartik by the way :] Sneaking from time to time on the arc forum. Keep up the great work!

<comment><USER5> I too was thinking on this thread that I remembered you from the arc forum :)

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> pg is that you? :)</comment>


The First Modern Pandemic - <AUTHOR> https://www.gatesnotes.com/Health/Pandemic-Innovation <comment><USER2> I do not trust Bill Gates at all in this. There is something sinister about him constantly interjecting his cause. He may have tried to change his image with his foundation, but keep in mine he's a business man first. He's not a doctor, and he got rich by squashing out any and all competition but greatly unethical practices.

His call to lock down the entire nation was completely out of touch with the fact that 25 million Americans have been without work for nearly two months now.

<comment><USER3> I work with another Billionaire businessman who is throwing himself head first into philanthropy.

They do it because they're A type personalities who have cut their teeth on gnawing through red tape and shitty market issues.

They dont want to get into politics because they (rightfully) perceive that they have more power and control as private individuals.

I'm no fan of Bill Gates, but I can see what he's doing and why. He's trying to make the world a better place, using power and business acumen. That means he's going to bulldoze people to reach the goal because thats. all. he. knows.

<comment><USER4> The danger here, as usually is concentration of too much power in one hands. That is why we have replaced monarchies with democracies mostly.

Ultra wealthy individuals are basically able to circumvent democratic political process to reach disproportionate influence unilaterally. While political establishment has some kind of check and balances (in theory) in place, super wealthy can act in a way they see fit unchecked.

There is no doubt he acts in good faith, and with best intentions. But if you ask any autocratic leader in the world, they would also say that their actions are in best interests of their nations/people.

<comment><USER5> Yes, but the inverse is a polymorphic decision loop operated by committee, which is just another way of describing a bureaucracy. And as bureaucratic complexity increases (via self-modifying policies and processes), the structure naturally tends toward greater inefficiency, which eventually results in stasis and decision failure, even though the engine of the bureaucracy just keeps chugging along. And of course with large bureaucracies, it's extremely difficult or impossible to gather enough insight and accountability to identify when a bureaucracy's inefficiencies have made some or all of the bureaucracy untenable, because that requires some unilateral force(s) powerful enough to pierce the many various veils of the bureaucracy's components to understand the sum total of its parts and adjudicate on a calculus of its inefficiencies... Which the bureaucracy was built to circumvent to begin with. In the end, bureaucracies can be _at least_ as insane and deadly as any psychopath warlord kings with little fiefdoms raiding their neighbors.

Such is the nature of our existence that we will grapple with this delicate balancing act as long as there are humans, and along the way there will be tragedies that seemed avoidable in hindsight, but which were extremely difficult to stop and essentially impossible to predict. And in the aftermath of each, of course, various interested parties will spin the tragedy into attacks on political opponents and outsiders, with the victors taking home the prize of being able to choose the next form of grift to impose on the lucky survivors: "This time, it will be different..."

<comment><USER6> I'd like to have an example for this: "In the end, bureaucracies can be at least as insane and deadly as any psychopath warlord kings with little fiefdoms raiding their neighbors." as I have a hard time to find one myself.

<comment><USER5> You could start with the bureaucracy of the Holocaust, perhaps?

<comment><USER6> Well no. Because this was a bureaucracy under the textbook definition of a "psychopath warlord king with little fiefdoms raiding their neighbors".

So, yes a "psychopath warlord king" will need a supporting bureaucracy. But that is not bureaucracy __on its own__ as bad as the "psychopath warlord king", but rather under it.

Basically my assumption is that under a "psychopath warlord king" bureaucracy will be crazy, but it won't be as bad under Democracy (which is kind of the opposite to "psychopath warlord king").

<comment><USER5> Okay, it's an issue of semantics for you, then. So picture any number of bureaucratic messes which indirectly cause death and destruction, for example the giant cache of emergency food and water sitting in a hangar at the airport in Haiti while people were suffering and dying just a couple miles away. Or organizations like USAID where e.g. money meant for medical supplies or travel costs for medical personnel or similar in some poor nation that ends up mired in red tape while drought refugees die of dehydration or starvation. You know as well as I do that this kind of thing happens, but because there's no easy scapegoat, people pretend like it doesn't.</comment></comment></comment></comment></comment></comment></comment></comment>


Best way to learn Scala/Akka? - <AUTHOR>

Hey !
I am C-Family Developer, with good experience in JS/HTML5.
I have been trying to learn Scala lately for new project, exploring the functional capabilities and actor model.
Akka is the main reason to use Scala in this project. I read that Actors are an incredibly powerful abstraction for building highly-concurrent, highly performant predictive systems.
The most books I found cover definitions, the why ? and not the how. As a developer with an experience in OOP programming, I don't need to learn things from scratch but I'd like to learn practical things.
Can you suggest good ways to learn Scala Akka, Open source projects to try, Best practices to use in such advanced programming level ?
Can you name any good books, blogs, talks to learn from it in order to widen my eyes on Scala's capabilities.
Thanks in advance. <comment><USER2> Your timing could not have been better. There's a reactive programming course going on Coursera right now. Tomorrow we will start the part that introduces Akka. You can still enroll in the class.

[https://www.coursera.org/course/reactive](https://www.coursera.org/course/reactive)

</comment><comment><USER3> Scala/akka Actors are just a convenient way for implementing asynchronous message passing, which frees your from thinking about synchronisation. I'm not sure if there's that much to learn, at least at the beginner level.</comment>


Route of GFW on Twitpic - <AUTHOR> http://twitpic.com/ky0uw <comment><USER2> Quick facts about GFW:

1\. the recent leaked info shows that the GFW and Golden Shield Project are two separate projects led by different research forces;

2\. GFW department is only in charge of R&D and maintenance; there is no direct head in response why/how a website is blocked; In fact, any government ministry can order GFW to block a website;

3\. GFW has advanced research forces and followed closely to recent advances in Internet security; For example, there are several reports about hijack Google's SSL certificate, and some reports about HTTP/HTTPS attack with GFW;

4\. Some whitelisted-IP addresses are provided to high-ranked officials.

</comment><comment><USER3> Two tips for traveling hackers: 1\. International roaming of China Mobile/Unicom/Telecom users still don't escape GFW. Roaming data traffic will redirect back to China first. 2\. For iPhone users, VPN proxy (L2TP over IPSec or less secure PPTP) is better solution than SSH or Tor. Google those freemium VPN proxy providers.

</comment><comment><USER4> That picture is somewhat misleading. Tor (and other VPNs) doesn't bypass the Great Firewall, it makes it irrelevant via encryption and offshore proxies.

If the US broadcast free Wifi across China somehow (a la Radio Free Europe), _that_ would bypass the Great Firewall.</comment>


Complexity is the enemy - <AUTHOR> http://neugierig.org/software/blog/2011/04/complexity.html <comment><USER2> You move the complexity to the system instead of the automaton.

An ant is an easily understood organism behaviorally, however, when working in unison according to a very simple set of operating conditions they generate incredibly complex behavior.

Most people want to design complex automatons that understand the entire solution space instead of designing simple automatons that interact with other simple automatons to converge on a reasonable approximation of the solution.

You can see this in the article itself where the article describes C code as clear. Yes, it's very clear to anyone reading C exactly what assembly instructions will be produced but it's about as clear as mud as to what the code is actually accomplishing. I tend to care more what the code does as opposed to how it does it which is why I prefer functional languages where I have no clue as to what assembly will be produced but have a good idea of what is actually being accomplished.

Apparently C supports something called a string but all I ever see is a pointer to a char.

<comment><USER3> The author is not saying "write C in Python," he's saying "Aim for C-style abstractions in Python." i.e. build the codebase around the bread-and-butter: function calls, iteration, reference-passing and mutability, and not around abuse of the numerous higher-level abstractions available(meta-programming, yield, exec()...). It's a lesson learned regularly by programmers as they gain experience and move towards conservativism, after having seen all their silver bullet attempts go up in flames.

A similar tenet holds for the opposite direction - the performance junkies; the tendency with experience to move away from locking in specs early and doing heavy micro-optimization, towards writing the initial code in a way that tries intentionally to make it easy to modify.

<comment><USER4> >> Aim for C-style abstractions in Python.

Worst programming advice ever IMHO. As Sir Isaac Newton used to say: "If I have seen further it is only by standing on the shoulders of giants." If you think and program in simple abstractions, you'll be unable to solve complex problems.

<comment><USER2> Newton is a great choice to use in the example as he invented calculus which is an incredible abstraction. I tend to look at the lambda calculus in the same way. Yes, calculus is more complex than algebra but once you understand it you can solve much more challenging problems because of the abstraction inherent in the notation.

</comment></comment></comment></comment><comment><USER5> Layers of indirection (abstractions) aren't bad; bad abstractions are bad. A good abstraction should protect you from having to keep lots of implementation details in your head. And C and arrays are not the epitome of simplicity. An array is a terrible way to represent most state; the OO facilities of abstract data types and encapsulation are much better. Complexity is the enemy but "weaker tools", C and arrays are no solution to that.

<comment><USER6> But in practice, how many bad abstractions are there? From what I understand the Go team sees VMs as bad abstractions and they're ubiquitous.

The Go compiler can be fast, essentially as fast as a VM. Go can already run ~3x slower than C and they haven't put much effort into optimization. V8 is ~5x slower with a larger team working longer, 50,000 LOC compared to ~12,000 LOC of Go. To get the security of a VM they discourage the use of low level stuff by putting it into an unsafe package. This makes the binaries compatible with NativeClient, which actually checks for malicious programs. Go code can be sent as text and compiled quickly enough client side.

So they get many of the features of a VM while cutting down on complexity with some clever tradeoffs. The language is not for everyone's tastes, but their fundamental approach will surely lead somewhere.

In practice people make bad abstractions constantly and build huge legacy on top of them. Lately people have been trying to clean up the mess by starting from a pretty low level, like Go and Redis.

<comment><USER7> GO is designed for distributed systems that can't afford a garbage collection hit. A function is running on one machine, and it calls out for data from 10 other machines - if one of those has a hiccup to garbage collection (i.e. it responds 1 minute later instead of 10ms) then function fails, or is delayed tying up resources.

This is my understanding of why Google is developing, I'm not too familiar with it though.

<comment><USER8> Go is a garbage collected language: <http://golang.org/doc/go_faq.html#garbage_collection>

<comment><USER7> thanks, i was misinformed.

</comment></comment></comment></comment></comment><comment><USER9> See also <http://alarmingdevelopment.org/?p=422>

... That experience taught me a lot about what really matters in programming. It is not about solving puzzles and being the brightest kid in the class. It is about realizing that the complexity of software dwarfs even the most brilliant human; that cleverness cannot win.

<comment><USER5> I like this. "The only weapons we have are simplicity and convention." Well said. I think we need to espouse a new software paradigm: DFS-oriented programming. (Dead F __*ing Simple-oriented programming.)

</comment></comment><comment><USER10> Yes, complexity is the enemy. However, I'm afraid the answer isn't that simple. If I understood you, you advocate using a low level language, mainly because that makes it hard to "get fancy." But by doing so, you are forcing complexity to go up significantly in a different way. For example, how much harder would it be to code a make tool like Rake in C than in Ruby? Yes, C might handcuff the programmer from getting too fancy, but it will result in 2 or 5 or 10 times more lines of code, and that in and of itself is complexity -- which, as you correctly stated, is the enemy.

<comment><USER11> Not sure if more lines are per definition more complex. Often they are, but check many Ruby (and Rails) gems and apps; they hide a lot at the expense of easy comprehension. That's why it is often referred to by inexperienced programmers as 'magic'; stuff in Rails works nicely _if it works_. If it doesn't work, you get to wade through miserable stacks of meta programming (with the worst debugger ever made). Give me C or Haskell (yes I know, big difference; I'm just skilled at both) any day, complexity wise. It's more about the programmer than the language of course, but the Ruby community generally seems to suffer from making stuff non transparant.

<comment><USER10> More lines does not necessarily equal more complex. But 10X more lines in a non-trivial app _definitely_ === more complex.

I agree with much of what you've said about "magic".

</comment></comment></comment><comment><USER12> I think writing Python like it was C is really bad advice.

Python's higher-level features allow for extra _simplicity_.

<comment><USER13> Yes, while we are at it, let's write C like it was Fortran.

</comment></comment><comment><USER14> Similarly, I've found that keeping the _need_ in mind that the code addresses helps keep you focused on what is core vs non-core. It also helps create a useful product that someone will want.

Apart from not having complexity in the first place, the next best thing is to recognize that software is a theory, and try to improve your understanding. Treat the first version as a learning experience, trying to understand the problem: _Plan to throw one away, you will anyway._ (Brooks)

</comment><comment><USER15> Totally agree that complexity is evil. Who hasn't seen code bloated beyond all recognition to the point where it has to be rewritte? Or fantastically complex engines where it was impossible to debug all the edge cases? The list goes on and on...

That said I wouldn't want to write Python like it's C. Every tool has it's best practices. It's funny he made that statement, Python is probably the simplest OO language there is.

</comment><comment><USER16> I like Ocaml for these reasons. It's actually a very simple language and has the C-like elegance. If you already know a few programming languages and can "think functionally", you can pick it up in about a week.

C's major win, in its time, was context-independence: people could drop into a 200,000-line C project and have a good idea of what the code they're looking at is doing. And if C code has been written well, it's not hard to look further if needed. This is not really possible when metaprogramming features like self-modifying code and insane macros are pulled out. Lisp is great in the right hands, but I've seen undisciplined "rock star" programmers produce write-only code in it and that's ugly.

Ocaml also has this context-independence, but it has most of the power of a language like Lisp, it's statically typed and functional, but it's pretty much the minimally complex language that has that power. It loses on libraries, but as far as the language itself goes, it's one of the best languages out there.

<comment><USER17> Just because you personally cannot handle macros does not make the code "read only". As I remember, your CL skill is minimal, and your macro skill even smaller.

I am the "rock star" programmer, here referred, and all my code has been easily worked on by three other people, well versed in CL, with only compliments for readability.</comment></comment>


"The 6 Books That Changed My Life in 2016" - <AUTHOR> https://medium.com/@AndrewDBass/the-6-books-that-changed-my-life-in-2016-ba3b82698cb5 <comment><USER2> how many life changing events is one expected to go through in the course of a life exactly?

<comment><USER3> Expectations predicate reality.</comment></comment>


Chinese demolition firm uses a man with a hammer instead of dynamite - <AUTHOR> http://www.dailymail.co.uk/news/article-2825457/Chinese-demolition-firm-hires-man-knock-structures-one-brick-time-s-cheaper-using-dynamite.html

<comment><USER2> Maybe it's not just explosives but going through permits and paperwork and such. I imagine there are also other costs like insurance, because you have to be covered if something goes wrong, and if you're blowing stuff up with dynamite, the premiums are probably high. There could be fees to the city for traffic closures. Also, knocking it down in one go leaves a big mess. There is also the expertise: you can't just stick dynamite wherever you like and detonate, or the thing will go sideways into another building. Charges are placed onto specific structural supports, and denotated in a proper sequence.

<comment><USER3> > you need to spend a fortune for the explosives and the license to use them, > as well as demolition experts and all sorts of insurances

</comment></comment><comment><USER3> If it takes the guy just a month to get the job done, it should be a competitive method here in Sweden too. I'd love to se a more detailed analysis of the costs involved in both methods.</comment>


Alibaba to Stop Sales of E-Cigarettes to U.S. Buyers - <AUTHOR> https://www.wsj.com/articles/alibaba-to-stop-sales-of-e-cigarettes-to-u-s-buyers-11570632981?mod=rsswn <comment><USER2> I'm bothered by the fact that most if not all news websites don't differentiate between nicotine and THC vapes. They're completely different. Illicit THC vapes are what's killing people.

<comment><USER3> Yeah as far as I read the problems were linked to illicit THC cartridges purchased on the streets tainted with hydrogen cyanide. A recent hacker news discussion about it.

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

Street drugs have always had problems with contaminants, whatever kinds of drugs they are. Unfortunately prohibition and black markets tend to lead to this sort of problem.

<comment><USER4> Why would you add cyanide to a product you're selling?

<comment><USER5> According to Wikipedia, some countries use hydrogen cyanide as an ingredient in pesticide.

<comment><USER6> To be a bit more precise: myclobutanil degrades into HCN when heated to vaporization temperature

The process of extracting and concentrating THC can also extract and concentrate this pesticide.

Imidacloprid is another pesticide with harmful effects that has been found on cannabis, but seems to be toxic itself (rather than it's byproducts)

Source: [https://www.planetnatural.com/marijuana- pesticides/](https://www.planetnatural.com/marijuana-pesticides/)

</comment></comment></comment></comment></comment><comment><USER7> I smoked for 15 years but quit last August when I started vaping. I certainly feel a lot better, my senses of taste and smell are much stronger and I don't get short of breath running up the stairs anymore. It seems almost too good to be true, I'm waiting for the report saying it's like liquid asbestos.

<comment><USER8> the good news is that it's easier to quit vaping than smoking

<comment><USER9> I quit smoking for the vape. I had a cigarette the other day and there was a deeper buzz to it than the usual nicotine from the vape. So, I am inclined to agree.

</comment></comment></comment><comment><USER10> Cheap Chinese products have been causing issues in the vape industry for years. It used to be knockoff batteries exploding, now we're seeing the harmful health effects of whatever cheap materials they're using to manufacture the coils.

The industry needs to be regulated, not outright banned.

<comment><USER11> The bans are temporary to allow investigation into cause —I think that's prudent. If you go buy anyway despite the ban, that's on you, it's not happening with government imprimatur.

<comment><USER12> Whens the last time the US government _un_ banned something?

<comment><USER11> Sure the federal assault weapons ban that expired on 2004.

Oh, forgot the other big one, restriction on embryonic stem cell research in 2009.

<comment><USER13> Alright 15 years

<comment><USER14> Oil drilling in the Arctic National Wildlife Refuge?

</comment></comment></comment></comment></comment></comment><comment><USER15> I'm blown away at how quickly this e-cig prohibition movement is taking root. As far as I can tell, all the horror stories have been from bootleg THC cartridges, rather than legitimate Juul pods. So banning sales of the legitimate product seems... counter-productive.

I suppose high school kids will just go back to smoking Swisher Sweets and chewing flavored Skoal pouches...

I don't really see how any of this is a positive direction.

<comment><USER11> Thing is I haven't read where someone can say whether it's contamination or whether it's the high heat vaporization or the combo or something else which is causing this. So given they don't have strong evidence, it would be negligent not to pull a product.

<comment><USER16> > Thing is I haven't read where someone can say whether it's contamination or > whether it's the high heat vaporization or the combo or something else which > is causing this.

You can start here, this WaPo article talks about the contaminant, Vitamin E Acetate aka alpha-Tocopherol acetate, an ester of Vitamin E and acetic acid.

[https://www.washingtonpost.com/health/2019/09/05/contaminant...](https://www.washingtonpost.com/health/2019/09/05/contaminant- found-vaping-products-linked-deadly-lung-illnesses-state-federal-labs-show/)

The PubChem article on this compound, first aid section recommends inhalation should be ceased ASAP. Also scroll down to the firefighting section, which recommends a respirator with an organic vapor/acid gas cartridge. This is because of the caustic nature of the compound when vaporized.

[https://pubchem.ncbi.nlm.nih.gov/compound/alpha- Tocopherol-a...](https://pubchem.ncbi.nlm.nih.gov/compound/alpha-Tocopherol- acetate#section=First-Aid)

This article details finding from The Mayo Clinic that the lung tissue studies revealed chemical burns.

[https://www.msn.com/en-us/news/us/lung-damage-from-vaping- re...](https://www.msn.com/en-us/news/us/lung-damage-from-vaping-resembles- chemical-burns-report-says/ar-AAIez83)

Obviously not conclusive, but also not a completely bizarre supposition that inhaling a substance that breaks down into a mild acid when vaporized might cause chemical burns.

</comment></comment></comment><comment><USER17> Even the things they supposedly police e.g. name brand sunglasses, disney / lego stuff, etc. are very easy to find on Alibaba/Aliexpress.

They might bust a couple of stores as an example, but give it a few days at most and you'll be able to get the under the description "personal steam heater" or something similar (e.g. the "interlocking block toy" lego knockoffs) - there are indices mapping keywords to brands to help facilitate this [0].

[0] [https://www.alimaniac.com/aliexpress-articles/brand-codes- co...](https://www.alimaniac.com/aliexpress-articles/brand-codes-coupons- aliexpress-tricks-find-replica/)

</comment><comment><USER18> Curious how much of this is a trade war, screw the U.S. If vape supply dries up there could be a spike in tobacco use.</comment>


Weekend project TimeToRank.com-How fast can you rank for given keyword? - <AUTHOR> http://www.timetorank.com

<comment><USER2> I'm interested to know how you are determining these ranks. I just tried a bunch of keywords that I focus on for certain sites, and have focused on for a couple of years. I know these are difficult keywords yet all but a handful turn up 0 days, 0 sites are indexed.

SEOMoz has a keyword difficulty tool (<http://www.seomoz.org/keyword- difficulty/>). I've never looked in to the methodology they use but it seems fairly accurate in its difficulty measure.

</comment><comment><USER3> You make it sound like throwing up a page about a specific keyword will help you rank after x days.

That is simply not the case, if I'm building 100 links per month & you're building 0 then my "time to rank" is going to be significantly shorter.

You need to be looking at the total number of links to the top domains, the percentage of links they have that contain the anchor text & other factors may include the inception date of the document/domain (linkresearchtools gives you this).

</comment><comment><USER4> What on earth could it be using to make this estimation? Pete?

Edit: "61.5 years is about the time it would take to rank in the top 3 results for the keyword 'google'."

Awesome, my grandkids are going to be so rich!

</comment><comment><USER5> 0 days is about the time it would take to rank in the top 3 results for the keyword 'xkcd'.

Other Interesting Tidbits for this keyword:

0 sites are already indexed.

-1 is the average Page Rank for the top results.

<comment><USER5> 0 days is about the time it would take to rank in the top 3 results for the keyword 'anonymous'.

Other Interesting Tidbits for this keyword:

0 sites are already indexed.

-1 is the average Page Rank for the top results.

<comment><USER6> Well, he did say "weekend project" ;)

</comment></comment></comment><comment><USER7> Every word I try gets 0 days?

<comment><USER8> I'm guessing this tool was using some sort of rate-limited API to get keyword data from Google, and it's been throttled. :)</comment></comment>