Live data from Hacker News

Ask HN: Is my code any good?

news.ycombinator.com

1–10 of 44 posts

Ask HN: Is my code any good?

#1
I have written my first iOS app in Swift, a Hacker News Client for iOS. I am a beginner iOS developer. I need some feedback from the Hacker News community about my code quality so that I can improve myself in the future. Be brutal and honest about what you think of my code structure and style.The project can be found at the following URL https://github.com/NikantVohra/HackerNewsClient-iOS.If you want to take a look at the app it can be downloaded from https://itunes.apple.com/us/app/hn-app/id983203003?ls=1&mt=8.

Re: Ask HN: Is my code any good?

#2
It's useful to get human feedback on one's code, but human attention is scarce, and human judgement is influenced by many non-technical factors (e.g. mood, politeness or hostility) that do not derive directly from code quality.

For these reasons, I recommend complementing internet-based code review by measurement: Use (automated) testing in multiple forms, unit, integration, randomised. Count the number of bugs you encounter. Classify the bugs you find, track how the numbers and classes of bugs in your code evolve over time. Compare those statistics with other coders. This not only gives you ideas about your relative coding ability, but will also reveal areas where you could try and improve your abilites.

Re: Ask HN: Is my code any good?

#3
Congratulations on shipping your code!

I'm not a Swift or iOS developer really, so I don't know how those projects are supposed to be organized, but I glanced through your repo and I can see that you seem to be pretty good at breaking things up into small functions and stuff seems readable and well formatted enough to me. Good luck!

Re: Ask HN: Is my code any good?

#4
post #2

It's useful to get human feedback on one's code, but human attention is scarce, and human judgement is influenced by many non-technical factors (e.g. mood, politeness or hostility) that do not derive directly from code quality. For these reasons, I recommend complementing internet-based code review by measurement: Use (automated) testing in multiple forms, unit, integration, randomised. Count the number of bugs you e…

I wanted to get some feedback on my code design and structure. I think that is difficult to get via automated code review.

Re: Ask HN: Is my code any good?

#5

Congratulations on shipping your code! I'm not a Swift or iOS developer really, so I don't know how those projects are supposed to be organized, but I glanced through your repo and I can see that you seem to be pretty good at breaking things up into small functions and stuff seems readable and well formatted enough to me. Good luck!

Thanks for looking into the repo. I appreciate your feedback :)

Re: Ask HN: Is my code any good?

#8
Don't know much Swift - but I just wanted to say congrats on shipping something and also for the app - it looks really nice.

Good job.

Regarding the code quality - from my experience you'll be able to also see for yourself if the code is well written when you'll want to change something in the app(e.g. in the next update) and see how easy (or not) it is to do so.

Also my advice will be to take a look at other open source projects and try to see how others have done the same things - what was their approach and how is this different from what you would do in a similar scenario.

Re: Ask HN: Is my code any good?

#9
post #8

Don't know much Swift - but I just wanted to say congrats on shipping something and also for the app - it looks really nice. Good job. Regarding the code quality - from my experience you'll be able to also see for yourself if the code is well written when you'll want to change something in the app(e.g. in the next update) and see how easy (or not) it is to do so. Also my advice will be to take a look at other open so…

Yeah I am already looking into the next update and faced some challenges. Thanks for the advice. Will take care of the same in the future :)

Re: Ask HN: Is my code any good?

#10
post #4
post #2

It's useful to get human feedback on one's code, but human attention is scarce, and human judgement is influenced by many non-technical factors (e.g. mood, politeness or hostility) that do not derive directly from code quality. For these reasons, I recommend complementing internet-based code review by measurement: Use (automated) testing in multiple forms, unit, integration, randomised. Count the number of bugs you e…

I wanted to get some feedback on my code design and structure. I think that is difficult to get via automated code review.

That's not what your question asks for.

Anyway, in my experience, the ability to test with ease is one dimenision of design quality.

Post reply on HN