Saturday, October 26, 2024

OpenAI Orion


OpenAI's next flagship model codenamed Orion is slated to arrive around the two-year anniversary of ChatGPT.  OpenAI plans to launch Orion by December.

Unlike the release of OpenAI’s last two models, GPT-4o and o1, Orion won’t initially be released widely through ChatGPT. Instead, OpenAI is planning to grant access first to companies it works closely with in order for them to build their own products and features, according to a source familiar with the plan.

Orion has been teased as potentially up to 100 times more powerful than GPT-4

The company’s goal is to combine its LLMs over time to create an even more capable model that could eventually be called artificial general intelligence, or AGI


Sunday, October 20, 2024

Google CTO


This week, Google appointed Prabhakar Raghavan as the company's new Chief Technologist.

Currently, he is Senior VP in charge of Google search, assistant, geo, ads, commerce and payments.

Prabhakar holds PhD from U.C. Berkeley in Electrical Engineering and Computer Science and Bachelor of Technology (1982) from Indian Institute of Technology, Madras.

Prior to joining Google, Prabhakar founded and led Yahoo labs where he was responsible for search and ad ranking, as well as ad design - later served as company's Chief Strategy Officer. He also served as CTO at Verity and held various positions of 14 years at IBM with a focus on algorithms, data mining and machine learning.

This Indian-origin man is the new CTO of Google, will work closely with CEO Sundar Pichai

Wednesday, October 2, 2024

Adapter Pattern

What

Adapter structural design pattern is a bridge between two incompatible interfaces by converting the interface of a class into another interface that a client expects. It is useful when integrating legacy components with new systems or when creating a reusable library.

Who

It has four key actors (1) Target Interface (2) Adapter (3) Adaptee (4) Client.

1. Target interface is the common interface that the client code interacts with.

2. Adapter is a bridge to adapt the interface of the adaptee to match the target interface.

3. Adaptee is existing system with an incompatible interface to be integrated into new system

4. Client is unaware of the specific implementation of the adaptee and the adapter.

How

Adapter implements the ITarget interface and translates request method to the SpecificRequest method of the Adaptee. The client code interacts with the adapter.

<pre><code>

// Target Interface

public interface ITarget

{

    string Request();

}


// Adaptee

public class Adaptee

{

    public string SpecificRequest()

    {

        return "Adaptee's specific request";

    }

}


// Adapter

public class Adapter : ITarget

{

    private readonly Adaptee _adaptee;


    public Adapter(Adaptee adaptee)

    {

        _adaptee = adaptee;

    }


    public string Request()

    {

        return _adaptee.SpecificRequest();

    }

}


// Client

public class Client

{

    public void Execute(ITarget target)

    {

        Console.WriteLine(target.Request());

    }

}


// Usage

class Program

{

    static void Main()

    {

        Adaptee adaptee = new Adaptee();

        ITarget adapter = new Adapter(adaptee);


        Client client = new Client();

        client.Execute(adapter);

    }

}

</code></pre>

Why

  • Reusability: Allows the reuse of existing client code with new systems.
  • Decoupling: Decouples the client from the specific implementation of the payment gateways.
  • Flexibility: Makes it easy to switch between different implementations without modifying the client code.

When

  • When you need to use an existing class but its interface is not compatible with the rest of your code.
  • When you want to create a reusable class that can work with unrelated or unforeseen classes.

Reference

Code repository: https://github.com/gsenthilvel/DesignStructural