DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > Livecoding: HackerNews App Where People Are Nice [Video]

Livecoding: HackerNews App Where People Are Nice [Video]

A DZone MVB tries to create a web application that allows users to post stories and comments, using React Native and Google's Cloud Natural Language API.

Swizec Teller user avatar by
Swizec Teller
·
Jul. 17, 17 · Web Dev Zone · Tutorial
Like (0)
Save
Tweet
2.62K Views

Join the DZone community and get the full member experience.

Join For Free

This weekend, I tried something new: coding from a pleasant, sunny location. It didn’t go so well.

First, the internet was atrocious. My stream kept lagging and cutting off and being blurry. In the end, I had to crank the bitrate and resolution way down. That helped, sort of.

Second, YouTube blocked my video based on copyright. Listening to music through your monitor and recording it as a background murmur through your mic is okay. Listening through a laptop and using the built-in mic is not okay.

shrug

Third, I got sunburnt on half of my face. BUT new MacBook Pro screens work in sunlight! You can actually see the screen now.

Fourth, my girlfriend decided it would be funny to water me like a plant. It was not.

The good news is YouTube offers a “remove song” feature, so I might be able to salvage this video. We’ll see.


Yes, two livecoding sessions last week.

I didn’t finish the app while streaming. There’s going to be a full tutorial and proper edited video on React Native School later this week.

So what was I even building?

One of those HackerNews App projects. You know the type; it’s not quite a TODO app, but it’s similarly generic and a common example to show people how things are done.

Mine’s going to have a twist though: it’s gonna hide comments and stories where semantic analysis says people aren’t being nice.

I think it’s going to work.

I ran some positive and negative comments through Google Cloud’s Natural Language API, and it looks promising. Bad comments get a negative score, good comments are positive, most are neutral.

It’s not as good as their Perspective API promises to be. Unlike Perspective, it’s already here and should work as a proof of concept.

The trickiest part is convincing React Native to render HackerNews comments because they’re in HTML. Guess what doesn’t automatically render in a native app? That’s right… HTML.

There’s Webviews, but I’m not sure how I feel about those. Feels ham-fisted for text that only does italics, quotes, and links.

Some HTML text components do exist, but they’re old. Might have to roll my own.

We’ll see.

app

Published at DZone with permission of Swizec Teller, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Understanding Cursors in Apache Pulsar
  • API Security Weekly: Issue 173
  • A Guide to Natural Language Processing (Part 2)
  • Want To Be a Terrible Engineering Manager? Be a Sh*t Shield

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo