Ask HN: If you were to do it today, what would you do?

5 points by irishcoffee ↗ HN
I am by day a linux/windows c/c++/python developer. I suppose I should mention, I've never written a lick of javascript. I have been kicking around an idea for about a year now for a website, and I think I'm going to try and take a swing at developing it.

The website is fairly simple. It'll have users who need to somehow authenticate. When they log in, they'll be presented with a simple interface to select something. This selection will be stored, and if the correct selection was made, they will "earn" a "point" which will be added to their total. There will be a leader board showing the users who have earned the most "points" thus far, until the season ends, and a new one begins.

In a nutshell, this is the idea. What I am wondering from HN is, what do you wish you had known when you were in my shoes? Should I look into multiple modes of auth, like twitter/facebook/google logins? What security concerns should I have? What do you wish you'd thought of in advance that you needed to "bolt on" afterwards?

If it matters any, my research has been in python frameworks (bottle/flask) just to get an mvp up and running, but I am in no real hurry and have also bee kicking around rust/go, just to learn something new.

Thanks!

6 comments

[ 13.6 ms ] story [ 509 ms ] thread
If I had months, I'd choose Rust. I'm excited to play around with it and would love to help move it toward web-friendliness.

If I had weeks, I'd choose React (server + browser with a single code base) in TypeScript with SCSS.

If I had days, I'd choose React (via slingshot boilerplate) in JavaScript with SCSS. The only reason I'd ever start a React project without TypeScript is that the fantastic react-slingshot boilerplate doesn't have TypeScript support and ESLint + WebStorm is decent for type-checking.

I would choose Python/Django. As a Python developer you can build that app in a couple of days.
Pretty straightforward decision really, OP know python and it's suitable to the task at hand. Additionally they will need some sort of database (sqlite would be a good start).
It depends on what your goal is. If your goal is to build a toy app for the hell of it then you can probably get away with a few scripts and a sqlite database and call it a day. If your goal is to learn a specific framework, then go for it. Generally speaking, the overhead of a framework is usually worth it for larger projects but not necessarily for smaller ones.
Web2py provides all the features you mentioned out of the box, is easy to pick up if you know python and works well together with intercooler.js, so you don't have to write javascript. On the other hand this combo may not be future-proof if you want to build a unicorn, but hey, you will high probably fail anyhow...
Having exactly the same background (system programming, linux, c/c++, python, never touched Javascript nor web development) I did the very same recently.

My solution was to use Django (DRF) for REST API and React for the front-end and Zurb Foundation as UI framework. Javascript is really easy to pick up and there are plenty of tools and tutorials available out there. Used Facebook JS SDK for FB login and sharing (because it's easy and ready to go, plus FB is popular enough to make the effort worth). I also used JWT for auth and session management, just to explore it and because it seemed simple enough for my purposes. Django will solve most of the security concerns for you.

In total, took me ~4 months while working full time to wrap my head around everything and build the website + deployment (Nginx, Fabric, Celery, supervisor... all the usual stuff).