Word Wrapper

Many, if not most, programmers leave word wrap off by default when editing code. This is because line-breaks in code can have programmatic implications. Python, for instance, uses line-breaks to indicate the end of a statement. With word wrap enabled, coders may have a difficult time distinguishing between new lines created automatically by word wrap and new lines created intentionally by a carriage return.

That’s all well and fine when you’re working with actual code, but it doesn’t work so well with documentation meant to be written in plain English (or some other traditional language). On one hand, s single long horizontal line of text isn’t very readable — newspapers invented columns for a reason — and horizontal scrolling is a pain. On the other hand, manually inserting line-breaks into text isn’t much better. Adding or removing just one word at the beginning can require deleting and re-typing all of the newlines in a paragraph. And because documentation often lives in the same file as codeĀ  (i.e. as comments), most text editors apply the same word-wrapping scheme to both code and documentation.

Some text editors are smart about this and offer ways to automatically re-flow long blocks of text, but it doesn’t seem to be a universal feature in code editors. To help, I’ve put together a simple webpage that uses Javascript to convert long flowing word-wrapped paragraphs to a fixed width text. By default, it uses the industry standard width of 80 characters, but you can change that. You can also use the tool to automatically prepend each line with a characters (e.g. to insert a “#” character to conform to Python’s commenting requirements).

It also doubles as a way to convert fixed width multi-line text back to — e.g. the angle bracket quoted paragraphs in e-mails — back to a traditional word-wrapped single line of text.

You can use the tool here, or check out the source code on Github.

Remove Notes from Powerpoint (PPTX)

PowerPoint lets you add notes to each slide that are not visible when you play your PowerPoint as a slide show. Let’s say you want to remove all of those notes — e.g. so you can distribute the PowerPoint file — and don’t want to manually remove this all by hand.

If you’re using one of the newer versions of PowerPoint on a PC, this is straight-forward enough. You just pull up the Document Inspector and tell it to remove notes, along with other possibly sensitive metadata. Here’s how to do it in PowerPoint 2007 and PowerPoint 2010.

But let’s say you’re using a Mac. As far as I can tell, there’s no way to remove notes in PowerPoint for Mac 2011 (if there’s a way to do it, please let me know in the comments). You may be able to use some VBScript macros, but explaining scripting to someone with little technical experience can be difficult.

Continue reading “Remove Notes from Powerpoint (PPTX)”