Skip to content

Instantly share code, notes, and snippets.

Oliver Mensah OliverMensahDev

Block or report user

Report or block OliverMensahDev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View uml.kt
/*
State Diagram for SyncState
@startuml
[*] --> IDLE
IDLE --> PROCESS : refresh
PROCESS --> IDLE : success
PROCESS --> ERROR : failed
View retrofitError.java
class APIError {
val error: String? = null
}
object ErrorUtils {
fun parseError(response: Response<*>): APIError {
val converter = ServiceBuilder.retrofit
.responseBodyConverter<APIError>(APIError::class.java, arrayOfNulls<Annotation>(0))
View tdd.md

TDD - Software development is the process of writing tests before the actual implementation. Relates to the extreme programaming concepts.

RED GREEN REFACTOR

View C++.md

Course Introduction

  1. Overview of C++
  • Set UP IDE
  1. Language Fundamentals Strong foundations on construcs
  • Variables
  • Conditions
  • Arrays
  • Loops (different forms of looping; while, for, etc.)
  • Structures (Lightweight classes)
View mvc.php
<?php
class Model
{
// Store the data
private $carPrice;
// Set the data
public function setPrice($price)
{
$this -> carPrice = $price;
}
View repository.php
<?php
// model
class User
{
private $name;
private $age;
private $sex;
private $id;
View the_skills_poor_programmers_lack.md

The Skills Poor Programmers Lack

A friend and I had a discussion about the basic skills that are often lacking in experienced programmers. How can a programmer work for ten or twenty years and never learn to write good code? So often they need close supervision to ensure they go down the right path, and they can never be trusted to take technical leadership on larger tasks. It seems they are just good enough to get by in their job, but they never become effective.

We thought about our experiences and came up with three fundamental skills that we find are most often missing. Note that these are not skills which take a considerable amount of talent or unique insight. Nor are they "trends" or "frameworks" to help you get a new job. They are basic fundamentals which are prerequisites to being a successful programmer.

Understand how the language works

Programmers cannot write good code unless they understand what they are typing. At the most basic level, this means they need to understand the rules of

View hosting Laravel app on AWS. manually using pem.md
  1. copy the files to the server using 1359 scp -i /path/to/pem -o 'StrictHostKeyChecking=no' /path/to/local_file /path/to/server/

  2. Replicate all processs done locally on the server but make sure you have superuser permissions

View Style-GuideTo-Objet-Design.php
<?php
interface Logger{
public function log(string $message): void;
}
interface Formatter{
public function format(string $message): string;
}
View me.md
            <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_below="@+id/relLayout4"
                    android:background="@drawable/grey_border_bottom"
                    android:id="@+id/relLayout5">
                <ImageView
                        android:layout_width="35dp"
                        android:layout_height="35dp"
                        android:layout_centerVertical="true"
You can’t perform that action at this time.