How long have you been coding total? Was Design+Code your sole source for learning how to program?
No I have been coding now for close to an year now. But this is my first project with Swift. I have also watched the video lectures of the iOS development course offered by Stanford on iTunes.
Ask HN: Is my code any good?
41–44 of 44 posts
Re: Ask HN: Is my code any good?
#42I've not written any swift apps yet, but I have written some objective c and the (effectively) empty test directory is definitely an indicator that this code will be hard to change.
Empty test directory says absolutely nothing how hard this code will be to change. And seeing that this code is quite well organized, to change it won't be hard at all.
As the code base grows, doing it this way reliably will become more difficult, to the point that he will begin to fear change.
There is simply no debate that a well tested code base is easier to confidently add features to, confidently refactor and debug than code with no tests at all. This is particularly true if you bring on new contributors who have had no experience with the codebase.
Humans are not computers, they are never as good at repeatedly executing all possible execution paths of an application without growing tired or over confident that it doesn't need to check some path because it's sure it works.
I would take a well tested codebase over a well organized one with no tests any day of the week, because I know I could confidently reorganize the code without breaking anything. (well tested does imply that the tests themselves are well organized, though).
The OP was asking for criticism. He should add tests, lots of 'em.
Re: Ask HN: Is my code any good?
#43Re: Ask HN: Is my code any good?
#44For those advocating automated tests. Are you actually iOS developers with experience testing ios code? If so, I'm curious what frameworks/tools you've successfully used for unit and integration testing.