Posts Tagged ‘programming’

Maine Power Outages Map

// March 5th, 2009 // 1 Comment » // Software and Web Design

Working in a NOC, I often consult the two Maine power companies that have online outage information (there is a third that does not have such a feature). If I see many circuits go down at the same time I’ll check to see if there is an outage in the area by checking both those websites, then going to Google maps to see how far away the sites are from the current outages. This is a tedious process and I finally decided to do something about it by creating my own Google map with their wonderful API. I’d never used it before so this proved a great way to learn how to use it as well. After setting up the screen scraping to pull info off the power companys’ websites, getting the app to do just what I wanted, and working around some minor speed bumps, it’s done!

powermap

Google’s API is quite easy to work with, and I’m very pleased with the results. For most people this map isn’t very useful, and at any one time there are only a few markers plotted on it, but for myself it will be quite useful, and it was a great learning process. You can view the Maine Power Outages map at http://euicho.com/power

Monospaced fonts CAN scale

// July 31st, 2008 // 2 Comments » // Software and Web Design

Like many programmers, I have a couple of favorite fixed-width “coding fonts” that I use for writing and viewing source code, however most of them are bitmap based and do not scale up “prettily” by any means.

Fortunately there are some great monospaced fonts that do scale up nicely. In my experience, it is important for me to use both my own favorite fixed-width fonts, and the great fixed-width ones below. This is because at small sized, most vector-based fonts like some below look fantastic at larger sizes, like on web pages or in print, but look fuzzy or blurry in the 8-12pt range in notepad++, gedit, etc. Conversely, my favorite bitmap based fonts only look good at one size, usually in the 8-10pt range, and are pixelated and blocky at larger sizes.

With that in mind, I present to you some smooth and delicious monospaced fonts that retain high legibility (slashed or dotted zeros, 1, l, I distinction, etc).

Inconsolata

The font that actually started me on this post was Raph Levien’s excellent Inconsolata. Spurred on by Luc(as) de Groot’s Consolas (below), Raph created a free and open source monospaced font that renders nicely at high resolutions, and looks great in print:

sample image of the inconsolata font

Inconsolata is still in development and lacks bold/italic styles, but is already in fine shape. Its major drawback is that it currently has no “hinting” support, so it doesn’t play well with Microsoft’s Clear Type technology. Everyone else should find it renders quite nicely, however.

Consolas

Developed by Luc(as) de Groot, Consolas is another nice-looking fixed-width font with good distinction between visually similar characters. Consolas is included in Windows Vista and MS Office 2007, and if you’re using only the included fonts on Vista its the only one with a slashed zero!

sample image of the consolas font

Consolas has full hinting instructions and works great with Clear Type.

Bitstream Vera Sans Mono

Bitstream Vera Sans Mono is a variant of Bitstream Vera. It was designed by Jim Lyles and also has full hinting instructions. Bitstream Vera was released for use under an open source license agreement with the GNOME Foundation, so all you free/OSS developers are good to go!

sample image of the bitstream vera sans monofont

I know Nyrath has his own custom made font, and it’s actually one I use frequently in notepad2 and notepad++. So, what are you guys’/gals’ favorite programming fonts? I’d love to know about any other monospaced fonts I’ve not come across yet.

Twoosh Spotter: A Greasemonkey Script

// November 14th, 2007 // No Comments » // Software and Web Design


EDIT (10/6/2009): Twoosh Spotter is now up to v2.0. I’ve fixed it so that the tweets shown after hitting the “more” button get checked for twooshes, and also fixed a bug where “&” was converted to “& a m p ;” and counted as 4 characters instead of 1.

I recently came across a new portmanteau on Twitter called a “twoosh” (TWitter swOOSH)!

Coined by rentzsch, A twoosh is a twitter that hits the 140 character limit exactly on the nose. This is just one of those fun little oddities that people like to play with, but unless the poster follows up their twoosh with another post pointing it out, the twoosh goes unnoticed by all but the equally twoosh endeared… and those with OCD.

To combat both OCD and unnecessary tweets by users calling out their own twooshes, I’ve created a Greasemonkey script that indicates twooshes called Twoosh Spotter!

Example of a spotted twoosh

Example of a spotted twoosh

Quite simply, Twoosh Spotter places a little swoosh icon next to any twoosh on any twitter page.

It will also display the character count for any twitter in a timeline if you:

  1. Right-click on the greasemonkey icon in your status bar and go to “Manage User Scripts”
  2. Select TwooshSpotter in the left pane and hit the “Edit” button. This should open it in notepad or your default text editor.
  3. Find the line that starts with “var show_count = false;” (line 33). and change the false to true.

Easy as 1,2,3! I debating turning this on by default but it may look a bit cluttered for some users so I went with the sleeker look.

So far this script seems to work great for me, but please do let me know if you find any bugs or strange behavior, or just want to make a suggestion. Also feel free to customize the script to your liking (but do leave mention of me in the source). If you don’t like my twoosh icon you can either make me a better one to distribute (please! I’m no graphic designer!) or just make yourself one and modify the script (replace that huge block of gibberish) to use your own.

To get twoosh spotter, go to http://userscripts.org/scripts/show/13873.

It’s new, so I’m sure to find issues and update it frequently. If you have any problems, go back to the userscripts page and check if there is a newer version. If not, leave me a comment there or direct-message me in twitter at my username “euicho”.

Now, for those of you who don’t know what greasemonkey is you should definitely get familiar with it, as it is one of the coolest ways to customize websites to your liking. Its a Firefox add-on, and once installed you can install little scripts that add functionality or modify the way a page looks.

If you just can’t be bothered to install greasemonkey you can always use the Twoosh Spotter Firefox Add-On (You’ll have to save it then drag it into firefox to install it), but I suggest using the greasemonkey script instead as it is more light-weight and easier to modify.

Happy twooshing!