ZeroIngs (@MuflihunDev) header
ZeroIngs (@MuflihunDev) profile picture

Audaces fortuna iuvat

Mojokerto, Jawa Timur
Joined January 2014
Photo by ZeroIngs (@MuflihunDev)
building pytorch from scratch [20/n]: - finally published this article - github.com/apoorvnandan/tens… - written assuming the reader knows programming but not neural nets
2
45
331
15,681
Kumpulan implementasi algoritma di berbagai bahasa program the-algorithms.com/ Psst... Open source loh
3
32
1
166
4,041
🦀 Loco: Web development in Rust "It’s Like Ruby on Rails, but for Rust." "Get the same great building experience of Rails, with the incredible performance and safety of Rust" loco.rs/ #development
1
5
45
1,892
Try avoiding SELECT * even on single-column tables One interesting case I ran into with a customer some years ago (2012-2013 I think) A backend API that is stable and runs in single digit millisecond. Until one day users came in to a slow and sluggish user experience. We checked the commits and nothing was obvious, most changes were benign. Just in case we reverted al commits but still the app was slow. Looking at the diagnostics, we noticed API log time taking from 500 ms to up to 2 seconds at times. We know nothing has changed in the backend that would’ve cause the slow down, but started looking at the database queries. SELECT * on a table that has 3 blob fields are being returned to the client, those blob fields has very large documents. It turned out this table had only 2 integer columns, and the API was running a SELECT * to return and use the two fields. But later, the admin added 3 blob fields that are used and populated by another application. While those blob fields were not being returned to the client, the backend API took the hit pulling the extra fields populated by other applications, causing database, network and protocol serialization overhead. So even if you have a single column on your table, just SELECT that column, because the schema can change from underneath you. There are many other reasons to avoid SELECT * of course, but I’ll talk about them in another post. —- if you enjoyed this, check out my fundamentals of database engineering databases.win $11.99 DB-AUG2024-B coupon until Aug 13 Check out the rest of my courses here courses.husseinnasser.com
12
84
5
672
60,327
This can be the approach you follow: 1. Understand the Requirements - Purpose and Scope: Determine what the API is meant to achieve. Identify the main use cases and target users (e.g., internal developers, third-party partners, public use). - Resources and Operations: Define the primary resources (e.g., users, products, orders). Identify the actions (CRUD operations - Create, Read, Update, Delete) that can be performed on these resources. 2. Design Principles - RESTful Architecture: Follow REST (Representational State Transfer) principles if the API is to be RESTful. Ensure stateless operations, meaning each request from a client must contain all the information needed to understand and process the request. - URL Structure and Endpoints: Design intuitive and consistent URLs. Use nouns to represent resources (e.g., /users, /products). Use HTTP methods to indicate actions (GET for reading, POST for creating, PUT for updating, DELETE for deleting). 3. Request and Response Format - Use JSON: JSON (JavaScript Object Notation) is commonly used due to its simplicity and compatibility with most programming languages. - Consistent Responses: Ensure responses have a consistent structure. Include standard HTTP status codes (200 OK, 201 Created, 400 Bad Request, 404 Not Found, 500 Internal Server Error). Provide meaningful error messages and codes. 4. Authentication and Authorization - Authentication: Decide on the authentication method (e.g., API keys, OAuth, JWT - JSON Web Tokens). Implement secure authentication mechanisms to protect the API. - Authorization: Ensure that users can only perform actions they are authorized to. Implement role-based access control (RBAC) if needed. 5. Rate Limiting and Throttling - Protect the API: Implement rate limiting to prevent abuse (e.g., 100 requests per minute). Use throttling to ensure fair usage among users. These are the points you can keep in mind before framing your answer.
11
33
2
377
46,081
Saya memulai gdocs surat terbuka diedit bersama, boleh anonim boleh nanti taruh nama as signatories, saat ini sudah mulai masuk poin-poinnya dari beberapa sahabat techies. Yang mau ikutan kontribusi boleh japri.
132
941
75
2,826
258,414
ZeroIngs retweeted
Kamu tau begadang itu beresiko? Tau. Ga mungkin kamu ga tau Tapi kamu ambil resiko itu karena kamu punya goals? Silakan. Begadang itu ibarat kartu truff. Gunakan saat penting2 saja. Ambil resiko itu, jika kamu rasa worth buatmu. Kalo ga worth? Ya skip ! – at Pasar Minggu, Indonesia
289
2,630
277
11,158
795,108
ZeroIngs retweeted
Ada yang pakai fitur ini? Ga perlu lagi buka youtube nyari rain sound 10 jam 😅
56
163
62
1,365
198,885
ZeroIngs retweeted
TIPS Daily Journaling. Tiap hari, luangin 5 menit utk. 1. Setelah bangun tidur, tulis: - daily affirmation - 3 hal yg bisa bikin harimu baik 2. Sebelum tidur, tulis: - 3 hal yg jadi highlights hari itu - 3 hal yg dipelajari hari itu Lakuin rutin deh, idup bakal lebih tertata.
155
8,146
472
30,337
1,344,915
❝ Depresi adalah upaya tubuh memberi tahu ada sesuatu yang perlu diperbaiki dalam hidup.❞ — Henry Manampiring, Filosofi Teras
3
62
307