Open in app

Sign In

Write

Sign In

Abdallah Yashir
Abdallah Yashir

17 Followers

Home

About

19 hours ago

How to get the middle character of a word programmatically?

Get the middle character using C#. (this was not generated by ChatGPT or any other AI) — Here’s the exercise on CodeWars. You are going to be given a word. Your job is to return the middle character of the word. If the word’s length is odd, return the middle character. If the word’s length is even, return the middle 2 characters. Examples: Kata.getMiddle("test") should return "es" Kata.getMiddle("testing")…

Programming

1 min read

Programming

1 min read


1 day ago

How to find Maximum and Minimum values of a list in C#?

I’m taking this exercise from CodeWars [https://www.codewars.com/kata/577a98a6ae28071780000989/train/csharp]. > Your task is to make two functions ( max and min, or maximum and minimum, etc., depending on the language ) that receive a list of integers as input, and return the largest and lowest number in that list, respectively. Examples (Input -> Output) * [4,6,2,1,9,63,-134,566] -> max = 566, min = -134 * [-52, 56, 30, 29, -54, 0, -110] -> min = -110, max = 56 * [42, 54, 65, 87, 0]

Programming

1 min read

Programming

1 min read


Mar 20

An OOP Approach to Solving the Famous Two Sum Algorithmic Problem

How to Solve the Two Sum Problem using an Object Oriented Programming Approach? — Problem Statement Here’s the description of the Two Sum problem: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. Example Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]…

Programming

2 min read

Programming

2 min read


Mar 9

Things I’m learning participating in the Test Conference in Mauritius.

The behind-the-scenes process. What ideas did we come across to present at the Test Conference? What are the limitations I encounter? And some other thoughts and ideas … #testconf #process #testing #qa — The second Edition of the Mauritius Annual Test Conference. What topic to choose? When you work in the Enterprise Software Development world, you learn about a lot of processes and technologies esp. in organisations that are highly innovative.

Automation

2 min read

Things I’m learning participating in the Test Conference in Mauritius.
Things I’m learning participating in the Test Conference in Mauritius.
Automation

2 min read


Mar 8

How to download your PostgreSQL database from Heroku to Local?

This is a quick and easy way to pull your database from Heroku to your local machine. — Solution If you’re only interested in the solution, here’s what worked for me: PGUSER=postgres PGPASSWORD=postgres_database heroku pg:pull postgresql-address-on-heroku localdbhere --app your-app-on-heroku Problem As a developer, I prefer having a local database esp. for debugging and breaking stuff rather than using the one Test/Acceptance/Staging as other colleagues might be using them. …

Programming

2 min read

Programming

2 min read


Mar 7

How to rename a branch you already pushed to remote?

How to rename a branch? #dev #git #workflow #coding — Let’s say you start working on a task and create a branch with the same name. But as you progress further, you realise that the work itself doesn’t describe the task name or the nature of work changes in between. However, you have already pushed your changes on remote. How…

Programming

2 min read

How to rename a branch you already pushed to remote?
How to rename a branch you already pushed to remote?
Programming

2 min read


Mar 6

How to create a user with PostgreSQL?

How to create a user with PostgreSQL? #postgres #database #user — Here is a quick tutorial for today using Postgresql on Command Line using a terminal in Linux: sudo -u postgres createuser jammy sudo -u postgres createdb my_local_db sudo -u postgres psql (get into command line interface mode) ALTER USER jammy WITH PASSWORD ‘my_new_shiny_password’; GRANT ALL PRIVILEGES ON DATABASE my_local_db to jammy

Database

1 min read

Database

1 min read


Jan 10

How to find the opposite number in C#?

How to find the opposite number in C#? #csharp #dotnet #math — We want to return the opposite number. Examples: 1: -1 14: -14 -34: 34 public static int Opposite(int number) { return -number; } Solution Another solution is: return n * -1; A SO reference: https://stackoverflow.com/questions/1059480/math-opposite-sign-function Kata from codewars: https://www.codewars.com/kata/56dec885c54a926dcd001095/train/csharp

Programming

1 min read

Programming

1 min read


Dec 20, 2022

How to create and style a simple Pagination Component?

How to create and style a simple Pagination Component? #frontend #dev #UI #UX #angular — Pagination remains one of the most common UI components for data-centric apps esp. in regard to tables. Most modern Web frameworks such as ASP.NET, Ruby on Rails and Laravel come with a pagination feature by default requiring little configuration. Here’s how I create a simple Pagination component in Angular using…

Programming

2 min read

How to create and style a simple Pagination Component?
How to create and style a simple Pagination Component?
Programming

2 min read


Nov 29, 2022

Insights & Code Snippets from my latest Sprint ft. CSS, Writing Better & More

Working with CSS. Some tips for improving your writing. How to code faster? My experience with Jetbrains Fleet. Another Selenium error. #coding #programming #writing #debugging #fleet #jetbrains #jetbrainsfleet — Working with CSS When adding styles to an element, I often prefer only specifying the class or at most the Id instead of adding the element tag. This enables me to switch elements as needed without a big breaking change.

Software Development

5 min read

Insights & Code Snippets from my latest Sprint ft. CSS, Writing Better & More
Insights & Code Snippets from my latest Sprint ft. CSS, Writing Better & More
Software Development

5 min read

Abdallah Yashir

Abdallah Yashir

17 Followers

Senior Software Developer, Writer, Amateur Photographer, Reader

Following
  • Ryan Holiday

    Ryan Holiday

  • Aytekin Tank

    Aytekin Tank

  • Alessandro Butler

    Alessandro Butler

  • Benjamin Hardy, PhD

    Benjamin Hardy, PhD

  • Brad Traversy

    Brad Traversy

See all (48)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech