If you ask folks at WisdmLabs about Praveen, they’ll tell you he’s an ace developer, WisdmLabs’ first employee, a closet singer, and…. a funny guy.
In fact Praveen’s ‘pj cracking’ reputation precedes him. He’s always known to target clueless workmates with his out-of-the-box riddles.
What most people probably do not know, is that Praveen is a prolific writer. Whether it be documenting his work, writing emails, adding review comments, or answering interview questions, Praveen likes to add all possible details.
So, as you can imagine, what started off as an interview, has turned into a mini-autobiography :-p .
But Praveen’s genuine answers surely have something to teach everyone.
Over to you Praveen!
When you started working at WisdmLabs, you were the only developer in the start-up. What has the experience taught you?
When it comes to doing work, I guess all of us feel the same way- the number people around don’t really matter. But emotionally, it matters. We are not machines, we are human beings. We want people around, to grab a quick bite, talk over coffee, or just have some fun.
At the very beginning, I was a bit worried. I wondered if the company would ever hire another developer or end up with only one developer 🙂
But the company assured me security and I trusted it.
I remember what Rohan Thakare said to me one day, “Do you want to be a person working under someone in a big company or do you want someone working under you soon in a small company?” I chose to believe the latter and there was no looking back.
When you specifically ask me what I have learnt in these past few years, I’d like to draw out a parallel here to explain this-
A company is like a tree. The founder of the company is the farmer, who plants a seed with the belief that one day it will start growing. Investments are nothing but water and fertilizers. But just like any tree, the farmer knows the tree needs a solid root to grow and rise above the ground and become visible in the market.
The developers (for an IT firm) are nothing but the roots of the tree.
The sapling initially has one main root. As the roots grow, they strengthen the tree. Over a period of time, the tree grows and has different branches and sub-ranches. Services a company provides, are the shade of the tree, and the products are the fruits. It is up to the farmer or the company’s founder to shape the tree or company based on the seed he plants.
Our company is a perfect balance of the two.
We strive to create a tree which provides shade as well as produce fruits equally.
I had the opportunity to be the primary root of this tree. And I have seen it grow from the ground up. I have learnt that not every root is the same- some strengthen, whereas some get destroyed, just like some developers shine, while others quit.
Apart from learning how to lead teams and mentor developers, I observed how other departments worked as well, like sales and marketing.
- I learnt how to analyse problems and plan milestones
- I improved my development and testing skills
- I undertook site migrations
- I communicated with clients directly
- I was part of service projects as well as products
- and I was part of the hiring process as an interviewer
I got an opportunity to be part of almost every phase of the SDLC. And I don’t think this sort of exposure/opportunity would have been possible if I was part of a large company, at least not in a short period. But it was definitely possible in a start up.
What factors do you take into account when architecting a WordPress plugin? And how do you go about it?
“Design is the soul of the end software”
By design, I mean the software design/architecture and not the UI design. If your software has not been designed well, you are inviting nothing but support queries. You’re also making the software less flexible.
When it comes to building a WordPress plugin, I try not to restrict my thinking by considering it to be an extension to WordPress. Instead, I consider it to be a general web based software which can be developed on any technology or any CMS. So, I try to architect the plugin in such a way that it’s easy for the solution/idea to be ported to any platform. Broadly speaking, it should appear to be a standalone piece of software, whereas internally it should contain WordPress functions.
For large systems, I think there isn’t a need to rely on the WordPress architecture, since the solution may or may not be fulfilled completely by WordPress’ architecture. If necessary, your own database structure would have to be created as well.
When creating the architecture of the plugin/solution you have to support it with several other factors:
- Viability of the solution/scope: If it’s a product, you have to set a goal based on the viability of the solution. If it’s a part of service, you have to finalize the scope as per the requirements. Otherwise, you will just end up with developing the solution and not be able deliver it on time and under the expected cost.
- Flow Diagrams: To build a good architecture, and design the flow of the system, UML diagrams are always good to go. Even if you don’t want to create them officially, you could at least draw some rough diagrams to clear and finalize the flow of the system.
- Database: If the system is large and needs to handle large amounts of data and/or data in a manner where WordPress default tables do not seem to be a perfect fit, create new tables. Do not try forcing/adjusting your solution with the existing tables and architecture of WordPress.
- File organization: File organization matters. Before writing a single line of code, you have to make sure your files are well organized.
- Code design: As per your directory structure, you have to add the necessary class files to handle each different module and sub module. You also have to add the function prototypes along with comments for each of its parameters and return value.
- Task management: You have to prepare a task list and estimate the time needed to complete each task. Additionally, prepare tasks and their estimations for DB design and code integration.
- Test plans: Prepare test plans for the system.
- Deadline/timelines: Set timelines to achieve different milestones and a tentative deadline.
- Documentation: Document all of the above before coding.
Which are some of your must-follow coding practices?
#1 Boilerplate Coding
I recommend following boilerplate coding. Major coding practices are covered via file organization, object oriented programming, code documentation, internationalization etc. Stick to it!
#2 Code Optimization
- SQL queries: Always optimize your queries. Not in the way you write them, but in the way they will be executed.
- Page load: Follow commonly used practices here-
- In CSS, use direct selectors or selectors with low specificity hierarchy as much as possible.
- JS/CSS code should be minified and should be managed in fewer files to reduce HTTP requests.
- Use a CDN to serve scaled images.
- Memory optimization: You should use variables, objects, database queries in such a way that the least amount of memory is used.
#3 Security Measures
- You should always consider security factors when writing database queries. For example, you have to ensure that your SQL queries are injection free.
- You should use nonce for form submissions to avoid cross site scripting.
- All inputs should be sanitized and the output should be secured by escaping user data.
#4 Continuous Testing during Development
Some developers write a good amount of code, say a complete function, and then finally test its output. For me, this is not a good practice. In such cases, the testing you do might not be sufficient. For example, the output might not be as expected. The developer would then have to spend a great deal of time debugging his own code using breakpoints until the issue is caught. Or for example, even if the output might be correct, it could have worked only for the given input. Such errors may then be caught during black box testing.
Instead, it’s better to keep on testing shorter brackets of code frequently.
#5 When using Third-Party Code
When using third-party code, you should make sure that it’s being used as per the licensing terms for that code. If it’s under GPL and redistributable, you can use it, but you should pass on credits to the author (somewhere in your plugin/theme file or under comments). I personally feel this has to be done out of respect for the original developer’s effort (whose code is being used).
And remember, you should not use third party code blindly. You should test the code beforehand, review it, and only if all’s well- use it. If it’s a library then you can at least search for reviews, ratings and recommendation by other developers.
#6 Revision Control
According to me this is a must follow practice for any developer. Stable code should be committed frequently during development. This not only helps you during development, when multiple developers are working at once, but can also act as a backup for your changes made. Revision history helps you track back changes made by you, or fellow developers.
What qualities do you look out for when hiring a developer?
When hiring a developer I look out following (these are qualities an ideal applicant should have):
- Should have good grasping power
- Should be a good listener
- Should have the enthusiasm for learning
- Should be able to evaluate and solve a problem from a developer’s as well as end user’s perspective
- Should have confidence
- Should be interested in the job
What I’ve noticed is that some candidates aren’t clear about their interests. If they are asked whether they would be okay with a different job profile, they agree, because they just want a job. But, that’s not right. They should be clear about the profile they would want to take up and the kind of role they will be good at.
If an applicant does not possess all of these qualities, but is quite good, I might still select him/her. But there are a few other qualities which for me, an applicant must have.
- Must have Common sense
- Must have Logic
- Must have Focus
- Must have Problem solving skill
- Must have a Good attitude
“I would never hire a person who’s egoistic or one who has a bad attitude even if he/she might be very good at technology.”
If you could change one aspect about the WordPress CMS, what would it be? And why?
I’d like to see WordPress bring back end (default admin CSS) and front end themes together. Whatever is applied to the front end should be adapted to the back end as well. The default admin panel theme can only be used as a fallback, if the active theme is missing from its place or broken.
In fact, when a person sees the site, there shouldn’t be a need to use two different terms back end and front end. I think, there has to be some functionality provided by WordPress to make the entire admin panel available on the front end, without the need to redirect between the back end and the front end.
“Eliminate the terms back end and front end from the WordPress dictionary”
When building a website, what is the biggest issue developers often tend to overlook?
Many developers do not prepare a complete documentation for the end user/client. Most plugins and themes might add their documentation as the readme file. But it’s not always the case. For example, plugin or theme authors might provide a readme file, while uploading their product on say the WordPress repository or some marketplace, because it’s mandatory. But, they tend to miss out adding some sort of documentation for a service related project.
I believe, even if each plugin and theme (used on the site being developed) has it’s own supporting documentation, there should be a final documentation to guide the client with the integration, use and flow of each plugin and the theme in the system.
Thank-you Praveen. Your answers have been insightful and they are a true reflection of you. But of course this interview can’t end without one of Praveen’s pjs… so here goes: