Better HN
topnewbestaskshowjobs
Log inSign up

dehesa

3 karma · joined Sep 8, 2015 (11y ago) · 1 submissions

Submissions

comment 6y ago · link · parent

I can relate. I have been one of those who started writing a CSV library and went down the rabbit hole of edge cases and configurability. Looking back (and only thinking on productivity) my time would have been better spent doing something else. I did, however, learn quite a lot along the way:

- how text is represented in a computer (and all its caveats),

- how to identify and tune slow code,

- how to vectorize code (thanks to Daniel Lemire's https://www.youtube.com/watch?v=wlvKAT7SZIQ ),

- how to encapsulate code better,

- how to use some great CSV tools out there (thanks to Leon's https://github.com/secretGeek/awesomeCSV )

- how to better manage and communicate an open source project.

All in all, I am still not sure it was a mistake. Moreover when Swift didn't really had, at the time, a good Codable interface to CSV. Next time I encounter a similar problem I will probably just wrap a C library and create a good interface, though.

In any case, if you are coding in Swift and find yourself in need of a CSV encoder/decoder, you might want to check https://github.com/dehesa/CodableCSV