Show HN: the iPhone version of News/YC, a Hacker News reader
github.com
github.com
There are still few bugs that i need to fix.
But, I will play with some colors to make it more readable.
UPDATE: the only thing that does not work on Chrome-mobile (mobile-Safari also) for iOS is the back-button of your app (comments-button works though)...
No iPad version yet, working on that for 2.0.
The API calls made by this app are slightly tricky. For the front-page posts, a call is made to http://hnsearch.com/bigrss and then the resulting xml is parsed to grab the unique IDs from each post. Those are then sent as a request to the actual API to get the posts. The comments, unfortunately, return as basically a totally unordered set. I create a linked list out of those, and then I turn it into a flat array based on the nested nature of the comments - so UITableView will render correctly.
HNKit is also doing XML parsing over everything, and string comparisons can be fairly slow as well. That, in conjunction with not being ARC ready and a total lack of documentation made me choose something else entirely.
I'll admit I haven't had time to write documentation. However, most everything follows Cocoa conventions, and the headers should be pretty readable. Absolute worst case, there's an existing app using the framework as an example. :)
You can also combine ARC and non-ARC code in one project. HNKit was written before ARC (although I still prefer manual memory management), but there's nothing keeping you from using HNKit with an ARC-based app. And unless you're modifying HNKit itself, you wouldn't ever need to see or write any retain or release calls as a client of the API. Apple did a pretty good job making ARC and non-ARC code interoperate well.
I'm happy to help with any HNKit questions — feel free to open issues on GitHub if there's anything confusing. HNKit already supports most of the things you are hoping to implement (logging in, commenting, voting), so I would hate to have all that effort duplicated. If you have any specifics about things that could be done better, I'm all ears.
Performance-wise, HNKit hasn't been optimized, but it does do parsing on a background thread. In general, a bit of extra local parsing is almost always going to be faster than additional network fetches. I haven't had any performance issues, even on older devices, so I doubt that part will be an issue at all.
Didn't mean for that to come off rude if it read that way. I haven't dug too far deep into HNKit - I was really just worried about the interplay of ARC and nonARC code and what that meant for the future of maintainability of my own codebase (really for things that go multiple classes deep, I didn't want to introduce retain cycles and the like).
I'm considering creating a branch of this with HNKit and starting to build that in to see how it plays with everything I have now.
Includes a Kickfolio embed so you can actually run the app in-browser. Enjoy!
https://play.google.com/store/apps/details?id=com.airlocksof...
There's also http://ihackernews.com
I was getting sick of always scrolling left and right to read comments. I wonder why this site hasn't been updated with that in mind.
Anyway, thanks again!
Three things:
1. Is there any way to allow for selecting and copying of text from someone's comment? It is very often that someone posts something so profound or useful here on HN that I want to snip the text to save it in Evernote for future reference.
2. And like css771 posted, remembering your scroll position in comments (and which comments are folded) would be a HUGE addition. I often click a link in someone's comment which opens in the browser, go back to the app, and the reading position is reset, including any and all folded comments I had. Quite frustrating. Fixing this would be incredible!
3. Minor visual issue, but it seems the first indentation of a comment is not indented, as the other levels are. The first indented level has a color, but is not actually indented. This would help to make comments slightly more readable. I do love how easy it is to fold comments though. A quick tap and instantly folded.
Anyway, I love the app; you did a great job on it. If it had these three features above, it would definitely be my go-to Android app for Hacker News. Thank you!
+1 for the app, and I hope you found my feedback useful too!
P.S. Feel free to contact me via my personal email via my profile if you need any more detailed feedback, as I was a software tester for a while and hopefully you found my feedback and writing style useful.
1) I'd have to look into how I would make the "tap and hold" to select text work. In the meantime, if you long press on a comment and click "Share", it will bring up the sharing menu. Then you can select to either share a link to the comment, or the actual text of the comment (which you can then email, SMS, open in Evernote, etc.)
2) That's coming when I have a chance to work on the app again (busy busy!)
3) It's that way to save horizontal space when you're on a phone and the comments get nested deeply. Was it particularly confusing as a first time user?
You can email me if you have any other questions or just open an issue on Github. My email and Github are in my profile.
The one thing that I really liked on Google Reader was that it aggregated all stories onto one page. So that's what I built. It may or may not be useful to you guys - would love some feedback either ways.
EDIT: This is the one whose creator commented below ("Have you tried out mine?"). Kudos.
I just recently changed the API to hnsearch's version (the only officially sanctioned one by HN) so hopefully a lot of the bugs will be smoothed out. I hope the new update doesn't crash and actually loads stories for you from now on out.
In addition, when I'm part way down the list I can't tell whether the grey "x Points ... y seconds ago by zzz" separator bar applies to the item above or below it. Maybe adjusting the shading of the bar and border would make it more obvious to which it belonged.
Would be great to have a list of such projects in one place.
Edit: Just installed it and it's very nice, but a great feature to add would be... collapsible comments :-) Please?
Would love to add a feature where if you swipe left, all the comments in that thread get collapsed.
It's useful when there are long threads that gets totally out of hand and you dont realize it until you're 1/3 way through. This way you can collapse all of them without having to go to the top.
AlienBlue does this currently with reddit.
"The app can be found on the iOS App Store here: https://itunes.apple.com/us/app/news-yc/id592893508?ls=1&... "
For people reading this later, previous title: "Show HN: the sleekest iOS HN Reader is now open sourced! Let's make it the best."
I'm still sympathetic to the title-change complaints, and I think HN is leaving a source of creativity on the table to the community's detriment. But the guidelines are theirs to setup and enforce.
It's snarky comments like these that prevent people from confidently sharing their code.
Got a helpful comment to make? Great! How about sharing it minus the veiled insults next time?
OP doesn't owe you clean code. Don't like the code? Don't use it.
Or better yet, contribute a patch/PR. The OP's intention in sharing it was to get contributors: https://news.ycombinator.com/item?id=5678490
And prefixing classes is not for "clean code", it's to avoid namespace collisions which is a valid and common issue in Objective-C development.