Categories
Resources Software Development

Scala things to avoid

Scala has some things you should be aware of in order to not write code that is slower than molasses in Winter in Siberia or eat up every last drop of RAM your machine has.  Most of these things revolve around Collections/Arrays and how you work with them.

When I started digging into for comprehensions they sounded very inefficient so I did some digging and my suspicions were

#1 thing to avoid For comprehensions. Unless the collection/array/data you are operating on is small then avoid for comprehensions and use other methods. Reason being is for comprehensions underneath the covers create maps and flatmaps and those create objects for each element in your collection/data. If you stop for a moment you can imagine what a collection of 1,000 elements would do or larger. So you should probably use for comprehensions on only small collections like 10 or less. Of course you should play with your code and find out for yourself what is more efficient.

Also map and flatmap are not very efficient with large collections for the same reason as above.

I will continue to add to this article as I have time. Below are some excellent resources describing the above in much deeper detail.

You might also want to see my listing of Scala Best practice resources.

Benchmarking Scala collections – article by lihaoyi about the inefficiencies of and memory usage of various Scala Collection methods such as map and flatmap very valuable and useful information here for people that like to understand languages inside and out.

Warts of the Scala Programming language – Excellent article about some of the bad parts of Scala

Scala: comprehending the for-comprehension – this is a great article that covers the for comprehension in depth. This will help you understand more about the inefficiencies I am talking about.

Scala Wart: Convoluted de-sugaring of for-comprehensions – link to a discussion about the language issues including the creator of Scala. This give super in depth information as to what I am referring to above.

Categories
Resources Software Development

info and links for handling Assets in Play framework 2.8+

I couldn’t remember where I saw this specific link about assests in play framework.

This website was mainly created as my way to document the information I find about Scala and it’s frameworks
Assets 2.8x

Creating a custom play module – sometimes you need custom modules to perform custom tasks. This is from the documentation.

Categories
Resources Software Development

Scala SBT resources

SBT is the main build tool for Scala. It builds, compiles, runs tests and much more. Below is a list of articles, videos and other useful information about SBT.

Articles

All that jazz – In depth article by James Roper about SBT what it is how it works etc.

Categories
Resources Software Development

Play framework application folder structure

I am creating this post so it is easier to directly find the information. I had seen the information in this link once before but could not for the life of me remember where in the hell I had seen it in the documentation. I had to dig and click and dig and click and dig to find this.

The anatomy of a play framework application

The documentation there gives good information. One thing I may do later is write some articles about organizing your code for large projects.

Categories
Resources Software Development

BASH shell scripting links and resources

Bash script cheat sheet

Bash Scripting: Everything you need to know about Bash-shell programming

Categories
Resources Software Development Web Development

CDN content delivery network links and resources

Articles
Using a CDN to Speed Up Static Content Delivery – very nice short article about how CND’s work in general
What is a CDN? | How do CDNs work? – Cloudflare documentation about CDN’s

Videos

What is a Content Delivery Network (CDN)?


GOTO 2016 • What is a CDN and why Developers should Care about using one • Artur Bergman

Categories
Resources Software Development Web Development

node package manager npm resources and links

Javascript eco system sucks so bad we have to have tools on top of tools on top of tools to even be able to write any functioning code. The chaos of Javascript makes it my least favorite and most hated language. Once you use almost any other language, using Javascript is about as fun as jabbing a fork in your eyeballs.

Articles

Why it’s finally time for developers to address the chaos of Node.js and NPM – I am not alone in my observance of the chaos of Javascript
A Beginner’s Guide to npm, the Node Package Manager – good intro article
Installing Multiple Versions of Node.js Using nvm

NVM – node version manager home

NPM scoped packages – more info on naming packages like @mycompany/mypackage

NPM package.json explained – everything you need to know about npm package.json

NPM configuration – everything you could ever know about configuring NPM

How to Publish NPM Packages

How to publish packages to npm (the way the industry does things) 

Understanding NPM Versioning With Git Tags 

Bumping a node npm project version  – NPM documentation about version numbering

 


Videos

NPM crash course

@32:00 mark he talks about global modules and installing nodemon

@34:30 mark he mentions live-server for running your directory code in a server very handy

Categories
Resources Software Development Web Development

node version manager nvm resources

Articles

Getting started with nodejs, nvm, npm

Videos

How to Install Node Version Manager on Ubuntu

Categories
Resources Software Development Web Development

GIT resources and links

Articles

Semantic versioning with Git tags 

Videos

Introduction to Git – Core Concepts

referenced in video – Pro Git 
Visual Git Reference by Mark Lodato


Introduction to Git – Branching and Merging


Introduction to Git – Remotes

Categories
Resources Software Development

Neo4j and graph database resources

Introduction to Neo4j and Graph Databases

@28:30 the link to the article about streaming with kafka and neo4j

Link to a whitepaper article about streaming with neo4j


A Skeptics Guide to Graph Databases – David Bechberger