Thursday, July 31, 2008
Thursday, July 31, 2008 12:07:46 PM (SE Asia Standard Time, UTC+07:00) (WPF)

Just like Josh Smith I was looking around for some pre-rolled themes for WPF, and wondered why there was so little activity in this area. I would have thought the ability to take a professional looking UI (adjusted to match an organization's in-house style) would be a popular approach for building new business applications.

wpftheme Although there's quite a bit of work involved in creating a complete set of control templates (for all the required controls; textboxes, dropdowns, checkboxes, tab controls, lists, splitters, scrollers etc.) it can  be done (and it's a great way to learn WPF - even if you only override a few). Included here is a screen shot from my 'learning' WPF application in which I created a nearly complete control template set from scratch - including a custom toolbar strip, and dropdown/context menu system. What's more I give the user some options on basic color themes and backgrounds - just like Windows Live Writer does.

Commercially available themes must surely be on the way. Maybe they're just waiting for WPF adoption to reach higher levels, or perhaps visual designer support to improve. I'd estimate that it would take about 20 person days to complete a full theme set - and that's with a good graphic designer working with a good WPF developer together to assemble the theme.



| Comments [3] | | #  
Friday, July 18, 2008
Friday, July 18, 2008 5:18:34 PM (SE Asia Standard Time, UTC+07:00) (Books)

IMG_2179_02_s You know sometimes I wish I'd been a plumber...

Not all of these are cover-to-cover magnifying glass reads, and this is only a small part of my library - however these are currently at the top of the pile.

Linq in Action has so far been a brilliant book - and it will be a cover to cover careful read. CLR via C# is a must read for anyone that's been programming in .Net for more than a year or two (I'm thumbing through it for the 2nd time in my spare time). C# 3.0 in a Nutshell has so far proved to be an invaluable desktop reference and Joseph Albahari is a brilliant author.  What I particularly like about this book are the examples and gotchas included with every entry; much more than just MSDN in print and much better than an "I feel lucky" Google attempt. With ASP.Net 3.5  I was worried (like a lot of people) that this 1626 page tomb would be just the docs... in printed form; however it is a good combination of reference material and author input. Head First Design Patterns is really a fun read. I've opened other design patterns books, including the famous GoF Design Patterns and various C# flavors - but the format of the Head First series is just fantastic - humorous and educational.

The rest are a mixture of things I'm interested in, things I need to read to try and stay ahead of the avalanche, and things I'll need to read for my course.

Security Engineering (now in second edition) is a classic for anyone interested in computer security and should really be read in combination with Secrets and Lies from the very famous Bruce Schneier.



| Comments [0] | | #  
Wednesday, July 16, 2008
Wednesday, July 16, 2008 8:31:47 PM (SE Asia Standard Time, UTC+07:00) (C# | Visual Studio)

Yet another tool I've been late coming to - JetBrains ReSharper.

While working though Link in Action I was experimenting with ReSharper 4.0. So cool and extremely helpful when looking at delegates and lambdas.

Here's a delegate assignment..

Predicate<DateTime> isMinimum = delegate(DateTime input) { return (input == DateTime.MinValue); };

And here's the equivalent as a lambda..

Predicate<DateTime> isMinimum = input => (input == DateTime.MinValue);

And here's the ReSharper magic that converts from lambdas to delegates and back again...

resharper4



| Comments [0] | | #  
Monday, July 14, 2008
Monday, July 14, 2008 2:16:15 AM (SE Asia Standard Time, UTC+07:00) (Utilities)

Well - I admit it - apart from some installation batch files I wrote when I was a junior helpdesk guy a long time ago - I'm a bit of a late bloomer to the command line.

cmdI've got some time off over the summer before heading back to school in October - and so I've been working through a backlog of to-do items and small projects; the most important of which was finally getting up-to-speed with automated builds, testing and deployment using NAnt, MSBuild and the very cool WiX - which of course leads to the command line and editing build and batch files.

I know Notepad2 and Notepad++ are popular replacements for notepad in the hacking community - but I've become rather attached to EditPadPro - so that will do for now. I've renamed the .exe to ep.exe - and added the path to EditPadPro to my system wide path environment setting.

I also love this post from Scott - Prompt(s) along with PushD and PopD and the very cool prompt tip...

$P$_$+$G Which, when I set it via either the prompt command or the PROMPT environment variable, gives me a command line that looks like this:
C:\data\Projects\flexwiki\FlexWikiCore
++>

TAB AutoCompletion is hot too - and I honestly didn't know it was there. :-(

Last on my list of productivity improvements is a replacement for Windows Vista Explorer - and I'll be trying both Total Commander and [xplorer²] - because Windows Vista Explorer is driving me nuts.

Back to the command line and build scripts... :-)



| Comments [0] | | #  
Sunday, July 06, 2008
Sunday, July 06, 2008 11:56:46 AM (SE Asia Standard Time, UTC+07:00) (Hardware | Other Tech)

Update: In Search of The World's Best Computer Keyboard Part II

For a couple of years now - on and off, I've been trying to find the perfect small form factor mini size keyboard. Like David Bau in his own quest to find the World's Best Computer Keyboard, I came to the conclusion that I really don't want a full length, full size, 101 to 104 key keyboard on my desk. I rarely use the number pad, and when I do -  I don't mind it being separate.

My old keyboards I want my posture to be straight when I'm using my computer - from my back, to my shoulders, to my arms, wrists and hands. I found that when I was using a full size keyboard with a built-in number pad on the right, that the extra length on the right side of the keyboard was causing me to reach just a few inches further than I wanted to in order to use my mouse; just enough to change my posture - and enough for me to feel it in my shoulders and wrist when using my mouse.

So that started the search... and man did I search. I tried a bunch - including an expensive Cherry POS keyboard as well as the ThinkPad Travel UltraNav, but they were all far from perfect. The UltraNav in particular was a disappointment (it's up there in my little keyboard mountain) since it was nothing like the real ThinkPad keyboard in my notebook; the quality, key action and feel was very different.

I don't understand why PC users have such a poor choice in desktop keyboards. If you took the average manufacturer's PC desktop keyboard and tried to put it into a notebook, the notebook wouldn't sell. In fact it was while using my notebook that I realized my posture was better. Not only that but the keyboard in my notebook was so much better than my desktop - it was the famous IBM ThinkPad keyboard - the benchmark in notebook keyboards.

For a while I was using a Deck Legend - and I loved the key backlighting, but this was before my quest for a smaller keyboard. I actually contacted TG3 - the manufacturer of the Deck Legend, hoping that they might be about to update one of their current small form factor models, or possibly modify a BL82 for me into the standard Windows keyboard layout. I was prepared to pay. My keyboard is a tool I use for work, just like a tool any other professional would use in their job.

HP8150W    The first thing you'll discover when you start looking for small form factor keyboards is that there's a variety of different keyboard layouts. That was the first big stumbling block. I'm a CTRL-S freak. I hit CTRL-S for nearly every line I write, code or otherwise - so having the CTRL key in the usual position - bottom left - is important (although I confess I've 'adapted' when using my ThinkPad, which has a function key in the bottom left position - but that's my only complaint with the ThinkPad). The standard CTRL-Windows-ALT arrangement bottom left would be great, followed by, from the top right, down the right side - DELETE, HOME, PG-UP, PG-DN, END, and then the arrow keys. This is the layout used by most notebook manufacturers these days and it would be good to have a matching desktop and notebook keyboard. The HP 8150W (shown) has a good keyboard - although I whish they'd put the Function key to the right of the spacebar.

The other thing you'll discover when looking for a keyboard of any size - is that most of the models advertised online don't have a good quality larger version picture of the keyboard. It was pretty hard to figure out how the keys (especially top row keys) were arranged before shortlisting a keyboard for purchase.

I've also looked at the growing number of media keyboards that are slowly coming onto the market. The growth in home media centers means that more people are now actually looking for smaller (and wireless) keyboards - but again - quality, keyboard layout and in particular function keys vary a lot. I've looked at the Logitech diNovo Edge - which is just a fraction wide, and the key action wasn't quite what I was looking for - but it was close. Also the Microsoft Wireless Entertainment Desktop 8000 - another close call - but again, a little wide and poor function key support since the function keys are in a flat membrane key strip across the top.

Slimblade Media Set My current keyboard (and mouse) is the Kensington Slimblade Media Notebook Set. So very very close. The layout is almost perfect. I wish the function keys were full-size - but they work. Key action is superb and the closest so far I've come to feeling like I'm on a ThinkPad. The right side key arrangement is a little odd - with END at the top-right - followed by PG-UP, PG-DN, INSERT, DELETE and then the arrow keys. It's taken me a little while to get used to the DELETE key in this position. Still - this is the closest I've come to finding the perfect small form factor keyboard. Kensington have always made good quality accessories. Want to know why? Well I think it's because they make accessories for the Macintosh as well. And Mac users, having become accustomed to brilliant design and ergonomics, wouldn't tolerate a low quality accessory (in fact I popped into a local i-Studio Mac shop recently and saw a brushed aluminum small form factor keyboard that was just lovely).

So what would my dream small form factor keyboard look like? It would be matt-black brushed aluminum, use the keyboard layout shown in the HP8150W keyboard above - but with full size function keys. It would have illuminated keyboard characters (blue back-lit LEDs) and would totally rock in terms of quality and keyboard action. Until then... my Slimblade will do nicely. I may even give the IBM SpaceSaver II a try (as mentioned in David Bau's article) if I can find one.

While searching - I came across these two very expensive honorable mentions...

The Optimus Maximums from Art.Lebedev Studio. This is an incredible keyboard - would love to put my hands on one, and if they ever make a smaller version with a separate number pad - I'll buy it.

And then there's Datamancer - not sure whether to be scared, or in love with this stuff. Maybe when I'm wealthy, one day - I'll ask this guy to make me a keyboard (the equivalent of American Chopper for geeks - so cool).



| Comments [2] | | #  
Friday, July 04, 2008
Friday, July 04, 2008 1:05:17 AM (SE Asia Standard Time, UTC+07:00) (C# | Utilities)

Thanks to Alexander Groß for pointing me to syntaxhighlighter.  I still think Leo Vildosola's Code Snippet plugin and highlighter for Windows Live Writer is amazing. They're both good choices - but I thought I'd give syntaxhighlighter a try. It produces less markup than Leo's plugin, although it is dependant on a JavaScript lib on the site for the actual highlighting.

PreCodePlugin_Full_2.0.2 The only challenge in using syntaxhighlighter- is that unlike Leo's all-in-one solution - you need to work out a way to format and encode your snippets first, placing them in either a <pre> or <textarea> element. There are a couple of plugins out there that do this - but I wasn't thrilled with the results, and I've wanted to take a quick look at the WLW plugin API for a while now. Seems like everyone is having a go at this - including Rick Strahl.  So here is my attempt - a code snippet plugin for Windows Live Writer...

Scott also directed me to the Past As plugin on Codeplex - which I'll be trying out as well.

The result - using my plugin - and syntaxhighlighter on the site...

 

public override void CleanUp()
{
    //Remve the Async event listener
    AsyncTaskManager.ItemProcessComplete -= AsyncTaskManager_PreviewItemProcessed;
    this.Logger = null;
}
:-)


| Comments [0] | | #