Content feed Comments Feed

Managed Mayhem

More Than 99 Billion Cats Herded

Archive for the ‘Web Development’ Category

CURL, Wordpress, Shopp, FirstData, and MediaTemple

Posted by admin On March - 29 - 2010

What a group to bring together, eh?

I’m using the following:

http://www.wordpress.org
http://www.shopplugin.net
http://www.mediatemple.net
http://curl.haxx.se/

So first off, I had an issue where the FirstData plugin built by Shopp was pointing to the incorrect URL:

var $url = “https://secure.linkpt.net/lpcentral/servlet/lppay”;

This url is actually FirstData’s ‘Connect’ url… which is a forms based api… but the Shopp Plugin FirstData gateway plugin actually uses FirstData’s ‘Global Gateway Api’, but this is not the URL that they are using … When I called FirstData and gave them that URL, they assumed that I was using the ‘Connect’ product and proceeded to set me up with that on their side. This resulted in a bit of a monkey race for me until I looked further at what the Shopp FirstData gateway plugin was actually doing. When I realized that it was passing XML on port 1129 to FirstData, I knew then that it was not following the ‘Connect’ pattern, but rather was following the model setup for the ‘Global Gateway API’.

When I changed the URL string to the following:

var $url = “https://secure.linkpt.net/”;

I was now getting a ‘timeout’ error rather than an HTML page for a return from cUrl.

cUrl allows you to set some options to manage timeout issues … so I tried them:

curl_setopt($connection, CURLOPT_CONNECTTIMEOUT, 4);
curl_setopt($connection, CURLOPT_TIMEOUT, 8);

After some digging in the log files, I found that cUrl was attempting the connection on port 443, when FirstData actually requires port 1129. Shopp’s FirstData gateway plugin uses the following curl_setopt() to set the port:

curl_setopt($connection, CURLOPT_PORT, 1129);

Unfortunately, MediaTemple does not appear to accept this…because cUrl’s default 443 port was what was showing in the logs.

So… I modified the URL string:

var $url = “https://secure.linkpt.net:1129

and commented out the curl_setopt:

// curl_setopt($connection, CURLOPT_PORT, 1129);

This resolved all my issues, and the cart began processing orders.

My initial complaint here is with Shopp’s FirstData gateway plugin… having the URL string for FirstData’s ‘Connect’ product is a bit misleading… and completely incorrect… it does not work with the approach that the plugin was taking, as it was actually built to use the ‘Global Gateway API’. I wasted a lot of time going down the wrong road here because of this. My second complaint is with FirstData … as I had shown them the plugin, and they responded by setting me up with ‘Connect’ … making the same assumption that I had about the URL string… but not looking any further into what the plugin was trying to do. My third complaint is that MediaTemple does not seem to support the use of curl_setopt() … at least not for setting the port that cUrl runs on.

Hopefully this helps someone else save a bit of time. It was a bugger for me. :)

Planning Poker Cards came in!

Posted by Jim Rising On February - 16 - 2010

Got me a sweet set!

pokerchipcards_plasticbox_large

Hiring for great teams, not tools.

Posted by Jim Rising On February - 11 - 2010

Now… sometimes you have some tools on your team… but that’s another article. :)

I must confess that I’m writing this from the perspective of a guy who has invested a lot of time into a specific technology, and is now having a difficult time getting work in that specialization. So take what I’m about to say from that context.

Perhaps a bit idealistic of me here, but why don’t more companies focus on forming great teams with the people that they hire rather than focusing only on hiring for a specific tool? Do you hire the carpenter, or do you hire Ryobi, Craftsman, Stanley, and Makita? Maybe it’s a symptom of the ‘keyword frenzy’ … this long list of acronyms that recruiters and hiring managers are tasked with attaching to the jobs they have open. Maybe they think it is more difficult than it really is for a good developer to transition from one language to another.

I would think it would make sense to hire someone on your team who is a strong Sr. level developer in one technology as a Jr. level developer in another and then train them the way that you want them to be trained. This spirit of ‘Apprenticeship’ is surprisingly lacking in this field, particularly considering the open source movement. I would totally be willing to take a pay cut for 6 months to a year if it meant working on a team with a technology that I haven’t used before, or one that I wanted to gain more confidence in.

I know what you’re going to say… why not hire BOTH for great teams AND the tools you need? And you might be right… but let’s say that it takes an otherwise good developer 3 months to ‘ramp up’ with a specific technology. Now you have a guy who is essentially a Sr. level developer with strong OO abilities working in a Jr. level position for at least another 9 months. They are happy to be working, learning something new, adding to their toolbox… and so long as you are able to promote them as a Sr. within a year, they are probably going to be loyal. You’re going to have a 3 month ramp time regardless. Even if you have a developer who is already proficient in the technology you’ve employed, they are going to need to learn your own unique way of doing things. The kind of developer who would take on a position like that is probably the type who loves what they do, and will work overtime from home in order to get better at it, so you basically get double the hours from them at least in the beginning. The developer’s interest level in the technology is now based on the excitement of learning new things about it. You’re not likely to get that kind of commitment from a guy who has been developing in the same language for a decade.

Really my point is that in technology, tools change… sometimes frequently. Hiring for great teams makes it possible for you to move between tools while still maintaining your culture. If you hire for tools, that is all you get.

Coldfusion Is Not Scalable

Posted by Jim Rising On February - 11 - 2010

Even after 12 years of developing enterprise ColdFusion applications, I’m still amazed that I hear statements like this. I recently left a job where I helped to build a highly scalable application for the financial industry using CF. Our team used EXTjs, MySql, and Railo as the CF parser. I am still ‘invested’ in this project, and so I was talking with the COO yesterday and he mentioned that there was another developer they were talking with who said … ‘Coldfusion is not scalable’. No explanation given… just that it wasn’t scalable. I was actually a bit irritated, and so I asked the COO to just ask him ‘Why?’.

The enterprise versions of Adobe Coldfusion, Railo, and OpenBlueDragon all come with built in clustering using J2EE session management. Adobe’s version 9 comes with Hibernate support built-in… and Railo is soon to follow suit. Companies like Etrade, NASA, GoldLeaf, Caterpillar… all use ColdFusion. All of the parsers support enterprise DBMs like Oracle, MSSQL, Postgres, and MySql. All of the parsers come with a form of memory caching.

My only ‘guess’ is that he’s possibly talking about it not being financially scalable. Perhaps he doesn’t know that there are now 3 different open source CF parsers available? (openBlueDragon, Railo, Smith) Part of the reason why MySpace moved away from Coldfusion was primarily a licensing issue. Adobe ColdFusion licenses are not cheap, but they are justifiable. Even if he was talking about a financial scalability issue due to licensing… it’s just something that you build into your business model on the front end to make sure that you have the money available either through investment or financing.

Either way, we had already addressed the financial scalability issue by choosing Railo as the parser, and I built in my own clustered session management using in memory sessions backed up by persistent sessions in MySql. Combined with sticky sessions in Apache, a front end load balancer and simple MySql replication, and you have a pretty solid HA setup. It’s not J2EE, but it worked. We were also planning on rolling it into the cloud when we released it into production, and so those MySql servers would have had up to 32GB of RAM and 8 processor cores available to each of them (vertical scalability), with the web servers being horizontally scalable as much as needed. Down the road we could have always moved to MySql Clustering when it was actually needed, giving us true horizontal scalability. I’d say that’s pretty scalable.

My point is that it really is not the language that makes an application scalable. Certain tools can make it easier (Enterprise CF vs. Standard) … but it is really dependent on how the application is designed in the first place. Most of the HA scalability issues can (and should) be mitigated to the network and operating system layers rather than handling them within the application layer anyhow. Saying ‘Coldfusion is not scalable’ seems to me to be a real misunderstanding of how highly available applications are really built.

Web Developer Toolbar

Posted by Jim Rising On February - 10 - 2010

By far the coolest add-on for firefox I’ve seen for developers since firebug. It’s also available for Flock and Seamonkey.

toolbar
Web Developer Toolbar

This thing gives you all sorts of information about the page that you’re viewing. Some of the toys available:

  • Line Guides
  • Ruler
  • Display Div Order
  • Display Element Information
  • Resize Window
  • Dom Inspector
  • Validation tools for CSS, Feed, HTML, 508
  • Outlining of Frames, Headings, Links, Tables, Block Level Elements, Positioned Elements
  • Display Image File Sizes, dimensions, paths
  • Disable CSS, Javascript
  • Inline editing of Html and CSS

There are a ton of other features… well worth the donation.

Convention over Configuration

Posted by Jim Rising On February - 10 - 2010

I’m noticing a trend… and I’m liking it. I’ve been working with cakePHP … and they have a wonderful way of causing you to want to name things a certain way so that you don’t have to fiddle with a bunch of configuration files… Coldbox (which I love!) has the same thinking behind it… but still has a nasty mess of xml files that you wind up needing to hoark with.

In CakePHP … your database tables, models, controllers and views are all linked by the naming convention that is used…

  • Database table: “dogs”
  • Model class: “Dog”, found at /app/models/dog.php
  • Controller class: “DogsController”, found at /app/controllers/dogs_controller.php
  • View template, found at /app/views/dogs/index.ctp

It even has a cool little ‘inflector’ class that will take a string and pluralize it for you if you need help:

Example: Inflector::pluralize('dog') returns “dogs”.

Neat.

I remember what a pain Fusebox used to be … one of my biggest complaints about the framework was that it was so laden with XML configuration files everywhere!

Coldbox still has quite a bit of setup you need to go through using XML, but similar to the way that Fusebox has transitioned over time (I started with Fusebox at version 2!)… all of your models, views, and controllers (handlers) are CFC object based rather than dealing primarily in XML.

MAMP and Cold Fusion Tutorial

Posted by Jim Rising On February - 10 - 2010

I recently re-installed OSX on my mbp … and decided to look into a more integrated approach for my development environment. Since I’m developing in PHP as well as CF, I opted to pickup MAMP, which is a packaged lamp-ish type stack installer and configuration manager for Apache, MySql, and PHP on Mac. There is a free version, but I decided to get Mamp-Pro because I like using virtual hosts, and it’s such a good product that it needs to be supported.

Mike Jones has a great video tutorial for CF8 that helped me get CF9 up and running under MAMP.

Single OCD seeking Same for occasional hookup

Posted by Jim Rising On February - 9 - 2010

I saw this posted on a job board today for a web designer looking for a PHP coder.

“I need someone organized and responsive above all else. I’m talking the type of guy (or girl) who checks email every 20 minutes.”

I thought it was funny… because I’m diligently trying to reduce the number of interruptions to my workflow by only initiating and responding to contact via email, chat, and phone calls during specific periods of the day. You might be ‘responsive’, but you can’t check your email every 20 minutes and be productive. I think this guy is looking for a support tech or project manager.

The problem with working with this type of client in this way is that it never forces them to become more organized themselves. I have burned out on these sorts of babysitter relationships before… and try to be very careful not to take them on anymore.

Tab Dump 02/09/2010

Posted by Jim Rising On February - 9 - 2010

http://www.52framework.com/
Awesome Html5 / CSS3 framework! Thank you Tyson Cadenhead for posting this on Facebook. I require this for home use.

http://net.tutsplus.com/
Just came across this today… where have you been all my life?

http://freelanceswitch.com/
Another great site by those guys at Envato … I’m going to keep an eye on this one. :)

http://www.zend.com/en/products/studio/
Looking into some IDE bidness for PHP.

Why I don’t like to give free estimates for software development

Posted by Jim Rising On January - 26 - 2010

When I go to the mechanic to have something fixed, he charges me an ‘evaluation fee’. When I need an attorney, I will usually get a first visit free, but anything after that is billable no matter what it is. If I go to the dentist or doctor, I pay for a visit (sometimes several!) before I am told what is wrong.

Why is there the expectation in custom software design and development that we should give free quotes / estimates?

I think that this expectation is the primary reason why we have such a rash of ball park estimates in this industry. If it’s only a ‘contest’ of who can come up with the best price and not the best plan… why bother coming up with a plan at all?

For projects over a certain dollar value, I will build a requirements specification / definition that includes (among other things):

  • Functional Specification
  • Design Specification
  • Technical Specification
  • Module / Component break-down
  • Server Architecture (If required)
  • Delivery Milestones / Schedule
  • Budget

When I build a requirements definition that leads into a proposal, there is sometimes research involved for the specific technology or need that the client has, primarily because they are looking for specific solutions and someone to solve problems for them.

I once had this client who wanted to setup fax on demand via the web and via an 800#. I had never worked with fax on demand, but I spent the time and researched it, found a vendor for them, talked with the vendor about the project and the customizations we’d need for their software, negotiated with the vendor on price and added that to the project budget along with information about the vendor and their technology in the technical specification.

Many clients I have worked with had a very basic idea that after several brainstorming sessions turned into something much more lucrative and easier to accomplish than what they had originally set out to do.

Yet another prospect of mine wanted to have the ability to make (not just take) online payments via ACH. I’ve never done this before… but after about an hour of research and some phone tag, I got it figured out.

Many times I can’t meet 100% of the client’s needs myself or even with my immediate team, and so I need to step outside of that and find someone who can help. Sometimes I don’t even know if what the client is wanting to do is possible!

My point is that all of this consulting effort prior to proposal to ‘get it right’ takes time, and there is value during this process when it is done properly.

Early on in my business, I found myself building out proposals and coming up with sometimes great ideas that prospects would then take and use with someone else who outbid me. During the interview process and initial relationship forming, it is inevitable that there is an exchange of knowledge / value from our side to the client’s side. This business of business, systems and software analysis is primarily a consulting role that we take on particularly early in a project… and knowledge that we’ve developed over the course of our careers is frequently freely given away while we go through the bidding process.

I’ve gotten to the point where I’ve realized that rather than needing to feel protective about these things, to make sure that I can give accurate estimates, and to avoid the tendency to just lazily ‘ball-park’ projects, I decided that I would build proposals over a certain dollar value out of actual requirements by spending the time interviewing the client for as long as it takes, researching about their needs, and expecting that I get paid for properly building out a schedule and budget for them. That consulting process is now a part of my product / service, and I give them an up-front estimate of how long I think it will take / cost based on the initial information that I get from them. Reviewing client material and interviewing them over a period of time prior to forming an estimate or proposal helps to develop a realistic schedule and budget and develops a true relationship of trust with clients who are serious about working with me because they respect what I do, and are not just looking for free consulting and a bid for work that may never come. It allows us both to take each other seriously and develop a solid and realistic plan together.

I will openly admit that this ‘rule’ has resulted in lost ‘opportunities’ because many others do not follow it, and so many prospect’s expectations are improperly set by other developers or firms. I’m ok with that. My intention is not to have a large number of opportunities, but rather… a small number of strong relationships that I’m purposed to be involved in. It is in this sense, my ‘Purple Cow’ method.

After going through this process with a client, I’ve never had them take the result and go somewhere else with it because I’ve been able to take the time to prove to them that I’m an asset to their team. If they do ever decide to go elsewhere because of price, they have a well defined requirements specification / scope that they can take with them, and I got paid for my time. I would have rather gotten the gig, but both of us are (relatively) happy. When I haven’t gone through this process with a client, 90% of the time, they go elsewhere for a lower bid because they were only after price, and my pessimism skews my ball-park estimates high. Or if I do go through the process with them, they don’t buy,  and I don’t get paid for it, 100% of the risk is on me and I feel like I’ve been ripped off. That is a waste of everyone’s time. I don’t compete based only on price, I compete based on quality, honesty, and experience. Some of these folks have come back to me after going out on their own without going through this process in order to start over.

The company I just left went through that same thing where they did not want to hire me on the front end to help them through the dream and define process… and as a result, they spent $50,000 and lost a year of effort, and still came back to hire me and one other guy (who i interviewed) in order to rebuild their application from the ground up because it was insecure, not highly available, not ready for production, and ugly. They had a huge opportunity cost because they effectively lost almost 2 years where the product wasn’t taken to market due to a failure to plan or set expectations properly on the front end with the developer they were working with. That’s not the first time I’ve been pulled in after the damage has been done.

Now, I’m not talking about your average contact form, CMS installation, wordpress theme / customization… or ecommerce website using existing technology. I’m not talking about web site design. Systematic, Cookie cutter, packaged, or single feature type requests don’t even need to be estimated. I have a default price list for almost anything you can think of when it comes to these ‘one off’ type requests, and even website design is standardized enough that you can easily quote it based on the number of layout revisions and pages being laid out. I’m not even talking about feature requests made during maintenance of existing applications… though that can be another beast in itself.

It’s the larger, new custom projects that I’m really addressing. Think about it like this… traditionally, planning for any project should be about 10-20% of your project time. If you have a 1000 man hour project, that is 100 to 200 man hours worth in planning. This planning is going to need to be done at some point no matter what. Why not at least do some of it BEFORE you have already developed a budget and schedule so that you can be more confident in what your budget and schedule will be? It just seems backwards to me to trust a developer (or firm) who is motivated primarily by making the sale and getting a proposal done quickly … to spend the time necessary to form a solid plan required to give you an accurate budget and schedule without paying them to do it. Pay them to do it right, and make sure that they clearly understand your needs before you accept a budget or schedule from them. If you’re unhappy with the price afterwards, at least you (hopefully) have a well documented functional specification that you can take to another developer and you can get an accurate quote from them using it.

About Us

"Managed Mayhem" is a software project development and management blog maintained by Jim Rising. Jim Rising is an Adobe Cold Fusion developer who lives in Murfreesboro, Tennessee with his wife Melissa, their son 'Haven', cat ‘Rusty’, and dog ‘Güenther’. He currently freelances from home.