I've been playing around with an update (well, total rewrite) of this site for a few weeks now. If you give an eye to the site as it is now, it's not too hard to find it's pretty damn ugly. And the logo I slapped on from horriblelogos has a white background, contrasting from the weird off-blue I chose for some reason, and it bothers me to no end. I'm happy buying a $7 club sandwich from Zaxby's, but I didn't spend the $10 (or whatever) to get a transparent logo. I'm an idiot.
Anyway, I wanted desperately to try out all this fancy new Javascript-powered shit, so I started writing the new version with NodeJS. It's all written in CoffeeScript, and uses ExpressJS as a framework, with PassportJS for authentication. I also shoved in Jade for templates and Stylus for CSS. For database shit, I'm using Sequelize as an ORM.
What I've learned is it's all pretty goddamn straightforward, aside from Sequelize, which seems to brush against the limitations of JS. There's a lot of boilerplate needed for simply describing models, but because it's boilerplate, I'm sure someone will abstract it away at some point. I don't have quite the intimate relationship with JavaScript as I do with Python, so I don't know how ugly that solution may be, but regardless of that, I know if a consistent, intuitive interface can be provided, the ugliness isn't a terribly important factor. You don't need to know what goes on behind the pedals if it controls the car exactly how you'd expect.
I was inspired to write this new version when I stumbled upon hallojs, an HTML5 contentEditable library. I only knew vaguely of contentEditable when I discovered hallo, but the ability to offload the actual editing to the browser immediately got my dick hard, because it meant my main concern was serialization... so "you do whatever the fuck you want, and tell me about it later." I found an Angular plug-in someone had already built (updating it a bit for strict contextual escaping, and COFFEESCRIPT YEAH), and popped it in.
I was amazed at how quickly everything came together. Or maybe it was the realization my elitism was keeping me from Getting Shit Done. In either case, I built a slick interface in which the only other page besides "view all posts" and "view single post" is the login screen. Once authed, I've got a "New Post" link, which adds the same HTML to the page as an existing post, with just a boilerplate "Edit This Title" and "Edit This Post" text, both of which I can simply click and begin editing. It's literally WYSIWYG, because the browser handles all that shit.
The post body is a special case, because I don't save the actual HTML. Instead, I convert it to Markdown and save that to the database. While I'm actually editing the post, I provide a realtime display (YEAH, ANGULAR) of the Markdown source, which itself can be edited to change the HTML display, exactly like the Hallo demo.
That's the small and skinny of the web stack. Behind the scenes, I tried to learn more about Docker. I've got a Dockerfile which I use to build a container of the current folder state (it directly copies over my code at the current state, instead of doing a git pull, so it can be done during development/testing), and I use that to actually serve the site through an nginx proxy on the native box (well, that's a VM in itself... fuck me, technology is cool).
Man, I always told myself I'd never be that guy to just throw technologies at something because they were cool. But now I'm there, and it's because whenever I had something I wanted to do ("I need auth!", "I need CSS!", "I need JS that isn't fucking horrible!"), I Googled a solution and ran with it. But that's the future I suppose, where "lack of pride" completely obliterates "reinventing the wheel", and hacking isn't a lifestyle and commitment as it is an incredibly fun way to sacrifice your time to the All-Knowing[-of-Blog-Posts] to pay forward dozens or hundreds or thousands of man-hours saved with a Google search. If StackOverflow had a dick, I would be sucking all seven of them.
Non-technologically, I decided to can all my past blog posts. I've made some lame-ass posts, I've been dogshit crazy in many, self-deprecating and dogshit crazy in my latest, and anytime I thought "I really don't want this to be what others perceive of me," I said "you posted it... it is you. Sack up, bitch." I think a lot of different shit, and though I wanted to avoid the realization for as long as possible, who I consider myself varies immensely based on how I feel... and my control over how I feel is very shoddy. That's not the end of the world, because I can have control over it, but constantly forcing the opinions I had on myself at my lowest of lows is no way to build. So I'm starting from scratch. I could never bring myself to delete the old posts completely, as if they never existed, so I'll link to them publicly (though not prominently -- but enough for Google to index); I just want new, well-written posts about applicable (or at least interesting) things to take the stage, instead of my babbling and excuses over why I'm not writing those posts.