<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Latest Misunderstandings</title>
	<atom:link href="http://misunderstandings.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://misunderstandings.wordpress.com</link>
	<description>Detailing efforts to develop effectively</description>
	<lastBuildDate>Sun, 01 Jan 2012 19:42:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='misunderstandings.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Latest Misunderstandings</title>
		<link>http://misunderstandings.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://misunderstandings.wordpress.com/osd.xml" title="Latest Misunderstandings" />
	<atom:link rel='hub' href='http://misunderstandings.wordpress.com/?pushpress=hub'/>
		<item>
		<title>iPod Shuffle</title>
		<link>http://misunderstandings.wordpress.com/2008/08/20/ipod-shuffle/</link>
		<comments>http://misunderstandings.wordpress.com/2008/08/20/ipod-shuffle/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 14:31:32 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Hardware and Future Tech]]></category>
		<category><![CDATA[ipod shuffle hardware gadget]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/?p=58</guid>
		<description><![CDATA[My wife won a silver iPod shuffle last week and since I&#8217;d recently washed my old-school shuffle, she kindly donated it to my personal charity. So what&#8217;s good about the 2G shuffle (can&#8217;t really call it new when it&#8217;s over two years old)? Well, to me the clip looked a little crap (over compensating macho [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=58&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My wife won a <a href="http://www.apple.com/ipodshuffle/">silver iPod shuffle</a> last week and since I&#8217;d recently washed my old-school shuffle, she kindly donated it to my personal charity.</p>
<p>So what&#8217;s good about the 2G shuffle <em>(can&#8217;t really call it new when it&#8217;s over two years old)</em>? Well, to me the clip looked a little crap <em>(over compensating macho side &#8211; thinking men don&#8217;t wear brooches) </em>and it seems to make it about twice as thick&#8230; Where were we, ah yes, what&#8217;s good?</p>
<p>Today I actually got around to using this thing, specifically walking to and from work listening to some of the <a href="http://blog.stackoverflow.com/index.php?feed=podcast">stackoverflow podcasts</a> which I find quite witty <em>(there&#8217;s a word you don&#8217;t hear enough these days)</em>. Back to the point, I picked up the shuffle and without further thought, started looking for something to clip it to.</p>
<p>After clipping on the shuffle, the best part was realising how short the included headphone cabling is. This makes a huge difference &#8211; instead of being the length of my 1.9 metre arm span, it&#8217;s closer to half that. Way less irritating time spent coiling and uncoiling.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/58/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/58/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=58&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2008/08/20/ipod-shuffle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Django desktop app</title>
		<link>http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/</link>
		<comments>http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 13:26:33 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/?p=51</guid>
		<description><![CDATA[Q. Why build a desktop application as a prototype if ultimately you&#8217;re aiming for a web service? A. If you need to get a couple of people in a corporate environment using your prototype ASAP. Thus you&#8217;ve got no time to play corporate politics, get a server from somewhere, get software licences, further budget to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=51&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Q. Why build a desktop application as a prototype if ultimately you&#8217;re aiming for a web service?</p>
<p>A. If you need to get a couple of people in a corporate environment using your prototype ASAP. Thus you&#8217;ve got no time to play corporate politics, get a server from somewhere, get software licences, further budget to get IT support for the application&#8230;. all this just to try out a concept? Nightmare.</p>
<p>So we&#8217;re back to building a desktop application. Right&#8230;?</p>
<p>But I couldn&#8217;t face building a nice layout, program flow and functionality into a desktop application and then throwing it all away &#8211; or worse having to maintain two unrelated versions down the track. Instead I wanted to try out django, so I&#8217;d need a database, web server, python and the django libraries all rolled up into a single executable. Make it runnable on a locked-down corporate windows xp piece of shit and for extra difficulty without admin rights or other software dependencies.</p>
<p><span id="more-51"></span>Searching&#8230;</p>
<p>Searching&#8230;</p>
<p>Led me to <a href="http://www.silverstripesoftware.com/blog/archives/51">Siddharta&#8217;s site</a> he was doing what I wanted but without the detailed instructions a simpleton <em>(me)</em> needs.</p>
<p>Eventually I also found <a href="http://www.jjude.com/index.php/archives/70">Joseph Jude&#8217;s</a> much more comprehensive version <em>(inspired by Siddharta&#8217;s original post)</em> &#8211; including a <a href="http://code.google.com/p/s-o-l/">code repository</a> of his application. This plus hours of messing around <em>(ah, sweet learning)</em> and I&#8217;ve got to a solution I&#8217;m reasonably happy with.</p>
<p>We get a single executable &#8211; plus some supporting files that can be distributed within a single zip file. Unzip and run &#8211; hell it&#8217;ll even start up your browser <em>(or add a tab in an existing browser window)</em>.</p>
<ul>
<li>No installation required.</li>
<li>No external software dependencies required <em>(based on windows xp sp2)</em>.</li>
<li>No administration account.</li>
<li>No hardware from the IT department.</li>
<li>No budget approvals, politics.</li>
<li>The euphoria of success <em>(past and future failures forgotten&#8230;. momentarily)</em>.</li>
</ul>
<h2>Software Dependencies</h2>
<h3>Required</h3>
<ul>
<li>Python 2.5.2</li>
<li>Django <em>(svn version at least 2008-06-05)</em></li>
<li>CherryPy <em>(web server)</em></li>
<li>Py2Exe</li>
</ul>
<h3>Optional</h3>
<ul>
<li>Docutils <em>(only necessary for documentation link)</em></li>
<li>PIL <em>(Python Imaging Library)</em></li>
<li>subversion</li>
</ul>
<h3>Configuration</h3>
<h4>Structure</h4>
<ul>
<li>PYTHONPATH/Lib/site-packages/django/</li>
<li>demosite/ <em>(django project)</em></li>
<ul>
<li>db/</li>
<li>templates/</li>
<li>fields/ <em>(any django application)</em></li>
<li>transformations/ <em>(any django application)</em></li>
</ul>
</ul>
<h3>Environment</h3>
<p>We&#8217;ve got a dependency on the PYTHONPATH environment variable pointing to your python bin directory.</p>
<h3>Files</h3>
<h4>build.bat</h4>
<p>Runs setup.py through Py2Exe, then waits for a key-press <em>(pause)</em> so you can see the multitude of error messages ;). Py2Exe will create a build directory to hold compiled files and do it&#8217;s processing, the files for distribution will <em>(in our case)</em> be in the setup directory.</p>
<h5>Code</h5>
<p><pre class="brush: vb;">
python setup.py py2exe
pause
</pre></p>
<h4>demosite.py</h4>
<p>This is the file that runs when the executable <em>(created with Py2Exe)</em> starts. A console window is shown with the exit message. CherryPy <em>(the python web server)</em> is configured to put log messages in the site.log file. CherryPy gets the django media directory &#8216;grafted&#8217; allowing it to serve the static content &#8211; CSS, JS and images. Start CherryPy and open a browser. Finally the program will close if the console window is close or by pressing CTRL-C or CTRL-BREAK <em>(KeyboardInterrupt)</em>.</p>
<p>Note that the following settings can be adjusted <em>(after deployment)</em> in the settings.yaml file &#8211; media directory, web server port and the url opened in your browser. Note that these can be hard-coded instead and avoid any modifications to the django settings.py file.</p>
<h5>Code</h5>
<p><pre class="brush: python;">
import os
import sys

os.environ[ 'DJANGO_SETTINGS_MODULE' ] = &quot;settings&quot;

import settings
from cherrypy import wsgiserver
import cherrypy
import webbrowser
from django.core.handlers.wsgi import WSGIHandler
from django.core.servers.basehttp import AdminMediaHandler

if __name__ == &quot;__main__&quot;:
  print 'To exit DemoSite close this window.'

  # Set up site-wide config first so we get a log if errors occur.
  cherrypy.config.update({
    'environment': 'production',
    'log.error_file': 'site.log',
    'log.screen': False,
  })

  # run CherryPy and open browser
  try:
    full_media_path = os.path.dirname( os.path.abspath( sys.argv[ 0 ])) + settings.ADMIN_MEDIA_PREFIX

    cherrypy.tree.graft(
      AdminMediaHandler(
        WSGIHandler(),
        media_dir=full_media_path
      ),
      '/'
    )
    cherrypy.server.socket_port = settings.WEB_SERVER_PORT

    cherrypy.server.quickstart()
    cherrypy.engine.start_with_callback( webbrowser.open, ( settings.START_URL, ), )

  except KeyboardInterrupt:
    cherrypy.server.stop()
</pre></p>
<h4>setup.py</h4>
<p>This is the big one, we&#8217;ve got a function add_path_tree that will add all the files and directories under a specified path &#8211; this is used to add the django admin templates and media contents and the local application templates and db.</p>
<p>Next up are the Py2Exe options. The massive include list is all the python modules <em>(used in the application)</em> that Py2Exe can&#8217;t auto-magically decide to include. Py2Exe won&#8217;t pick up on these because django dynamically decides which libraries to load at run-time. Finally the setup function pulls together the options, data files and defines that our executable will kick off demosite.py in console mode.</p>
<h5>Code</h5>
<p><pre class="brush: python;">
from distutils.core import setup
import py2exe
import os

def add_path_tree( base_path, path, skip_dirs=[ '.svn', '.git' ]):
  path = os.path.join( base_path, path )
  partial_data_files = []
  for root, dirs, files in os.walk( os.path.join( path )):
    sample_list = []
    for skip_dir in skip_dirs:
      if skip_dir in dirs:
        dirs.remove( skip_dir )
    if files:
      for filename in files:
        sample_list.append( os.path.join( root, filename ))
    if sample_list:
      partial_data_files.append((
        root.replace(
          base_path + os.sep if base_path else '',
          '',
          1
        ),
        sample_list
      ))
  return partial_data_files

py2exe_options = {
  'py2exe': {
    'compressed': 1,
    'optimize': 2,
    'ascii': 1,
    'bundle_files': 1,
    'dist_dir': 'setup',
    'packages': [ 'encodings' ],
    'excludes' : [
      'pywin',
      'pywin.debugger',
      'pywin.debugger.dbgcon',
      'pywin.dialogs',
      'pywin.dialogs.list',
      'Tkconstants',
      'Tkinter',
      'tcl',
    ],
    'dll_excludes': [ 'w9xpopen.exe', 'MSVCR71.dll' ],
    'includes': [
      ########
      # demosite imports
      'fields.models',
      'fields.views',
      #fields.urls
      'transformations.models',
      'transformations.views',
      #transformations.urls
      'audit',
      'urls',
      'manage',
      'settings',
      ########
      # mass django import
      'django.views.generic.list_detail',
      'django.template.loaders.filesystem',
      'django.template.loaders.app_directories',
      'django.middleware.common',
      'django.contrib.sessions.middleware',
      'django.contrib.auth.middleware',
      'django.middleware.doc',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.sessions.backends.db',
      'django.contrib.sites',
      'django.contrib.admin',
      'django.core.cache.backends',
      'django.db.backends.sqlite3.base',
      'django.db.backends.sqlite3.introspection',
      'django.db.backends.sqlite3.creation',
      'django.db.backends.sqlite3.client',
      'django.template.defaulttags',
      'django.template.defaultfilters',
      'django.template.loader_tags',
      'django.contrib.admin.urls',
      'django.conf.urls.defaults',
      'django.contrib.admin.views.main',
      'django.core.context_processors',
      'django.contrib.auth.views',
      'django.contrib.auth.backends',
      'django.views.static',
      'django.contrib.admin.templatetags.adminmedia',
      'django.contrib.admin.templatetags.adminapplist',
      'django.contrib.admin.templatetags.admin_list',
      'django.contrib.admin.templatetags.admin_modify',
      'django.contrib.admin.templatetags.log',
      'django.contrib.admin.views.auth',
      'django.contrib.admin.views.doc',
      'django.contrib.admin.views.template',
      'django.conf.urls.shortcut',
      'django.views.defaults',
      'django.core.cache.backends.locmem',
      'django.templatetags.i18n',
      'django.views.i18n',
      ########
      # also used by django?
      'email.mime.audio',
      'email.mime.base',
      'email.mime.image',
      'email.mime.message',
      'email.mime.multipart',
      'email.mime.nonmultipart',
      'email.mime.text',
      'email.charset',
      'email.encoders',
      'email.errors',
      'email.feedparser',
      'email.generator',
      'email.header',
      'email.iterators',
      'email.message',
      'email.parser',
      'email.utils',
      'email.base64mime',
      'email.quoprimime',
    ],
  }
}

# Take the first value from the environment variable PYTHON_PATH
python_path = os.environ[ 'PYTHONPATH' ].split( ';' )[ 0 ]

django_admin_path = os.path.normpath( python_path + '/lib/site-packages/django/contrib/admin' )
py2exe_data_files = []

# django admin files
py2exe_data_files += add_path_tree( django_admin_path, 'templates' )
py2exe_data_files += add_path_tree( django_admin_path, 'media' )
# project files
py2exe_data_files += add_path_tree( '', 'db' )
py2exe_data_files += add_path_tree( '', 'templates' )

setup(
  options=py2exe_options,
  data_files=py2exe_data_files,
  zipfile = None,
  console=[ 'demosite.py' ],
)
</pre></p>
<h2>Post-Deployment Settings</h2>
<p>So bundled it all up and sent it off to my co-developer &#8211; naturally it doesn&#8217;t work.</p>
<p>Foul language interlude.</p>
<p>Turns out that there was already a web server running on port 80 on the local host. Options reconfigure the settings to some weird port. Or allow custom settings &#8211; hmm, this might also allow my mythical user base to point to an arbitrary database.</p>
<h3>Files</h3>
<h4>settings.py</h4>
<p>This is the normal django settings.py horrible modified <em>(but for a good cause)</em> to allow settings to be modified after Py2Exe has done it&#8217;s work. Try to get them from db/settings.yaml if there&#8217;s a problem revert to a default value.</p>
<p>Why not just get people to edit settings.py?</p>
<ol>
<li>It&#8217;s a little more complicated than the small yaml file;</li>
<li>You can&#8217;t edit the file because it&#8217;s been bundled up as part of the Py2Exe build.</li>
</ol>
<h5>Code</h5>
<p><pre class="brush: python;">
import os
import yaml

# get settings from db/settings.yaml (if any missing all will default)
# this allows customising the database and web server details after deployment
config = {}
try:
  config_file = os.path.join( 'db', 'settings.yaml' )
  if os.path.exists( config_file ):
    config = yaml.load( file( config_file, 'r' ))
except:
  pass

def get_config( config_yaml, index, default='' ):
  try:
    return config_yaml[ index ]
  except:
    return default

DEBUG = get_config( config, 'debug', False )
TEMPLATE_DEBUG = get_config( config, 'template_debug', DEBUG )
DATABASE_ENGINE = get_config( config, 'database_engine', 'sqlite3' )
DATABASE_NAME = get_config( config, 'database_name', 'db/demosite.db' )
DATABASE_USER = get_config( config, 'database_user', '' )
DATABASE_PASSWORD = get_config( config, 'database_password', '' )
DATABASE_HOST = get_config( config, 'database_host', '' )
DATABASE_PORT = get_config( config, 'database_port', '' )
TIME_ZONE = get_config( config, 'time_zone', 'Australia/Melbourne' )
LANGUAGE_CODE = get_config( config, 'language_code', 'en-us' )

START_URL = get_config( config, 'start_url', 'http://localhost/admin/' )
WEB_SERVER_PORT = get_config( config, 'web_server_port', 80 )

ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# Absolute path to the directory that holds media.
# Example: &quot;/home/media/media.lawrence.com/&quot;
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: &quot;http://media.lawrence.com&quot;, &quot;http://example.com/media/&quot;
MEDIA_URL = ''

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: &quot;http://foo.com/media/&quot;, &quot;/media/&quot;.
ADMIN_MEDIA_PREFIX = '/media/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'aaaaaasn%1aaaaaaaaaaaaeaagd%1aaaaaa6*(ef()aag$&amp;f$%'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.doc.XViewMiddleware',
)

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
    # Put strings here, like &quot;/home/html/django_templates&quot; or &quot;C:/www/django/templates&quot;.
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
  'templates',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'fields',
    'transformations',
)
</pre></p>
<h4>settings.yaml</h4>
<p>A yaml configuration file that allows settings such as database and web sever ports to be changed after the Py2Exe bundling (deployment).</p>
<h5>Code</h5>
<p><pre class="brush: ruby;">
# Debug
debug: True
template_debug: DEBUG

# Database
# postgresql_psycopg2, postgresql, mysql, sqlite3 or oracle.
database_engine: sqlite3
database_name: db/demosite.db
database_user:
database_password:
# set database_host to empty string for localhost, not used with sqlite3.
database_host:
database_port:

# local time zone for this installation. choices can be found here:
# http://en.wikipedia.org/wiki/list_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# if running in a windows environment this must be set to the same as your
# system time zone.
time_zone: Australia/Melbourne

# language code for this installation. all choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
language_code: en-us

# Web Server
start_url: http://localhost/admin/
web_server_port: 80
</pre></p>
<h2>Works On</h2>
<ul>
<li>? Windows 2k</li>
<li>Windows XP SP2 (? SP3)</li>
<li>? Vista</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/51/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/51/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=51&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Fun of the build ~ part one</title>
		<link>http://misunderstandings.wordpress.com/2008/01/26/fun-of-the-build-part-one/</link>
		<comments>http://misunderstandings.wordpress.com/2008/01/26/fun-of-the-build-part-one/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 16:30:28 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Hardware and Future Tech]]></category>
		<category><![CDATA[8GB]]></category>
		<category><![CDATA[pc build]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/?p=40</guid>
		<description><![CDATA[As mentioned previously I was planning to put together a powerful new PC. Here&#8217;s the review of the process and the components used. Part two for bizarre customer service and product reviews. ~ coming soon Supplier selection Since my decision to use Overclockers UK was based almost solely on the wide range they provide with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=40&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As mentioned previously I was planning to put together a powerful new PC. Here&#8217;s the review of the process and the components used.</p>
<p>Part two for bizarre customer service and product reviews. <em>~ coming soon</em></p>
<h4>Supplier selection</h4>
<p>Since my decision to use <a href="http://overclockers.co.uk">Overclockers UK</a> was based almost solely on the wide range they provide with regard to high performance <em>(&#8216;enthusiast&#8217;)</em> parts ~ that is suckers like me. The hours I spent doing a rough price comparison of the various online suppliers was wasted.</p>
<p>There were some dramas with this supplier but I&#8217;ll get to that next time.</p>
<h4>Putting the pieces together</h4>
<p>I suggest, especially if you haven&#8217;t done this before, or don&#8217;t frequently build computers to <strong>a)</strong> <a href="http://www.urbandictionary.com/define.php?term=rtfm">RTFM</a>, <strong>b)</strong> step through a <a href="http://forums.anandtech.com/messageview.aspx?catid=27&amp;threadid=2072469">system building guide</a> <em>(I&#8217;ve not tried <a href="http://www.corsair.com/systembuild/report.aspx?report_id=12472">Cosair&#8217;s system build guide</a> one but apparently it&#8217;s good too)</em>.</p>
<p>If you can I&#8217;d highly recommend building in at least two stages. First build the motherboard, power supply, CPU, RAM and graphics card ~ attach a keyboard and screen and start. This will give you a chance to check <em>(the basic function of)</em> those 5 parts before you&#8217;ve screwed everything in the case, routed your power supply cables only to find that you have a faulty motherboard <em>(stage two)</em>.</p>
<p><span id="more-40"></span><br />
<h4>Troubleshooting</h4>
<p>Attempting to boot to the bios with just a few components plugged into the motherboard <em>(nestled on a few layers of cardboard)</em> resulted in no bios, nothing. However the motherboard had some status led with two numbers or in this case two dashes <em>(&#8211;)</em>.</p>
<p>Fair enough, I&#8217;ll switch off, re-check that I&#8217;ve plugged everything in and look-up the double dash code in the manual. Hmmm the manual has lots of status codes&#8230; just not the double dashes.</p>
<p>Google it, hmmm&#8230; not a good sign when your results for your search term bring back your search term + &#8220;of death&#8221;. The code just means the motherboard is choking on something. At this point I wasn&#8217;t thinking, gee lucky I didn&#8217;t screw everything down into the case and plug it all in <em>(but if it had all been screwed down, let&#8217;s say my frustration would have been exacerbated)</em>.</p>
<p>Next, I tested the motherboard without graphics card, without ram, and eventually removed the CPU only to discover that 1 of the socket pins was missing. Surely not, check, re-check, second opinion. Ha! It wasn&#8217;t missing at all, only bent right over so it was only visible at certain angles.</p>
<h5>New motherboard &amp; a couple of days later</h5>
<p>We have BIOS, and correctly detected CPU, 8GB RAM we&#8217;re in business. The remaining hardware installs smoothly. All good and hell even Vista x64 installed happily. Put all the drivers, firewall, anti-virus, etcetera on.</p>
<p>Crash, sick feeling.</p>
<p>Was it the Creative audio driver you just installed. Uninstall, boot ok a couple of times, crash, crash, crash, boots ok, ad infinitum.</p>
<p>Intermittent errors <em>(everyone&#8217;s favourite)</em>, probably one of the drivers or wait maybe it was one of the windows updates. Reinstall things slowly <em>(painfully slowly)</em> update windows a bit at a time. Insert your preferred superstitious activity.</p>
<p>Ok, ok, crash, ok, ok, crash.</p>
<p>Reinstall windows again, crash during installation. At this point the memory test succeeding was highly unexpected. Maybe it&#8217;s 1 of the memory sticks or slots on the motherboard that&#8217;s dead. Try a bunch of different configurations for the 2 sets of 2 memory sticks. Think I&#8217;ve figured out which one it was, only to find that it works ok in conjunction with a different stick.</p>
<p>Eventually notice / figure out that one 2GB stick alone is always ok <em>(really, not just intermittently)</em>.</p>
<p>Research issue. <a href="http://support.microsoft.com/kb/929777/en-us">Locate solution</a> ~ 4GB or more RAM plus driver used for optical SATA <em>(dvd-writer)</em> will give you intermittent blue screens of death <em>(again the &#8220;of death&#8221;)</em> just like you might expect if you had faulty memory. Install patch.</p>
<p>Seems to be working, but I&#8217;ve had my trust violated recently, a few more reboots&#8230; hope grows but you suppress it. </p>
<p>Now, four weeks later <em>(without issue)</em> I feel confidence returning &#8211; slowly ;).</p>
<h4>Images</h4>
<p>Since the original desk layout I planned would have taken over the half the living / kitchen area, I&#8217;ve accepted that I can survive <em>(for now)</em> with two of the 24inch screens. The third is used with the laptop.<br />
<a href='http://misunderstandings.files.wordpress.com/2008/01/puter-case-1024x768.jpg' title='Antec P182 Case'><img src='http://misunderstandings.files.wordpress.com/2008/01/puter-case-1024x768.thumbnail.jpg?w=468' alt='Antec P182 Case' /></a></p>
<p>The belly of the beast.<br />
<a href='http://misunderstandings.files.wordpress.com/2008/01/inside-the-case-1024x768.jpg' title='Inside the computer case'><img src='http://misunderstandings.files.wordpress.com/2008/01/inside-the-case-1024x768.thumbnail.jpg?w=468' alt='Inside the computer case' /></a></p>
<p>See this computer hobby hardly takes up any space.<br />
<a href='http://misunderstandings.files.wordpress.com/2008/01/puters-at-home-1024x768.jpg' title='Computers take over'><img src='http://misunderstandings.files.wordpress.com/2008/01/puters-at-home-1024x768.thumbnail.jpg?w=468' alt='Computers take over' /></a></p>
<h4>Final specification</h4>
<p>I ended up making some last minute / day changes to some of the components. Naturally my sole goal was to push up the price, ah, because I&#8217;m lazy and expense is an easy goal to kick.</p>
<p>Really I went to a <a href="http://anandtech.com/guides/">reputable review site</a>, read some guides on suggested components and modified my selection to exactly this:</p>
<table>
<tbody>
<tr>
<th align="left">Product Name</th>
<th>Qty</th>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=CA-070-AN"> Antec P182 Super Midi Tower Case &#8211; No PSU (Gun Metal Black) </a> 				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=CA-011-CS">Corsair TX 750W ATX2.2 <span class="st">SLI</span> Compliant PSU </a>  				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=CP-161-IN">  Intel Core 2 Quad Pro Q6600 &#8220;Energy Efficient SLACR 95W Edition&#8221; 2.40GHz (1066FSB) &#8211; Retail</a> 				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=MY-086-OC"> OCZ 4GB (2x2GB) PC2-6400C5 Dual Channel Vista Gold Series DDR2 (OCZ2G8004GK) </a> 				</td>
<td>2</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=MB-000-EA"> <span class="st">EVGA</span> nForce <span class="st">680i</span> <span class="st">SLi</span> (Socket 775) PCI-Express DDR2 Motherboard (122-CK-NF68-A1) </a> 				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=GX-071-OK"> OcUK GeForce 8800 GT 512MB GDDR3 HDTV/Dual DVI (PCI-Express) &#8211; Retail </a> 				</td>
<td>2</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=HD-036-SA"> Samsung SpinPoint T 500GB SATA-II 16MB Cache &#8211; OEM (HD501LJ) </a> 				</td>
<td>2</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=CD-092-SA">  Samsung SH-S203NBEBN 20x DVD±RW SATA Dual Layer Lightscribe ReWriter (Black) &#8211; OEM</a> 				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=SC-049-CL">  Creative Sound Blaster X-Fi Xtreme Audio 7.1 Sound Card &#8211; OEM (PCI) (30SB079200000)</a> 				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"></td>
<td></td>
</tr>
<tr>
<td style="vertical-align:top;">Peripherals</td>
<td style="vertical-align:top;"></td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=MO-026-OK"> OcUK Value L2442W 24&#8243; Widescreen LCD Monitor &#8211; Glossy Black </a> 				</td>
<td>3</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=SP-022-LG"> Logitech Z-2300 THX Certified 2.1 Speaker System </a> 				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=KB-115-LG">Logitech Cordless Desktop Wave &#8211; Retail </a>  				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=PR-107-CA">  Canon Pixma MP210 Multi-Function Printer/Scanner/Colour Copier ****£20 Cashback****</a> 				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=KB-109-LG">Logitech Cordless Desktop LX710 &#8211; Retail </a>  				</td>
<td>1</td>
</tr>
<tr>
<td style="text-align:left;" align="left"><a href="https://www.overclockers.co.uk/showproduct.php?prodid=SW-037-MS"> Microsoft Windows Vista Home Premium 64-Bit Edition DVD &#8211; OEM &#8211; 1Pk (66I-00788) </a> 				</td>
<td>1</td>
</tr>
</tbody>
</table>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=40&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2008/01/26/fun-of-the-build-part-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>

		<media:content url="http://misunderstandings.files.wordpress.com/2008/01/puter-case-1024x768.thumbnail.jpg" medium="image">
			<media:title type="html">Antec P182 Case</media:title>
		</media:content>

		<media:content url="http://misunderstandings.files.wordpress.com/2008/01/inside-the-case-1024x768.thumbnail.jpg" medium="image">
			<media:title type="html">Inside the computer case</media:title>
		</media:content>

		<media:content url="http://misunderstandings.files.wordpress.com/2008/01/puters-at-home-1024x768.thumbnail.jpg" medium="image">
			<media:title type="html">Computers take over</media:title>
		</media:content>
	</item>
		<item>
		<title>VBA parameterised string formatting</title>
		<link>http://misunderstandings.wordpress.com/2008/01/22/vba-parameterised-string-formatting/</link>
		<comments>http://misunderstandings.wordpress.com/2008/01/22/vba-parameterised-string-formatting/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 13:59:35 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[parameter]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[vba]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2008/01/22/vba-parameterised-string-formatting/</guid>
		<description><![CDATA[As far as I&#8217;m aware VBA doesn&#8217;t provide a decent way to create and use strings with parameters. So I rolled my own using (only the most basic part of) the c# syntax. Take a error message like: "You encountered error #2457897 in version 2.6.387 of the Sunshine CRM software. The application and your data [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=42&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As far as I&#8217;m aware VBA doesn&#8217;t provide a decent way to create and use strings with parameters. So I rolled my own using <em>(only the most basic part of)</em> the <a href="http://blog.stevex.net/index.php/string-formatting-in-csharp/">c# syntax</a>.</p>
<p>Take a error message like: <code>"You encountered error #2457897 in version 2.6.387 of the Sunshine CRM software. The application and your data must now die a horrible death."</code></p>
<p>In this application we&#8217;ve got a lot of error messages, around 2.5 million, I&#8217;d rather not have 2.5 million strings, or hard-code <code>"You encountered error " &amp; errorNum &amp; " in version " ...</code> etcetera. Or even just store the different parts of the message in separate strings.</p>
<p>It makes sense to have an error message template, a basic one in this case. Each variable part of the message / template is replaced with a squiggly brackets and a number <code>{0}</code>.</p>
<p>Our message from before, now: <code>"You encountered error {0} in version {1} of the {2}. The application and your data must now die a horrible death."</code></p>
<p><span id="more-42"></span><br />
<h4>Usage</h4>
<p><pre class="brush: vb;">
  Dim s As String
  s = &quot;You encountered error {0} in version {1} of the {2}. The application and your data must now die a horrible death.&quot;
  Debug.Print StringFormat(s, &quot;#2457897&quot;, &quot;2.6.387&quot;, &quot;Sunshine CRM software&quot;)
</pre></p>
<h4>Code</h4>
<p>If you&#8217;re wondering about the error handling of this code, the pushing and popping see the <a href="http://misunderstandings.wordpress.com/2008/01/11/hash-and-stack-in-vba-for-centralised-configuration-and-error-handling/">Hash and Stack</a> explanation.</p>
<p><pre class="brush: vb;">
Public Function StringFormat(ByVal forFormat As String, ParamArray params() As Variant) As String
On Error GoTo ErrorGoTo
  Util.PushStack &quot;StringFormat (&quot; &amp; Self &amp; &quot;)&quot;

  Dim i As Integer
  Dim formatted As String

  formatted = forFormat

  For i = LBound(params()) To UBound(params())
    formatted = Replace(formatted, &quot;{&quot; &amp; CStr(i) &amp; &quot;}&quot;, CStr(params(i)))
  Next

  StringFormat = formatted

ExitGoTo:
  Util.PopStack
  Exit Function
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Function
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=42&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2008/01/22/vba-parameterised-string-formatting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Hash and Stack in VBA for centralised configuration and error handling</title>
		<link>http://misunderstandings.wordpress.com/2008/01/11/hash-and-stack-in-vba-for-centralised-configuration-and-error-handling/</link>
		<comments>http://misunderstandings.wordpress.com/2008/01/11/hash-and-stack-in-vba-for-centralised-configuration-and-error-handling/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 12:48:52 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[vba]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2008/01/11/hash-and-stack-in-vba-for-centralised-configuration-and-error-handling/</guid>
		<description><![CDATA[Previously I wrote about an implementation for stacks and hashes** in VBA ~ these were used in an old Access project to give centralised error handling and access to variables (such as parameter based error strings) from a table. ** &#8211; As pointed out by Anon there isn’t really any significant benefit to rolling your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=41&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Previously I wrote about an <a href="http://misunderstandings.wordpress.com/2006/12/13/a-couple-of-supporting-class-modules-stacks-and-hashs/">implementation for stacks and hashes** in VBA</a> ~ these were used in an old Access project to give centralised error handling and access to variables <em>(such as parameter based error strings)</em> from a table.</p>
<p><ins datetime="00">** &#8211; As pointed out by Anon there isn’t really any significant benefit to rolling your own Hash &#8211; use the Scripting.Dictionary instead. Unless you need to avoid including extra libraries (Microsoft Scripting Runtime) or are working with something less than Office 2000 (apparently the runtime is also within windows 2000) in which case my sincere sympathy is with you.</ins></p>
<h4>Overview</h4>
<p>It works a little <em>(a lot?)</em> like this, put a <strong>stack</strong> and <strong>hash</strong> in a VBA module.</p>
<p>Then the <strong>stack</strong> can assist the error handling. At the start of each function push the function name onto the stack and just before leaving pop itself back off.</p>
<p>When an error is encountered the centralised error handling routine is called ~ this reports the error message <em>and</em> steps through the preceding function calls to show the chain of events leading up to the problem. This makes tracing back through relevant code to find the underlying cause much easier.</p>
<p>The <strong>hash</strong> <em>(or hash table)</em> provides lazy access to configuration variables and various strings including error messages. </p>
<p><span id="more-41"></span></p>
<h4>Stack ~ Error Handling</h4>
<p>When debugging it is often helpful to know where in the code the error occurred <em>(even if the issue started elsewhere)</em>. However because many sections of code are frequently re-used with different contexts and data it is additionally helpful to know not only the failing function, but the chain of preceding functions.</p>
<p>Adding a small section of code to the beginning and end of each function <em>(plus an error handler)</em> gives you this functionality and makes reporting runtime errors to your users more graceful.</p>
<h5>Start function</h5>
<p><pre class="brush: vb;">
On Error GoTo ErrorGoTo
  Util.PushStack &quot;ThisFunctionName (&quot; &amp; Self &amp; &quot;)&quot;
</pre></p>
<p>Note: The Self variable is the module or class name the function is from.</p>
<h5>End function</h5>
<p><pre class="brush: vb;">
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
</pre></p>
<p>See the code section at the end of this article for the full ErrorHandler code.</p>
<h4>Hash ~ Configuration and Strings</h4>
<p>Often it is useful to separate strings into a common location <em>(a database or per language strings file)</em>. This allows easier options for modifying text and the possibility of multi-language support. However it&#8217;s slow to head out to the database catch and hog-tie your string and bring it back every time you need to use it.</p>
<p>The alternative used here is a lazy hash table in the middle. Now, when you&#8217;re planning a string hunting trip we ask the hash if it&#8217;s got the variety of string we&#8217;re hunting. If so the string is handed over and no trip to the database ensues. If not, the same function that requests the string from the hash <em>(you call one function that deals with the hash and / or database without troubling you with the details)</em> hunts down that string in the database, brings it back and gives you and the hash a copy. Next time you ask the hash, your string will be waiting.</p>
<p>That&#8217;s all well and good for a read-only environment. However you&#8217;ll need an additional function to handle adding or updating strings. This function directly updates the database and the hash with the new string.</p>
<h5>Lazy or late</h5>
<p>There are two ways we could populate the hash: when the program starts we could populate it with every string in existence <em>(the ones we need anyway)</em>; or, the lazy / late way where we only populate it once it has been requested.</p>
<p>The choice is basically a memory size to speed trade-off.</p>
<h5>Limitations</h5>
<ul>
<li>You may also notice that if the underlying strings were changed by something or someone else we won&#8217;t get the update until we restart the application <em>(clearing the hash)</em>. If this is a concern there are a variety of strategies for <a href="http://en.wikipedia.org/wiki/Cache_coherency">cache coherency</a> that could be used.</li>
<li>Hashes / caches can also be useful to limit the memory footprint ~ the hash in this article doesn&#8217;t have any mechanism for controlling <em>(reducing)</em> its size.</li>
</ul>
<h4>New project</h4>
<p>I&#8217;m pulling out all this code again, because I think it&#8217;ll be useful for a little project I&#8217;m now doing in Excel. The main change I&#8217;ll need is different storage <em>(previously used an Access table)</em> for error message strings and configuration.</p>
<h4>Code</h4>
<p>It is worth pointing out that the stack functions can&#8217;t push and pop themselves onto and off of itself. But also that the error handling needs to be able to deal with an error occurring when getting the stack, otherwise we&#8217;ll end up in an infinite error handling loop.</p>
<p>This is also the same reason that the strings used in the ErrorHandling function are <em>not</em> looked up using the hash as we may already be trying to handle an error <em>caused</em> by the the hash.</p>
<p><pre class="brush: vb;">
Option Explicit

Private Const Self = &quot;Util&quot;

Private Hash As HashTable
Private Stack As Stack

Public Function GlobalHashTable() As HashTable
On Error GoTo ErrorGoTo
  Util.PushStack &quot;GlobalHashTable (&quot; &amp; Self &amp; &quot;)&quot;
  
  Set GlobalHashTable = Nothing
  If (Hash Is Nothing Or IsNull(Hash)) Then
    Set Hash = New HashTable
  End If
  
  Set GlobalHashTable = Hash

ExitGoTo:
  Util.PopStack
  Exit Function
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Function

Public Function GlobalStack() As Stack
On Error GoTo ErrorGoTo

  Set GlobalStack = Nothing
  If (Stack Is Nothing Or IsNull(Stack)) Then
    Set Stack = New Stack
  End If
  
  Set GlobalStack = Stack
  
ExitGoTo:
  Exit Function
ErrorGoTo:
  Util.ErrorHandler Util.GetVariable(&quot;GlobalStackFailure&quot;)
  Resume ExitGoTo
End Function


Public Function GetVariable(ByVal name As String) As String
On Error GoTo ErrorGoTo
  Util.PushStack &quot;GetVariable (&quot; &amp; Self &amp; &quot;)&quot;
    
  Dim qryDef As QueryDef
  Dim rs As Recordset
  
  GetVariable = &quot;&quot;
  If (Util.GlobalHashTable.Exists(name)) Then
    GetVariable = Util.GlobalHashTable.item(name)
	Else
		'This section reads from the configuration store (would need to be different for Excel)
	  Set qryDef = CurrentDb.QueryDefs(&quot;LocalSettingForVariable&quot;)
	  qryDef.Parameters(&quot;InputName&quot;) = name
	  Set rs = qryDef.OpenRecordset
	  If (Not IsNull(rs)) Then
	    If (Not IsNull(rs(0)) And Not rs.EOF) Then
	      GetVariable = rs(0)
	      Util.GlobalHashTable.item(name) = rs(0)
	    End If
	    rs.Close
	    qryDef.Close
	  End If
  End If
    
ExitGoTo:
  Util.PopStack
  Exit Function
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Function

Public Sub SetVariable(ByVal name As String, ByVal val As String)
On Error GoTo ErrorGoTo
  Util.PushStack &quot;SetVariable (&quot; &amp; Self &amp; &quot;)&quot;
  
	'This section writes to the configuration store (would need to be different for Excel)
  Dim qryDef As QueryDef
  
  Set qryDef = CurrentDb.QueryDefs(&quot;UpdateLocalSetting&quot;)
  qryDef.Parameters(&quot;InputName&quot;) = name
  qryDef.Parameters(&quot;InputValue&quot;) = val
  qryDef.Execute
  
  'Add or update in hash table
  Util.GlobalHashTable.item(name) = val
  
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub

Public Sub ErrorHandler(Optional ByVal Notes As String)
  Dim output As String
  
  output = &quot;Error #: &quot; &amp; err.Number &amp; &quot;, Description: &quot; &amp; err.Description &amp; &quot;&quot;
  If (Not IsNull(Notes) And Notes &lt;&gt; &quot;&quot;) Then
    output = output &amp; vbCrLf &amp; &quot;Notes: &quot; &amp; Notes
  End If
  'Special case: can't do a stack dump if the failure is in the global stack
  If (Notes &lt;&gt; Util.GetVariable(&quot;GlobalStackFailure&quot;)) Then
    output = output &amp; vbCrLf &amp; &quot;Stack Dump: &quot; &amp; Util.GlobalStack.StackDump
  End If

  MsgBox output, vbOKOnly, &quot;Error&quot;
End Sub

Public Sub PushStack(ByVal item As String)
On Error Resume Next
  Util.GlobalStack.Push item
End Sub

Public Function PopStack() As Variant
On Error Resume Next
  PopStack = Util.GlobalStack.Pop()
End Function
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/41/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/41/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=41&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2008/01/11/hash-and-stack-in-vba-for-centralised-configuration-and-error-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Limited company flat rate VAT scheme concession</title>
		<link>http://misunderstandings.wordpress.com/2007/12/21/limited-company-flat-rate-vat-scheme-concession/</link>
		<comments>http://misunderstandings.wordpress.com/2007/12/21/limited-company-flat-rate-vat-scheme-concession/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 16:03:11 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Micro Business]]></category>
		<category><![CDATA[flat rate scheme]]></category>
		<category><![CDATA[limited company]]></category>
		<category><![CDATA[uk]]></category>
		<category><![CDATA[vat]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/12/21/limited-company-flat-rate-vat-scheme-concession/</guid>
		<description><![CDATA[Flat Rate VAT Scheme Concession ~ This does not constitute advice of any kind. When buying a computer for a limited company ~ treating it as a business expense means that no company tax is paid (since that&#8217;s for profits only) and shareholders don&#8217;t end up indirectly paying income tax on that expense either (when [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=39&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Flat Rate VAT Scheme Concession</h4>
<p> ~ <strong><em>This does not constitute advice of any kind.</em></strong></p>
<p>When buying a computer for a limited company ~ treating it as a business expense means that no company tax is paid <em>(since that&#8217;s for profits only)</em> and shareholders don&#8217;t end up indirectly paying income tax on that expense either <em>(when dividend time comes around)</em>.</p>
<p>My limited company is using the Flat Rate VAT scheme. This means a flat 12-13% <em>(for IT consulting ~ varies by industry)</em> of all revenue is paid to HM Revenue &amp; Customs.</p>
<p>The point of this scheme is to simplify things for small businesses.</p>
<p><span id="more-39"></span>Normally for VAT <em>(or GST in Australia)</em> when James Jamieson CEO of FD Limited company buys some very large fuzzy dice from its suppliers in Bristol for £43 <em>(or £36.60 excluding VAT)</em> it gets a VAT <strong>credit</strong> of £6.40. JJ takes his fuzzy dice to a London market and sells the set for £60 <em>(£51.06 excluding VAT)</em>; VAT <strong>debit</strong> of £8.94. Ultimately FD Limited pays the difference of £2.54 to HM Revenue &amp; Customs.</p>
<p>The relatively high cost / low benefit of keeping track of all these VAT tax credits and debits for small businesses led to the option of the VAT Flat Rate scheme. For JJ this means he just works out how much he has made in total from fuzzy dice ~ £16,000 <em>(fuzzy dice sales go through the roof every February)</em> ~ and applies a flat rate 6% <em>(varies by industry in reality)</em> meaning he pays £960 in total VAT.</p>
<p><em>The VAT Flat Rate scheme is optional so if it&#8217;s not beneficial ~ don&#8217;t use it. In JJ&#8217;s case it works out that he&#8217;d be better off keeping records for all of the 266 and two thirds dice sold at a net VAT debt of £2.54 per set. FD Limited would only pay HM Revenue &amp; Customs £677.33.</em></p>
<p>Now there is an exception that proves the rule. If FD Limited purchases a capital item for more than <a href="http://www.hmrc.gov.uk/manuals/bimmanual/bim31585.htm">£2,000 then the VAT credit can be claimed</a> while keeping the flat rate scheme for everything else.</p>
<p>This is the theory behind my total &#8216;cost&#8217; for a shareholder in this company ~ for large equipment purchase.</p>
<ul>
<li><strong>£2,228.81 Starting cost.</strong></li>
<li><strong>- 331.95 VAT component</strong> ~ <em>since it&#8217;s a capital asset over £2,000 the company can claim back the VAT while remaining in the VAT flat rate scheme ~ (17.5% x £2,228.81)</em>.</li>
<li><strong>- 379.37 Company tax reduction</strong> ~ <em>tax the company would have paid if this money had been kept as profit ~ (20% x £1,896.86)</em>.</li>
<li><strong>- 379.37 Income tax reduction</strong> ~ <em>tax the individual would pay, in income tax, if this money had been paid as a dividend, assuming annual income over £34,600 ~ (25% x £1,517.49)</em>.</li>
<li><strong>£1,138.12 Actual shareholder impact</strong> ~ <em>net cost to the shareholder of this company purchase.</em>
</ul>
<p>Anyway this is roughly one half or 51% of the full cost.</p>
<p>The moral of the story?</p>
<p>If your small business is purchasing a capital asset worth anywhere near £2,000 you may want to consider the additional tax benefit that occur at £2k. Or at least its much easier to justify, in your head, getting something shiny if your shareholders only pay for half.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/39/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/39/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=39&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/12/21/limited-company-flat-rate-vat-scheme-concession/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Buying computer components online in the UK</title>
		<link>http://misunderstandings.wordpress.com/2007/12/17/buying-computer-components-online-in-the-uk/</link>
		<comments>http://misunderstandings.wordpress.com/2007/12/17/buying-computer-components-online-in-the-uk/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 15:10:24 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Hardware and Future Tech]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[parts]]></category>
		<category><![CDATA[watercooling]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/12/17/buying-computer-components-online-in-the-uk/</guid>
		<description><![CDATA[The Point So what&#8217;s the point of putting together a machine yourself? Well it can be very difficult to get precisely the set of components you want in a pre-built machine. But most small shops have the facility to put together any selection of your parts ~ eliminating that feeble justification. Pre-built Put together by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=36&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>The Point</h4>
<p>So what&#8217;s the point of putting together a machine yourself?</p>
<p>Well it can be very difficult to get precisely the set of components you want in a pre-built machine. But most small shops have the facility to put together any selection of your parts ~ eliminating that feeble justification.</p>
<p><strong>Pre-built</strong><br />
Put together by someone with the right experience, right equipment etcetera. They&#8217;ll usually do some basic testing to check that all the components work.</p>
<p>That leaves you with minimal chance of wasting hours tracking down that malfunction in part X. Or that sinking feeling when you hit the power switch and nothing happens. So you try a different power supply and blow up my aunt&#8217;s motherboard ~ a sad but true story of how I screwed a motherboard directly to a metal case <em>(without spacing screws)</em> and got that smelly spark of short-circuited electronics.</p>
<p><strong>Build it yourself</strong><br />
We&#8217;ve got the costs to:</p>
<ul>
<li>Your time <em>(face it you&#8217;re going to be slower and more error-prone than Mr. Simmons at the computer store whose life consists of the monotony of plugging together motherboards and power supplies)</em>.</li>
<li>Risk of dodgy parts <em>(the many sad days looking at your heap of incompleteness ~ to send back and have replaced)</em>.</li>
<li>Risk of screwing things up yourself.</li>
</ul>
<p>In that case what&#8217;s the point of putting this together myself?</p>
<p>Well in the case of the short-circuited motherboard I now know that some cases come with mounting screws pre-installed and others don&#8217;t. Sure a minor detail but it gives others a good laugh. Seriously though, it ends up making me think more about underlying machine, the electronics <em>(which are abstracted away by the time you&#8217;re writing a blog post)</em>, the physics that are obvious ~ metal on metal equals electric current flow.</p>
<p>Also there&#8217;s the pride of completing something ~ even something that others might find simple. Seems a lot like scale model building <em>(and similar hobbies)</em> ~ the parts are designed to be put together. Yet, there&#8217;s still something in taking those bits and making a whole.</p>
<p><strong>Overclock / Watercool</strong><br />
Since I&#8217;ve put together around 5 machines it might be time to try something harder and hopefully learn more. Also I can possibly get a slightly quieter machine &#8211; but realistically it&#8217;ll just be more challenging / complex <em>(problematic)</em> to play with.</p>
<p><span id="more-36"></span></p>
<h4>Supplier Options</h4>
<p>It&#8217;s generally cheaper to buy online so what are my options in the UK?</p>
<p>After trawling some forums, since I&#8217;m not a native, I came up with this list of options:</p>
<ul>
<li><a href="http://www.overclockers.co.uk">Overclockers UK</a></li>
<li><a href="http://www.microdirect.co.uk">microdirect</a></li>
<li><a href="http://www.scan.co.uk">Scan Computers</a></li>
<li><a href="http://www.ebuyer.com">eBuyer</a></li>
<li><a href="http://www.gladiatorcomputers.com">Gladiator Computers</a></li>
<li><a href="http://www.saverstore.com">Saverstore</a></li>
<li><a href="http://www.cclonline.com">CCL</a></li>
</ul>
<h4>The Specification</h4>
<p>Sketch of likely parts for the build:</p>
<ul>
<li><strong>Processor</strong> ~ x 1</li>
<ul>
<li>Intel Core 2 Quad Pro Q6600 &#8211; Retail</li>
</ul>
<li><strong>Motherboard</strong> ~ x 1</li>
<ul>
<li><em>Further Research Required!!</em></li>
</ul>
<li><strong>Memory</strong> ~ x 2</li>
<ul>
<li>Geil 2GB (2x1GB) PC2-6400C5 800MHz Value DDR2 Dual Channel Kit GX22GB6400DC</li>
</ul>
<li><strong>Graphics</strong> ~ x 2 <em>(hoping to switch between SLI for a single screen and disabled to drive 3 screens)</em></li>
<ul>
<li>Asus GeForce EN8800 GT 512MB GDDR3 HDTV/Dual DVI (PCI-Express) &#8211; Retail</li>
</ul>
<li><strong>Hard Drive</strong> ~ x 2+</li>
<ul>
<li>Samsung Samsung SpinPoint T 500GB SATA-II 16MB Cache &#8211; OEM HD501LJ</li>
</ul>
<li><strong>Optical Drive</strong> ~ x 1</li>
<ul>
<li>Samsung 20x DVD±RW SATA Dual Layer Lightscribe ReWriter SH-S203NBEBN</li>
</ul>
<li><strong>Sound Card</strong> ~ x 1</li>
<ul>
<li>Creative Sound Blaster X-Fi Xtreme Audio 7.1 Sound Card &#8211; OEM (PCI-Express) 30SB082000000</li>
</ul>
<li><strong>Case</strong> ~ x 1</li>
<ul>
<li>Antec P182 Black Super midi case (No PSU) ATX</li>
</ul>
<li><strong>Power Supply</strong> ~ x 1</li>
<ul>
<li>Corsair HX 620W ATX2.2 Modular SLI Compliant PSU CMPSU-620HXUK</li>
</ul>
<li><strong>Monitor</strong> ~ x 2</li>
<ul>
<li>Acer 24&#8243; Widescreen LCD Monitor Black 2416WB</li>
</ul>
<li><em>Alternative Monitor</em> ~ x 1</li>
<ul>
<li>Dell 30&#8243; Widescreen LCD Monitor Midnight Grey 3007WFP-HC</li>
</ul>
<li><em>Other Alternative Monitor</em> ~ x 3</li>
<ul>
<li>Value OcUK Value 24&#8243; Widescreen LCD Monitor &#8211; Glossy Black L2442W</li>
</ul>
<li><strong>Keyboard / Mouse</strong> ~ x 1</li>
<ul>
<li>Logitech Cordless Desktop Wave &#8211; Retail</li>
</ul>
<li><strong>Speakers</strong> ~ x 1</li>
<ul>
<li>Logitech THX Certified 2.1 Speaker System Z-2300</li>
</ul>
</ul>
<p>And <em>necessary</em> peripherals:</p>
<ul>
<li><a href="http://www.ergotron.com/Products/tabid/65/ctl/Product/mid/387/PRDID/134/language/en-GB/default.aspx">Ergotron LX Dual Desk Mount Arm</a> ~ x 2 <em>(I prefer the black. That&#8217;s two sets of two arms, 3 screens and 1 laptop all up in the air)</em>.</li>
</ul>
<p>And wild possibilities <em>(if the options above weren&#8217;t wild enough)</em>.</p>
<ul>
<li>Watercooling ~ for me this is a little outlandish. I&#8217;m not even clear on exactly what parts I need.
<ul>
<li><strong>Pump</strong> ~ make the water go around in circles between the bits that heat the water up <em>(cpu, gpu, etcetera)</em> and the radiator the cools it back down.
<li><strong>Radiator</strong> ~ a chunk of metal whose purpose is to cool the water.</li>
<li><strong>Fans</strong> ~ blow air across that chunk of metal <em>(radiator)</em> to actually disperse the heat.</li>
<li><strong>Tubes</strong> ~ connect the dots.</li>
<li><strong>Blocks</strong> ~ stick this onto your cpu, gpu where the heatsink and fan used to live.</li>
<li><strong>Fluid</strong> ~ you didn&#8217;t think water came from the sky <em>(tap)</em>, did you?</li>
<li><strong>Reservoir</strong> ~ water tank, no fishing.</li>
<li><strong>Connectors / Barbs</strong> ~ presumably to attach tubing, but I&#8217;m not clear exactly what I need here.</li>
</ul>
</li>
</ul>
<p><em>Next week, costing these suppliers and finalising parts.</em></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=36&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/12/17/buying-computer-components-online-in-the-uk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Laptop repairs continue</title>
		<link>http://misunderstandings.wordpress.com/2007/12/07/laptop-repairs-continue/</link>
		<comments>http://misunderstandings.wordpress.com/2007/12/07/laptop-repairs-continue/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 15:08:18 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Hardware and Future Tech]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[graphics card]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[motherboard]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[warranty]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/12/07/laptop-repairs-continue/</guid>
		<description><![CDATA[Return of the Streak Horrendously a mere 24 hours after my laptop was repaired, the exact same issue reoccurred. Blank screen, streaking in the bios. Only difference was that it remained slightly intermittent before settling into permanent failure. I was now in possession of a box of rewritable CDs and thus able to boot in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=35&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Return of the Streak</h4>
<p>Horrendously a mere 24 hours after my laptop was repaired, the exact <a href="http://misunderstandings.wordpress.com/2007/11/30/avoid-1-year-laptop-warranties/">same issue</a> reoccurred.</p>
<p>Blank screen, streaking in the bios. Only difference was that it remained slightly intermittent before settling into permanent failure.</p>
<p>I was now in possession of a box of rewritable CDs and thus able to boot in Dell&#8217;s diagnostic environment to confirm the guilt of the graphics card. Specifically the video memory was failing quite spectacularly.</p>
<h4>Possible Causes</h4>
<ul>
<li>Something apart from the motherboard causing the rapid death of the video card&#8217;s memory. Another component: battery, power supply? ~ <strong>Doubtful</strong>, especially given that no changes have been introduced in these areas in the past 2-3 months.</li>
<li>The technician managed to accidentally put back the old video card instead of the new one? ~ <strong>Highly improbable.</strong></li>
<li>The graphics card doesn&#8217;t physically contain the video memory <em>(NVIDIA GeForce 7900GS 256MB)</em>? ~ <strong>If so I&#8217;ve not heard of such a set-up.</strong></li>
</ul>
<p><span id="more-35"></span><br />
<h4>Further Repair</h4>
<p>Actually Dell has one of those feel-good policies where they call you back a day or so after the repair to check that everything is ok. Upon describing my situation the support guy was equally perplexed and he made noises about how he&#8217;d put through the previous repair as a special case <em>(Australian laptop in the UK)</em> but would check with the warranty team <em>(no idea what a warranty team does)</em> to authorise another repair.</p>
<p>The plus side is the laptop is still partially functional with the graphics drivers uninstalled <em>(I&#8217;m not clear if this is a low memory usage state for the graphics card? Or something else?)</em> at a resolution of 1600&#215;1200 16 bit colour *sob* <em>(rather than the native 1920&#215;1200 32 bit colour)</em>.</p>
<p>Apparently, I&#8217;ll hear today the verdict from the warranty team. In the mean time I&#8217;ve started the transfer of the laptop from Australia to UK ~ 20 business days. Around a month, madness. Perhaps I just don&#8217;t understand what&#8217;s required to update name and address details in a system.</p>
<p>I mean I can still use my laptop for most tasks, obviously gaming or full colour are out, so I&#8217;m not that concerned about repairs taking a couple of extra days. However the main concern is that the underlying cause hasn&#8217;t been identified and throwing hardware at the problem is unlikely to stop it reoccurring.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=35&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/12/07/laptop-repairs-continue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Avoid 1 year laptop warranties</title>
		<link>http://misunderstandings.wordpress.com/2007/11/30/avoid-1-year-laptop-warranties/</link>
		<comments>http://misunderstandings.wordpress.com/2007/11/30/avoid-1-year-laptop-warranties/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 23:38:16 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Hardware and Future Tech]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[graphics card]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[motherboard]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[warranty]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/11/30/avoid-1-year-laptop-warranties/</guid>
		<description><![CDATA[Problem Switched on my laptop the other morning, before preparing a habitual bowl of cereal, and returned to find a blank screen despite a happily glowing power LED. Hmmm, I flipped the switch to restart. Watching everything, closely now, I notice to my dismay that there is a series of yellow green dots in columns [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=33&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4>Problem</h4>
<p>Switched on my laptop the other morning, before preparing a habitual bowl of cereal, and returned to find a blank screen despite a happily glowing power LED. Hmmm, I flipped the switch to restart. </p>
<p>Watching everything, closely now, I notice to my dismay that there is a series of yellow green dots in columns appearing over the intital bios screen on boot. It continues during the display of the windows progress logo, after which instead of the normal login screen greeting me there&#8217;s nothing. Blank nothingness. As I restart for a second time, I note the whirring sounds that I associate with windows shut-down ~ interesting.</p>
<h4>Debug</h4>
<p>After my first calm moment of thought: I consider that this probably isn&#8217;t some software incompatibility or horrendous virus. Although the most likely culprit is the graphics card, the next easiest suspect to eliminate is the screen.</p>
<p>Hitting F8 after the bios posts <em>(shivering at the sight streaked white through the options text)</em> I start up in safe mode. Success, hmmm, no streaking at all, perhaps the graphics card is ok after all.</p>
<p>Check out device manager, nothing out of place, unrecognised or the like. I take the opportunity to remove some recent software installs <em>(although, this is probably less debugging and more prayer)</em>. System seems stable in safe mode. Reboot number three.</p>
<p>No change.</p>
<p><span id="more-33"></span>Bounce back to windows safe mode, uninstall NVIDIA&#8217;s drivers.</p>
<p>Restart <em>(5)</em>. Further success <em>(well, if you ignore the sinking feeling that the continuing  streak of bios and windows causes)</em> we have clean and clear screens at a substantially reduced screen resolution.</p>
<p>Google <em>(yes, that word has almost superceded &#8216;find&#8217; or &#8216;search&#8217; when looking for something online)</em> for streaking issues. Little of relevance; download latest stable NVIDIA drivers <em>(hmmm, did I say recent? For the GeForce Go 7900GS mobile chip ~ 5th July 2006 [2006-07-05] ~ <a href="http://www.nvidia.com/object/winxp_2k_mobile_84.63_2.html">version 84.63</a>)</em>.</p>
<p>Reinstall graphics driver, installing&#8230; Yes, I want to install in spite of it not being certified by XP&#8230; blah blah&#8230; Black screen of nothingness. Ok, so we&#8217;re back to driver incompatibility <em>(ignoring the bios bit)</em> or faulty graphics hardware.</p>
<p>Revisit safe mode; Dell website for specially wrapped and approved NVIDIA drivers. No progress. <em>(Let&#8217;s call it 10 more reboots.)</em></p>
<h4>Warranty &amp; Support</h4>
<p>Sounds like a support call is in order; which is probably the first time one begins to wonder exactly when one bought said equipment and under which of the multitude of warranties does it fall?</p>
<p>As it turns out the laptop was purchased around 1 year 6 months ago. Fortunately, because of some combination of special offers on warranty deals and laptop hardware paranoia; I had opted for a 3 year next day on site warranty. Not so fast, we are talking about a laptop purchased in Australia, and it&#8217;s wet sitting here in the London rain.</p>
<p>Off to the Dell websites <em>(for each country)</em>. Dell has this useful <a href="http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&amp;l=en&amp;s=gen">service tag page</a> which provides my specific applicable warranties and their expiry dates. My resulting list of 6 different warranties is a little over complicated and could do with linking direct to each warranty&#8217;s details, but I&#8217;m not complaining since there was no BS regarding looking up the right country, standing on one leg, touching your nose with your eyes closed, etcetera.</p>
<p><a href='http://misunderstandings.wordpress.com/2007/11/30/avoid-1-year-laptop-warranties/dell-warranty-page/' rel='attachment wp-att-34' title='My Dell warranty page'><img src='http://misunderstandings.files.wordpress.com/2007/11/dell-warranty-look-up-2007-11-30a.thumbnail.png?w=468' alt='My Dell warranty page' align='right' /></a></p>
<p>Next stop dell.co.uk technical support via online chat. Calls to helpdesks are often a little bit of &#8216;<a href="http://en.wikipedia.org/wiki/Russian_roulette">Russian roulette</a>&#8216; <em>(especially if you&#8217;ve ever worked in a technical helpdesk environment, and can recall the worst of your colleagues)</em> however this is a positive story. </p>
<p>In spite of the representative being unable to locate my details <em>(lost in the ether, no doubt)</em> ~ I wasn&#8217;t fobbed off. In fact I was encouraged to continue, no nonsense about being unable to help with another nation&#8217;s laptop.</p>
<p>After fully describing my situation, it was suggested I hook up to an external monitor to check if the streaking appeared there also <em>(it did)</em>. And to try running some software to perform a hardware test <em>(software didn&#8217;t work)</em>. </p>
<p>The technician&#8217;s view was to replace not just the graphics card but also the motherboard <em>(given the risk of repeated repairs dragging on)</em>. Who am I to argue. Advised that a repair could be performed on site the day after tomorrow <em>(not quite next day, however my machine was still usable)</em> between the usual tiny window of 9-5.30pm. Shortly after leaving the chat, I received emails including the chat transcript, then an email with the wrong service tag and laptop model, confirming the date of repair.</p>
<p>The next day, I received a call from the technician re-confirming the date and address. The following day, as planned, the technician turns up at about 2.30pm; to my surprise on a motor bike <em>(not much room for equipment)</em>, and settles down to work.</p>
<p>Another scare when he notices that the laptop in question is an Inspiron 9400 not the Latitude described on the document. Fortunately the correct parts were ordered and supplied.</p>
<p>Interestingly the technician appeared to use his smart phone as a reference for specific guidelines to disassemble the laptop. After removing dozens of screws, two at a time, with the precision and proud efficiency of experience, the wireless adapter and memory were swapped to the alternative motherboard. Next: some more panels a popping, complete removal of the screen, keyboard and the removal of the unusual <em>(by desktop standards)</em> heatsinks of the gpu and cpu. Then replace the problematic gpu and the motherboards were finally ready to exchange places.</p>
<p>Now simply reverse the hundred and one steps just performed with equal efficiency and you&#8217;re done!</p>
<p>Flip the switch ~ <strong>streak free</strong>.</p>
<p><em>Oddly the intel proset wireless software seemed to have issues. Nothing a quick uninstall couldn&#8217;t fix.</em></p>
<h4>Conclusion</h4>
<ul>
<li>Without an extended warranty I&#8217;d probably be looking for a new laptop or paying through the nose for some parts and servicing ~ <strong>almost always worthwhile to extend laptop support</strong></li>
<li>Research your issue as much as possible in case you spin &#8216;bullet&#8217; on the roulette wheel of support</li>
<li>Having even slightly empowered support personnel is preferred to strict adherence to process</li>
<li>Even presumably strict processes have to work around numerous incorrect details</li>
<li>Partial points awarded to graphics card manufacturers for fault tolerance that allows some functionality</li>
<li>I think there&#8217;s a certain fascination associated with any task when it is carried out with a high degree of proud efficiency</li>
<li>Points to Dell for adequate support</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=33&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/11/30/avoid-1-year-laptop-warranties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>

		<media:content url="http://misunderstandings.files.wordpress.com/2007/11/dell-warranty-look-up-2007-11-30a.thumbnail.png" medium="image">
			<media:title type="html">My Dell warranty page</media:title>
		</media:content>
	</item>
		<item>
		<title>Access useful software at work ~ Part 3 ~ Web Server</title>
		<link>http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/</link>
		<comments>http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 10:31:35 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Software Bits]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[lock-down]]></category>
		<category><![CDATA[portable]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/</guid>
		<description><![CDATA[In Part 1 added some useful applications that are executable everywhere (Firefox, video playback, image editing, and more). Part 2 shows how to put back some of the default windows functionality that is typically blocked in large organisations. Ok, a web server, great! That&#8217;s useful. But really if I wanted to serve static html pages [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=32&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li>In <a href="http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/">Part 1</a> added some useful applications that are executable everywhere <em>(Firefox, video playback, image editing, and more)</em>.</li>
<li><a href="http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/">Part 2</a> shows how to put back some of the default windows functionality that is typically blocked in large organisations.</li>
</ul>
<p>Ok, a web server, great! That&#8217;s useful. But really if I wanted to serve static html pages I&#8217;d just open them as regular files in my browser.</p>
<p>Yes a web server is not really going to be useful unless we get more than just Apache. Fortunately and amazingly you can get the whole AMP part of a LAMP stack a single portable application ~ <a href="http://www.apachefriends.org/en/xampp-windows.html">XAMPP</a>.</p>
<p>Use your portable firefox to download the lite version of XAMPP <em>(get the full if you need ftp and mail servers too)</em>.</p>
<p>Simply extract the contents of the zip file somewhere with a short simple path <em>(like c:\temp\xampp)</em></p>
<ul>
<li>Run setup_xampp.bat</li>
<li>Run xampp_start.exe</li>
<li>Open your browser and put in the address http://localhost</li>
<li>You&#8217;ll get a status xampp page</li>
<li>To stop your web server run  xampp_stop.exe</li>
</ul>
<p>Now we&#8217;ve got access to PHP, Perl a MySql database and Apache of course. The only gap from a LAMP stack is you won&#8217;t get your Linux tools but you&#8217;ve got everything else you need to download and run most server packages. Things like wordpress, gallery2 and you can customise them.</p>
<h4>Related</h4>
<ul>
<li>In <a href="http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/">Part 1</a> added some useful applications that are executable everywhere <em>(Firefox, video playback, image editing, and more)</em>.</li>
<li><a href="http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/">Part 2</a> shows how to put back some of the default windows functionality that is typically blocked in large organisations.</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=32&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Access useful software at work ~ Part 2 ~ Windows</title>
		<link>http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/</link>
		<comments>http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 17:33:03 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Software Bits]]></category>
		<category><![CDATA[lock-down]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/</guid>
		<description><![CDATA[In Part 1 added some useful applications that are executable everywhere (Firefox, video playback, image editing, and more). Part 3 adds a web server, just for the hell of it. Your workstation is now freely running Firefox with decent text and image editing thanks to part 1. However there&#8217;s a number of things you still [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=30&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li>In <a href="http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/">Part 1</a> added some useful applications that are executable everywhere <em>(Firefox, video playback, image editing, and more)</em>.</li>
<li><a href="http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/">Part 3</a> adds a web server, just for the hell of it.</li>
</ul>
<p>Your workstation is now freely running Firefox with decent text and image editing thanks to <a href="http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/">part 1</a>. However there&#8217;s a number of things you still can&#8217;t do, like say use the run dialog, run a command line prompt (or ipconfig), or even type a path into windows explorer.</p>
<h4>Run dialog</h4>
<p>I&#8217;ve had no luck with a substitute for this one, so it&#8217;s back to the mouse or manually setting up keyboard short-cuts to launch each application. Right-click -&gt; Properties -&gt; Short-Cut Key.</p>
<h4>Command line</h4>
<p>Unfortunately I&#8217;m not aware of any free substitutes <em>(please correct me if I&#8217;m wrong)</em> however <a href="http://www.jpsoft.com/4ntdes.htm">4NT</a> is a useful commercial substitute.<br />
Alternatively if you just need to run ipconfig or similar, because your network got messed up, create a bat file <em>(just a normal text file with a .bat extension)</em> and put in the following:<br />
<pre class="brush: vb;">
ipconfig /all
PAUSE
</pre></p>
<h4>Windows explorer address bar</h4>
<p>I guess this was disabled to prevent people using it to run programs indirectly, however the equivalent functionality still exists in MS-Word in the web toolbar. However this is a pretty slow way to do things so I&#8217;d suggest using it only as absolutely necessary.<br />
<a href='http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/word-web-toolbar-address-bar/' rel='attachment wp-att-43' title='Word Web Toolbar - Address Bar'><img src='http://misunderstandings.files.wordpress.com/2008/01/ms-word-address-bar-2008-01-11a.png?w=468' alt='Word Web Toolbar - Address Bar' /></a></p>
<h4>Related</h4>
<ul>
<li>In <a href="http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/">Part 1</a> added some useful applications that are executable everywhere <em>(Firefox, video playback, image editing, and more)</em>.</li>
<li><a href="http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/">Part 3</a> adds a web server, just for the hell of it.</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=30&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>

		<media:content url="http://misunderstandings.files.wordpress.com/2008/01/ms-word-address-bar-2008-01-11a.png" medium="image">
			<media:title type="html">Word Web Toolbar - Address Bar</media:title>
		</media:content>
	</item>
		<item>
		<title>Access useful software at work ~ Part 1 ~ Firefox</title>
		<link>http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/</link>
		<comments>http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 18:38:23 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Software Bits]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[lock-down]]></category>
		<category><![CDATA[portable]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/</guid>
		<description><![CDATA[Part 2 shows how to put back some of the default windows functionality that is typically blocked in large organisations. Part 3 adds a web server, just for the hell of it. Those of us who are reasonably technically inclined and have suffered working at a big corporate will know how painful it can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=28&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/">Part 2</a> shows how to put back some of the default windows functionality that is typically blocked in large organisations.</li>
<li><a href="http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/">Part 3</a> adds a web server, just for the hell of it.</li>
</ul>
<p>Those of us who are reasonably technically inclined and have suffered working at a big corporate will know how painful it  can be trying to use a heavily locked-down machine and internet-blocker, er, proxy.</p>
<h4>Applications you may want</h4>
<p>Typically this means you get winxp / win2000 with the still-standing web browser of 2001 ~ IE6 <em>(who says a monopoly can&#8217;t innovate)</em>. This probably makes <strong>Firefox</strong> your first port of call. You&#8217;ll possibly also find yourself wishing for:</p>
<ul>
<li>A decent text <em>(and basic code)</em> editor ~ NotePad++</li>
<li>Image editing ~ gimp</li>
<li>A media player ~ VLC</li>
<li>Something to zip and encrypt files ~ 7-zip</li>
</ul>
<p>This and much much more is freely available <em>(open source)</em> and wrapped up and packaged nicely at <a href="http://portableapps.com/">portableapps.com</a> by John T. Haller and numerous other application modifiers.</p>
<p>That evening, Johnny arrives home shiny new usb-stick in hand. He spends a couple of hours downloading and configuring every piece of portable software he can find.</p>
<p><span id="more-28"></span>The next morning Johnny arrives at work, actually excited, rushes to his desk, plugs in his usb-stick. Hmm, no little tooltip flashing away, oh well they don&#8217;t always connect right the first time. Try again, ah actually turns out those usb ports are a security hazard, never mind.</p>
<p>Straight onto the &#8216;net <em>(assuming the proxy allows)</em> to re-download his apps. Simply download and extract. This is one aspect of the beauty of portable software ~ no reliance on the windows registry or dlls in C:\WINDOWS.</p>
<h4>Profile storage space</h4>
<p>Johnny smiles knowing that this particular cruel torture is just to help him remember to put all his important spreadsheets on the network.</p>
<p><a href='http://misunderstandings.files.wordpress.com/2007/11/profile-space-exceeded-2007-11-15a.png' title='Profile Storage Space'><img src='http://misunderstandings.files.wordpress.com/2007/11/profile-space-exceeded-2007-11-15a.thumbnail.png?w=468' alt='Profile Storage Space' /></a></p>
<p>Generally c:\temp is available <em>(and doesn&#8217;t get cleaned-out)</em> so Johnny simply copies* his extracted apps there&#8230; he could also put them on the network but size and speed considerations make that a last resort.</p>
<p><em>* &#8211; Another portable app benefit they don&#8217;t care (with rare exceptions) if you move them around.</em></p>
<h4>Proxy Settings</h4>
<p>Next stop setting up a proxy. Copy IE proxy settings <em>(Tools-&gt;Internet Options-&gt;Connections-&gt;LAN Settings)</em> into Firefox <em>(Tools-&gt;Options-&gt;Advanced-&gt;Network-&gt;Settings)</em>. Oh LAN Settings has been disabled in IE <em><del>~ I&#8217;ll update with a alternative method to grab proxy details soon ~</del></em>.</p>
<p><strong>Update 2007-12-07</strong> ~ put the following text into a text file and change the extension to .vbs then double click to run.<br />
<strong>Update 2008-04-30</strong> ~ correction to replace html escaped &amp; with &amp;. Also note when copying the code snippets below that you&#8217;ll need to use the &#8220;view plain&#8221; link or remove the # or numbers prefix to each line. <em>(Thanks to david for pointing this out.)</em><br />
<pre class="brush: vb;">
Option Explicit

Dim CurrentShell, ProxyValue

Set CurrentShell = CreateObject(&quot;WScript.Shell&quot;)

ProxyValue = CurrentShell.RegRead(&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer&quot;)

Wscript.Echo &quot;Proxy Server: &quot; &amp; ProxyValue
WScript.Quit
</pre></p>
<p>Or a shorter lazier version of the same thing:<br />
<pre class="brush: vb;">
Set CurrentShell = CreateObject(&quot;WScript.Shell&quot;)
Wscript.Echo &quot;Proxy Server: &quot; &amp; CurrentShell.RegRead(&quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer&quot;)
</pre></p>
<h4>Flash Plug-in</h4>
<p>Finally Johnny heads to flashysitethatvaluesappearanceovercontent.com and musthavejava.com and finds that his favourite blinking content needs some Firefox plug-ins. Java is not possible and to my knowledge seems unlikely, but the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Flash plug-in</a> is workable.</p>
<p>Options are to:</p>
<ul>
<li>Install it at home and grab a copy the files flashplayer.xpt and NPSWF32.dll then put them into &#8230;\PortableApps\FirefoxPortable\Data\plugins</li>
<ul>
<li>But since Johnny can&#8217;t get easily get files from home onto his machine he uses <a href="http://legroom.net/software/uniextract">Legroom&#8217;s UniExtract</a> software.</li>
<li>And by running it on the flash installer he&#8217;s able to get those two files.</li>
</ul>
</ul>
<p>Now surfing with a browser build when he was at school Johnny&#8217;s productivity sky-rockets.</p>
<h4>Add-ons</h4>
<p>Add-ons appear to work pretty seamlessly with the portable firefox I&#8217;m currently using:</p>
<ul>
<li>Adblock Plus</li>
<li>All-in One Sidebar</li>
<li>British English Dictionary</li>
<li>Australian English Dictionary</li>
<li>del.icio.us Bookmarks</li>
<li>DOM Inspector</li>
<li>Download Statusbar</li>
<li>Firebug</li>
<li>FireFTP</li>
<li>Flashblock</li>
<li>PDF Download</li>
<li>Tab Mix Plus</li>
<li>View Source Chart</li>
<li>Web Developer</li>
</ul>
<h4>Related</h4>
<ul>
<li><a href="http://misunderstandings.wordpress.com/2007/11/16/access-useful-software-at-work-part-2-windows/">Part 2</a> shows how to put back some of the default windows functionality that is typically blocked in large organisations.</li>
<li><a href="http://misunderstandings.wordpress.com/2007/11/22/access-useful-software-at-work-part-3-web-server/">Part 3</a> adds a web server, just for the hell of it.</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=28&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/11/15/access-useful-software-at-work-part-1-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>

		<media:content url="http://misunderstandings.files.wordpress.com/2007/11/profile-space-exceeded-2007-11-15a.thumbnail.png" medium="image">
			<media:title type="html">Profile Storage Space</media:title>
		</media:content>
	</item>
		<item>
		<title>Don&#8217;t get a passive digitiser</title>
		<link>http://misunderstandings.wordpress.com/2007/11/14/dont-get-a-passive-digitiser/</link>
		<comments>http://misunderstandings.wordpress.com/2007/11/14/dont-get-a-passive-digitiser/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 17:18:23 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Hardware and Future Tech]]></category>
		<category><![CDATA[digitiser]]></category>
		<category><![CDATA[hp]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[notebook]]></category>
		<category><![CDATA[passive]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[tablet]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/11/14/dont-get-a-passive-digitiser/</guid>
		<description><![CDATA[I metioned a while back that I was considering purchasing a tablet. Way back then it was between Toshiba&#8217;s M200 and M400. Time marched inexorably onward and these options became relatively less and less powerful but because tablets have no market share consumer prices remain inflated (even for out of date hardware). So imagine my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=27&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I metioned a while back that I was considering purchasing a tablet. Way back then it was between Toshiba&#8217;s <a href="http://reviews.cnet.com/tablet-pcs/toshiba-portege-m200-tablet/4505-3126_7-30596988.html" title="Toshiba M200 Tablet">M200</a> and <a href="http://www.pcpro.co.uk/reviews/86251/toshiba-portege-m400.html" title="Toshiba M400 Tablet">M400</a>.</p>
<p>Time marched inexorably onward and these options became relatively less and less powerful but because tablets have no market share consumer prices remain inflated <em>(even for out of date hardware)</em>.</p>
<p>So imagine my excitement when I found a decent price on a reasonable spec <em>(for a tablet, at the time)</em> HP tx1210us </p>
<p>Rough Spec:</p>
<blockquote><p>
1.90GHz Turion 64 X2 Mobile TL-58, 2GB DDR2, 160GB, DVD±RW DL, Windows Vista Home Premium, 12.1&#8243; LCD (1280&#215;800)
</p></blockquote>
<p>Then reasons for the lower price ticked in:</p>
<ul>
<li>Hotter, battery life reducing AMD cpu</li>
<li>Passive digitiser ~ this means that the screen has a touch interface requiring firm constant physical contact <em>(unlike active radio digitisers that have pressure sensitivity and can read the stylus just above the surface too)</em></li>
</ul>
<p>Simply put it ticked too many boxes to resist <em>(I actually rated various features to against the competition to reach this decision)</em>. I read a bunch of reviews. A few said the passive digitiser wasn&#8217;t as easy to use ~ ha I thought of course it&#8217;s not but surely with a bit of practice one can write without losing contact with the surface. In fact you change pressure substantially and almost constant when writing and frankly I couldn&#8217;t adjust to the necessary pressure.</p>
<p><span id="more-27"></span><br />
Short answer:<br />
Don&#8217;t consider using this as a tablet&#8230; even if you only want to use the stylus for occasional point and click.</p>
<p>Longer review:</p>
<ul>
<li>You cannot write or draw even basic useful diagrams with a passive digitiser ~ without more effort than using a mouse and keyboard</li>
<li>Current OSs / applications aren&#8217;t designed to <strong>easily</strong> work with stylus input ~ there&#8217;s been some improvements but no critical mass to make this a useful working model <em>(this probably doesn&#8217;t apply to graphics, see my next point)</em></li>
<li>The build quality isn&#8217;t to bad, however there is a disconcerting flex if you pick the machine up at a front corner</li>
<li>It&#8217;s shiny ~ and gets fingerprints all over it</li>
<li>The specs for its time aren&#8217;t too bad so I&#8217;m not disappointed to be using it as a nice regular 12.1&#8243; laptop</li>
<li>Surprisingly some features I care least about have been the best:</li>
<ul>
<li>Built in webcam and microphone are excellent <em>(most laptops an option for them these days, take that option)</em></li>
<li>The moulded bump touchpad has a very nice feel</li>
</ul>
<li>Fingerprint reader ~ is painfully inaccurate and should have implemented scrolling like the <a href="http://www.motioncomputing.com/support/faq_ls.asp#c10">Motion tablets</a></li>
<li>Ports are adequate</li>
<li>It does get pretty toasty</li>
</ul>
<p>In conclusion:<br />
Tablet laptops haven&#8217;t made it and there&#8217;s a good reason ~ outside of specialist software <em>(medical, graphics)</em> ~ they don&#8217;t provide an easier interface.</p>
<p>If you&#8217;re going to take the plunge regardless of my issues, you need:</p>
<ul>
<li>Vista for handwriting recognition <em>(although it offers you ridiculously rare options <strong>first</strong> for correcting your mistakes)</em></li>
<li>Firefox addon ~ <a href="https://addons.mozilla.org/en-US/firefox/addon/1250">Grab and Drag</a> <em>(includes pen flicks)</em></li>
<li>Expect a steep learning curve before you&#8217;ll be productive</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=27&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/11/14/dont-get-a-passive-digitiser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Decent Access mdb deployment method</title>
		<link>http://misunderstandings.wordpress.com/2007/02/15/decent-access-mdb-deployment-method/</link>
		<comments>http://misunderstandings.wordpress.com/2007/02/15/decent-access-mdb-deployment-method/#comments</comments>
		<pubDate>Thu, 15 Feb 2007 05:31:33 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/02/15/decent-access-mdb-deployment-method/</guid>
		<description><![CDATA[Take an Access database you&#8217;ve developed to make your life easier doing some business task that you don&#8217;t have $200k for your IT department to make a less usable version of and ah, yes, the point. Now your team of 5 need to use this application (which knowing a little about Access you&#8217;ve at least [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=20&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Take an Access database you&#8217;ve developed to make your life easier doing some business task that you don&#8217;t have $200k for your IT department to make a less usable version of and ah, yes, the point.</p>
<p>Now your team of 5 need to use this application <em>(which knowing a little about Access you&#8217;ve at least split into a front and back ends)</em> but there are occasional sharing issues when everyone&#8217;s stepping on each other&#8217;s toes. </p>
<p>Not to mention you can&#8217;t make any improvements &#8217;cause someone didn&#8217;t quit the application before going home, getting sick, or leaving their laptop remotely logged in to your application before shuffling off the mortal coil.</p>
<p>Here&#8217;s a solution.<br />
<em>(With various caveats: #1. You can&#8217;t really lock-down an access database if you want people to be able to use it, don&#8217;t bother trying; #2. I&#8217;ve probably glossed over some aspects or exaggerated some benefits.)</em></p>
<p>Put the back-end on a network share somewhere <em>(please use UNC paths not mapped drive letters)</em>. Unless its already in more serious database <em>(SQL Server, Oracle, MySQL)</em>, in either case use ODBC to connect the Access front-end to the back-end.</p>
<p>Put the front-end on a network share somewhere <em>(read-only for everyone but you ~ nowhere near bullet-proof but reduces accidents)</em>.</p>
<p>Include a version number in the filename of the front-end, we&#8217;ll get to why later.</p>
<p><span id="more-20"></span>Use this batch script <em>(again on the network share somewhere probably one step up the directory tree from the front-end)</em>:</p>
<p><pre class="brush: vb;">
@echo off
::This batch file copies Your tool and supporting files, then runs the support batch file
call .\YourTool\YourTool.bat
xcopy &quot;.\YourTool\*&quot; &quot;C:\YourTool\&quot; /s /e /d /y
odbcconf.exe /s /c /a %ODBCSETUP%
start &quot;MSAccess.exe&quot; &quot;C:\YourTool\YourTool 0.0.5.mdb&quot; &amp;
exit
</pre></p>
<p>Only tell your users about the batch script&#8230; the first, second and last thing the users need to know is to run the batch script&#8230; set-up a shortcut to the batch script, email the shortcut and tell them this is all they need to click.</p>
<p>Once you want to get onto the more fun stuff you can use a configuration batch script like:</p>
<p><pre class="brush: vb;">
set SERVER=SERVER\NAME
set DB=YOUR_DB_NAME
set ODBCSETUP={CONFIGDSN &quot;SQL Server&quot; &quot;DSN=MetaProfile|Description=MetaProfile|SERVER=%SERVER%|Trusted_Connection=Yes|Database=%DB%&quot;}
::ODBC;DSN=YourToolConnection;DATABASE=YOUR_DB_NAME;Trusted_Connection=Yes
</pre></p>
<p>Combine above ingredients with this Access vba linking code in an event on start-up of the front-end <em>(for tables and pass-through queries)</em>:</p>
<p><pre class="brush: vb;">
'Not the complete code (missing some supporting functions and values)
  For i = 0 To CurrentDb.TableDefs.Count - 1
    localName = CurrentDb.TableDefs(i).name
    sourceName = CurrentDb.TableDefs(i).SourceTableName

    'Skip local tables (local tables do not have a connection string) and skip if connection string is still the same
    If (CurrentDb.TableDefs(i).Connect  &quot;&quot; And CleanAccessConnectionString(CurrentDb.TableDefs(i).Connect)  connectionString) Then

      'If access if the backend then TableSource shouldn't contain the owner
      If (dbType = YourTool.GetVariable(&quot;DatabaseTypeAccess&quot;)) Then
        sourceName = Mid(sourceName, (InStr(1, sourceName, &quot;.&quot;) + 1), Len(sourceName))
      'If oracle or sqlserver is the backend then TableSource should contain the owner
      ElseIf (Not (IsNull(dbOwner) Or dbOwner = &quot;&quot;)) Then
        sourceName = dbOwner &amp; &quot;.&quot; &amp; Mid(sourceName, (InStr(1, sourceName, &quot;.&quot;) + 1), Len(sourceName))
      'No owner, leave TableSource as it is
      'Else
      End If

      'Test with made up table, checks odbc connection and source table exist
      On Error Resume Next
      CurrentDb.TableDefs.Delete odbcTestTable
      On Error GoTo ErrorGoTo

      odbcTestTable = YourTool.GetVariable(&quot;OdbcConnectionTestTable&quot;)
      Set linkedTable = CurrentDb.CreateTableDef(odbcTestTable)
      linkedTable.Connect = connectionString
      linkedTable.SourceTableName = sourceName
      CurrentDb.TableDefs.Append linkedTable
      CurrentDb.TableDefs.Delete odbcTestTable
      'if no errors encountered then continue with other tables

      CurrentDb.TableDefs.Delete localName
      Set linkedTable = CurrentDb.CreateTableDef(localName)
      linkedTable.Connect = connectionString
      linkedTable.SourceTableName = sourceName
      CurrentDb.TableDefs.Append linkedTable
    End If
  Next

'Pass through queries (not applicable for Access back-end)
  For i = 0 To CurrentDb.QueryDefs.Count - 1
    localName = CurrentDb.QueryDefs(i).name
    'Skip local queries (local queries do not have a connection string)
    If (CurrentDb.QueryDefs(i).Connect  &quot;&quot;) Then
      CurrentDb.QueryDefs(i).Connect = YourTool.GetVariable(&quot;Connection&quot;)
      CurrentDb.QueryDefs.Refresh
    End If
  Next

ErrorGoTo:
  Exit Sub
</pre></p>
<p>And this will mean even when you want to change the ODBC connection, cause your database name has changed. Or you want to <em>(/ are required)</em> to use Oracle not MySQL &#8217;cause your little tool got some serious management attention and needs to be productionised then just change your configuration, test it of course and then overwrite the copy on the network share.</p>
<p>Made changes to your Access front-end? Just change your configuration file <em>(to reference the new version number)</em>, test it all, then overwrite the copies on the network.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=20&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/02/15/decent-access-mdb-deployment-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Pivot tables into useable database format</title>
		<link>http://misunderstandings.wordpress.com/2007/01/02/pivot-tables-into-useable-database-format/</link>
		<comments>http://misunderstandings.wordpress.com/2007/01/02/pivot-tables-into-useable-database-format/#comments</comments>
		<pubDate>Tue, 02 Jan 2007 06:34:41 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[goto]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2007/01/02/pivot-tables-into-useable-database-format/</guid>
		<description><![CDATA[Excellent tip on how to fill in all the blanks if you&#8217;re copying an excel spreadsheet&#8217;s pivot table and just want to get the data in a usable format I learnt this from this mrexcel tip. Remove totals from your pivot table (right-click their row select hide from the context menu) Copy and paste values [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=19&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Excellent tip on how to fill in all the blanks if you&#8217;re copying an excel spreadsheet&#8217;s pivot table and just want to get the data in a usable format I learnt this from <a href="http://www.mrexcel.com/tip004.shtml">this mrexcel tip</a>.</p>
<ul>
<li>Remove totals from your pivot table <em>(right-click their row select hide from the context menu)</em></li>
<li>Copy and paste values <em>(ctrl-c to copy and then ctrl-v to paste ~ otherwise use the edit or context menus)</em></li>
<li>Select the range you want to fill in headings for as below</li>
</ul>
<p><img src='http://misunderstandings.files.wordpress.com/2007/11/pivot-table-fill-down-selection-2007-11-14a.png?w=468' alt='Pivot Table Fill-Down Selection' /></p>
<ul>
<li>Go to the Go To dialog <em>(you&#8217;ll find it under the edit menu)</em></li>
<ul>
<li>Then the Special button within the Go To dialog</li>
<li>Then select the Blanks option</li>
<li>Press Ok</li>
</ul>
<li>Now the selected range has changed to highlight, yep you guessed it only the blank cells within our original selection</li>
<ul>
<li>Press equals <em>(&#8216;=&#8217;)</em></li>
<li>Select the first item in your list <em>(in our sample &#8216;Heavy Machinery&#8217;)</em> cell should read <code>=H6</code> or similar</li>
<li>Hold ctrl and press enter <em>(applies a single formula to all selected cells)</em></li>
</ul>
<li>You&#8217;re done ~ to convert everything from formulae to values select it all then copy and paste special &#8211; values</li>
</ul>
<p>The fast way <strong>keyboard shortcuts</strong> <em>(disregard &#8216;;&#8217; below)</em>:</p>
<blockquote><p>
Select the range; ctrl-g; alt-s; k; enter; =; up <em>(arrow)</em>; ctrl-enter; select the range; ctrl-c; alt-e; s; v; enter
</p></blockquote>
<p>This tip used this <a href='http://misunderstandings.files.wordpress.com/2007/11/pivot-table-fill-down-2007-11-14b.png' title='Pivot Table Source Data'>sample source data</a> <em>(image)</em>.</p>
<p>This is particularly fantastic time saver when you need to do this for massive pivot tables and the exact same steps work for multiple columns in one go. Enjoy.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=19&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2007/01/02/pivot-tables-into-useable-database-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>

		<media:content url="http://misunderstandings.files.wordpress.com/2007/11/pivot-table-fill-down-selection-2007-11-14a.png" medium="image">
			<media:title type="html">Pivot Table Fill-Down Selection</media:title>
		</media:content>
	</item>
		<item>
		<title>Hash and Stack VBA modules</title>
		<link>http://misunderstandings.wordpress.com/2006/12/13/a-couple-of-supporting-class-modules-stacks-and-hashs/</link>
		<comments>http://misunderstandings.wordpress.com/2006/12/13/a-couple-of-supporting-class-modules-stacks-and-hashs/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 01:20:00 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[stack]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2006/12/13/a-couple-of-supporting-class-modules-stacks-and-hashs/</guid>
		<description><![CDATA[In order to add some nice error handling and single location easily modified strings in Access (within VBA) I&#8217;ve decided to utilise a hash** and a stack. ** &#8211; As pointed out by Anon there isn&#8217;t really any benefit to rolling your own Hash &#8211; use the Scripting.Dictionary instead. Unless you need to avoid including [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=18&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In order to add some nice error handling and single location easily modified strings in Access <em>(within VBA)</em> I&#8217;ve decided to utilise a hash** and a <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvbadev/html/creatingstack.asp" title="Microsoft's VBA Stack Information">stack</a>.</p>
<p><ins datetime="00">** &#8211; As pointed out by Anon there isn&#8217;t really any benefit to rolling your own Hash &#8211; use the Scripting.Dictionary instead. Unless you need to avoid including extra libraries (Microsoft Scripting Runtime) or are working with something less than Office 2000 (apparently the runtime is also within windows 2000) in which case my sincere sympathy is with you.</ins></p>
<p>These structures can be created in three classes in any VBA project <em>(only tested in Access and Excel under WinXP)</em>.</p>
<ul>
<li>StackItem ~ Similar to a node in a linked list just contains the element and a reference to another StackItem <em>(pointer substitute)</em></li>
<li>Stack ~ consists of a number of simple functions</li>
<ul>
<li>Push ~ add your item to the top</li>
<li>Pop ~ get and remove item from top</li>
<li>StackTop ~ returns the topmost StackItem</li>
<li>StackEmpty ~ true if no items on the stack <em>(a fact shown when top equals nothing)</em></li>
<li>Class_Initialize ~ set top <em>(the default node)</em>, to nothing</li>
<li>StackDump ~ a string representation of the entire stack</li>
</ul>
<li>HashTable ~ <a href="http://www.devx.com/vb2themax/Tip/19307" title="Original source of this strain of Hash Table">the original strain</a> of this hash table</li>
</ul>
<p>Now we&#8217;ve done the plumbing the <a href="http://misunderstandings.wordpress.com/2008/01/11/hash-and-stack-in-vba-for-centralised-configuration-and-error-handling/">next article</a> will describe the niceties.</p>
<p><span id="more-18"></span><br />
<h4>Code</h4>
<h5>StackItem</h5>
<p><pre class="brush: vb;">
Option Explicit

Public Value As Variant
Public NextItem As StackItem
</pre></p>
<h5>Stack</h5>
<p><pre class="brush: vb;">
Option Explicit

Private Top As StackItem

Public Property Get StackEmpty() As Boolean
  On Error Resume Next

  StackEmpty = (Top Is Nothing)
End Property

Public Property Get StackTop() As Variant
  On Error Resume Next
  
  If StackEmpty Then
    StackTop = Null
  Else
    StackTop = Top.Value
  End If
End Property

Private Sub Class_Initialize()
  On Error Resume Next
  
  Set Top = Nothing
End Sub

Public Sub Push(ByVal var As Variant)
  On Error Resume Next
  
  Dim newTop As New StackItem
  
  newTop.Value = var
  Set newTop.NextItem = Top
  Set Top = newTop

End Sub

Public Function Pop() As Variant
  On Error Resume Next
  
  If Not StackEmpty Then
    Pop = Top.Value
    Set Top = Top.NextItem
  End If
End Function

Public Function StackDump(Optional ByVal delim As String) As String
  On Error Resume Next
  
  Dim dump As String
  Dim item As New StackItem
  
  Set item = Top
  
  dump = delim &amp; item.Value
  
  Do While Not item.NextItem Is Nothing
    Set item = item.NextItem
    dump = dump &amp; delim &amp; item.Value
  Loop
  
  StackDump = Right(dump, Len(dump) - 2)
End Function
</pre></p>
<h5>HashTable</h5>
<p><pre class="brush: vb;">
Option Explicit

Private Const DefaultHashSize = 1024
Private Const DefaultListSize = 2048
Private Const DefaultChunkSize = 1024

Private Const Self = &quot;HashTable&quot;

Private Declare Sub CopyMemory Lib &quot;kernel32&quot; Alias &quot;RtlMoveMemory&quot; (dest As Any, src As Any, ByVal bytes As Long)

Private Type SlotType
  Key As String
  Value As Variant
  NextItem As Long
End Type

Private HashFirstElement() As Long
Private SlotTable() As SlotType

Private SlotFirstFree As Long
Private HashTableSize As Long
Private SlotTableSize As Long
Private LocalChunkSize As Long
Private SlotTableCount As Long

Private CaseInsensitive As Boolean

Public Property Get IgnoreCase() As Boolean
  On Error GoTo ErrorGoTo

  Util.PushStack &quot;Get IgnoreCase (&quot; &amp; Self &amp; &quot;)&quot;
  IgnoreCase = CaseInsensitive
ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

'Can be assigned only when the hash table is empty
Public Property Let IgnoreCase(ByVal newValue As Boolean)
  On Error GoTo ErrorGoTo

  Util.PushStack &quot;Let IgnoreCase (&quot; &amp; Self &amp; &quot;)&quot;
  
  If SlotTableCount Then
    Err.Raise 65000, &quot;IgnoreCase&quot;, &quot;Error message&quot;
    Util.GetVariable (&quot;HashTableNotEmpty&quot;)
  End If
  
  CaseInsensitive = newValue
ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

Public Sub SetSize(ByVal HashSize As Long, Optional ByVal ListSize As Long, Optional ByVal ChunkSize As Long)
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;SetSize (&quot; &amp; Self &amp; &quot;)&quot;
  'defaults
  If ListSize &lt;= 0 Then
    ListSize = SlotTableSize
  End If
  If ChunkSize &lt;= 0 Then
    ChunkSize = LocalChunkSize
  End If
  
  HashTableSize = HashSize
  SlotTableSize = ListSize
  LocalChunkSize = ChunkSize
  SlotTableCount = 0
  'rebuild tables
  SlotFirstFree = 0
  
  ReDim HashFirstElement(0 To HashSize - 1) As Long
  ReDim SlotTable(0) As SlotType
  
  ExpandSlotTable SlotTableSize
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub

Public Function Exists(Key As String) As Boolean
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Exists (&quot; &amp; Self &amp; &quot;)&quot;
  Exists = GetSlotIndex(Key) &lt;&gt; 0
ExitGoTo:
  Util.PopStack
  Exit Function
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Function

Public Sub Add(Key As String, Value As Variant)
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Add (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim ndx As Long, Create As Boolean
  ' get the index to the slot where the value is (allocate a new slot if necessary)
  Create = True
  ndx = GetSlotIndex(Key, Create)
  
  If Create Then
    ' the item was actually added
    If IsObject(Value) Then
      Set SlotTable(ndx).Value = Value
    Else
      SlotTable(ndx).Value = Value
    End If
  Else
    Err.Raise 65000, &quot;Add&quot;, &quot;Error message&quot;
    Util.GetVariable (&quot;HashTableKeyAlreadyUsed&quot;)
  End If
  
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub

Public Property Get item(Key As String) As Variant
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Get item (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim ndx As Long
  ndx = GetSlotIndex(Key)
  
  If ndx = 0 Then
    'return Empty if not found
  ElseIf IsObject(SlotTable(ndx).Value) Then
    Set item = SlotTable(ndx).Value
  Else
    item = SlotTable(ndx).Value
  End If

ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

Public Property Let item(Key As String, Value As Variant)
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Let item (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim ndx As Long
  'get the index to the slot where the value is (allocate a new slot if necessary)
  ndx = GetSlotIndex(Key, True)
  'store the value
  SlotTable(ndx).Value = Value

ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

Public Property Set item(Key As String, Value As Object)
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Set item (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim ndx As Long
  'Get the index to the slot where the value is (allocate a new slot if necessary)
  ndx = GetSlotIndex(Key, True)
  'Store the value
  Set SlotTable(ndx).Value = Value
ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

Public Sub Remove(Key As String)
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Remove (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim ndx As Long, HCode As Long, LastNdx As Long
  ndx = GetSlotIndex(Key, False, HCode, LastNdx)
  
  If ndx = 0 Then
    Err.Raise 65000, &quot;Remove&quot;, &quot;Error message&quot;
    Util.GetVariable (&quot;HashTableRemoveNonExistingKey&quot;)
  End If
  
  If LastNdx Then
    'this isn't the first item in the SlotTable() array
    SlotTable(LastNdx).NextItem = SlotTable(ndx).NextItem
  ElseIf SlotTable(ndx).NextItem Then
    'this is the first item in the SlotTable() array and is followed by one or more items
    HashFirstElement(HCode) = SlotTable(ndx).NextItem
  Else
    'this is the only item in the SlotTable() array for this hash code
    HashFirstElement(HCode) = 0
  End If
  
  ' put the element back in the free list
  SlotTable(ndx).NextItem = SlotFirstFree
  SlotFirstFree = ndx
  ' we have deleted an item
  SlotTableCount = SlotTableCount - 1
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub

Public Sub RemoveAll()
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;RemoveAll (&quot; &amp; Self &amp; &quot;)&quot;
  
  SetSize HashTableSize, SlotTableSize, LocalChunkSize
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub

Public Property Get Count() As Long
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Get Count (&quot; &amp; Self &amp; &quot;)&quot;
  
  Count = SlotTableCount
ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

Public Property Get Keys() As Variant()
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Get Keys (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim i As Long, ndx As Long
  Dim n As Long
  ReDim res(0 To SlotTableCount - 1) As Variant
  
  For i = 0 To HashTableSize - 1
    ' take the pointer from the hash table
    ndx = HashFirstElement(i)
    ' walk the SlotTable() array
    Do While ndx
      res(n) = SlotTable(ndx).Key
      n = n + 1
      ndx = SlotTable(ndx).NextItem
    Loop
  Next
  
  Keys = res()
ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

Public Property Get Values() As Variant()
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Get Values (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim i As Long, ndx As Long
  Dim n As Long
  ReDim res(0 To SlotTableCount - 1) As Variant
  
  For i = 0 To HashTableSize - 1
    ' take the pointer from the hash table
    ndx = HashFirstElement(i)
    ' walk the SlotTable() array
    Do While ndx
      res(n) = SlotTable(ndx).Value
      n = n + 1
      ndx = SlotTable(ndx).NextItem
    Loop
  Next
  
  Values = res()
  
ExitGoTo:
  Util.PopStack
  Exit Property
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Property

Private Sub Class_Initialize()
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;Class_Initialize (&quot; &amp; Self &amp; &quot;)&quot;
  SetSize DefaultHashSize, DefaultListSize, DefaultChunkSize
  
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub

Private Sub ExpandSlotTable(ByVal numEls As Long)
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;ExpandSlotTable (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim newSlotFirstFree As Long, i As Long
  newSlotFirstFree = UBound(SlotTable) + 1
  ReDim Preserve SlotTable(0 To UBound(SlotTable) + numEls) As SlotType
  ' create the linked list of free items
  
  For i = newSlotFirstFree To UBound(SlotTable)
    SlotTable(i).NextItem = i + 1
  Next
  
  ' overwrite the last (wrong) value
  SlotTable(UBound(SlotTable)).NextItem = SlotFirstFree
  ' we now know where to pick the first free item
  SlotFirstFree = newSlotFirstFree
  
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub

Private Function HashCode(Key As String) As Long
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;HashCode (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim lastEl As Long, i As Long
  ' copy ansi codes into an array of long
  lastEl = (Len(Key) - 1) \ 4
  ReDim codes(lastEl) As Long
  ' this also converts from Unicode to ANSI
  CopyMemory codes(0), ByVal Key, Len(Key)
  ' XOR the ANSI codes of all characters
  
  For i = 0 To lastEl
    HashCode = HashCode Xor codes(i)
  Next
  
ExitGoTo:
  Util.PopStack
  Exit Function
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Function

Private Function GetSlotIndex(ByVal Key As String, Optional Create As Boolean, Optional HCode As Long, Optional LastNdx As Long) As Long
  'Get the index where an item is stored or 0 if not found if Create = True the item is created
  'On exit Create=True only if a slot has been actually created
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;GetSlotIndex (&quot; &amp; Self &amp; &quot;)&quot;
  
  Dim ndx As Long
  
  If Len(Key) = 0 Then
    Err.Raise 65000, &quot;GetSlotIndex&quot;, &quot;Error message&quot;
    Util.GetVariable (&quot;HashTableGetSlotIndexInvalidKey&quot;)
  End If
  
  'take case-sensitivity into account
  If CaseInsensitive Then
    Key = UCase$(Key)
  End If
  
  ' get the index in the HashFirstElement() array
  HCode = HashCode(Key) Mod HashTableSize
  ' get the pointer to the SlotTable() array
  ndx = HashFirstElement(HCode)
  
  ' exit if there is no item with that hash code
  Do While ndx
    ' compare key with actual value
    If SlotTable(ndx).Key = Key Then
      Exit Do
    End If
    ' remember last pointer
    LastNdx = ndx
    ' check the next item
    ndx = SlotTable(ndx).NextItem
  Loop
  
  ' create a new item if not there
  If ndx = 0 And Create Then
    ndx = GetFreeSlot()
    PrepareSlot ndx, Key, HCode, LastNdx
  Else
    ' signal that no item has been created
    Create = False
  End If
  
  ' this is the return value
  GetSlotIndex = ndx
  
ExitGoTo:
  Util.PopStack
  Exit Function
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Function

Private Function GetFreeSlot() As Long
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;GetFreeSlot (&quot; &amp; Self &amp; &quot;)&quot;
  
  ' allocate new memory if necessary
  If SlotFirstFree = 0 Then
    ExpandSlotTable LocalChunkSize
  End If
  
  ' use the first slot
  GetFreeSlot = SlotFirstFree
  ' update the pointer to the first slot
  SlotFirstFree = SlotTable(GetFreeSlot).NextItem
  ' signal this as the end of the linked list
  SlotTable(GetFreeSlot).NextItem = 0
  ' we have one more item
  SlotTableCount = SlotTableCount + 1
  
ExitGoTo:
  Util.PopStack
  Exit Function
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Function

Private Sub PrepareSlot(ByVal Index As Long, ByVal Key As String, ByVal HCode As Long, ByVal LastNdx As Long)
  On Error GoTo ErrorGoTo
  
  Util.PushStack &quot;PrepareSlot (&quot; &amp; Self &amp; &quot;)&quot;
  
  'assign the key, take case-sensitivity into account
  If CaseInsensitive Then
    Key = UCase$(Key)
  End If
  
  SlotTable(Index).Key = Key
  
  If LastNdx Then
    ' this is the successor of another slot
    SlotTable(LastNdx).NextItem = Index
  Else
    ' this is the first slot for a given hash code
    HashFirstElement(HCode) = Index
  End If
  
ExitGoTo:
  Util.PopStack
  Exit Sub
ErrorGoTo:
  Util.ErrorHandler
  Resume ExitGoTo
End Sub
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=18&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2006/12/13/a-couple-of-supporting-class-modules-stacks-and-hashs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>The view to use for column and table metadata</title>
		<link>http://misunderstandings.wordpress.com/2006/10/12/the-view-to-use-for-column-and-table-metadata/</link>
		<comments>http://misunderstandings.wordpress.com/2006/10/12/the-view-to-use-for-column-and-table-metadata/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 01:09:01 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2006/10/12/the-view-to-use-for-column-and-table-metadata/</guid>
		<description><![CDATA[If you ever need to run a query to get a specific list of table or column names in MS SQL Server across an entire database, then try information_schema (specifically information_schema.tables and information_schema.columns). Information Schema There are a bunch of different views to the information_schema. Oh and apparently SQL Server 2005 breaks a few things [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=17&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you ever need to run a query to get a specific list of table or column names in MS SQL Server across an entire database, then try information_schema <em>(specifically <a href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ia-iz_56lv.asp">information_schema.tables</a> and <a href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ia-iz_87w3.asp">information_schema.columns</a>)</em>.</p>
<h4>Information Schema</h4>
<p>There are a <a href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ia-iz_4pbn.asp">bunch of different views</a> to the information_schema. Oh and apparently SQL Server 2005 <a href="http://msdn2.microsoft.com/en-us/library/ms186778.aspx">breaks a few things</a> <em>(but it still exists)</em>.</p>
<h5>Usage</h5>
<p><pre class="brush: sql;">
SELECT *
 FROM information_schema.columns
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=17&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2006/10/12/the-view-to-use-for-column-and-table-metadata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Aggregate function to do concatenation ~ create a delimited list</title>
		<link>http://misunderstandings.wordpress.com/2006/09/08/aggregate-function-to-do-concatenation-create-a-delimited-list/</link>
		<comments>http://misunderstandings.wordpress.com/2006/09/08/aggregate-function-to-do-concatenation-create-a-delimited-list/#comments</comments>
		<pubDate>Fri, 08 Sep 2006 05:56:50 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[aggregate]]></category>
		<category><![CDATA[concatenate]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://misunderstandings.wordpress.com/2006/09/08/aggregate-function-to-do-concatenation-create-a-delimited-list/</guid>
		<description><![CDATA[A simplistic concatenation aggregate function for Access (which maintains one advantage(?) over this mvp solution ~ that is we can define our queries outside of the code): A sample query, saved here as &#8216;QuerySelectionForConcatenation&#8217;: How to call it (within another query): The function(s) themselves (one function for number foreign keys and another for text foreign [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=16&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A simplistic concatenation aggregate function for Access <em>(which maintains one advantage(?) over this <a href="http://www.mvps.org/access/modules/mdl0004.htm">mvp solution</a> ~ that is we can define our queries outside of the code)</em>:</p>
<p>A sample query, saved here as &#8216;QuerySelectionForConcatenation&#8217;:</p>
<p><pre class="brush: sql;">
SELECT DISTINCT valid_value.value_txt
 FROM valid_value
 WHERE valid_value.value_set_cde = [InputId]
</pre></p>
<p>How to call it <em>(within another query)</em>:</p>
<p><pre class="brush: sql;">
SELECT ConcatenateListByString(&quot;QuerySelectionForConcatenation&quot;, MyTable.value_set_cde, &quot;,&quot;)
FROM MyTable
</pre></p>
<p><span id="more-16"></span><br />
The function(s) themselves <em>(one function for number foreign keys and another for text foreign keys)</em>:</p>
<p><pre class="brush: vb;">
Public Function ConcatenateList(ByVal queryName As String, ByVal fkId As Long, ByVal delimiter As String) As String
    Dim qryDef As QueryDef
    Dim rs As Recordset
    Dim str As String
    str = &quot;&quot;

    Set qryDef = CurrentDb.QueryDefs(queryName)
    qryDef.Parameters(&quot;InputId&quot;) = fkId
    Set rs = qryDef.OpenRecordset(dbOpenForwardOnly)

    If (Not rs.EOF) Then
        str = rs(0)
        rs.MoveNext
    End If

    Do While Not rs.EOF
        str = str &amp;amp; delimiter &amp;amp; rs(0)
        rs.MoveNext
    Loop

    rs.Close
    Set rs = Nothing
    Set qryDef = Nothing

    ConcatenateList = str
End Function
</pre></p>
<p>If your foreign key is a string / text:</p>
<p><pre class="brush: vb;">
Public Function ConcatenateListByString(ByVal queryName As String, ByVal fkId As String, ByVal delimiter As String) As String
    Dim qryDef As QueryDef
    Dim rs As Recordset
    Dim str As String
    str = &quot;&quot;

    Set qryDef = CurrentDb.QueryDefs(queryName)
    qryDef.Parameters(&quot;InputId&quot;) = fkId
    Set rs = qryDef.OpenRecordset(dbOpenForwardOnly)

    If (Not rs.EOF) Then
        str = rs(0)
        rs.MoveNext
    End If

    Do While Not rs.EOF
        str = str &amp;amp; delimiter &amp;amp; rs(0)
        rs.MoveNext
    Loop

    rs.Close
    Set rs = Nothing
    Set qryDef = Nothing

    ConcatenateListByString = str
End Function
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=16&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2006/09/08/aggregate-function-to-do-concatenation-create-a-delimited-list/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Converting a grid or cross (intersection) view</title>
		<link>http://misunderstandings.wordpress.com/2006/08/17/converting-a-grid-or-cross-intersection-view/</link>
		<comments>http://misunderstandings.wordpress.com/2006/08/17/converting-a-grid-or-cross-intersection-view/#comments</comments>
		<pubDate>Thu, 17 Aug 2006 01:49:20 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[intersection]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">https://misunderstandings.wordpress.com/2006/08/17/converting-a-grid-or-cross-intersection-view/</guid>
		<description><![CDATA[Converting a grid or cross (intersection) view and converting it back to a useful form, single column. What I&#8217;m vaguely trying to describe is the situation where you have a list of things across the spreadsheet (columns) and a list of things down the sheet (rows) with some data stored in the intersection of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=14&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Converting a grid or cross (intersection) view and converting it back to a useful form, single column.</p>
<p>What I&#8217;m vaguely trying to describe is the situation where you have a list of things across the spreadsheet <em>(columns)</em> and a list of things down the sheet <em>(rows)</em> with some data stored in the intersection of the two.</p>
<p>That is we have an item called &#8216;Item Cat&#8217; as the heading in column C <em>(excel ref: <code>$c$1</code>)</em> and attribute called &#8216;Attribute Colour&#8217; as the heading in row 6 <em>(excel ref: <code>$a$6</code>)</em> and the data &#8216;Black&#8217; at the intersection <em>(excel ref: <code>$c$6</code>)</em>.</p>
<p>Let&#8217;s say we wanted to do any sort of lookup <em>(query)</em> on this data <em>(especially comparing to a database)</em>, in its present form this is difficult, therefore we can convert it to something more like &#8216;Item Cat&#8217; <em>(<code>$c$4</code>)</em>, &#8216;Attribute Colour&#8217; <em>(<code>$d$4</code>)</em>, &#8216;Black&#8217; <em>(<code>$e$5</code>)</em> <em>(thus representing all our intersections in a single column down the sheet rather than down and across various columns and rows)</em>. Since in excel it is easier to perform vlookups <em>(or the better index, match function combination which allows you to look left, unlike vlookup, but I digress)</em> on a single column we can write a our function to produce: &#8216;Item Cat &#8211; Attribute Colour&#8217; <em>(<code>$c$4</code>)</em>, &#8216;Black&#8217; <em>(<code>$d$4</code>)</em>.</p>
<p>To carry this out we need to use the following functions in Excel, <code>/</code> (division), <code>mod</code><em> (modulo, or remainder)</em>, <code>address</code> <em>(for <code>address(1,1)</code> returns <code>$A$1</code>)</em>, indirect <em>(allows us to indirectly specify where to get a value, so instead of just entering <code>$A$1</code> in our formula we can use put the text value <code>'$A$1'</code> into cell <code>$B$54</code> and use <code>=indirect($B$54)</code> which will in fact return the value in cell <code>$A$1</code>)</em>.</p>
<p>For the moment I&#8217;ll be lazy and just let the formulae in the attached file do the rest of the talking. Put in a comment if you want further explanation or have a better alternative method. You&#8217;ll need to right click and save <a id="p15" href="http://misunderstandings.files.wordpress.com/2006/08/cross-intersection-view-into-single-column-20060817a.txt">this file</a> rather than opening as text and to change the extension to .zip.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=14&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2006/08/17/converting-a-grid-or-cross-intersection-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
		<item>
		<title>Access find a record (rather than filtering)</title>
		<link>http://misunderstandings.wordpress.com/2006/08/15/find-a-record-rather-than-filtering/</link>
		<comments>http://misunderstandings.wordpress.com/2006/08/15/find-a-record-rather-than-filtering/#comments</comments>
		<pubDate>Tue, 15 Aug 2006 06:40:31 +0000</pubDate>
		<dc:creator>waldo</dc:creator>
				<category><![CDATA[Bits of Useful Code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[record]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">https://misunderstandings.wordpress.com/2006/08/15/find-a-record-rather-than-filtering/</guid>
		<description><![CDATA[Here&#8217;s a little Access vba snippet to find a record within a form (useful if you don&#8217;t want to filter): Snippet Note: the use of Nz(Value, [ValueIfNull]), which provides an alternative value if your control or search string is null. More general form Which we can generalise a little to the following function. Usage Code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=13&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little Access vba snippet to find a record within a form <em>(useful if you don&#8217;t want to filter)</em>:</p>
<h4>Snippet</h4>
<p><pre class="brush: vb;">
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst &quot;[MODULE_ID] = &quot; &amp; Str(Nz(Me![Combo35], 0))
If Not rs.EOF Then
	Me.bookmark = rs.bookmark
End If
</pre></p>
<p>Note: the use of <code>Nz(Value, [ValueIfNull])</code>, which provides an alternative value if your control or search string is null.</p>
<h4>More general form</h4>
<p>Which we can generalise a little to the following function.</p>
<h5>Usage</h5>
<p><pre class="brush: vb;">
PerformSearch &quot;[MODULE_ID]&quot;, Str(Nz(Me![Combo35], 0)), &quot;Integer&quot;
</pre></p>
<h5>Code</h5>
<p><pre class="brush: vb;">
Private Sub PerformSearch(ByVal searchField As String, ByVal searchText As String, ByVal searchType As String)
 Dim rs As Object
 Dim str As String

 If(searchType = &quot;string&quot;) Then
  'alternatively you can force the searchText string to be passed in with the 'right' formatting in the first place
  str = &quot;'&quot; &amp; searchField &amp; &quot;'&quot;
 'number, etc. that don't need to be quoted
 Else
  str = searchField
 End If
 Set rs = Me.Recordset.Clone
 rs.FindFirst searchField &amp; &quot; = &quot; &amp; str
 If(Not rs.EOF) Then
  Me.bookmark = rs.bookmark
 End If
End Sub
</pre></p>
<h4>Even more general form</h4>
<p>One step more generic, a public function to call from anywhere, meaning it only needs to be defined once <em>(not per form)</em>.</p>
<h5>Usage</h5>
<p><pre class="brush: vb;">
Me.bookmark = Nz(PerformSearch(Me.Recordset, &quot;[MODULE_ID] = &quot; &amp; Str(Nz(Me![Combo35], 0))), 0)
</pre></p>
<h5>Code</h5>
<p><pre class="brush: vb;">
Public Function PerformSearch(ByVal rs As Recordset, ByVal searchString As String) As Byte()
 rs.FindFirst searchString
 
 If (Not rs.EOF) Then
  PerformSearch = rs.bookmark
 Else
  PerformSearch = Null
 End If
End Function
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/misunderstandings.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/misunderstandings.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/misunderstandings.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/misunderstandings.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/misunderstandings.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/misunderstandings.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/misunderstandings.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/misunderstandings.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/misunderstandings.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/misunderstandings.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/misunderstandings.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/misunderstandings.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/misunderstandings.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/misunderstandings.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/misunderstandings.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/misunderstandings.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=misunderstandings.wordpress.com&amp;blog=306818&amp;post=13&amp;subd=misunderstandings&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://misunderstandings.wordpress.com/2006/08/15/find-a-record-rather-than-filtering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">waldo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
