Can Programming Be Liberated From The Von Neumann Style? (1977) [pdf] - <AUTHOR> http://worrydream.com/refs/Backus-CanProgrammingBeLiberated.pdf <comment><USER2> The answer was "not while computing was getting exponentially better every year". This sort of improvement curve is really difficult to compete with.

It's in the process of being liberated now. GPUs are already deployed in many machines with a fundamentally different architecture. And there's a bubbling foment of alternatives being developed now.

In the end, I don't think it was necessarily a case of us getting stuck on "von Neumann" per se... we would have gotten stuck on anything we settled on in the 1960s. And despite familiarity breeding contempt, I'm not that convinced we could have done that much better in the 1960s. A lot of the alternatives are not _universally_ better, they're better in some limited domain but it's not obvious that they are going to uniformly beat von Neumann for general computing, even accounting for the fact that "general computing" has coevolved for 50 years with von Neumann.

See also [https://news.ycombinator.com/item?id=12155561](https://news.ycombinator.com/item?id=12155561) (which may well have been the inspiration for this submission)

<comment><USER3> GPUs are much closer to von Neumann machines than to anything people typically deriding the latter have in mind (such as say the Reduceron architecture.) Every commercially significant accelerator, GPUs included, has a RAM, often multi-banked to support vectorized random access, it has an imperative programming model, and it runs (often vector) instructions from program memory operating on registers, data is occasionally exchanged between registers and RAM addresses. $100 says this will remain true for the next 20 years.

The thing most far away from a von Neumann machine that is commercially significant is the FPGA and it is nothing like what people deriding the von Neumann machines have in mind. It's imperative, has registers and RAM blocks, and it will cause nausea in the typical functional programming supremacist. (Except those that choose to squander its performance potential on implementing a wasteful machine like the Reduceron because graph reduction is just better than an imperative low-level programming model.)

Programmers need to be liberated from misconceptions wrt von Neumann machines.

<comment><USER4> I have to ask, what makes you say this: "and it will cause nausea in the typical functional programming supremacist" with regard to FPGAs?

<comment><USER3> Not only are FPGAs as far from the ideal of "computation as reduction" expressed in the paper as they could possibly be, but they're the hardest machine to fit into this sort of a paradigm.

The typical CPU will run functional code fairly efficiently if enough work is put into the compiler (to some functional programmers this sounds bad because hardware should make writing functional language compilers easy. People who know about hardware make a different conclusion - that hardware is just fine, as Ken Thompson said, "the PDP-11 is a fine Lisp machine, it's not a language special enough to warrant a specialized machine.")

The typical accelerator is a harder target to a general-purpose functional programming language (it's a poor target for a general-purpose imperative language to begin with.)

The FPGA, with its explicit management of every imaginable resource, is the worst target for a general-purpose functional programming language.

In general, the farther away a commercially significant machine is from the classical von Neumann architecture, the more terrible target it is for functional languages, which never prevented FP aficionados from talking about "the end of Moore's law bringing about the long-awaited demise of the von Neumann machine", a "demise" that largely doesn't happen and where it does, it does not mean what they think it means.

<comment><USER5> > The FPGA, with its explicit management of every imaginable resource, is the > worst target for a general-purpose functional programming language.

That's a great way to put it...

but perhaps there's a more suitable FPGA cell for functional programming (than block lookup tables with state)? Maybe something with a local stack, recursion assistance, an iterator?

Also, a good deal of the FPGA resource management is focused on optimization... What if the optimization-at-all-costs constraint were relaxed somewhat, or supplanted with meta-information to indicate the completion of a group of cells to allow a message to propagate?

With relaxed constraints partial, on-the-fly and self- modifications could become regular features.

<comment><USER6> > _Maybe something with a local stack, recursion assistance, an iterator? > [...] supplanted with meta-information to indicate the completion of a group > of cells to allow a message to propagate?_

What you're describing sounds a lot more like many CPU cores connected by a network than like an FPGA. The point of an FPGA is that it gives you very precise and flexible control over things like timing and interconnects. Without that, FPGAs are actually pretty slow and you'd better use a CPU.

> _With relaxed constraints partial, on-the-fly and self- modifications could > become regular features._

There's a reason why self-modifying software is restricted to niche use cases: it's hard to reason about. Dynamic partial reconfiguration is slowly becoming a thing in FPGA design, but it's typically used to work around resource limitations.

</comment></comment></comment></comment></comment></comment><comment><USER7> It already has, unfortunately it's not too popular. This is why Prolog gives most folks a case of headache. My moment of enlightenment while studying Prolog happened when I realized that I wasn't logical, but trying to solve the problem in Von Neumann style. I was humbled to see simple logic solutions in place of my overly complicated solutions. This has made me such a better developer, I keep my code as declarative as possible.

<comment><USER8> Oh, Prolog. I once wrote a hardware configuration in Prolog. (Dependency resolution - rules like "An A requires a B or a C".) The configuration part was fine. Trying to write a menu system in pure Prolog, though...

Most of the troubles with functional programming come when you actually have to _do_ something. The imperative/functional boundary remains a problem.

<comment><USER9> > Most of the troubles with functional programming come when you actually have > to do something. The imperative/functional boundary remains a problem.

How does it remain a problem? I've been writing commercial Haskell programs that _do_ something for years now.

<comment><USER8> Monads are kind of a hack.[1]

[1] [http://research.microsoft.com/en- us/um/people/simonpj/papers...](http://research.microsoft.com/en- us/um/people/simonpj/papers/marktoberdorf/mark.pdf)

<comment><USER10> "X is a solution to problem Y" doesn't imply that X is a hack. You'll need to be more verbose if you were making a more specific argument.

</comment></comment></comment></comment></comment><comment><USER11> Backus and von Neumann have a history, from their time at IBM.

When Backus first proposed the idea of Fortran to his boss, he first "had to overcome the persuasive arguments of von Neumann, who was then a consultant to IBM." In Backus' words:

> He didn't see programming as a big problem. I think one of his major > objections is that you wouldn't know what you were getting with floating > point calculations. You at least knew where trouble was with fixed point if > there was trouble. But he wasn't sensitive to the issue of the cost of > programming. He really felt that Fortran was a wasted effort.[0]

Backus and von Neumann had made innovations in the use of floating-point and fixed-point numbers by computers, respectively.

From what I can gather, von Neumann was an incredible genius who just continuously pushed new ideas. He introduced "scaling factors" (fixed point) to solve a scientific problem (in nuclear physics) and didn't worry about improving its "usability."

Backus, on the other hand, cared about the difficulty of programming. Both Fortran and his work on floating-point, as well as his later efforts in functional programming, manifested that.

After leaving computing altogether, Backus took to meditation and, as he calls it, "living."

[0] Quotes are from chapter 1 of _Out of Their Minds: the Lives and Discoveries of 15 Great Computer Scientists_ , by Shasha and Lazere.

</comment><comment><USER12> I think abandonment of the Von Neumann paradigm will be crucial for AI. For decades we have labored under the misguided assumption that the brain is isomorphic to the Von Neumann architecture, with "memory banks" and "processing units." This approach has failed.

Admittedly, Lisp was once the first choice for AI research, and it did not readily lead us into the promised land either. Perhaps a functional approach is not radical enough :)

<comment><USER13>
        > For decades we have labored under the misguided assumption that the brain
        > is isomorphic to the Von Neumann architecture, with "memory banks" and
        > "processing units."

Who has been working under this assumption for decades? It seems rather obvious to me that this is very far from reality, so I'm a bit surprised if the AI community thought the brain were a CPU for several decades.

<comment><USER14> He seems to be under several misconceptions... This one may just be a mutation of the widely accepted idea that we can in principle emulate a brain using our standard computer models, even if it'll take n more decades of hardware advances, the idea that the brain is discretely computable.

</comment></comment></comment><comment><USER15> I guess one way to approach questions like this, that challenge our fundamentals of Doing Things, is to ask this:

Would an alien race be doing the same things? Using electricity, decimals, binary, registers, memory etc. the same way we do?

As opposed to say photonics or biochemicals-based computers, trinary or quarternary number systems, belt architectures and so on..

How much of our world has been shaped by simply the ORDER in which we discovered things?

If there is only one Right Way of doing things then all the intelligent civilizations out there will eventually use the exact same architectures and have the exact same technology and, personally, that would make for a very boring universe.

<comment><USER16> It's a bit silly but that's exactly the way I tend to approach such questions and my conclusions after musing on the subject for years is that we are hamstrung by the historical ordering of past breakthroughs. Further, it is very difficult to determine the extent to which our current ways of thinking are limiting us.

</comment></comment><comment><USER17> Furry Paws is an "optimizing whole-program compiler and runtime-system for a dialect of John Backus' FP language":

[http://www.call-with-current-continuation.org/fp/](http://www.call-with- current-continuation.org/fp/)

<comment><USER18> Here's a much smaller and less ambitious interpreter in Python as a hackable taste of the language: [https://github.com/darius/parson/blob/master/eg_fp.py](https://github.com/darius/parson/blob/master/eg_fp.py) \-- or rather another dialect, since everyone who implements FP makes up their own concrete syntax. Mine reads left to right instead of right to left, and leaves out the noisy compose operator (it's implicit by juxtaposition), making it read kind of like Forth or Joy.

I also wrote an optimizing compiler to Scheme from this dialect back around 1990, but it's lost in the sands of time.

</comment></comment><comment><USER19> A review of the 1977 Turing Award Lecture by John Backus by Edsger W.Dijkstra

[https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/E...](https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD692.html)

<comment><USER20> This guy's arrogance takes your breath away! Correspondence between Dijkstra and Backus on the Turing award. [https://medium.com/@acidflask/this-guys- arrogance-takes-your...](https://medium.com/@acidflask/this-guys-arrogance- takes-your-breath-away-5b903624ca5f#.5nc69kp8u)

</comment></comment><comment><USER21> No. I always wanted to say that to the title of this paper ;)

The complaint of van neumann programming langauges, as the paper describes, is that it can only be extended as a framework. Todays imperative languages are much more powerful, either they are untyped (implicitly generic), or they include generics, or at least have objects with polymorphism.

The paper puts forward applicative (functional) programming, as a start, because it can be extended much better. The main point, functions can be put together, because you don't have to name, and thus not give types to, the arguments.

To make the system complete (useful), he adds a applicative state transition system, or mutable state. Think IO monad.

I have a different take. You want systems where everything can be abstracted over. That is, put inside of a function (abstraction). And whatever the system does is truly hidden, unobservable to the outside. That might sound like fp, but it has problems when you want to hide state, or when the abstraction is about input/output. Example:

      function downloadAndVerify(url):
        data = http.get(url)
        hash = http.get(url + ".md5")
        return data, md5(data) == hash

In my opinion, the above expresses what I want. If I need async, my callers need async. If I need IO monad, my callers need IO monad. Neither can hide that. If it blocks, it can be solved the same way as CPU intensive operations, do it in the background. So processes need to be easy.

You want a language where any async api can be converted into a blocking api, and any blocking api into an async api. (Using processes, most likely.)

</comment><comment><AUTHOR> I find funcional languages great for modelling application logic, but when working with graphics cards, printers, web APIs, etc. procedural code is more intuitive. Maybe it's a limitation of my thinking, but I find an impure functional language (C# and F# are good examples) the best fit for most problems.

<comment><USER22> I would argue that this is largely because the systems you mention do not have the requisite (hardware or software) functional abstractions required to make them mesh nicely with functional or declarative control* code. Backus here is writing from a hypothetical word in which that is not a problem.

\---

* a dangerous word in and of itself in such a conversation, because of its imperative significance.

<comment><USER23> Wouldn't that just place the burden of providing those abstractions on the hardware implementer. In essence, are we not just pushing the problem down the stack?

<comment><USER22> Absolutely; the problem has to go somewhere. It's just the balance of how much semantic weight belongs to the encoder vs. the decoder

</comment></comment></comment></comment><comment><USER24> Here's an interesting talk that covers some of these topics:

"Erlang Factroy SF 2016 - Keynote - John Hughes - Why Functional Programming Matters" [https://www.youtube.com/watch?v=Z35Tt87pIpg](https://www.youtube.com/watch?v=Z35Tt87pIpg)

</comment><comment><USER25> When I saw this, I wondered whether this was the same Von Neumann who gave his name to Von Neumann probes, which are hypothetical self-replicating spacecraft that can fill the galaxy within a relatively short timespan.

It turns out that this is the same Van Neumann, who appeared to have been very influential in the early days of computing. In reading about him, I was impressed with all the work he'd done. The people who came up with the concept of Von Neumann probes named them after Von Neumann because of his theoretical work regarding how computing machines can self-replicate.

Fermi also used the concept of Von Neumann probes and the lack of alien Von Neumann spacecraft as proof that aliens (or at least interstellar spacefaring aliens) don't exist.

<comment><USER26> Von Neumann was often considered by colleagues to be the smartest person they'd ever met. There's an old story that goes something like this:

Von Neumann was asked a mathematical puzzle: two bicyclists start 20 miles apart and head towards each other at a steady speed of 10 mph each. At the same time, a fly that travels at a steady 15 mph starts from the front wheel of the southbound bicycle and heads to the front wheel of the northbound one, then immediately turns around and heads to the wheel of the southbound one, and continues until the bicycles meet and he is crushed. What total distance did the fly travel?

The trick is that it seems you'd need to compute an infinite series, figuring out the distance traveled on the first journey, then the second, then the third and sum them all. In fact, you can just realize that two bicycles starting 20 miles away, each moving at 10 miles an hour, will meet in 1 hour; if the fly's traveling at 15 mph constantly during that time, it travels 15 miles.

Von Neumann provided the solution immediately. The man who posed it to him said "Oh, you must have heard the trick already!" "What trick?" said von Neumann. "I just summed the geometric series!"

<comment><USER27> Are there more anecdotes of this kind ?

<comment><USER28> Fermi and von Neumann overlapped. They collaborated on problems of Taylor instabilities and they wrote a report. When Fermi went back to Chicago after that work he called in his very close collaborator, namely Herbert Anderson, a young Ph.D. student at Columbia, a collaboration that began from Fermi's very first days at Columbia and lasted up until the very last moment. Herb was an experimental physicist. (If you want to know about Fermi in great detail, you would do well to interview Herbert Anderson.) But, at any rate, when Fermi got back he called in Herb Anderson to his office and he said, "You know, Herb, how much faster I am in thinking than you are. That is how much faster von Neumann is compared to me."

From [http://infoproc.blogspot.com/2012/03/differences-are- enormou...](http://infoproc.blogspot.com/2012/03/differences-are- enormous.html)

<comment><USER27> Cool quote and article. To be honest, not summing a serie on the fly, I found the problem ridiculously simple.

I'm very curious about his love for algebra.

ps: Fr/De [https://www.youtube.com/watch?v=c9pL_3tTW2c](https://www.youtube.com/watch?v=c9pL_3tTW2c) Us [https://www.youtube.com/watch?v=VTS9O0CoVng](https://www.youtube.com/watch?v=VTS9O0CoVng)

</comment></comment></comment></comment></comment><comment><USER29> Wikipedia argues [0] that we actually use a "Modified Harvard Architecture" instead of a "Von Neumann Architecture" today, since we have a separated data and instruction cache. Also, various embedded chips really separate instructions and data.

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

</comment><comment><USER30> One very important aspect of this paper that I seldom see given proper emphasis is the ability to treat programs algebraically.

Also, check out Manfred von Thun's Joy.

</comment><comment><USER31> Not all of von Neumann's architectures were von Neumann architectures [1].

That is to say, not all of the architectures he invented [2] ended up being given the name "von Neumann Architecture". His 29 state cellular automata rule [3] for implementing a universal constructor [2] was "non von Neumann" in the sense of [1].

It's just so amazing what he accomplished with his mind, a pencil, and a piece of paper, without the use of computers, which he also helped invent.

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

[2] [https://en.wikipedia.org/wiki/Von_Neumann_universal_construc...](https://en.wikipedia.org/wiki/Von_Neumann_universal_constructor)

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

</comment><comment><USER32> Kanerva has discussed alternative computing styles as well. Especially, he asks, why it is hard to encode intelligence in such a rigid setup.

> The disparity in architecture between brains and computers is matched by > disparity in performance. Notably, computers excel in routine tasks that we > - our brains - accomplish with effort, such as calculation, whereas they are > yet to be programmed for universal human traits such as flexible learning, > language use, and understanding.

He focuses on the representation problem and develops a more flexible representation of concepts with what he called hyperdimensional computing[1].

[1] [http://redwood.berkeley.edu/pkanerva/papers/kanerva09-hyperd...](http://redwood.berkeley.edu/pkanerva/papers/kanerva09-hyperdimensional.pdf)

</comment><comment><USER33> You can always come up with some really elegant and expressive formal systems to model programming/computing and thats the mathematics side of things BUT people often ignore the physical/engineering side of things. We need to engineer actual physical systems that can implement those so called elegant formal systems of mathematics. This is where the problem is, engineering a physical systems is a very complex problem with lots of constraints and is not as simple as coming up with a bunch of symbols and rules of a formal system.

Physics is about reality and mathematics is about representations, you can create representations from thin air but you cant do that with reality :)

</comment><comment><USER34> "Out of the Tarpit" ([http://shaffner.us/cs/papers/tarpit.pdf](http://shaffner.us/cs/papers/tarpit.pdf)) is a paper with a similar bent arguing that we can eliminate complexity with a functional/relational approach to designing software.

</comment><comment><USER35> Reminds me that we put so much work into making things "digital", that we forget how many layers of abstraction there are. All the work to add numbers when superposition is instantaneous.

It's not just the tyranny of memory, but tyranny of the clock! It will be interesting when we get rid of both...

</comment><comment><USER36> By the way, Bret Victor's worrydream website references this paper from this page on the talk "The Future of Programming":

[1] [http://worrydream.com/dbx/](http://worrydream.com/dbx/)

</comment><comment><USER37> It's not about liberating programming, it's about liberating programmers by enabling them with more powerful abstractions. And pure lazy statically-typed FP is one hell of a powerful abstraction.

<comment><USER38> You can only say the first sentence if you limit yourself to the second sentence.

If we go beyond FP, I think you'll find we're going to end up liberating programming.

</comment></comment><comment><USER22> Note: in the time it took me to write this ramble and also the code review I had to do in between writing and posting, others like catnaroek have addressed similar themes

Speculating wildly here, but part of why I think there is continued (albeit unconscious) resistance to other paradigms is that the procedural/imperative paradigm seems to be the most `hackable' of the bunch.

I'm not using `hackable' in a positive sense here. Procedural code is bare- level, almost the machine code of programming models. "First do this thing, then do this thing, then do this thing", etc etc. There's a relatively small implicit underlying `physics'[1] in a procedural system. In some sense, every procedural program involves the creation of some higher-order logic (a model) as a part of its construction, in order to both define the state machine, and dictate the manner in which state flows through it.

The trick, of course, is that every model has a bias, encodes some manner of thinking. An aspect of that is that it is easier to represent some things and harder to represent others[2]. In a procedural program, when the model you've (consciously or not) developed fails, it's trivial to 'fall out' of the model and revert to writing base-level imperative code, hacking your way to a solution.

Functional and other Declarative paradigms, on the other hand, have a stronger, more complex `physics' to them. In the case of declarative, for example, a user is asked only to declare the state machine; the execution of it is left to the `physics' of the system. This can mean that a well-written program in a functional or declarative language appears to be simpler, more elegant. In reality, this is largely because a large set of assumptions that would need to be explicitly declared in a procedural language have been encoded directly into the language itself in the functional/declarative case[3].

This means that when you're operating withing the paradigm that the functional/declarative language affords, everything is smooth, beautiful, elegant, and verifiable according to the physics of the system. However, it's much harder to 'fall out' of the assumed model, because the granularity required to do so isn't at the native resolution of the language.

\---

[1] By physics, I mean a set of assumptions one needs to make about the behavior of the system that are not directly encoded by the user's input

[2] Think of how easy it is to, say, pick up a piece of steak with a fork, and how hard it is to scoop soup with the same implement. Different models have different affordances, recommend different problems, or different solutions to the same problem.

[3] As the Church-Turing thesis shows us, these systems -are- equivalent in power, so those semantics still have to be somewhere. To paraphrase Hofstader, there are two kinds of music-playing systems (with a continuum in between). On one end, a system with a different record for each song, and a single record player capable of playing all records. On the other a system with a single records, and a different record player for each song. The difference is how much semantic weight you put on the encoding, and how much you put on the decoding (but they still need to sum to 1)

</comment><comment><USER39> Is functional programming the only other style?

<comment><USER40> There are a bunch of other paradigms, e.g. declarative programming was considered the thing some decades ago; but in general nowadays most domains are best handled by the tools & approaches we have from either the direct imperative simplicity, the OOP camp, or the functional mindset.

<comment><USER41> I think declarative is still preferred, if you can make it work. I think the real issue is coming up with a declarative language that is general purpose and efficient enough.

For specific domains, however, declarative languages have done quite well, e.g. SQL, regexps, XPath, etc.

<comment><USER40> I believe that what we're seeing is declarative paradigm used as subsystems / domain specific languages that do a particular core task accurately and efficiently, but surrounded with a general purpose "scripting environment" in which you do the messy interfaces with the surrounding world and users.

Besides the obvious SQL example, the current ML systems such as Tensorflow are a great illustration; you declare a particular computation graph and then the system "just executes it" over multiple GPUs.

</comment></comment></comment></comment><comment><USER42> Well, is not all the new trendiness in functional programming some evidence of the answer to this?

<comment><USER43> New to who?

<comment><USER44> Pretty much everybody in the industry? Even new college grads don't seem to know much about FP.

<comment><USER45> I graduated in the late 90's.

We got to use Caml Light, Lisp and Prolog across a few semesters.

There were also some references to Miranda and Objective Caml.

I guess it is a mirror of the quality of the university more than anything else.

<comment><USER46> I graduated in the mid-90s. I remember using lisp and ML in multiple classes. We also used Prolog although that's not a FP language but it is certainly non- traditional.

</comment></comment></comment></comment></comment><comment><USER47> Yes</comment>


Beets: the music geek's media organizer - <AUTHOR> http://beets.io/ <comment><USER2> > automatically improving its metadata as it goes

Sounds like a recipe for disaster.

<comment><USER3> Which is why it's autotagging has tons of options, including "off" and "only change your database and leave my files alone!": [https://beets.readthedocs.org/en/v1.3.17/guides/tagger.html](https://beets.readthedocs.org/en/v1.3.17/guides/tagger.html)</comment></comment>


The Bank Robber - <AUTHOR> http://www.newyorker.com/magazine/2016/05/30/herve-falcianis-great-swiss-bank-heist <comment><USER2> This is an interesting case because the bank claims he stole the records to sell them to rival banks, while he claims he stole them to be a whistle blower to foreign governments.

Things in the banks favour of this story are:

1) he was convicted in a Swiss court

2) he didn't actually approach any foreign governments for the 2 years he worked at HSBC until the day after the Swiss government brought him in for questioning about the theft of the bank's data.

3) He was caught trying to sell the bank data in Beirut.

In his favour:

1) The French government has no plans to prosecute him and allegedly hasn't paid him for the information.

I guess this is a case of one mans terrorist is another mans freedom fighter?

<comment> brown9-2 The article disputes your second point:

 _But in March, 2008, before fleeing Geneva, he had sent e-mails to British and German intelligence agencies, announcing, "I have the whole list of clients of one of the world's top five private banks." (The agencies did not pursue this opportunity.) He also contacted a French revenue inspector named Jean-Patrick Martini. During the summer of 2008, Falciani arranged a secret meeting with Martini in a French village across the Swiss border. Martini brought along a psychologist, who helped him come to the conclusion that Falciani seemed credible about the provenance of his data._

(he fled Geneva in late 2008)

The fact that the Swiss convicted him of industrial espionage when the main point of the article is how important bank secrecy (and it's protection of tax evasion) to the Swiss shouldn't really help anything.

</comment></comment><comment><USER3> While not the main use of bank secrecy, I find it interesting that people rarely mention the benefit that bank secrecy provides those living in countries that are on the brink of civil war, that are not goverend by rule of law, or where fleeing is a real possibility in the near future...i.e. the assumption is usually that the governments seeking information on their citizens are the "good guys"

</comment><comment><USER4> 60 Minutes covered this same story:

[http://www.cbsnews.com/news/hsbc-swiss-leaks- investigation-6...](http://www.cbsnews.com/news/hsbc-swiss-leaks- investigation-60-minutes/)

</comment><comment><USER5> It's interesting to combine the reaction in the comments here with the usual HN comment consensus on privacy.

So, usually, it goes like this: privacy is good, government has no business snooping around, and Bitcoin-like solutions for financial privacy are the future of resisting "the system". But in this case, consensus is different: privacy is bad, governments of the world need to know financial information of individuals, and whoever tries to protect this information is evil.

Am I the only one who sees the irony here?

<comment><USER6> In the former, a small closed source centralized authority has all the information and power.

In the latter, everyone has the information, so the balance of power is evened.

<comment><USER7> I agree. It might be impossible to effectively govern ourselves when adhering to strict idealogical principles.

In other words, individual right to privacy may be generally a good principle that we may agree to, but society is too complicated to not resort to pragmatism and there will always be exceptions. Is it not the same with every other idealogical principle by which we govern ourselves?

</comment></comment></comment><comment><USER8> What a gong show... Falciani aside, we have big banks fully implicated in high street robbery while suffering next to no damage (insignificant fines/settlements, no arrests) on one side, and on the other side we have government actors acting like cheap, incoherent buffoons, claiming one thing and doing another, participating in international diplomatic displays worthy of kindergarten.

Not that any of this is new, but the evidence that's accumulated thus far, particularly in view of the leaks over the past few years, would have you believe that something ought to happen. Yet HSBC and the likes are alive and well, so are their executives, and the only thing governments seem to have ramped up is their capacity for ridicule. The people in power seem to have little to no incentive to change the game, yet they keep getting voted in (or, in fact, just placed there). What recourse does the populace have at this point, short of throwing away the entire economic apparatus?

<comment><USER9> Since we live in a network of oligarchies, apparently, that would also involve throwing out the political apparatus as well, non? Interlocking problems.

</comment></comment><comment><USER10> The best way to rob a bank is to own (or pwn) a bank.</comment>


Experiences with Email-Based Login - <AUTHOR> https://www.arp242.net/email-auth.html <comment><USER2> An organization I'm a member of uses this for sign-in to the membership management platform. There, I think it works well, and I haven't been annoyed by it. I use it rarely, and definitely rarely enough that if I tried to memorize the password I'd have to go through the password reset workflow every time.

Scaleway (basically a cheaper, European version of Digital Ocean) offers this option, and it annoys me because it used to mean an extra button click before the password field shows up. (Nowadays, they instantly detect that your password manager filled out the password after you click the button and then instantly log you in.)

I think it's a viable alternative for something that people use rarely, but for frequent actions, "site specific bearer token managed by your browser" is the most convenient for most people, and the easiest way to implement that right now is with a password (which may be generated by the browser, saved by the browser, and filled by the browser).

Is there anything API that explicitly has the browser authenticate with a cryptographic key that reliably works across the major browsers and syncs from one device to another? WebAuthn seems to be going in that direction - but is a mode that doesn't require a U2F key supported in practice?

</comment><comment><USER3> I started to avoid using such sites and services with the "unmagical" email link. Was especially frustrating when I don't have the multiple emails on my multiple devices. The iPad I use does not have my work email set up for example. I use a password manager and this annoyance is not necessary at all.

Maybe sites can offer both choices if they insist on email authentication.

There is also a huge swath of humanity who do not interact with emails anymore, especially in developing countries.

Many sites in India offer both username/password and the option of logging with your mobile number and a text entry code sent.</comment>


Ask HN: Does this old horse have a few years of useful work left? - <AUTHOR> So, my most recent stint at Microsoft just didn't work out. The tech was cool, but the day-to-day workflow was tedious and torturous. I only held out for 4 months - my shortest gig ever, but it really was the most I could muster. I really wanted it to work, but ultimately couldn't strike that bargain with myself.
So... now I'm back to living on couches and wondering / researching where I might still be able to be useful and productive in the world. It's not an easy question. There are more technology stacks than ever, and I'm suffering very severe paradox of choice. I sure miss the "good old days" when you just focused on writing a single app in C that ran on a well-understood machine, or even a single well-understood OS API. But those days are mostly gone. Now it's all distributed, multi-level conglomerates of varied frameworks and languages sort-of working together. I can't decide whether I have any interest in that. I sort of envy the people who can simply state, "I am a Rails dev" or similar.
I feel a lot of pressure to pick a niche. Something. Anything. Because living on couches gets old, fast, and even more dire financial straits await after that. So I'm being driven by the stick, and not the carrot - which is an unpleasant position.
I found a great game (on Steam) called TIS-100, where you progress by writing small, well-defined programs in assembly language, for a strange, highly constrained imaginary processor. It's great for its pure distillation of machine-level programming. There was a time when people used to get payed for doing what you do in this game. In other words, I fear I'm getting old, and my career options have just begun to seem uncomfortable. <comment><USER2> 49 here, I'm not enjoying working in IT nowadays, I think it got old about 5 or 6 years ago. So I quit and I'm pursuing my own projects, doing some programming, and trying not to worry too much. I could have ground it out for a few months more in that lucrative contract I had, but just how long can I put up with being _that_ bored?

Personally, if I have to go back to the circus, I'll probably aim for short contracts or part-time work. If you're looking to reskill, I see plenty of sys admin jobs out there. Except you're supposed to call them "Dev Ops" nowadays. Puppet, VMs, Vagrant, Ansible, cloud computing (Linode, Amazon, etc). It's a relatively small domain which is applicable to many different areas of IT, so you get that "good old days" thing where a little effort goes a long way.

Good luck with whatever you do. Don't let the demons of despair take you, make a deliberate effort to be optimistic and cheerful. You're not the only old horse out there wondering when it all became so complicated. OTOH, it's truly an incredible time to be alive, so much stuff going on!

<comment><USER3> I don't want to be a downer, but devops is definitely NOT just a new name for being a sysadmin. We've actively recruited for people who are not old fashioned jump-on-a-box-and-make-hot-changes sysadmins. They need to understand automated infrastructure and deployment through code, so it's not a small niche to just pick up easily. If it was that easy, everyone would be doing it and it wouldn't pay so well.

<comment><USER4> Sure it is. Don't the "DevOps" administer, provision, and manage your systems? Have you ever seen a unix guru who didn't have scripts and use automated tooling? And when a system fails (and they all fail eventually) the routine is the same no matter what you want to call it.

<comment><USER5> There are two kinds of DevOps.

You have DEVops... think of a web developer who also knows linux.

Then you have devOPS... think of a sysadmin who knows bash and python.

The former is where I think the value comes.. they find ways to automate your infrastructure and do lots of cool things. The later tend to make webs of bash scripts that you have to delete when they quit because no one understands them.

<comment><USER6> You basically just argued there is no such thing as devops, just developers and system administrators.

<comment><USER7> Next thing you know, he's going to be telling you that your 360" review is actually a yearly review, that your scrum master is actually just a team lead, and that your gluten-free bread is actually just a rice cake with sugar. These old-timers sure do get some funny ideas.

</comment></comment></comment></comment></comment></comment><comment><USER8> Have you considered embedded software? What you describe and long for (including all the constraints) seems to match the needs and challenges of embedded development.

Example of places would include TI, Intel, Atmel, etc., and also hardware makers that use their chips.

<comment><USER9> This is good advice.

As a somewhat older (42) programmer whose early career was similar to what OP is describing I've been focusing on embedded systems and most recently Android development -- granted, Java isn't C and there are quite a few things I dislike about the language (and moreso the AbstractFactoryOfFactoriesClass culture it tends to have) but it is (practically speaking) MUCH closer to the sort of desktop app development that we used to do than either of back or front end web development (which I also don't really enjoy).

<comment><USER10> Ahh, good old AbstractAnnotationConfigDispatcherServletInitializer.

[http://docs.spring.io/spring-framework/docs/3.2.0.BUILD- SNAP...](http://docs.spring.io/spring-framework/docs/3.2.0.BUILD- SNAPSHOT/api/org/springframework/web/servlet/support/AbstractAnnotationConfigDispatcherServletInitializer.html)

</comment></comment></comment><comment><USER11> I am 36 and been contracting full time since I was 22. Really I was only an employee at my first programming job. The concern that you have is of technology stack. The concern you are alluding to is how to stay relevant when being an older person. The first concern is easy. Stick with some fundamentals. JavaScript for example is a perfect choice. By now we should all know JavaScript and another example is the Dom API's. Those are solid gold. CSS of course and after that your good to go learn some cool framework like ReactJS. Given that you know C then C# is likey to be your best friend. I have stuck with .NET since its release in Feb 2002 and always have been a productive developer. I have used every version of Visual Studio. So after drawing a few boxes around things the world gets smaller. .NET was just ported to linux and renamed Dot Net Core 1.0 with it's first release expected soon. So I would say .NET is as safe a bet as any. Of course there is the small challenge that .NET isn't cool in the start-up world. That is mostly due to haters having to hate and not based on merit. So the technology choices get easier and easier if you start to zero in. Dot Net has an MVC framework which is at version 6 but I think maybe renamed to Core 1.0 as well. Your tech stack isn't a problem. Stick with those and you will find something. As for your hourly rate I can tell you from experience the global market is making it very competitive so suck that up. As for getting too old to program that is not actually the question. The question to ask yourself is can you find and follow your excitement. We are in the golden age. There are a few leading edge sources which deal with this. I love Bashar and Abraham-Hicks. To quote Bashar "When you understand what excitement is, you'll understand why you don't have to look at every little detail to know what to do.

Your excitement is telling you that's the next thing you need to do. Following your excitement is actually the shortest path to what you want. Act on your joy to the best of your ability. If you look at all your options and realize that taking a walk or driving your car or calling a friend is the most exciting, then THAT is the thing to do. When you can take no more further action on that thing, then look around for the next exciting thing you have the greatest ability to take action on and do it.

Excitement is its own self contained kit and its own driving engine."

<comment><USER12> >As for your hourly rate I can tell you from experience the global market is making it very competitive so suck that up.

I haven't had much problem with this. I don't compete on price because I can't bid lower than someone who has a cost of living 10x less than mine.

One thing I've learned is that the higher your rates go, the less the global market matters. Few companies are willing to pay for $100+ an hour out of country contractors.

Even if you're not charging that much, you can always find companies who are just more comfortable with someone in country. Many companies want someone they can reasonably fly in if the need arises, or just someone who is subject to the same legal jurisdiction if things to completely wrong. IP theft is a huge problem in developing countries and legal remedies are very difficult when dealing with international disputes.

<comment><USER13> > _I haven 't had much problem with this. I don't compete on price because I > can't bid lower than someone who has a cost of living 10x less than mine._

The problem is that those 10x-less cost of living people can increasingly compete on quality too.

Without some sort of protection inside their own country, it's "yay" for businesses and "tough luck" for IT workers. The HB1 (or whatever) visa thing is part of that.

In the end, the situation is not good for those 10x cheaper people either, because it ensures they'll always stay 10x cheaper, as even if their country develops more, there will always be someone underdeveloped with 10x cheaper cost of living to bring their prices down too.

<comment><USER12> I agree that some labor protections are needed. However language barriers, cultural differences, and time zone gaps add enough of an overhead to communication that most companies willing to pay my rate won't hire foreign programmers just to save a bit of cash upfront.

Then you have the legal issues I mentioned. Contractors in other countries are for the most part outside the reach of US courts in the case of contract disputes.

</comment></comment></comment></comment><comment><USER14> You have one of the most marketable skills in the world (programming), you've been at it for a good while (at least since C jobs were commonplace, apparently) but you're sleeping on couches and only lasted 4 months at your last job? I suspect there's a lot more to this story than you're telling here.

</comment><comment><USER15> I'm 47 and am currently doing work in C, C++ (as little as possible to tell the truth) and Lua. While I'm in a small department (3 man team excluding our temporary manager [1]) I'm also the youngest one on the team (and even more oddly, the one with the most seniority on the team). So I'm sure you'll be able to find something.

[1] The department I work in is needed in our company, but it doesn't really fit in with the rest of the company [2], so finding a manager has been ... interesting as the only other person in the company that understands what we do is a vice president of the company who is busy with other work.

[2] The company as a whole develops software for Android phones. My department is there to support our software on the call processing side of things, so we get to deal with SS7.

</comment><comment><USER16> You are clearly omitting the most important part of your story. Are you an alcoholic? Bipolar? Do you suffer severe depression where you stop showing up for work for weeks at a time? Schizophrenia?

I wish you the best, but it is silly for you to act like you 'just can't deal with it' rather than just admitting the real issue and trying to get help.

<comment><USER14> +1. I'm surprised so many people commenting think this guy needs advice about the job market or different types of technology that might interest him. I wish the OP luck in resolving his problems, but I doubt that they stem mainly from his skillset or the job market.

<comment><USER16> I agree, there is far more high paying work for the skills he claims to have than there are people to do the work.

In a career that long, he has dozens and dozens of former colleagues who are now far along in their careers and are decision makers. He should be getting offers to do work, nonstop, on his terms. He should be able to accept or reject work based on considerations other than 'getting money to eat', such as whether it is interesting work, whether he enjoys interacting with the other people on the project, whether it lets him work remotely, etc.

There is a huge hole in this story. Why don't his past colleagues want to work with him again? What has gotten him blacklisted? The subtext here says more than the actual story.

</comment></comment></comment><comment><USER17> If you leave a job at a large company when you have no savings then nothing we can say will make any difference. Do whatever your heart wants.

<comment><USER11> Dood is right you have to follow your heart or actually start by connecting with your heart which is something I think we all could do more.

</comment></comment><comment><USER18> I'm 51yrs old, and been in the IT 'game' 33yrs.

Programming is programming, one language is not much different from the other. There are jobs for low level coder's ( think; drivers, kernel porting, RT ). Web has diverged 'front end' or 'back end' take your pick. Work remotely is another option. The niche makes it easy for the employment people to pigeon hole you. If you have that need do a couple of CV's tailored to that niche.

Don't believe the startup 'shit' that only a committed programmer can work there and you need to give 60+ hrs a week. If you get that spiel, get up walk out. They will use you and throw you away.

I've seen 60+ hr code, it's; crap, bug ridden, security nightmare. In the 'Agile' short term for a startup it's great for the long term...! Strange how Facebook changed their moto about 'breaking it' didn't they when it got serious.

I still come across young 'coders' who aren't programmers telling me that JavaScript isn't an Object language. Strange how the function is a first class Object!

I got asked in an interview recently if I could name a design pattern. I responded with "ow you mean 'Gang of 4', how about observer" the reply was " No not the old band and that's a newspaper" I laughed got up walked out. Then sent an email to the CIO telling him the reason his IT stank was that he had inexperienced people working for him. Strange that company no longer exists :)

Sometimes you got to 'pony up', do the 9-5 so have a nice hobby. Take the crap, but not for too long otherwise you start believing it.

When you find the right role you'll know. They don't always pay the greatest, the atmosphere is good, and you'll want to get up in the morning to do it.

Strike a life balance, your mind is your tool. Burn it out and abuse it then you'll loose it.

So you'll find me, sat at a cafe or bar along the Med. My laptop isn't the most modern (actually it's a 5yr old MacBook Air ). I'll be unpicking some crap code, putting in comments, and applying some old proven techniques. If you can stand the smell of Gauloise Disque Bleu, I'll buy you a beer.

</comment><comment><USER19> I'll suggest learning a real-time operating system like VxWorks, and then writing code for embedded systems. Lots of challenge, interesting projects (robotics, etc), often safety implications that require a mature attitude towards quality control.

<comment><USER20> I'll second this. Embedded system development is highly specialised and usually involves bare-metal coding on limited hardware - sounds like something you'd enjoy given your background.

Modern computing has become far too generalised for the same sort of development - without all the levels of abstraction you've encountered, it'd be nearly impossible to develop something in a reasonable timeframe. I'm not defending it, but I think if you tried to develop something using such classical methods, you'd end up taking 10x as long creating the finished product. Price of progress I'm afraid.

</comment></comment><comment><USER21> C and Assembly days are not gone. It is quite well paid and widely used language. Perhaps just change environment?

</comment><comment><USER22> > I sure miss the "good old days" when you just focused on writing a single > app in C that ran on a well-understood machine, or even a single well- > understood OS API.

No, those days are alive and well in the embedded/IoT world. I suggest you look into doing some embedded work, if you want to return to that style of development ..

</comment><comment><USER23> A couple of years ago, right before my 58th birthday, I saw this posted on HN. [https://news.ycombinator.com/item?id=6640430](https://news.ycombinator.com/item?id=6640430) It says more than I can, but I will add one thing. At about that same time my company hired an engineer a year older than me. He's still doing a great job. I'm not in precisely the same business as you, but it's close enough that I still read HN.

</comment><comment><USER24> It sounds like you like knowing how the whole thing works, end-to-end. At big companies with so much pre-existing code & infra, thats not really possible. Maybe a startup would be a better fit for you? Thats one of the things I loved about working at a ~60 person startup, I had visibility and decision making power over all levels of what I was doing.

Of course it depends on what your definition of end-to-end is, as the rabbit hole can always go deeper.

</comment><comment><USER25> Perheps I'm in a bubble but everything seems to be running on stock Ubuntu VMs nowadays, occasionally disguised as Docker images. Either that, or iOS/Android.

As for the game, our very own patio11 and tptacek have developed something a lot like that but with the end goal of getting you a job aside from all the fun: [http://starfighters.io/](http://starfighters.io/)

<comment><USER26> "everything seems to be running on stock Ubuntu VMs nowadays"

Except if one is developing desktop software. Windows is pretty dominant at desktop, especially when considering enterprise, CAD and so on.

<comment><USER27> I have no actual evidence for this, but I think it's reasonable to believe that within 10 years about 95% of enterprise software will run in a browser. There'll still be niches where it isn't the case (CAD being an example) but for everything else, it's web technologies all the way down.

<comment><USER28> Have a look at OnShape. That future is coming faster than some people think.

<comment><USER26> Online business models are not yet foolproof, though. As I understand it Tinkercad basically went busted a few years ago because people did not want to pay for an online tool and eventually Autodesk bought it. Please correct me on the details. Also, I have no data either way to show would Tinkercad done any better as a desktop software.

([https://www.tinkercad.com/](https://www.tinkercad.com/))

OnShape is certainly an exciting experiment. If they pull through financially it will be pretty strong signal, IMO.

</comment></comment></comment></comment></comment><comment><USER29> Big picture... things could be far far worse for you.

Its pretty hard to give any sort of advice with such little information. I'll just say you really can't fall in love with the technology but rather you should love solving problems... ie be technology agnostic. There are lots of real world problems still left to be solved.

I also have some doubts that you seriously took advantage of working at Microsoft. I can tell you working from home with my own company you really really miss learning from others. The idea making synergy and excitement of being around other smart people even if its only during lunch break is a huge highly underrated benefit long term.... and now you will be sitting on a couch.

I honestly can't figure out if it is your goal to just program simple little programs with assemble or C? Is that what makes you happy? Did Microsoft not challenge you enough? Again serious lack of information.

<comment><AUTHOR> This was my 2nd go-round at MS. I also worked there for 5 years, earlier in my career, and had a better time. This time, I was working as a contractor, so switching teams was not an option. And again, the day-to-day was so horrific, that soldiering on was also not an option.

As far as my goal - that's what I'm trying to figure out. For practical purposes, it may be mostly about avoiding webdev. However, this most recent job was not webdev, yet it was still an absurdly convoluted architectural hodge-podge. So, one thing I may be looking for is more homogeneity. It's not about size or complexity, per se. I've worked on many large, complex projects and had a good time.

What turns me off about webdev is a) new frameworks being hyped every month, and b) the architecture of a modern web app gives me a headache. I want to return to a time when I used to spend most of my time on data, algorithms, and writing code, with a single API being the worst "necessary evil" in the mix.

<comment><USER30> How can you be contacted?

</comment></comment></comment><comment><USER31> You can definitely find work in Asm/C level today, at hardware manufacturers mostly (silicon vendors usually)

Or look into today's C: Go and Rust

<comment><USER32> There are very, very few Rust jobs. In a few years, maybe, but I wouldn't make a career move on it yet.

<comment><USER33> Given one of the OPs annoyances is the continuing churn in tech tools, please don't waste time with Rust. The premise of the language (safety) is seductive but it comes at the cost of complexity. I am an experienced dev that spent a month evaluating it and then decided life was too short. Frankly, it is easier for someone with a C background to work in C++ than it is with Rust. That's because you can use the simple features of C++ to get going and add on complexity as you learn more/need it. With Rust, you get thrown into the deep end right at the start with the complex borrow/ownership system. There is no proper book yet on Rust (some good online sources where I commend the people on effort ... but there is no K&R).

P.S. I used Go for some projects last year and found the situation to be much better. The Go book that's available on the website reminded me of K&R ... readable in a weekend of two. This should be the criteria for new programming languages IMHO.

<comment><USER32> As a lifelong C developer who recently had a lot of success starting a new project in Rust, I disagree. Writing "C" in C++ until you need extra features always turns out terribly. In Rust, you have to write code the Rust way from day 1. It takes 20 minutes of fighting with the compiler every time I implement a new feature in Rust, but when it compiles it does what it's supposed to do, the code looks good and there are no memory issues.

Don't even get me started on Go. Most overhyped language ever, with some serious issues.

</comment></comment></comment></comment><comment><USER34> How about being a compiler engineer in the UK?

[http://www.fsf.org/resources/jobs/embecosm-compiler- engineer](http://www.fsf.org/resources/jobs/embecosm-compiler-engineer)

</comment><comment><USER35> People still get paid for work almost exactly like the TIS-100 game. Notably GPGPU programming. I switched from webdev to playing with h/w chips and mostly haven't looked back.

It's more difficult work.

<comment><USER36> Orly? Cuda type stuff? You caught my interest.

</comment></comment><comment><USER37> If you were able to get a job at Microsoft, I'd be surprised if you couldn't get a job elsewhere. Maybe look at remote jobs and moving to a low cost of living area if you are broke and sleeping on couches. Perhaps you might find these links useful:

[https://remoteok.io/](https://remoteok.io/)

[https://www.producthunt.com/e/2015-trends-remote- work](https://www.producthunt.com/e/2015-trends-remote-work)

</comment><comment><USER38> "but the day-to-day workflow was tedious and torturous". I guess what you describe is something every oldtimer in every discipline recognizes.

How do you think a dentist feels after 30 years of 'could you open your mouth a bit further, tnx, yeah, well let me see, sir do you floss at a daily basis? Especially the back teeth need some more attention...'

Saying you are a 'C' guy makes no sense, sounds like you have forgotten about all the shit you had to take care of in the old days :)

There were tens (or even hundreds?) of C variants with there own compilers, frameworks, platforms, non-compatability, dll-hell.

I have had a great time working in a simple application management team, and a horrible time working in a startup with advanced search technology.

My experience is nice coworkers make or break the day. A boring team is killing, even if the project is great.

</comment><comment><USER39> I live in a small town and used to work with a guy who was Microsoft Windows phone support at one point before they transferred the role to India. He wasn't a programmer. He wasn't an admin. He was phone help support as in "I can't get teh google to come up when I push the power button... pleaz help!".

He has gotten the best job offers in the area including an interview for head of IT for the entire school district. He doesn't even have a college degree. He is good guy and I enjoyed working with him, but at the risk of sounding dismissive I didn't observe him to be very motivated nor a top level problem solver nor see that he possessed much high level knowledge.

Point being... with people who don't know better the word "Microsoft" on a resume is a golden ticket and a guarantee that one is top caliber talent and highly knowledgeable. So there is that in your favor....

</comment><comment><USER40> Maintenance programmer at defense contractor? Most of those programs are permanently stuck in the "good old days"

</comment><comment><USER41> Depending on your background, taking a gig in R&D or a rapid prototyping shop can be very clarifying, and you get to use and bring to play lots of old skills the young folk don't even know about.

You don't have to really worry about framework, just pick one. Or you might end up reworking fundamental data structure code, which can be really fun for an exercise of algorithmic design.

On the other-hand, maybe it's time to go multi-disciplinarian, take a gig connected to, but completely outside of your comfort zone. Nothing put me into a state of panicked "I need to learn from the firehose" mode faster than this. I'm not even talking technical work, go be a manager, or an industry analyst, work on soft skills or liberal arts fields. Your old skills can provide interesting viewpoints nobody else has.

</comment><comment><USER42> Hm, I am not bored yet, but I think I might be bored in the future. So I was wondering if I should go back to university and study something interesting, Physics perhaps, or even pursue a new career, like becoming an airline pilot or so..

<comment><USER43> The best advice I've ever gotten in my professional life is "don't solve a problem you don't have yet."

</comment></comment><comment><USER44> Errr... sounds like you don't want what to do what the job has become these days. Actually sounds like you don't even want to be working. Have you thought about doing something else entirely, try to find something you enjoy?

<comment><USER45> Teaching or tutoring. Lots of work there and good money.

<comment><USER46> Really? Any pointers on how to get started?

<comment><USER45> Google?

Most countries need teachers, contact that department of the government and start from there. Get into a school, watch some lessons. Then get a teaching qualification.

</comment></comment></comment></comment><comment><USER13> >* I sure miss the "good old days" when you just focused on writing a single app in C that ran on a well-understood machine, or even a single well- understood OS API. But those days are mostly gone. Now it's all distributed, multi-level conglomerates of varied frameworks and languages sort-of working together. I can't decide whether I have any interest in that. I sort of envy the people who can simply state, "I am a Rails dev" or similar.*

Well, there are tons of places that use C developers.

</comment><comment><USER47> You need to look into industrial automation / measurement device manufacturers. Custom Windows software, PC-only, well defined interfaces[0].

[0] Relatively speaking ...

</comment><comment><USER48> Look at companies that make smart devices, such as sensors.

</comment><comment><USER49> I don't know if this will help, but I can pick the niche for you. Here are the languages and frameworks you should be learning today:

* JavaScript (ES6), Node.js and Express, React

You should also get a refurbished Mac Mini or Macbook, and start learning Swift for iOS development. Put together a few simple apps. There's a lot of jobs for iOS developers.

A lot of Rails developers seem to be moving on to Elixir and Phoenix. So I'd keep my eye on them, too.

<comment><USER45> I meet a lot of older developers who harp on about assembly and coding mainframes. Sure, it sounds wonderful, but they got fuck all done in a day.

You should pick JS, something server side (PHP, Ruby, Python, or Node.js) and react.

You'll spend a lot of time configuring libraries and services (webpack or webify) but that's just the way coding is these days. Anyone of us could code some assembler - like OP said, it's fun and easy. We teach our 14 years olds how to code assembler - it's that easy. You don't honestly think you can compete with those skills? You need to learn the hard stuff.

This is what you should do:

Learn all of the above Learn PhoneGap and cordova, use React to create an app. Pitch to companies to put an App out for their website. Use whatever server side tech they use (e.g. 90% of companies will be using PHP) to create a simple Web API for your app to call.

<comment><USER50> > Anyone of us could code some assembler - like OP said, it's fun and easy. We > teach our 14 years olds how to code assembler - it's that easy. You don't > honestly think you can compete with those skills? You need to learn the hard > stuff.

Aside from rest of the comments, this is such a ridiculous comment that I can't tell if it's a joke or not. Have you actually built anything meaningful with assembly language?

<comment><USER51> The language isn't particularly complicated, but with the assembly it's very easy to lose the sight of the forest for the trees.

I think that's why barely anyone uses raw assembly for any big pieces of code, unless they either have to (severe hardware constraints, lack of any compilers, or some specific needs) or want to challenge themselves. Higher level languages are there for a reason :)

<comment><USER50> That doesn't make this guy's comment anything close to true. It's like saying "Writing a piece of English literature is easy. All you need to know is alphabets. Really that's all you need to know." It is hard to express yourself using assembly, and like you said that's why there are higher level languages. Of course you don't need to know what a car is made up of in order to be a good driver, but it's idiotic to think the internal technology is simple.

<comment><USER51> Yes, exactly. I don't like analogies, but language and alphabet is a good one here.

</comment></comment></comment></comment></comment></comment><comment><USER52> Perhaps sign up and participate in the Launch Hackathon[1] at the end of the week? Best case scenario you start your own company. Worst case scenario? You have a fun time just sitting there crunching on a problem you're interested in.

[1] [http://www.launchhackathon.com/](http://www.launchhackathon.com/)

<comment><USER33> How popular is this event? I signed up for it and was surprised by its format (winning teams get investments). Any links to experiences from past events? We should have a HN contingent :-p

<comment><USER52> I've never participated in past launch festival things but it's my understanding last year drew in about 1,000 developers for the hackathon which distilled into teams (though not sure how many). It's certainly an interesting event!

Also I feel like a vast majority of the people would have to be part of the HN contingent, lol.

</comment></comment></comment><comment><USER53> > So, my most recent stint at Microsoft just didn't work out. The tech was > cool, but the day-to-day workflow was tedious and torturous.

This sentiment will typically go unchallenged because we all know that micromanagement is here to stay. Still, please do share the juicy bits that led you to become dispirited.</comment>


How to eat less meat? – For better health and a better world - <AUTHOR> https://jeena.net/how-to-eat-less-meat <comment><USER2> I am from India living in a country where meat is eaten three times a day by almost everyone. Not even fish. Red meat.

I was brought up vegetarian. If fact in many parts of India, vegetarian is still a way of life. I started eating meating when I went to college. When I first moved here , I actually bought into the whole protein and cavemen thing. Avoided red meat but still ate of a lot of poultry. And it is probably true that you need meat for muscle building. Can be done using vegetarian food but its hard.

However, a few things happened. I got sick. Not any disease really but I started getting severe panic attacks for which I could not get any help from the doctors. I did not want to take hard addictive pills.

This forced my to take a hard look at my lifestyle. I started making changes to find out what works. Cut caffeine. Stopped smoking. Almost stopped drinking. Ate 3 times on time. All this worked but not much. Finally I decided to stop eating meat. I stopped red meat, poultry, fish, eggs etc. These are the things I noticed. 1) I stopped getting any cravings for smoke

2) Panic attacks and dizziness gradually stopped. Took some time but it did

3). No chest pain due to gas anymore.

4) I slept better. I mean I had not had deep sleep in a long time before that

5) I felt better generally. Felt happier I guess.

6) I like looking at all the vegetables and fruits. At this point, I don't even go near the meat aisle.</comment>


Wadge Degrees (2015) - <AUTHOR> https://billwadge.wordpress.com/2015/11/30/wadge-degrees/ <comment><USER2> This was a very entertaining post, thank you.

The equivalence of the relation to the game really changes the approach. The proof I first came up with of his claim about sequences with at least one 0 vs those with infinitely many 0s was very different than the adversarial one (let b be the concatenation of all finite prefixes of a, increasing in length), and proving nonexistence of the reverse relation would have been difficult in the same constructive manner.

Would it be bad form to discuss his parting challenge here?</comment>


I retired at 34 with $3M–here are 5 downsides of early retirement - <AUTHOR> https://www.cnbc.com/2019/06/24/i-retired-at-34-with-3-million-here-are-the-downsides-of-early-retirement-that-no-one-tells-you.html <comment><USER2> 2 of the reasons here are legit. I absolutely understand the possible regret and people treating you like a misfit. Fortunately for the second point, there are communities of people doing the same thing that you can join in and be apart of a community.

The other three are generally seen as the downsides of FIRE and something adherents talk a lot about. If you don't build the life you want before you retire, you will be bored. If you don't sacrifice your life, hobbies and building up a solid life outside of work, you won't be bored. Instead you will retire and have things to do in retire. If you base your happiness off retiring rather than hobbies and a social circle, you will be miserable.

Overall, this is common with FIRE. People work their ass off to retire early not thinking about what is next. If you think about it, put some effort into developing hobbies, a social circle, and base your happiness off that, you will do just fine.</comment>


Kubernetes Is the Platform. What's Next? – Questions and Answers - <AUTHOR> https://www.redhat.com/en/blog/kubernetes-platform-what%E2%80%99s-next-questions-and-answers <comment><USER2> This is mostly an advertisement for OpenShift that is poorly disguised as information.

</comment><comment><USER3> This doesn't really talk about Kubernetes in general, it's just some marketroid selling Red Hat OpenShift. Nothing to see here.

<comment><USER4> Huh? There's lots of mostly superficial information in there about the Kubernetes ecosystem and Kubernetes itself. And most of the products mentioned aren't Red Hat products. I learned a lot by following the links. Did you know about Draft, Brigade, Metaparticle, Pulumi, Ballerina, Fission, Fn, Kubeless, Nuclio, OpenFaaS, OpenWhisk, Riff? And that's just the answers to two of the ~dozen questions.

<comment><USER5> You might be interested in the serverless interactive landscape: [https://s.cncf.io](https://s.cncf.io). The installable platform section is all installable on top of Kubernetes.</comment></comment></comment>


Two Studies, Same College, 16 Years Apart, Show Less Openness to Free Speech - <AUTHOR> https://arcdigital.media/two-studies-at-the-same-college-16-years-apart-show-less-openness-to-free-speech-8083c0a45874 <comment><USER2> "Of course, it is worth noting that Smith is a unique school: a small liberal- arts college, historically left wing, which only admits women. And it's possible that changes at Smith are offset somehow by changes at other schools."

Yeah... at least they notify us about it. But really, are the results of such a study even remotely relevant considering the demographic differences with the normal population?

</comment><comment><USER3> Not surprising at all. There's been a lot of pushing against free speech, as well as a redefinition of "free speech" as "free speech only for topics that I do not find controversial", which interestingly matches Stalin's or Mao's or Hitler's definition of free speech.

<comment><USER4> Read the article before commenting.</comment></comment>


Cross-browser collection of nice looking CSS box-shadows - <AUTHOR> https://www.reddit.com/r/web_design/comments/8pafjn/crossbrowser_collection_of_nice_looking_css/ <comment><USER2> Direct link - [https://github.com/madeas/box- shadows.css](https://github.com/madeas/box-shadows.css)</comment>


Dichronauts - <AUTHOR> https://www.gregegan.net/DICHRONAUTS/DICHRONAUTS.html <comment><USER2> Excellent book. Took me three reads to understand most of what was going on, but very much worth it.</comment>


Putin: Snowden can stay in Russia if he stops damaging USA - <AUTHOR> http://rt.com/news/putin-snowden-asylum-extradite-489/ <comment> brown9-2 Well, what's the point in letting him leak stuff to the media from Russia when the Russian government could just get all those secrets from him anyway?

This isn't exactly a great benefit to the US either way...</comment>


More Evidence Against Vitamin Use - <AUTHOR> http://well.blogs.nytimes.com/2011/10/11/more-evidence-against-vitamin-use/?ref=todayspaper <comment><USER2> Good-quality commentary on the recent study announced in the article submitted here by a regular contributor to the Science-Based Medicine group blog:

[http://www.sciencebasedmedicine.org/index.php/vitamins- and-m...](http://www.sciencebasedmedicine.org/index.php/vitamins-and- mortality/)

And since it has been a while since this link has been posted in an HN comment, and since commenters here have mentioned that they haven't even read the fine submitted article, much less the underlying study publication, I'll repost here a link to a classic article by Peter Norvig (LISP hacker who is now Google's director of research) on how to interpret scientific studies and analyze study designs.

<http://norvig.com/experiment-design.html>

Suffice it to say that studies of human nutrition are HARD. A faultless study design would have to have dictatorial power to observe patient behavior over the long term, measuring exactly absolutely everything that a patient eats. The study design of the study reported in the submitted article is basically the best kind of study design for a longitudinal study that will pass institutional review for study of human subjects and not bankrupt the researchers with its expense. The researchers have made best current efforts to reduce flaws in the study design to the utmost extent possible, and acknowledge what they don't know (because they can't infer it from the study design) in their publications and comments to the press.

<comment><USER3> I encourage everyone to read the conclusions. (And they're actual conclusions! Not just a summary! Yes, that makes me so excited as to warrant three exclamation marks!)

</comment></comment><comment><USER4> It's worth noting that they're describing the effects of high doses of vitamins. Given the average modern diet (at least, for Americans like me), vitamins may be necessary to achieve "normal" doses.

I take a fiber supplement (which, I know, is not a vitamin) because I try to avoid refined carbohydrates, which tends to mean I have to avoid carbohydrates altogether except when making a home-cooked meal. Since the average adult male around my age/weight needs ~28g of fiber a day, and I probably consume 15g or less, the 6g supplement seems prudent. Anecdotally, my ... er, system ... seems to work better that way.

<comment><USER5> Also important is that they are not describing the effects of high doses of all vitamins. Superfluous amounts of Vitamin E seem to be mainly what they are seeing negative results from, and you'd probably only be getting that much Vitamin E if you were taking Vitamin E-specific supplements on purpose.

<comment><USER6> This type health news confuse people; everything we think will make us healthy is later claimed as an unhealthy exercise in some other research, should we distrust health news in mainstream media totally?

</comment></comment></comment><comment><USER7> I haven't read the original study, but might they not be mixing together cause and effect here? Instead of taking vitamins causing people to get sick, it might be people with riskier genetics/lifestyles are more likely to take vitamins to hedge against that?

Reminds me of a news article that interpreted statistics to say "People who drink low fat milk are fatter! Clearly this means that low fat milk makes you fat!" instead of the obvious conclusion that people who are fat would drink low fat milk to try to get slimmer.

<comment><USER8> I'm also suspecting this. Too many people seem to think that they can get away with an unhealthy diet if they take vitamin and mineral supplements.

</comment></comment><comment><USER9> I'm sick of this hand-wavey selective nonsense. Yes, healthy people with good diets probably shouldn't be taking any vitamins, but the people I know who are this healthy are a small minority, including myself.

Lets look at these cases specfically. Should women over the age of 50 take iron? Probably not, but why are they taking iron? Because they've been told their whole lives they're low on iron by their doctors, who were right to tell them so, but now know not to recommend iron pills past a certain age. Were they wrong for doing so?

Look at how foods are enriched with vitamins. Folic acid is everywhere because it helps pregnant women, but in men it can cause cancer, but it also might fight a different cancer, yet we still take it in. Its nearly impossible to buy bread from the store that doesn't have folic acid. Hell, half the things in the grocery store are enriched with folic acid. How about we pull that stuff and just tell pregnant women to take supplements and stop feeding men a carcinogen? I prefer the freedom to make my own decisions than having the government dictate folic acid supplementation via food and the other hand having the NYTimes telling me not to take anything.

For the record I take fiber, fish oil, and vitamin D + tryptophan. The latter being more or less a cure for my SAD (after several failed SSRIs). This combination makes me feel like a million dollars. With a little supplementation as well as good sleep, etc I'm about 10x as creative and have more energy. Quitting these would be foolish. If anything, we should be encouraging responsible and informed supplementation and pulling government mandated supplementation for things that harm us, folic acid especially.

Heck, I'm a big government kind of guy, and even I have a problem with folic acid in our food. The government, even under the best of circumstances, is biased towards pregnant women and families (population growth/family is seen as important) but really not interested in helping you achieve longevity or be happy. You're going to have to work those out on your own, hence my recommendation to look into potential supplements and lifestyle changes, as well as avoiding government supplementation that might hurt you (folic acid) but help others (pregnant women).

This article is so against the hacker ethos its not even funny. Sorry NYTimes, this issue is a lot more complex than "Vitamins bad, mmm'kay?"

<comment><USER10> I don't want to discredit your experiences, because if they work, they work, but have you considered the possibility that you're achieving a placebo effect with your supplements? In some studies, iirc, placebos have been shown to be as effective or more effective than SSRIs.

<comment><USER2> _In some studies, iirc, placebos have been shown to be as effective or more effective than SSRIs._

You wrote, "if I remember correctly," so I'll mention here some sources I have checked recently for other Hacker News threads. In actual practice, placebos only look effective when the statistical tests in a study are poor, and most especially when the symptoms are self-reported by patients. Placebos are NOT effective in treating actual disease states or improving "hard endpoints" such as reduction of all-cause mortality or major morbidity from specific diseases with verifiable physiological signs. See

[http://www.sciencebasedmedicine.org/index.php/placebo- effect...](http://www.sciencebasedmedicine.org/index.php/placebo-effect-for- pain/)

[http://www.sciencebasedmedicine.org/index.php/placebo- effect...](http://www.sciencebasedmedicine.org/index.php/placebo-effects- revisited/)

[http://www.sciencebasedmedicine.org/index.php/the-placebo- ef...](http://www.sciencebasedmedicine.org/index.php/the-placebo-effect/)

[http://www.sciencebasedmedicine.org/index.php/placebo- effect...](http://www.sciencebasedmedicine.org/index.php/placebo-effects- without-deception-well-not-exactly/)

[http://www.sciencebasedmedicine.org/index.php/benedetti- on-p...](http://www.sciencebasedmedicine.org/index.php/benedetti-on-placebos/)

Placebo effects are strongest for patient self-reported subjective symptoms (classically, pain, but in more recent studies mood) and weakest for objective clinical signs measured by experienced observers. Hard endpoints to look at in the case of depression include preventing suicide and the patient returning to normal daily life function (such as full-time employment if that is appropriate for the patient's stage of life). Some hard endpoint studies indeed do not support some brands of SSRIs as well as they support cognitive- behavioral talk therapy for depression, but no properly designed study says that placebos are "effective" for any indication for SSRIs. Thanks for bringing up this issue, which is recurrent on HN, here.

<comment><USER11> There is a huge range of placebo effectiveness. Placebo's that cause side effects work better than those that don't. Placebo's handed to you by people in lab coats work better than people in normal attire etc.

Also, while placebo's have little effect on cancer or broken bones they do show significant and measurable effects with increased immune response, reduce pain, reduce signs of depression and a host of other things.

PS: This get's really complected there is even evidence that many anti deprecation work on the side effect and only show up as better than 'placebo' when the placebo's have no side effects.

</comment></comment></comment></comment><comment><USER12> I listened to NPR talk about this study yesterday. They explained that men taking a normal does of Vitamin E are NOT at a higher risk for prostate cancer. Men taking what they described as a "mega dose" are. The conclusion is don't take more than the recommended amount, vitamins can be harmful if you take too much. Don't do that.

<comment><USER13> Exactly. When starting any supplement, it's worth spending ten minutes to look up what conventional (read: conservative, which is _exactly what you want_ here) medicine considers the maximum daily dose, side effects, overdose symptoms, and toxicity levels.

</comment></comment><comment><USER14> It's pretty hard to get the (now increased) recommended allowance for vitamin D (600 IUs ... especially as an indoor-programmer-type). You need 10 glasses of milk to get that without supplementing. [http://www.docgurley.com/2008/05/18/the-greatest-drug-in- the...](http://www.docgurley.com/2008/05/18/the-greatest-drug-in-the-world- isfree/) [http://www.sparkpeople.com/resource/nutrition_articles.asp?i...](http://www.sparkpeople.com/resource/nutrition_articles.asp?id=1357)

</comment><comment><USER15> So, when do I get to buy this new bestseller:

"The 4-hour 'giving you prostate cancer before your time' week"

</comment><comment><AUTHOR> This isn't rocket science, but I am glad the research is being done. It seems obvious that eating whole foods is the best way to get your vitamins and minerals. First of all we have millions of years of consumption of whole foods, so our microbiotic gut systems are well tuned to them. Supplements are fairly new evolutionarily. The specific form of compounds is extremely important as noted here:

[http://www.sciencedaily.com/releases/2011/10/111011112501.ht...](http://www.sciencedaily.com/releases/2011/10/111011112501.htm)

Maybe I am hypersensitive, but I can literally feel that there is a man-made substance in my body when I take vitamins. Just my two-cents.

</comment><comment><USER16> No explanation is given why any supplement is unhealthy. That's the first thing.

Secondly, the context in which this occurs is that various government agencies and professional guilds want to prohibit the sale of supplements, or impose ridiculous 'standards' on their manufacture and testing.

However, it's very important that people remain free to choose which non- prescription chemicals to put in their bodies. Medics and pharmacists don't always get it right, they are difficult to consult, and they are as subject to whim and fashion in their thinking as other professions.

Meanwhile, only a handful of people die annually from vitamin overdose, whereas hundreds of thousands people die who take prescription drugs (yet we don't say that there's no justification for prescription drugs).

<comment><USER17> I hope you're trolling but on the assumption that you're not:

> No explanation is given why any supplement is unhealthy. That's the first > thing.

An extreme example to illustrate the point: if you eat a random plant and drop dead, I'm not going to look for an explanation, I'm going to avoid eating that plant until I can prove that your death was caused by another factor. Likewise, if taking vitamin supplements appears to result in a negative effect on overall health rather than the expected positive, the smart thing to do is stop taking them until you can demonstrate otherwise, is it not?

> Secondly, the context in which this occurs is that various government > agencies and professional guilds want to prohibit the sale of supplements, > or impose ridiculous 'standards' on their manufacture and testing.

Source for this?

> However, it's very important that people remain free to choose which non- > prescription chemicals to put in their bodies.

Indeed, it's also important that people are well educated in the effects of those non-prescription chemicals and are in full possession of the known facts about their effects. Such is the aim of studies like this.

> Medics and pharmacists don't always get it right, they are difficult to > consult, and they are as subject to whim and fashion in their thinking as > other professions.

Maybe so, but they know a lot more about the human body than those who don't study it, since that is by definition their job. Besides, the great thing about science is that anyone can dive in and have a go at proving or disproving something so if you disagree with the conclusions in this article, run some research of your own and prove them wrong.

> Meanwhile, only a handful of people die annually from vitamin overdose, > whereas hundreds of thousands people die who take prescription drugs (yet we > don't say that there's no justification for prescription drugs).

Sources for either of those statements?

Your issue with prescription drug-taking is entirely separate; you might as well argue that thousands of people die driving yet we don't say there's no justification for driving.

<comment><USER16> >An extreme example to illustrate the point: if you eat a random plant and drop dead, I'm not going to look for an explanation, I'm going to avoid eating that plant until I can prove that your death was caused by another factor.

Even if the plant extended my life? Isn't trying to understand why I died the same thing as looking for an explanation?

Any studies which merely correlate supplementation with early death and then 'conclude' that supplements are bad can be refuted by saying that the relevant people in spite of supplementatation and not because of it.

>> Secondly, the context in which this occurs is that various government agencies and professional guilds want to prohibit the sale of supplements, or impose ridiculous 'standards' on their manufacture and testing.

>Source for this?

[http://www.fda.gov/Food/GuidanceComplianceRegulatoryInformat...](http://www.fda.gov/Food/GuidanceComplianceRegulatoryInformation/GuidanceDocuments/DietarySupplements/ucm257563.htm)

>> However, it's very important that people remain free to choose which non- prescription chemicals to put in their bodies.

>Indeed, it's also important that people are well educated in the effects of those non-prescription chemicals and are in full possession of the known facts about their effects. Such is the aim of studies like this.

Like I said, the article gave no explanation for why any supplement or supplements in general are bad. So there's no scientific or educational value.

Since the freedom to take supplements is presently at risk, the article can only do harm.

>Maybe so, but they know a lot more about the human body than those who don't study it, since that is by definition their job.

Yes, doctors do know more about the body than most people but that doesn't make them infallible. Part of recognising our fallibility means not relying on any one source of expertise. If doctors and government took that seriously then they wouldn't be trying to restrict non-prescription items. The government's job is to protect our freedoms. Doctors can learn from ordinary people's experiences of supplementation.

>the great thing about science is that anyone can dive in and have a go at proving or disproving something

But he can't if the relevant supplements are banned!

Note also that, generally speaking, science thrives in an atmosphere of freedom and toleration.

>if you disagree with the conclusions in this article, run some research of your own and prove them wrong.

There's nothing to test from this article: it doesn't assert anything. It merely insinuates that supplements are bad. Science is about searching for explanations. It's not about counting studies or weighing evidence or anything like that.

>> Meanwhile, only a handful of people die annually from vitamin overdose, whereas hundreds of thousands people die who take prescription drugs (yet we don't say that there's no justification for prescription drugs).

>Sources for either of those statements?

[http://en.wikipedia.org/wiki/Vitamin_poisoning#Comparative_s...](http://en.wikipedia.org/wiki/Vitamin_poisoning#Comparative_safety_statistics)

> Your issue with prescription drug-taking is entirely separate; you might as > well argue that thousands of people die driving yet we don't say there's no > justification for driving

I don't have an issue with prescription drugs, but note the car driving argument is precisely what is being put forward with regard to supplements.</comment></comment></comment>


1% preferential access outweighs the cost of helping others - <AUTHOR> http://www.physorg.com/news158245420.html

<comment><AUTHOR> Isn't this very similar to a lot of (differently modelled) business propositions backing OSS?

<comment><USER2> _However, when most of the yeast are cooperating, it becomes advantageous for some individuals to cheat, and vice versa, which allows co-existence between cheaters and cooperators to arise._

It also means we're kind of stuck with the patent trolls.</comment></comment>


The Signs of God's Existence - <AUTHOR> https://vimeo.com/36683639

<comment><USER2> This is at most an argument for agnosticism, not for theism. To say that with our current state of knowledge we don't know how to explain certain things - or even to say that we _cannot_ know certain things - does not mean that we should grab onto the handiest fairytale as the definitive explanation for said lacuna in our knowledge.

<http://en.wikipedia.org/wiki/Russell%27s_teapot>

</comment><comment><USER3> <http://en.wikipedia.org/wiki/God_of_the_gaps>

</comment><comment><USER4> mmm...intelligent design does not make sense either because it tries to refute evolution. Evolution will be proven with the study of the genome and bioinformatics, and I think is has already being proven...search for Francis Collins (director of genome project NIH) videos in youtube.

<comment><USER4> [http://www.youtube.com/watch?v=rwA2nVYTR2A&list=PL99B2AA...](http://www.youtube.com/watch?v=rwA2nVYTR2A&list=PL99B2AA9CE8133639)

</comment></comment><comment><USER5> I like how only science is used here for the arguments. Mind blowing documentary.</comment>


Show HN: CodeBuff – smart code formatter - <AUTHOR> https://github.com/antlr/codebuff <comment><USER2> Very interesting! I have been thinking about something similar, but rather than learning from examples, it would have a generic "misaligned" cost function that would penalise lines which have similar content but in different columns, and minimise this by hillclimbing or similar.

The difficulty is tying it to a particular language's parser and whitespace rules.

<comment><USER3> If you're interested, Google Research recently published a paper about code formatting via dynamic programming: [http://static.googleusercontent.com/media/research.google.co...](http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44667.pdf)

<comment><AUTHOR> Interesting, though it is a framework very similar to previous work using Box combinations. Here, we don't require any work from a language expert. We simply sniff your project, and then make new files look like those. Handling a new language requires no coding.

</comment></comment></comment><comment><USER4> Does this ML model assume that popular code style = correct code style? (had a cursory look)

<comment><USER5> I think you can take the code and train it on whatever corpus you like.

<comment><AUTHOR> Yep. no definition of "good style". The tool simply makes new files look like the rest of your project.

</comment></comment></comment><comment><USER6> Love this approach. We need more ai applied to problems in writing code. Like an ai parser that auto corrects errors. Anyone know if something like this exists?

<comment><USER7> Not directly related, but there is a group in the University of Edinburgh that focuses on that (applying ML to source code). Their page is [https://mast- group.github.io/](https://mast-group.github.io/)

</comment></comment><comment><USER8> How does it deal with languages with significant whitespace? Can it format Python without breaking it?

<comment><USER9> haven't tried, but if you train it using only correct Python I bet it can only produce correct Python. Have to check this out to be totally sure of the absence of a weird corner case.

</comment></comment><comment><USER10> Why do you need a grammar if this is supposed to learn it itself from the code?

<comment><USER9> The grammar is used to compute the code layout features that CodeBuff learns from: it parses each file and associates spacing and indentation features to trees' contextual features.

Then, when we parse a new file to pretty-print, we parse again with the _same parser_ and the features that were learned are matched to the tree at hand to recover the "right" spacing and indentation features for the given example code.

</comment></comment><comment><USER11> This would be a nice way for getting the code formatter configuration about right when switching to a new editor with an old project.

</comment><comment><USER12> How does this improve over VSCode's golang formatting (which I think is excellent)?

<comment><USER9> It's language parametric, so it can work for any language you have a grammar for and a set of example files to train on. In this sense it helps the authors of formatting tools.

For the users for a specific language it could also be an improvement since configuration of a formatter can be done via completely arbitrary code examples. But we have to work a bit further to streamline that use case.</comment></comment>