7 ms·
Show HN: the iPhone version of News/YC, a Hacker News reader
- killahpriest 13y agoWhy did you choose not to use HNKit from chpwn's news:yc? https://github.com/Xuzz/HNKit https://github.com/Xuzz/HNKit The way you do it right now seems like it would be terribly slow. The API calls made by this app are slightly tricky. For the front-page posts, a call is made to http://hnsearch.com/bigrss 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.
- bennyg 13y agoHNKit isn't in ARC, and does a myriad of things that I think are unnecessary and can be maintained cleaner (there's absolutely no documentation!!!). Those methods are actually very quick (imperceptibly fast) right now - but I'm not a computer scientist by any means, so I believe they can be made even faster by someone that knows a better data structure to use. Each comment comes back out of order with a parent ID and a comment ID. A comment that is a reply to Comment 1 will have the parent ID matching Comment 1's comment ID (hence my linked list structure right now). There's got to be a better way, and that's also why I open sourced the whole thing. 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.
- Xuzz 13y agoHey, I wrote HNKit. 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.
- bennyg 13y agoHey Xuzz, 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.
- bierko 13y agoYou can integrate non-ARC code into an iOS app pretty easily: http://stackoverflow.com/questions/8958761/how-to-remove-arc-from-xcode/ http://stackoverflow.com/questions/8958761/how-to-remove-arc...
- cmstoken 13y agoPredicting that the title will change to "News/YC for iPhone" in less than an hour. :) For people reading this later, previous title: "Show HN: the sleekest iOS HN Reader is now open sourced! Let's make it the best."
- akkartik 13y agoI recently found out that the guidelines explicitly say, "[barring exceptions] please use the original title". (http://ycombinator.com/newsguidelines.html http://ycombinator.com/newsguidelines.html) 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.
- kbar13 13y agonow make it for android
- bennyg 13y agoI don't even know what the state of the game is for HN Readers on Android right now. What are the best ones people are using?
- airlocksoftware 13y agoMine :) I don't know whose is sleeker since I don't have an iPhone to try yours out, but mine is definitely winning on the more-open-source front considering yours is missing a license. https://github.com/bishopmatthew/hackernews https://github.com/bishopmatthew/hackernews
- bennyg 13y agoYours looks pretty sweet - and thanks for mentioning the lack of licensure, I just added it.
- apunic 13y agoI get the best HN mobile experience on Android either with the stock browser or Chrome Mobile since both have an automatic text reflow (or so called automatic word wrap). This feature is one of the most I miss on my iPhone which let a lot of classic websites top every native app on mobile devices. Reading HN and commenting is as fast as on a desktop. I tried several HN apps on iOS (I have both an iOS and Android device in parallel operation) and none of them got close to HN on Android's mobile browsers in terms of convenience and usability.
- airlocksoftware 13y agoHave you tried out mine? It's open source, and if you find something lacking I'd love your feedback. https://play.google.com/store/apps/details?id=com.airlocksoftware.hackernews https://play.google.com/store/apps/details?id=com.airlocksof...
- w1ntermute 13y agoI can confirm that this app is awesome. There's also http://ihackernews.com http://ihackernews.com
- Paul_D_Santana 13y agoAmazing! This is the first time I see this. Thank you for posting it! 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!
- alook 13y ago+1 on this app. I've been using it and am stoked :) Good stuff, airlocksoftware!
- css771 13y agoSo good to see you here. I agree that your app is the best HN app. But please make it remember list scroll position. This one major flaw downgrades an otherwise superb experience.
- thekingshorses 13y agoI wanted to see daily and weekly top 10 stories and also ask/show hn stories. So I wrote a HTML5 webapp that works on all browsers including ios/android. http://premii.com/hn/ http://premii.com/hn/ There are still few bugs that i need to fix.
- arithma 13y agoI liked how you chose to represent the hierarchy of comments. I also liked the fact that you are showing the articles within your web app rather than redirecting, but it got me worried about how reliable that may be.
- thekingshorses 13y agoI am using readability to fetch article content. I have been using it and read 500+ articles. It works pretty good for most sites except "show hn".
- forrestpitz 13y agoI really like this. It's super easy to use and the dark theme looks great. My only comment would be that the header text (e.g. comments, setting etc.) can be hard to read on the default (HN orange) color scheme. Nice.
- thekingshorses 13y agoI have purposely kept it light as those are not as important as other things. Once you know how app works, you don't need to read those. But, I will play with some colors to make it more readable.
- bennyg 13y agoNow that's a beautiful interface!
- capsicum 13y agoGreat interface, love the feel
- krohling 13y agoWe just setup a CI process for this app on cisimple here: https://www.cisimple.com/jobs/kh1isdaal986n3ip9 https://www.cisimple.com/jobs/kh1isdaal986n3ip9 Includes a Kickfolio embed so you can actually run the app in-browser. Enjoy!
- algorithmmonkey 13y agoNews site via an iOS sim, so I can read more news in the browser. Turtles all the way down.
- jevinskie 13y agoTurtles with news:yc! http://i.imgur.com/GkdgzLr.jpg http://i.imgur.com/GkdgzLr.jpg
- bennyg 13y agoThanks man, just merged your request.
- krohling 13y agoThank you, stoked about using your app!
- ngoldbaum 13y agoI'm a regular user of the app - it's a bit buggy but it's definitely the best looking and most usable HN reader out there. If I spot bugs in daily use should I open issues on github?
- bennyg 13y agoYes absolutely! 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.
- newman314 13y agoI actually prefer google search using "site:". Seems to return much better results for me.
- akst 13y agoThe app has recently been updated fixing most of the crashes, and adding a few new features.
- codingjedi 13y agoThis is awesome. As a self taught developer, I love looking at other people's code to compare and contrast my own coding styles and learn to improve my side projects code structure. Thanks!
- bennyg 13y agoThank you, but I'm not trained in CS at all haha - so take everything with a grain of salt. I've got an Art degree, and taught myself everything. So there's bound to be a lot of things that can be done a hell of a lot better.
- fyaqub 13y agoIt's 2013, why aren't you using properties in all of your classes? And you should be prefixing your classes to avoid namespace collisions.
- ux-app 13y ago> It's 2013, why aren't you using properties in all of your classes? 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.
- itafroma 13y ago> 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 https://news.ycombinator.com/item?id=5678490
- fyaqub 13y agoHow is this a snarky comment? Properties were introduced in Objective-C 2.0 which is relatively new, thus, I'm asking why he chose not to use them when they're standard practice now. 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.
- bennyg 13y agoI'll take these suggestions into account - I've also only been coding for about a year and a half, and graduated with an Art degree. I'm the ESL equivalent of programming.
- muzzamike 13y agoWow this is awesome, I use this all the time and had wished I could contribute. Can't wait to start!
- peterhajas 13y agoWhy is this app called News/YC? It seems uncomfortably close to chpwn's news:yc.
- natch 13y agoDoes this send our HN credentials anywhere other than directly to the ycombinator site? I see a bunch of https and some http URLs in the code and could probably verify one way or another with an hour or two of work, but what can you tell me short of that?
- bennyg 13y agoIt only sends the credentials once when you login, and that's only to HN's https login page. It then only includes HN's regular cookie in the http headers on requests that go to an https page inside HN after you've logged in.
- jbrooksuk 13y agoYes! This looks so much nicer than HackerNode. Thank you, however there is one thing I really miss and that's Pocket integration.
- alexhjones 13y agoDoes it allow for collapsing comment threads? Edit: Just installed it and it's very nice, but a great feature to add would be... collapsible comments :-) Please?
- bennyg 13y agoActually it does already :) - just double click the header bar in a comment (where the username is) and it will collapse that comment and all nested ones under it.
- alexhjones 13y agoExcellent! Thanks
- kooshball 13y agoAwesome app! 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.
- urza 13y agoIs there a list of HN-related projects and tools somewhere? There is a great number of weekend projects that enhance or complement the HN reading experince.. E.g. I enjoy the "collapse this subtree" bookmarklet. There are also some projects that "summarize" HN news over some period for those of us who dont have time to be here every day. There are also some projects that aim for "dont miss anything from front page", some "parsers" for code processing etc. Would be great to have a list of such projects in one place.
- gearoidoc 13y agoPlan to release it on the App Store?
- jrnkntl 13y agoIt is already "The app can be found on the iOS App Store here: https://itunes.apple.com/us/app/news-yc/id592893508?ls=1&mt=8 https://itunes.apple.com/us/app/news-yc/id592893508?ls=1&... "
- nikolakirev 13y agoVery nice project! Do you need some help with it? I saw the list with upcoming features. Making it universal (iPad compatible) would be nice too.
- bennyg 13y agoAbsolutely, open any pull requests you see fit.
- duncans 13y agoVery nice, thanks. One thing that is odd/slightly annoying is the way the comments initially scroll up. The issue is that the comments list scrolls at a different speed to the speed at which I'm dragging it due to the simultaneous scrolling up of the title bar. I think initially just the title bar should slide out of the way, and when it's gone, scrolling should continue on the comments list. Ultimately my finger should at the same position in then comments list as when it started the drag. i.e. Very much like how a category slides out of the way in a regular UITableView.
- duncans 13y agoActually this affects the main news items list also. 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.
- tapanthaker 13y agoJust optimised this app for iPad , i required it badly. https://github.com/tapanthaker/News-YC---iPhone https://github.com/tapanthaker/News-YC---iPhone