4 ms·
I think this problem is a symptom of another problem though. I mean the fact we have to scaffold stuff out like that suggests our programming languages are shit
by thimp 3y ago
I think this problem is a symptom of another problem though. I mean the fact we have to scaffold stuff out like that suggests our programming languages are shitty, wasteful and lack sufficient abstraction over common problems.
If we're paving that with junior developers or AI then we need to push the problem up the stack a bit more.
Example the other day. It took me 30 minutes to work out how to read a damn CSV in Go. Yeah I can ask ChatGPT to do it to me, but why the hell is it so damn unintuitive getting to there. Today I want to plot geographic data in R. This is also a hill to climb.
The instructions are simple. Our abstractions are just crappy and ChatGPT is just a shit crutch over a crock.
- notTooFarGone 3y agocsv.NewReader(f).ReadAll() takes 2 seconds in your favorite browser. you can add arguments for other seperators and iterate over it like everything else. I think go is a very bad example of "wasteful and lack sufficient abstraction over common problems". It's first and foremost easy and therefore a bit verbose. If you mean "wasteful" by LOC then I'm sorry about that but that's not its purpose.
- thimp 3y agoThat's only part of the problem that needs to be solved. I have to read the CSV off the network and parse each field out. In a better language for the task, which I can't choose. > t <- read_csv('https://media.githubusercontent.com/media/datablist/sample-csv-files/main/files/people/people-100.csv') ... > glimpse(t) Rows: 100 Columns: 9 $ Index <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,… $ `User Id` <chr> "88F7B33d2bcf9f5", "f90cD3E76f1A9b9", "DbeAb8CcdfeFC2c… $ `First Name` <chr> "Shelby", "Phillip", "Kristine", "Yesenia", "Lori", "E… $ `Last Name` <chr> "Terrell", "Summers", "Travis", "Martinez", "Todd", "D… $ Sex <chr> "Male", "Female", "Male", "Male", "Male", "Male", "Fem… $ Email <chr> "elijah57@example.net", "bethany14@example.com", "btho… $ Phone <chr> "001-084-906-7849x73518", "214.112.6044x4913", "277.60… $ `Date of birth` <date> 1945-10-26, 1910-03-24, 1992-07-02, 2017-08-03, 1938-… $ `Job Title` <chr> "Games developer", "Phytotherapist", "Homeopath", "Mar… So I'm forced to use a crutch, which is writing a lot of boilerplate.
- ravenstine 3y agoYes, I agree that most of our tools that we've been using are actually very poor, and that's a polite understatement. As the great Jonathan Blow has pointed out, it takes far more effort today to accomplish something that would have taken a few hours (if that) back in a high school programming class decades ago. I think this is an indication of failure in our toolchains, which seem to evolve at unreasonably rapid paces, yet don't seem to actually make us any more efficient as programmers; at best, they cover up the inefficiencies in other tools.