Hints and Tips

Frequently asked questions and other advice that doesn't fall within the HowTo step by step style.

Bring rogue programmers in from the cold.

One interesting resource for programmers is "The Daily WTF". It is a great place to read about things that should *not* be happening in your organization: antipatterns for code and business processes (mostly code).

A recent "The Daily WTF" discusses the plight of a company where a “rogue” programmer built an inefficient spreadsheet for a supervisor, only to find it was too popular and those inefficiencies brought down the database by overloading it with connections. Operating outside of IT, the understanding of enterprise requirements was not there. On the other hand, many have argued that rogue programmers exist because of unresponsive IT departments, and they provide a valuable service.

Category:

Excel Spreadsheet Transformations

Today I had an request to transform data that came from a printed report into usable Excel data. The data had been printed to PDF, so a PDF to Excel converter tool did the bulk of the work. However, even after being placed in Excel, there were two remaining requirements to achieve this goal. The first was to remove the recurring headers and footers of the report. The second was to reassemble each reported item's three lines of data back into to a single coherent row of data.

To do the initial transformation (removing the headers) I used the following VB for Applications code:

Category:

Domain specific languages, are they worth it?

Yet another interesting discussion of Domain Specific Languages popped up:

http://www.artima.com/forums/flat.jsp?forum=106&thread=155752

Domain specific languages (DSLs) are scripting languages (usually) built on top of a traditional environment. For programmers who have written code only in a single language model, moving to a DSL model can be a bit of a shock. The fundamental idea is that when your base programming language is becoming constraining in some way, you can build a DSL on top of it to remove some of the limitations. (Another option is migrate to a more powerful language, but sometimes that is too drastic of a step to take.)

Category:

Google Analytics

Google is testing a new service: "Google Analytics". If you already use Ad Words, then this additional reporting can be useful for determining which words are getting you the best results. More than a hit counter, the product allows you to monitor four items to help you understand your marketing successes and failures.

  1. Campaign tracking variables: These are URL elements you can use in web advertisements, e-mails, etc. These codes allow you to track the number of users arriving from different marketing efforts. Most marketing people have figured out how to use different landing pages or similar variables to track marketing responses, but these are particularly useful when combined with the other Analytics features.
Category:

FireDaemon

From time to time it is nice to be able to run a program as a service. If you have written the software yourself (especially with .NET) creating services isn't actually all that hard. However, for third party programs or as a quick fix, nothing beats FireDaemon. FireDaemon is a low cost solution that can convert nearly any executable into a daemon. Simply specify the executable to run in the background and set the startup properties, security account, command line, etc and you are off. This is ''particularly'' useful for those programs that seem like they should have been background capable to start with, such as some backup tools that only operate while a user is logged in.

Category:

LLBLGen

If you are coding .NET projects, one of features I miss most compared to Java is a good Object Relational Mapping tool. Java programmers for years have been using tools such as Hibernate to help with persistence code, but for .NET the tools have been fairly lacking. Although there are products such as NHibernate, they are still not as mature as the Java versions. Commercial offerings are usually very expensive. Recently I tried LLBLGen and found it to be a great solution with good support and a good feature set.

Category:

Small Business Backup Solutions

This is one of those questions that should be asked about more often, "How do I protect my data". Many small businesses take unnecessary risks with their livelihood by ignoring the most basic concept of computing: the value of your data. Since most small businesses are based on Windows platforms, the information here is tinged with Windows terminology, but the ideas are generic enough to use in most environments.

Business owners understand the value of their data, otherwise there would be little need for a computer system. (Even if you only do word processing and a few spreadsheets, think of the difficulty of recreating that information. If you don't like that idea, then you need to create backups.) What is often not understood is the risk the data is placed in every day simply by using their computer system. Let us look at some common small business data environments to understand the risks and some ways to mitigate those risks.

Category:

CutePDF

Many people need to generate PDF files occasionally, but it can be an expensive proposition to get the latest version of Adobe Acrobat for every user in your office to create basic PDF files. Acrobat comes with many wonderful features for create sophisticated PDF files. Digital signing, encryption and forms that post to web servers are among a few that Timewarp Technologies uses Acrobat for. However, when all you need is get some pages from some unusual program and provide the results to a user without the ability to read the source or resulting files, PDF is a great solution. For that matter, if the end consumer should not be modifying the document, I highly recommend sending PDF instead of Word documents as they are safer and more robust.

Category:

Why is NAT good for you?

Recent articles have pointed to a 50% chance that an "unprotected Windows PC" will be infected within 12 minutes of being connected to the Internet.

Globe and Mail article on exploits of Windows Systems

What this means is that if a machine is installed with Windows and then goes online to obtain the necessary security updates, it is probably exploited before completing the update process, with all the negative consequences thereof. Windows XP with Service Pack 2 is already partially "hardened" compared to prior versions of Windows, which makes a most compelling argument for updating to the newer operating system if it is possible when it becomes necessary to reinstall windows. However, it is often necessary to reinstall Windows due to some calamity that befell the operating system, and such reinstalls usually will be with the existing operating system the machine is licensed for. If you only have 12 minutes before having a 50/50 chance of being exploited, how in the world can you safely update it?

Category:
Subscribe to RSS - Hints and Tips