I’m proficient in Angular.js according to PluralSight (tl;dr – I’m not)

February 25, 2018

#Angular.js #JavaScript #jQuery #MySQL #React.js

PluralSight
According to PluralSight these are my proficiencies

I know that this kind of thing is very subjective – but I took some online tests to see how I would perform. I particularly enjoyed TestDome which involves live coding. It’s a challenge doing something against the clock – even when all of the usual lookups and documentation are available. These tests were not easy. There is enough time to look up specific references or syntax – but you have to know what to look up. That seems fairly real world.

SimonSJavaScript (Hard)

SimonSPHP and WordPress (Hard)

SimonSJavaScript with jQuery (Hard)

Meanwhile – I found out about PluralSight via their tie-in with StackOverflow. I have been following various of their ‘paths’ (courses) recently as a way of consolidating / structuring / revising some of what I know – and learning some new stuff. The courses seem mostly very good.

But I was less sure about their testing. The first surprise was when I scored ‘Proficient’ on Angular.js. I got a badge. Yay! Ok – so it’s a JavaScript thing and I know a little bit about Design Patterns which helped. But I haven’t ever used Angular.js so far and I am definitely not proficient. I just tried to choose feasible answers.

These are multiple choice tests against the clock. There is no time to Google the answers. But if you read the questions carefully and have a good general knowledge of web technologies in general then many of the answers will come. You can have two goes at the tests – but you’ll get different questions.

I wasn’t surprised to do ok at the jQuery test – or that I scored relatively low on CSS. I always have to refer the documentation for CSS – even though I have used it a lot. But I was definitely surprised to score higher on node.js than on JavaScript – since I have only ever used node.js locally as a test environment. I am definitely much more familiar with regular JavaScript. Although I often have to remind myself how to do something the regular JavaScript way if I have been buried in jQuery for a while.

And apparently I’m an ‘Expert’ with MySQL. In reality I’m a competent beginner and I get stuff done by reading the documentation or carefully looking at Stack Overflow answers. I’m actually quite weak on using SQL in general – although I have no doubt that I would be quickly up to speed if that was what I was doing every day.

My other proficiencies apparently include C++, React, ‘Security For Hackers & Developers’ and ASP.NET MVC5. In reality I know about the same re React as I know about AngularJS. And I haven’t written any C++ for maybe 20 years. I would have to start again with that. I currently know very little about the world of Microsoft solutions in general (things have moved on a bit since I was programming Visual Basic). I’m just not ‘Proficient’ in all of these technologies. I wish that I were. And everything I know about security is from recipes, checklists and podcasts.

Sulby WordPress theme

December 15, 2017

#CSS #HTML5 #JavaScript #jQuery #LEMP #MySQL #NGINX #PHP #Redux Framework #Sulby Theme #thenakedbrunch.com #WordPress

the naked brunch
thenakedbrunch.com

Sulby is an in-house standalone WordPress theme developed by bunhill.com. Designed and built from scratch to be lightweight, fast, secure and efficient, the theme is ideally suited to many typical small business and / or presentation requirements.

The theme works effectively on both phones and larger devices and can be quickly tailored and styled to a client specification. Written in PHP, jQuery, HTML5 and CSS all of the required functionality is included within the theme itself – rather than depending on additional or potentially insecure and poorly documented third-party plugins which may be poorly maintained over time. Total knowledge of everything included in the theme offers significant advantages with respect to quickly and effectively meeting specific client requirements. Deliberately stripped back and bare-bones, there is none of the superfluous bloat and legacy code often found in commercially available themes. The aim has been to include only what is actually required – to create a flexible framework into which additional specific functionality could then be added as required.

Sulby WordPress theme
Sulby WordPress theme

This site has been built using the theme and there is a more comprehensive demo at thenakedbrunch.com. The Naked Brunch is an imaginary restaurant / café business with 3 branches. The site runs on a LEMP (Linux, Nginx, MySQL, PHP) stack and is hosted by bunhill.com at Digital Ocean. HTTPS (SSL/TLS) certificates are via Let’s Encrypt. In most cases this combination is also likely to be the best client hosting solution since the setup has been carefully optimized and tested. A site based on this theme and code base could however also be easily implemented on existing or alternative hosting elsewhere.

The theme incorporates the Redux Framework which enables us to quickly customize the use of typography – Google Fonts are available as standard enabling the look and feel of a site to be quickly changed (fig 1). Additionally the backend administration dashboard can be customized – such that, for example, functionality can be simplified for clients to include only what they actually need (fig 2). At the thenakedbrunch.com, for example, the client-user would need to be able to edit the restaurant menus and upload new pdfs (fig 3). In this example the ‘Restaurant Menu’ entity is a Custom Post Type defined in functions.php.

typography options
fig 1
client dashboard
fig 2
client dashboard
fig 3

Accessing remote databases using phpMyAdmin running locally

August 17, 2017

#Linux #MySQL #PHP #phpMyAdmin #Raspberry Pi #WordPress

I believe it makes a lot of sense to only ever use a local copy of the phpMyAdmin client typically used to manage MySQL databases – ie to access live servers remotely via the local client. Installing phpMyAdmin on an actual server creates an additional unnecessary potential vulnerability – another login point.

I have the phpMyAdmin client installed on the Raspberry Pi which is use as a local network web server for development. I can then access the client interface from any machine on the local network and use phpMyAdmin to manage the remote databases.

There are plenty of guides explaining this online. In brief – two steps involved in setting this up to access remote databases:

  1. Create new entries for each of the remote databases in the config.inc.php file.

  2. Use SSH tunnelling to create a secure connection from the local machine to the remote host. Eg: sudo ssh -fNL 3307:localhost:3306 sudo_user@REMOTE_HOST_IP_ADDRESS

NB: I found that the repository version of phpMyAdmin for my Linux distribution was always somewhat out of date. I decided, instead, to manually install phpMyAdmin under the local web server’s default root directory and to access it directly from there. I probably wouldn’t have wanted to do that if I were not running it from behind a NAT router.

Raspberry Pi local web server for development

July 17, 2017

#Apache #LAMP #Linux #MySQL #PHP #Raspberry Pi #Squid #SSHFS #WordPress

Ideally we never want to be working or testing on a live public-facing installation. But we want our test environment to mimic the actual domain – eg URLs etc. For a while I was using MAMP Pro running under macOS on my development machine. MAMP creates a local Apache/MySQL/PHP stack. Over time however I found this to be a relatively convoluted solution. In particular I found myself having to sometimes solve specific MAMP related issues. Or after a re-installation, I would have to work through how to do set everything up again under MAMP.

A headless Raspberry Pi + LAMP stack running on the local network is a great platform on which to run a local web server for development (it’s important that the Pi is running off a USB stick since constant write cycles would apparently quickly destroy an SD Card). I’m using a Pi 3 connected via wifi. I don’t need to remember a different set of ways of doing stuff – it’s more or less like the actually Linux server environments we work with.

Apache virtual hosting is configured exactly as if the server were on the live internet – with Squid set up such that the Pi also serves as a proxy server. This way all devices on the local network can potentially see the development domains as if they were on the real internet (eg https://www.example.com is on the local network during development or testing). Testing or developing under macOS or a desktop Linux, edit /etc/hosts such that example.com points to the local web server address – but on iPads, phones etc this is not trivial – hence the benefit of running a proxy server. Under iOS and Android the proxy settings can be appended to the network connection.

The local webserver is accessed exactly as if it were on the real internet – eg via SSH. Or we can use SSHFS to mount the remote file systems locally – such that the directories and files needed can be browsed locally or opened for editing. Under macOS we can use FUSE.

Visual Studio Code
Visual Studio Code with remote file system mounted via SSHFS using FUSE for macOS


Show All Posts