Your own parser possible with PEG.js
Building this blog
Wrong implementation of JS Object Comparer
How not to contact a developer to hire
What fast coding and bad algorithms have in common?
CanvasShapes - experimental implementation of multilayer canvas renderer
CanvasShapes - drawing Bezier curves
#Building this blog Why is it even important? I have no idea... but it's my blog after all, and I feel irresistible need of sharing few points. ###Font First thing I thought about was finding a good readable font. It took me a while but it paid off as I really like Kirvy. It's bit fancy but it doesn't negatively affect readability of the text itself. I should probably give credits to its [author](http://youssef-habchi.com) which I happily do. The website is taken from the licence file so should be accurate. The whole package can be downloaded from [here](https://www.behance.net/gallery/15706321/Kirvy-Font-Family). ###Graphic design. Or rather lack of it served my purpose very well. I was looking for a nice blog template on many different websites. I didn't mind paying for it, as blog must look good to drag someone's attention. But I didn't find anything I could look at for more than few seconds, so I designed and built it by myself. Design is an overstatement of course - the design existed only in my head, and there was never any sketch with wireframes or PSD created. ``GOLDEN`` In average you have only about 8 seconds to convince the user to stay on your website. ``END_GOLDEN`` You can read about it [here](http://www.sitepronews.com/2011/04/13/your-website-has-just-8-seconds/) and [here](https://www.getambassador.com/blog/you-have-8-seconds-to-engage-a-visitor-make-them-count). The claim is based on average adult's attention span, which is only around 8 seconds! I've read it [here](http://www.entrepreneur.com/article/232266), and even if it talks about email marketing, the rule still applies. Also the most usual pattern of scanning the website is eyeballing from top-left to bottom-right corner of the main page. So I thought - OK, if it's only 8 seconds, let's write something short along this diagonal, so user, who will surely not stay for longer, will at least subconsciously remember something. In case of my blog it will be couple of keywords and my name. Basic advertisement done! ###UX One of my fundamental design principles was to provide smooth experience with not many transitions, also avoiding redirects (pushstate rulez!). I know, it affects [SEO](https://en.wikipedia.org/wiki/Wikipedia:Search_engine_optimization), but you can work around it quite easily. Therefore lowering standards of user experience in favour of searchability doesn't seem right. Going back to [UX](https://en.wikipedia.org/wiki/User_experience_design), it's probably not perfect, and there is many issues to point out, but I like the general behaviour and won't probably change it for a while. ###SEO The crucial part of crawling operation is existance of sitemap.xml file, which provides many useful informations about a page: priority, update frequency, creation and last modification dates. On my blog this file is generated dynamically from the list of articles, so I don't have to remember about updating it when adding new article. Page uses [pushstate](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history#The_pushState()_method) mechanism, which means URLs look good (no weird hash character), but there is no standalone page for each article and crawler can have a hard time trying to access any content. To fulfill its curiosity (I need to care about all my readers, and this one will probably be the most loyal one!), whenever direct link to the article is used, I'm serving the article content in a div which is out of the viewport anyway. You don't see it but Google Crawler can read something too! ###Writing, storing and serving articles. Wordpess? Drupal? Joomla? [Other](http://www.1stwebdesigner.com/free-content-management-systems/)? No way... I used many content management systems in the past and observed one very common thing - some day every single one can limit you in some specific way from achieving what you really want... These are good if you don't have time or skills to work with HTML and CSS, but in my case it's a bit better. So... do you know [GitHub](https://github.com/)? GitHub is great for many reasons, but besides main value, what I'm finding really cool about it, is its ability to render [markdown](https://en.wikipedia.org/wiki/Markdown). Writing a readme file is really simple and fast without remembering about complex syntax rules. And this is why many (majority) articles on this blog are written purely in markdown and converted to HTML using [markdown-js](https://github.com/evilstreak/markdown-js) (I may write an article about it in the future). Some of them though, requiring fancy layout will then be written in HTML with inline CSS styles. For now all articles are loaded in one massive JSON when the page loads. It's not ideal but all the data is text so I wouldn't worry about that for now, especially that let's be honest - there are not many articles anyway... ###Bit more technical Believe me or not, but this is the first web project I've set up npm and bower for. Usually it was already there, and of course I knew how it works, but it's not the same as installing and setting it up by yourself. In bower all the packages are used in the latest version. I like having the newest stuff, especially when having backwards compatibility and supporting all the ancient browsers is not really my goal. The frameworks I use are RequireJS, Backbone, lodash and jQuery. I've also already said a word or two about MarkdownJS. Last things worth to mention is that all the CSS is being compiled using Sass, and code highlighting is done by [Prettify](https://github.com/google/code-prettify). That should be all in this subject. Other minor things I intentionally omitted as it was too much of a boring read anyway...