Wednesday, June 29, 2016

The opposite of "last updated" = "least active"

Dev,

Today I found myself absorbed with a co-worker in search of the right term for the opposite of "last updated". I found probable terms like "wane", "stale", and "untouched", but none quite fitting and self-explanatory for users.

We asked a fellow co-worker, an analyst, who came up with "active" and "idle". Of course, why didn't I think of this? In earlier projects and working with former teams, it's common to use the phrase "most active" and "least active" in respect to projects.

So, there we have it and now I have it recorded for my future reference to never waste another couple hours trying to figure this out. I can't believe this isn't already captured in certain websites or online forums like: http://english.stackexchange.com/questions/46976/opposite-of-most-recently

Photo by betaBoston
Happy Thinking,
G2

Tuesday, June 21, 2016

Encoding - A Developer's Knowledge Requirement

Devs,

"It's really simple: Know what encoding a certain piece of text, that is, a certain byte sequence, is in, then interpret it with that encoding. That's all you need to do. If you're writing an app that allows the user to input some text, specify what encoding you accept from the user. For any sort of text field, the programmer can usually decide its encoding. For any sort of file a user may upload or import into a program, there needs to be a specification what encoding that file should be in. Alternatively, the user needs some way to tell the program what encoding the file is in. This information may be part of the file format itself, or it may be a selection the user has make (not that most users would usually know, unless they have read this article)."

http://kunststube.net/encoding/

This was a really good read and I...actually agree. Encoding isn't just a problem with data files, but also with development environments, or specifically IDEs like Eclipse. Unfortunately, just like English is not a universal language, neither is UTF-8. Let's know how we're speaking to each other to understand each other - even in the world of code.

Additional, check out Joel's article:
Cheers,

Monday, June 6, 2016

Why Facebook hasn't migrated away from PHP

Dev Fam,

Sometimes I just don't have time to play with code and simply need to up my learning by reading a *good* article. Today's article is from my question identified by a post in Quora.

https://www.quora.com/Why-hasn-t-Facebook-migrated-away-from-PHP

This is good to know considering how our young generation today of developers can be influenced like fans of an entertainer. In the field of science and technology, we can't just go with the flow of the crowd or get caught in the wave of the current. STEM folk have to evaluate into the depth of what's happening with any new technology or scientific discovery and ensure its proper usage before applying. This is especially true for any large subject matter, product, or system.


Friday, June 3, 2016

Bootcamps vs College

Dev Fam,

This is fascinating news! The debate between skills vs education to prepare an individual for the business world continues to prove that those willing to work hard (not necessarily smart) will make the profit.

http://blog.triplebyte.com/bootcamps-vs-college

I've been reading many articles on bootcamps and comparing them to colleges lately.

This article, however, forgets to factor in a HUGE variable - cost of the program. Colleges are ridiculous in expenses (i.e. tuition) for its ROI whereas bootcamps make total sense for people who need to live and do well in life.

My conclusion is still for the skills based training opposed to a college education unless a student will attend college for free, in which this student can enjoy college life and, if they are smart, use the free time to advance in many other areas like understanding and gaining the spirit of entrepreneurship.

God Speed,
G2

Thursday, May 5, 2016

CodeIgniter: (4096) Object of class CI_Output could not be converted to string

Devs,

Earlier this morning, I ran into this CI Error which puzzled me for a split second.


I did my quick online search and didn't really find any answer on StackOverflow. I read a quick response on the CodeIgniter forum and then figured out my root cause.

Problem:  I was echo'ing the set_output($arg) method.

echo($orgs ? $orgs : $this->output->set_output("Status: FAIL"));

Attempt: The set_output($arg) method already echo's the input arguments to the view. So remove the echo'ing on the method.

$orgs ? echo $orgs : $this->output->set_output("Status: FAIL");

Solution: Since the ternary operator is not identical to an if-then execution, remove the set_output($arg) method. Parenthesis added for easier readability, but unnecessary.

echo ($orgs ? $orgs : "Status: FAIL");

A nice, quick fix and my expected results worked perfectly!

Good day,
G2

Thursday, March 24, 2016

Installing Python, pip

Dev,

I've installed Python 2.7.11 and 3.5.1 onto my Windows machine. I've set both in my PATH. Interestingly, version 2.7.11 is installed on the main C:\ drive and version 3.5.1 is installed in my C:\Program Files. At first, version 3.5.1 sets its location to my User folder, but I wanted All Users to have access to this Python.

Anyhow, once set, I run in the Command Line and seems the latest version runs (i.e. 3.5.1).

Below are some basic commands.

Download Links

https://www.python.org/downloads/release/python-2711/
https://www.python.org/downloads/release/python-351/

Basic Commands

Is Python installed, Find Version

$ python --version

Is PIP installed

$ pip list

References

https://www.python.org/
https://en.wikipedia.org/wiki/Pip_(package_manager)
http://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows

http://stackoverflow.com/questions/11425106/python-pip-install-fails-invalid-command-egg-info
http://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows
http://stackoverflow.com/questions/15031694/installing-python-packages-from-local-file-system-folder-with-pip

https://pypi.python.org/pypi/slack-cli/0.1.0

Tuesday, March 8, 2016

PHPUnit - Solving my Installation Issues

Hey Devs,

Problem

I ran into a few things while trying to install PHPUnit.

I read this article and then I also did some research on YouTube and SO, but didn't find anyone who resolved my issue.
https://phpunit.de/manual/current/en/installation.html

I am running PHP via my Bitnami application.

Solution

Here's how I resolved my issue.

First, I needed to add the PHP executable into my Windows PATH.
To be clear, I added a new PATH variable pointing to my PHP.exe file and then added this variable into my PATH:

PHP_HOME: C:\Bitnami\wampstack-5.5.29-1\php
Path: ...;%PHP_HOME%



Next, I added the PHPUnit executable into my Windows PATH. However, I did create the command script as instructed in the PHPUnit webpage (mentioned above). Notice, I created the "bin" folder as "phpunit" and placed within my Bitnami application folder.

PHPUNIT_HOME: C:\Bitnami\wampstack-5.5.29-1\phpunit\bin
Path: ...;%PHP_HOME%;%PHPUNIT_HOME%


Then, I was able to continue with the instructions per the PHPUnit Installation webpage. I ran into this error, but that's ok since I only need to update the latest PHAR file from PHPUnit.
*Note: Be sure to open a new CLI each time you update the PATH.


I'm not going to update my PHP version because I'm not sure what the effects will be on my application which I'm going to use unit tests for. I'd rather get a working PHAR first and then I'll update my PHP version and begin fixing any upgrade issues. So, I'm using PHPUnit 4.8.23 instead of current stable release version of 5.2.10.


Excellent, this message reflects the one on the PHPUnit webpage! Now I can move forward with the tutorials and creating unit tests - hip hop hoorayyyy!

Quick Online Reference

https://phpunit.de/manual/current/en/phpunit-book.pdf