35 Bad Programming Habits That Make Your Code Smell

https://techbeacon.com/35-bad-programming-habits-make-your-code-smell

Posted in jQuery, PHP, Programming | Comments Off on 35 Bad Programming Habits That Make Your Code Smell

WordPress Management

In this position, I have a lot of WordPress management to do.  We have 250+ WordPress sites (and growing).  Management of that many sites has been a nightmare to say the least.  The savior has been two programs.

The first to enter the scene was WP-CLI.  It has been a godsend in managing individual instances of WordPress from the command line.  Since all our WP installs are identical, I have written several scripts around WP-CLI that have allowed me to be able to do everything from installing a plugin across all sites to cloning an existing site into a new one (including setting up the apache conf file for the virtual host.  I absolutely love this tool.

The problem I ran into was knowing when updates needed to occur.  Enter InfiniteWP.  This is a free-to-use monitoring application that is self-hosting.  With the help of a client plugin on each WordPress install, it monitors the version status of themes, plugins, and the core of each install.  The nice thing is that it does not matter if IWP is on the same server, it can still monitor the site due to the IWP Client plugin that is installed.

There are quite a few addons for IWP as well, but we don’t really need them at this point.  Additionally, there is a script available that will install all the sites on a server into the IWP installation.  Unfortunately, they will not give it to you, but require ftp access to the server in order to install and run it.  Was not happy about that, so I wrote my own using cURL making the ajax call.  I am sure there is a better way, but this was faster to get it done.  Hopefully soon, I will be able to post at least some of the scripts I have written for this.

I will try and keep everyone update on how things go with these tools.

Posted in PHP, WordPress | Tagged , , , , , | Comments Off on WordPress Management

New Job

So long time since last posting, but I have a great new job finally.  For once, I actually enjoy the job itself, not just the company or the benefits.  This hasn’t been the case for the last 5+ years.  It is really nice.

My new position is as a Web Developer at TVI MP3.  Everything is just starting out with regards to development, but I am really looking forward to helping the company grow and mature in its web presence.

Posted in Personal, PHP | Comments Off on New Job

Morality of Death and War

I have debated saying anything on the topic as it has produced some very heated and frankly disgusting arguments and debates among friends and others.  However, I feel that I need to voice my thoughts on the subject.

The Conflict
There is currently (and for the last countless years) a conflict between Israel and Palestine.  Currently, it has come to yet another head as the leading group of Palestinians (Hamas) and Israel are launching rockets at each other.

The Casualties
If this were the Olympics, Israel would be considered the winner because of the number of casualties they have caused on the other side.  But is this really the case?  Can there ever really be a winner in war?  This is not a simple conflict, but rather a full blown war.  There are unfortunate casualties on both sides.  Casualties both of innocent individuals and combatants have occurred all around.

The Big Question
The question currently under debate is whether or not Israel specifically should be killing innocent individuals.

The Follow Up
The consensus among those with the loudest voices is that there should be no innocent lives lost and that the side that killed an innocent should be condemned and left to rot.

My Opinion
While I agree that no innocent lives should be lost, I also understand in a war, there is no helping it.  I challenge anyone to find a war where innocent lives were not lost on both sides.  Understand that I condone no loss of life.  If it were at all possible, I do not believe that any conflict should result in loss of life whether innocent or not.

Specific to this conflict, I find it morally wrong that Israel has been targeting buildings where families are known to reside.  On the other hand, Israel is doing everything in its power to make sure there are no civilians in the buildings it destroys by sending a warning shot in.

What I find morally reprehensible is that Hamas is purposely selecting schools, hospitals, and apartment buildings to launch their attacks from in the hope that Israel will not retaliate against innocent lives.

Those that side with Hamas in this are equivalent to those that put on a fake pair of glasses and say “You wouldn’t hit a person with glasses” and then cry foul when the person does.  Do you expect Israel to sit back and take the bombing, the tunnel attacks, etc. simply because the other side is using innocent people, including children, as shields?  If you expect that to happen, then I think that you need to rethink your view on the world.  Because it also isn’t that simple.  Not only is Hamas using innocents as shields, but they are targeting innocents as well, and have been as long as the conflict has been going on.

How can a rational person honestly expect Israel to just sit back and take whatever Hamas deals to them because they are too afraid to hit someone who isn’t fighting?  That is ridiculous.  Just like it is ridiculous to expect Israel to be even more exact in their missile strikes than they are.  Thankfully they level only one building at a time.  But even then they give a chance for people to get out, and Hamas will not let them.

In short, it is wrong that innocent civilians are getting killed in a senseless war.  It is also completely reprehensible and unforgivable that children and other innocent individuals are being used as shields.  That tells me that Hamas is both a coward that fights in a dirty way, and that they give no care for the cost of human life.  Whether their own or another.  It is for this reason that I will side with Israel in this conflict.  They at least have shown that they value human life in some capacity.

Posted in Politics | Tagged , , | Comments Off on Morality of Death and War

Updated .vimrc

I have updated my vimrc file and posted the updated file to https://github.com/jthayne/dotfiles

Posted in Programming | Tagged , | Comments Off on Updated .vimrc

2014 Goals

I think my goals from last year were a little too ambitious, so I have pared it down a little to the following:

Professional

  1. Contribute to one open-source project
  2. Submit a talk to at least one CFP
  3. Learn Python
  4. Write one development blog post each month

Scouting

  1. Complete Wood Badge ticket

Work

  1. Write at least 5 blog posts
Posted in Personal, Programming, Tech | Comments Off on 2014 Goals