Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
•
IT Security NachrichtenOnePlus/OxygenOS: Schad-App erhält Root-Zugriff ohne Berechtigungen(24.09.2026 um 23:38 Uhr)
•
IT Security NachrichtenRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•••••
Hacking & PentestingRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•
AI & KI NachrichtenWhy the U.N. Still Matters(24.09.2026 um 23:00 Uhr)
•••
IT Security NachrichtenOnePlus/OxygenOS: Schad-App erhält Root-Zugriff ohne Berechtigungen(24.09.2026 um 23:38 Uhr)
•
IT Security NachrichtenRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•••••
Hacking & PentestingRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•
AI & KI NachrichtenWhy the U.N. Still Matters(24.09.2026 um 23:00 Uhr)
••
Intelligence View
⚡ tsecurity.de Intelligence

The Real Reason We Call Them 'Constructors' : Real life vs OOP

Hi, before we dive in, just wanted to mention that I originally published this post as a blog on Hashnode with the same title- The Real Reason We Call Them 'Constructors' : Real life vs OOP Reposting it here in case it offers a fun read or…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Hi, before we dive in, just wanted to mention that I originally published this post as a blog on Hashnode with the same title- The Real Reason We Call Them 'Constructors' : Real life vs OOP

Reposting it here in case it offers a fun read or helps someone out!



A quick heads-up before we start — there’s a short recap section at the end. Feel free to skip ahead if you're short on time. I won’t mind!



constructor definition



Have you ever wondered what’s the connection between constructors in real life and constructors in OOP ? I mean, why do we call them “constructors” in OOP?



The screen shot above is the definition of the word “Constructors” we know in real life. In the world of computer science, constructors play a surprisingly similar role. (Even if it might not feel that way when you first hear the technical definition.)



Why? Let’s find out.



But first, let’s take a moment, and talk about the car company you have in real life.



Constructors in Real life:



Remember, you have an automobile company since my post about classes and objects?



Yes, you still have that.



Your company definitely has a team of engineers who conduct R&D about different aspects of vehicles like body, chassis, noise, vibration, design, aerodynamics etc. From this, they develop a new model or blueprint of your vehicles. At this moment, this model is just some words, metrics, tables and diagrams in papers.



Now you have your manufacturing team. This team assembles all the tools and gadgets needed, and builds the vehicle in accordance with the model or blueprint provided by your engineering team. In one word, they “construct” your vehicle according to the blueprint.



You probably have a sense of what constructors do in OOP by now. Still, let’s break down the technical side too. We’re done with the real-world part — now, on to the virtual-world.



Constructors in OOP:



I am sure you have heard how a “constructor” is a special type of function or method which_ “initializes the object's attributes or performs any setup required”_.



Sounds familiar ? We have just talked about how your engineering team provides the blueprint, and your manufacturing team “constructs” the vehicle.



In OOP, we know classes are the blueprint/model/design plan to create objects (a real-life thing).



You have designed your blueprint aka class CAR to store data during my blog about “classes and objects”. After defining your CAR class, when you try to create the object –a virtual car, you just give the instruction. The constructor does the rest for you.





  • It allocates the space in the memory. Think of it like allocating a space in the garage to keep the car.


  • Then it creates or constructs the object –a virtual car according to the attributes you have set in your class. Maybe you set the “color” of your CAR object to “red”, so it sets the color of the virtual car to red, maybe engine_type to “electric” and so on.



This whole "endeavor" is summed up in technical terms by a single line - “initializes the object's attributes or performs any setup required”. I think it’s fair to say we now understand why they’re called “constructors” in OOP.



With that being said, our conversation should end here.



But before we wrap up, here are some basic facts about constructors I think you should know.



Some Facts About Constructors in OOP:





  • Memory Allocation -The memory allocation depends on different types of** Data Structure**, another important and big topic in computer science. (Briefly saying, Data structure = Data + structure; the structure to store data efficiently).


  • Definition in Code - You can define your constructor explicitly with the attributes you want your object to have by default. But even if you don’t define the constructor, a default constructor is provided by the compiler. Though this constructor does not have any default values for the objects.


  • Calling - Another important fact about constructors is – it is automatically called, you don’t have to call it like you do in case of other methods or functions. This is why constructors are special type functions or methods.
    Now, I am ending my explanation here. Because the further explanation and coding syntax depends on different languages. For that, we’ve got plenty of amazing resources and articles available. Moreover, we have google and chatgpt.



Before ending, I’d like to briefly mention destructors.



Like the name suggests, it destroys the object after it fulfills its use. Think of it like creating a car “for a test”, then destroying it. (no sane and sober person destroys his/her car otherwise. So think of it as a test🙂).



Why do we need destructors? – to make space in the memory by deleting unnecessary objects. To put it technically, it’s for better memory management. You know, our memory size is limited.



Different programming languages have different ways to manage this “destroying” task.



So this is it. I’ve always been curious about what real-life constructors have in common with those in Computer Science, so I tried to explain it from that angle. I hope you found it helpful.



Finally, a quick recap:




  • Constructors are used to construct or build objects for us when we try to create an object of a class. Just like we know in real life.

  • Constructors allocate memory (allocates a space to keep the virtual car in the virtual garage.)

  • Constructors set the default values of the attributes. (set the engine, color etc. of the car with the value we specified)

  • We can explicitly define the constructor. If we don’t, a default constructor **is provided by the **compiler.

  • We don’t have to call the “constructor” method like other methods or functions. It is called automatically when we give commands to create an object of a class.



Briefly mentioned:





  • Data Structure – the structure to store data efficiently


  • Destructor - destroys the unnecessary objects for better memory management.



Still thinking about what to write next. Let’s see where it goes.



But for now, Adios!

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - The Real Reason We Call Them 'Constructors' : Real life vs OOP
id: 519e39cf-79f3-4002-9e5c-97a52f6a3417
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-25
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-25"
        description = "YARA Signature for "
    strings:
        $str = "The Real Reason We Call Them \'" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("The Real Reason We Call Them Constructor")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*The Real Reason We Call Them Constructor*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "The Real Reason We Call Them Constructor"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich The Real Reason We Call Them 'Constructo.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten The Real Reason We Call Them 'Constructors' : Real life vs OOP

Thematisch verwandte Begriffe: Real, Reason, Call, Them · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-82585 | The Botslab G980H dash camera firmware transmits sensitive information o…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle