After making Hacker News Inline Reply I wanted to make a more complicated Chrome Extension. I have always liked the Reddit Toolbar, so I decided to replicate the experience for Hacker News.
Hacker News Toolbar
Clicking the link above will get you the Chrome Extension for the HN Toolbar! The HN Toolbar is a combination of a Chrome Extension and a Sinatra app running on Heroku. The Chrome Extension redirects external links on the HN home page to the HN Toolbar website. The website then loads and styles the comments alongside an iframe of the content page. To get around iframing restrictions, the Sinatra app actually proxies all linked content on the framed page, which was most of the challenge in building this.
You can see all of the code for the toolbar and the extension on my Github under the hntoolbar repo.
I made my first Chrome Extension!
It lets you reply to Hacker News comments inline, check it out:
Follow the discussion on Hacker News
In today’s age of free apps and an open web, many of the products essential to the daily life of a connected citizen are supported by advertisements. The meaning of an ad supported website has changed a lot over the past 10 years. In 2000, most websites would throw 3-4 popup ads and a banner ad at each customer, hoping to get a click by accident, frustration, or luck. Today, most ad supported websites and apps will instead show a single, targeted ad. This improvement was facilitated by the aggregation of user data that allows advertisers to target customers by demographic.
When signing up for any free service today, it is par for the course to click “Accept” on a 10+ page EULA or TOS that gives the company the right to collect and/or distribute your personal data. Most people are fine with simple data collection, but the sale of personal data from one company to another makes many uncomfortable or angry. However, one must look at the information market from a more rational perspective in order to understand why any web service with your data would be wise to sell it as fast as possible.
Over the weekend I was playing with Haskell (by reading through Learn You a Haskell for Great Good!) and I got to the chapter on IO. I saw that the author made a todo list manager similar to the famous “todo.txt” with just a single, short Haskell script. I wanted to extend the example but make something with simpler code, more features, and something I would actually use. The result?
Simple Haskell Product Manager (shpm)
It’s my first ever Haskell program more than a few lines long, and I am using it every day. I am really loving Haskell as a language. SHPM is mostly IO based so it’s not a great example of Haskell’s functional awesomeness, but it still shows how powerful the language is and how little boilerplate it has compared to my other favorite (Java).
SHPM manages a file called shpm.txt and keeps your todo list up to date with just a few simple commands:
shpm list -> list all tasks by project (in color)
shpm list -nc -> list all tasks by project (no color)
shpm add "Some Task" -> add "Some Task" to project "Other"
shpm add "Some Project" "Some Task" -> add "Some Task" to the project "Some Project", creating the project if necessary
shpm remove -> list all tasks and choose one to remove
shpm remove n -> remove task #n from the list
And here are some action shots: