Have Static Languages Won? - <AUTHOR> http://pointersgonewild.com/2015/11/25/have-static-languages-won/ <comment><USER4> "Dynamic languages are at a disadvantage. Most of the mainstream ones out there today were designed by amateurs, people with no formal CS background"

Patently false. * from Wikipedia

Python: Guido van Rossum * Master's degree in mathematics and computer science from the University of Amsterdam * Recognized as a Distinguished Engineer by the Association for Computing Machinery

Ruby: Yukihiro Matsumoto * Graduated with an information science degree from University of Tsukuba, where he was a member of Ikuo Nakata's research lab on programming languages and compilers

JavaScript: Brendan Eich * Brendan Eich received his bachelor's degree in mathematics and computer science at Santa Clara University. He received his master's degree in 1985 from the University of Illinois at Urbana-Champaign.

Perl: Larry Wall .... Well I guess he doesn't have a formal CS background. But he was literally a NASA rocket scientist. [https://en.wikipedia.org/wiki/Larry_Wall#cite_ref-3](https://en.wikipedia.org/wiki/Larry_Wall#cite_ref-3)

<comment><USER5> You can also add:

Lua: Roberto Ierusalimschy * Associate professor at PUC-Rio.

Tcl: John Ousterhout * Professor of computer science at Stanford (and professor of computer science at Berkeley when he invented Tcl).

Plus, Python's design was based on a teaching language (ABC) that was designed based on actual usability research.

And, of course, this does not even count the classics (LISP, Smalltalk, Scheme) whose authors have pretty impressive academic pedigrees and whose designs inspired many of the more recent languages (e.g., the influences of Smalltalk and LISP on Ruby are pretty obvious).

</comment></comment><comment><USER6> > _You can have statically compiled languages that use type inference to > realize what is effectively dynamic typing._

Just because you don't have to explicitly write out the type does not make it any less static.

I believe that the usual arguments against languages with static typing such as verbosity and lack of flexibility are largely eliminated by the more modern languages such as Scala, Kotlin or Typescript (though typescript is more "optional typing" than static really).

<comment><USER7> > _Just because you don 't have to explicitly write out the type does not make > it any less static._

No, but not having to write the type was one of the biggest attractions of dynamic languages -- a lot of us didn't care that much for being fully dynamic, but just enjoyed the less ceremony of dynamic languages.

As for not having to commit to types for some cases, STL languages can also have a "void *" or "variant" or "dynamic" type (a la C#).

<comment><USER8> There is one other undeniable advantage to dynamic languages: you can express things in a dynamic language that you can't in a static one. Static languages try to be as sound as possible, at the cost of some completeness. Dynamic languages are less concerned with soundness and can be more complete.

As an example, duck typing is usually not possible to achieve in a static language - it's really hard to allow duck typing and remain sound (I don't actually know that it's possible, but I'm not sure either way).

Having said that, I'm firmly of the opinion that static languages are much, much easier to write in and maintain once you get the hang of whatever type system they use, and the loss of completeness is acceptable for all the benefits they bring.

<comment><USER6> Question is, how many real-world cases there are where duck typing is super beneficial. Usually if you need a bunch of differently-typed objects to fulfill the same contract, you can just make them implement an interface (said interface can also be documented, etc., it makes the intent very explicit).

I do believe there are cases where dynamic typing is genuinely useful, but those make up a very small portion of real-world problems.

<comment><USER8> I agree that duck typing is rarely critical, you can always work around it when you find you'd like to have it.

On the other hand, I disagree with the scenario you describe: if you have multiple types _that come from an external, closed-source library_ , you won't be able to have them extend a new interface. If you're lucky and they've not been marked final, you'll need to wrap them in another type that extends the right interface, then unwrap them... not at all impossible, but a lot of boilerplate.

The best solution I know of is type classes, in languages that support them.

<comment><USER9> Those sound like implementation details of a specific language (C# I'm guessing?) rather than a fundamental attribute of statically typed languages.

<comment><USER8> I don't think so, but I'd be happy to be proven wrong.

If you have a function that expects a type A, and you want to pass an object of type B that doesn't have A as a supertype, I don't know of many ways to do so. Either you wrap your B in a type that extends A, or you create a new implementation of B that extends A (this is often the same solution as the first one), or you use type classes or some variant of the concept. Is there an other option that I'm not seeing?

<comment><USER10> In Haskell, you declare that a type is an instance of a typeclass, and provide implementations for the required functions. You can do this anywhere for any type. Then, you have your functions accept any type that is an instance of you typeclass you need. Go has a vaguely similar concept. This is incompatible with subtyping, but not incompatible with static typing, and is one of the reasons fans of functional programming languages can so derisive of languages that allow subtyping.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> > _Dynamic languages such as PHP, JS, Python and Ruby, in addition to being > relatively poorly designed, are the languages that powered the explosion of > the web_

The author seems to paint a broad brush in saying all dynamic languages are poorly designed. Languages can have different design goals.

From Matz, Ruby's creator;

> _Instead of emphasizing the what, I want to emphasize the how part: how we > feel while programming. That 's Ruby's main difference from other language > designs. I emphasize the feeling, in particular, how I feel using Ruby._

( [http://www.artima.com/intv/rubyP.html](http://www.artima.com/intv/rubyP.html) )

So one of Ruby's primary design goals was programmer happiness, and in that respect it isn't not poorly designed at all. The technical 'perfection' of a programming language only matters to a point, it's us as programmers people that have to speak its language all day, and optimising for how we feel doing it is a valid design goal.

I don't think it is a valid criticism to say something is poorly designed, without looking at its design goals. Every language is poorly designed in one way or another.

</comment><comment> chaotic-good No, they didn't. This article is narrow minded and prejudiced. Of cause if we're talking about programming in general - static typing languages are often a better option. But programming doesn't ends there, there is technical computing, statistical computing, data analysis and so on. How about beating Python + numpy + pandas in data crunching or maybe R in statistics? In this fields underlying data types is almost always very simple, and because of this you simply can't benefit much from static typing.

This is not about expressiveness (the article author is wrong here IMO). It's all about flexibility and (more important) interactivity. I can do useful things in ipython console or in ipython notebook in the browser. It's like a tiny lab for small and moderately sized things, data munging, analysis and visualization, prototyping and all this stuff.

There is dynamic languages like Python, R and even MATLAB that's not going to disappear anytime soon. There is a new dynamic language called Julia that's only starts getting traction but IMO it's already more interesting then Rust, Go and Nim combined together.

<comment><USER12> > _How about beating Python + numpy + pandas in data crunching_

I'd think this sentiment misses a small bit of context.

In the above combination, Python is the glue language, which merely makes it easy to dispatch the heavy lifting. Numpy is a damn good convenience wrapper around the under-the-hood number crunching engines - which themselves are written in static languages.

I mean, have you ever tried to _build_ numpy from scratch? That thing pulls in both BLAS and LAPACK, some of the most heavily optimised libraries in the world. These fortran(!) libraries can trace their ancestry all the way to 1970's, and have benefited from aggressive optimisations done over the course of 4 decades. [0,1]

So, invoking numpy as a testament to power of dynamic languages misses a pretty important point. And I say that as someone who loves Python, and uses it as a first-choice tool in perhaps 90% of use cases.

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

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

<comment><USER13> > So, invoking numpy as a testament to power of dynamic languages misses a > pretty important point.

I don't think so. People build Numpy in a different language to the one they expose it in because those languages have different strengths.

If Numpy's source languages (including BLAS and LAPACK) were suitable for front-end usage, Python would have never entered the equation.

I think it's more a testament that _despite_ the base libraries being so freely accessible, only dynamic languages have actually built front-ends that people want to use. Even Julia is dynamic.

</comment></comment></comment><comment><USER14> Another perspective is that dynamic application programming languages were always the underdogs. Corporate Cobol/Java/C#/C++ programmers always outnumbered application programmers in dynamic languages outside the ad-hoc web scripting languages (PHP & JS).

Clojure & other Lisps, Python, Erlang, Lua, and Ruby are all application programming languages first and web languages only incidentally (1). They all have clear strengths and are miles away from the horror of JS and PHP.

I think it shows in the article that the author's thinking on dynamic languages is colored by Javascript and its propensity to hide bugs. This is worrying since it might signal that JS does this for many people :(

(1) Admittedly Ruby is more strongly associated with Web nowadays due to Rails.

</comment><comment><USER15> Article points to [http://wtfjs.com/](http://wtfjs.com/) to show "glaring flaws" of JS. JavaScript is not perfect, but almost all what is presented on sites similar to wtfjs.com are non-issues to me. It may be stupid or surprising that API behaves in some ways, but as long as it behaves exactly as in documentation it is not much of a problem. I always check available documentation even for basic APIs in every language that I use. i.e. I was amazed that even senior developers at my previous job did not know that strncpy is practically useless. It was just `man strncpy` away.

In a way static typing can save you just like reading of documentation, but in a more organized manner. That said you should still eat your ve^W^W^W read documentation.

What helps in case of dynamic languages is REPL. It is even better than documentation sometimes. You can easly check every line with your reasoning. For C or C++ I always have some simple file for testing basic constructs to check my assumptions. One could argue that that is the role of unit tests, but one does not prevent the other. Unit tests are same thing, but in more organized manner.

<comment><USER16> Two things:

a) Maxime works on a compiler for JS, so even if something is documented to death, it usually makes analyses less precise and/or more complex.

b) Many statically-typed languages have a REPL (OCaml, Haskell, Scala); this is not an issue with the typing discipline, but with the tools available to the developers.

<comment><USER17> With type inference, a REPL can even tell you things about code that can't run yet!

        Prelude> :t mapM undefined [5,6,7]
        mapM undefined [5,6,7] :: Monad m => m [b]

This can get even more informative with Typed Holes:

        Prelude> mapM _whatFunc [5,6,7]

        <interactive>:14:6:
            Found hole '_whatFunc' with type: Integer -> m b
            Where: 'm' is a rigid type variable bound by
                       the inferred type of it :: m [b] at <interactive>:14:1
                   'b' is a rigid type variable bound by
                       the inferred type of it :: m [b] at <interactive>:14:1
            Relevant bindings include it :: m [b] (bound at <interactive>:14:1)
            In the first argument of 'mapM', namely '_whatFunc'
            In the expression: mapM _whatFunc [5, 6, 7]
            In an equation for 'it': it = mapM _whatFunc [5, 6, 7]

</comment></comment></comment><comment><USER18> JavaScript, PHP, Python, and Ruby are all in the top 5 spots on GitHub. Java is the only STL that made the cut. There are certainly types of work that seem to favor dynamic languages, because they have the ability to do some interesting things. ORMs, for example, far more powerful in dynamic languages as far as I've encountered

<comment><USER19> Even PHP has trajectory toward static types. Some examples are Hack[1] and PHP7[2]. Check out the talk Rasmus gave at Etsy[3] for more about PHP7 changes but it looks like at least limited support for static or "strict" types (whatever subtle distinction that might be) has enough merit for PHP to implement after all this time.

1\. [http://hacklang.org/](http://hacklang.org/)

2\. [http://www.php.net/manual/en/migration70.new- features.php](http://www.php.net/manual/en/migration70.new-features.php)

3\. [https://www.youtube.com/watch?v=MT4rRWKygq0](https://www.youtube.com/watch?v=MT4rRWKygq0)

<comment><USER20> PHP is still a dynamic language. PHP 7 gets us scalar typehinting support, which lets us check types at run-time. There are similar annotation based solutions for Ruby as well, which ultimately rely on a lot of Ruby's metaprogramming features. The idea behind these solutions is to have proper type support where you need it.

You will have to pry duck-typing from my cold dead hands if you try to remove it from PHP/Ruby completely.

</comment></comment></comment><comment><USER21> Well, there's plenty of controversy in this one, but I think

 _Compared to CS students, the average web developer is not as passionate about programming, and not as skilled a programmer._

...probably takes the biscuit; I'm not even sure where to start with it really, apart from my complete failure to understand how "web developers" and "CS students" are supposed to be two distinct groups which are able to be compared.

<comment><USER22> Anecdotally, on my year around 75% of students were there just because CS was supposed to bring money. They've started CS studies while not knowing how to program, knowing nothing about operating systems or caring. For them it was a 9-17 future job, nothing more.

<comment><USER23> First time I've ever heard a 9-5 job called a "9-17" job. Decided to Google it to see how common it was, and all the results are for the Bible verse Job 9:17 -

> He would crush me with a storm and multiply my wounds for no reason.

Seems appropriate for some "9-17" jobs.

<comment><USER24> 17 is 5pm expressed in 24-hour time. :)

I like your interpretation as well, though.

</comment></comment></comment></comment><comment><USER25> When I have started my carrier, it was unimaginable to use a dynamic language in a serious project. I was taught(!?) that the difference of development cost was very small.

The mentalities have evolved. People know that you can drastically reduce the development costs (of small projects) by using dynamic languages. We know also that maintenance is more costly.

Static languages are always improving to support features that used to exist only in dynamic languages. Dynamic languages evolve to support optional typing. The differences are reducing, but I think there is still a need for the 2 kind of languages.

Often they are combined in big projects. For example c++/javascript in browser or c++/guile.

</comment><comment><USER26> This post and the one that prompted it both seem to be begging the question. I don't see greater percentage use of static vs. dynamic languages now compared to ten or twenty years ago.

There is a lot of interesting research into strong static type systems but that has been going on for ages (ML family of languages).

In fact, I'd say if anything there is a big surge every decade or so in dynamic languages when a new problem space emerges.

90s - Perl, Javascript

00s - Ruby and Objective-C resurgence

10s - ES6 and JS related languages

Once an area matures, the paranoid static type people come in and harden things. Then people realize they're getting nothing done and add DSLs on top for flexibility. And on it goes.

<comment><USER27> The C/C++ people aren't paranoid (JPL coders excepted). Otherwise they would be using something else.

Ada users are paranoid and Java users are concerned about project cost.

</comment></comment><comment><USER28> An alternative is optional static languages like Groovy or alternatives like python Type Hints ([https://www.python.org/dev/peps/pep-0484/](https://www.python.org/dev/peps/pep-0484/)) are better than pure dynamic languages.

<comment><USER26> I agree, I think optional or gradual typing is the future for dynamic languages.

<comment><USER29> So a big project with optional typing. How do you handle it? Each person picks a level? Or make rules that all services are strongly typed but within a method is loosy goosy?

I see the project going one of two ways. One all loosy goosy. One all statically typed. At which point what did optional typing add? Pick a side and go for it.

<comment><USER26> I see it as a gradual thing. Early in the project loosey and then as the software matures add in more typing. But yeah, everyone needs to agree on the right level for that stage in the project.

<comment><USER17> You seem to be under the impression that types are for late stage development. I find them indispensable early on. First, because they let me feel out where my assumptions conflict, often before I've gotten to writing the bit of code that will make it obvious. Second, because when my assumptions _are_ wrong, the type checker is a tremendous help refactoring - telling me all the places my old code is incompatible with my new assumptions. Both of these mean I don't need to be quite as sure that I've got things exactly right as I start coding.

</comment></comment></comment></comment></comment><comment><USER30> It seems like a reasonable argument that there has been a dramatic rise in the number and popularity statically typed languages which feature type inference: Go, Rust, C# (to a limited extent), Scala, Swift etc. They combine the performance and safety of static typing without sacrificing expressiveness.

</comment><comment><USER31> It might be an interesting contest to find the earliest reference to this debate. It isn't quite what I was looking for, but I found this short comparison of programming languages from 1972 amusing: [http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/1972002...](http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19720025540.pdf)

For example, this quote from the conclusion: "The possibility of standardization of computer languages is still remote, and in the author's opinion will remain so until standardization in hardware applied to standard problems is first achieved"

Are we there yet?

</comment><comment><USER32> I hoped to have debunked, though not thoroughly, the myth that dynamic languages cannot scale to power large projects in my recent talk at Pycon CA. Just take a look at Openstack. It's powering clouds in CERN and Yahoo! Japan where it provides the infrastructure for delivering earthquake notifications to the public -- a valuable and critical service! And it's written largely in Python.

It does rely on systems written in static languages and is itself written in one... but dynamic languages _are_ very useful for a class of problem where deferring decisions about specifics until run-time is a huge advantage. Normally this is reserved for exploratory programming but in practice it is also useful for dynamically configured systems that can introspect themselves at run-time and change that configuration or adapt to unstructured input.

 _Update_ : I'm also one of the unwashed masses that, _gasp_ , didn't go to university and study PLT. I still have a dog-eared copy of SICP, The Dragon Book, Concrete Mathematics, et al... and started by making terrible pong clones and text adventures in BASIC on an Amiga 500.

<comment><USER33> OpenStack is the perfect example of how Python doesn't work well for larger projects. It's only because of an absolutely massive investment in testing that OpenStack works at all. I think it's more accurate to say that OpenStack works despite an unsuitable choice for implementation language.

<comment><USER32> I assure you that even if you wrote it in Haskell you'd have a few unit tests and integration tests in there.

<comment><USER34> I don't think he claimed otherwise. There's a difference between a code base that makes judicious use of tests to validate business logic and one that relies on the test suite just to keep it from falling apart. I've worked on the latter, so I know ;)

I'm not making any representations as to whether or not this is true of OpenStack. I honestly wouldn't know.

<comment><USER32> I can assure you, as an active technical contributor, that the testing infrastructure in Openstack is verifying business logic, ensuring consistent coding standards, running unit tests and code coverage, and all of the usual activities associated with delivering reliable software. The difference for many projects is the scale at which it is automated thanks to the Openstack Infra and QA teams.

Any suggestion that Python code cannot possibly execute without it is an exaggeration.

</comment></comment></comment></comment></comment><comment><USER35> Won ... for what job? Dynamics have their places.

</comment><comment><USER36> Availability of an interpreter has been one of the major advantages of programming in dynamic languages. With languages like Haskell, Scala coming with first class interpreters, this advantage is being lost to a certain extent. I think it should be possible to build interpreters even for mainstream static langs like C++ and Java, they probably exist already, though I'm not sure why they haven't found larger acceptance.

I believe the biggest advantage with a good static type system is that programmers can design good datatypes and specify their relationships - <USER2> the compiler can then detect any inconsistencies(ideally anyway).

<comment><USER29> Java take too much boilerplate. Who wants to use it in an interpeter?

I do use a interpreter with both scala and python a lot.

</comment></comment><comment><USER37> I don't know, I'm taking a Program Analysis graduate seminar this semester, and my take is that the techniques for dynamic analysis are getting halfway decent.

It's also interesting to compare Python and JavaScript. Holkner and Harland did a pair of papers about those two communities' usage of dynamic typing - <USER3> people do type changes throughout the program execution, but after initialization the Python people follow the Aycock quote: "Giving people a dynamically-typed language does not mean that they write dynamically-typed programs." Languages have different characteristic programs, to some degree.

</comment><comment><USER38> Static Languages won? That's not just a bit premature; it's bizarre. Several of the most popular and effective languages at the moment are dynamic: Python, Javascript, Ruby, PHP, all the LISP derivatives.

I don't doubt that lots of new static languages have popped up, but how many people actually use those? Plenty of people use static languages, true, but those are mostly the old ones: Java, C, C++, C#, and Haskell and Scala.

Any claim that this has been settled by some new languages nobody is using is bizarre.

</comment><comment><USER39> Static languages haven't "won".

There's just not much point in creating a new dynamic language.

Ruby is flexible enough to turn into a DSL for whatever. Python does it's job very well. Lua has it's niche. Javascript is everywhere now.

What can a new dynamic language do that isn't easier to accomplish with libraries?

So most of the language development has gone towards making static typing easier to use. Improving on C++ / Java is easy. There are interesting ways to go about it with no clear right answer.

</comment><comment><USER40> They have won in theory: they are arguably better in every way than dynamically typed languages (DTL) in the sense that they offer all the advantages that used to be unique to DTL and, obviously, also all the advantages of STL (automatic refactorings, performance, ease of maintenance, etc...).

Javascript is the last serious holdover of the DTL generation but even it is showing tendencies to be replaced by STL (Typescript, Dart). It will take a while, though, but the trend is clear.

<comment><USER41> Replaced? I can't see that happening in the next 5 years (an eternity in this business) Supplemented with tools like Flow? That's already a huge thing, and it's part of the React and React Native tool belt.

<comment><USER42> The whole reason Flow was invented was because Javascript was un-managable at scale without types. The whole "both" (i.e. gradual typing a la Typed Racket/Clojure/TypeScript) is probably solution. Interestingly the author has an article on that too which is a fairly good read[1].

[1] [http://pointersgonewild.com/2012/11/09/static-vs-dynamic- why...](http://pointersgonewild.com/2012/11/09/static-vs-dynamic-why-not- both/)

</comment></comment></comment><comment><USER43> Sweeping statements like "X programming language/paradigm has won" do an injustice to the wealth of uses of programming. You wouldn't use the same programming language to write code for an Arduino, a startup MVP web application, an enterprise desktop application etc. and there's no reason you should.

Personally I developed most of my web apps in C# but I find Python great for prototyping and data analysis tasks. Why is there a need to declare a winner?

</comment><comment><USER44> I think it can certainly win as the type systems / inference get better, and languages with those characteristics are ported to mature platforms with good libraries, etc.

The real appeal of what we today call "dynamic languages" is leaving type- checking up to the programmer, so in essence all programs are typed - just so happens that some don't formalize it inside the code.

A good compromise until then is gradual typing.

</comment><comment><USER45> Short answer, no they haven't and they won't.

</comment><comment><USER7> No, Javascript has won, and it's dynamic.

But people are starting to appreciate static typing assurances and IDE conveniences.

</comment><comment><USER46> You can go far, quickly with a dynamic language and that's often what you need in a startup environment.

</comment><comment><USER47> Are go/rust really that popular? I always thought they are even more niche than clojure.

<comment> ainar-g Both RedMonk [1] and TIOBE [2] indexes (both flawed, but better than nothing) show that Go is somewhat more popular than Clojure. Rust is still behind, but it hit its 1.0 relatively recently, so it's just getting started.

[1] [http://redmonk.com/sogrady/2015/07/01/language- rankings-6-15...](http://redmonk.com/sogrady/2015/07/01/language- rankings-6-15/)

[2] [http://www.tiobe.com/index.php/content/paperinfo/tpci/index....](http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html)

</comment></comment><comment><USER48> In academia and corporate? Sure.

In real world? Php, Python, Ruby and Javascript still reign supreme.

Mobile is another story since main platforms are controlled by corporations, but if it were for the hobbyists neither java nor swift would have had a chance.

<comment><USER49> In what sense are academia and corporate not "the real world"?

</comment></comment><comment><USER50> Which static language should supposedly have won?

<comment><USER51> > Which static language should supposedly have won?

It's absolutely not that specific static languages have "won". But rather that the latest crop of static languages have proved that the oft-cited downsides of static typing, e.g. type stuttering in declarations, can be pragmatically addressed by other means, e.g. type inference. As such, the cost differential of static languages over dynamic is reduced to near-zero, and all of the benefits remain.

I don't really see an argument, or really counter-argument, in the linked post. The author complains that the current crop of dynamic languages are badly implemented, but I'm not sure that holds water when you look at e.g. Clojure. They claim the chief advantage of static languages is IDE support/integration, but that seems like a strawman to me, a fringe benefit of the real, structural advantages of an explicit type layer.

<comment><USER50> So basically Scala and Haskell? I've tried Go but was turned off by the complexity of writing a sort function - an artifact of static typing. Seems to me you'll always end up with something like generics which becomes complicated quickly?

<comment><USER29> I mean every language has a baked in sort function, so maybe that is a bad place to start :)

Java collection signatures are not super complex but they have fundamental bugs fixed in the slightly more complex scala collections type signatures.

<comment><USER50> No I mean using the sort framework of Go. It takes several steps to set up a comparator function.

compared to list.sort(function(a,b){return comparisonResult}) that was very demotivating to me.

<comment><USER34> It seems like quite a few people have found that the simplicity of Go's type system just winds up transferring the complexity to your code base, instead of in the language implementation. I find it interesting how divided the opinions are on this.

</comment></comment></comment></comment></comment></comment><comment><USER52> Betteridge's Law of Headlines

[https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...](https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines)</comment>


Theano is dead - unkown-unknowns https://groups.google.com/forum/m/#!topic/theano-users/7Poq8BZutbY <comment><AUTHOR> This editorializing is both inappropriate and hyperbolic.

I'm not sure why this post seems fail merging automatically but the topic has been posted recently and received some attention.

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

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

<comment> unkown-unknowns From the link:

> After almost ten years of development, we have the regret to announce that > we will put an end to our Theano development after the 1.0 release, which is > due in the next few weeks. We will continue minimal maintenance to keep it > working for one year, but we will stop actively implementing new features.

Summarizing this as "dead" is not hyperbolic IMO.

<comment><USER2> > Summarizing this as "dead" is not hyperbolic IMO.

Theano is a Python library. Software doesn't die once someone decides that the design and implementation stages are over and the project enters the maintenance stage. The software remains operational and in use, and if bugs are found they will be squashed. That's it.</comment></comment></comment>


Golden Age of the Grift - <AUTHOR> https://www.the-tls.co.uk/articles/public/con-men-eric-iannelli/ <comment><USER2> I wonder how many articles I have only partially read. I got down to the subscribe to email list and large advertising and was going to hit back. I thought it was either an excerpt or a really short article.</comment>


Login problems to Atlassian services - <AUTHOR> http://status.atlassian.com/incidents/kz9n65qlcljd <comment><USER2> It is actually somewhat fascinating that this isn't on the Hacker News front page. It's almost as if no one cares, there's extremely little coverage anywhere. If Github have just a minor hiccup the Internet explores in "Githubs down" coverage.

Atlassian is huge, and they have an enormous user base, but apparently they and completely different segment of user that those who visit Hacker News. The amount of people who is currently unable to get their work done must be absolutely massive.

<comment><AUTHOR> For what it's worth, the issue was only on people who were not logged in or their session had not expired. My session was stil "alive" so I was able to use our instance.

</comment></comment><comment><AUTHOR> >> This incident affects: HipChat (Login) and bitbucket.org, Confluence Cloud, getsupport.atlassian.com, JIRA Cloud, jira.atlassian.com, my.atlassian.com, support.atlassian.com, community.atlassian.com.<<

Our team has not been able to login on Jira all day. But at least we're not part of the people having to debug this. Hugs and prayers! :)</comment>


Dear Postgres - <AUTHOR> http://www.craigkerstiens.com/2017/10/12/dear-postgres/ <comment><USER2> Nice to see a "Dear <open source project>" that was a full blown love letter instead of a critique!

<comment><USER3> I was dreading the big "BUT + <arbitrary rant>", and indeed, it never came.

I share many of the views of the author. It's a great piece of software.

<comment><USER4> Yeah, I could quibble about how the XML support in Postgres is not really equal to an XML database--it's still limited to xpath/xslt 1.0, and no xquery --but the fact that is has any at all is still handy and useful. I mean, I guess it would be too much to ask for it to do _everything_.

<comment><USER5> And if you need that, you can easily write a function to do it in one of dozens of languages – from pl/SQL to pl/V8, or even pl/C – or even directly write an extension (and I think there are already a few for that purpose)

</comment></comment></comment></comment><comment><USER6> > In the early years you had the standard format of index b-tree that most > database engines leveraged. Then quietly but confidently you started adding > more. Then came K-nearest neighbor, generalized inverted indexes (GIN), and > generalized search-tree (GiST), only to be followed by space partitioned > GiST and block range indexes (BRIN). Now the only question is which do I > use?

I also wonder which index is appropriate for which case. I googled out this [1] and obviously all the chapters from 62 to 65 at [2]. I'm putting them on my reading list and posting them here just in case somebody else is asking the same question.

[1] [https://devcenter.heroku.com/articles/postgresql- indexes](https://devcenter.heroku.com/articles/postgresql-indexes)

[2] [https://www.postgresql.org/docs/current/static/internals.htm...](https://www.postgresql.org/docs/current/static/internals.html)

<comment><USER7> B-tree for most 'normal' data. You mostly only need the other indexes for cases where your data isn't just simple values, like if your column contains stemmed search terms or arrays or JSON.

If you're using ORM, then your ORM documentation should be telling you which index is the most appropriate if it isn't a b-tree.

There are also some corner cases where you can see a speed up if you have tons of data that's being written in an append-only manner, but for the most part b-trees are the way to go for chars, ints, bools, etc.

<comment><USER8> I haven't found an explanation of when to use BRIN indexes that works with my brain. anyone have a good link?

<comment><USER9> I wrote [http://pythonsweetness.tumblr.com/post/119568339102/block- ra...](http://pythonsweetness.tumblr.com/post/119568339102/block-range-brin- indexes-in-postgresql-95) because I had the same problem, maybe see if it works for you

<comment><USER8> Awesome, thank you

</comment></comment></comment></comment></comment><comment><USER10> At the top:

> I've always felt an affinity for you in my 9 years of working with you.

At the bottom:

> Postgres, I just want to say thank you for the past ten years together.

It's only logical to assume that it took him a year to write the letter. :)

<comment><USER3> > It's only logical to assume that it took him a year to write the letter. :)

In German we say "gut Ding braucht Weile", i.e. "A good thing takes time".

</comment></comment><comment><USER11> And specifically, thank you Postgres contributors and maintainers for your time and energy. You've done your community and peers an invaluable service.

</comment><comment><USER12> Postgres falls into the category of things which should be considered defaults. Yes, sometimes an alternative choice is indeed the correct one, but generally if a project isn't using Postgres it's wrong.

It really is excellent.

</comment><comment><USER13> Not critiquing but more curious, why does Postgres seem to get so much love while MariaDB is mostly ignored on HN?

<comment><USER14> I prefer Mysql/MariaDB's `show tables` vs Postgres' `\dt`. And other commands. More like sql.

<comment><USER5> Postgres has similar SQL commands.

Commands that start with \ are shortcuts in the psql client that are translated into SQL commands.

You can always use SELECT * FROM pg_tables; and operate on those tables as if it was a normal SQL relation (because it is).

Additionally, if you use psql -E, it shows you the SQL it runs for such shortcuts. For \d (Show relations) it runs:

        SELECT n.nspname as "Schema",
          c.relname as "Name",
          CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' WHEN 'f' THEN 'foreign table' END as "Type",
          pg_catalog.pg_get_userbyid(c.relowner) as "Owner"
        FROM pg_catalog.pg_class c
             LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
        WHERE c.relkind IN ('r','v','m','S','f','')
              AND n.nspname <> 'pg_catalog'
              AND n.nspname <> 'information_schema'
              AND n.nspname !~ '^pg_toast'
          AND pg_catalog.pg_table_is_visible(c.oid)
        ORDER BY 1,2;

<comment><USER14> Good thing there is a shortcut :)

Can you do `alter table` on pg_tables?

<comment><USER5> pg_tables is a view, which only loads data from a few other internal tables, but you can modify many of them, yes. (And many extensions do that).

Specifically, pg_tables is defined as

        CREATE VIEW pg_tables AS SELECT n.nspname AS schemaname,
            c.relname AS tablename,
            pg_get_userbyid(c.relowner) AS tableowner,
            t.spcname AS tablespace,
            c.relhasindex AS hasindexes,
            c.relhasrules AS hasrules,
            c.relhastriggers AS hastriggers,
            c.relrowsecurity AS rowsecurity
           FROM ((pg_class c
             LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace)))
             LEFT JOIN pg_tablespace t ON ((t.oid = c.reltablespace)))
          WHERE (c.relkind = ANY (ARRAY['r'::"char", 'p'::"char"]));

<comment><USER14> Cool. I like the Posgres is written in Postgres. Of course, the normal commands for changing the schema are a better approach.

</comment></comment></comment></comment></comment></comment><comment> Chiba-City Stonebreaker's Ingres Papers revenge. The Berkeley IT crowd was remarkably generative of good and enduring outcomes. Their Free/Open Cathedral efforts still anchor our frothier bazaars. Great read.

There are vast real world application domains globally where Postgres one stop shopping for both infrastructure, dev targeting, training and MRO is the clear win with negative returns on BFC better faster cheaper.

Good enough and comfortably familiar haptics is really important. The worldly focus brings us worldly wins. We apply the applied math tools to human concerns to find jobs solving problems and not get jobs to solve our problems. Balancing those two sets of problem is the act.

</comment><comment><USER15> +1 it's a great piece of software that delivers tremendous value to users and continues to add amazing features every year. Cheers and thank you to all the maintainers and contributors.

</comment><comment><USER16> any good resources for going deeper on the analytical capabilities of postgres? ya know, beyond basic window functions. How can i leverage stored procs etc?

<comment><USER17> Look into PL/pgSQL [1]. PostgreSQL also offers a few other languages such as Python and Perl [2]. Please note that the individual extensions have to be installed.

[1]: [https://www.postgresql.org/docs/current/static/plpgsql.html](https://www.postgresql.org/docs/current/static/plpgsql.html)

[2]: [https://www.postgresql.org/docs/current/static/server- progra...](https://www.postgresql.org/docs/current/static/server- programming.html)</comment></comment>


Thoughts after a Month with Blackphone (2014) - <AUTHOR> http://www.droidsec.org/news/2014/09/30/thoughts-after-a-month-with-blackphone.html <comment><USER2> I think Blackphone is taking a fundamentally wrong approach to security. If it is a #1 concern, then it shouldn't be a phone at all. It should be more of an iPod Touch type device. It's pretty disingenuous to promise security when you don't even know how the baseband works.

<comment><USER3> I've actually been wondering, why isn't there a iPod touch style Android device? I'd much rather have something like that and have a standalone wireless hotspot for the rare case I'm off wifi.

<comment><USER4> Why? You can just buy an unlocked phone and not put a SIM card in, right? A Moto E is $40 on Amazon: [https://www.amazon.com/dp/B00XQVDW6Y](https://www.amazon.com/dp/B00XQVDW6Y)

<comment><USER5> That phone is not unlocked. It says it works exclusively with US Celluar.

<comment><USER6> The important part is no-contract, not unlocked. If you're not getting service for it the carrier doesn't matter.

</comment></comment></comment></comment></comment><comment><USER7> See also PHK's Blackphone reviews (December 2015):

· [https://www.version2.dk/blog/blackphone2-review-1-508188](https://www.version2.dk/blog/blackphone2-review-1-508188)

· [https://www.version2.dk/blog/blackphone2-review-2-545078](https://www.version2.dk/blog/blackphone2-review-2-545078)

</comment><comment><USER8> Seems to me copperheadOS seems to be better on all fronts compared to blackphone- open, more functions, and some of it's fixes have been accepted into ASOP.

</comment><comment><USER3> First step is to obtain root? I understand choosing not to use root for day- to-day activity but how in the world can a device be considered secure if the user is not allowed full control of the OS when they want it?

Edit: Oh, it's also not open source. This device is pointless.

</comment><comment><USER9> This should get labelled 2014. Interesting nonetheless.</comment>


NPR: 'In Defense of Looting' After Kenosha Uprising: Code Switch - <AUTHOR> https://www.npr.org/sections/codeswitch/2020/08/27/906642178/one-authors-argument-in-defense-of-looting <comment><USER2> Regardless of my thoughts on this horrendous stuff, can we please not have this here? It's plainly just the usual comment bait.

This site needs far less politics and way more tech.

<comment><USER3> dang needs to establish zero politics but won't do it.

<comment><USER4> [https://news.ycombinator.com/item?id=17014869](https://news.ycombinator.com/item?id=17014869)

<comment><USER3> Setting to one side my pet forum slide issue - there is a chance current events blow up into something worse so your responsibility is to think super hard about what is right if that happens.

Obviously we butt heads in many ways - but good luck!

<comment><USER4> Super hard thinking thrusters engaged

<comment><USER3> May the force be with you.</comment></comment></comment></comment></comment></comment>


Women Had Nothing to Do with the Founding of the Web, Says Mashable - <AUTHOR> http://www.audreywatters.com/2010/07/04/women-had-nothing-to-do-with-the-founding-of-the-web-says-mashable/

<comment><USER2> This article is what they used to call "putting the cart before the horse." She starts out with the assumption that women must have been just as influential in creating the modern Web, based on that assumption condemns this other woman (!) for her patriarchal views, and then — still working from her original assumption — offers a list of women who should have been included. The fact that none of these women had much to do with creating the Web is irrelevant, because it's an a priori fact that women deserve to be on the list.

It's basically an unintentional reductio ad absurdum.

I'm all for giving credit where credit is due. I think Ada Lovelace should be an inspiration to all hackers. But she had nothing to do with the Web. Trying to shoehorn women into a list that no woman rightfully belongs on is desperate at best and patronizing at worst.

<comment><USER3> Every time someone brings up "exclusionary language" or calls a word sexist, I roll my eyes and long for feminists to collectively declare victory and leave the field so humanity as a whole can move on.

Young women aren't put off by the phrase "founding fathers", not even the tiniest bit. Maybe the root cause of the gender imbalance is biological or maybe it's political, but the one thing I'm certain of is that pieces like this only serve to reinforce perceptions of inequality. Do something positive instead -- get kids involved in engineering and computer science.

</comment></comment><comment><USER4> Someone kick me if this isn't progressive enough, but I don't think any of the women listed really should have been on the list. The others are figureheads for web-focused projects. None of the women listed (with the exception of Sally Floyd, whom I've never heard of. I might just be ignorant) were really at all involved directly with the web. Even Java isn't primarily a web platform.

I'm more disturbed that those are the best examples the poster can come up with. Are there other women who really should have been listed in the article? If so, terrific. If not, why not? Is there an underlying problem with the hacker image that should be fixed?

<comment><USER5> It's a pathetic list, and proves the opposite of what it intended to. Basically women aren't generally willing to devote their lives to the kind of intellectual pursuits that 90% of the time end up with you being poor, downtrodden, old and alone. They just play the odds better. They give up the top 10% to avoid the bottom 10%. And then they write articles about how they're excluded from the top 10% because of their gender.

<comment><USER6> "Basically women aren't generally willing to devote their lives to the kind of intellectual pursuits that 90% of the time poor, downtrodden, old and alone."

But women are totally willing to devote their lives to the kind of pursuits like caring for the children, sick, and elderly in their family that 90% of the time result in them being poor, downtrodden, old, and alone. They just play the odds better by doing work and not getting paid for it. And then on top of that, they write articles about how it sucks. These women are getting out of control!

I think the list was right to include only men. But your idea that women aren't willing to devote their lives to intellectual pursuits 90% of the time is disgusting. Most people only paid for their sons to be educated. What kind of intellectual pursuits from 90% of women would you expect to magically appear from that scenario? Now that it's acceptable for women to be educated. They make up 55% of college students, so we can probably expect more contributions in the future. Sure computer science and engineering are severely lagging, and it will take some time and effort to introduce that field to more women, but it's not because "women aren't willing to devote their lives to those kinds of intellectual pursuits"

</comment></comment></comment><comment><USER7> That was pretty dumb. She finds most troubling the omission of the woman who was project manager for Java. If Java were to be represented on the list, in what universe would the project manager be the person to represent it, as opposed to say someone like Gosling?

</comment><comment><USER8> Strange article. She appears to argue for her own title and against the notion that women were involved in founding the web by presenting a lame and irrelevant list of geek ladies.

Given that the mashable list included the LiveJournal founder she'd have been safer suggesting Caterina Fake than Kim Polese.

</comment><comment><USER9> Her list is ridiculous. The male equivalent would be Alan Turing, Dennis Ritchie, Steve Wozniak, a guy who worked on TCP, and, I dunno, Guido Van Rossum's boss or something. The true founders of the internet.

The original list is kinda silly too. Three spots for PHP? Really? PHP is important, but not _that_ important and shouldn't even be above JavaScript anyways.

</comment><comment><USER10> This article is indicative of a culture that has become far too focused on being "politically correct" and less focused on everything else. Seriously? This is ridiculous. "Founding fathers" is neither elitist nor sexist. It's a phrase that doesn't evoke any sex at all — it simply means a person who helped start something. Please, just grow up.

</comment><comment><USER11> Ironically, the Mashable article is written by a woman, though who knows how much control she had over the list and title.</comment>


The Fastest Stars in the Universe May Approach Light Speed - <AUTHOR> http://www.wired.com/2014/12/superfast-stars-black-holes/

<comment><USER2> Has anyone looked at the relativistic effects of time that would take place with planets orbiting a star moving at such speeds? For example if the vector of the stars movement lied along the same plane as the planet's orbit, the definition of a second would change with the seasons. Even if the time of day.

If you look thought a telescope to observe a pulsar you'd see massive spectral and frequency shifts depending on the season! It would be interesting to know if these factors lead aliens to developing relativistic theories faster then humans.

I'm just a science fiction nerd at heart, so this is instantly where my mind jumps too.</comment>


Ask HN: Have you ever been a one man Geek Squad? (Of course you have) - <AUTHOR> I'm planning to go into business for myself (a "startup," surely you've heard of them) and providing the local citizens with an alternative to the Geek Squad. For those who don't know, Geek Squad is owned by Best Buy and they provide home installation and support of various electronics. Problem is, they suck. Or, at least, I know I can do it better.
Essentially, I want to be the computer guy for people who have little or no computer experience, but also provide support for people who know what they're doing but don't want to get ripped off by the Geek Squad. You know, a computer handyman with an old-timey-doctor feel. Walking in with my stethescope and big medical bag of tricks, telling the user to use Firefox instead of IE and to drink lots of fluids.
The problem I'm running into is that I know the "What" but not the "How." My starting point will probably be to see what the Geek Squad charges. Then, I'll see if there are any other local computer handymen and what they do and what they charge. Then, when I'm sure how to go about it I'll get the word out.
My question is how did you/would you go about it? If you've done it before, what was the experience like? What problems did you/do you run into? Are there any books/websites that you would reccomend for first-timers managing their own business?
Feedback is much appreciated. <comment><USER2> This is not a startup...it's a small business. Nothing wrong with that, of course. A small business is awesome, and generally better for your finances and emotional well-being than working for someone else. But, it doesn't have the same end result as a startup, and the way you build one successfully is very different.

I've done contract work for a few small businesses over the years, similar to the business you describe (though I charged more than Geek Squad, and provided somewhat higher end services...like Linux and UNIX administration, network infrastructure buildouts, etc.). The yellow pages got me two jobs in the two years that I ran an ad (and a helluva lot of crazy people who wanted me to tell them how the government kept finding out what they were doing on their computer, or tell them how to find out what their spouse or child was doing on the computer, and for free). So, that's a non-starter. Advertising on Google AdWords, with very specific targeting might be the ticket. It's how I found the dog walking and sitting service I use, and probably other services.

Check Craigslist for people looking for some work in your areas of expertise. It'll be bigger projects, of course, but it'll help with word of mouth. If you do a good job, it only takes a few customers to kickstart a good career as a contractor. If you always plan to increase your rate and the complexity of services you offer, you can definitely get to $100-$150k/year in a few years, at which point, you can either start hiring other techs and build your own Geek Squad (maybe even turning it into a startup!), or just keep working, and tucking away 20% each year. I know several folks who retired in their early fifties on this plan, and with a couple million in the bank (I inherited a few of their clients).

Personally, I found the work...ummm...frustrating, and draining, and far more stressful than I was comfortable with. I was really good at it, and I kept cranking up my rate until I was making $150/hour, and clients were happy to pay it. But, it just wasn't my bag. You won't know until you try, though.

<comment><AUTHOR> Thanks, you've given me a lot to think about.

</comment></comment><comment><USER3> Quick Version:

1) Charge at least 45/hour. Yes you can charge less, but no it doesn't scale. I might even go higher. You have to make enough so you can pay all the fun taxes and insurance premiums you need -- even if you decide to skip out of them for a while.

2) Have a minimum hour block. Back in the dark ages, I used to have a 3 hour minimum. So if you had a problem and were willing to pay for 3 hours, I would come (to your business) and fix your computer. Now that I'm in management consulting I charge by the day. If you don't block out your time, your clients will make your life hell.

3) Knock on some doors. Best way to make sales. Go downtown and start knocking on doors. Ten bucks says within the first 20 doors you make a sale. Repeat and rinse.

4) Never work for free. That means NEVER. Even for your mom. Word will get out and you'll end up too busy to work your business.

5) Be ready to refund people's money. I used to have one rule: if you're unhappy in any way, you get your money back. Sure -- I got jerks. But I never dealt with them twice.

6) Enjoy the performance. On-site consulting is like one of those plays where the audience gets to participate. Know your stuff and be good at performance art. Remember to the end-user, they have no idea of what anything is worth. Their stuff is broken and you can fix it. So when you do, do a good job. Do extra work. Ham it up a bit. Tell some jokes. Have fun. People will remember you in a happy way, even if their wallet still stings. <\-- That's exactly the way you want to be remembered.

<comment><AUTHOR> I appreciate it!

</comment></comment><comment><USER4> My own two cents:

I wouldn't do this because your customers are cheap idiots _who don't realize they're cheap idiots_.

I personally don't think the small amount of money you make is worth the headaches you will face. I think you'll have better luck targeting small businesses as "outsourced IT" help than targeting home users.

Good luck to you though, regardless.

<comment><USER5> I mostly agree. The single most important thing you have to do when starting a company (esp. without funding) is to choose the right customers.

How efficiently can you reach them? How well can you turn these leads into customers? What is their willingness and ability to pay, i.e. how much would your service be worth to them (e.g. in otherwise lost productivity)?

The last point kills a lot of consumer market segments for smart small business startups, because the ratio of customer acquisition costs and overhead to revenue is too crappy, aka profitability sucks, aka you're in the red too long and growth/scalability are limited.

Good luck!

<comment><AUTHOR> You've given me some things to think about and I appreciate it.

</comment></comment></comment><comment><USER6> It sounds like you haven't ever actually done what you propose to do. I think you'd be better off getting a job with one of the outfits you intend to mimic, first.

Like SwellJoe, I've also been contracting for a number of years.

Early on I went to the homes of computer users and fixed their problems. Let me just say, those were some of the worst experiences of my tech career. Don't get me wrong, if going into a stranger's home, often into their bedroom or other intimate space, and mingling with their pets, breathing their smoke or other noxious odor is your idea of a great way to make a buck (I use that term loosely), then this is EXACTLY what you should be doing. I personally can't stand it and will never do it again. I often get employees of my clients asking me if I make housecalls. The answer is always no.

If you ever intend to make money supporting businesses then you should be employed with a company that does that in order to learn the ropes and truly identify the needs of that market. It sounds like all you have right now is your anecdotal opinion of what Geek Squad is, or does. If you think you're going to make any useful amount of money visiting individual homes, you're likely in for a rude awakening.

The way I did it was to consume all things tech while I had another job and occasionally help friends, family, and referrals with their computer problems. That never did anything but give me occasional lunch money. I then took a couple of MCSE courses because I got them cheap. With those courses and some confidence that I knew wtf I was talking about, I got a job with a company that had a larger company as its client. I worked for that company for a year fixing 5-10 computers a day (I was one of several supporting 800 users). I left that job straight to contracting because I actually knew something then. I had actual experience in the corporate support world.

I was an employed contractor for 3 years after which I went completely solo. That was 7 years ago. Today I (me, solo) support about 80 computers across 4 clients and I do web development as it comes, by referral. My rate is $95/hr. and I've been told I could/should raise it many times.

Hope this helps.

<comment><AUTHOR> It does and it echoes something a friend of mine told me to do. He said the same thing you did which was to get experience working at the Geek Squad or something similar to see how its all done. Thanks for your input.

</comment></comment><comment><USER7> I used to love a small business in my local town that used to do this. He sold cheap, korean PC hardware and charged by the hour to fix problems for people. He had a real store front and was in business for at least 5 years before Best Buy moved into town and took his business away. I think that small companies like this are a dying breed and sorely missed. I like Best Buy but only because they seem to be the only game in town. If you do a good job with your little mom-n-pops place, then work will travel around and you'll probably do ok, but the main thing that you need to worry about is losing business to the big-box retailers who do service as a second business.

Perhaps advertise using huge signs on the front of your storefront telling people that you're a better Geek Squad than Best Buy or something would help you out.

Small car repair places still exist and do well against the dealerships in the automotive industry, but they do it via undercutting the service price and doing a good job and advertising using local media and word of mouth.

If you feel like you will get enough clients to support your business, then more power to ya!

<comment><AUTHOR> Thanks!

</comment></comment><comment><USER8> i've actually considered doing this.

something to consider is nerds on site, which is basically an international group of contract workers doing what you're doing, but they provide a network of support for the process.

something worth considering is providing the service of at least attempting to diagnose problems via VNC, instead of making house calls like geek squad does. provides the one-on-one support by inspecting the computer, but doesn't incur the cost of making a house call. it'll probably be easy to spin it as beneficial, since one wouldn't have to cough up a house call bill for a minor issue.</comment>


Show HN: Go-acme, a Let's Encrypt (ACME) client authorizing domains in parallel - <AUTHOR> https://github.com/riobard/go-acme <comment><AUTHOR> Author here. I need to issue a multidomain certificate (over 2 dozen SAN) using Let's Encrypt. Existing clients authorize domains one by one (avg. 2~3 seconds per domain), which is rather slow. So I wrote my own in Go to authorize all (up to 100) SAN domains in parallel.</comment>


Ask HN: Ruby on Rails performance optimisation blogs or books? - <AUTHOR>

Are there any Ruby on Rails performance optimisation blogs or books?
I couldn't find any good resources, but there must be some experienced RoR/Rubyist people here can answer my question and share where they learnt all these optimisation tips.
What I am looking for is blog or good books: 1. Production server optimisation, good production server setup and configuration 2. Best practice profiling/benchmarking tips
Thanks! <comment><USER2> I found <http://railslab.newrelic.com/scaling-rails> very useful - its a series of short, informative videos about scaling rails and web-apps in general.</comment>


Effective learning: Twenty rules of formulating knowledge (1999) - <AUTHOR> https://www.supermemo.com/en/articles/20rules <comment><USER2> There are some really good tips here but I think it only glosses over the most important one which is purpose. I've been reading how important it is to have an intellectual need when learning maths even if that need is just to solve a current problem (instead of being given the concepts first without struggling).</comment>


Dutch plan vast windfarm island in North Sea - <AUTHOR> https://www.theguardian.com/environment/2017/dec/29/is-this-the-future-dutch-plan-vast-windfarm-island-in-north-sea <comment><USER2> So, I wonder, what's the problem? There's been some talk about this for years.

The British already have some projects underway to build there quite soon, example: [http://www.forewind.co.uk/projects/dogger-bank-creyke- beck.h...](http://www.forewind.co.uk/projects/dogger-bank-creyke-beck.html)

</comment><comment><USER3> Once they're there, they might as well build some fish farms, if it's possible. That would be quite a sight.</comment>


Our Multi-Tenancy Journey with Postgres Schemas and Apartment - <AUTHOR> https://influitive.io/our-multi-tenancy-journey-with-postgres-schemas-and-apartment-6ecda151a21f#.vfxsvbsrg <comment><USER2> If you are interested in the topic of multi-tenancy, this Microsoft article is the best I ever found: [https://msdn.microsoft.com/en- us/library/aa479086.aspx](https://msdn.microsoft.com/en- us/library/aa479086.aspx)

<comment> why-el I completely agree. My first professional job was dealing with multi-tenancy, and this article I had printed and sit on my desk for months. Extremely well written.

<comment><USER3> If you go with the separate-database model, how do you manage database deployments and syncing it with application deployments?

<comment><USER2> Example 1: You can stop all instances and wait for sycn/migration to complete, and start all instances.

Example 2: (which is much better IMO) deploy the new version, but keep the older versions running. Sync/migrate one-by-one and start the new version when ready.

</comment></comment></comment></comment><comment><USER4> Everyone's experience is of course their own, but I wanted to provide a counterpoint from my experience over the past 5 years. At NationBuilder we do schema-based multi-tenancy with Postgres. We have over 30,000 schemas spread across over a dozen databases. One of our databases has more than 5,000 customer schemas on it (the average is about 2,500). Nevertheless we are able to run a Rails application, execute migrations, generate new schemas using the Schema.rb file, add and remove indexes, and many of the other items mentioned in the article.

Has it been challenging? Absolutely. But it definitely is possible. Furthermore we have not found a better way to ensure the privacy of our customer data (separate schemas is the closest we can get to guaranteeing that a badly written join won't expose data to the wrong customer).

PS - I applaud the authors of the original article for publishing their schema management code as the open source Apartment gem (which I wish had existed when we were starting out)

<comment><USER5> We do SaaS for the financial industry, and we started out creating a separate virtual network with multiple VMs for each customer. Router firewalling, iptable lockdown, IP whitelisting to customer IP range. Encrypted disks (backed by SAN) for database storage with different keys per customer. Etc.

So we had to scale up our deployment process to multiple concurrent migrations per customer pretty much from day one.

The downside of this is that customers need to be big to afford the constant overhead of physically renting the machinery to serve them, administer them etc. So we're moving towards multi-tenancy from the other angle, aiming at smaller firms with less stringent data security requirements.

</comment></comment><comment><USER6> We use a similar scheme. The biggest driver for us is being able to move tenants around between databases to balance load as our tenants grow.

<comment><USER4> +1 We are continuously rebalancing customers between database servers. An added benefit is that doing a pg_dump/pg_restore removes all accumulated database bloat which decreases size on disk and improves performance

<comment><USER7> How long does it usually take to do such restructuring? Also, are you able to do this with minimal downtime? I have similar usecase, however, the export and re-import usually takes quite a long time.

<comment><USER6> We use bucardo to move a schema to a different host with no downtime.

</comment></comment></comment></comment><comment><USER8> Perhaps I'm missing something, but to me the obvious way to serve multiple clients is to simply create multiple isolated deployments, including a separate database server for every client.

Handling this on the application level feels like unnecessary complexity.

Any good reasons to go with the approach described in the blog post?

<comment><USER9> What if you want to support a very large number of relatively small tenants - having a separate server for each one of those could well be overkill.

<comment><USER2> Not at all. You can do it with multiple ways, e.g. with Docker

<comment><USER10> Docker is not a silver bullet for this, look at the other posts talking about ops, upgrades, and performance for the price.

</comment></comment></comment></comment><comment><USER11> One advantage of storing multiple schemas in one database is that a connection can be shared (assuming a shared authentication strategy). This is because, as mentioned in the article, the switch to one schema vs. another happens after the connection. This can make it easier to pool connections and to share servers across tenants. A tenant_id approach gives the same benefit without the isolation, but a separate database (even on the same server) doesn't.

Edit: typo

</comment><comment><USER12> How about row-level security? As I understand it—without having actually _used_ it—it should be able to get the same level of isolation as schemas (so long as you stay away from incrementing, user-exposed IDs), simply making all the other tenants' data invisible.

<comment><USER13> RLS doesn't allow for one very important administrative feature:

Data migration/export

Schemas allow an admin to excise an exact backup of a user's data without any other users, RLS is a little less flexible in this regard.

</comment></comment><comment><USER14> _I don't know exactly how to represent that in Big O, but I think it would look something like O(WTFxN)._

If WTF is a constant, then O(WTFxN) == O(kN) == O(N)

<comment><USER15> I don't think the author meant "WTF" to be a constant. It was defined to be whatever complexity index creation has.

However, I still disagree with "O(WTF*N)", because "WTF" almost certainly depends of the number of rows in the table (large tables take longer to index than small tables), and that number becomes lower in the multi-tenancy approach, because the individual tables are smaller.

</comment></comment><comment><USER2> In my experience there is no point developing multi-tenant software nowadays, because operating large number of isolated environments is a solved problem and really cheap nowadays. You can buy VPS-es for less then 5$ today, you can automatically create them, deploy the instances easily. You can scale either horizontally or vertically (Docker can help both). It's not much more work, but much more secure and more scalable and almost as cheap as a multi-tenant solution would be.

<comment><USER16> On the surface, you are right. However you often still need custom code to handle the business logic. If a new customer joins you have spin up a new instance. If a customer leaves then you have to delete the instance. How do you automate backup and restore? Is there a central repo for record keeping and how does that updated?

Sometimes multi-tenancy is a simpler solution because no instance fleet management code needs to be written. With everything there are downsides to multi-tenancy too so you have to weigh the pros and cons for the specific project.

<comment><USER2> You are right. Without multitenancy, you have to write the automation code, however, it's much better IMO, because with multitenancy, you have to think about tenancy ALL THE TIME not just that one time. So I think overall it's a better trade off and still less code and less problems to solve and easier to solve.

</comment></comment></comment><comment><USER17> I'd like to offer an alternative option to those currently confronting this topic. Use a database that explicitly supports this kind of thing, such as SQL Server RLS or Oracle RAS/VPD. (I'll note that PostgreSQL can do very similar things rather easily, too, but it might provide less of a benefit under larger loads. I'll write that up separately if there's interest.)

These feature work by with multitenant tables (e.g., tenant_id everywhere) by allowing the application to initialize a predicate that is automatically applied to every query executed.

For example, app executes "select * from orders where quantity > 10" for tenant 10 and the database resolves it to "select * from orders where tenant_id = 10 and quantity > 10".

With this configuration, you get both the isolation afforded by schemas and the uniformity (thing DRY) if the data definitions. You're protected from leaky queries and you can leverage the performance features.

Here are a few considerations:

Recognizing that, to the database, objects schema1.sometable and schema2.sometable are different, it becomes clear that large schema-based tenancy is quite a bit more work for the database. Each statement must be compiled and executed separately, so if "select foo from bar" is one plan, then for n schemas, you have n plans for the same thing. Those plans must exist in memory. In the nationbuilder case in this thread, where the average number of schemas per node is 2,500 that's a crazy amount of additional overhead. Plan will be evicted, and you're going to be burning CPU recompiling statements and regenerating plans.

Furthermore, you're going to be facing connection management issues and the potential leakiness there. Improper application of connection pooling can just as easily expose cross-schema data as cross-row data. In large system, just the sheer number of connections may become burdensome, so connection sharing will be important in reducing degradation from setup/teardown. Most vendors offer fancy connection striping for smartly routing queries to appropriately initialized application sessions.

If you're growing and you need to cope with a lot of data, you can now begin to employ more advanced database features. For example, all vendors offer some kind of data partitioning and parallel execution. This is going to let you focus more on the physical structure of the data and arrange it in ways that naturally support the kinds of queries you need to perform.

Likewise, it will simplify unloading a loading to analytical systems. It's pretty easy to extract this month's orders from one orders table (even if that table is physically all over the place and managed by some fancy storage management feature), copy the file, and load it into Vertica. You're going to get into building some novel system to do it for dynamic, distributed schemas.

Following that, it might be economically compelling. License cost might be less than engineering cost. It probably will be. Some of the features I've mentioned are separately licensed under some vendor models, and that's an additional expense, but it's also one that can be deferred until needed. It's really worth investigating whether you should be spending this much engineering effort non-line-of-business matters, because it very well could cost much more than implementing an existing solution.</comment>


This Is What Twitter Jail Looks Like - <AUTHOR> http://mikecanex.wordpress.com/2011/08/08/this-is-what-twitter-jail-looks-like/

<comment><AUTHOR> Someone once asked here about Twitter limits. Well, there you go. I managed to hit it today. You can go count up my tweets for the day and now see what the new limit is.</comment>


JSTOR Makes Early Journal Content Free  - <AUTHOR> http://www.theawl.com/2011/09/jstor-makes-early-journal-content-free

<comment><USER2> Talk about a non-announcement.

"Hey, uh all that content we no longer have any rights to, uh, now you can get it for _free_ can you imagine?"

An announcement would be if they made journal articles before 1960 free.

</comment><comment><USER3> I find it odd that the initial announcement mentioned Aaron Swartz, but not Greg Maxwell. Aaron never actually released anything while Greg actually released basically the same things that they are 'graciously' giving out for free now... only after someone forced their hand and yet at the same time denying it is the cause.

</comment><comment><USER4> Link to JSTOR's announcement:

[http://about.jstor.org/participate- jstor/individuals/early-j...](http://about.jstor.org/participate- jstor/individuals/early-journal-content)

These articles are from 1923 and before in the USA and from 1870 and before in other countries, so historic scientific research from the 1930's and later is still behind the paywall.</comment>


Microsoft declares its modeling love with a new language, 'D' - <AUTHOR> http://blogs.zdnet.com/microsoft/?p=1159

<comment><USER2> umm... doesn't D already exist?

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

<comment><USER3> I wonder how Digital Mars feels about this...</comment></comment>


Lament HN: Light Bulbs - <AUTHOR> Are light bulbs representative of life?
I have a lamp that takes G9 capsule-lightbulbs.  These have two little legs made of wire loops that push/click into sockets — about the size of a large bean.
I have two 30W halogen bulbs made by GE.  A known brand, known technology, radiating across the spectrum in warm colors with stable light.
They are also far too hot.  I want to replace them with LEDs.  Searching Amazon for a minute felt as comfortable as buying in a black market at 4am.  All brands I've never heard of.  Most have bad reviews focusing mostly on either unwanted flicker, wrong color, or high failure rates.
I went to the website of a bricks-and-mortar store I trust.  They have a Philips bulb and two other brands.  Philips is a brand I recognize.  The bulb is not omnidirectional.  The other two have some reviews.  One off-brand has multiple reviews saying the bulbs flicker and have odd color profiles.
The other off-brand has fewer bad reviews.  I load up my cart with two bulbs for $12.  There is a ~$2 fee to click and collect from the local branch of this bricks-and-mortar store.
I go back to Amazon.  No handling fee but the price for is higher by ~50%.  I go back to the bricks-and-mortar store and take the fee-hit, mostly because I don't want to be wandering around the shelves in store for too long in these trying times.
I will pick the bulbs up on Saturday.  The technology change will save me energy and save my lamp heating up too much.
LEDs are a wonder of the modern world.  What's not a wonder is this late stage capitalism shopping experience.  I lament it as much as I am no longer surprised by it.  This little experience encapsulated everything that's awful about light bulb shopping online, and if I think too hard about it, quite a lot of other things in the modern world too.
Thank you for reading.  Sorry if you decided you didn't want to.  [x] Uncheck this box if you don't want to be emailed about reviewing your purchase. <comment><USER2> > They are also far too hot. I want to replace them with LEDs.

You probably really don't.

I have hot hot QH globes in my desk lamps, my bedside lamps, my workbench lamps, and my dinner table lighting.

While I have lots of highly efficient LED lighting all round the house, the "radiating across the spectrum in warm colors with stable light" is _so_ much better for my eyes for so many of the things I do using those lamps. A ~5W LED replacement in any/all of those lamps would without doubt be "brighter" and cooler, but I really don't want to read by LED light or decode resistor values by LED light. Not even expensive "brand spectrum" LED light. I'm totally happy with using an extra ~25W and needing suitably heat shielded lamp fixtures to have those QH globes burning there...</comment>


Ask HN: Our MVP that all started with the 'Domain Exchange' post. Feedback? - <AUTHOR> http://www.tutorialshop.com/index/

<comment><AUTHOR> Hi there HN,

This may be a very liberal use of the term "MVP", but its never too early to solicit feedback from your (potential) target market. Israel (rasiel) and I met about a week ago thanks to the popular Domain Exchange post[1][2]. Right now we're feeling things out to get a gut check of how well we work together. After that, the plan is to hunker down and get something out the door--pronto. The more we learn from you all here, the clearer our product roadmap can become.

Tutorial Shop allows site owners to create guided tutorials that answer all their users' questions. Joe User can't figure out how to delete his pictures? With one click of a button and zero support from you, we get him back on track. Our tutorial steps in to actually point and click his mouse, leading him through the solution step-by-step.

We'd love to know what you think about our hypotheses on the problems we're addressing and the solution we've designed.

Problems:

1) Intuitive UI is hard to build

2) Users get frustrated when they get stuck (which leads to user churn)

3) Customer support takes time away from other productive tasks

Our solution:

1) Functional tutorials made from scripted mouse movements and actions (ensures that the user's problem is fixed)

2) These tutorials are created by our users with a point and click interface

3) Our user's tutorials are compiled and embeddable on their site for easy access (think UserVoice "Feedback" tabs)

\---

[1]<http://news.ycombinator.com/item?id=1794289>

[2]<http://news.ycombinator.com/item?id=1794474></comment>


Let Your Data Go - <AUTHOR> http://www.tbray.org/ongoing/When/201x/2010/02/19/The-Limits-of-Control

<comment><USER2> This is what Eric Schmidt meant when he said _"If you have something that you don't want anyone to know, maybe you shouldn't be doing it in the first place."_

Of course it's stated in the general case, and as a consequence it's more tactful, but it's the same idea: If you don't want someone to know something, don't tell them.

</comment><comment><USER3> "It's like this: If you send data to someone over the Net, you can't control what they do with it. At least cost-effectively. Or, if you want a good outcome.

This applies to Internet Standards. Any standard that tries to constrain the way in which data, once received, is processed, is broken."

So, is the author then opposed to having a secure, standardized way to make credit card payments? Methinks he should be using a word less broad than "data".

<comment><USER4> What I got from your quote is that he thinks it's not possible to control how data is processed _after_ it has been received -- he's not talking about the entire process.

Since the data is on somebody's server, there's nothing that can be done to stop them from making poor decisions with it (such as storing CC numbers in plain text).

</comment></comment><comment><USER5> Funny - he's saying this in regard to copyrighted data, but it may also be interpreted to be talking about private user data.

<comment><USER6> Is he? I thought this was about HTML5.

<comment><USER7> That's what I was thinking too. The HTML5 spec is trying to specify exactly how HTML is processed and not just the syntax of the markup.</comment></comment></comment>