Weekly Review – 08.11.2016

Follow Roger Facebooktwittergoogle_pluslinkedinrss

I want to take a moment to pause and remember 9.11, and to ask you to do the same. Those of us in the U.S. often take for granted the life we are able to lead, and the freedoms we enjoy. Those freedoms were attacked and, likely forever, changed on 9.11. We need to always remember how very fortunate we are.

Has your online account been compromised? Here is a site that lets you check, using your email address or username. I found a few places where my info had been stolen. I, of course, changed my login info at those sites Here it is: https://haveibeenpwned.com/

Is your email in-box out of control? Check out unroll.me . I have been using unroll.me for a few months, and I have to say, it has made a huge difference in the “cleanliness” of my email in-box.

NASA remembers 9.11 NASA has an interesting article about 9.11, and some images of New York City from space on 9.11.2001. NASA remembers 9.11

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

Laracon US 2016, Links to slides

Follow Roger Facebooktwittergoogle_pluslinkedinrss

Amanda Folson ‏@AmbassadorAwsum
Zero to API with Lumen – https://speakerdeck.com/afolson/zero-to-api-with-lumen

Adam Wathan ‏@adamwathan
Curing the Common Loop – https://speakerdeck.com/adamwathan/curing-the-common-loop

Ben Ramsey @ramsey
HTTP Is Dead, Long Live HTTP2 – https://speakerdeck.com/ramsey/http-is-dead-long-live-http2-laracon-2016

Matthew Machuga ‏@machuga
Tests Should Tell a Story – https://speakerdeck.com/machuga/tests-should-tell-a-story

Chris Fidao ‏@fideloper
Server Suvival – https://speakerdeck.com/fideloper/server-survival

Sandi Metz ‏@sandimetz
Get a Whiff of This - https://speakerdeck.com/skmetz/get-a-whiff-of-this

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

Weekly Review – 07.03.2014

Follow Roger Facebooktwittergoogle_pluslinkedinrss

I have only a couple of things for you this week.

Science News – On the evening of Monday, July 4, barring any problems, NASA’s Juno will be the first spacecraft to orbit Jupiter since Galileo in 2003. Here is a link to an article about the mission. And, for some incredible info from NASA, here is their web presence for the Juno mission: NASA – Juno. It (the page, and space) is worth the exploration.

Interesting quote – (from a character with whom I can relate) Brains first, and then hard work. ~ Eeyore

For my fellow US Citizens – Happy Independence Day! Keep in mind how fortunate we are to enjoy the freedoms that we have. And, remember the price of that freedom. Many have given much to defend it.

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

Weekly review 06.26.2016

Follow Roger Facebooktwittergoogle_pluslinkedinrss

Welcome back! Thanks for reading again. I don’t have much for you this week. But, there are three things to, hopefully, initiate some thought.

TED Talk – This week I watched a short TED talk about mindfulness. The talk is by mindfulness expert Andy Puddicombe. Puddicombe, a former Buddhist  monk talks about the importance of taking a break – from everything. The talk is worth the 10-minute investment. All it Takes is Ten Minutes 

Interesting study –  Do you think food tastes better with some music? There may be proof that you are right. Professor Charles Spence (Wikipedia) is conducting research on how sound and music affect taste. Prof. Spence is an experimental psychologist at the University of Oxford. Here is the Oxford website for the study of food. And, here is the sound and taste study abstract.

Quote to ponder - “Don’t be fooled by the calendar. There are only as many days in the year as you make use of”. Charles Richards. BrainyQuote.com, Xplore Inc, 2016. http://www.brainyquote.com/quotes/quotes/c/charlesric170739.html, accessed June 24, 2016.

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

Weekly Review – 06.19.2016

Follow Roger Facebooktwittergoogle_pluslinkedinrss

Happy Fathers Day to all the dads out there. A special greeting and thank-you to my dad, who taught me much and instilled an engineering mindset in me and a curiosity about how things work.

This week I learned – a new way to think about entropy and chaos. This week I read  Spooky Action at a Distance (See note below) by George Musser, a book about quantum physics, and specifically quantum entanglement. In it, the author says that entropy means an increase in variety. This thinking is interesting to me because it brings a new way to look at chaos. The book is a good read, if you have any interest in physics.

Interesting quote – “Most people overestimate what they can accomplish in a week, and underestimate what they can accomplish in a year” – Tim Ferriss

Protect your hearing – I grow wine grapes as a hobby. This fact means that I have a good deal of “yard work” to do. I spend 6-10 hours a week doing work that usually involves some type of power equipment. I am also a musician, and want to protect my hearing. I recently invested in noise-canceling headphones, and found a terrific product – 3M WorkTunes Wireless Hearing Protector with Bluetooth Technology and AM/FM Digital Radio (90542-3DC) (See note below). These headphones are amazing. They block noise, like the drone of my mower or the very loud sound of my string trimmer, to the point that I can listen to books and podcasts while I work. And, I listen at normal volumes. They have bluetooth, AM/FM, and an auxiliary input. Check them out.

 

NOTE: full disclosure – that link is an affiliate link. I get a small commission, on purchases made through it. These commissions help cover part of the expense of maintaining this site.

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

Another Start

Follow Roger Facebooktwittergoogle_pluslinkedinrss

I am amazed at the number of you who read my posts. I really appreciate all of you. And, I apologize for my absence. The challenges of changing jobs, and the stresses leading up to the change, took more time than I should have allowed. I am back for another start.

I am going to begin (again) by writing about 3 or 4 bullet point items each Sunday. I am going to call the series “Weekly Review”. I plan to include things like: what I read or am reading, something interesting I learned, a recipe experiment, interesting new tech, etc. I make no promises on the subject matter, or the length of the post. But, I will post. Beginning now.  Continue reading

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

A note to Times-News Readers, and to Times-News associates past and present

Follow Roger Facebooktwittergoogle_pluslinkedinrss

I really enjoy reading good fiction. A great book draws me into the story; I become a part of it. The characters are like friends. As I read the story, I travel through the lives of the characters. When I finish a book, I feel a sense of loss. I have completed my part, and have to move away from the lives of the characters and to a new book.

A job is much like reading a book. We pour our all into our job. We become part of it, and it a part of us. It becomes something we care a great deal about; something we mold, form, and help evolve. We are drawn into it. But, there comes a time when, like finishing a book, we have completed our part. And, it is time to move on to the next book.

Today, after nearly 15 years, I am announcing my departure from the Times-News. I have completed my part.

I am so very fortunate to have worked with many incredibly talented and dedicated people at the Times-News. The newspaper industry is filled with people who are passionate about what they do. None are more passionate than the folks with whom I have worked at the Times-News. I have learned and grown tremendously thanks to each and every one.

I especially appreciate all of the people who have been part of our digital endeavors over the years. They are thinkers, experimenters, and risk-takers. We worked together to try and figure out the digital realm. We failed often, but succeeded more often. We made an impact.

Finally, I am grateful for our readers, both print and online. Our readers are people who care about our community, people who want to know what is going on in our world. They are what make what we do in the newspaper industry matter. Thank you.

Now, it is time for me to move on to a new book, new characters, and a new story. I look forward to the challenges of the future. But, I am humbled and thankful for the past that prepared me to face those challenges. I leave with a tear, but also with smiles from many great memories.

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

PHP Classes and Objects, part 2

Follow Roger Facebooktwittergoogle_pluslinkedinrss

This is part 2 of a series. Click here for Part 1

OK. We have our Person object, and we have 2 instances of it set to $jack and $jill. We have a $gender property set to male. But, our $jill object (instantiated from the Person class) should be female. We need the ability to set the gender when an object is instantiated from the class.  This can be done with a constructor method. A method is nothing more than a function within the context of a class.

A constructor method must be named __construct() – note that is 2 underscores preceding the word “construct”. The __construct() method is not required. If it does exist on the class, when am object is instantiated from that class, the method is automatically called.

public function __construct()
{
     //constructor code here
}

For our example class Person, we want the ability to set the $gender property each time we instantiate the class. We do this through the __construct() method by assigning an argument to the method. Arguments are optional on the __construct() method. Recall how we placed an argument in the var_dump() method. We will do the same, but pass a string instead of a variable when we instantiate the objects.

$jack = new Person('male');
$jill = new Person('female');

Now we have to handle the argument in our __construct() method. In the Person() class remove the value assignment of our $gender property. Then accept the argument in the __construct() method.

<?php

//set up our class
class Person {

     public $gender;
     
     public function __construct($input)
     {
          //do something with $input
     }
}

When an object is instantiated $input will be set to the value of the argument supplied in the instantiation call. We need to set the $gender property to that value.

$this->gender = $input;

I had difficulty getting my head around the concept of $this. From what we have already seen, you know that the code above is accessing the gender property on the $this object. Simply put, $this is a variable that stands in for the instantiated object. In our example we have instantiated $jill and $jack as separate Person() objects. So, on the $jill object $this refers to $jill. And, on the $jack object $this refers to $jack. The same would be true of any object instantiated from the Person() class.

Let’s pull everything together into one short script.

<?php

//set up our class
class Person {

     public $gender;

     public function __construct($input)
     {
        $this->gender = $input;
     }
}

//create 2 objects by instantiating our class twice
$jack = new Person('male');
$jill = new Person('female');

var_dump($jack->gender);
var_dump($jill->gender);

When we instantiate the object as $jack we pass the argument as ‘male’. The class accepts the argument in the __construct() method as $input. The method then sets the class property $gender as the value of $input.

The code above will output:
male
female

Hopefully, this lesson helps you understand PHP objects and classes, how they relate to each other, and gives you a start toward building your own.

Check back for future PHP lessons. Be sure to follow me on Twitter @RogerCreasy, or click the icon above.

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

Understanding PHP Classes and Objects

Follow Roger Facebooktwittergoogle_pluslinkedinrss

In object oriented programming, or OOP, classes are like factories (real-world factories, not OOP factories. I’ll write more on OOP Factories in the future). These factories define and construct objects. In learning OOP I usually saw classes described as blueprints for objects. But, they are more than just a blueprint; classes do construct objects. In PHP, we create a class using the class keyword (keywords implement built-in PHP functionality). Here is an example of a PHP class:

<?php

class Person {

     //define person here
}

Continue reading

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail

Beginners Guide to AJAX

Follow Roger Facebooktwittergoogle_pluslinkedinrss

What is AJAX?

AJAX is magic. It lets developers retrieve information from the server at runtime without a page reload. This means that a page can change in the background while a user is interacting with the page. The most well-known example is Google Suggest – when you start typing a search query in the Google search field, a drop-down with suggested searches appears. This drop-down is generated using AJAX. Continue reading

Share with your social networks Facebooktwittergoogle_plusredditpinterestlinkedinmail