Things we can't compute - <AUTHOR> http://www.alexstjohn.com/WP/2013/10/07/things-cant-compute/

<comment><USER2> TL;DR: _" If we can build a big enough computer we can understand anything"_ is a delusion, but _" If we can build a big enough computer we can compute anything"_ is scientific fact.

* * *

There are many valid points in the article. Sadly, they are shadowed out by misconceptions and/or wrong phrasing.

Since Turing's 1936 paper, we have proof that _computation is universal_. That means any computation in the universe, including the one occurring in your brain while you read this, can be implemented on a Turing machine.

So, yes, we have proof that _a big enough computer_ can compute the human brain, the global climate, and any other physical phenomenon.

And the argument about indetermination in physics (ping-pong ball in the rapids) is about getting the information, not computing it — computation is universal, but information is sometimes impossible to obtain.

* * *

Universal computation does not mean that a computer can understand itself, and I like that the author suggests such a thing should be impossible.

Universal computation does not mean that building _a big enough computer_ should always be the priority, and I like how the author addresses that.

<comment><USER3> Not quite. We can compute any determinate process, perhaps. (Although as Gödel showed, self-reference introduces computational paradoxes even in closed, limited, artificial, formal systems: how do we compute "this statement is false?") You seem to believe that consciousness is essentially computation, and perhaps you're right. You may be wrong though -- the nature of consciousness is one of the trickiest, most intractable problems. It's an open question. Again as with Gödel, self-reference introduces problems. If we believe that consciousness is a mechanical/chemical operation without innate intelligence, then any statement about consciousness is itself a product of a certain balance of chemicals in the brain only. So the whole idea of getting to the truth about such things is a pointless endeavor.

"does not mean that a computer can understand itself" \-- not sure I entirely agree here either. My computer seems pretty good at understanding itself: right now it's telling me its internal temperature, what programs it's running, CPU and memory utilization, and so forth. In fact, it probably understands itself much better than I do -- at billions of computations per second, I certainly can't keep up. I'm being cute, yes, but I'm also suggesting you seem to implicitly accept that there's a certain type of self- understanding or consciousness that computers don't have, but living beings (in particular, humans) do. Whereas before you said your brain is just a computer ... ?

<comment><USER2> Let us make a distinction, shall we?

Determination is not an issue. Any non-deterministic Turing machine has an equivalent deterministic Turing machine.

Consciousness is an issue. Indeed, if consciousness is pure computation, then its self-referencing character make it vulnerable to Gödel's incompletude theorem. However, maybe consciousness is more than mere computation — maybe it cannot be reduced to an axiomatic system. Anyway, as far as neuroscience goes, I think consciousness mostly remains a philosophical debate.

* * *

You misinterpreted my sentence. What I meant is: _" universal computation is not, in itself, a proof that a computer can understand itself"_. This relates to my above remark: maybe consciousness is not pure computation.

Also, a system monitoring its own status is not necessarily _understanding itself_.

</comment></comment></comment><comment><USER4> Just for a bit of perspective, Alex St. John is the "Father of DirectX", and created the first video game company that streamed games over a web browser.</comment>


Domain Pascal Language Reference (1987) [pdf] - <AUTHOR> http://bitsavers.informatik.uni-stuttgart.de/pdf/apollo/000792-04_DOMAIN_Pascal_Language_Reference_Jan87.pdf <comment><USER2> Ah, I still remember some Apollo Workstations used for email (i.e. Pine) at my university. Never got around to seeing the original Domain/OS, as by then the acquisition by HP was very much complete (and boy, if it weren't for IBM, HP- UX would've looked even worse).

Anyone got to use those boxes in their prime? Supposed to be Unix-ish, but not quite...

<comment><USER3> Yes. Unix-enough. Why not play, today: [https://www.mess.org/howto/apollo](https://www.mess.org/howto/apollo) ;-)

<comment><USER2> I'll definitely try that out, thanks.

</comment></comment></comment><comment><USER4> Is there anything about this Pascal superior to the Borland pascal of the time?

<comment><USER4> No really, I'm asking. It would be interesting to know how they compare.</comment></comment>


Let's Destroy C - <AUTHOR> https://gist.github.com/shakna-israel/4fd31ee469274aa49f8f9793c3e71163#lets-destroy-c <comment><USER2>
       > printf("%s\n", "Hello, World!");
       >
       > That's an awful lot of symbolic syntax.

Well... Because it should have been

        printf("Hello, World!\n");

in the first place?

One can do something like

        printf("%s,%s%c\n", "Hello", "World", '!');

and claim that C is awful and that

        displayln("Hello, World!");

is so much better.

<comment><AUTHOR> displayln is a _Generic.

All of these are valid:

        displayln("Hello, World!");
        displayln(100);
        displayln(1.8);

The point is, for simple things, to not have to specify how they appear.

> Well... Because it should have been

> printf("Hello, World!\n");

No. You don't really want to do that. If you're doing that, use puts [0] . All this requires is a modification to one string in memory and you have an injection vulnerability.

[0] [http://www.cplusplus.com/reference/cstdio/puts/](http://www.cplusplus.com/reference/cstdio/puts/)

<comment><USER2> > No. You don't really want to do that. If you're doing that, use puts

This is not the case for RO strings, is it?

<comment><AUTHOR> You're not guaranteed to have a RO string by the standard are you?

<comment><USER2> Good point. I suppose that you are talking about overwriting terminating NUL, do I get it right? puts() is vulnurable in exactly same way.

<comment><AUTHOR> No, a format string attack. If you replace the start of the string with various specifiers, you can lift out pointer addresses and write to them. You can't do that with puts. Worst you can do with puts is read.

<comment><USER2> OK, understood. So what you meant was more like

       puts()'s attack surface is smaller than printf()'s.

This is not how your message appeared to me - "printf() is vulnerable to injections, use puts() instead". Both are vulnerable to "unintended read()-s".

<comment><AUTHOR> Not really.

printf is vulnerable to both read and _write_ attacks when you misuse it by only supplying the single argument. It's vulnerable to injections that can lead to remote execution and all sorts of CVEs.

puts is sometimes vulnerable to read attacks, but not often.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER3> While I'm not a fan of the specific changes shown in this article, I do agree with the principle of "remove boilerplate when possible". I found that the largest amount of boilerplate I ever wrote was in main() to parse the command line, and to that end I wrote a "magic getopt", which handles both short and long options in-line without external tables ([https://www.daemonology.net/blog/2015-12-06-magic- getopt.htm...](https://www.daemonology.net/blog/2015-12-06-magic-getopt.html) ); and PARSENUM, which handles the common cases of parsing human-readable values while appropriately checking for overflow ([https://github.com/Tarsnap/libcperciva/blob/master/util/pars...](https://github.com/Tarsnap/libcperciva/blob/master/util/parsenum.h)).

</comment><comment><USER4> Ah, finally a modern successor to Bournegol: [http://oldhome.schmorp.de/marc/bournegol.html](http://oldhome.schmorp.de/marc/bournegol.html)

<comment><AUTHOR>
        #define TYPE typedef
        #define STRUCT TYPE struct
        #define UNION TYPE union

Well, that's extremely opinionated. Which I guess is the point. It does seem to add a BASIC-ness to the code.

However, when I see landmines like these:

        #define TRUE (-1)
        #define FALSE 0

I might just hide instead of touching it.

<comment><USER5> Uh... This is serious landmine... I suggest author to change this.

<comment><USER6> Can you explain why?

<comment><AUTHOR> To emphasise: This is about Bournegol. Nothing to do with this post.

> Can you explain why?

Because it isn't how most C libraries expect true/false to be defined.

stdbool in C99 standardized things a bit, but before then what was generally accepted was:

> true is 1

> false is !true (Often 0 in practice).

Which means that any trivial:

        if(true) { ... }

Won't work under Bournegol. Instead you _need_ to compare when doing an if statement.

So the C-programmer is easily tripped up. False will work as expected, but True won't... All the time. There may be times it does work. Leaving the programmer throwing their hands in the air.

<comment><USER7> Most cases I've seen accept anything as true as long as the LSB is 1, and quite strictly 0 as false. Everything else is up in the air. The value -1 is definitely true. :)

<comment><USER8> One could say that -1 is the truest true, because its two's-complement representation has the most 1s.

<comment><USER7> True.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> This just in: you can write bad code in any language.

In this case, that language is the C Preprocessor, already well documented and widely accepted as a Bad Language To Start With.

The title of the article is misleading: it's not "destroying C" it's writing Bad Code using the C Preprocessor. It's not destroying C any more than a series of bad puns destroys the English language.

<comment><USER10> > you can write bad code in any language.

But it's more fun to do in C.

<comment><USER11> It's _much easier_ to do it in C, even when you think you're not writing bad code.

</comment></comment></comment><comment><USER12> I've been a C programmer for several years now (out of necessity - C is still the best language for firmware and embedded development)

There's been a lot of noise on the internet about Rust and C++20 and "modern" languages. I recently had an opportunity to try some of these first hand.

Honestly the new language features are all terrible with few exceptions. In general, anything that was added to a language to support generics or to hide pointers and memory management from the developers on a language that isn't a lisp has only produced more harm than good.

I grew up as a programmer always thinking about the underlying CPU and the underlying memory and how my code would interact with both of them. It requires greater care as a programmer and tools like static analysers, code reviews and rigorous testing are extremely important. Improving these tools and coming up with new ones is far more useful (in my opinion) than trying to update C.

Yes C has it's flaws. Sometimes, those flaws are important and a replacement language is useful. I find that Go is a very interesting replacement for C at sufficiently higher up the stack. Something like Haskell probably will best fill in the gaps between C and Go.

I'm not convinced that fixing C with something like C++ was a good idea. Similarly, anything that's trying to fix C++'s problems is unlikely to come up with a decent way to have generics and hide memory and pointers from developers.

If I was going to create my own language, I'd keep it like C, remove some of the undefined behaviors, add support for Posits, 128 bit and arbitrarily wide signed and unsigned integers, features for explicit cache management (!!!), container classes as part of a standard library, Go-lang style interfaces and bake in something like cppcheck into the compiler.

/rant

<comment><USER13> > remove some of the undefined behaviors,

There was a great talk from a C/C++ compiler writer about why you can't remove undefined behaviors while at the same time keeping C like speed.

Simple example: accessing an array past it's end it's undefined behaviour. If you want to remove this, you need to add bounds checking (either to raise an error or to just return 0).

<comment><USER14> > There was a great talk from a C/C++ compiler writer about why you can't > remove undefined behaviors while at the same time keeping C like speed.

I don't think this is true. Look at Zig, they don't seem to have a problem removing a lot of C's undefined behaviour, while still being able to surpass C in speed in many cases.

> Simple example: accessing an array past it's end it's undefined behaviour. > If you want to remove this, you need to add bounds checking

Zig does indeed do bounds checking. I think the way it can still compete with C is: \- Zig should be better at propagating constants (Better module system, Link-Time Optimization by default, and I think avoiding undefined behaviour helps here too). Arrays/slices do often have constant bounds. \- You can choose to build with or without bounds checks (--release-safe, --release- fast). This means you're more likely to discover out of bounds problems during debugging, since you'll always get errors in those cases. But you have the option to release a fast version.

Julia has another interesting solution to bounds checking, where you can mark a piece of code with @inbounds to declare that you assume array access is within bounds.

I think some undefined behaviour can also be detrimental to performance. If you pass two pointers to a function, and it's undefined whether they alias or not, there are optimisations you can't do.

<comment><USER15> > I think some undefined behaviour can also be detrimental to performance. If > you pass two pointers to a function, and it's undefined whether they alias > or not, there are optimisations you can't do.

I think this results from a misunderstanding of how undefined behaviour works in C. When a program exhibits undefined behaviour it is not a valid C program. The compiler may just assume (instead of having to prove) that it doesn't happen.

Example: the memcpy(3) standard library function. C says the behaviour is undefined if the given areas overlap. That means the implementation can perform optimizations "knowing" that there is no overlap. A valid C program can't possible invoke memcpy with buffers aliasing each other (because then, the program would be invalid). The compiler is not required to issue a diagnostic about these kinds of incorrect programs and just compiles your code assuming they don't exist.

</comment></comment></comment></comment><comment><USER16> Didn't one version of the "Ten Commandments of C" have a rule stating "Thou shalt not use the preprocessor to turn C into a different language"? :P

</comment><comment><USER17> GNU lambdas are incredibly evil. In order for lambdas to capture their environment and yet still be available as a function pointer, the compiler makes the stack executable and stores the trampoline code on the stack.

C++ lambdas don't suffer from this problem.

<comment><AUTHOR> GNU doesn't really have lambdas. This is an abuse of the compound statement macro.

IIRC compound statements, like I've presented, don't use trampolines. Nested functions definitely do, but that isn't quite what we're doing here.

GCC _should_ compile using descriptors for the compound statements that lambda is expanding to instead of using trampolines.

        gcc -fno-trampolines -I. examples/lambda.c

Works. There's no trampoline present.

<comment><USER18>
      #define lambda(ret_type, _body) ({ ret_type _ _body _; })

I found this one really fascinating, they're using _both_ statement expression _and_ nested functions. Their (reformatted) example of:

      int (*max)(int, int) =
        lambda(int, (int x, int y) { return x > y ? x : y; });

macro-expands to

      int (*max)(int, int) =
        ({ int _(int x, int y) { return x > y ? x : y;}; });

So they have a statement-expression with just one statement in it - the value of that statement is the value of the whole statement-expression. And the one statement inside the statement expression is a declaration of a nested function named _. Statement-expressions decay their return types, so that function gets converted to a function pointer. And thus your "lambda" is a pointer to a GCC nested function.

<comment><USER19> It's slightly different.

        { ret_type _ _body _; }

Notice the second underscore at the end? The compound statement contains a nested function definition followed by an expression statement which "returns" the function just defined. The function definition alone wouldn't work.

</comment></comment></comment></comment><comment><USER20>
        // Original macro hack by Robert Elder (c) 2016

Described also back in 2000 on [https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html](https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html)

<comment><USER21> And as Simon Tatham points out there, Tom Duff invented it in the 80s, but only hinted at it rather than publish it.

</comment></comment><comment><USER22> My friend served as a military officer and told me a story. Every evening before lights out, he had to count soldiers via a roll call, a 10-minute routine. If someone coughed during that (no matter what intent), then suddenly many soldiers began to cough, and that ruined everything. The only solution he figured out to remain legal/moral was to pause and start it all over if someone coughs.

<comment><USER23> Wouldn't it make sense to roll-call different sub-groups independently?

</comment></comment><comment><USER24> Those defines remind me of how Bourne shell was originally written using such a system to make the source look more like Algol 68. It might even still be maintained that way in BSD to this day [0].

[0] [https://books.google.ca/books?id=9f9uAQAAQBAJ&pg=PA9&lpg=PA9...](https://books.google.ca/books?id=9f9uAQAAQBAJ&pg=PA9&lpg=PA9&dq=expert+c+programming+bourne+shell&source=bl&ots=UJafm8jP8B&sig=ACfU3U1Nb- leW-01XLRyLB6xsKOBrJf3hw&hl=en&sa=X&ved=2ahUKEwi_6dDe0KvnAhVuRN8KHQDTBgUQ6AEwAHoECAoQAQ#v=onepage&q=expert%20c%20programming%20bourne%20shell&f=false)

<comment><USER25> "to this day" in 1994 is very much _not_ "to this day" in 2020.

The various BSDs use the Almquist and Korn shells for /bin/sh nowadays. Indeed, M. Van der Linden was out of date even back in 1994. At that time, BSD had already been largely freed of AT&T code, such as the Bourne shell, for 3 years. It's now approaching 3 decades.

<comment><USER24> I've forgotten how old that book is. Geez time flies. Thanks for the clarification!

</comment></comment></comment><comment><USER26> With enough macros you can even bring high-level programming to C a la libcello: [http://libcello.org/](http://libcello.org/)

</comment><comment><USER27> Big fan. I don't see support for exceptions, maybe this can help: [https://github.com/hraban/c-exceptions](https://github.com/hraban/c-exceptions)

(I ended up using this in a job once. They didn't hire me back...)

<comment><AUTHOR> That's horrifying. I've opened a ticket to implement it. [0]

[0] [https://todo.sr.ht/~shakna/CNoEvil3/9](https://todo.sr.ht/~shakna/CNoEvil3/9)

</comment></comment><comment><USER28> Reminds me of Arthur Whitney's k.h[1]

Example:

      // remove more clutter
      #define O printf
      #define R return
      #define Z static
      #define P(x,y) {if(x)R(y);}
      #define U(x) P(!(x),0)
      #define SW switch
      #define CS(n,x) case n:x;break;
      #define CD default

1 - [https://github.com/KxSystems/kdb/blob/master/c/c/k.h](https://github.com/KxSystems/kdb/blob/master/c/c/k.h)

<comment><USER29> Or the J incunabulum[1] ...

      typedef char C;typedef long I;
      typedef struct a{I t,r,d[3],p[2];}*A;
      #define P printf
      #define R return
      #define V1(f) A f(w)A w;
      #define V2(f) A f(a,w)A a,w;
      #define DO(n,x) {I i=0,_n=(n);for(;i<_n;++i){x;}}
      I *ma(n){R(I*)malloc(n*4);}mv(d,s,n)I *d,*s;{DO(n,d[i]=s[i]);}
      tr(r,d)I *d;{I z=1;DO(r,z=z*d[i]);R z;}
      A ga(t,r,d)I *d;{A z=(A)ma(5+tr(r,d));z->t=t,z->r=r,mv(z->d,d,r);
       R z;}
      V1(iota){I n=*w->p;A z=ga(0,1,&n);DO(n,z->p[i]=i);R z;}
      V2(plus){I r=w->r,*d=w->d,n=tr(r,d);A z=ga(0,r,d);
       DO(n,z->p[i]=a->p[i]+w->p[i]);R z;}
      ...

1 - [https://code.jsoftware.com/wiki/Essays/Incunabulum](https://code.jsoftware.com/wiki/Essays/Incunabulum)

</comment></comment><comment><USER30> When I started learning C++, there was't a C++ compiler available for my Atari ST (late 80s), there was only Borland C. So instead I used the C preprocessor to emulate classes, virtual functions etcetera. Not everything could be implemented this way, but it looked like C++ close enough for me to learn it.

<comment><AUTHOR> That's basically how C++ was originally created, or the prototype, "C with Classes", albeit with a custom preprocessor. [0]

> In October of 1979 I had a pre− processor, called Cpre, that added Simula− > like classes to C run-ning and in March of 1980 this pre− processor had been > refined to the point where it supported onereal project and several > experiments.

Recognising that you could do it that way is kinda awesome. Maybe not entirely uncommon, but you drafted a powerful bit of software yourself.

[0] [http://www.stroustrup.com/hopl2.pdf](http://www.stroustrup.com/hopl2.pdf)

<comment><USER31> Thanks, awesome paper (which remind me that I should read the ARM at some point).

Interesting stuff:

"Cfront [the fist c++ compiler] was (and is) a traditional compiler front− end performing a complete check of the syntax and semantics of the language"

"[...] the C compiler is used as a code generator only. [...]. I stress this because there has been a long history of confusion about what Cfront was/is. It has been called a preprocessor because it generates C, and for people in the C community (and elsewhere) that has been taken as proof that Cfront was a rather simple program – something like a macro preprocessor."

Cfront being a preprocessor is something that gets repeated often. As you correctly point out, cpre was the preprocessor and it wasn't realy C++ yet.

<comment><USER32> I believe the "modern" term for Cfront would be "transpiler".

<comment><USER33> I think it could be called a "compiler" if C-- is anything to go by:

[https://en.wikipedia.org/wiki/C--](https://en.wikipedia.org/wiki/C--)

> C-- (pronounced cee minus minus) is a C-like programming language. Its > creators, functional programming researchers Simon Peyton Jones and Norman > Ramsey, designed it to be generated mainly by compilers for very high-level > languages rather than written by human programmers. Unlike many other > intermediate languages, its representation is plain ASCII text, not bytecode > or another binary format.[1][2]

> There are two main branches of C--. One is the original C-- branch, with the > final version 2.0 released in May 2005.[3] The other is the Cmm fork > actively used by the Glasgow Haskell Compiler as its intermediate > representation.[4]

<comment><USER31> Yes. In addition to C--, there is a long tradition of FP (and not only) languages targeting C as a (portable) back end representation. That's how many scheme compilers worked for example. LLVM itself at some point had a C backend.

</comment></comment></comment></comment></comment></comment><comment><USER34> C has its place; every language has its quirks. I think a lot of emphasis needs to be put on testing code. Like SQLite uses Tcl to script tests. C is easy to test because the "software units" are only structures and functions.

<comment><AUTHOR> > C has its place; every language has its quirks. I think a lot of emphasis > needs to be put on testing code.

The library that this post is a subset of, actually does have a testsuite. It compiles every example, and it's own documentation. The testsuite still needs to grow, and check evaluations rather than whether something "works", but it's getting there.

</comment></comment><comment><USER35> Well there is the International Obfuscated C Code Contest....

Details here.... [https://www.ioccc.org/](https://www.ioccc.org/)

<comment><USER36> The IOCCC was inspired by Steve Bourne using precisely this kind of tricks in the C source for the Bourne Shell to make C look like Algol-60.

</comment></comment><comment><USER37> A really good example of this is the implementation of Objective-C. I believe even the original C++ implementation by Bjarne Stroustrup were also C macros.

</comment><comment><USER38> I guess this article is to be taken lightly as kind of a "joke" ?

The first proposed macro displayln is the archetype of malpractice. What if I want to do:

if(some_condition) displayln("enjoy debugging that");

etc etc... almost all proposed changes seem to be awful ?

<comment><AUTHOR> I think I was pretty explicit:

> What if, for a moment, we forgot all the rules we know. That we ignore every > good idea, and accept all the terrible ones.

<comment><USER38> Ow alrighty then. Looking at comments here I'm not sure some other people saw that sentence haha

</comment></comment></comment><comment><USER39> The end result reminds me of Julia. Enough to make me wonder if there's something like it underneath Julia somewhere, or if that's how it started (unfortunately I don't have time to really dig in to it right now).

</comment><comment><USER40> In some subtle way C was already "destroyed" with the introduction of C89. The K&R C had simplicity and beauty to it. Include files were small as they only contained the essential stuff (mostly definitions of structs). UNIX version 7 - the last "true" edition of UNIX - including its entire userspace - was still written in it. X Window system was written in it. Vi was written in it. Now all people do is complain.

<comment><USER41> >Now all people do is complain

Amen, brother! For a language that has been so supremely successful in the "real world", i simply don't understand the HN crowd's disdain for it.

As an aside, "printf format strings" are actually a DSL and hence the complexity. In their book, _The Practice of Programming_ Kernighan & Pike actually show how to implement something similar for Network Packet encoding/decoding. It is quite neat and validates the power of this approach.

</comment></comment><comment><USER23> I'm reminded of a brilliant talk, _Can I Has Grammar?_ [0][1], which does similar violence to C++.

[0] [https://youtu.be/tsG95Y-C14k?t=277](https://youtu.be/tsG95Y-C14k?t=277)

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

</comment><comment><USER42> I used to be really interested in new languages and compilers. Now ... let's just get on with making Machine Programmers / CASE tools. I don't want to be futzing around with individual lines of code anyway. I guess I want to be like a very technical PM.

</comment><comment><USER43> I haven't looked closely at either, but the spirit of this effort reminds me of Cello, recently discussed here: [https://news.ycombinator.com/item?id=22102533](https://news.ycombinator.com/item?id=22102533)

</comment><comment><USER44> Reminds me a lot of how the first version of objective-C was implemented

</comment><comment><USER45> I can't help but be reminded of some of the horrifying basic.h and pascal.h macro-filled headers I can remember from long, long ago. Except people actually used those...

</comment><comment><USER46> the best thing about this was discovering [https://git.sr.ht/](https://git.sr.ht/)

<comment><USER47> I love the simple and lightweight interface, but everything is hard to discover.

Sourcehut? Sounds great- I'd love to replace my Gogs/gitlab instance with something more lightweight. Let's download the source and run it. I guess click on "git" on [https://git.sr.ht/](https://git.sr.ht/)? Wait that's where I already am with no indication that that is the selected tab. Ok maybe the link for sourcehut? [https://sourcehut.org/](https://sourcehut.org/) Cool. There's some links about pricing, ignore that and click on "100% free and open source software" Now I am just at a list of what appears to be about 20 repos, all with helpful names like sr.ht-apkbuilds.

I can tell that this person has put a ton of work into making something that is probably fantastic, but it is really all presented in an undiscoverable way. I still have no idea what language this project is written in, how to deploy or maintain it.

I assume [https://git.sr.ht/~sircmpwn/git.sr.ht](https://git.sr.ht/~sircmpwn/git.sr.ht) might be what I want, but it still looks like the inscrutable mess that reminds me of hgweb. There's not even a readme on the first page, let alone the source or anything useful. There's a link to [https://man.sr.ht/git.sr.ht/installation.md](https://man.sr.ht/git.sr.ht/installation.md). Which looks like it might be what I want, but I guess I'm old and at this point I've lost interest.

I'm definitely being crotchety, but I wish this information was organized in a more useful way. I can tell Drew has put a lot of time into it, but I don't feel like it is being shared in an effective way. And I would definitely never pay for software like this. Please someone tell me I'm crazy and this UI makes perfect sense to them.

<comment><AUTHOR> It sounds like you're going to the main page, expecting to download it and deploy it yourself.

It isn't surprising that the main interface is pointing you to _use_ it, rather than deploy it.

If you click on the help hub, _man_, you'll find what you're looking for straight away:

> Hacking on or deploying sourcehut yourself? Resources here.

\---

> I guess click on "git" on [https://git.sr.ht/](https://git.sr.ht/)? Wait > that's where I already am with no indication that that is the selected tab.

That's incorrect. If you look to the left of the nav bar, you'll see some text with red highlighting exactly where you are.

> I still have no idea what language this project is written in, how to deploy > or maintain it.

If you click the dev resources link, then you'll find this nice and obvious quote:

> sr.ht core is a Python package that provides shared functionality across all > sr.ht services. It also contains the default templates and stylesheets that > give sr.ht a consistent look and feel.

<comment><USER48> > If you look to the left of the nav bar, you'll see some text with red > highlighting exactly where you are.

That looks part of the "logo", not part of the navbar. There is at most a minimal difference in the actual "tabs". Of course the reason is that this isn't actually a navbar/tabs but a list of applications offered by sourcehut, this is really noticeable if you click on git when you're at an actual git repository (e.g. [https://git.sr.ht/~sircmpwn/scdoc](https://git.sr.ht/~sircmpwn/scdoc)) note that the red text highlighting where I am already says git, so clicking on git shouldn't do anything if it was actually a tab bar, but in reality it navigates to [https://git.sr.ht/](https://git.sr.ht/)

</comment></comment></comment></comment><comment><USER49> This is amazing. Are there any larger examples that uses more of the functionality of the library that I could read?

<comment><AUTHOR> Whilst it uses an older version of CNoEvil, and I haven't updated it yet, the largest application is probably evilshell [0].

There's also all the examples [1].

[0] [https://git.sr.ht/~shakna/evilshell](https://git.sr.ht/~shakna/evilshell)

[1] [https://git.sr.ht/~shakna/cnoevil3/tree/master/examples](https://git.sr.ht/~shakna/cnoevil3/tree/master/examples)

<comment><USER50> I've already said this a couple other places but I really wanted to say: "This is amazing and it would be hilarious if you wrote a CNoEvil vs. BOURNEGOL head to head article".

<3

</comment></comment></comment><comment><USER51> > _Windows has a different line ending_

But not when printing to stdio.h text streams; \n turns into the right line ending.

<comment><AUTHOR> > But not when printing to stdio.h text streams; \n turns into the right line > ending.

Only on some, but not all, compilers. I got varying behaviour until I went ahead and did it myself.

</comment></comment><comment><USER52> I really don't think the result is better than the beginning.

</comment><comment><USER53> Perfect usage of the title to get on HN frontpage.

<comment> non-entity I really expected this to be another aggressive Rust marketing peice at first

<comment><AUTHOR> Well, thanks to Rust's more powerful macro system, I'm sure someone could butcher it even more than the C-PreProcessor lets me do to C, here.

</comment></comment></comment><comment><USER54> Great writing and clever hacking!

</comment><comment><USER55> This reminds me of Arduino.

evil.h == arduino.h

<comment><AUTHOR> I've used CNoEvil in a couple Arduino projects. It makes about as much sense when something goes wrong as with the Arduino library.

</comment></comment><comment><USER56> Return of Turbo Pascal ;-)

</comment><comment><USER57> This hurt my brain.

<comment><USER58> It hurt my eyes.

</comment></comment><comment><USER59> You invented Ada.

<comment><AUTHOR> Unsurprisingly, I adore Ada.

However, Ada's main benefits - the incredible type system, don't exist at all here. CNoEvil is a giant shotgun pointed directly between your legs.

<comment><USER59> Ada is definitely optimized for readability (not you, Ada.Strings.Unbounded.To_Unbounded_String!)

</comment></comment></comment><comment><USER60> That's a work of art!

</comment><comment><USER61> I hope we get some new stuff out of this. The world is lacking in new stuff because everyone is in the business of creating slavery apis.

</comment><comment><USER62> Off topic, but in today's bitter and divided world, it's reassuringly wholesome that people can still get together to recite the alphabet in GitHub comments.</comment>


Microsoft is killing passwords one announcement at a time - <AUTHOR> https://nakedsecurity.sophos.com/2018/09/26/microsoft-is-killing-passwords-one-announcement-at-a-time/ <comment><USER2> Just setup a new Win10 machine for my family. Was pleased that a simple PIN was offered as way to login, as opposed to username/password. Even though my kids are older and can remember passwords (barely), typing in a 4-6 digit PIN is much easier (for me too). Not sure how secure it is, or if this just works "locally".</comment>


SwiftOnSecurity: A story about Jessica - <AUTHOR> http://swiftonsecurity.tumblr.com/post/98675308034/a-story-about-jessica <comment><USER2> I'm sorry this hadn't generated any conversation here. This is a good story about the problems the rest of the non-technical world faces. The people at my kids' school can't even install a printer.... Hell, sometimes _I_ have trouble with that. How are muggles supposed to do it? This is why we need computer education to start in first grade. Not just "how to use a word processor" but how the computer works, how to troubleshoot, what are common idioms for UI layout, etc. I don't know that we can reduce the complexity of computers down enough for existing users, but maybe we can educate all the new users.

<comment><USER3> I fully agree. This is a really good story giving us a honest insight into the perspective of a typical user these days. Things should just work. Similar as you also expect from you car. It needs _some_ attention, but the guy at the dealer will care for you for the nifty details.

I feel, that the "PC" world has utterly failed to care for it's user and that the mobile world does here a somehow better job though it comes with many (proprietary) restrictions.

But then the NSA came and these days trusting in other seems no longer to be a good advice at all.

<comment><USER4> The price of an open computing platform is that you spend time learning to maintain it.

The price of not having to learn is that you give up control to someone else. A manufacturer. An IT department.

<comment><USER5> "The price of not having to learn is that you give up control to someone else"

Some people don't see that as a 'cost', which is what many people in the tech industry don't understand at all.

<comment><USER6> And those people are ripe for exploitation. So it goes.</comment></comment></comment></comment></comment>


Does anyone know when Stripe will be in the UK? - <AUTHOR>

Thanks. <comment><USER2> It is. Bug them on twitter and they'll invite you to the beta.

<comment><USER3> Follow-up question: when is Stripe going to be out of beta in the UK?</comment></comment>


Ask HN: How do you come up with ideas? - <AUTHOR>

I find I have trouble coming up with good startup ideas (or in my case, ios app ideas). I often think about something that I would want but I have trouble coming up with anything. So, how do you guys come up with your ideas? What do you think of when you are brainstorming, or does it just come to you out of the blue?<p>Thanks, K <comment><USER2> Normally I'll be having a problem or be thinking about a problem and say to myself "What if I..." and if what follows is a good idea, it gets stuck in my head for months until I actually at least attempt to do it. I've had the same ideas in my head for months now. I'm slowly getting around to all of them. (Don't bother asking, they're mostly locale specific to my location and life situation. Others I don't want to talk about right now simply because I'm not in the mood. And the rest are still in "stored problem" stage.)

I'd mirror the advice of Richard Feynman. Keep problems you want to solve in the back of your mind. Whenever you come across something that seems to parallel it or seems related, do a mental check to see if it helps with any of your stored problems. If it does, great; you have an idea.</comment>


Show HN: FanExam – customer experience metrics and feedback for your SaaS - <AUTHOR> http://fanexam.com

<comment><AUTHOR> Launched this because I felt the need for it in may latest projects. Basically now you can measure and manage customer feedback as rigorously as you now measure and manage profits. It's based on the famous Net Promoter Score.</comment>


Ask HN: Good hacker backpack? - <AUTHOR> What I mean is laptop, chargers, portable wifi, tablet, maybe a few books, snacks. Going on an extended trip and want to ensure I have room, but a good layout inside the bag. <comment><USER2> 5.11 tactical RUSH12. [http://www.511tactical.com/rush-12-backpack.html](http://www.511tactical.com/rush-12-backpack.html)

If you organize the inside using MOLLE-capable bags, then you can quickly and easily expand your storage by just attaching those bags to the outside.

But it's "tacticool", so it's not for everybody. My Dell XPS 13 and a whole lot of other things fit into it easily. Plus there is a hard plate on the back that protects the computer from impact from that side of the bag and gives it support (it's removable).

<comment><USER3> Nice. I have a bugout bag that's currently a Trager (defunct) day pack that I used in high-school umpteen years ago: have hauled 8 huge textbooks for months on end (we didn't have lockers because of pipebombs in the 1970's), car battery and other things that destroyed every other backpack.

Plus, I seem to be accumulating a number of MOLLE things from trauma kit to Leatherman to pepper spray.

Currently, my laptop messenger bag is from another defunct company, Hlaska, which is currently overloaded with a MBP 13 and minimal power/EDC stuff.

I should probably upgrade to a MOLLE bag so I can carry my backup HDD without using a reusable shopping bag AND messenger bag.

</comment></comment><comment><USER4> Australian Made Crumpler Backpacks are awesome. They come with a lifetime guarantee because they literally stitch them from canvas. Strong bags with great design that really last.

[https://www.crumpler.com/au/dry-red-no-5/](https://www.crumpler.com/au/dry- red-no-5/)

[https://www.crumpler.com/au/about-us/](https://www.crumpler.com/au/about-us/)

> The first Crumpler bag was made in the early 90s when Stuart Crumpler > couldn't find a bag that let him cycle home with a slab of beer on his back.

Stu's solution to this common problem was a tough, handmade messenger bag – he sourced the best materials he could find and even sought the expertise of a local parachute maker who pulled the prototype apart and showed him stronger methods of stitching.

During this time, Will Miller and Dave Roper ran a courier business and needed quality bags for their riders. Seeing the potential in Stu's bags, the three of them founded Crumpler with a handshake and the rest is history.

<comment><USER5> These look really nice and I want to get one, but shipping to the US is $40. :/

<comment><USER4> Looks like as of 2017 they now fulfil to US via Amazon :)

[https://www.marketplacepulse.com/amazon/usa/crumpler](https://www.marketplacepulse.com/amazon/usa/crumpler) [https://www.amazon.com/gp/aw/d/B0118QTUKU?psc=1](https://www.amazon.com/gp/aw/d/B0118QTUKU?psc=1)

</comment></comment></comment><comment><USER6> There are lots of great backpacks in this thread.

I ran across this backpack at wal-mart, it's a great travel pack/day pack. It has a sleeve in the back (padded to the outside) for a laptop or camelbak, lots of pockets/sleeves inside that would fit chargers, phones, small tablet.

Loops on outside are great for carabiners/gear on a hike.

[https://www.walmart.com/ip/Outdoor-Products-Quest- Daypack/51...](https://www.walmart.com/ip/Outdoor-Products-Quest- Daypack/51036937)

We have three, one was just used for a 6 night campout and came back in perfect condition.

Oh and best of all they are only $25.

</comment><comment><USER7> I'm a heavy (2-4 flights/week) traveller, and love my North Face 'Router Transit' backpack: [https://www.thenorthface.com/shop/equipment-backpacks- mens-b...](https://www.thenorthface.com/shop/equipment-backpacks-mens- backpacks/router-transit-backpack-nf0a2zco?variationId=LMG)

I usually lug around 2 laptops, a huge USB battery pack, misc. USB accoutrements, snacks, Bose over-the-ear headphones, and occasionally a (slim model) game system in it without it being too overpacked or bulky.

<comment><USER8> Wow, what do you do that requires 4 flights per week?

</comment></comment><comment><USER9> I bought one of these [https://www.ospreypacks.com/us/en/product/comet-new- for-fall...](https://www.ospreypacks.com/us/en/product/comet-new-for- fall-2016-COMETNEW_793.html) a couple years ago as a convention backpack after being disappointed carrying my TB2 messenger bag. It has a padded slot in the back for a laptop plus an internal pocket in that slot where you could slide a tablet easily. Separate from the laptop slot, it also has one large and one small pocket, with some smaller internal pockets in the small one. The straps are comfortable enough to wear for multiple full days, assuming breaks here and there and I've never been wanting for space inside of it.

</comment><comment><USER10> I go through a lot of bags trying to find the perfect one. Quite literally one every 3-4 months for the last 4 years.

Finally bought the 30l Peak Design backpack. Best thing ever. Worth every penny.

I can fit: Two laptops - HP 1040 and Lenovo Thinkpad S12 Two chargers for the laptops 1x 2 port USB charger for phone 8" Tablet 2 Moleskine notebooks 1 camera, either Sigma Dp1 Quattro or Sony RX100 2.5 USB backup drive Several batteries for the Sigma camera Audiotechnica m30 headphones All the infernal RSA tokens I have to carry USB cables, 2 ethernet cables 10000 mAh battery pack Other odds and ends... mug, access cards and what not

<comment><AUTHOR> it seems most people use this as a camera bag. I can't seem to tell if it is open in the middle or if there is some sort of camera padding setup.

Also, you mention a lot of gear fits. Do you have this gear just tossed in there or are there enough compartments for the list you mention?

<comment><USER10> The peak design bags have dividers they refer to as origami dividers. The majority of the volume of the bag can be customized using the dividers.

The is a laptop sleeve between the back of the bag and the main compartment. In that sleeve there is a divider. I believe the divider is meant to separate a 15" mac book and full sized ipad. The sleeve is large enough for my 14" laptop and my 12" laptop. Additionally, the sections you use to get in to the main compartment have padded organizers.

The bag is really clever and seems to be incredibly well built, time will tell on that.

Check out the youtube videos.

</comment></comment></comment><comment><USER11> I bought a DSPTCH Daypack a couple years ago and it's pretty amazing. I don't know if you'd get a good layout inside the pack (there's a couple pouches, a small zipped pouch at the top, and a couple bottle pouches on the side inside the main compartment, but that's all. That aside, it's only a couple pounds, super tough and comfortable, and not gaudy. The laptop pouch fits a new 13" MBP _AND_ a ThinkPad x220, but it expands well so things don't just rattle around in there.

</comment><comment><USER12> Another backpack recommendation thread, from last year:

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

</comment><comment><USER13> I love my Pelican S100 Backpack! Has a watertight crushproof Pelican hardcase to protect my MacBook Pro and a decent sized pockets to carry iPad Pro, Headphones, Dongles, etc...

[http://www.pelican.com/us/en/product/durable-travel- backpack...](http://www.pelican.com/us/en/product/durable-travel- backpacks/sport/sport-elite/S100/)

</comment><comment><USER14> I love my Timbuk2 Spire.

[http://www.timbuk2.com/laptop-backpacks](http://www.timbuk2.com/laptop- backpacks)

<comment><AUTHOR> I was looking at this. Do you know the differences between the Spire and the Rogue?

Edit: Amazon to the rescue. They had a comparison chart. The Spire is 32L, Rogue is 27L

</comment></comment><comment><USER15> I love waterproof messenger bags as [ortlieb]([https://ortliebusa.com/product- category/ortlieb/messenger-ba...](https://ortliebusa.com/product- category/ortlieb/messenger-bags/)) offers. Perfectly waterproof and sturdy material. A bit pricey though. They also have some more traditional looking bags.

</comment><comment><USER16> I've had my timbuk2 messenger for about 9 years now. The inside looks like it got mauled. Lots of tears. But it still holds up rather well. The strap and everything else is very comfortable.

I use it to get groceries once a week. It's come on every vacation I've gone on. I've moved with it. It is not a simple work backpack. It goes with me everywhere. Really great investment.

<comment><USER17> Second that, I've had the timbuk2 commute 2.0 messenger bag since 2010 and it goes everywhere with me. Daily to/from work, every business/personal trip, etc. Mine's still in excellent condition other than one broken zipper on one of the inner pockets.

</comment></comment><comment><USER18> I love the Minaal 2.0. [https://www.minaal.com/products/minaal-carry-on- bag](https://www.minaal.com/products/minaal-carry-on-bag)

It's got a ton of storage and it's designed to be a single-travel bag. Check out some reviews on Youtube and you'll see what I mean.

<comment><AUTHOR> Wow, I like this one too.

</comment></comment><comment><USER19> My problem is strength of the bag. Once I put all of my gear into a bag, if I start adding documents or manuals, the bag begins to break down. The strap becomes worn, and the point of failure of where the strap connects to the top of the bag, usually goes first. I wish these bags had a weight rating.

<comment><USER20> Try Everiki Versa.

</comment></comment><comment><USER21> TAD EDC. It's extremely overbuilt but between the integrated dry bag laptop sleeve and the MOLLE attachment points it's worth it. [http://store.tripleaughtdesign.com/FAST-Pack- EDC](http://store.tripleaughtdesign.com/FAST-Pack-EDC)

</comment><comment><USER22> It's a goofy name, but I really like the three-zipper configuration of the Mystery Ranch Urban Assault:

[http://www.mysteryranch.com/urban-assault- pack](http://www.mysteryranch.com/urban-assault-pack)

Makes it really easy to get down into the pack.

</comment><comment><USER23> Mission Workshop Arkiv Modular system. I've been using the R6 for three years and it's still like new.

[https://missionworkshop.com/products/arkiv-bag- series](https://missionworkshop.com/products/arkiv-bag-series)

</comment><comment><USER24> BrainBag from Tom Bihn, tombihn.com

<comment><USER25> Have one, and while spacious, I've never felt well organized with it.

These days I'm carrying an eBags Professional - laptop space, center tablet pocket that can be accessed from top, pocket for files/papers, bottom hard compartment for charger, reasonably well organized pockets for pens, usb drives, etc, and most importantly for travel, it has dual carry-on handle pass throughs.

<comment><USER26> The Brain Bag by itself is not well organized, but add a Brain Cell to hold the laptop, a Snake Charmer for cables, and a Freudian Slip for papers and you're getting somewhere. You're also getting spendy, so there is that. But the bags last forever and show great attention to detail in their construction. (Another risk is that you'll soon find yourself buying a Bihn travel bag, briefcase, etc...)

<comment><USER25> I have the Brain Cell.

</comment></comment></comment></comment><comment><USER27> I got a 21L GR1[1] a month or so ago to replace a messenger bag and I really like it so far. It seems pretty well built with solid material.

[1]: [https://www.goruck.com/gr1/](https://www.goruck.com/gr1/)

<comment><AUTHOR> Impressive!!

</comment></comment><comment><USER28> I've really enjoyed this backpack from Amazon [https://www.amazon.com/gp/product/B01N7HOVXE](https://www.amazon.com/gp/product/B01N7HOVXE)

</comment><comment><USER8> I carry my GoRuck GR2 everywhere I go, it's the most versatile backpack I've ever owned.

[https://www.goruck.com/gr2/](https://www.goruck.com/gr2/)</comment>


Ecuador legalized gangs, murder rates plummeted - <AUTHOR> https://www.vox.com/future-perfect/2019/3/26/18281325/ecuador-legalize-gangs <comment><USER2> A gang is just the company/franchise of the poor.</comment>


"Owning the launch too" and "The 2-week plan" - <AUTHOR> http://www.37signals.com/svn/posts/1041-owning-the-launch-too-and-the-2-week-plan <comment><USER2> Being willing to drop projects is probably the hardest thing for most organizations to do. Allowing projects to be killed without any shame or stigma is so healthy in the long run.

</comment><comment><USER3> Heh... 37signals rediscovers the basics of project management :-)

Clear, individual ownership of pieces of work is a cornerstone of effective project management.

<comment><USER4> Dan, each comment includes the author (swombat in your case). You don't need to keep signing them.

<http://ycombinator.com/newsguidelines.html>

"Please don't sign comments, especially with your url. They're already signed with your username. If other users want to learn more about you, they can click on it to see your profile."

<comment><USER3> I don't sign comments with my URL. That said, I'm afraid signing with my name is a habit I've developed over the last 12 years of posting online, and it would take a sizeable conscious effort to get rid of it. Since it doesn't bother me in the least, I don't.

Why does it bother you so much?

<comment><USER5> Because if people only know you by what you sign at the end of the your posts then it makes it very easy to impersonate you.

Daniel

<comment><USER6> I propose that we all sign our comments Daniel from now on.

<comment><USER3> I second that. Daniel's a great name, a fine combination of 6 unique, high- quality letters. I'd love to see it written more often.

Daniel

</comment></comment></comment></comment></comment></comment><comment><USER7> I think these 37signals blog posts are great!

I can't think of a single idea of theirs that I've adopted (some of them seem downright silly), but that's not the point. Their "against the grain" thinking adds a little perspective against all the corporate mind-numbing B.S. I'm so accustomed to seeing. These are people trying things out and sharing with us, not just some ivory tower "experts".

Very refreshing. Keep 'em coming.

<comment><USER8> I completely agree - the new way of looking at issues pushes things to the extreme sometimes, but always makes me reevaluate.

</comment></comment><comment><USER9> 2 week plan seems smart. Forces the issue.</comment>


Locked doors, headaches, and intellectual need - <AUTHOR> http://mkremins.github.io/blog/doors-headaches-intellectual-need/ <comment><USER2> My most unrewarding educational experiences felt like I was being fire hosed solutions to problems I didn't have. This is a big challenge in the early stages of learning any subject.

Interestingly, experienced software developers benefit from barely-learning about many solutions to problems they don't have, yet. What I mean is a style of skimming stuff like API documentation. You don't really learn it. You can't recall details. But you can recognize its applicability. Someday a problem tickles your memory, and you know roughly where to go looking for the details. And of course then you're really motivated to learn it, for real. You have an immediate need.

<comment><USER3> This is a great point. I enjoy reading about various languages and paradigms even if I don't have a particular problem I need to solve, just to see what's out there. But without a concrete problem I'm actually trying to solve, I never go very far into actually applying these techniques at the time I learn about them.

Similarly, I've never found tutorial-style docs helpful, at least not the type where they walk you through solving some toy problem. But if I'm actually trying to solve something, I'll use the tutorial examples to crib from while implementing my actual solution.

I've read about Goroutines and channels, but never implemented anything with them (my experience with go consists of writing a BF interpreyer). But it looks like I'm going to have to work with a library in C++ that uses the same principles, and having that vague background knowledge helps a great deal.

Interestingly, I personally find that if there's an external motivator for solving these toy problems (for example, in a class or job interview situation), I don't have this same motivation difficulty. But if it's purely for my own amusement, I'm way too lazy.

<comment><USER4> I think of this as building mental / intellectual toolboxes.

Carpenters and mechanics, etc, like having tons of tools even if they know most won't really get any serious use, because suddenly that one tool might just save the day. The same thing definitely applies to computers, the more techniques and tools you know and the better you are at finding applicable tools, the faster you can solve whatever problems that you might encounter.

</comment></comment></comment><comment><USER5> This is a fantastic article, and is true in all walks of life. I'm a technical manager is a big corporation, and half of my problem is trying to explain to people why they need the stuff we do. In this case, they know they have problems, but they have other "forms of aspirin" they've found that half- bandaid the problem. Our solutions are much better, but they don't know that; it's up to me to explain to them what the problem is with their band-aid solutions and why our approach fixes them.

Thinking about this even more, this is the problem faced by virtually all salespeople. You won't buy my whatever until you know why you NEED my whatever. Even if you THINK you need my whatever, I have to make sure you understand what problem my whatever is solving, because if you buy it thinking it solves A but it really solves B then you'll be really pissed when you find out that you just paid for something that doesn't solve your problem (A).

Very good article, and the door/key analogy is fantastic.

<comment><USER6> People thinking they have a good solution when they don't is an interesting problem. A good technical example of this is parsing xml with regex or generating xml with string.format, I've had to explain to colleagues why this is bad so many times and many of them are stubborn and wonder why we should change something that "works". Initially they think the difference only carries academic significance, such as claiming i++ is faster than ++i. Usually you have to show them an example of valid xml that fails the regex before they realize that it is a problem. Kornish wrote a comment above about how important it is to know that certain problems have known solutions, in the same way its equally important to know what is not good "solutions" to certain problems.

<comment><USER7> Oh man.

I suffer so much when I see people using Go's "path" package to manipulate system filepaths (instead of "path/filepath" package)... Just because it happens to work on Linux/OS X (and maybe even modern Windows).

They just don't see what's wrong with doing that and it kills me.

</comment></comment></comment><comment><USER8> Yes! In fact I've often considered this question in the context of teaching physics - wouldn't it be wonderful if you started with a really hard problem, flailed around for a while, and then learned the thing that could solve it for you? Instead (in basic mechanics) we get "f=ma" and then see how it applies to a bunch of systems, instead of first looking at some idealized systems and challenging a student to ask some really basic questions about it. (Not necessarily the full equations of motion, which might not make sense yet, but basic stuff like "how fast does this weight need to move before it leaves contact with this curved surface").

(Actually, it's a little more involved with "F=ma" because really that's a key to a bunch of other keys - it yields closed form solutions to a bunch of important problems which are characterized by whether "a" is constant (linear motion), proportional to x (a spring), proportional to x^2 (gravity, electrostatics), their rotational analogues, and so on. BTW it still trips me out that Newton _saw this connection_ to so many disparate systems, but I'm deeply grateful that he did.)

<comment><USER9> What is most astonishing is when and using what mathematics Newton recognized this. The next "big batch" came some 140 (!) years later: Cauchy's work on calculus, Carnot with the second law of thermodynamics and Bolyai's geometry were all created around 1820-1825. That Newton 140 years earlier could pull this off, and it's not like he had vague ideas which we understand today well and just attribute to him -- no, he got the laws and the maths precisely.

It is a whole another thing that his work is incredibly hard to understand today mostly because we learn calculus as Cauchy and Weierstrass laid it down. There was a course at our univ which teached Newton's calculus it was incredibly hard, I left it early.

</comment></comment><comment><USER10> This is especially true if you are teaching yourself new programming languages. I'm currently learning Elixir because it looks fun. I've learned the syntax and stuff but I'm having a hard time learning OTP/BEAM/processes/etc because well, the most advanced thing I've done is a collage image generator in Node. I just don't feel like I _need_ it (though I'm gonna try my hardest to!).

It's the same thing with all these functional languages like Elm and ClojureScript. I've had fun playing with them, but I've only been seriously programming for fun for a year and a half. I haven't had the pain of managing state in a large application that the people that hype those languages have.

</comment><comment><USER11> This is the best thing I've read in ages. I found myself instantly realising how so many past occasions have related to it... Like the author I'll probably spend the rest of my life noticing places where this crops up.

<comment><USER12> Same. It's not often, even on HN, that I come out of an article with so many lightbulbs lighting up. Beautiful.

</comment></comment><comment><USER13> Brilliant article. I have always found something off about people saying - "why reinvent the wheel?" Well, this article confirms that reinventing the wheel will make you a good learner (and in turn a good teacher) while reusing the wheel will make you 'efficient' worker. Whats the tradeoff? Something to think about!

</comment><comment><USER14> i often cite this great write up of the evolution of a famous video game franchise when discussing specific ills of education

[http://tevisthompson.com/saving-zelda/](http://tevisthompson.com/saving- zelda/)

it reads as fine companion to the original post

</comment><comment><USER15> Spot on. I think this can be applied to having tests also and arguably agile/XP.

Something everyone on HN is going to agree on is having tests and having a good test coverage. But why? Why should I if I am a newbie?

Because our experience has given us a headache and tests have been the asprin that makes sure that these headaches don't occur again.

Arguably agile because many people here don't believe in it. Why don't they believe in it? Because they have never had the headaches it is meant to help, or they have never tried it when they had the headache, or someone else on their team had the pain and not them.

</comment><comment><USER16> Very interesting. Though I do wish he would have gone in depth about that duplicated code that he talked so much about.

I've been programming Scala professionally for a year now, in a _very_ Functional way because of pressure from senior engineers. So I use flatMaps and for comprehensions all the time and I get that it's simpler than alternative ways to write it but I still don't _really_ understand the core of what a monad really is.

I feel like I _use_ monads all the time and I even have a know what people mean when they use them in a sentence. For example, when referring to a 'for comprehension' in Scala: "Well, what monad are you in?". I get it... I basically interpret that as "All statements in the for comprehension must return a Try or Future" or any other monad, but those are the ones I use a lot. I get that it's basically a flatMat? I guess I haven't actually manually converted for comprehensions to flatMaps, I just use whichever one seems to solve the problem the cleanest way at the time.

So I feel like I get it, kinda. But I'm still not like "monads! wow, so cool!" To me it's more like, "Okay, that's how you write that in Scala".

</comment><comment><USER17> That's a great article! I suspect that I'd be able to write better docs and give better talks if I take it to heart.

</comment><comment><USER18> What sort of problem could you challenge a newbie with to entice them into learning to programming? It would need to have a simple enough solution to be possible to do with just the basic but painful enough for the newbie really desire the automation. It's easy to come up with something that would appeal to technical or mathematic minded, but much harder to for a child or alpha type.

<comment><USER19> Sorting long lists is a good one. Filtering of various kinds.

<comment><USER20> The solution to that is "download some sorting and filtering software". You can force them to write their own, but it'll be like selling aspirins for the pain caused by your blow to their head; unless you're their school teacher -and even if you are- they may just end up resenting you.</comment></comment></comment>


How to Ace a Phone Screen - <AUTHOR> https://engineering.zenefits.com/2015/09/how-to-ace-a-phone-screen/ <comment><USER2> This is not really the attitude a company should have when they manage benefits:

 _On the flip side, with so many people contributing code mistakes are bound to happen. That's normal – after all we're all just people, and people make mistakes. One thing that I've found particularly admirable about our team here is that people own up right away, and strive to fix things as fast as possible. No one wants to ship buggy code, but it happens. The nice thing about working with so many smart and friendly devs though is that you can trust that someone will be there to catch you if you fall and help you fix things._

We've caught and reported 4-5 bugs in production to Zenefits on really basic features. Three of our employees have now been asked to send a screenshot of the dashboard with the JS console open...

<comment><USER3> > This is not really the attitude a company should have when they manage > benefits

Why exactly? They are talking at the individual employee level, not company wide. The statement above is: "[As an individual developer] it is ok to make mistakes, just own up to them and take responsibility."

They didn't touch on test coverage, integration Vs. unit testing, code reviews, UI automated testing, code quality inspections (both automated and manual), regression testing, external audits, or a whole bunch of other things a company can do to improve the quality of their software over the medium to long term. These exist to help mitigate an individual's errors.

If we take what you said above at face value, you're essentially saying: "It is unacceptable for an individual employee at a company who manages benefits to make mistakes ever period." Which when re-phased like that is patently absurd.

Your anecdotes above may be legitimate reasons to gripe about the quality of Zenefits' software. But these are issues with organisational quality, not individual quality. Individuals can and will make mistakes at any endeavour no matter how mission or life critical, the way organisations detect and resolve these mistakes is what is key to quality, not pretending that people should be mistake free, that's a pipe dream.

<comment><USER4> The problem isn't with the first part ("it's OK to make mistakes"), it's with the second ("just own up"). When a mistake is made, it's because some part of the benefit coding process failed. I work in an insurance company where 100% of benefits coding changes are put through QC, and then another 25% are put through a _second_ level of QC. The costs of screwing this up are pretty high, and will make people pretty mad. You need to have a process where the vast majority of mistakes are caught before they get out the door.

I really can't speak for the company—it's just a single sentence in a blog post on an otherwise unrelated topic—but I imagine that's what the OP was thinking about.

<comment><USER5> > I work in an insurance company where 100% of benefits coding changes are put > through QC, and then another 25% are put through a second level of QC.

For electronic engineering this is a known fault mode of inspection.

When the first line inspectors are busy they'll shovel stuff theough with less inspection because there's someone else to do so checking. But now that other person is busy, and they'll shovel stuff through because if the first line of inspectors are doing their job properly it should be okay.

So it's interesting to see this not fail in an indistry tha is data driven and cash sensitive.

It'd be interesting to know what the difference is.

<comment><USER6> Give the second line guys a bonus for every error caught, and make the first line guys pay?

</comment></comment></comment></comment></comment><comment><USER7> This is very much unlike the phone screens I've been through. Most of mine involve the recruiter trying to see if I can back up the words I said on my resume to see if I am worthy for a technical interview.

This article did little to tell me how to ace it other than a little snippet of "I did a cool project to stand out". Which, admittedly, is cool, but I don't feel like it gave many tips on how to "ace" the phone screen. Also the end was basically an ad for Zenefits (well done).

</comment><comment><USER8> Speaking as a hiring manager, showing me a cool hack is nice but acing a phone screen requires:

* you know something about my company and why you want to work here (visit our corp. site, interrogate the recruiter, read up on our press and know something about our space)

* you know what we're looking for and understand that we're talking to you because there's some intersection between your experience and our search criteria.

* for that intersection in the venn diagram of our candidate requirements and your resume, brush up a little so that you can speak to how you used technology X. If it was 2 years ago or less know it well... if we're talking 10 years ago being more general is fine.

* be able to describe how you got to where you are in your career and where you want to go.

* know who you're talking to in the phone screen and LISTEN to what they're asking you. i can't count how many folks i ask to describe how they built a particular solution go on to just ramble on about feature descriptions and process without ever getting to how something was built.

<comment><USER9> Anybody with actual experience and skills doesn't give a rats ass about your company's mission. And are you seriously asking devs about where they want to be in 5 years? I hope you're not any older than 30.

</comment></comment><comment><USER10> I don't think "make a hummingbird with CSS" is really a universal way to ace a phone screen. A more appropriate article title might be "how _I_ aced a phone screen at _zenfits.com_ ".

<comment><USER11> I think the takeaway is that it's a competitive jungle out there and some companies may appreciate your effort to standout from the rest.

</comment></comment><comment><USER12> Just make sure not to publicly discuss your deal/doubts about the company or the ceo will tantrum and revoke it. And then, in a bold stand for integrity, edit his answer to remove the offer revokation.

[https://www.quora.com/What-is-the-best-way-to-start-my- caree...](https://www.quora.com/What-is-the-best-way-to-start-my-career-Uber- or-Zenefits?s=1)

[http://www.businessinsider.com/zenefits-ceo-rescinds-job- off...](http://www.businessinsider.com/zenefits-ceo-rescinds-job-offer-on- quora-2015-5)

<comment><USER13> While I agree that the CEO was an idiot there, I also don't have a huge amount of respect for anyone who judges where they work by whether it is a "buzzword like Uber".

<comment><USER14> it's a kid fresh out of college, though -- how is he supposed to know any better? working for a name brand makes the decision a safer decision; i'd put the onus on those advising him to point out why that's not the best metric for making this decision.

<comment><USER15> When one is at the point where they can kind of pick and choose where they want to go because they have an awesome resume and a great body of work, then let them choose how they wish. If I were going to my first or second job, I would go with Google or Facebook or Uber over a smaller/lesser known company as they would be great signaling mechanisms for my resume for future opportunities.

</comment></comment></comment></comment><comment><USER16> I like the approach of a small, fun task as "extra credit". But how do you smoothly bring that up in the interview? I guess if you're being asked about CSS technical details, you can mention you built this last night and ask if they'd like to see it. But I'm pretty sure due to nerves, I would make that really awkward. Like I'd answer the phone and shout "LOOK AT WHAT I MADE!"

<comment><USER17> I imagine you'd:

A. Include it with your resume before hand

B. Bring it up when asked about previous experience tangential to it

C. Bring it up when asked about your outside work activities or what sort of continuing professional development you've been doing lately

D. Mention it when asked about the "coolest/most fun" thing you've hacked on lately

E. Whip it out when asked the usual "what do you think we do here and what can you bring to the table"

Or, when you start asking your questions about the company/culture/ect. (DEFINITELY ask those types of questions), weave it in with a question about what kind of side-project or 20% type program they offer/support.

You could also throw it up on a design site or your blog and drop it in whichever social media channel they may have.

Cultivating a curious attitude (or sincerely making an effort to fake it) will help calm your nerves a bit as well.

</comment></comment><comment><USER18> Click-bait ... doesn't tell us at all about Zenefit's hiring process at the present at all, or how to 'ace' them.

</comment><comment><USER19> I'm not fond of the implication that you can get an interview/job from pandering to Zenefits by working on a project that _promotes their brand._

<comment><USER16> I viewed his little creation as "extra credit". It shows he knows Sass/CSS and makes him standout from other "boring" interviewees that may have possessed similar skillsets.

Why not make it about their brand? It shows his desire that he wants to work there, and it's also clear he just made this. It isn't some cool thing he did awhile ago and is showing many different companies in interviews. He wants to work there, and that initiative shown will go a long way (and was successful, in this case).

Worst-case scenario is that he doesn't get the job but spent the night learning more about pseudo elements and how the interact with other elements. That's a win-win.

</comment></comment><comment><USER20> Albert's hack is definitely impressive, and would make him stand out. I'm surprised at some nay-sayers here. Suggesting he use SVG? Nothing impressive about that.

I phone screen a lot, and would be impressed by Albert. However, if you are strong on resume, knowledge, and interviewing, you don't need any special tricks. I think such tricks are important if your resume does not support the position you're seeking: either a mediocre school, no degree, long unemployment, or switching industries.

As for acing a phone screen - no silver bullets here, but it pays to know something about the company and the screener. I know we're just company #923 to you, but don't show that.

</comment><comment><USER21> Trying to draw by writing HTML text is like pounding a screw. It's the wrong tool for the job. If you want to draw Zenefit's hummingbird, use an SVG draw program. Inkscape is free and can do that job.

As a way to get past HR idiots, it may be useful.

</comment><comment><USER22> Awesome bird dude! You're hired!

</comment><comment><USER23> The CSS hummingbird _is_ cool. It shows off the awesome ability of the software professional to take a half dozen stupid, illogical constraints and somehow end up with something that works anyway. The problem is that companies would not need to select for this quality if they could avoid imposing stupid, illogical constraints in the first place.

So the obvious followup question I would ask first would have been, "Why did you choose to do this with CSS rather than with a language designed for vector graphics, like SVG?"

Shall we also hire all the other people who can make their cats bark and their dogs meow?

<comment><USER24> I don't think making cats bark would be very relevant to an Internet technology company, but it would probably be a good sign in a relevant industry (say, a company that trains animals).

That's the point. This person did a neat little project that uses skills which are directly relevant to the job being applied for. The project probably isn't actually useful on its own, but it shows interest and ability.

</comment></comment><comment><USER25> And I thought this was about smart phone display ...

</comment><comment><USER26> I think the answer is "appear to be the person they want to hire" with the extra degree of difficulty being you don't know the person they want to hire. On the other hand, who wants to be hired under false pretenses? Not I.

</comment><comment><USER27> Trying to flatter an employer by doing a lot of pointless work is dumb and says something negative about the employers who respond. The "typical" way to ace a phone screen is: 1. be young and just out of college 2. pay more money to the person who wrote cracking the code interview and memorize the problems 3. Scan glassdoor and other sites for interview questions that the interviewers will, as predicted, lazily reuse. The real way to ace a phone screen is not to be involved in one.

<comment><USER17> Obviously, this isn't something to do for every place you apply to. However, for those at the top of your list, as is mentioned in the piece, riffing their design or code when you're practicing or wanting to expand your skillset anyway is a great idea. Two birds, one stone and all that.

</comment></comment><comment><USER28> I had the opportunity to speak with Albert on a developer panel and he told this story (we were speaking to software developers that had just begun their job search). He's a very nice guy and I think this is great, general advice for people just beginning to step into the world of software development and don't quite yet have a resume that can "wow" people. I'm glad to see Zenefits recognized that.

</comment><comment><USER29> Anyone else getting spammed by these guys? I got like 3-4 emails the other day from them, really annoying too, saying the'd looked into what we were doing for our HR etc and thought they could help, except for they were sending emails to an employee who hadn't been with us for a year (email forwarded to me), so not really looking at what we do and how we do it, just disingenuous marketing drivel.

</comment><comment><USER30> Funnily enough I used to work with Albert Treat at the "biotech startup" in South San Francisco. He's an incredibly talented individual, very driven, and contributed massively to the work done at that company.

Great advice, Albert! I'm glad you like your new job, too :)

</comment><comment><USER31> Interesting, I didn't know Zenefits did phone screens, they sent me a ~3 hour coding challenge to do over... I can't recall the services name atm.

</comment><comment><USER32> TLDR: Zenefits is an awesome company to work for and is growing like crazy. Also, do something to stand out during the phone screen.

</comment><comment><USER33> Ah, the innocence of youth.

</comment><comment><USER34> It's not Safari / mobile Safari compatible! -10 points!

It is supposed to be a PHONE screen after all. ;-)

</comment><comment><USER35> Ah yes, nothing says "I'm a team player" quite like a pile of opaque hacks abusing the wrong technology...</comment>


Quick Count All Your Lines of Code - <AUTHOR> http://dubmun.com/blog/2017/04/quick-count-all-your-lines-of-code/ <comment><USER2> In retrospect, I realize the article title is a bit clickbaity. The intent was for it to be sarcastic (which I realize doesn't translate well to print). How about this: "When Does Counting Lines of Code Make Sense?"</comment>


Tesla owner files lawsuit in California claiming sudden acceleration - <AUTHOR> http://www.reuters.com/article/us-tesla-lawsuit-california-idUSKBN14K01X?il=0 <comment><USER2> No news here. People think they're stepping on the brakes and actually hit the accelerator.</comment>


ARM Development for the Office: Unboxing an Ampere EMag Workstation - <AUTHOR> https://www.anandtech.com/show/15737/arm-development-for-the-office-unboxing-an-ampere-emag-workstation <comment><USER2> I know it's not exactly raw-metal ARM development, but I've been using Microsoft's ARM-based (SQ1 processor) Surface Pro X for the last few months for web development and have been _pleasantly_ surprised that the majority of my stack not only works without tweaks on an ARM-based system, but is very performant. WSL2 is really unlocking actually using these machines full time! Particularly powerful has been the new Chromium-based Edge–fully native modern web browser on ARM, very performant, battery-friendly and rock-solid, which makes me wonder why Google isn't shipping an ARM-based Chrome port yet, given it's clearly already building/in use upstream.

<comment> yjftsjthsd-h > makes me wonder why Google isn't shipping an ARM-based Chrome port yet, > given it's clearly already building/in use upstream.

Better yet, there are ARM Chromebooks, so it's not like Google considers it experimental support or something.

</comment></comment><comment><USER3> I use my Raspberry PI 4 for compiling and testing my ARM code to run on various screen-less embedded devices. It's surprisingly fast and convenient and I do not have to bother with a cross-compiler.

<comment><USER4> I am running gitlab runner on rpi, which consumes only jobs tagged with "rpi3".

</comment></comment><comment><USER5> I want one of these machines so bad. Would be an epic workstation, but the price tag is high. OpenBSD would mostly just work on these, as it already runs on the server boards. It even already has AMD graphics drivers ported to arm64, and a chromium browser port!

<comment> yjftsjthsd-h > OpenBSD would mostly just work on these

Open source in general seems to mostly handle different platforms nicely; other than the odd program that assumes things about word size or endianness or whatever, it's usually just a recompile away. Heck, NetBSD and OpenBSD still happily support sparc :)

</comment></comment><comment><USER6> I love the idea but damn that's arguably worse port selection than a Raspberry Pi 4 for like 100x the price, size, and power consumption.

It seems like what people really want is a many-core ARM SoC in a laptop. Turn most of the cores off when doing simple stuff on battery power, then turn them on for bursty parallelizable tasks like compiling code.

<comment><USER7> 256 Gigs of ram and a 32 core 2.8ghz CPU certainly outclass the Pi though. $3000 is reasonable for businesses, but yeah it's not quite right for home use.

</comment></comment><comment><USER8> I think they will not get much interest at that price point (3000+)

<comment><USER9> They are similar in price to the Raptor POWER9 systems.

<comment><USER10> TALOS2 and Blackbird have better offering at this price point...

</comment></comment></comment><comment><USER11> Sooo confused by this. This doesn't seem competitive at all. Is there some super secret special sauce that's not immediately apparent in the spec sheet? Who the hell is going to buy this?????

<comment><USER12> I'm more tempted by one of these [1], clock speed is a lot lower than the Ampere but I'm limited by RAM on all my current AArch64 systems.

[1] [https://www.96boards.org/product/developerbox/](https://www.96boards.org/product/developerbox/)

<comment><USER13> Forget clock speed, the worse problem is that these are A53 cores.

I like the Marvell MACCHIATObin, A72 @ 2GHz runs Firefox well enough.

</comment></comment></comment><comment><USER14> The ultimate RISC OS machine...

</comment><comment><USER15> How many cores does this machine have?

<comment><USER16> 32: in the article</comment></comment>