Factors in IT decision-making

Interesting study commisioned by Google on SMB buying behaviours for IT products. In order of importance:
  1. Reliable 73%
  2. Integrates easily with existing systems
  3. Service/support
  4. Appropriate for a company of my size
  5. Flexible  44%
  6. Inexpensive to service/ maintain
  7. Lower cost 37%
  8. Requires minimal training/ education
  9. Company is a well-known, established brand
  10. Scalable
  11. Includes comprehensive training/education
  12. Discounts/promotions
  13. Have purchased from company in the past 27 %

Python Memory Usage using __slots__

I have been trying to reduce memory usage on our application server, and experimented with using __slots__ to reduce memory usage.
The memory overhead of using __dict__ vs __slots__ turned out to be 147 bytes per object.
Here are my results

Test
Total Memory
Bytes per object

slots
40880K
41

dicts
183840K
188

Using the following test script

class C(object):
#__slots__ = ('abc', 'defg')
pass

a = []
for i in xrange(1000000):
c [...]

Intelligence Gathering on Winning an Account

Sometimes winning projects can make one forget to gather competitive intelligence. Here is a list of questions one should ask the clients during a de-briefing:

Customer Details

Organisation name
Name, title

Opportunity Details

Products
Deal Value (License fee, Annual License fee, Consulting)
Main decision-makers (Name, title, role)
Main competitors (Organisation, products)
Main reason for win/loss

Process

Engagement – when first engaged
What did customer know about us [...]

Understanding News Corp’s Thrust

There has been a lot of commentary written about News Corp playing with the idea of exiting Google’s search index. Cringely said that News Corp would be denying themselves valuable traffic, handing them to competitors. Mark Cuban, on the other wrote that Twitter is heading to be THE news search site, leaving Google News has [...]

TCP Provider, error: 0- An existing connection was forcibly closed by the remote host

Once in a while, one comes across a problem that is so totally perplexing, and people have various success with different approaches that it makes me think of the tale of the blind men and the elephant.
Recently, in a production environment, we are seeing errors in our SQL Server clients: reporting
TCP Provider, error: 0 – [...]

Database Patterns with ASP.net MVC

Brad Wilson has a nice long post about the use of model metadata in ASP.NET MVC.
While most of these do not deal with database operations, they have a certain place in database modelling. The following are must haves:

Short Display Names – a sane toString() for tabular listings
Simple Display Text – a sane toString() for summarizing [...]

Converting a .dotx file to a .docx file with Python

It used to be that one could simply rename a Word Template .dot file to .doc. However, Microsoft has made it somewhat harder today.
One way to do this is through using Word Automation. However, another way is to do some XML manipulation, given that .dotx and .dotcx files are actually zip archives.

import xml.dom.minidom
import zipfile

def dotx2docx(src, [...]

Is obesity contagious?

I don’t know if you recall this article from the New Scientist discussing whether obesity is spreading through social norms.
However, there may be another pathway.
A 2007 Scientific American article mentions that bacteria can cause subjects to gain weight faster.
For one thing, bacteria produce chemicals that help us harness energy and nutrients from our food, Huffnagle [...]

Japan observations

Over the term 3 school holidays, we (my family) spent 11 days travelling in Japan, and I’d like to share some observations.

Osteoporosis is common among the elderly, far more prevalent than Australia for example. Despite the (relatively) higher consumption of soy products in Japan, this comes across as a little surprising
People are generally taller in [...]

Some keywords are going be getting expensive.

According to The Register article here:
[Special Operations contractor] will, at a minimum, develop Internet-based marketing procedures such as use of Google AdWords and Search Engine Optimization to prioritize search result listing of the applicable websites
What next? Affiliate programs? Cost per action? I know! email submits. Any creatives with landing page ideas?
Here’s a visualization of what [...]

Travelling and Allergies

Came across this site Allergy Translation Cards. They do a supreme good.

How to get hold of a .gov domain

The information is supplied here: http://dotgov.gov/help_qualify.aspx
Good luck!

How do you figure out which side of a car the fuel tank is on?

I have this problem when driving my wife’s car: Why Do Cars Have Fuel Doors on Different Sides
But here’s the kicker. Commenter spewlman advised:
Want to avoid the frustration of not knowing what side your gas tank is on? Car manufacturers actually solve this mystery for you. On your dash is a picture of a fuel [...]

Serpent Rising

Mary Garden writes about her thirst for transcendence, but instead finds mystics and charlatans, who make ordinary human beings look like saints. Serpent Rising 2nd Ed

It is now thirty years since I first set foot in India and felt at last I had come home. From time to time in my now busy life, I [...]

If you look at it long enough, the tags disappear

I don’t know what it is about xml configuration files that simply turn me off learning a particular library or framework. For example, here is a Hibernate XML monstrosity.
I realize it all makes sense, but there is something terribly off-putting about xml. To me it’s a sign that the host language is not sufficiently dynamic [...]

Chrome loveliness

I just tried to “go back” to the previous page, but still want to retain the current page I’m reading. Middle click on the back arrow did the trick, and opened the previous page on a new tab.
Sweet.

JDBC Connection URLs for 22 Databases

Here is a non-exhaustive list of JDBC connection URLs for various databases. Corrections welcome!
Microsoft SQL Server JDBC connection URL
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=northwind
com.microsoft.jdbc.sqlserver.SQLServerDriver
msbase.jar;mssqlserver.jar;msutil.jar
downloadl
Microsoft SQL Server 2005 JDBC connection URL
jdbc:sqlserver://serverName\instance:port[;user=value][;password=value][;property=value]
com.microsoft.sqlserver.jdbc.SQLServerDriver
sqljdbc.jar
download SQL Server 2005 driver
Microsoft SQL Server (JTurbo) JDBC connection URL
jdbc:JTurbo://<HOST>:<PORT>/<DB>
com.ashna.jturbo.driver.Driver
Microsoft SQL Server (Sprinta) JDBC connection URL
jdbc:inetdae7:<HOST>:<PORT>?database=<DB>
com.inet.tds.TdsDrive
download

Miscellaneous Notes on CIFS

Alfresco uses JNI on Netbios to serve files over CIFS on windows servers,
http://www.codase.com search for win32netbios.c
Uses a combination of

[NetBIOS]-> NCBADDNAME
[NetBIOS]-> NCBLISTEN
[NetBIOS]-> NCBRECV

Also see their JLAN product.
Unfortunately, this is apparently not supported on Vista, Windows Server 2008. Source: MSDN
There seems to be some workarounds documented on the Alfresco wiki Vista And Windows 2008 through firewalling [...]

Bitwise Tests in XSLT

Using a combination of floor, mod and div, we can implement bitwise tests in XSLT. I happened to need to do that today. Thanks to the power of Google, and the Mulberry XSLT forums, the following snippet implements XSLT test for 000010

<xsl:comment>
Bitwise test for 00010
</xsl:comment>
<xsl:if [...]

What makes America great?

From a BBC Foreign Correspondent, who is leaving the US:
I deplore the superstition and the eating competitions and the tatty dreariness of so much of America, and I note that the new president is also unimpressed by the infrastructure and not a fan of fat but, after more than seven years living here, I am [...]