PHP Code Of Conduct, Discussion

« I note that after much hue and cry, and many arguments, I still do not know what color this bikeshed will be.

I feel I have been informed of the many examples of problems with colors, cultural relevance of specific hues, details of paint techniques, anecdotes of past experiences with varying colors, larger socio-economic issues reflected through color choices, philosophy of colors, philosophy *about* the philosophy of color, legal and moral issues confronted during color evaluation, the impact of other bikeshed color choices, and how specific colors (and patterns) are under-represented, the finer details of paint application personel selection, and how certain colors are representative of larger social issues being played out in microcosms in individual environments…

….but I still do not know what color this bikeshed will be.

Please advise. »

Source.

Crapware At Every Turn

I have a Cannon PowerShot camera. When I take videos it records .MOV files.

On Windows 10 I use Picasa to organize my pictures. To import and view MOV files in Picasa I need to install QuickTime.

Regrettably, the QuickTime installer doesn’t work on Windows 10.

One “recommended workaround”  is to install the K-Lite Codec pack. When I tried to install it I was prompted by this crap:

This is malware. Always click Decline.

This is the primary reason why the Windows software ecosystem sucks. Searching for straightforward solutions lands you on the worst snake oil and sleaze bag sites. They embed their garbage in “next next” dialogue hell.

Always pay attention when installing software because often, a Windows software installer includes optional installs, such as this MyStart toolbar which is essentially a Trojan horse.

PS: The K-Lite Codec pack did not solve my problem. I uninstalled and opted for QuickTime alternative instead. 

Fix CSS Path Errors by Setting Resource Root Folders In PHPStorm

While developing a plugin for WordPress I was having trouble linting CSS files in PHPStorm. One file in particular was giving hundreds of false positives for errors related to paths:

False positives
The right side gutter is all red but most of these errors are wrong.

This bothered me. I wanted to fix the reported errors but the reporting was wrong. Most of the time there was nothing to fix. After much fiddling I discovered files under a folder marked as Resource Root can be referenced as relative:

Resource Root
To fix the above, set Resource Root(s) in PHPStorm

Low and behold the errors became real! Oh crud, time to fix.

Real errors
Now the right side gutter shows actual errors (that I should fix!)

Source:

https://www.jetbrains.com/phpstorm/help/configuring-folders-within-a-content-root.html

Setting up Coveralls.io (with Travis CI and PHPUnit)

Step 1)

Register you GitHub repo with Travis CI and Coveralls.IO.

Step 2)

In your .travis.yml file, add:

before_install:
- composer require phpunit/phpunit:4.8.* satooshi/php-coveralls:dev-master
- composer install --dev

script:
- ./vendor/bin/phpunit --coverage-clover ./tests/logs/clover.xml

after_script:
- php vendor/bin/coveralls -v

Where:

  • before_install: Calls composer and installs PHPUnit 4.8.* + satooshi/php-coveralls.
  • script: Calls the installed version of PHPUnit and generates a clover.xml file in ./tests/logs/clover.xml. (This XML file will be used by PHP-Coveralls.)
  • after_script: Launches satooshi/php-coveralls in verbose mode.

Step 3)

Create a .coveralls.yml file that looks like:

coverage_clover: tests/logs/clover.xml
json_path: tests/logs/coveralls-upload.json
service_name: travis-ci

Where:

  • coverage_clover: Is the path to the PHPUnit generated clover.xml.
  • json_path: Is where to output a json_file that will be uploaded to the Coveralls API.
  • service_name: Use either travis-ci or travis-pro.

Step 4)

Add badges to your GitHub README.md file.

[![Build Status](https://travis-ci.org/NAMESPACE/REPO.svg?branch=master)](https://travis-ci.org/NAMESPACE/REPO)
[![Coverage Status](https://coveralls.io/repos/NAMESPACE/REPO/badge.svg?branch=master&service=github)](https://coveralls.io/github/NAMESPACE/REPO?branch=master)

Replace NAMESPACE and REPO to match your GitHub repo.

eXtreme Go Horse (XGH) Process

eXtreme Go Horse (XGH) Process

1. I think therefore it’s not XGH.

In XGH you don’t think, you do the first thing that comes to your mind. There is no second option as the first one is faster.

2. There are 3 ways of solving a problem: the right way, the wrong way, and the XGH way.

The XGH way is exactly like the first two but faster. XGH is faster than any development process you know (see Axiom 14).

3. You’ll always need to do more and more XGH.

For every solved problem using XGH seven more problems are created. And all of them will be solved using XGH. Therefore XGH tends to the infinite.

4. XGH is completely reactive.

Errors only come to exist when they appear.

5. In XGH anything goes.

It solves the problem? It compiled? You commit and don’t think about it anymore.

6. Always commit what you code.

If things go wrong your part will always be correct… and your colleagues will be the ones dealing with the problems.

7. XGH never misses a deadline.

Schedules given to you by your clients are all but important. You will ALWAYS be able to implement EVERYTHING in time (even if that means accessing the DB through some crazy script, breaking other parts of the software, etc.)

8. Be ready to jump off when the boat starts sinking. Or blame someone else.

For people using XGH someday the boat sinks. As time passes the system grows into a bigger and bigger monster. You better have your resumé ready for when the thing comes down. Or have someone else to blame.

9. Be authentic. XGH doesn’t follow patterns.

Write code as you may want. If it solves the problem you must commit and forget about it.

10. There’s no refactoring just rework.

If things ever go wrong just use XGH to quickly solve the problem. Whenever the problem is too big and requires rewriting the whole software it’s time for you to jump off before the whole thing goes down. (see Axiom 8)

11. XGH is anarchic.

There’s no need for a project manager. There’s no owner and everyone does whatever they want when the problems and requirements appear.

12. Always believe in improvement promises.

Putting TODO comments in the code as a promise that the code will be improved later helps the XGH developer. He/She won’t feel guilt for the shit he/she did. Sure there won’t be no refactoring (see Axiom 10).

13. XGH is absolute.

Delivery dates and costs are absolute things. Quality is relative. Never think about quality but instead think about the minimum time required to implement a solution. Actually, don’t think. Do! (See Axiom 1)

14. XGH is not a fad.

XP, Scrum, Lean? Those are just trends. XGH developers don’t follow temporary trends. XGH will always be used by those who despise quality.

15. XGH is not always WOP (Workaround-oriented programming).

Many WOP require smart thinking. XGH requires no thinking (see Axiom 1).

16. Don’t try to row against the tide.

If your colleagues use XGH and you are the only sissy who wants to do things “the right way” then quit it! For any design pattern that you apply correctly your colleagues will generate ten times more rotten code using XGH.

17. XGH is not dangerous until you see some order in it.

This axiom is very complex but it says that an XGH project is always in chaos. Don’t try to put order into XGH (see Axiom 16). It’s useless and you’ll spend a lot of precious time. This will make things go down even faster. (see Axiom 8) Don’t try to manage XGH as it’s auto-sufficient (see Axiom 11) as it’s also chaos.

18. XGH is your bro. But it’s vengeful.

While you want it XGH will always be at your side. But be careful not to abandon him. If you start something using XGH and then turn to some trendy methodology you will be fucked up. XGH doesn’t allow refactoring (see Axiom 10) and your new sissy system will collapse. When that happens only XGH can save you.

19. If it’s working don’t bother.

Never ever change – or even think of questioning – working code. That’s a complete waste of time, even more so because refactoring doesn’t exist (see Axiom 10). Time is the engine behind XGH and quality is just a meaningless detail.

20. Tests are for wimps.

If you ever worked with XGH you better know what you’re doing. And if you know what you’re doing why test then? Tests are a waste of time. If it compiles it’s good.

21. Get used to that ‘living on the edge’ feeling.

Failure and success are the same thing. People normally think that a project can have greater chances of failing when using XGH but that’s just one way of seeing it. The project failed. You learned something with it? Then for you it was a success!

22. The problem is only yours when your name is in the code comments.

Never touch a class of code which you’re not the author. When a team member dies or stays away for too long the thing will go down. When that happens use Axiom 8.


File Under: Funny
Source: http://www.gohorseprocess.com.br/

SCRUM Open Assessments

“The way to make a million dollars is to start a religion software development methodology.”

What does it mean to be a SCRUM disciple when you are a lone freelancer working remotely? For me it means the knowledge you retain by practising SCRUM in an Agile work environment fades.

Doing these open exams once-in-a-while helps jog my memory:

…bet you can’t beat my scores!

Developer Open
100% of my SCRUM – up to you true star.

Point:

Counterpoint: