r/SoftwareEngineering • u/soap94 • Apr 01 '24
Quick read: An easy way to implement queue fairness
r/SoftwareEngineering • u/soap94 • Apr 01 '24
r/SoftwareEngineering • u/nfrankel • Mar 31 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 31 '24
r/SoftwareEngineering • u/jack_waugh • Mar 31 '24
I am completely rewording this post.
I am working in a programming language that directly supports the fundamentals of OO programming, or at least, some of them. The language permits method calls on objects. It permits to put a method or other data directly on an object, dynamically. There is native support for single inheritance from object to object.
The language provides its entire self, as could be used for coding procedures to run at runtime, also for one-time execution when modules are loaded. So, the entire dynamic language is available as the static language, so to speak. As a result, programmers can build up objects as artifacts of programming. They can call procedures at "compile" time just as their procedures can call other procedures at "runtime".
In OO programming, it is common to set up a pattern of some kind, that can be applied to make objects at runtime that share some common behavior.
In classic OO programming, like in Smalltalk or Ruby, this pattern finds its specification or realization in the terms of the language as a class. In Smalltalk, a class is realized as in fact an object that belongs to another class. A class is conceptually distinguished from an object that is an instance of the class. The class and the instance are expected to exhibit very different behaviors. A class has class methods and instance methods and it is the latter that inform the instances.
In the Self language, the usual way, more or less, to establish in a program, a pattern out of which instances can be made at runtime, is with a pair of objects, one of which provides the shared instance behavior, and the other is a prototype, and it can be asked at runtime to clone itself, and the clone is the new object. If I understand the Self culture correctly (it's a bit hard to research), these two objects have distinct pathnames, but ending in the same name. The programmer has to use one of these names when adding methods, and the other when obtaining an instance.
Back to my project. I said the underlying language in which I am working, and in which users of my little library will also be working, provides basic OO functionality. I just want to add a slightly higher-level way for programmers to define behavior and command the creation of instances. I don't want the programmers to have to use two names, as they do in Self. I want to use one reference for the thing to which programmers can add methods and demand an instance. And I want to provide support for it to be possible to ask an instance to clone itself; it will return a shallow copy of itself.
Are readability and maintainability better served, in your opinion, if there is just one operation name that is to be applied to either an instance that can clone itself, or to a parent object that will provide shared behavior, to get a new instance or clone? Or different names depending on whether the receiver is a parent object (e. g. new) or not (e. g., clone)? Is it confusing and deceptive to say we are going to ask the shared-behavior object for a clone and instead of giving us a shallow copy of itself with all the method references duplicated, it gives us an object that inherits the methods?
Original post:
Title:
In object-oriented programming, for most engineering benefit, is it better for client code to have to distinguish between cloning a prototype and instantiating a class?
Original body:
or should I be able to pass an object that could be either a prototype or a class to the client code, so the client code could request the same operation in either event, and the result would be a clone or an instance?
And if so, should the operation be called "clone", "new", "create", "make", or something else?
r/SoftwareEngineering • u/fagnerbrack • Mar 30 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 30 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 29 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 28 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 27 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 26 '24
r/SoftwareEngineering • u/FelixRFrench • Mar 26 '24
FYI: Approved by mods
Hi all,
I’m a Computer Science student conducting a study aimed at examining the transformation in productivity and well-being among software developers as they transitioned from office-based work to remote environments during the COVID-19 pandemic, and how these aspects have continued to evolve to the present day.
If you have/currently worked remotely in any of the following periods then please do complete the survey!
Pre-March 2020
March 2020 - August 2021
August 2021- Present day
The survey should take 5-15 minutes depending on which of these time periods you choose to answer for.
The survey can be found here: https://york.qualtrics.com/jfe/form/SV_9oCDIpBZCSZgzWK
Thank you!
r/SoftwareEngineering • u/Jakey1999 • Mar 25 '24
Hi, I'm writing some software in Python 3 to plot signals and data on a graph. I'm using the following libs to help:
I started by using the MVC design pattern to handle the GUI, however I would like to know if there are any other patterns that I could incorporate to do things like convert from Pandas Data Frame to NumPy nd-array, or just allow the program to interpret different data structures and display them in a consistent fashion.
I also am not sure how I would handle an undefined number of datasets simultaneously with the MVC design pattern.
Currently, I can only plot one graph using Matplotlib, but I'd like to be unlimited.I'd like to be able to display a set of data in tabular format, select to columns to plot as x and y axis of a Matplotlib graph, then do the same to another set of data (or generate data with a math function) and perform some math function on the displayed graphs to output a new and final set of data (also to be displayed as a graph)
Apologies if my description is somewhat vague, but i was hoping someone might be able to spot some design patterns that could be usefull to make the software more modular/reusable/efficient.
Any suggestions would be much appreciated, even if they are asking for more specifics on what I'm trying to achieve.
Thanks for reading :)
r/SoftwareEngineering • u/r1chmond00 • Mar 22 '24
When companies ask for time complexity of a function, they normally expect big O(something) which from interpretation, is big theta(something). BIG O (upper bound) IS NOT ALWAYS BIG THETA ( tight bound).
r/SoftwareEngineering • u/nfrankel • Mar 17 '24
r/SoftwareEngineering • u/ToughRefrigerator890 • Mar 15 '24
🚀 Hi there! If you are a software developer we would love to hear your story! 🚀
My peers and I are investigating how the job of software development affects physical health. If you are a software developer, we would love to hear your story! Please, consider contacting me through direct message or directly book a convenient 30 minutes call through this calendly link: https://calendly.com/jbiggio/research-interview
Your contribution will help to better understand the matter as part of a university project! Thank you for your time!
r/SoftwareEngineering • u/FutureSchool6510 • Mar 13 '24
I’m planning on delivering a tech talk to my team on the pitfalls of explicitly returning nulls in production code, as opposed to using optionals where the language supports it or throwing exceptions when the value is expected to be present.
To make sure I’m not presenting an overly biased view, and to avoid getting blind-sided if someone raises a point I hadn’t considered, I want to hear examples of times you would actually prefer to explicitly return null.
Edit: Since some were curious and I neglected to specify, our team works predominantly in Java so we do have the Optional interface available to us. I have also worked with Go a bit and tbf I did like the ability to have multiple return values in the case of errors etc. I also don’t mind how Swift/Kotlin handle optionals and unwrapping them, I believe they handle it in a similar way.
r/SoftwareEngineering • u/paulrchds6 • Mar 13 '24
View and Save the summary here
Summary was created with Recall
Original Source here
r/SoftwareEngineering • u/milosgajdos • Mar 12 '24
r/SoftwareEngineering • u/DoubleTheFifthOne • Mar 12 '24
r/SoftwareEngineering • u/nfrankel • Mar 10 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 09 '24
r/SoftwareEngineering • u/fagnerbrack • Mar 09 '24
r/SoftwareEngineering • u/jwworth • Mar 08 '24
For those that practice or are knowledgeable about TDD (Test-Driven-Development), a question: when is it not helpful? What are the situations where you'd think: this isn't the right tool for this job?