

Show HN: Hacker News Mobile - A fast and readable mobile HN website - JoelSutherland
http://hn.gethifi.com

======
JoelSutherland
I started on this Tuesday after work. Because of some great APIs that are
available, it really came together quickly. Most of the credit goes to this
one in particular:

<http://api.ihackernews.com/>

It's all JS/client-side templating. Ask any questions if you have them. It
works great as a Shortcut app on the iPhone.

edit: Lots of requests for a back button -- I'll be sure to add that!

~~~
jbail
Nice work. I work in mobile web and I applaud the simplicity and speed. That
said, to really make it snappy, bind to 'touchstart' instead of 'click' --- or
implement a 'tap' event.

Also, I might go a couple font sizes larger. It's readable, but small on my
phone.

All in all though, it's pretty nice. It's a good example of what mobile web
can do and showcases the power of client side development when you have an API
to support it.

~~~
JoelSutherland
Which phone out of curiosity? I was actually thinking of knocking the font
size down a bit! There must be some inconsistency I can fix.

It's fast because I didn't both with a mobile web framework. I've found those
(especially jQuery mobile with its DOM caching) to perform horribly. This
should scroll as quickly and smoothly as your phone can.

~~~
jbail
I'm on an EVO using Dolphin Browser.

...and you're totally right about jQuery Mobile causing suckage. I used it for
a couple features and I'm now ripping it out in favor of a little handrolled
solution I built. I even replaced the jQuery core library with XUI because
it's even smaller has most of the goodies I use 99% of the time.

For everything XUI doesn't have, I really like XUI.extends in its simplicity
better than the jQuery plugin architecture. Super easy to add whatever else
you need.

Performance is night and day better now.

~~~
johnbender
Curious what issues you had with jqm. We're always looking for feedback.

------
genieyclo
Looks great, I'll try it out. I've been using iHackernews.com for awhile and
to my knowledge pretty much every other hacker news app out there uses their
api as well. They had a problem where they were always having 502 errors when
you clicked on comments for a post for awhile, but this seems to have been
fixed in the last couple of weeks or something.

~~~
KrisJordan
I wrote the server-side portion of this app. It's actually a tiny coffee
script program that caches iHN.net's API calls in redis. We cache/proxy the
successful responses and toss out the 500s. When a cached copy of the content
is available it'll be served immediately from redis. We refresh the cache on-
demand in the background. This allows us to buffer out delayed / erroneous 500
errors the iHN API sometimes responds with.

This is running on a 256mb Ubuntu virtual server and it's overkill for both
processor and memory. Kind of neat watching the story climb HN (currently #4)
and watching `top` without being able to tell anything is happening on the
server at all: 0,0,0,0%user,100%idle -- a testament to the light weight beauty
of node,redis,nginx.

~~~
jrgifford
Impressive that it's not being overloaded.

------
petercooper
I've been working on a HN-esque design for a _non_ HN site and had taken a
similar approach with using favicons as this variant does. I think the icons
really help and also assist with identification (of, say, TechCrunch
articles.. whether you do or don't want to read them). What do people make of
their use in this project?

~~~
shurane
How do you resolve favicons? Browsers are very resilient at finding favicons.
Websites can use meta refreshes, variants on <link rel="..."> tags,
domain.com/favicon.{ico,png}, gzipped images, and inserting icon elements with
javascript. You could also use parent domains if you don't have a favicon for
a subdomain.

Writing your own favicon-getter is by contrast... kind of annoying.

~~~
simonbrown
It's using <http://getfavicon.appspot.com/>. I assume (by the names of the
creators) that it wasn't created specifically for this.

It seems when the URL of a post has a hash at the end, the default icon query
string isn't used.

<http://i.imgur.com/pBs2T.png>

~~~
mikeklaas
FWIW, you can use google's favicon "service". It isn't official, but as long
as you don't hit it too hard, I doubt they mind terribly:

<http://www.google.com/s2/favicons?domain=techcrunch.com>

EDIT: I should point out that the accuracy is poor compared to most browsers.

------
grisha
Very nice. I read HN from my iPhone a lot, and it's mobile version would be
very handy.

However, using this, I quickly realised that original design has some
advantages (though, maybe it is just habit issues). Usually I scan frontpage
fast for new highrated entries to read first, and having 10 entries on screen
in time is more suited for this. With 4 it's just another experience. I feel
that I need more time to find something interesting.

Maybe you can improve this, for example, indicating rating with color or size
of rating digits.

------
johnbatch

      Rats! There has been an Error. This application depends on a number of external APIs,  sometimes they don't always work. When this happens, your best bet is to reload.
    

Happens on a few of the comment links

EDIT: looks like the same thing happens on ihackernews \-
<http://ihackernews.com/comments/3001808> \-
<http://hn.gethifi.com/#/comments/3001808>

~~~
aik
I got the same thing when I scrolled down to the bottom and clicked on "Next
page".

------
jemeshsu
Sorry I don't get it. Isn't <http://ihackernews.com> already the mobile
version of HN? The site where you get the API.

~~~
_fn
My only gripe with <http://ihackernews.com> is the clickability. My oversized
thumbs doesn't play well with the small click target.

------
DougWebb
Nice. I created something like this that was text-only back in my Blackberry
days, but when I switched to Android and jQueryMobile came out I enhanced my
site to its current state: <http://webbindustries.com/cgi-bin/myfeeds.cgi>

It's old school: perl mirroring the RSS feed and writing out simple html
markup for jQueryMobile to format. It supports a bunch of other feeds too (I
used to read more than just HN this way) and it switches to a nice multi-
column format on larger devices.

------
crenshaw
Doesn't work on IE5 mobile. :-) (I did actually try though)

------
bgarbiak
Lovely. The only thing missing is a back button placed somewhere inside the
page (so it can be used as a full screen app on iPhone).

------
ericmsimons
Really cool! It doesn't work on WP7 though (which doesn't matter too much,
because most people don't have a WP7 device)

~~~
JoelSutherland
It should work on Mango.

~~~
pcj
Yes, works great on Mango. Like others mentioned, please do add the back
button :)

Personally, I would prefer if comments were directly a link. Not a big fan of
the popup.

------
Omnipresent
Really good work. Would love a blog post breaking down how you went on doing
everything.

~~~
JoelSutherland
I was going to post one concurrently -- but I thought it would be more
interesting to see how the server-side cache held up under load. We're
grabbing some screens while this is the top post and will include that
information.

The client-side bit of the post will be interesting mostly in that it's not
interesting. By keeping things basic, this was easy and performs well.

~~~
Omnipresent
I would be more interested in seeing how node.js, apis and everything was tied
together. Great work!

------
JoshTriplett
Looks impressive. Planning to support logging in and commenting/voting?

------
sktrdie
I especially like the textual version of the link. This will be helpful on my
mobile device, where I pay for connectivity, loading only what is important is
great.

------
ga2arch
you could try use my hn scraper written in python to overcome the api errors.

<https://github.com/ga2arch/py-hackernews/blob/master/hn.py> ( it's not good
code, but it does its job, i have successfully run it for 48+ hours with no
crash ( at least the previous revision :D ))

if you need help just send me an email =)

Awesome work =)

------
thoradam
Works great in the stock Android browser, but it's stuck on "Loading" in Opera
on Android. Then again . . Opera on Android seems to mess up every other site.

------
bobbywilson0
I like this better than both of the native apps I have tried for android. Not
only is it a more intuitive UI for me it is also very snappy. Good work.

------
windexh8er
Awesome UI! Was working great and then the API errors started in. This easily
replaces all of the crappy Android apps for HN.

------
aDemoUzer
My skin for HackerNews <http://harpb.com/Hack3rNews/>

------
cantbecool
Your site is similar to <http://www.icombinator.net/>

------
mwsherman
What are you using for the “Text” version? RSS or are you parsing the source
HTML?

------
Raphael
Great! Would you please make the Next Page button full width?

~~~
joshka
... or drop it altogether and use some form of infinite scroll? There was a
great solution to this at <http://news.ycombinator.com/item?id=2592741>

------
budu3
Can I vote on stories?

~~~
akkartik
No because they can't make cross-domain ajax calls. And they can't make
requests on behalf of very many people on their server without hammering the
HN server. Even if they were willing to ask for people's passwords.

We thought about this question extensively while building
<http://hackerstream.com>

------
trusko
Nice work. Thanks.

------
sportsTAKES
Outstanding -

