How to add a new line on Instagram

So you’re writing out a longer Instagram post and want a new line. For whatever reason Instagram decided it wasn’t important to include the return button on the keyboard meaning it’s really not intuitive to add a line break. However, it is actually quite simple.

All you need to do is switch to the numerical keyboard.

Alternative Home Working Tips

Photo by Aleks Marinkovic on Unsplash

I’ve seen a lot of lists recently on how to work successfully from home and they always seem to be based around simulating your office environment and routine in the home. Tips like “maintain regular hours”, “create a morning routine”, “take your regular breaks in their entirety” etc.

With current…

The Java collections framework is a set of implementations of common data structures. A collection is an object that can hold references to other objects.


Allows duplicates ordered by index.

Offers consistent time for size, isEmpty, get, iterator. Therefore can be considered for fast random access.


Allows duplicates ordered by index.

Offers constant time for adding + removing elements at the end of the list.


Best performing implementation of Set.

No duplication and unordered.


No duplication. Ordered by insertion order.


No duplication. Orders by value based on natural ordering or provided comparator.


Unordered and allows nulls.


Use when you want a Map with key-value pairs sorted by insertion order. Allows nulls.


Sorted by natural ordering of keys or by comparator. Does not allow nulls.

Clean Code Principles

Duplicated business logic is a problem, duplicated code is less so. Removing duplication by adding conditionals makes code more difficult to read and harder to maintain. Duplication is easy to refactor, conditionals are not.

Attempt to remove the need to explicitly configure things; instead rely on sensible defaults.

The simplest…

The law of demeter states a module should not know about the innards of the objects it manipulates. More precisely, the LoD states that a method m of class C should only call methods of:

  • C
  • An object created by m
  • An object passed as a argument to m
  • An…

Unit Testing

Developer tool for testing a single method. Multiple tests per method.

Easy to write, not fragile. Change the test, change the implementation. Take little effort.

Functional Testing

Test multiple methods or classes. Testing what the application does rather than how it does it. Few implementation details. Higher level, more black box.


Code review

Code review for every change that is introduced into the codebase should be a core principle followed by us all.

Version control

It doesn’t matter which Version Control System you use but every project should be under version control.

Development Environment

Every repository should contain a readme with one command that will provision a…

Single Responsibility

Methods, classes, modules etc should have only one reason to change. They should have one Responsibility and that should be entirely encapsulated in the class.


Code should be open for extension but closed for modification.

It should be easy to change the functionality of a class without changing the source…

Encapsulation is an Object Oriented Programming concept that binds together data and functions that manipulate that data to keep it safe from outside interference from client code.

Information Hiding

Information or data hiding is an important concept in Encapsulation. It’s often interpreted as being about hiding fields and using getters and setters…

Gavin Stewart

#scotland #coding #outdoors #beer #cheese #cats.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store