Tonsai S. 🍂 (@tonsai) header
Tonsai S. 🍂 (@tonsai) profile picture

ITKMITL12 (0b1) | DSN 53-56 | #WebDev | #Laravel | ISFJ-T

/dev/null
Joined September 2008
Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)Photo by Tonsai S. 🍂 (@tonsai)
Tonsai S. 🍂 retweeted
Hired a junior developer. His code was messy, but it worked. I refactored it. Now it’s clean, readable, and doesn’t work. That’s the value of senior engineering.
58
253
7
8,908
113,686
Tonsai S. 🍂 retweeted
defaults write com.apple.finder AppleShowAllFiles TRUE
13
163
7
2,354
53,977
สุชาตินายขึ้นไปทำอะไรบนนั้น🤣🤣🤣
55
419
12
985
470,533
Tonsai S. 🍂 retweeted
🤣🤣🤣
38
1,163
82
8,511
219,567
Hilarious. The social contract is broken and people are done playing by the rules.
It's funny to think about all the ways our high trust society can be manipulated for personal gain if everyone simultaneously decides to stop playing by the implicit social rules. Eg: take out a bunch of credit card debt and never pay it back. What are they going to do? Sue 15 million people for non-compliance? It's impossible. Society works because of the social contracts. Governments have broken that social contract, and yet expect people to continue playing by the rules? Doubt that lasts much longer... Particularly when the currencies start going haywire - why not use the available system to max out your debt with the intention of never paying it back? I expect we will see much more of this in the coming years as people decide 'fuck it, this system is rigged'.
245
2,541
109
47,701
2,569,018
Tonsai S. 🍂 retweeted
this is how cats get their unique patterns 🐾
339
31,229
845
122,280
4,243,611
ผู้ว่าฯ ชัชชาติ ห่วงแสงป้าย LED รบกวนคนกรุง เสนอร่างข้อบัญญัติคุมแสง สร้างมาตรฐานใหม่ไม่ให้ประชาชนเดือดร้อน facebook.com/share/p/165mitW…
18
3,128
270
1,642
2,879,681
𝗛𝗼𝘄 𝘁𝗼 𝘀𝗲𝗹𝗲𝗰𝘁 𝗗𝗲𝘀𝗶𝗴𝗻 𝗣𝗮𝘁𝘁𝗲𝗿𝗻? Selecting the correct design pattern in software engineering is crucial for effective problem-solving. This guide streamlines the process, enabling you to make informed decisions between patterns based on your specific needs. It provides concise descriptions and valuable use cases for each pattern, making it easier to understand and apply them in real-world scenarios. To select a pattern, we must first go through the problem identification. If the problem is related to: 🔸 Object creation? → Creational patterns 🔸 Object assembly? → Structural patterns 🔸 Object interactions? → Behavioral patterns So, let's dive in. 𝟭. 𝗖𝗿𝗲𝗮𝘁𝗶𝗼𝗻𝗮𝗹 𝗣𝗮𝘁𝘁𝗲𝗿𝗻𝘀 🔹 Singleton: Use when a single instance of a class is needed. Some examples are logging and database connections. 🔹 Factory Method: Decouple object creation from usage. For example, you create different types of database connections based on configuration. 🔹 Abstract Factory: Create families of related objects. For example, I build parsers for different file formats. 🔹 Builder: Constructing complex objects step by step. For example, if you need to create a complex domain object. 🔹 Prototype: Creating duplicate objects and reusing cached objects to reduce database calls. 𝟮. 𝗦𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗮𝗹 𝗣𝗮𝘁𝘁𝗲𝗿𝗻𝘀 🔹 Adapter: Make incompatible interfaces compatible. For example, it integrates a new logging library into an existing system that expects a different interface. 🔹 Composite: Represent part-whole hierarchies. For example, graphic objects in a drawing application can be grouped and treated uniformly 🔹 Proxy: Control access to objects. For example, lazy loading of a high-resolution image in a web application. 🔹 Decorator: Dynamically add/remove behavior. For example, we are implementing compression or encryption on top of file streams. 🔹 Bridge: Decouple abstraction from implementation. For example, I am separating platform-specific code from core logic. 𝟯. 𝗕𝗲𝗵𝗮𝘃𝗶𝗼𝗿𝗮𝗹 𝗣𝗮𝘁𝘁𝗲𝗿𝗻𝘀 🔹 Strategy: Define a family of algorithms. These algorithms enable users to select from various sorting or compression algorithms. 🔹 Observer: Maintain a consistent state by being notified of changes and, for example, notifying subscribers of events in a messaging system. 🔹 Command: Encapsulate a request as an object. For example, I implement undo/redo functionality in a text or image editor. 🔹 State: Encapsulate state-specific behavior. For example, we are handling different states of a user interface element (e.g., enabled, disabled, selected). 🔹 Template Method: Define the skeleton of an algorithm in operation, deferring some steps to subclasses and implementing a base class for unit testing with customizable setup and teardown steps. Ultimately, we devised the pattern we needed for our problem. #softwareengineering #programming #softwaredesign
9
134
639
53,863
Tonsai S. 🍂 retweeted
Big plans
20
253
41
5,505
310,410
Tonsai S. 🍂 retweeted
I worked on FaceID. During development we had to train it which meant we graded our own scans. Let me tell you that seeing yourself in infrared from a bad angle while taking a shit is a jump scare you aren’t ready for.
Face ID is way more faster, better and secure than Touch ID
79
330
8
13,501
1,634,801
God is always with us .
55
1,209
79
9,102
1,473,298
盗撮してたら怒られました(音量注意)
100
16,934
523
146,405
3,513,891
Trading this week
293
2,299
297
15,843
1,299,497
Tonsai S. 🍂 retweeted
orange is the new void snack
123
4,952
309
66,742
1,011,086
Replying to @reall_srn
ประโยคเด็ดที่สุดแห่งปี
6
36,511
183
25,175
3,213,691
Tonsai S. 🍂 retweeted
they are YELLING 😭
199
9,035
262
126,210
2,092,451
Wait for the end..🤣🤣
100
1,576
102
16,182
455,411
Tonsai S. 🍂 retweeted
MS Paint Mirror
2,484
78,929
8,803
908,001
24,625,364
😌
16
39,218
92
31,696
1,963,896
i can go anywhere i want, anywhere i want just not home
26
7,600
79
46,405
739,026