ChatGPT - How Long Till They Realize I’m a Robot?

Image
I tried it first on December 2nd... ...and slowly the meaning of it started to sink in. It's January 1st and as the new year begins, my future has never felt so hazy. It helps me write code. At my new company I'm writing golang, which is new for me, and one day on a whim I think "hmmm maybe ChatGPT will give me some ideas about the library I need to use." Lo-and-behold it knew the library. It wrote example code. It explained each section in just enough detail. I'm excited....It assists my users. I got a question about Dockerfiles in my teams oncall channel. "Hmmm I don't know the answer to this either"....ChatGPT did. It knew the commands to run. It knew details of how it worked. It explained it better and faster than I could have. Now I'm nervous....It writes my code for me. Now I'm hearing how great Github Copilot is - and it's built by OpenAI too...ok I guess I should give it a shot. I install it, and within minutes it'...

Models, Views and Controllers

The MVC design pattern is one of the most widely used design patterns around, but it's talked about so much by experienced developers that sometimes noobs can get mislead as to the meaning and purpose of it. So here's an overview of the design pattern and what it's parts are for.




We'll start with a high-level flow of events:

1.) The user interacts with the user interface, which sends a message to the controller.
2.) The controller receives the message, converts it into a form that the Model can understand and interact with, and then sends it to the Model.
3.) The Model accepts the new information, and makes changes to it's own state reflecting the new information that it's just received.
4.) The view detects the changes in the Model, and updates itself accordingly.
5.) Repeat 1 - 4.

This is very high level and can change a little with every implementation, but the overlying theme and idea is there. Also, the way in which the view detects the changes will vary a lot : it can query the model every so often, there could be an event fired when the Model changes that is detected by the View, or the Model can notify the View.

Model

The Model is the representation of your application's data. Models contain most or all of the business logic of your application.

View

Views represent the user interface of your application. They provide your Controllers with data from the user, and provide the user with data stored in the application - in the Models.

Controller

Controllers connect the Views and Models together. They act as a translator between the two, taking data from the View, translating it into something the Model can understand, and then passing it on to the Model. They can also operate in the reverse direction in many cases.

If you want to use MVC in one of your ASP.NET web apps, checkout ASP.NET/mvc. And Ruby on Rails uses the MVC design pattern too!

Now, if anyone starts talking about how MVC helped them build a solid webpage, you can engage them in conversation. Maybe it's a cute girl who said it? Maybe you can impress her with your Ruby on Rails knowledge by reading the previous post too!

:P

...Love you.

Comments

Popular posts from this blog

ChatGPT - How Long Till They Realize I’m a Robot?

My experience with Udacity

Architectural Characteristics - Transcending Requirements