Category: apps - apps and utilities

QGen Lite

QGen uses string.format to generate code. It can be replaced with T4 but still has its own charm.
I rewrote it today stripping it to bare essentials. You can also see it on gist.github.com
Read more »

IViewer is back

A part of me since December 2000, IViewer is the application I literally learnt VB6 with.
In 2006, I stopped working in vb6 and also stopped working on it.

Then one day I rewrote the basic navigation, wmp control player in VB.net. In 2008 I refined the search as you type feature. Still convinced the UI is one of the best there is, I recently began reviving development and am pleased to announce that playlists have been included.

You can see pictures heresetup here, and someday maybe code here.

wp: load posts in wp_list_categories

I believe a sitemap should show posts under categories, and maintain the category hierarchy.

wp_list_categories cannot be asked to include posts.
And if you follow this suggestion and try and use get_posts, you will get a nasty surprise; it will get all posts in all sub categories of the one you want. and this WILL NOT DO!

I found that you need this query and that you can inherit the category walker and pass that to the wp_list_categories method. Am impressed! Read more »

wp: back to toc

PS

I found a nice plugin for adding a table of contents to a post (like the wiki pages have)

However it had one limitation, there is no back to top link. Since we want to go back to the toc (which can be at the top / bottom), Ive called it the back_to_toc feature.

It has 3 options – not to show / show text / show image.

See snippets overleaf or explore the  code (line 559 of toc.php is where the real changes start). Or view it in action.
Read more »

cakephp baker

PS
I like the console app for cakephp which generates code, but have found the command line wizard a bit tedious. I’ve always dream’t of finding a nice gui for invoking a series of commands. Finally I set about writing one

You can download the zip here. Read more »

poc: version matrix

Im looking for a nice way to maintain inter-product dependancy matrix.

For example:
firebug
(v 1.4.5 for Firefox 3.0)

S#arp
( v 1.6 for VS 2008)

This should present data in a matrix format and have apis with codeplex, github etc)

wordpress theme – featured posts

PS

I’m modifying the wordpress plugin to include a custom Ordering and expose a method cs_get_featured_posts which wraps query_posts for use directly in a theme. I need this for letting the theme customize the results instead of simply using the widget provided in the original. Browse source.

Changelog

  • Add featuredOrder to the add_featured method.
  • add cs_get_featured_posts method.
  • hook the query_posts to include custom joins and order by to make it more readable than trying to pass all as parameters.

To Arrive at this, I had to try WP_DEBUG and realised that the suggested get_meta_sql doesnt work by looking at query.php. Read more »

QGen – Code Generator

QGen is a rapid code generator I’ve been developing since 2007.

I’ve used it in 5 real time projects and found the enhanced productivity a boon.

Features

  • csv (/ tsv) file driven. So content can be managed in Excel making full use of Excel formulae, find and replace. Excel makes a good substitute for Class Diagrams and this way code always stays in sync
  • Switch folders based on namespaces (by using Lookup Columns)
  • Control when not to use a particular line in generation.
  • Generate different types of classes following the same set of rows (just add additional columns). Usually I create entities, FluentNH maps, Dtos and Views. This makes viewing your entire code base as easy as looking at a single excel file.
  • Merge contents of multiple files into one. Read more »

web and orm framework

Orm

Entities and their maps are managed in Excel and generated using QGen.

  • Entity has Id and auditing columns (created / updated).
  • TableName, fieldNames and Captions are defined in an EntityMap.
  • DBManager (base class)
    • Generates Insert / Update based on Id = default or not.
    • Loads one / list using db reader given constructor as argument.
    • Fluently build DbCommand with sql string and named parameters.
    • Execute command with an expected rows to update and message to throw if rowcount not expected.

Read more »

FTP Synch Tool

A tool I wrote myself back in October 07, I find this a must have whenever I am working on a website. It tracks changed files and given a local and ftp base path, will upload all files.

It uses the following:

System.IO.FileSystemWatcher – to track modified files

FtpWebRequest – to create folders and upload / delete files

HttpWebRequest – additional feature to get response for a url. It can be used to quickly test / debug code. Especially when xml has errors and will not be shown in browsers.

Essentially a one-day-application, this version is highly user-unfriendly with un-seeable triggers for functions (see Log_KeyDown and Files_KeyDown).

The source code can be had here.