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,907
113,687
Tonsai S. 🍂 retweeted
defaults write com.apple.finder AppleShowAllFiles TRUE
13
163
7
2,351
53,977
สุชาตินายขึ้นไปทำอะไรบนนั้น🤣🤣🤣
55
419
12
986
470,533
Tonsai S. 🍂 retweeted
🤣🤣🤣
38
1,162
82
8,509
219,568
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,540
109
47,683
2,569,027
Tonsai S. 🍂 retweeted
this is how cats get their unique patterns 🐾
338
31,220
845
122,232
4,243,660
ผู้ว่าฯ ชัชชาติ ห่วงแสงป้าย LED รบกวนคนกรุง เสนอร่างข้อบัญญัติคุมแสง สร้างมาตรฐานใหม่ไม่ให้ประชาชนเดือดร้อน facebook.com/share/p/165mitW…
18
3,129
270
1,642
2,879,682
𝗛𝗼𝘄 𝘁𝗼 𝘀𝗲𝗹𝗲𝗰𝘁 𝗗𝗲𝘀𝗶𝗴𝗻 𝗣𝗮𝘁𝘁𝗲𝗿𝗻? 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,506
310,411
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,503
1,634,801
God is always with us .
55
1,209
79
9,099
1,473,302
Trading this week
293
2,299
297
15,842
1,299,500
Tonsai S. 🍂 retweeted
orange is the new void snack
123
4,952
309
66,728
1,011,095
Replying to @reall_srn
ประโยคเด็ดที่สุดแห่งปี
6
36,509
183
25,173
3,213,715
Tonsai S. 🍂 retweeted
they are YELLING 😭
199
9,035
262
126,187
2,092,455
Wait for the end..🤣🤣
100
1,576
102
16,178
455,416
Tonsai S. 🍂 retweeted
MS Paint Mirror
2,484
78,915
8,804
907,829
24,625,623
😌
16
39,215
92
31,696
1,963,913
i can go anywhere i want, anywhere i want just not home
26
7,598
79
46,397
739,030
Tonsai S. 🍂 retweeted
คนชอบคิดว่าทุกคนมี LINE แล้วลงทุนกับ LINE OA ไปเรื่อยๆ จริงๆ แล้วทุกคนมีช่องทางอื่นอยู่
4
1
934