mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.6K
active users

#oop

0 posts0 participants0 posts today

Russian developer Yegor from yegor256.com uses a simple example of two similar approaches to modeling an action, and their implications from an object-oriented design and programming patterns perspective. One of the two approaches provides superior extensibility, data encapsulation, and more flexible error handling.

"remove(42) vs. find(42).remove()"

yegor256.com/2025/06/22/retrie

The LOOPS primer, published in 1987, captured well the essence of exploratory programming in Lisp:

The LOOPS interface provides both a programming tool and a thinking tool. As you develop a new system, each preliminary version provides an object for thought and discussion. The preliminary versions are a crucial part of the design process.

LOOPS (Lisp Object-Oriented Programming System) is the OOP extension of Interlisp.

bitsavers.org/pdf/xerox/interl

#commonLisp #programming #amop #mop #metaobjectProtocol #exercise #closette #learnToCode (my own experience) #oop
screwlisp.small-web.org/amop/e

Today I simply share and solve (hopefully!) The Art of the Metaobject Protocol exercise 1.1

(the softball generic classes #memoization exercise from chapter 1)

I just added a lexical closure of hash tables.

@simoninireland wrote about the art of the metaobject protocol in his #lisp bibliography a year ago. simondobson.org/2024/07/23/the

screwlisp.small-web.orgArt of the metaobject protocol Exercise 1.1: Memoize Closette apply-generic-function

One pro I have noticed regarding object oriented programming in a large corporate environment: it soft-encourages a team to document their conceptual nouns.

You can certainly do this in functional programming too, but in general I find that when people do their language equivalent of alias SkagWuzzit map<int,map<int,list<map<str,str>>>, they often completely forget to ever get around to defining what a SkagWuzzit actually is. This is something you can handle with programming discipline (i.e. peer review and make people provide definitions for these types and what they conceptually mean, document the module in which the type is defined, etc.), but a class definition with no docs looks naked in a way that a single type def on a line by itself doesn't.

Nobody want to be a shitty programmer. The question is: Do you do anything not to not be one?
Reading blogs or social media and watching YouTube videos is fun. After them, your code may be a little better, of course. But you need a lot. You need to study! Read good books and study the code of other programmers, for example. Maybe work with a new language, architectures and paradigms. You need break the routine.

If you know Object-oriented programming, you learn functional programming.
If you know Model-View-Controller, you learn Model-View-ViewModel.
If you don't know anything about architectures, you learn Clean Architecture, Hexagonal Architecture, etc.
If you know Python, you learn Ruby or Go.
If you know Clojure or Lisp... you don't need to learn anything else. You are already a good programmer. Just kidding. You can learn Elixir or Scala.

Be a good programmer my friend.

#Programmin #OOP #FunctionalProgramming #MVC #MVVM #CleanArchitecture #HexagonalArchitecture #Python #RubyLang #Golang #Clojure #Lisp #ElixirLang #Scala

New Kitten Release 🥳

kitten.small-web.org

(Run `kitten update` to update your dev machines. Production machines will automatically update in a couple of hours.)

• You can now add a generic script block to your markdown pages (see mastodon.ar.al/@aral/114432417)

• Markdown pages can now be `KittenPage` instances and attach `KittenComponent` instances (so you get a full server-side component hierarchy with an event-based workflow; ideal for authenticated pages where you can be use only the author of the page will be accessing them and thus the additional memory and processing overhead are not issues. Isn’t the Small Web great? Only having instances of one makes it possible to optimise so many things for the human experience instead of vertical scale of the data farming machine.)

• Two new examples showcase the new features: codeberg.org/kitten/app/src/br and codeberg.org/kitten/app/src/br

• Attributes with object values are no longer serialised into the DOM (but your components’ render functions will continue to receive them, of course.) This is because only string values make sense for attributes in the context of the HTML DOM. (You can still, of course, have stringified representations of objects in attributes, as used by the `data` attribute to pass data from nodes to event handers on the server.)

kitten.small-web.orgKitten: Home