{"id":7247,"date":"2024-02-20T18:39:45","date_gmt":"2024-02-21T01:39:45","guid":{"rendered":"https:\/\/www.dresan.com\/blog\/?p=7247"},"modified":"2024-02-19T18:47:09","modified_gmt":"2024-02-20T01:47:09","slug":"twenty-twenty-four-post-fifty-one-worse-than-useless","status":"publish","type":"post","link":"https:\/\/dresan.com\/blog\/2024\/02\/20\/twenty-twenty-four-post-fifty-one-worse-than-useless\/","title":{"rendered":"[twenty twenty-four post fifty-one]: worse than useless"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"434\" src=\"https:\/\/www.dresan.com\/blog\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-19-at-8.43.35-PM-600x434.png\" alt=\"\" class=\"wp-image-7248\" style=\"width:717px;height:auto\" srcset=\"https:\/\/dresan.com\/blog\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-19-at-8.43.35-PM-600x434.png 600w, https:\/\/dresan.com\/blog\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-19-at-8.43.35-PM-300x217.png 300w, https:\/\/dresan.com\/blog\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-19-at-8.43.35-PM-768x556.png 768w, https:\/\/dresan.com\/blog\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-19-at-8.43.35-PM-1536x1112.png 1536w, https:\/\/dresan.com\/blog\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-19-at-8.43.35-PM-2048x1483.png 2048w, https:\/\/dresan.com\/blog\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-19-at-8.43.35-PM-640x463.png 640w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>So I recently came across a tutorial for game development that seemed pretty interesting, so I decided to give it a try. The tutorial was in Rust, a new language that I\u2019d been hearing about, and so I thought it would be a good idea to learn that too.<\/p>\n\n\n\n<p>I even found an online playground, <a href=\"https:\/\/play.rust-lang.org\/\">https:\/\/play.rust-lang.org\/<\/a>, which lets you try out the language in the browser, much like the Go playground: <a href=\"https:\/\/go.dev\/play\/\">https:\/\/go.dev\/play\/<\/a>. I quickly started trying out some simple functions that I use a lot in a variety of languages \u2026<\/p>\n\n\n\n<p>\u2026 and got stuck right away on Rust\u2019s lack of function parameters.<\/p>\n\n\n\n<p>There\u2019s a whole blogpost <a href=\"https:\/\/www.thecodedmessage.com\/posts\/default-params\/\">https:\/\/www.thecodedmessage.com\/posts\/default-params\/<\/a> on why this antifeature is actually, in the minds of \u201cRustians,\u201d is a good thing, but even that admits that the alternatives that the language provides \u201cmight seem worse than useless.\u201d&nbsp;<\/p>\n\n\n\n<p>I\u2019m sorry, I\u2019ve gone through this kind of Stockholm Syndrome thinking before, where users held hostage to the good features of a language start coming up with excuses for its warts. For example, take the Go programming language. Programming Go felt like a breath of fresh air, but it was literally worse than useless for my use case &#8211; I had to write the software I wanted in C and then call it from Go. And the language itself had terrible warts from the terrible choices made by the core Go team &#8211; at the time I used it, no support for generics, endless proliferating error checks, and worst of all, an overly verbose unit test style which threw out everything we\u2019d learned from Java and Python about how to write tests using semantically meaningful methods like assertIsNotNone or assertIsEmpty.<\/p>\n\n\n\n<p>I\u2019m not saying I\u2019m not going to not learn Rust, nor that I\u2019d never use Go again. Hey, one day I may be a convert! But, based on what I know now, I would never recommend these languages to anyone. My recommendations for programming languages remain the same &#8220;Big Three, Plus One&#8221;:\u00a0<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For most tasks, use Python.&nbsp;<\/li>\n\n\n\n<li>If you need speed, use C++.<\/li>\n\n\n\n<li>If you work with a very large enterprise, consider Java.<\/li>\n\n\n\n<li>If you\u2019re working with a system that uses a specific language, use that language: C in the Linux kernel, Javascript on the web, Swift in iOS, Java in Android, PHP in WordPress, C# for Unity, and so on.<\/li>\n<\/ul>\n\n\n\n<p>Many of the alternative languages that you can use &#8211; Go, Rust, Scala, Clojure, even my beloved Mathematica, Common Lisp, or J &#8211; are actually worse than useless for most tasks, for two reasons.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, most of them are less baked than the Big Three, and are less ready for developing real applications; they\u2019re not chosen for their fitness to purpose, but instead chosen by zealots who are trying to make a point. Don\u2019t be a zealot trying to make a point.<\/li>\n\n\n\n<li>Second, working on these other languages actually detracts from making the Big Three better. The C++ of today is almost unrecognizably usable compared to when I first started using it, and Python and Java are rapidly adding new usability features as well.<\/li>\n<\/ul>\n\n\n\n<p>That doesn\u2019t mean we don\u2019t try new things. C++ has mostly replaced C, and TypeScript is edging out JavaScript; who knows, perhaps, one day some variant of Go or Rust or Swift will become the dominant paradigm. (But, honestly, I hope not).<\/p>\n\n\n\n<p>Nevertheless, I remember talking to a programmer friend about a refactoring I wanted to accomplish, and he angrily sketched out a better build system which could have solved the problem using a Turing-complete constraint language to figure out the dependencies.<\/p>\n\n\n\n<p>I just remembered the famous quote from the creator of ANTLR &#8211; \u201cWhy program by hand in 5 days what you can spend 25 years of your life automating?\u201d &#8211; and handwrote a script to solve the problem in an hour, and got on with my life.<\/p>\n\n\n\n<p>-the Centaur<\/p>\n\n\n\n<p>Pictured: Some of the older programming language books that I have in my stacks, most of which are now worse than useless for getting things done nowadays &#8211; though if you really love programming languages and learning how things work, they&#8217;re more than priceless, now and forever.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I recently came across a tutorial for game development that seemed pretty interesting, so I decided to give it a try. The tutorial was in Rust, a new language&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[209],"tags":[274,273],"class_list":["post-7247","post","type-post","status-publish","format-standard","hentry","category-computing","tag-blogging-every-day","tag-programming-parables","ratio-2-1","entry"],"_links":{"self":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts\/7247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/comments?post=7247"}],"version-history":[{"count":1,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts\/7247\/revisions"}],"predecessor-version":[{"id":7249,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts\/7247\/revisions\/7249"}],"wp:attachment":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/media?parent=7247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/categories?post=7247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/tags?post=7247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}