Categories
Programming

How to Recognize Worthy Programming Tasks ?

Nowadays, IT departments have been jam-packed with a lot of nonsense and therefore a lot of Jira tickets, if you see what I mean. Here is a way to quickly assess the necessity of a task or a project to be executed. It is important to raise these questions during preliminary meetings. Once the project is launched, it will be difficult to backpedal according to my experience. Also great find in this tweet great ideas on how to tackle this question https://twitter.com/sebdedeyne/status/1271370141683638273

  • Is it going to fix something ?
  • Can we afford to break what’s already working ?
  • Do we really need to make that change ?
  • Is it going to improve performance ?

Here are the most critical questions :

  • How will this make users/customer live better ?
  • How is it going to make our developers lives better ?

Although these questions above may seem rational and logical, they can easily and will be easily swept away by some great irresponsible political bluffer developer/manager mentioning the security of a system or application. The word is dropped : Security. The winning argument, the selling point to any individual and to any of our dear IT companies, FEAR.

Although most of our infrastructure are covered with firewalls, proxies, CDN and heavy monitoring systems – I have seen Fear win the argument even if the chance of its occurring was inexistent

David Raleche

Categories
AWS AWS SQS javascript

How to setup Serverless AWS ?

For starter with AWS, Serverless Framework CLI is a must. Build your entire infrastructure in seconds !

What does AWS mean ? Amazon Web Service.

What does AWS provide ?  provides on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered pay-as-you-go basis such as hosting web server

What is Serverless framework CLI ? . A single configuration file allows you to list your functions and define the endpoints that they’re subscribed to. It provides structure, automation and best practices out-of-the-box, allowing you to focus on building sophisticated, event-driven, serverless architectures, comprised of functions and events. The Serverless Framework CLI is the simplest way to develop infinitely scalable, pay-per-execution serverless applications.

  • Big plus is the serverless.yaml creating the above structure in seconds

I built an architecture SQS, DLQ, SNS and Lambda with serverless and it is fantastic for deployment and quick development. This framework made the whole development experience smooth

What is SQS ? Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. 

What is DLQ ? You can now set a dead-letter queue (DLQ) to an Amazon Simple Notification Service (SNS) subscription to capture undeliverable messages. Amazon SNS DLQs make your application more resilient and durable by storing messages in case your subscription endpoint becomes unreachable.

What is SNS ? Amazon SNS is a fully managed pub/sub messaging service. You can use Amazon SNS topics to decouple message publishers and subscribers, and simultaneously distribute messages to multiple endpoints, such as Amazon SQS queues, AWS Lambda functions, HTTP endpoints, email addresses, and mobile devices (SMS text messages and mobile push notifications).

What is Lambda ? AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. 

See below some useful Links

— Tutorial to quick start with serverless —

https://www.serverless.com/framework/docs/providers/aws/guide/quick-start/

David Raleche

Categories
Laravel

How to resolve The Mix manifest does not exist. ? LARAVEL NOVA Facade\Ignition\Exceptions\ViewException

ERROR

Facade\Ignition\Exceptions\ViewException
The Mix manifest does not exist. 

Solution

php artisan vendor:publish --all

Categories
Technical

What is coding ?

1 - Implement code
2 - DRY (Review Code Improvements) - Do not repeat yourself
3 - Unit Test
4 - Api Documentation + PHP DocBlock
5 - Code Styling PSR-2

There is a difference between hacking and coding. For business purposes developers tended to hack which is profitable for certain situation rather small environments. However when the team grows and when the code needs to be shared, it is ineluctable that some good practice needs to be setup. Unit tests guarantee the stability of your application for every and each incremental release/deployment of your application.

Get the developers to understand that point is critical. Explaining that this practice will allow them not to be blamed after each release, they will be stress free and confident is crucial.

Obviously, this comes with more work since you now need to test your code, and write unit test, making the task more strenuous, but this is indeed HARD WORK

Documenting as well is critical especially if supporting APIs, swagger comes handy for that purpose

Categories
BEST PHP CODE PHP

How to use PHP DocBlock ?

/**
 * Returns a list of XXXXXXX
 *
 * @param string $route_group_uuid
 *
 * @return Array $listCarrierRoute
 *
 * @throws \Exception
 *
 * @version 05-05-2020
 * @author David Raleche <[email protected]>
 * @reference JIRA Ticket PMM2-862 Create route groups XXXXX
 */
Categories
Nginx

NGINX Configuration BLOCK URLS

location ~* ^/log(\/)?$ { 
    return 404; 
}
 
location ~* ^/swagger(.*)$ { 
    return 404; 
}
Categories
General Technical

How to mage Immutable File Unix ?

lsattr /etc/pgbouncer/users.txt
 ----i--------e- /etc/pgbouncer/users.txt

lsattr /etc/pgbouncer/users.txt
----i--------e- /etc/pgbouncer/users.txt
 
sudo chattr -i /etc/pgbouncer/users.txt
lsattr /etc/pgbouncer/users.txt
 -------------e- /etc/pgbouncer/users.txt
 
vim /etc/pgbouncer/users.txt
sudo chattr +i /etc/pgbouncer/users.txt
lsattr /etc/pgbouncer/users.txt
----i--------e- /etc/pgbouncer/users.txt
Categories
Continuous Integration/Development

How to setup Continuous Integration ?

Developers practicing continuous integration merge their changes back to the main branch as often as possible. The developer’s changes are validated by creating a build and running automated tests against the build. By doing so, you avoid the integration hell that usually happens when people wait for release day to merge their changes into the release branch.

Continuous integration puts a great emphasis on testing automation to check that the application is not broken whenever new commits are integrated into the main branch.

see diagram here

See steps by step implementation here

Categories
Technical

What are the Benefits of pull requests ?

  • Use this collaborative platform to discuss potential modifications to the code.
  • Improve code quality.
  • Simplify the process of receiving feedback from the reviewer.
  • Address feedback easily in-line near the relevant code.
  • Provide better stability for the code.
Categories
Technical

Where to find a Continuous Integration Deployment Process Diagram ?

CI/CD contiuous integration
code review continuous integration continuous deployment