2012-12-09

Entries

One side effect of using Twitter Bootstrap's fixed navbar is that linking to specific IDs on a page (like /foo/#some_id) causes the element to be hidden by the navbar since browsers scroll that item to the top of the visible area.

#

I tried using Scrollspy provided by Twitter Bootstrap but that didn't seem to provide the functionality I wanted.

#

Instead I found helpful jQuery solution: jQuery scroll To Element.

#

Here's what I ended up using: $('html, body').animate({scrollTop: $(location.hash).offset().top - 60}, 500);

#

It feels like taking notes about these sorts of things helps me in two ways

#

a) It forces me to think them through a little more

#

b) It helps solidify the solution I find a little more too

#

I'm taking a stab at adding template defaults to Jekyll and looking at the Jekyll Cucumber Features is giving me some insight into how Cucumber makes writing feature specifications easier. I was previously confused about the value of having to write Cucumber specs and then step definitions for those specs but now I'm starting to see the flexibility and re-use.

#

So that's an example of how reading other people's code can be helpful, a suggestion I often see in books about software development.

#

Does Cucumber really only output stack level too deep when there's a problem with your spec? So far it has been a pain to debug what I'm doing wrong in the spec I'm trying to write.

#

Mainly I am missing required steps for what I'm trying to test but the error output doesn't help track that down at all.

#

Taking a break from Jekyll hacking as it's getting frustrating.

#

A Header

Wondering how headers look in a table format for breaking up dev notes.

#

I could also look for lines starting with #'s and close the current table and start a new one.

#

The tables offer a nice way to timestamp and link to specific entries which I don't think I want to give up.

#

Working Headers

Headers are working now but I'm still not sure if they make sense for this devlog. They require me knowing and stating that I'm thinking about something different from my previous entry. Or different enough to warrant a header.

#

I like how sourcefu's IRC-based serial approach doesn't allow for editing, even though I've gone back and fixed a few typos on things manually.

#

Guess I'll just leave the feature in for now and see if I like it or find it distracting.

#

It's also current a bit of a pain to use Markdown but then also add things like turning Headers into ID'd links/anchors.

#

TODO: Take a look at Kramdown, a superset of Markdown, which supports Specifying a Header ID.

#

Jekyll supports Kramdown, so that's good.

#

Test entry to see if sometimes headers end up inside table rows...

#

Something is causing that to happen but I'm not sure what yet.

#

Didn't make any more progress with adding default template layouts to Jekyll but it did inspire me to take another look at Cucumber and add The Cucumber Book: Behaviour-Driven Development for Testers and Developers to my Christmas wishlist.

#

And there's always the Official Cucumber Site.

#

Comments

comments powered by Disqus