-1

A friend of mine, a beginner PHP programmer, needs to link the product his company develops with a third-party product (a set of web services). He received the "relevant" documentation (a few hundred of pages of unreadable stuff) from this third-party, have read the PHP documentation related to SOAP client, have read about SOAP and WSDL, but doesn't have a slightest idea where to start. Instead of a step-by-step tutorial, he has lots of overly verbose documentation.

I suggested him to use prototyping:

  1. Imagine the most basic scenario where the third-party web services can be used,
  2. Select the relevant documentation,
  3. Build (from scratch) the simplest PHP script which will play this scenario,
  4. Once the prototype works, integrate the functionality into the existing product,
  5. Refactor,
  6. Expand the existing product with additional features.

While this may help pushing this person to the right direction, I feel that my suggestion is only partially helpful. I imagine myself six years ago knowing nothing about WSDL and SOAP and having to search inside hundreds of pages of documentation: I would be already discouraged at steps 2 and 3.

Experienced developers have a bunch of patterns, practices and processes which help solving basic problems frequently encountered in software development:

  • The technical aspects of a feature are uncertain? Use prototyping.

  • The application "feels unresponsive"? Use profiling to find bottlenecks.

  • The requirements are subject to frequent change? Use Agile.

  • Programmers need to be sure their code doesn't contain omissions? Use code reviews.

  • The successive versions of a product are not deployed fast enough? Use DevOps.

While those patterns and practices help developers solving purely technical/organizational issues (such as "I know how to implement Web Sockets in Java, Python and Node.js, but now I need to do it in Haskell."), the same patterns and practices are not helpful for less experienced programmers who need to solve more substantial and less technical problems (such as "I believe Web Sockets are a sort of HTTP but it happens the other way, something like that; now lead developer asked me to implement that in my app, but I'm not sure why do we need it.")

Inviting the programmer to spend three years in college or twelve months reading programming-related books is not always an option: some people need to work to pay their bills, need to finish the project for the next deadline, and are not paid to read books.

So what are other options?

3
  • 8
    Experience is what you get right after you need it. Commented Sep 2, 2014 at 21:18
  • 2
    I'm having difficulty knowing "where to start" answering your question due to the difficulty of too much heterogenous information. You need to refactor your post to clarify exactly what your question is. Commented Sep 2, 2014 at 21:45
  • "some people need to work to pay their bills, need to finish the project for the next deadline, and are not paid to read books." - sometimes someone has to read a book first to analyse and solve a problem. Not every programming problem can just be solved just by applying "a standard pattern". And if the person assigned to this task has problems with this, he may be just the wrong person for the job. Commented Sep 2, 2014 at 21:50

2 Answers 2

1

The series of steps that you suggested sounds very reasonable. Most courses of action will come down to starting with the smallest unit of interaction between PHP and the external library and implementing it, learning from that, extending the scope, implementing, learning, eventually refactor, repeat. I.e. working bottom up to connect the external library to the product that he is working on. In principle there might also be a way to approach this top down but this would probably require your friend to know more of the rough building blocks that he will need, which is the problem in the first case, therefore this is out.

The fact might be that your friend is just simply tasked with something that he cannot solve even given a reasonable amount of time, just because he currently does not have enough overall experience/knowhow/skill (however you might want to label it). Besides the general guideline that you gave him more specific work might help him over the hump. Be that from you or from colleagues. That would mean talking the specific problem through with someone else that has enough general software engineering know how to coax a path to a solution out of him (that could even be you), or with somebody that has enough specific knowledge (i.e. PHP, SOAP and WSDL) that can give him direct advice and guidelines to move him along.

This is not a bad thing, just a part of growing in your chosen profession. I have seen a lot of documentation morphed into just long lists of 'HowTo' from which you can copy and paste. I think there is a skill to comprehending, abstracting and concluding with incomplete knowledge about new systems that you encounter (a skill that grows with every system that you encounter). The HowTo style of documentation does not promote that skill. It sounds like your friend is crossing the threshold where he graduates from using 'HowTo' like documentation and it might be a painful process, but if he makes it he will come out a better developer and engineer.

1

In general

Break every problem down into N problems that if solved will also solve the larger problem, wherein N is the number of things you can wrap your head around at once.

The "break down" can consist of:

  • learning about the problem space at a high level
  • defining or clarifying the "solved" conditions
  • stating the steps or actions of the larger problem.

Apply recursively until each problem is trivial.


In particular

Your friend needs to avoid thinking about SOAP, XML, JSON, and all the other technical details until the problem has been reduced to problems of which one or more is solved by those details. At that point, one or more of the sub-problems will be, X requests data Y from Z using Z's API. If Z doesn't have an API or your friend doesn't know how to use the given API, he needs to learn that particular problem space, googling or asking other pros.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.