image pipeline test

test 0 test 1


Removed typebase and pdf rendering

I removed typebase and also markdown2pdf. My resume is now rendered to PDF by the browser.


Something he’d found and lost so many times

It belonged, he knew – he remembered – as she pulled him down, to the meat, the flesh the cowboys mocked. It was a vast thing, beyond knowing, a sea of information coded in spiral and pheromone, infinite intricacy that only the body, in its strong blind way, could ever read.” ― William Gibson, Neuromancer


Meteor: the first month

There's an exciting new stack for optimistic developers called Meteor and I've had the great pleasure of focusing on learning it for the past months. This is what I've learned.

Meteor is framework based on the high-minded ideal of isomorphic javascript, which is a fancy way of saying, "It's javascript, on the server too!" I find this notion absolutely titilating, though I'm sure other's are heaving at the very thought. Ok, that's fair. But give it a chance! It's an incredibly flexible technology and with a little bit of experience, you'll find that Meteor is a fantastic tool for building prototypes which evolve into mature software. Meteor is production ready and the time to dive in is now!

The basics

Meteor is not like Rails.

I'm a RoR guy. I bet if you are reading this, there's a good chance that you cut your teeth on Rails. Forget all of it.

Meteor does not use HTTP to communicate between the server and client. Rather, it uses Websockets and the Distributed Data Protocol (DDP) to create magical, reactive variables which map Mongo documents to the view.

Meteor uses Collections to store individual documents but by publishing and subscribing to other collections over DDP. This feels weird, at first, but it's actually quite natural.

The server publishes some orders


Meteor.publish 'validOrders' ->
 Orders.find {'valid': true}, {userId: 0}


Meteor.publish 'myOrders' ->
 Orders.find {'userId': Meteor.userId()}

and the client subscribes

Meteor.subscribe 'orders'
Meteor.subscribe 'myOrders'

Hence, the client has access to a subset of all Order documents. You can even limit not just a set documents, but rather whitelist and blacklist certain attributes. This is an important distinction. The client now has access to

  • Orders of which "belong" to said users
  • Orders which are valid but not the userId fields

And this subscription is now reactive and those order directly map to HTML through you handlebars templates. And the client is usually requesting a subset of records based on a query.

Template.example.helpers
 orders: ->
  Orders.find({active: true})

Therefore, the documents which are shared are the overlap between these 2 subsets- those published by the server and those queried from a helper.

Of course, if you are a beginner, you've got the autopublish package installed and every document is simply available to the client. That's fine for now but don't leave it in your app forever.

A similar package to look out for is the insecure which allows the "client to write to the database". It think this is a bit of a mischaracterization, because the client can't ever "write to the database", only call Meteor Methods. The insecure package simply implement this niavely- you'l want your version of the same methods to have more security

Overall, the impression upon me is very different from Rails. Rails is about strict separation of logic and view, with a controller to handle the details of http. Meteor is less "opinionated" but it forces you to deal more directly with details in a less abstract way. You need to understand the underlying technology, rather than Rails's curated DSL's. Out of the box, Meteor enforces no MVP, though you could implement such. Be careful, because without those rails, it's easy to tangle your logic and your implementation!

Meteor is backed by a mongo db and loves JSON

Adios SQL! I've personally always despised SQL. I get it, sort of, but it never felt natural. Mongo is a breath of fresh air. Not only is every document a plain JSON object, queries are also JSON. Yes, you can have a schema, if you want. Yes, migrations are an real consideration and you have to manage joins yourself.

Meteor requires yet another package manger.

It is, however, a very nice and necessary.

It uses a lot of RAM

But RAM is cheap, so it's not a big deal most of the time.

But it's still just js

Let's face facts: node's asynchronous support is overhyped. Sure, it powerful but the community is fragmented on how to support asynchronous operations. Promises, threads, futures, generators, etc are absolutely overwhelming and bewildering. Meteor does it's best to shield you from these concerns but you'll still have to tackle these complex issues at some point.


Status update

  • I used Normalize.css for a base, Holy Grail to implement a fluid layout and a sticky footer and for typography, Typebase.css. Of course, I've added my own light touch but so far, it's quite a neutral theme.
  • Each blog is now routed to a nicer url and jpgs included in the same file get re-mapped to a absolute url, so managing images for specific blog entries is easy.
  • I used the same technique that generates my resume to turn the README.md into an html file.

Of course, you can see for yourself by tracking the commits on github! And if you wanted to see what's next on my todo list, check out the issues.

Finally, I bumped the version to 0.1.0, which according to SemVer I should have done already.


Dogs

This is a picture of my dogs.


Generators

This entry was auto-generated and includes a publishedAt time stamp.


Soylent, day to day

Ever since I backed Soylent on Kickstarter, I've been a little obsessed with the stuff. Well, "obsessed" might not be the right word... "consumed" might be a better. "Evangelical" has been tossed around. Seriously, a day does not go by when I do not attempt to bring some poor soul into fold. If someone asks what biege slurry I'm gulping down, I launch into a full scale attack to win the hearts and minds of "fooders" and turn them into "Soylentarians."

What's in it?

Mostly sugar. Maltodextrin to be specific. Sugars are molecules in the form of a chain. Shorter chains are the sugars you are most familiar with. Table sugar, HFC's glucose, sucrose and fructose fall into this category. Long chains are your breads, pastas and rice- all the starches. Maltodextrin is "medium" length, so it doesn't taste very sweet. Your body "burns" these sugars more slowly than candy-sugar but faster than pasta-sugar. Next comes oats and brown rice flour. These provide your protein and fiber. Everything else is your vitamins and minerals. Lastly, don't forget the oils! We need oil in our diet and every daily allotment of Soylent includes a vial of oil.

Strangely, Soylent is missing 100% a crucial ingredient- salt!. This only matters if you eat Soylent and Soylent alone or you run marathons. Ordinary food, even when supplemented by Soylent, provides more than enough salt. I think they skimped on this to improve the taste.

How do you get it?

Order it online. You can get 1 weeks, 2 weeks or 4 weeks worth of Soylent at a time. If you buy the subscription, you get a discount. If it's your first order, it's going to take a long time. Go complain about it on the forums but it won't do any good. It took me a year and half to get mine! But after your first shipment, latter orders arrive much faster.

How do you make it?

Each daily serving of Soylent is a bag of powder and a vial of oil. Put the powder in the pitcher and add water. Shake until well mixed. Add the oil and shake again. Serve chilled. Each pitcher is 2000 calories- the FDA recommended amount of everything. I divide it up into 2 meals and snack, in 3 of those shaker bottles, so it's not unusual for me to eat nothing but Soylent and coffee.

What's it taste like?

I would not be ungracious if I said Soylent tastes a bit like Play Do. Not in a bad way though. It's slightly sweet but more than anything at all, it's utterly bland. There's a distinct texture which has been described as "silty." I don't find it unpleasant but others do. I don't understand this at all- my best guess is that it's a subconscious bias.

What's it like living on Soylent?

Well, first, I don't live on Soylent alone and I don't recommend anyone try. Living on Soylent alone would be a sad existence. It's also more dangerous than even I dare to tread. Though I consume more than 50% of my food as Soylent, I'm still wary about the long term effects. But more than that, food is good and after eating Soylent for breakfast and lunch, by dinner I want sweet, salty, spicy food! I can't stress this enough. After the blandness of Soylent, "real" food tastes extraordinary. Your taste buds get reset and you can't help but ruminate on your food. The tastes and textures are so much more pronounced, even boring foods like toast are exciting. But our modern foods are absolutely bursting with sugar, salt and fat and with a fresh palette spicy chicken wings, Doritos, chocolate and Dr Pepper will absolutely blow your mind! It's like eating again for the first time.

Another big change is that you have more of your most important resources- time and money. If you were like me, you were spending up to $20 a day on food and over an hour of time shopping, cooking, eating and then cleaning up after. On Soylent, you can make all 3 meals in 60 seconds, for less than 10 bucks. There are days when the dishwasher is full of nothing but the pitcher and shaker bottles.

What are the downsides?

The worst problem is well documented on the forums- Solent Farts. It's advised that you gradually increase your Soylent intake, as to give your gut a chance to adjust. Otherwise you can expect some really explosive gas. "Fart" really is an insufficient term- I had tremendous gas, so much so that it hurt my abdomen digesting Soylent. GasX and Beano are prescribed but theres quite a few solutions floating around the forums. Thankfully, these symptoms subside eventually. I haven't had any gas at all after v1.3 but your mileage may vary.

Another problem is one of will power. Like I said, Soylent makes you appreciate the sensation of eating real food. Soylent nourishes the body but not the soul. If your not careful, you will find yourself walking out of the grocery store with a pint of ice cream, spicy Doritos and soda cause it tastes that darn good. And you'll find it easier to rationalize to yourself, because you ate 2 solid healthy meals. This is alleviated by forcing yourself to cook. The Soylentarian lifestyle affords you much more time, money and energy to devote to real food, when the modd strikes you. Use your newfound resources to learn to cook again. At my house, we have 5 roommates but we try to eat dinner together. It's an important human ritual, one I didn't appreciate until it was gone. Cooking can be fun and rewarding. Eating can be an aesthetic experience. Both should be social opportunities.

Lastly, you will run into anti-Soylentarians. There's a lot of them in Portland and I'm sure you know the type. Nutrition-istas and Food Babes everywhere will grimace with horror as you down your Soylent. Just smile back and direct them to the forums, where all manner of nutritional arguments are held.


First post

This is my first blog post!!!