Software


6
Sep 07

Windows Live Writer Update

Updated releases of various "Windows Live" software packages include Beta 3 of Windows Live Writer. This is good. Unfortunately the install experience for WLW gets worse with each release. This latest update includes a Browser Helper Object (to help me sign into Windows Live – I don’t have an account) that requires me to allow it to interact with my computer each time I run Internet Explorer:

wllbho

Oh dear. This on top of the installer which tries to get me to install every other Windows Live software package just to get an update for Writer.

Fortunately Internet Explorer allows me to remove this Browser Hosing Object. Simply open the Options dialog (from Tools -> Options) and select "Manage add-ons" on the Programs page.

optionsmanageaddons

Then find the "Windows Live Sign-in Helper" add-on and select the Disable button:

disablestupidaddon

No more annoying UAC prompt for me! Hopefully this will be fixed for the next release, I really don’t need any Browser Helper Objects to allow me to use Windows Live Writer to post to my WordPress blog.


23
Aug 07

SourceFormatX

…is another code formatting tool, a bit like AStyle but it supports a whole bunch more languages including PHP and Assembly! I haven’t tried it myself, but came across it while searching for Programmer’s Notepad on tafiti. They have a nice page showing how to use SourceFormatX as a Programmer’s Notepad tool.

Link: SourceFormatX


21
Aug 07

Tools I Rely On – Those I Use From PN

HTML Tidy

Useful for both HTML and XML, Tidy provides formatting and cleaning of HTML/XML code. I most often use it to pretty print large streams of XML (like those Programmer’s Notepad uses for user settings) into a nicely indented document for readability.

AStyle - “Artistic Style”

This is an open source code formatter for C, C++, C# and Java source code. I use it to format code to the appropriate set of standards for whichever project I’m working on. Highly customisable, this is the recommendation for anyone asking for automatic code formatting in PN!

xsltproc - XSL Transform Processor

The linked site provides Win32 ports of the libxml XML processing libraries developed for the GNOME project. Xsltproc is a tool that comes with the library providing excellent command-line XSLT processing. I use xsltproc to transform the PN help documentation from Docbook XML into HTML Help files, and also generally when wanting to test transforms.

jslint

This tool is a syntax checker for javascript, I’ve often used it to find the un-obvious mistake hidden in my javascript code. The link is to a Windows Scripting Host runnable version.

NAnt

This is a .NET build tool (sort of a port of Ant for java, a good alternative if Java is your thing). I actually use NAnt for a whole bunch of things, not all build related. Basically NAnt runs an XML script which can draw from a whole bunch of very useful built-in tasks. There are very handy tasks for working with XML files and some nice powerful file copy/move/zip tasks too.

 

Also worth checking out: ASpell – Spell Checking


20
Aug 07

Tools I Rely On

Time to give kudos to the makers of some tools that I rely on for every day computer work – mostly development related.

Beyond Compare

from Scooter Software

One of the few pay-for tools on this list, I’ve been using Beyond Compare for years and find it essential. I’ve been very lucky in that I’ve always had Beyond Compare paid for by my job, but if I didn’t then I’d buy it straight away no questions asked – for $30 it’s a no brainer.

beyond-compare-screenshot

(screenshot shamelessly stolen from Jeff Atwood’s Blog – hope he doesn’t mind!)

The one thing missing is three-way merge which is coming later this year – apparently. Version 3 has been a long time coming so I’m not holding my breath. but when they do add this BC will be unbeatable.

Alternatives: Sourcegear’s DiffMerge (Free, and does 3-way merge) or WinMerge (Open Source)

PuTTY

PuTTY is an open source SSH and Telnet client, and comes with a whole bunch of other tools for secure socket communications. This is the only tool I need for administering remote Linux boxen. If you’ve only ever used the windows Telnet client, you need to try PuTTY.

WinSCP

winscp

WinSCP is a secure FTP (like FTP, but secured with SSH) client for windows build on the PuTTY code. It provides a great drag-and-drop interface and, of course, is open source. Before I found WinSCP I did all this stuff by hand using the PuTTY tools but this saves me a lot of time.

Baretail

When working with linux, I always have the handy “tail -f” command whenever I need to work with log files, and I’ve spent a lot of time watching log files! On Windows I was out of luck until I found the excellent BareTail. This is available both free and registered ($25 to disable the slightly annoying startup splash screen). Baretail allows you to track multiple changing files, with no file size limit that I’ve ever noticed, and also allows you to highlight multiple phrases in the files you’re watching. A picture tells a thousand words:

screenshot_baretail

There is also a professional BareTailPro version with even more features, and other useful tools available from the same site like BareGrep.

DbgView, ProcMon, ProcExp

– the SysInternals Tools

Everyone knows about the SysInternals tools, right?! Seriously there are so many day-to-day tasks that cause me to fire up one of the fine tools these folks produced that I don’t know where I’d be without them. Now bought by Microsoft the tools are all still available for free. Favourites definitely include:

DbgView – watch the OutputDebugString text stream

Process Monitor – watch registry and file access

Process Explorer – like Task Manager on steroids

TcpView – Monitor network connections

There are loads more, just view the whole collection on the above link.

Paint.NET

Like Paint, but:

It’s Much Much Better!
   Layers Support
   Proper Tools
   Unlimited Undo
   Plugins
   Great Effects
   Open Source (Written in .NET)

pdn310_car

I previously kept The Gimp installed for basic image editing tasks, but Paint.NET is much friendlier to use.

Python

For all my scripting needs and one-off data-wrangling tasks I use Python, these days with the added magic of Programmer’s Notepad’s Python Add-In.

Next up, tools that I use inside Programmer’s Notepad.


19
Aug 07

Amazon Discount on Programming Books

Some of my favourite programming books are going for bargain prices on Amazon.co.uk right now.


The Mythical Man Month

Pragmatic Programmer

Effective C++

These three come highly recommended, every programmer should have read at least the first two, and the third if C++ is your thing. There are plenty more on offer, all with at least 30% off. See the full list here:

30% or more off selected technology books at amazon.co.uk


17
Aug 07

Software Awards

Not worth the paper they’re not printed on?

This program does nothing at all - 5 stars

Andy Brice of SuccessfulSoftware.net ran a great experiment where he submitted a fake piece of software to hundreds of software listings and review web sites in order to prove his suspicion that many do not review their listed software at all.

The results, if unsurprising, are still very disappointing. Roughly 7% of the listings sites gave an award to the software (which doesn’t even run). 218 sites listed the software, including the details from its description file “This program does nothing at all. It doesn’t even run…”. At the time of writing, the submission was still pending at nearly 400 sites – perhaps more awards to come.

Read the full story on Andy’s Blog including details of many of the awards and links to some sites that actually did check the software and reject it.

The two review sites that seem to come out recommended as actually doing what it says on the tin are SoftPedia and MajorGeeks. Programmer’s Notepad did get a “Pick!” award from SoftPedia – hopefully not a meaningless one!


31
Jul 07

Regular Expressions Enhancements

Programmer’s Notepad currently uses two different regex engines for different parts of code:

  1. The excellent PCRE: Used by the PN code for matching output strings and in a couple of other internal bits of code.
  2. The tiny engine built into Scintilla. This is a very limited regular expressions engine, designed for embedded scintilla use rather than use in a full powered text editor. It’s currently used for all user regex searches.

The original plan was to switch to using PCRE as the engine for searching in the editor as well. However, PCRE has a rather unfortunate design issue – it expects its search string to be a char* in-memory buffer. Scintilla doesn’t provide access to the text you are editing as a single memory buffer (quite rightly) and so this means there is a fundamental incompatibility between Scintilla and PCRE. I could of course simply retrieve the entire document into an extra memory buffer and run PCRE on that but it’s a very wasteful solution and not one that I’m willing to entertain.

Other libraries work in a much nicer way, using iterators. This allows you to define a custom iterator to walk over Scintilla’s data store thus neatly avoiding the need to provide a full buffer to the regex engine.

Other libraries to consider:

  1. Boost::Regex: PN already has a boost dependency so I don’t have a big issue with adding regex. There are two current issues:

    a. Boost::Regex supports Unicode expressions by using ICU. Bundling ICU will add at least 1Mb of code (I’m still building it to find a total) to the distribution. This is a lot compared to the rest of PN!

    b. Currently Boost::Regex does not support named groups. This is an important regex feature that PN makes use of to support arbitrary output matching.

  2. GRETA: A regular expressions library from Microsoft that has similar features to that of Boost. This also doesn’t support named groups, and doesn’t seem to have UTF-8 Unicode support either, relying on wchar_t which is no use to PN.

Others I’ve discarded due to lack of iterator support include the one built into ICU, oniguruma, and GNU regex.

Currently I’m not 100% decided which way to go. There is a Google SOC project to add named groups to Boost::Regex which would at least remove that block, leaving only the expensive Unicode support. Alternatively I could try to retrofit iterators to PCRE – something that sounds like a lot of hard work!

One way or another, PN will transition to full regex support in the editor.

p.s. In the comments Sebastian points out the highly useful Wikipedia article comparing regular expression engines. This would have saved me a bunch of time if I’d found it earlier!


31
Jul 07

Facebook – why would you trust it?

I don’t subscribe to MySpace, Facebook, Friends Reunited or most other similar sites. Why? Because you are putting a huge amount of information about yourself in someone else’s hands. That someone else may not just be your friends, it could be the site administrators or possibly even complete strangers.

Just today at work, hundreds of Facebook users are being shown the inboxes of other users. It appears to be some kind of web caching issue caused by recent updates to Facebook. This is a huge breach of the privacy of each Facebook user affected. Fortunately it doesn’t show the contents of other pages, just the inbox but that’s still a big deal.

I’ll keep to keeping to myself thanks!


16
May 07

DejaVu Font

The free DejaVu fonts are based on the Vera Fonts from the Gnome project with support for a wider range of characters – available in TrueType form:

DejaVu Sans Mono 

This screen capture shows the Deja Vu Sans Mono font in Programmer’s Notepad


16
May 07

Do you get Regular Expressions?

If not, maybe you should spend a little time reading “The absolute bare minimum every programmer should know about regular expressions” from Mike.

Mike lays out a really nice introduction to regular expressions. Most of the constructs explained are supported in Programmer’s Notepad, a few are not currently supported. In the future I hope to eventually migrate to PCRE for the expressions. This will provide full Perl Compatible regular expressions.

I regularly use Regular Expressions in my daily programming and text editing work – if you’ve not yet grown to love them then spend some time trying them out for common editing tasks – you’ll know when you “get it”.