The CDI Event: How to Archive Success on the Open-close Principle

Featured Imgs 23

When we talk about a good design on Java and OOP, the first thing that might come to mind is the SOLID principle; it brings five easy steps or at least a sign if the code is going in the right direction. CDI for sure helps you to archive the code in the proper order. Today, we'll explain how to take advantage of CDI with CDI and get the Open close principle.

If you forget the SOLID principle, don't worry, we'll put it here to remember what does mean SOLID:

A Beginner’s Guide to Understanding Encryption Vs Decryption

Featured Imgs 23

A computer system must promise or at least assure privacy and confidentiality when it transmits sensitive or personal data. A simple system, unless equipped with the proper technology, cannot stop any unauthorized access to cyber criminals. And in this computer era, data tampering needs no introduction as it is not something unheard of. So if you want to prevent or altogether stop the mishap, one of the best ways is to alter the data as it will prevent unauthorized access. 

The technique employed to alter the data is known as cryptography, and this process takes place in two phases- encryption and decryption of information. So if you want to find out what encryption vs. decryption is all about, keep reading:

My brand is not ranking number one anymore

Featured Imgs 11

I used to rank my brand as number one ranking for many years. Two years ago, I closed Google Business Profile for a year, reopened the profile, and verified it. I no longer rank number one with my brand and have no manual penalties.

My domain is the exact keyword match, and I used it for over eight years, but I got beaten by the other domain whose page and domain authority are higher than mine. We are not in the same industry and share only the first word in the domain. In addition, their home page contains little text.

Do you have any suggestions for me to make a comeback, SEO Experts?

What Are Source Maps and How to Properly Use Them

Category Image 052

You are debugging a web app for a client but the minified version of the JavaScript and CSS code makes it impossible to understand what statements the browser is actually executing.

You could break down the original code line by line in your editor putting some console.log() statements here and there, or try debugging it from its transformed state.

Serverless is the New Timeshare

Featured Imgs 23

We have shared amnesia. When I speak to younger developers about past technologies, I often get blank stares. To be fair, some of that is because I’m a bit “intense” or “weird” but some of that is because. Huh? Really? Did we have that?

Case in point XA transactions and 2PC (Two Phase Commit). We have a young generation that’s completely ignorant of that capability and the fact that this was “a thing”. Did the requirement for transaction management somehow vanish?

Here Is How To Develop UIs Faster in ReactJS

Featured Imgs 23

It’s 2022, and React has a huge ecosystem to help developers bring complex UIs to life faster. Furthermore, with the extensive support of ReactJS libraries, there is hardly any case when a developer has to build a component from scratch.

However, not every ReactJS UI developer is aware of the best practices to build UIs faster in ReactJS. Therefore, I’ll be discussing the top five approaches (which I personally use) for building UIs quicker in a ReactJS project. So without further ado, let’s get started:

James Koster Shares Design Explorations that Transform WordPress’ Site Editor Into a More Visual, User-Friendly Tool

Category Image 091

Automattic-sponsored designer James Koster has a vision for taking WordPress’ Site Editor from its beta awkwardness and transforming it to become a more visual and user-friendly design tool. In a recent post titled Revising the presentation of key Site Editor features, Koster identifies unbalanced feature weighting as a critical design flaw that is negatively impacting users’ experience with the editor:

The Site Editor is a powerful tool, but the user experience lacks some coherence and a sense of hierarchy.

Template management and editing has central focus, despite the fact that it’s a product area that has proven difficult for some users to interpret.

Impactful features like style and menu management are hierarchically relegated, and consequently deliver a sub-optimal UX.

This week I’ve been ideating on how we might present site editor features with more appropriate weighting, so that the overall experience feels more like a design tool.

Instead of dropping users directly into editing the homepage, Koster contends that the Site Editor’s design should be updated to become a “navigable frame” where users can select from a menu of features and styles on the left. This is a radical improvement over the current experience, which feels like walking into a room with all the lights on and multiple features competing for attention.

“The combination of the site frame (Browse mode) and one-click editing helps to obfuscate some of the aforementioned confusion around template editing,” Koster said. “Now you simply browse to the page you want to update, and click ‘Edit’.”

Another idea Koster explored is a view that makes it easier to understand the interaction of styles and templates. The UI is much cleaner and drastically reduces the cognitive load for users who are struggling to grasp the concept of templates in the first place.

Identity and homepage configuration options haven’t found a place in the site editor yet. Koster proposed bringing them into the editor in a similar fashion to how it was previously presented in the Customizer, with live previews.

Koster also proposes organizing features like templates, template parts, reusable blocks, and patterns in a “Design Library” section, presented via a grid of thumbnails that would open the edit view. This would bring a new level of organization to a set of tools that are currently scattered throughout the site editor interface.

These are just a few highlights from his explorations. Although Koster articulates many of the Site Editor’s current pain points, his designs present an elegant solution for each. Check out the full post to see all the videos and other ideas for organizing features in the site editor.

The disparity between the current experience and Koster’s mockups is like a night and day Cinderella style transformation. It’s a powerful example of how thoughtful design can really solve problems. His explorations received positive feedback from those eager to see these designs implemented in Gutenberg. Koster said his next step is to prepare some simpler prototypes for collaboration on GitHub.

“The ideas are still formative, but with some pruning we can get things into a shippable state,” Koster said. “My next step is to refine and prototype a more stripped-back version, and take that to GitHub for wider thoughts and feedback.”

How to Build Accountability In Your Team

Featured Imgs 23

Imagine you've built a team of people who are all-stars at their individual roles. Every one of them is exceptional and has the potential to become a leader at another company. But they won’t because they don’t have accountability on their team. 

If you’re reading this, it means you’re the team leader or aspire to be one someday. You understand that teams are responsible for their outputs, not just their inputs. You know that to build your team and its effectiveness, you need to create a culture where people take ownership of their performance, and working together as a unit is more important than competing against each other for personal gain. 

Adopt Site Reliability Engineering to Win

Featured Imgs 23

The coronavirus pandemic accelerated the offering of online services even in the most traditionally "offline" sectors: fitness, banking, retail, and government. 

As more companies started moving their offerings online, the reliability of these critical services has garnered particular attention from the public. In early July, Rogers, a Canadian telecom behemoth, experienced an outage that lasted 19 hours, disrupting internet and telecom services for over 10 million Canadians. For the duration of the incident, critical services, 911, and hospitals were interrupted. 

Custom SVG Cursors with an Interactive Emitter Effect

Category Image 080

From the custom cursor on my portfolio marvinx.com using blurred SVG circles, I created several variations which I would like to share with you today.

Without going into too much detail, I’d like to explain some points on how I approached the making of this set.

For the demos, the idea is to set a main class grouping all the functions inherent to all cursors.

Then, I separate demos in different classes where each variable is configurable: number of particles, colors, size, gradient, opacity, filters, radius, speed, acceleration, direction, etc.

Everything is coded in native JavaScript and does not use any libraries (only d3.js if we want to sort particles).

This is how particles are drawn in the Cursor class:

  drawParticles() {
    return `<g class="particles" filter=${this.filterParticles || "none"}>
      ${(() => {
        if (this.strokeGradient) {
          return `
          <defs>
            <linearGradient id=${this.strokeGradient.idStrokeGradient} x1="0%" y1="0%" x2="0%" y2="100%">
              <stop offset="0%" stop-color=${this.strokeGradient.color1} />
              <stop offset="100%" stop-color=${this.strokeGradient.color2} />
            </linearGradient>
          </defs>`
        }
      })()}
      ${Array(this.nbrParticles).fill().map((_,i) =>
        `<circle
          r="${this.setRadiusParticles(i)}"
          cx=${this.pos.x} cy=${this.pos.y}
          fill="${this.fillParticles || "none"}"
          fill-opacity="${this.fillOpacityParticles || 1}"
          stroke="${this.strokeGradient ? `url(#${this.strokeGradient.idStrokeGradient})` : this.strokeColorParticles}"
          stroke-width="${this.strokeWidthParticles || 0}"
          stroke-opacity="${this.strokeOpacityParticles || 1}"
          id="${i}">
        </circle>`).join('')}
    </g>`
  }

This is how each parameter is then configured:

export class Cursor1 extends Cursors{

  constructor(index) {
    super(index);
    this.speed = !isTouchDevices ? 0.5 : 1;
    this.init();
    this.loop();
  }

  setParamsCursor() {
    this.radiusCursor = 15;
    this.fillCursor = getComputedStyle(document.body).getPropertyValue('--primary');
    this.maxSqueeze = 0.6;
    this.accelerator = 1000;
  }

  setParamsParticles() {
    this.strokeGradient = {
      idStrokeGradient : "gradient",
      color2 : getComputedStyle(document.body).getPropertyValue('--primary'),
      color1 : getComputedStyle(document.body).getPropertyValue('--secondary'),
    }
    this.strokeWidthParticles = 1.5;
    this.strokeOpacityParticles = .15;
    this.radiusDiff = 7;
    this.radiusStart = this.radiusCursor*3;
    this.nbrParticles = Math.round((this.diagonalWindow() + this.radiusDiff - this.radiusStart) / this.radiusDiff);
    this.transitionParticles = {
      duration: 18,
      delay: !isTouchDevices ? 4 : 14,
      easing : "linear"
    };
  }
}

1. Waves effect

2. Trail effect

3. Tube effect

4.Mask effect

On this last demo, I use twice the same superimposed video (from Mikhail Nilov‘s beautiful royalty free collection).

The first video uses a grayscale filter:

  filterImageBack() {
    return
    `<filter id=${this.filterBackId}>
      <feColorMatrix type="matrix" values=".33 .33 .33 0 0
        .33 .33 .33 0 0
        .33 .33 .33 0 0
        0 0 0 1 0">
      </feColorMatrix>
    </filter>`
  }

And the second one is placed inside a mask where I apply a duotone filter:

  filterImageCursor() {
    return 
     `<filter id=${this.filterCursorId} filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
      <feColorMatrix type="matrix" values=".44 .44 .44 0 0
        .44 .44 .44 0 0
        .44 .44 .44 0 0
        0 0 0 1 0">
      </feColorMatrix>
      <feComponentTransfer color-interpolation-filters="sRGB" result="duotone">
        <feFuncR type="table" tableValues="0.55 0.25"></feFuncR>
        <feFuncG type="table" tableValues="0.06 1"></feFuncG>
        <feFuncB type="table" tableValues="0.93 0.91"></feFuncB>
        <feFuncA type="table" tableValues="0 1"></feFuncA>
      </feComponentTransfer>
    </filter>`
  }

I also thank Ghislain Auzillon, for his help on the design.

Hope you enjoy it!