Recent Blog Posts
Blogs » Archive for April, 2004
Lessons from a lousy sales week
Last week was a bad week for me sales wise. Two prospects that I thought had a great chance of converting into actual clients turned me away. I didn’t invest too much time on either of them, but invested enough to feel lousy about it.
Whenever I lose a deal, no matter how early in the process, I try to learn from it. Here are the lessons I picked up this time around:
1. Show value in explicit, measurable terms. In one case, the prospect was gung ho to work with me, or so I thought. So I got sloppy. I failed to ask enough questions to drill down into the costs of his problem – in business (e.g. make more money) and emotional (e.g. feel better) terms. I took his enthusiasm as a good enough sign to skip this step and assume he was ready and willing to buy. Big mistake! A week later when we spoke again, he seemed much less enthusiastic. By then, it was too late to remind him of the costs of not moving forward – because we never had that conversation.
2. Keep the pipeline full. My marketing strategy is based on attracting prospects in good times …
Unexpected ActionScript Behavior
I was working on a project the other day using the XMLConnector component to see how much time it would save me. It took about 60 seconds to pull the data from the schema, set up the bindings and get it pushing data to a custom list box…that was all fine. I then proceeded to get the application pushing and pulling data from a SQL 2000 database with no problems.
The problems arose when using the onLoad event handler after the LoadVars.sendAndLoad()operation to trigger a function to update the XMLConnector and get the refreshed content into a standard list box which had an XML data feed.
You’d think that XMLConnectorInstance.trigger(); would work first time round. In actual fact, it would never work as expected, and only seemed to reset the list box position strangely enough rather than the content. Weird behavior I thought, so I copied and pasted the line again to call the trigger and it all worked fine and the list box updated with new content.
Why does it take two method calls to instantiate the XML refresh? Not sure, but something I’m investigating at the moment. It looks like I may just write have to write my own …
Backing Up MySQL
There are several ways to backup MySQL data, however, automation certainly makes the process easier. Insuring your backed up data is stored remotely further supports your business continuity in the event of a need to restore data onto new systems based on hardware failure, etc.
Having spent some time murking through my network (not needing to reinvent the wheel to research an efficient backup procedure), I stumbled onto some backup scripts from PJ Doland.
PJ (Patrick) is a web designer in the Washington DC area with former ties to the CATO Institute web site and was willing to share two scripts he is using. I liked these scripts as they are simple, and include the functionality to automate dropping the backups on a remote server for business continuity.
The first is for use as a standard MySQL backup and is found below:
#!/bin/bash
#####################################
### MySQL Configuration Variables ###
#####################################
# MySQL Hostname
DBHOST=’localhost’
# MySQL Username
DBUSER=’root’
# MySQL Password
DBPASSWD=’password’
#####################################
### FTP Configuration Variables #####
#####################################
# FTP Hostname
FTPHOST=’www.example.com’
# FTP Username
FTPUSER=’username’
# FTP Password
FTPPASSWD=’password’
# Local Directory for Dump Files
LOCALDIR=/path/to/local/directory/
# Remote Directory for Offsite Backup
REMOTEDIR=/path/to/remote/directory/
# Prefix for offsite .tar file backup
TARPREFIX=db1
#####################################
### Edit Below If Necessary #########
#####################################
cd $LOCALDIR
SUFFIX=`eval date +%y%m%d`
DBS=`mysql -u$DBUSER -p$DBPASSWD -h$DBHOST -e”show databases”`
for DATABASE in $DBS
do
…
Open to all: Notepad 2
It’s my intention this and next week to provide some help to those developers who want to use .NET but can’t afford or haven’t access to Visual Studio.
It started in the last post on webref.info, as I had a few requests for resources on the .NET framework classes. Now it seems many of you are after tools which help in the coding of ASP.NET.
Today’s gem is Notepad 2, yet another Notepad replacement. But unlike some of the bloated and slow implementations that have tried to improve on Notepad, this edition really does act as a drag and drop replacement for the humble text editor that ships with Windows.
For starts, by default, it looks extremely similiar to classic Notepad. And this is a good thing. One of the reasons Notepad is successful is that it cuts to the chase and just displays files. And Notepad 2, when viewing a plain text file will do this without rulers, and toolbars.
Yet, open a C# file, and you’re presented with line number margins, toolbars, syntax highlighting and extra features just for the file type you’re using. And most important of all, these extras do not clutter the interface. As with most modern …
Resign Patterns
As it’s Friday, Resign Patterns: Ailments of Unsuitable Project-Disoriented Software (via Manageability). There’s something so much more optimistic about using a Chain of Possibilities instead of a Chain of Responsibility.
Creative Commons and Web Design
Inspired in part by the work of the Free Software Foundation, Lawrence Lessig co-founded Creative Commons and has delivered a whole new world of legal content distribution and sharing like none other before it.
The instant appeal is to artists of all stripes (musicians, photographers, writers, et al) to provide a method of distributing their works internationally while still maintaining some sense of control over use.
Many Creative Commons (CC) fans discovered the licensing tools via use of blog software like Movable Type, which includes the CC framework within their blog configuration tools.
The licensing process is flexible and covers a broad spectrum of use to work for a larger audience. The licenses are explained on the CC site.
The appeal to web designers and developers is two-fold: 1) A tool to distribute designs/content they seek to leverage the viral nature of the Internet for (perhaps for promotion, or perhaps to draw attention to for commercial licensing or sale of the work), and 2) a content search engine to look for content available for use on web sites under one of the CC licenses.
This last being the most unique and sure to grow as more and more web …
Open to all: webref.info
Just a quickie. http://www.webref.info/ is a great resource for getting the technical specs of many web technologies in one place. It includes sections for HTML, XML, DTD, CSS, Visual Filter, JavaScript, Java, ASP, SSI, and of course .NET :)
The Apple-esque design for the site makes it clean and crisp, and worthy of a bookmark.
SimpleXML is… well simple really
I’ve mentioned SimpleXML before but it needs to be said that Sterling’s done an amazing job with it. If you find XML too hard, SimpleXML is the answer.
Zend have a new article up here (by Sterling) with a nice comparison of DOM vs. SimpleXML.
Not only is SimpleXML simple, Sterling has also come up with a neat solution for XML namespaces (something PHP4 has effectively no direct support for) and has also added XPath support, allowing you to home in on a section on an XML document and “SimpleXML” it (see here for an example).
Another cool feature is the simplexml_import_dom() function, which allows you to take any DOM Node and obtain it’s SimpleXML representation. That gives you the power of DOM (as an alternative to XPath) for traversing an XML document but the ease of SimpleXML to home in on exactly what you want. Something like…
get_elements_by_tagname(’sometag’);
foreach ( $nodelist as $node ) {
$simple_node = simplexml_import_dom($node);
// Do simple stuff here
}
?>
One point I need to correct, BTW, was when talking about XMLReader, I said PHP doesn’t have a “Cursor Style” API for XML - that’s actually incorrect as …
Odds and ends
A few links I’ve found interesting or useful over the last week:
Inserting at the cursor using JavaScript
This is a highly effective trick for enhancing the usability of forms, the topic of my recent SitePoint article. It’s particularly useful for text entry fields for content management systems - for example, providing users with an “add image” widget that prompts them for a URL and ALT attribute and then inserts the corresponding HTML at their current cursor position. Alex King’s code sample works in both IE and Mozilla, which each provide different ways for accessing the current cursor position.
You’ve probably heard of image replacement (if not this excellent summary by Dave Shea should get you up to speed). IFR is an interesting twist on the idea from Shaun Inman, which uses Javascript and Flash to extract the text from headers on a page and replace each header with a Flash rendered equivalent. This enables advanced text styling effects and also lets you use fonts for your headers which aren’t available on the host operating system.
ALA and JavaScript - five months later
PPK is the maintainer of QuirksMode.org, and a vocal commentator on Javascript and …
Flash Snapshot circa April 2004
Well, it’s been several months since the latest version of Flash and its incremental upgrade and several incarnations of the Flash Player have been released. Where do we stand now?…
There was a myriad of enhancements, additions and…ahem! component API deprecations with the latest major version not to mention many fine extensions and commands to make it easier to retrieve data from XML and Web Services.
All in all, a fine release, but have we reached the end of the road for development of the application that we know and love? Have Macromedia ran out of ideas and are simply planning tweaks and minor enhancements for the next version, or are we all in for a wave of new features that’ll bowl us all over.
I know some people seem to think that Flash has lost it’s way a little as it’s evolved over the years; with SWFs trying to emulate being a web page (albeit with a little more flair) via some of the components, and has lost touch with its grass root animation ancestry, but what i’m interested in here is your thoughts on the matter.
Do you think Flash needs to revisit its roots, or do you think its …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Download sample chapters of any of our popular books.



