Headless selenium testing, Setting Cent OS 7 Minimal0
This article is first in the 3 part series of
Testing with selenium, Jenkins and PHP Unit. Series include three posts:
- Headless selenium testing, setting Cent OS minimal.
- Understanding and setting selenium, composer and PHP Unit.
- Understanding Jenkins, Phing and automate test build.
Black box testing is one of the important testing approach for any web based product. In black box testing, a tester do not know internal working of the software but only care about input (enter URL, fill forms etc) and confirm we get expected output.
As the product functionality and pages increases, black box testing needs more and more time to test everything. Obviously it is a human nature that a person gets bored if (s)he need to do same task over and over again and soon some test cases start slipping.
Solving Jekyll issue with Mac OS X El Capitan 10.110
I recently updated my Mac OS X Yosemite (10.10) to El Capitan (10.11). Everything seems good for couple of days but as soon as I tried to run my Jekyll site, I’d a great surprise waiting for me.
jekyll serve –config=_config.yml,_config_dev.yml
-bash: jekyll: command not found
OOPs, where is my Jekyll? Expecting some of the installed programs are reverted after upgrade, I decided to install Jekyll again and found second surprise was waiting for me, instructions given on jekyllrb.com are not working any more. I followed same instructions on Yosemite in install Jekyll so I knew problem is with El Capitan, not jekyll.
After spending some time on google, visiting few sites, I finally find that Apple is now using System Integrity Protection (SIP) to restrict write access to some of system folders. This contains folder /Library/Ruby which is version of Ruby shipped with Mac. With SIP, ‘sudo gem install jekyll’ is no longer possible.
Selecting right PHP framework for your next project0
There is no thing best in the world. If something is best, it means, others simply wont exist and if exist, won’t survive.
Same is true for PHP frameworks. Presence of multiple frameworks is proof that no framework is best. So how will we select right framework for our next project?
I am Kapil Sharma, Technical Architect at Eastern Enterprise, with 10.5 years of professional experience in web application development, using different programming languages, CMS & frameworks. This article mainly shows how do I select framework for my next project. Personally I have worked with Zend Framework 1 (not 2), Symfony 1 & 2, Code Ignitor (not working any more), and Laravel 4 & 5. So I might not be the right person to compare all frameworks but it doesn’t stops me selecting right framework for next project, does it?
Please note, this article list down my points for considering framework for next project. There could be many who might not agree with me, and I respect their views.
To keep article short, I am assuming we already selected PHP as programming language and ruled out CMS. So only PHP frameworks are considered in this article.
Reading, reading and reading…..0
One of the common questions that a developer have, how to upgrade next technical level? Well everyone have their own ways but one common thing that includes in nearly every answer, upgrade yourself.
How do we upgrade ourself? Simple way is to read as much as possible. Follow some good programmer/speaker and read what they say. Still reading take some time and many of us complain we are out of time, are we really? How much time do you waste while waiting in queues, for a meeting, ready to go out but waiting for family/team to get ready. There are lot of example when we wait 10-15 minutes, utilize that time to read?
To utilize that time, I generally collect contents on my mobile/tablet using different tools like pocket, flip board etc. Recently I started collecting them as PHP Reboot monthly magazine on flip board. Install flipboard on your android/Iphone/kindle and subscribe the magazine, which contains many important blog for current month and (planned to) publish monthly. Here is October issue.
Proper code case0
Following well defined coding guidelines is very important for a team (two or more developers). Proper coding guidelines help team members to understand the code written by other developers and thus improve efficiency of the team.
Although all teams develop their own coding guidelines, there is some basics that will always stick. You can define if you want to use camelCase or snake_case but many times, developers find it difficult to understand the meaning of different cases. So in this article, we are going to define different cases used in programming.
It have all the words in lower case and different words are separated by underscore (_). It is mainly used used and popular in wordpress and old PHP projects. Examples:
Spinal-case or kebab-case or lisp-case
GEt 50% off on Meetup.com0
Meetup.com is very good platform to organize your meetups. I recently planned to organize my PHP meetup. Price is not too much, just 2 dollers/month for 6 month plan; $12/6 months (In Indian Rupees as per exchange rate, approx Rs. 720 as of now.)
Not a huge amount but still if you are serious about meetups, you can get 50% off on first billing. Just start creating your meetup group and when you reach to payment page, close the browser/tab. With in 2-3 days, you will get mail from meetup.com offering 50% discount, applicable for limited period. Grab it immediately.
Please note, in case you had not made your mind to start meetup gorup, dont try this trick. You get this offer only once and once it is expired or used, same trick will not work on your account.
Responsibilities of technical user group0
I recently started thinking (mind it, just thinking) to start new PHP user group in Pune. Why? Isn’t there any PHP user group in Pune? Actually there are three.
First one is inactive since last 2-3 years so lets not count it.
Second and third are relatively new and active, but I PERSONALLY feel they are going in wrong direction. Please note this is my personal thinking and I might be wrong. Since I agree I might be wrong, lets not go into details. However I’ve a basic idea of what a PHP user group must do. I’m just writing my idea, please correct me if I’m wrong.
- First and most important, user group is a community and a community do not belong to anyone particular. One could be organizer, lead contributor but one can not be owner of a community. If there is a owner, I personally feel difficult to call that group as community. For me, its a private limited company.
So if you are organized and lead contributor of a community, don’t ever try to force your decision. Listen to everyone in the community. They might be wrong but if they are wrong, explain them why they are wrong. At the same time, you might also be wrong or no one can be wrong. Key point is, in a community, listen to every one, have healthy discussion and take joint decision.
- An important responsibility of community, ‘A community must take care of its new members.’ By new members, I do not mean new members to user group but I mean students learning programming and professional developers who recently started working (less then 2 yrs exp.). A community will grow old and die if we don’t take care of new members.
- Now most important responsibility of technical user group: Share knowledge. In technical world, technologies changes rapidly. One individual can not be master in all technologies. So these knowledge shearing sessions, targeted for experienced developers, are main goal of a community. This also allow us to build relations. As senior technical person, you are not expected to have solution of each and every technical problem but at least have knowledge who can help to find correct solution to new technical challenge. Being a part of community, you get that knowledge.
We can add multiple low level goals but above three are most important high level goals of a community/user group. If they are missing, sorry I personally feel it difficult to call your group as community. Please correct me if my idea of technical user group is wrong. I’m very much open for healthy discussion.
Career 1.0: Selecting your first Programming Language2
In last 2 months, at least 4-5 computer science students asked me which language should they select/learn for their final year project and career? I was surprised what should I answer. Selection of programming language is generally based on your existing knowledge or project.
Problem here is, two of the most crucial factors of selecting programming language are missing here which make it very difficult question to answer.
Before we answer this question, we must first understand how most programmers select language for any project. There are two major factors:
- Existing knowledge.
- Project requirements.
Existing knowledge is very important. Suppose you know Java and someone give you choice to work on either Java project or PHP project. Your selection is obvious; Java. Why? Is it because Java is better than PHP? No, no language is better than other. You choose Java just because you know Java or in other words, you didn’t chose PHP because don’t know it and you are scared of learning it. Thats human nature. Changes are difficult for humans and we don’t want to go out of our comfort zone. Another reason, which is more valid, programming language is just a tool to fulfil business requirements and if I can do it with existing tool, why should I purchase another tool.
Second reason is project requirements. Now assume you are PHP programmer and you got a project to make a desktop application. Since PHP is not a good tool for desktop applications, your project requirements are forcing you to switch programming language. No matter which language you choose but you definitely will not choose PHP. Please note this is just an example when project force you to switch language but not a practical example as ‘only PHP’ developer will never accept desktop application project. However in real world, you sometimes get project that can be done in your programming language but learning and doing in some other language is more convenient, based on multiple factors like production server availability, existing team knowledge, client preference etc.
Setup Advanced PHP dev-env on Windows (Part 1)1
I regularly visit forums, stack overflow, IRC channels to ask questions and giving back open source community whatever possible for me. Obviously I learned much from those places and owe them. One of the common questions asked on community how to setup development environment. Obviously not basic one but advanced like how to setup Pear, Composer, XDebug, PHP Unit etc. All these are vital tools for development. So I’m trying to cover all these common questions on one single post.
Please note here I’m setting advanced PHP development environment on Windows 7.
PHP: Bad design: Good result0
Few weeks ago, I was just checking blogs from IT greats, as I usually do. I went through an interesting post PHP a fractal of bad design. It had a nice start-up
I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.
You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes.
You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.
You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever.
And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.
Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.
That’s what’s wrong with PHP.