Sunday, February 24, 2019

Coding Concepts: What's the Difference Between a Platform, a Framework, and a Library?

I remember way back when I was getting started in coding and programming (and dinosaurs roamed the earth), one of the things that I always found confusing was the differences between a platform, a framework, and a library. Was their some sort of hierarchy between the 3 terms - like a platform hosting a framework that's based on multiple libraries? To further confuse matters, many coders and programmers seemed to use the words interchangeably. Let's break each term down to determine what makes a framework different from a platform, a platform different from a library, a library different from a framework, and a platform that identifies as a framework, but is still really just a platform.

Hacky's Coding Concepts: Understanding the Differences Between a Platform, a Framework, and a Library!

What is a Platform to Programmers?

Let's start by discussing the platform - what it is, what it provides, and how your code couldn't operate without it. In the programmer's world, a platform refers to the support or base that provides the code or applications you develop or that other's have developed to function. In coding, the platform is just the base or foundation upon which an application can run. It provides platform users with conformity, standards (how a coding language or program is interpreted by the computer), storage, and execution of the application. For instance, the iPhone is considered to be a platform. Thousands of app developers will typically use a different platform (like say an iMac) to develop applications to run on the iPhone platform. 

The key to remember is that the platform provides the foundation upon which other applications and programs can run. Over the last few years, the term has been broadened to include solely software based platforms - such as the browser you're using to read this article. Take Chrome for instance. Chrome has thousands of extensions you can install to add additional functionality to your computer. Why in my browser alone, I have a bunch of free extensions which anybody can pickup from the chrome web store. Here's just a few of my favorites: *deep breath*
  • Eye Dropper - Tells me the color of any color on the screen I click on.
  • Picture in Picture - An extension that lets me miniaturize and watch youtube videos in the lower corner of my browser while moving around the web (handy for tutorials ;) )
  • eBates - A plugin that offers cashback from the most popular websites (that you probably already shop anyways. This one is a must have!) I've been a member for about 3 years now, and have over $300 in cash back that's been paid into my paypal account. 100% automated after setup and added as a browser extension to chrome or firefox. It couldn't be easier to get back close to $100/year!
  • My Code Stock Clipper - Let's me save code snippets from anything I find online directly to my online code library. 
  • Adblocker Ultimate - Good bye popups and annoying ads!! 
There's thousands of free apps that make the online experience - each designed to make you more enlightened and efficient. In this case, Chrome is the platform upon which the programs run and operate. Maybe it's time for a hacky plugin extension for chrome! Hmmmmm.

What's a Framework to Coders?

In a lot of ways, a framework isn't very different from a platform - at least since we consider a browser to be a platform. The big thing that separates the two is that while a platform is the base, the framework is the tool. A framework is an application that is typically compatible with a particular platform (or multiple platforms which is referred to as 'cross platform compatible' - ie works on windows and apple products) that is used to develop and deploy other applications.

Think of a framework as you would the framework of your house or apartment or your mom's basement. The framework is the wooden (or sometimes metal) supports that provide the support for everything else in your home. It is the canvas upon which home renovators create their masterpiece (or in my case, a bunch of half finished projects that never quite seem to get done). In the case of programming, the renovator is a lot like the programmer. They may alter many different things about the house, or even add an extension, but the framework - the main support structure of the house - typically remains unchanged. In a coding framework, the underlying code typically remains unchanged, though it can be modified by a programmer - typically by using various calls and methods predefined by the framework. Thus, if your framework can't support putting a fireplace in your bathtub, you wouldn't do it. I suppose you could 'technically' build an extension to your framework to add such luxurious amenities, but you'd likely be the laughing stock of all the other renovators and probably everyone else - then again, you could start a new trend and retire a multi-bajillionaire. 

So here's where we're at - you start with a platform as the foundation for your project. It's the hardware and software that combine to allow you to code. The subset of this a framework, which is a specific tool you can use that operates within your platform to make developing applications faster and easier. 

What's a Program Library?

Sometimes I wonder if my brain needs to be upgraded, because I can only recall about 1/3rd of what I read. My wife on the other hand never seems to forget anything. Just try and win an argument with her and you'll see what I mean, lol.

Right, let's talk about one of the greatest time savers in the programmers coding arsenal - coding libraries. One of the smartest things a professional developer once told me was something I heard about 5 or 6 years ago after I asked, 'What's the one bit of advice you'd give aspiring programmers?' 'Hacky,' he says, 'if you're thinking about writing some code, chances are it's already been written.' What a jip. I was like, that's not how you become one with the Force! What kinda Jedi bullshit is this?! Turns out (even if it wasn't done in a manner that presented as much flare and creativity as I'd like), his advice was priceless; and thanks to libraries, much of that code is now at our fingertips if you know where to look! 

Let's take a look at some of the most popular coding languages to examine just how useful a library can be. We'll start with javascript!

Javascript Libraries

Javascript is an object oriented programming language or OOP for short. "Ya down with OOP, yeah you know me! Ya down wit OOP, yeah you know me!" Showing my age there for a second! Object oriented programming is a programming methodology that concerns itself with object analysis and manipulation rather than an action and logic driven response. A simple example of OOP is to consider a car. The car is the object, and a car can have attributes (or descriptors). Some attributes the car might have are: color, type, and model. The descriptions provided are the values: red, truck, and F-150. 

There are a couple thousand javascript libraries that you can tie your code into to make programming easier. In essence, a library prevents the need to reinvent the wheel every time you code. Let's take a look at just how many wheels and rims are available by searching javascripting.com. Since my whip has got to look fresh, I'ma gonna get me some spinners. The number of libraries is so expansive, that it literally brings up a library called spin.js when I search for libraries named 'spinners'. Now, the library isn't for making images of cars wheels spinning, spin.js is actually a library for the spinning/loading animated graphic that you see when an app/page is loading. Still pretty cool, huh? It got me thinking though. I wonder if bubrub and lil sis's 'whistle tip' will show up....bah, no such luck. The point is, check it out! You never know what you'll find. For instance, while searching for 'whistle tip', I came across jQuery-JSONP...why it brought that up I have no idea, but it's an interesting library I might have to check out for one of my apps in the near future. 

The Conclusion When Examining Platforms, Frameworks, and Libraries

There is a hierarchical structure built into the coding ecosystem - a library is typically used in various frameworks by coders looking to bring a sense of simplicity and conformity while coding on their favorite platform. That doesn't mean you can't have a framework and library named the same thing. For instance, there are both javascript libraries and javascript frameworks. The difference is determined by their functionality. Consider the following diagram: 

A framework will call your code for instructions, and your instructions may include to 'include' a specific javascript library. Hence, the framework now contains a library.

Hopefully, this coding concept tutorial has helped shed some light on the differences between platforms, frameworks, and libraries. Any questions, post in the comments section below. :) 

Friday, June 8, 2018

Adobe Photoshop CS6 - How to Increase the Font and Text Size of the User Interface Menu

Come on, Adobe!! Why you gotta do us so wrong?! Honestly, how it is a GRAPHICS PROGRAM like Adobe Photoshop CS6 not allow the user to easily update the GRAPHIC SETTINGS to increase the the size of the font displayed in the user interface?? Major Fail.

Hey there graphics groupies, and welcome to another Hack Daddy instructional article on how to fix the sadistically small font Adobe Photoshop CS6 forces on us when using  high resolution or 4k screens. Whats worse is every help article you've read on the topic tells you to go to the preferences and simply change the default font size which DON'T WORK. It doesn't take long for the microscopic print start causing problems with your strict production schedules...well, that or coming out with the latest and greatest meme to take the internet by storm. 😎


Ok, so that meme is kinda lame...just like the Adobe Execs that decided to leave us all high and dry! F'n bastids...I should send them my Optometrist's bill! Alright, let's get on to fixing the problem of CS6's ridiculously small menu items. I wish I could say it's as easy as updating a simple setting, but it's slightly more involved then that. 

Update the Windows Registry to Help Increase the Size of the Photoshop CS6 Menu Text


Step 1: To update the size of Adobe Photoshop CS6 menu font size, start in windows registry:

A) Open Windows Registry: Go to your search or run prompt (in your start menu), type regedit, and hit enter.
B) Navigate to the following folder once the windows registry is open:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
C) We'll create a new registry key. Right click the area that houses the present keys and select, "New" and then click "DWORD (32-Bit) Value". When prompted to enter a new key name, enter "PreferExternalManifest".


D) Next we need to update the new key we just created. Right click "PreferExternalManifest" and select "Modify". Change the value from "0" to "1" and the Base category to "Decimal".

With the registry updated and ready to look for a manifest file, it's time to create...well, the manifest file!

Creating the Manifest File that will fix the Adobe Photoshop CS6 Menu Small Text Issues

E) We'll be correcting the issue by using a manifest file. What is a manifest file? Think of a manifest file as a sort of read me file for your operating system. It's loaded with meta data - basic settings and descriptors for your program - its name, license, version, and accompanying files. Creating a manifest file all you need to do is name the file the same name as the executable and add '.manifest' to the end of the file name. So in this case, our executable name is 'photoshop.exe', and the file we'll be creating is called 'photoshop.exe.manifest'. All we did when we updated the registry in our previous steps was telling windows to look for a manifest file when the exe file is run. Simple enough, right? Here's the manifest file code:

Open notepad as an administrator (right-click the file after typing notepad in windows search bar and click 'run as administrator'), and copy and paste the following text into a blank document. The last thing to things are VERY IMPORTANT:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0" processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.21022.8"
processorArchitecture="amd64"
publicKeyToken="1fc8b3b9a1e18e3b">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

Photoshop.exe.manifest File Save Location

1) Make sure you save the file with the right name - 'photoshop.exe.manifest' and as the right file type - 'All Files' and encoding as 'UTF-8'. 

2) Make sure you save the file in the right place - in the same folder as your 'photoshop.exe' executable file. (For default installations, that's usually: C:/Program Files (x86)/Adobe/Adobe Photoshop CS6, but your installation may vary)
Not quite as easy as changing zoom or display settings in photoshop itself, but it should get the job done. If for some reason it doesn't work, let me know in the comment section below and I'll see what I can do to help. 



Thursday, May 3, 2018

Fakey McFakerson's Fake Product Reviews and Why Amazon Hasn't Done Jack To Stop

If you're like us and love you some Amazon, you've probably noticed the once reliable customer reviews - especially the 'verified purchaser' reviews - posted by other Amazon users may not be as reliable as they once were. We'd sort products BY customer reviews using the star rating system to help us decide which product was best for our needs.

If there's one thing I detest in this world, it's liars. Bottom feeding scum suckers that will do anything to cheat you out of a buck. Worst of all, Amazon hasn't done anything to curb the never ending flow of fake product reviews. After all, why should they? Amazon get's a piece of the action. There's advertising revenue for sellers that sell through Amazon's website. There's fulfillment dollars for sellers that use Amazon's fulfillment services. 

To help Hack Nation identify and disregard Fakey McFakerson's Fake Product Reviews, here are a few tips. To help describe the process, I'll take you through a recent search I performed while looking for a mother's day gift for the wife - an economic smart watch. 

Type in 'smart watch' to search Amazon for a variety of, well, smart watches, and right off the bat you're presented with this watch as your top choice:

Wow! Only $14.99 for a smart watch...looks like 4.5 stars out of 5 with 43 reviews. Seems like a great option! Let's head to the products detail page and check out the features on this bad boy. Ok...we've got quick charging capabilities of only 1 hour, up to 3 hours of phone talk time, and up to 6 hours of music, and up to 160 hours of standby time. What's not to love? It even supports 'all features of android smart phone'.

If you're like most people, you don't want to waste a bunch of time reading product features from top to bottom of 10 different products trying to make a purchase decision. Hence, you rely on the testimonials of other 'verified purchasers'. I've done it myself in the past. Originally, the star reviews were enough. I'd filter by products with at least 4 stars and go with the product I was happy with. After a few suspect product purchases, I started reading more and more of the reviews. So here's tip #1 on how to spot fake product reviews.

Spot Fake Reviews Tip #1: The Product Reviews Butcher The English Language


If you start reading the reviews, a huge tell with fake reviews is the outright contempt they have for the English language. I mean, they're actually painful to read, because, they go on, well, forever, punctuation, what's that? Here's 1 of the 43 smart watch reviews in Amazon's top smart watch pick (according to 'relevance'): 


Spot Fake Reviews Tip #2: You're Buying A Smart Watch, Not Ordering Chinese Take Out From City Wok

That's a Southpark reference for the overly sensitive folks in our audience. If you read a product review that's a bit 'overzealous', it's likely a fake product review. "You like this fantastic watch, it amazingly connect to all phone, it number 1 watch in my opinion."

Spot Fake Reviews Tip #3: Fake Spot

Fakespot is a relatively new tool that I just recently came across, and it's an excellent quick check tool. I don't take referral fees because the affiliate programs offered by many websites/sellers can create a conflict of interest. In other words, if you'd like to use fakespot...just google it. ;)

Let's see what fakespot thought of Amazon's most relevant product when we searched for 'smart watch' (at the time I ran the review, it only had 19 reviews):




As you can see. The reviews are total garbage. The only real reviews seem to be the one's that got 1 star. Imagine that!

I hope this article will help you make more informed purchasing decisions in the future. There are certain off brand products that are worth the money. For instance, I purchased a Microboard 4K Curved 32" monitor that I've been very happy with. After thoroughly researching the product, I found that the screen was actually built by Samsung. I've used it for nearly 2 years now, and it still works as good as the day I bought it for $600. Back then, comparable curved monitors (with faster than a 60Hz refresh rate) were well north of $1k. 

In the end, if you're short on time take a glance at the reviews and see how bad the english and punctuation are or head over to fakespot and see what they think. The scan of the reviews can take a few minutes to complete, but are well worth it to make sure the product you're buying isn't total junk.




Sunday, September 24, 2017

Web Server Wars: Rise of the Virtual Machines - Our Review of Oracle's Virtual Box

Web Server Build: Test 1 - Oracle's Virtual Box


The first thing we noticed when setting up Oracle's Virtual Box on our Windows 10 Pro machine was the wide range of plugins they offer and various configurations as soon as you begin the installation process. We were able to select any of the following options to include in the install. The space required for the install is 171 MB, with all of the subfeatures requiring less than 1 add'l MB of space...so the application does take up a fair amount of space.

Step 1: Selecting relevant subfeatures included with the Virtual Box Installation




The USB Support will be handy in case we want to install/backup anything to a thumb drive.

We'll need the Bridged Networking option to make our virtual network cards accessible from other devices on the network (specifically, to communicate w/ the router so our web traffic knows where to go)

The Python feature is intended to be used with the Virtual Box API, and is primarily meant for developers, so we'll remove that install option.


Step 2: Select an installation location on your hard drive

We created a folder on our C: drive called 'Test' with the directory 'Virtual Box' inside. We installed each VM in the same Test folder on the same SSD drives to maintain congruency between tests.




Building the Ultimate Virtual Machine Web Server

Welcome to our series on designing, building, and deploying the ultimate in-house web server for your website. For a complete list of the articles associated with this study, please check out our educational series on: Web hosting Wars


Hacky's Guide to Building the Virtual Web Server on a Budget

I've always loved fast cars. Speed is sexy, and whether that's souping up an old sports car or re-purposing an old box you've got lying around, there's just something fun about making something more powerful. For this experiment, we'll be designing a virtual machine on my server I already have in place with the following specs:  

MOBO: Asus z270-A
Processor: Intel i7-6770
Cooling: Corsair H50 Water Cooling
Memory: 2x Corsair Vengeance PC-24000 DDR4 8GB
HDs: 2x Samsung 500gb in a Raid 0 Config connected to 2 x 6/gbps Sata Ports
GC: Gigabyte GTX 1070
OS: Windows 10 Pro


To begin, I started w/ a quick benchmark test to determine the capabilities of my system w/ a 20% overclock using the z270-A mobo built in OC configuration. Here are the results:




Certainly, nothing to write home about, but nonetheless a pretty solid system (if we don't take redundancy into account...usually I'd do a Raid 1 mirror in case one of the SSDs failed...which they seem to do somewhat frequently). To begin building our virtual machine web server, the first thing we'll need to do is compare the top 3 providers of the virtual machine software.

The 3 Top Virtual Machine Applications to Host a Web Sever

To qualify as one of the Top 3 Best Virtual Machine Applications for a Web Server, we required the following criteria:

1) Since this is a budget build, it has to be free and run in a standard desktop environment.
2) Excellent community of followers ready, willing, and able to offer free support.
3) Wide ranging compatibility across Windows, Mac, and Linux operating systems.
4) Should be easy enough to setup by relative noobs.

In no particular order, our top 3 (and a half) choices include the following virtual machine applications. For a more in depth review, click on the link for each application:

1) Virtual Box by Oracle
2) VMWare Player by 
3) XenServer by Citrix
½) Just for the Linux fans I threw in KVM (Kernel-Based Virtual Machine)

(updated results coming soon!)



Saturday, September 23, 2017

Web Hosting Wars!! Your Unbiased and Definitive Guide Comparing Self Hosting and 3rd Party Website Hosting Service Providers

Ever feel like you aren't getting the full picture when deciding how and where you should host your website - like the review sites you used to compare hosing providers might have had ulterior motives *cough* commissions *cough* you weren't privy to? Perhaps the speed and reliability guaranteed by your ISP was preceded by the qualifier 'up to' 30 mbps (megabits...not bytes) upload speeds and you don't know how truly fast and reliable your ISP is? After months of wadding through the miles of muck put out there by biased review sites, extensively researching the speed and reliability of many ISPs, and just getting fed up with the entire process, I decided it was time to confront all the BS floating around on the web and take the matter head on by creating Hacky's Definitive Guide to Building the Ultimate Web Server. I won't be taking a cent from any ISP, affiliate network, or 3rd party hosting provider, so you know you'll be able to trust the findings of this study and if you have any suggestions, feel free to offer them. Just know that any users opinions/links offered without substantiation will be banned from this site. And so, without further adieu, I proudly present this informational article series on how selecting the best web hosting option for your website!

Hacky's Definitive Guide to Web Hosting: Which host is the fastest, which host is the most reliable, and which hosting company is the most cost effective!

In this article series, we'll be discussing the following topics. While reading through the complete series is educational, you can always jump to any of the sections below to answer specific questions you may have about selecting the best hosting provider. Here are just a few of the topic we will be covering:


  • Should you host your website on your own home server or use a 3rd party hosting provider?
  • What types of hosting services are offered by outside hosting companies?
  • How should I go about optimizing my website to reduce load times?
  • What are the most important things to search engines when selecting a hosting provider?
  • How important are peripherial web site features - like SSL, hosting, and compatibility with your design platform (like Wordpress)?
  • If I open ports on my router to the internet to host my own website will it compromise the security of my system? 
  • Building the ultimate web server on a budget: 
    • Should you use a Virtual Machine?
    • Building your box: Key hardware and connectivity considerations:
      • What type of hard drive should you use:
        • Internal vs. External Drives
      • Bytes vs. Bits: There is a difference and why you should care
      • Hard Drive and Network Connections: Avoiding bottlenecks and optimizing performance:
        • PCIE (3.0 w/ 16 lanes aka x16 - 31.5 GBps or 252 Gbps)
        • Thunderbolt (40 Gbps)
        • USB 3.1(10 Gbps)
        • eSata (6 Gbps)
        • Firewire (6 Gbps)
        • USB 3.0 (5 Gbps)
        • Gigabit Ethernet (1 Gbps)
        • USB 2.0 (480 Mbps)
        • Ethernet (100 Mbps)
    • What operating system is ideal for speed and reliability?
    • Web Host Speed Trials: How do 3rd party web hosting providers compare with my in-house web server?
    • Web Host Reliability Trials: How do 3rd party web hosting providers compare with my residential ISP in-house hosted web server? 
    • What are the different types of hosting environments that 3rd party providers offer and what is the pricing difference? 
    • The in-house hosted web server: What free software packages offer you the most bang for your buck?
In-depth review? You betcha! Impartial? Absolutely, I have no loyalty nor am I paid any commissions or referral fees from any of the hardware, software, or 3rd party hosting sites cited in this study. A work in progress? Absolutely. If there's one thing that is in a constant state of flux, it's technology. Faster computers, internet connections, and software are developed on a seemingly daily basis. Consider this series on selecting the best method for hosting your website an ongoing work in progress, and by all means, feel free to submit your own opinions and observations. Ready? Time to dive in! 

We'll begin our study with an in-depth look at building your own webserver on a budget, building an optimized virtual machine, and the performance results from each medium. 

Tuesday, August 8, 2017

How to change user role account name for the subscriber, editor, author, or contributor accounts in wordpress

Sick of the "Contributor", "Subscriber", "Editor", "Author" or other lame account names wordpress sends out to define the default user roles that come with it's User Account System? I don't know why, I just always hated the role name "Subscriber", so I wasted an hour of my life trying to figure out how to change it. You would think that updating a user account role would be easy peazy Japanezy...but even with a great plugin like User Role Editor it's not as easy as you'd think.

The main purpose of the user role editor is to make editing user roles and capabilities a lot easier, so updating the name and slug / base of a user role wasn't the original intention of the user role editor.

That being said, I discovered this simple hack before I wasted $10 on a plugin that does the exact same thing. 

Here's the thing that confused me, I kept trying to figure out how to change the actual account name associated with the user role. So, in the case of "Subscriber", I wanted that user account name to be simply "User". After looking through way too many useless sites, talking about "blah blah blah, you have to add this custom code to the child theme while singing three blind mice and standing on your head ...more blah blah blah yakadee schmackadee." 

Don't think of changing the user role name and slug/base in that light. Instead, think of it as a migration. Clone the user role w/ the capabilities you are looking for to a new account w/ the role name and role slug / base of your choosing. Here's the hack that I used that will hopefully save you guys some time:


That's how simple it is, so you can imagine I was both peeved and a bit embarassed by how elementary the solution was. Keep in mind I have yet to fully test the implementation, but if this post is more than a few hours old, you can guess I didn't run into any significant issues.