Profile cover photo
Profile photo
Dan Jacob
67 followers
67 followers
About
Dan's interests
View all
Dan's posts

Post has attachment
Had some fun over the holidays with my side project https://podbaby.me, a simple web-based podcast player/manager. The frontend was built on top of #ReactJS/#Redux, the backend with Go and data storage in #PostgreSQL. Source code is here: https://github.com/danjac/podbaby. It's my first non-toy(-ish) non-Python/Django project in a while, inviting comparisons with my usual day-job stack.

Building a UI completely frontend - i.e. the SPA - is a challenge, especially managing state in the JS asynchronous/event-driven environment. Redux is fantastic for this, state collapsed into a set of reducer functions, and generally far easier to debug than other frameworks (or non-framework/jQuery solutions) I've worked with.

As others have noted churn - particularly in third party libraries (looking at you, react-router) or tools (looking at you too, Babel) - is a pain, especially if trying to pitch the stack to management which for understandable reasons prefers stability (but where is there really stability in the JS world? Look at the pain over the Angular 1 -> 2 transition). Otherwise once I had webpack up and running with the plethora of loaders and transpilers development was a breeze.

Go was used for the API and other backend stuff. I kind of like #golang, it's a prickly, uncompromising language that makes it hard to write in elegantly but yields stability and performance (not dived deep into channels in this project). Refactoring is easy, especially with the right editor setup (Vim in my case), and it more or less just works with few surprises. I avoided frameworks, just standard libary plus Gorilla packages, sqlx and one or two other helper libraries.

Go people don't like frameworks (or big frameworks) very much, partly because Go perhaps lacks the flexibility, introspection etc to build a real Rails/Django clone and partly due to the minimalist culture of Gophers. Nevertheless it was refreshing to just start with a tiny main.go file and build out with what I needed rather than the big upfront conceptual overhead of a new Django project.

#PostgreSQL was plain wonderful. Being in ORM-land so long, my SQL muscles have atrophied horribly so at first it was somewhat frustrating to be forced to write SQL by hand. However I got into a workflow where I would hand-tune queries in PgAdmin or the command line then add them to the code. Complicated or gnarly queries could be encapsulated as views or functions, for later refactoring without having to touch the Go code. PostgresSQL's full text search was OK to work with - not sure how it stacks up against a dedicated tool such as Lucene but for my simple needs it was powerful and fast, and most importantly meant one less dependency. I'm very much beginning to see the point Derek Sivers made in his post https://sivers.org/pg of pushing data logic to the database and eschewing ORMs - Django's isn't too bad but using an ORM to work with PostgreSQL feels like hitching a Ferrari to a Yugo.

I was slapdash when it came to writing tests (front and backend), a problem more to do with self-discipline and limited time than the tooling. #Mocha worked fine with some gotchas with React components and Go tests are OK - mocking/stubbing everything is a pain, but forces you to use interfaces so not too terrible. I wrote some naive tests to just get the hang of things, but definitely not too proud on that front.

Deployment - played with #Ansible for the first time (mostly used Fabric before, but wanted to avoid writing tons of Python) and it was fast and straightforward for the simple things I needed. I played with #Docker for a few hours but to be honest found it hard to actually see the value-add, especially with eye-wateringly slow rebuild times. Might take another good look at Docker in 2016 if work requires or someone convinces me of its advantages. I set up a droplet with #digitalocean to get going and used Let's Encrypt https://letsencrypt.org/ for the SSL certs.

All in all building an SPA with these tools was straightforward. It took less than 2 weeks to get the app up and running, albeit 2 weeks with festive and familial interruptions. I'd probably have been able to get the same done in half the time with a Python/Django stack and minimal frontend, but I'm a lot happier with the stability and performance of this application than I'd normally be with a rushed-out-the-door MVP. React/Redux make frontend bugs easy to decipher and compiling/transpiling all the code before launch makes for less of a nasty surprise in production. Definitely looking forward to playing more with these technologies this year.

Made a very very simple Kanban trello-clone for a weekend project using #golang and #reactjshttp://github.com/danjac/kanban


Very straightforward, Go is a bit on the verbose side but easy to reason about and maintain, React takes a lot of the pain out of complex JS apps. Also shoutout to the react-dnd (drag and drop library) https://github.com/gaearon/react-dnd - not only well written but beautifully documented.

Post has attachment
Photo

Post has shared content
gillmacewing@gmail.com

               Bruce Campbell House in Plane

Bruce Campbell doesn't just love planes, he lives inside of one. He bought a Boeing 727-200 for $100,000 and uses it as his house in the middle of the woods in Oregon.
YouTube : House In Plane
Photo

Post has shared content

Google+ hangouts must be the worst designed UI I've seen in a while. Completely unintuitive, appallingly bad UX. Unable to set up a simple conversation. Seriously Google, all this money spent and you produce a piece of crap a half-bit startup would be ashamed to demo as their MVP. Looking for a good Skype replacement, but Hangouts is not it.

What's the point of sparks exactly, when I've got Google Reader ? Sparks seems to show the most irrelevant or basic info on a topic, I can't really see what it's for.
Wait while more posts are being loaded