php accessing strings as arrays

A tip that relates to below. I find that developers often forget that you can access strings as arrays. This comes in handy for finding a specific character in a specific point in a string. For example, when looping over a list of files using:

if($filename{0} != '.'){
.... not a hidden file

                    <br /> Will keep you from getting a bunch of hidden files or the '.' && '..' directories. Make sure to note that you have to use curly brackets and not square brackets.

php scandir function

I hadn’t noticed

                    <a href="">this new addition</a> to PHP 5. Finally a nice simple way to get a listing of the directories and files within a directory. Of course it wasn't that hard before but it's one less little function that needs to be added to your code. Of course since it's only PHP 5 it's not going to be much use to me in my current project which needs to be 4/5 :-(

linux server sales up

Dave from Geek News Central points out a report on how

                    <a href="">Linux Server sales</a> have grown, to over $1 billion last quarter. I'm not suprised by this, he talks about IT professionals but I also think other folks are moving towards Linux for servers as well. I'm no server admin but I've successfully run my own 2 way Dell box on Red Hat for the last 3 years with little trouble. I also know several other small business owners who do the same. My bet is that there are alot of us out there helping to drive up those numbers.

should the it guys run your website

should the IT guys run your website?: “My concern isn’t that they’re losing some ticket sales, it’s that they don’t appear to know or care. That no one is benchmarking and simplifying and reality checking a site that accounts for a huge chunk of their revenue.”

                      (Via <a href="">Seth's Blog</a>.)
                    </p> -----

creating a dynamic list in javascript

I thought I’d publish this code out to the world in hopes someone else may find it useful. I’m sure there are optimizations that could be made and I’d love to hear them.

This is a piece of code I came up with for our upcoming product HelpSpot which is a PHP driven Help Desk program. One of the key features is the ability to tag requests with what we call “reporting tags”. Each request can have tags associated with it. Later these tags can be used to build very flexible reports on where your requests are coming from, what the major issues are, etc.

Since people would probably be adding lots of tags I wanted to come up with a good way of getting the input without either a request back to the server each time they added one or making them use a textbox and giving lots of instructions about how there should only be one per line, etc.

So this is what I came up with. You can find an example here. It creates a nice simple list on the fly. Each list item gets a hidden form field that in PHP will be passed back as an array of list items. Then I can insert them into the database and so on. This should work on IE6 and all Mozilla’s cross platform. It’s still being tested and worked on. If we make any major revisions I’ll post them here.

recursion in php

Recursion “This article is aimed at novice to intermediate PHP programmers, particularly those without a formal background in computer science, who want to understand the full power of recursion.” : A nice article from Zend

help desk software podcast

Great podcast on help desk software and customer support. It really gets into the details of how help desk software affects customer service. Honestly I felt like I wrote this script! The problems they talk about, lack of automation, email integration, costs, are all reasons we’re building HelpSpot.

Some of the really important topics they touch on include:

  • Automating ticket creation by email or web forms (“requests” in HelpSpot) – HelpSpot does both and more.
  • Users being able to check their own tickets – In HelpSpot all updates to a request can be optionally marked “public”. Ones marked public will be visible to the user(requester) via a simple webform and probably via email update as well.
  • Costs to the organization – They really hit on a key one here, lots of companies don’t use help desk software because they think it’s cheaper not to, but they’re missing the intrinsic value created by successfully answering user requests in a timely manner. Check my previous post on this. To put it bluntly, we’re going to keep HelpSpot CHEAP and try to lower this barrier to entry. I was on another systems site the other day and they don’t even let you purchase the software unless you do several thousand dollars of training first! If it’s that complicated that says something about the quality of the software.
  • Reporting – What a key issue, categorization and tracking are the heart of most help desk software initiatives. Reporting and tracking are powerful features in HelpSpot including the ability to create spiffy graphs for your boss 🙂
  • IM – There are some IM bots that produce tickets but most work illegally on the networks. You have to license the IM protocol from MSN/AOL which drives up costs. We are hoping to integrate some of this in v1.5.
                    <br /> Really good stuff guys, keep it up! There just isn't enough user generated content on help desk issues out there.