Categories
Resources Web Development

Installing PHP composer programmatically with a bash script on linux

The easiest way to install Composer is by using the bash script provided here.  What I do is use vim to create a file named composer-install.sh then post that script in it.

I do this in any folder, then I move the script to make it global as suggested in the documentation here.

Basically all you are doing is using the linux mv command to move the composer.phar script so it is in the users global space.

Categories
Resources Web Development

Links and resources about installing php and extensions

It took quite a bit of searching to find something that accurately describes how to currently install php and it’s extensions on Linux.

How to install php on ubuntu

Categories
Resources Web Development

PHP composer links and resources.

Composer is a dependency manager for PHP. Confusing to install, easy to use.

Composer documentation – the actual documentation helps.

A gentle introduction to composer as a dependency manager – excellent resource covering pretty much everything about PHP composer you could ever want to know. Well mostly.

 

Categories
Resources Software Development

Random Links about Databases

Why Uber dropped PostgreSQL – interesting article if you are thinking about using PostgreSQL

https://db-engines.com/en/ranking – a really cool website that lists database engines by popularity check it out.

Cassandra Use Cases: When To Use And When Not To Use Cassandra – really good article about when to use and not use Cassandra Db

7 mistakes when using Apache Cassandra – Don’t make these mistakes if you want to use Cassandra database

Categories
Random Resources

Scala database access driver client links and resources.

Resources and links about accessing a database in Scala.

An async postgre mysql db access client 

Categories
Resources Software Development

Scala map and flatmap links and resources

Understanding map and flatmap can be a little hard at first if you have never encountered them. Below are some links to help you get a better understanding of these constructs.

Map, map and flatMap in Scala – good article explains the concepts well.

Maps Scala Documentation – basic coverage of maps from Scala documentation.

Categories
Random Software Development

Why are Scala val variables called values?

One of the oddest things I encountered when starting to learn Scala was seeing variables called values instead of variables.

When I first started reading the docs I saw a list of values of the classes, traits etc. I kept wondering WTF is a value why not call it a variable like every other language.

So for a while I just thought the Scala community just referred to all class variables as values.

Then I was reading the docs some more, I found this page. It has this one easy to miss line that answers the question why are vals called values instead of variables.

The second sentence below the difference between Val and Var

“Because val fields can’t vary, some people refer to them as values rather than variables.”

 

And that is the answer. In the Scala API documentation most classes/objects you see has a list of values defined with val.

I suppose the class variables are defined this way so that you don’t accidentally mutate them or change them.

I am still  not sure why methods are called members yet, when I figure that out maybe I’ll write about it.

Categories
Resources Software Development

Scala Play Framework Slick resources and links

Below is a list of resources, links, videos etc. a

Play Framework and Slick example updated – very helpful article

Categories
Resources Software Development

How Scala Imports and Packages work

One of the most important first things to learn about Scala is how Packages and Imports work. Below is a great video that covers the subject well. Why spend hours writing an article when an excellent resource exists?

Also if you would like to know more about Scala package objects, which allow you to reuse functions/ objects etc. then see my article what are Scala package objects

Packages and Imports (in Scala)

Categories
Resources Software Development

What are Scala package objects?

Scala package objects are basically code, functions, variables, classes, objects that you want available to all of your other code/files/objects in a given package. Basically it is like a system to provide utility, helper or common code all in one place.

Instead or writing an article I’ll post links to helpful resources. No reason to waste all my time writing articles if good article exist.

A minimal coverage of Package Objects by the  Scala docs.

The following link is from alvin alexander – from Scala Cook Book if you don’t own it you should buy it, this is an excellent resource. This link goes into much deeper detail than the documentation.
How to put common code in Scala package objects

Scala Tutorial – Learn How To Use Package Objects – excellent tutorial on how to use Package Objects.