# Why I Stopped Saying “Busy” and Started Saying “Productive”

0.00 avg. rating (0% score) - 0 votes

One of my transformation in the last year, really the last quarter of last year, was to stop saying that I was busy. My wife or someone else would ask me how my day was and my typical response was, “It was busy.”

It was true that I had a lot of work to do, but all my recent work has been goal driven and purposeful; I did not have much if any busy work.

bus·y·work
ˈbizēˌwərk
noun: busy-work
work that keeps a person busy but has little value in itself.

So what has been my response when challenged with these questions? It’s simple, really, I have been telling people that my day was “productive”. The word “Productive” is one of those powerful words in the English language. It has the benefit of, once in the habit of using it, reinforcing the goals of the person who is using it to describe his/her day.

pro·duc·tive
prəˈdəktiv
adjective: doing or achieving a lot: working hard and getting good results

Working without a goal is just work, there is no purpose other than to make money. It will ultimately be flat and sour no matter how much money one makes. Working with goals gives you the chance to see real-life accomplishments; to cross off items and projects from to do lists which acts as an extremely powerful motivator, stress reliever, and productivity reinforcer.

Some of the happiest people, career-wise, that I have seen have been in the field of construction. Why is that? Because construction is an inherently goal driven field. The construction company gets a contract and a set of plans to build a building. Tasks need to be completed during the construction phase such as a foundation being poured, framing, plumbing, electricity, etc. Each one of these tasks gets checked off giving the crew a sense of accomplishment. Once the building is complete, that project can be marked as completed; the goal has been achieved and the crew was productive.

The flip side of that coin are some office jobs that require the employee to do the same thing day in and day out, these are often temporary jobs. Doing the same thing day in and day out is just passing a widget back and forth. Sure you could mark the pass as complete, but there is another, exact same widget right around the corner.

So what am I mumbling on about here? Simply put, try to be productive, not busy.

That is my thought for the day.

# Productivity Tools and Strategies for the New Year

0.00 avg. rating (0% score) - 0 votes

First off, this is not a post about reviews of tools and strategies per se, just my observations of what I have read or viewed online.

Recently, I have been looking at productivity tools and strategies as part of my New Year review. I have come to the following conclusions:

• If your “strategy” or “tool” takes longer than half an hour, an hour tops to explain the core features, it is not worth your effort. You will spend more time reviewing how the “system” works or maintaining the “system” than you will get anything productive out of it.
• If it takes a book or a series of books to explain the “system” then, well, see above.

Productivity tools and/or strategies should be simple. Period.

They should be easy to use. Period.

They should be “transferable”, that is, they should be easy for anyone to pick up and carry on with work if needed. Productivity systems should not include complicated mind-maps, I find mind-maps effective only to the people using them not others who may need to come in and pick up your work suddenly. They have their place, but productivity systems are not one of them.

In almost every book, blog, course or article I have read, one thing has been emphasized over and over again. Multi-tasking is a productivity killer. This has to be the number one key to productivity.

The second thing that almost all places have in common is that interruptions, obviously, kill productivity. They aren’t just speaking about people coming over to “shoot the sh!t”, they are mostly speaking about our electronic interruptions such as email, social media, instant messaging, etc. One book I am reading, Time Warrior by Steve Chandler even states:

“Management and efficiency studies in the work place tell us that one hour of uninterrupted time is worth three hours of time that is constantly interrupted.”

So, what should we do? We cannot just ignore these things when they are used for work. I am adopting the position of turning off notifications where I can, email for example. Nothing urgent should be sent over e-mail in the first place so checking it once every few hours should not have a negative impact on your work performance. Use your best judgment for your work situation.

So, surprise, I have come up with something that works for me. Here is a link to the Google Sheet that I am going to start using.

Weekly Estimator/Planner

Keep in mind, this is a new work in progress and subject to change. In a future post, I will explain how it works in a later post, but I want to see if you can figure it out before then.

See you in the next post.

# One Year Later…

0.00 avg. rating (0% score) - 0 votes

(Originally posted to Facebook on 12/24/2016)

I’ve been thinking a lot about this day. In a lot of ways I have been looking forward to it, yet in other ways, I have been fearing the memories of this date one year ago. I am choosing to embrace this day as the day that I was given a second chance. I will not ruin it.

One year ago, I got really sick; I had been sick for a few weeks, but it got really bad a year ago. My wife and I went to the doctor’s office before they closed. It was there that the doctor told me I had acute pancreatitis and needed to be admitted to the hospital.

For brevity sake, I will say that three days later I was in UNMC in Omaha for what would end up being almost a month.

The doctors took great care of me during this time and it is only recently that I have really come to understand the seriousness of my illness. Sepsis took hold as memories faded; there was a very real chance that I might not have made it.

Thanks to the care of the doctors and the nursing staff as well as a strong will to survive, I fought off my illness and about 6 to 9 months later, was back to full strength. I feel better now than I have in years. I have embraced a healthier lifestyle which includes giving up alcohol, eating healthier and exercising. The stress I put myself through has vanished as I picked up a healthier mental health lifestyle.

I would like to thank all of you who were thinking of me, praying for me or visited me. Without all this support, I don’t think I would be here now. It was not just my doctors, nurses nor myself alone that was responsible for my recovery but instead, all of you who gave me the strength to carry on and fight.

As most of you know, I love quotes so as I close, I want to leave you with this one that I try to remember every time I have flashbacks to that time in the hospital or have fears that I am going to get sick again. Thank you once again one and all.

“Fear doesn’t prevent death. It prevents life.”
― Naguib Mahfouz

# How to use Firefox with Selenium 3.0.0-beta2

0.00 avg. rating (0% score) - 0 votes

Selenium 3 brings about a whole new slew of changes. Perhaps among the most frustrating is the fact that the existing, built-in Firefox driver no longer works as it did in Selenium 2.53.1. It took a little research, but I finally found a solution that allows Firefox to work with Selenium 3.0.0-beta2.

Follow the below instructions and you should be good to go.

• Be sure Firefox is up to date (47.0.1).
• Be sure both selenium-server and selenium-java are up to date in your pom.xml file (3.0.0-beta2).
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.0.0-beta2</version>
</dependency>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.0.0-beta2</version>
</dependency>
• Download the geckodriver 0.10.0 (0.8.0 for support of 32-bit Windows OSes)
• Put the driver into your project (Mine is in /src/test/resources)
• Configure Selenium to run:
// Sets the marionette and path to the gecko driver
System.setProperty("webdriver.firefox.marionette", “C:\\path\\to\\geckodriver.exe”);

// The following overrides the Firefox first run page
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("browser.startup.page", 0);
profile.setPreference("browser.startup.homepage_override.mstone", "ignore");

// Create the webdriver
WebDriver driver = new FirefoxDriver(profile);

# Php – If vs Switch

0.00 avg. rating (0% score) - 0 votes

I’ve been wondering for a while now if the switch statement is really more efficient than the if statement in php. I’ve read quite a few articles stating that it was. I wanted to test this out for myself.

The Test:

<?php
?>
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<title></title>
<body>
<?php
$a = ''; // If Statement$start = microtime(true);
if ($a == 'abc') { echo 1; } if ($a == 'def') {
echo 2;
}
if ($a == 'ghi') { echo 3; } if ($a == 'jkl') {
echo 4;
}
if ($a == 'mno') { echo 5; } if ($a == 'pqr') {
echo 6;
}
if ($a == 'stu') { echo 7; } if ($a == 'vwx') {
echo 8;
}
if ($a == 'yza') { echo 9; } if ($a == 'bcd') {
echo 10;
} else {
echo "<p>";
}
echo "<p>End If: " . round(microtime(true) - $start, 10) * 1000 ."<p>"; // Switch Statement$start = microtime(true);

switch ($a) { case 'abc': echo 1; break; case 'def': echo 2; break; case 'ghi': echo 3; break; case 'jkl': echo 4; break; case 'mno': echo 5; break; case 'pqr': echo 6; break; case 'stu': echo 7; break; case 'vwx': echo 8; break; case 'yza': echo 9; break; case 'bcd': echo 10; break; default: echo "<p>"; break; } echo "<p>End Switch: " . round(microtime(true) -$start, 10) * 1000 ."<p>";

?>
</body>
</html>

The Result:

The if statement took 0.0190725 milliseconds.

The switch statement took 0.0061989 milliseconds.

That’s a difference of 0.0128736 milliseconds. That may not sound like much but when you take into account that the switch is 32.5 times faster in this example than the if statement, over the course of millions of computations, it is a rather significant increase.

I did change the value the statements were checking several times. Even in cases of checking five values or less, the switch statement is still around twice as fast as the if statement.

Conclusion:

This experiment of mine is by no means scientific; I didn’t use if/else statements nor did I break the if statement if a match is found which I suspect would bring the if statement closer to the speed of the switch statement. What this does tell me is that, in most cases, it is probably better to use a switch statement than an if statement in your php code. Feel free to correct me if I am wrong.

# Installing and Configuring Jenkins for Selenium Tests – Part 2

0.00 avg. rating (0% score) - 0 votes

In the previous post, I talked about installing Jenkins on an Ubuntu server. Since that time, I have upgraded to Ubuntu 16.04. There is at least one small differences, but all in all its the same. When installing Maven on 16.04, the maven2 package is not available from the apt repository but maven is. Maven seems to work just fine.

One other note that I would like to point out with the previous post before moving on is that I added instructions for downloading and installing Selenium. As long as you are using Maven, this step is unnecessary if the Selenium package is included in your pom.xml file. Once Maven runs, it will automatically download Selenium and set the correct run path. I apologize for any confusion that may occur because of that.

In this post, we will be covering the following:

• Configuring Jenkins
• Setting the Global Tool Configurations
• Setting the Node Configurations
• Creating the Display
• Installing Jenkins Plugins

Configuring Jenkins

We last left off with Jenkins installed and being able to navigate to it in a web browser (http://<server>:8080) but left off there. As you have probably noticed by now, Jenkins is complaining that it needs to be unlocked. Lets go over that now:

The following instructions show you how to unlock and initially setup Jenkins:

1. $cat /var/lib/jenkins/secrets/initialAdminPassword 2. Copy that key from the terminal 3. Paste the key into the ‘Administrator Password’ field 4. Click on the ‘Continue’ button 5. Click on the ‘Suggested Plugins’ option 6. Create an admin user by filling out the form 7. Click on ‘Start Using Jenkins’ The ‘$ cat /var/lib/jenkins/secrets/initialAdminPassword’ command prints out the initial password in the terminal. More Information

Now that that is completed its time to move on to actually starting to configure Jenkins. Before we do anything Jenkins is built to do (ie, code deployments, running automated tests, etc.), we need to get it configured. This may get a little long, but bear with me, it will be worth it.

Setting the Global Tool Configurations

The Global Tool Configurations is the place to globally set up the various aspects of the Jenkins system. It is here we will setup the path to the Java SDK. There are other options here, but for the purpose of initially setting up Jenkins, we will only worry about the Java SDK.

1. If you are not logged into Jenkins, please do so now.
2. Click on the ‘Manage Jenkins’ link
3. Click on the ‘Global Tool Configurations’ link
4. Click the button that says ‘Add JDK’
5. Enter a name for the JDK (I used ‘Java 8’)
7. Enter the path to the Java JDK in the JAVA_HOME input box. In Ubuntu this is usually ‘/usr/lib/jvm/java-1.8.0-openjdk-amd64’ at the time of this article. Your installation may be different, you may have a name like java-1.8.0-openjdk-x86 if you are running a 32-bit Ubuntu installation.
8. Go ahead and click ‘Save’

Setting the Node configuration

If you are still in the ‘Manage Jenkins’ section, click on the ‘Manage Nodes’ link. If not, click on ‘Manage Jenkins’ followed by the ‘Manage Nodes’ link. The nodes are the other machines that are connected to Jenkins. For now, we only have the one, master node to configure.

1. Click on the configuration icon on the right side. It looks like a gear.
2. Click on the ‘Environmental variables’ checkbox.
3. Click on the ‘Add’ button that appears.
4. For the name, enter ‘DISPLAY’
5. For the value, enter ‘:99’ Please note the colon before the 99.
6. Press the ‘Save’ button.

What we’ve just done is setup the display information for the headless browsers that will be running our tests. Think of it as a ‘virtual monitor’ we just plugged into Jenkins. Now we need to put that monitor to work.

Creating the DISPLAY

1. create a new file called something like ‘startXvfb’ by entering the following in the terminal:
$sudo pico /etc/init.d/startXvfb 2. Paste the following script into it (curtesy of Installing Selenium With Jenkins on Ubuntu – Lextech). Please note the line ‘/usr/bin/Xvfb :99 -ac -screen 0 1650x1080x24 &’ in the script. Notice the ‘:99’? This is the virtual frame buffer we set up in the node configuration; the ‘virtual monitor’. This is how Jenkins knows where to display the tests. More information =============== Begin Paste ============ ### BEGIN INIT INFO # Provides: startXvfb # Required-Start:$local_fs $network # Required-Stop:$local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description:Start daemon at boot time
# Description:      Enable service provided by daemon.
### END INIT INFO

#!/bin/bash
if [ -z “$1” ]; then echo “basename$0 {start|stop}”
exit
fi

case “$1” in start) /usr/bin/Xvfb :99 -ac -screen 0 1680x1050x24 & ;; stop) killall Xvfb ;; esac =============== End Paste ============ 3. Save the file 4. Make the file executable by entering the following in the terminal:$ sudo chmod u+x /etc/init.d/startXvfb
5. Start the display by entering the following in the terminal:
2. $sudo apt-get install maven2 Like before, thats all there is to it. Moving onto the next prerequisite, we will have to do a little bit more work. Its not bad, so its time to roll up our sleeves and dig in. ### Selenium Server 1. Go to: http://docs.seleniumhq.org/download/ 2. Select the latest Java version to download 3. Place the server in a relevant location such as /var/lib/selenium/ That wasn’t too bad now, was it. As we move on, things start to get a little more complicated but I promise you that you can do this; its not as bad as you think. ### The headless browsers The headless browser installation looks a little scary, but its not too bad. I will try to explain each of the steps as best I can as we do them. The commands to enter into the terminal will be first, followed by the explanation. 1.$ wget -q -O – https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add –wget is a command to go out to the internet and fetch an element. Most often you will see it used to download files from the command line of a terminal. In this case, we are using it to install the public key for the Google apt repository that houses the Chrome web browser. The -q option turns off verbosity to the shell output and the -O concatenates all the information together into one file. In a nutshell, this installs the key to your apt repository. More information
2. sudo sh -c ‘echo deb http://dl.google.com/linux/chrome/deb/ stable main > /etc/apt/sources.list.d/google.list’This command adds a line to the local apt repository for the chrome browser to be installed in the next step. It compliments the command from the previous step. The ‘sh’ is the shell command. The -c reads commands from the string instead of from the standard output. The greater than sign (>) is a pointer to write the text ‘debhttp://dl….etc’ to a file. More information
3. sudo apt-get update && sudo apt-get install -y xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic xvfb x11-apps  imagemagick firefox google-chrome-stableDon’t be intimidated. The command here installs items needed for the browsers to run in headless mode as well as the browsers themselves. The first part of this command (sudo apt-get update && sudo apt-get install -y) is actually two commands put together; apt-get update and apt-get install. The -y answers yes to all confirmation dialogs. The rest of the command is a shopping list of sorts for the apt-get install command; these are the items that will be installed. More information

### Chrome driver

Even though we installed Chrome in the previous step, Selenium WebDriver needs to have a separate driver installed to run the Chrome browser. This small file can be downloaded here. Once downloaded, we need to put it in some sort of logical location. I put my copy in a folder called ‘drivers’ in the Jenkins folder (/var/lib/Jenkins). Once the file is safe in its new home, we need to be sure to make it executable. We do this by executing the following command:

• $sudo chmod u+x /path/to/chromedriver ### Git Git is a version control system that is used for software development. It has a similar function as SVN, but its an entirely different and lighter-weight system. The technical explanations are outside the scope of this article so I will skip them. It is important to know that we are not installing the repository itself, but rather the client so that Jenkins can connect to Git and grab the source code we want to test. Installing Git is as easy as the first two items we installed. It is done in the following manner: 1.$ sudo apt-get update
2. \$ sudo apt-get install git-core

Now that that is done, it is time to move onto the main course, installing Jenkins.

### Jenkins

After having all of our prerequisites installed, we can now install Jenkins.

1. wget -q -O – https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add –
2. sudo sh -c ‘echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list’
3. sudo apt-get update
4. sudo apt-get install Jenkins

I am not going to go into the details of the commands here as they have been explained earlier in this article. If everything was done correctly, Jenkins should now be installed. You can verify this by going to the URL for Jenkins in your favorite browser:

As I mentioned in the opening of this article, I did not know how I was going to end it but now I think this is the perfect place… for now. Look forward to an article in the near future about configuring Jenkins to run automated Selenium tests.