Earlier quoted context omitted.
"A one line solution takes up very little visual real estate. That matters a lot when you are working on some more complex problem." When I work on some more complex problem, I like to think about the problem, not spend energy decoding condensed text. Scrolling a bit more verbose, but clear code, is faster for me.
I think the difference is not a bit of scrolling, but rather the whole program on half a page vs 10 files à 200 lines of mostly noise
Arthur Whitney's one liner sudoku solver (2011)
121–130 of 210 posts
Re: Arthur Whitney's one liner sudoku solver (2011)
#122Re: Arthur Whitney's one liner sudoku solver (2011)
#123Earlier quoted context omitted.
The average bank/company would rather have an average solution maintained by 10 easily replaceable average developers than a nutty, smart solution only understood by 1 highly talented developer.
You could also say that the average bank/company should have learned from previous mistakes doing exactly that for many decades. Select a language that is well tested, understood and supported. Set a limit on cleverness and instead focus on maintainability and simplicity.
Re: Arthur Whitney's one liner sudoku solver (2011)
#124Earlier quoted context omitted.
> how will you ever debug it? By being so smart that your program has obviously zero bugs in it!
This view is too static. That is not possible, because the environment can (and at some point always will) change which wasn't planned for due to a lack of working crystal balls. Data, user behavior, the network, the system(s) the software runs on can all change over time. Also, it is way too expensive to try to cover every single conceivable possibility, so we deliberately leave holes. For non-trivial things we ofte…
Re: Arthur Whitney's one liner sudoku solver (2011)
#125What baud is that? /s
Re: Arthur Whitney's one liner sudoku solver (2011)
#126Earlier quoted context omitted.
Wouldn't it be more productive/rewarding to instead engage with comments I do like?
Only you can say what's best for you. If have to ask: What's rewarding about only having your viewpoint reinforced?
Re: Arthur Whitney's one liner sudoku solver (2011)
#127Not sure where I got that from.
Re: Arthur Whitney's one liner sudoku solver (2011)
#128I’ve often wondered about languages like APL/k, are the programmers actually able to think about problems more efficiently?
It's a useful thing to learn though. And dare I say it, fun. Even if there was zero benefit to it, it'd still be fun. As it turns out, there really are benefits.
For me, the biggest benefit is when I'm working with data interactively. The syntax allows me to do a lot of complex operations on sets of data with only a few characters, which makes you feel like you have a superpower (especially when comparing to someone using Excel to try to do the same thing).
Re: Arthur Whitney's one liner sudoku solver (2011)
#129Most people are put off by the symbols, that wasn't really the issue I had. So I do love APL and arraylangs, and learning them was really helpful in a lot of other languages. But they never became a daily driver for me not because of the symbols, which were honestly fine if you stick with it long enough, but after about 3-4 years of dabbling on and off I hit a wall with APL I just couldn't get past. Most other langua…
Even today, after having worked in these languages for years, I am still put off a bit by the walls of code that some array programmers produce. I fully understand the reasoning why it's written like that, but I just prefer a few spaces in my code.
I've been working on an array language based on APL, and one of my original goals was to make "imperative style" programming more of a first-class citizen and not punish the beginner from using things like if-statements. It remains to be seen how well I succeeded, but even I tend to use a more expressive style when terseness doesn't matter.
Here's an example of code I've written which is the part of the implementation that is responsible for taking any value (such as nested arrays) and format them nicely as text using box drawing characters. I want to say that this style is a middle ground between the hardcore pure APL style found in some projects and the style you'll see in most imperative languages: https://codeberg.org/loke/array/src/branch/master/array/stan...
Re: Arthur Whitney's one liner sudoku solver (2011)
#130Earlier quoted context omitted.
I think the difference is not a bit of scrolling, but rather the whole program on half a page vs 10 files à 200 lines of mostly noise
There is noise and there is self explaining code. One liners for complex problems are a nice challenge, but are seldom clear to read.