The World of WordPress
About a year and a half ago I made the switch from Posterous to a WordPress for my blog. I figured that I might as well learn how to use the 800 pound gorilla in the room. For the most part, things went well considering that I wanted to run it on Windows under IIS and use SQL Server as the database. I added some plugins for the basics like commenting, syntax highlighting and the like. The import from Posterous was smooth with nothing lost.
And it was good.
I'm not sure if it was the WordPress upgrade or an update to one of the plugins. One day a few months ago I tried to create a new post only to have 90% of it just disappear upon hitting save. I hit the edit button and retyped a paragraph to see if that would save. It didn't. Typed a little less then previewed the post this time. Gone. I did a few more experiments with creating new posts and editing them in various stages. They all seemed to auto-save early in the entry and then get locked forever.
A Ghost in the Darkness
I wasn't sure what I wanted to do about my blog. I wasn't in the mood to re-install WordPress. I looked at a few blogs written in .NET, but none of them really appealed to me since most are written using WebForms. Then I saw the KickStarter for Ghost popup on Twitter. It's basically the start of a new platform designed to focus on blogs vs the CMS style product that WordPress has become. Its written in Node.js with SQLite as the default backend database. Markdown is used as the input language with a real-time preview as you create a post. It looks to leverage the best of HTML5 to make a state of the art blogging platform.
My initial reaction was probably the same as most developers when they see something cool on the web:
I can build that!
And so I did.
"I see you have constructed a new lightsaber."
There's a bit of me that feels writing your own blog is a rite of passage as a developer. I know most people use existing packages because why would you really want to waste time at creating something that has been created hundreds of times before. For me, this is a chance to not only give it my personal touch, but really experiment with new technologies and practice the skills outside of my comfort zone. Some might say it's like a Jedi building his first lightsaber.
At work I almost exclusively use ASP.NET MVC 4. And while I really do like using it, I felt this was the perfect time to try building a website in Node.js and Express. I really liked the idea of using Markdown instead of a WYSIWYG editor or plain HTML. I also liked the idea of having the layout update in real time when writing a post. I'm using MongoDB since it's my go-to datastore due to how easy and fast it is. So far the core is done. It's still mostly MVF (minimum viable functionality), but I'll keep tweaking it as I go.
Here are some of the highlights that I'm proud of or really happy with.
To get the dual Markdown/HTML rendering I'm using Pagedown which is from the folks at Stack Exchange. Its the editor they use on their sites. It was really easy to implement and there's even a 3rd party add (Pagedown.Extra) on which extends the Markdown a bit more for things such as tables and code syntax highlighting. For syntax highlighting I'm using SyntaxHighlighter.
For uploading images and files I integrated Dropzone.js by overriding the image dialog in Pagedown. Dropzone is amazingly simple implement and provides thumbnails of the images as you upload. Just eye candy, I know, but the effect is sweet.
Here's a screenshot of me writing this post:
If there's anything I need more practice at, it's design. Thanks to Twitter Bootstrap, I got a running start. I like the clean and simple look so I tried to keep plenty of whitespace and let it define the sections. I'm using LESS for the CSS. I'm not yet customizing Bootstrap, but its on the list. Font Awesome is used for the icons. I went pretty minimalistic on the colors sticking to the really-dark-grey-and-black on while. I'm still iterating over the layouts, but I think I'm pretty close.
I run my own servers, so I wanted continue to host my blog locally. For now I'm using iisnode with Node.js 0.10. One of the benefits is that I can have IIS host all of the static content and only have Node host the dynamic pages. This is the standard Node configuration I hear about, with the exception that its Nginx used instead of IIS. The concept is the same.
I have Grunt setup to do my build and deployment so I can test locally then push out the live site. I really like Grunt and am looking at how feasible it would be to use in the .NET world for things like project scaffolding.
I still have a few behind the scenes sections to create. I want to build up a dashboard for some stats. Probably won't be as amazing as what Ghost will provide, but I'm not sure I need that much. I still have Google Analytics running anyways, and its not like I'm going to beat that.
I also want to pretty up the Edit page to use auto-completion for the tags and to have the url get built from the title automatically. Just a bit of extra polish really.
Until next time...
In 2010 I made the choice to use Mercurial instead of Git. That was mostly due to Mercurial having much better Windows support. It had strong tooling for the command line, Windows Explorer, and Visual Studio. It was a simple choice. Ahh, but the times they are a changing…
Here we are, a quarter of the way through 2012. The world has moved forward as it tends to do. GitHub has dominated the open source world and elevated Git to be the de facto winner of the DVCS battle. The final victory for Git was the announcement from CodePlex that they too will support Git. It seems Git is really all you hear about now-a-days in the DVCS world.
So now that it’s clear that Git is the tool to know, I guess it’s time to make the switch for my personal projects. I can get by cloning a repo with my rudimentary Git skills, now is the time to get familiar enough with it to use it in my normal workflow. I’m not planning on converting existing repos, just starting new ones on Git.
Another good sign for us Windows Git users is that Phil Haack has moved over to GitHub. I have much faith in Phil as he and the GitHub gang works towards improving the Git experience on Windows.
And I, for one, welcome our new DVCS overlords.
Motivation can be a funny thing. Sometimes you have it when you don’t have time for it. Other times it’s nowhere to be found when you are desperately seeking it. My motivation for blogging has waxed and waned other the last year, as probably is apparent by all three of my posts. This year will be better. Hard to be much worse!
I am motivated by moving my blog over to WordPress. I think my layout is cleaner, and my mobile layout is awesome! (Try it!)
Happy New Year! Gregorian and Chinese.
In November I started a new job as a developer at Pinnacle of Indiana. They found me through Careers 2.0 at Stackoverflow.com. I had created a profile when it was still 1.0, but I never really expected to get contacted, let alone a job.
So far it’s been a great opportunity for me and I’m super lucky to be working here. Depending on what I come up with, I might even do some blogging on our developer blog at www.pinnacleofindiana.com/blog/developers
In addition to learning more work skills, I have started brewing my own beer! I’m currently in process of fermenting my second batch. I started out with a Porter which turned out great! My Amber should be ready in about 2 weeks. I would love to blog about it, but I’m not sure what I would say yet.
I’ve played with quite a few of the “cool kid” technologies over the last year and I have a bunch of things I want to cover in future posts. Some of the topics are:
More posts are on the way!
I recently picked up Trevor Burnham’s CoffeeScript book. So far it’s a great introduction into CoffeeScript and also Node.js, two topics which I wanted to learn more about. I started running through the first examples to see them run. I downloaded the latest node.exe, and found a way to add the CoffeeScript module without NPM. I wrote up a simple test just to make sure it worked:
console.log "Hello World!"
I ran this command to run it:
node %coffee% test.coffee
That worked. Node gladly printed my string, passed through CoffeeScript. Of course there isn’t much that CoffeeScript is doing, but there were no errors.
My next step was to try the first full sample in the book. It’s a buildup of the larger app which the book is building up to. I use Notepad++ for most of my plain text editing. I typed in the code, saved it and ran it.
Error: In prompt.coffee, Parse error on line 14: Unexpected ‘POST_IF’
The function at line 14 looks like this:
promptForTile2 = ->
console.log "Please enter coordinates for the second tile."
inputCallback = (input) ->
if strToCoordinates input
console.log "Swapping tiles...done!"
Everything looked correct. I just didn’t get it. Googling for the ‘Unexpected POST_IF’ brings up that it’s a parsing error and most posts have to do with multi-line if statements. I didn’t think that was what I was running into here.
Or was I?
I read through the multi-line if posts and it dawned on me that maybe it was being more helpful then I thought. I went back though my code and re-counted the spaces just to make sure I was consistent. Turns out I wasn’t exactly. Notepad++ was helping me out my automatically starting the next line at the same indention level as the last line. The I ran into was that Notepad++ was inserting a tab instead of 4 spaces when the indention was 4 spaces or more. CoffeeScript didn’t like the tab to start the line after the if statement. It wants spaces, not tabs.
The fix was easy enough. Like all great apps, Notepad++ is flexible. I just had to turn off the option to automatically align the next line. After cleaning out the tabs and changing them to spaces, we were good to go.
Since I didn’t really find anything on Google I thought it might help someone else that runs into this. I’m pretty sure it the kind of thing that only us Windows users will run into, with all of our overly helpful tools.
Like most American’s, our family had cable TV, Comcast in our area. And it was good, just expensive. Having 2 TVs, HD service, and a DVR really adds up. Throw in the sports package to be able to watch NFL Network in the fall and we’re talking a healthy sum of money each month. Now we’re doing fine financially, but we have a house, a toddler, and are planning for another one in the future. The more we can save, the better, right?
Channels, Channels, Channels
Our most common complaint is one you can read about whenever someone talks about cable (or U-verse, or satellite). We had more channels than anyone can watch. We had just about each channel twice, one in standard def, and one in HD. I never did count them, but I would guess we had about 250 HD channels. Of which, I think we watched about 15 on a regular basis. And most of those weren’t watched live, but through the DVR after we recorded the show.
When you compare the total number of channels available per your monthly bill, you’re probably close to $0.25 a channel. Not too bad. But when you compare that bill to our actual usage… Now it’s more like $10 a channel. Throw in that 4 of those channels are the major networks, and that makes you think if there is a better way.
I know that the “À La Carte” channel model will never happen even though that is the trend most technologies are headed. If that were an option on Comcast, we would have stayed a cable TV customer. We are still an Internet customer, but on the business side.
To the Cloud! – Kind of
So what’s the alternative? We do like to watch some TV. Just not as much any more.
Netflix – Of course! Hulu Plus also helps fill in the gaps. But we have a nice HD TV which is a monster compared to our laptop screens!
Roku to the rescue!
IPTV – The future is here
I don’t remember exactly where I first heard about Roku boxes. I think it was a podcast or maybe Slashdot. Either way, this device is pretty slick. You can connect it to your Netflix, Hulu Plus, and Amazon Instant accounts to get started. Then there are a bunch of free and premium channels available as well. Roku also has an SDK which allows developers to create their own channels from content they may already have available in the web. You can even connect into your Pandora account to listen to music through it. A little Googling, and you can even find a channel to watch YouTube.
Roku has 3 different models available ranging from $60 to $100. This is a one time fee. You just have to pay for the other services you use, like Netflix or the premium channels. Honestly, there is no reason not to just get the XD|S version and call it a day. Full HD, wireless N, optical output, AND a USB port which can be used to view pictures or play movies. All of that is worth the extra $40 in my opinion.
Overall, the quality is really good. Granted, having a 20MB downstream internet connection sure helps that, but overall, we haven’t had any issues with the Roku box itself. It holds the wireless connection well and picture quality is really good for streaming. We even picked up a second Roku for the other TV.
Just about perfect
Overall, Netflix & Hulu Plus cover about 80% of everything I want to watch. We don’t have Amazon Instant right now. Hulu Plus is good, but the commercials have to go. I’d pay another $5 a month to be totally commercial free. Saturday Night Live is pretty much skit, commercial, skit, commercial. Plus, I like Big Bang Theory, so no CBS on Hulu also hurts a bit. The CBS website does cover that though.
The transition was pretty smooth. Our TV bill is now about 1/10th what it was before. We miss the DVR and select shows that aren't on Hulu Plus, but everything else is on demand anyways. There’s also plenty of children’s programming for our little guy. I have thought of getting an antenna and seeing what local channels get can get in HD. We haven’t quite gotten to that point yet, but maybe someday.