CAREER OPEN HOUSE | 31st Jan, 7pm

We’re hiring Java and .NET Craftspeople in London & Barcelona. Come and meet us at our Career Open House on 31st January to learn more.

Highly Strung

This blog post is way overdue.

A couple of months ago, I wrote a talk entitled Highly Strung for the Virtual Java User Group (vJUG) on when and how to use strings in your code.

Spoiler: don't.

So this blog post is really just to ask you to check it out if you're interested. The link's up top, and has the talk in essay form, the slides and the video, lovingly recorded by the folks who run the vJUG.

Go on, check it out. I want to tell you something else, but afterwards.


OK, now the cool bit. Go back to that page and click on the "Presentation" link in the top-right corner, and watch as the page doesn't reload.

OK, funky JavaScript. Who cares?

Well, that's because the essay and the slides are the same HTML document (give or take). It's just markup and a little bit of JavaScript to get the ball rolling.

If you look at the HTML source of the document, you'll see that there are lots of <section> blocks. Each one is a slide in the presentation. Inside those are lots of <div> blocks with a class of notes. In presentation mode, these are hidden. And it's all Markdown under the hood, rendered by GitHub Pages, so it's just a static site.

And, well, that's about it. All that "Presentation" link does is change the CSS class on the <body> to tell the document to hide the notes (and show a few extra things), and load up reveal.js. Shiny, huh?

The only thing I'm missing is a way to get back to the essay form. Currently I reload the page, because there seems to be no way to unload reveal.js once it's loaded, but that's not so bad, y'know.

Codurance Hiring

We're hiring!

We are hiring Java and .NET Craftspeople in London and Barcelona

Enjoying this article?

Sign up to our monthly newsletter to get content like this in your inbox!

Codurance Logo

Software is our passion.

We are software craftspeople. We build well-crafted software for our clients, we help developers to get better at their craft through training, coaching and mentoring, and we help companies get better at delivering software.

Latest Blogs




Contact Us

15 Northburgh Street
London EC1V 0JR

Phone: +44 207 4902967

Carrer Aragó, 208
08011, Barcelona

Phone: +34 689 723 737

Email: hello@codurance.com