Programming sucks – Telegram
Programming sucks
81 subscribers
12 photos
188 links
Когда вы меняете направление всех стрелок в конусе, вы получаете коконус.
Download Telegram
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.

(c) Sir Charles Antony Richard Hoare
Слишком много людей пишут на С, хотя им не следовало этого делать. Нужно сертифицировать программистов для использования С. Почему ПО такое плохое? Все эти хаки, наводнившие мир, все эти проблемы с безопасностью. Причина как минимум половины из них заключается в С. На этом языке в буквальном смысле трудно программировать.

(с) Roberto Ierusalimschy, https://habr.com/ru/company/mailru/blog/459464/
Забавно, что в С нет индексации. Вы не можете сказать, что С индексирует массивы с нуля, потому что операции индексирования там не существует. В этом языке есть арифметические операции с указателями, так что ноль в С — это не индекс, а смещение (offset). А раз это смещение, оно должно быть нулевым не потому, что так проще вычислять, а потому, что это естественно.

И все языки, скопировавшие С, имеют индексы и не имеют арифметических операций с указателями. Java, JavaScript и многие другие — ни в одном нет таких операций. Их авторы просто скопировали 0, но это совершенно другое. Этот ноль они вставили безо всякой причины, прямо «культ карго».

(с) Roberto Ierusalimschy
Forwarded from erol matei
ooo
I wrote a simple package manager. Anyone could write one. And in fact mine is pretty bad. It doesn't do dependency management properly. It doesn’t handle edge case behavior well. It isn’t well tested. It’s shit frankly.

Is it any surprise I couldn’t answer their heavily computer-science questions well?

On the other hand, my software was insanely successful. Why is that? Well the answer is not in the realm of computer science. Homebrew cares about the user.

...

I feel bad about my tweet, I don’t feel it was fair, and it fed the current era of outragism-driven-reading that is the modern Internet, and thus went viral, and for that I am truly sorry.

(c) Max Howell, https://www.quora.com/Whats-the-logic-behind-Google-rejecting-Max-Howell-the-author-of-Homebrew-for-not-being-able-to-invert-a-binary-tree
A proof assistant is what happens if you spend all your time developing a type checker for your language and forget that programs also need to be run.

(с) https://serokell.io/blog/why-dependent-haskell
“Create stack project config from cabal or hpack package specifications”?

I have no idea what this means. I came to Stack to avoid Cabal. Every interaction I've had with Cabal has been a combination of mystifying and frustrating. I don't ever want to hear the word "Cabal" again if I can avoid it. Don't make me understand the crappy tool you replace in order to use your new, better one!

Besides which, this explains nothing. What is a Stack project config? What is a Cabal/hpack specification? When and why would I want to turn one into the other, and how does stack go about doing it? If you claim to be friendly to new users, you must answer these questions.

(c) http://www.rntz.net/post/2018-05-18-why-i-am-not-a-fan-of-stack.html
It's 2018. We still have cabal install but no cabal uninstall. This is not okay; it has never been okay; it will never be okay; no reasonable person would be okay with this; in no universe is this okay.

(c) http://www.rntz.net/post/2018-05-18-why-i-am-not-a-fan-of-stack.html
Forwarded from HN Best Comments
Re: Tired of Stack Overflow

Children, SO is a blessing for humanity.

Their creators should be canonized. You don't remember the pre SO times. You couldn't find anything to fix your problems and must read the source code or pay zillions for some sh*tty support. In the pre-internet times, you just would hit a wall and have to quit. I really love Jeff and Joel.

neves, 4 hours ago
...it is not exactly the same as Alan Kay’s original definition of OOP, but it is far from the horrible incidents that permeate our field such as UML, abstract factory factories and broken subtyping.
(c) https://jaspervdj.be/posts/2018-03-08-handle-pattern.html
...the database is never well-integrated into source Haskell. Our options are to let the database schema generate our types via Template Haskell, or to let our types generate the schema via Generics. It is too tedious to produce meaningful types for every query in our application, so we tie our Haskell representations directly to our database representations. But databases have laughably simple type systems in comparison, and so we’ve tied our own hands!

As bad as all of this is, it’s not the whole story of how databases break our compositionality. Because queries are ubiquitous and complex, the most reasonable place to put them is inline at the place we need their data. This is an understandable decision, but means that our business logic is now fundamentally tied to our choice of database technology.

(c) Sandy Maguire, https://www.patreon.com/designandinterpretation
No wonder Haskell hasn’t taken over the world; as a community we need to stop writing C code that we can compile via GHC.

(c) Sandy Maguire
Question: What is the origin of STL? Has STL been conceived to be what it is now, that is "the" C++ Standard Library, or does it come from some other project? Could you tell us a history of STL?

Answer: In 1976, still back in the USSR, I got a very serious case of food poisoning from eating raw fish. While in the hospital, in the state of delirium, I suddenly realized that the ability to add numbers in parallel depends on the fact that addition is associative. (So, putting it simply, STL is the result of a bacterial infection.) In other words, I realized that a parallel reduction algorithm is associated with a semigroup structure type.

(c) http://www.stlport.org/resources/StepanovUSA.html
Every time I would look at an algorithm I would try to find a structure on which it is defined. So what I wanted to do was to describe algorithms generically. That's what I like to do. I can spend a month working on a well known algorithm trying to find its generic representation. So far, I have been singularly unsuccessful in explaining to people that this is an important activity.
(c) http://www.stlport.org/resources/StepanovUSA.html
I think that object orientedness is almost as much of a hoax as Artificial Intelligence. I have yet to see an interesting piece of code that comes from these OO people.
(c) http://www.stlport.org/resources/StepanovUSA.html
I miss files. I still create many of my own, but increasingly, that seems an anachronism, like using a quill rather than a pen. I miss the universality of files. The fact they can work anywhere, be moved around easily.
The file has been replaced with the platform, the service, the ecosystem. This is not to say that I’m proposing we lead an uprising against services. You can’t halt progress by clogging the internet pipes. I say this to mourn the loss of the innocence we had before capitalism inevitably invaded the internet.
(c) https://onezero.medium.com/the-death-of-the-computer-file-doc-43cb028c0506
Using the data types, slowly, through pain and suffering, we can indeed construct an expression...
(с) https://markkarpov.com/tutorial/th.html
The reason PostgreSQL is so flexible is actually quite interesting in a historical sense too. Many years ago, one of the most well-known PostgreSQL developers, Jan Wieck, who had written countless patches back in its early days, came up with the idea of using TCL as the server-side programming language. The trouble was simple--nobody wanted to use TCL and nobody wanted to have this stuff in the database engine. The solution to the problem was to make the language interface so flexible that basically any language can be integrated with PostgreSQL easily. Then, the CREATE LANGUAGE clause was born...

(c) Hans-Jürgen Schönig, Mastering PostgreSQL 11
Here's the question: how much does all this pedantic hiding, annotating, and making sure you don't double-cross yourself by using a "for internal use only" method actually improve your software?

...

Even if they're secured with the private incantation, nothing is stopping you from editing the file, deleting that word, and going for it. And if this is your own code that you're doing this with, then this scenario is teetering on the brink of madness.

What all of these fine-grained controls have done is to put the focus on software engineering in the small. The satisfaction of building so many tiny, faux-secure fortresses by getting publics and protecteds in the right places and adding immutability keywords before every parameter and local variable. But you've still got a sea of modules and classes and is anything actually simpler or more reliable because some methods are behind the private firewall?

(с) https://prog21.dadgum.com/206.html