Gopher Academy
3.34K subscribers
918 photos
40 videos
279 files
1.99K links
🕸 Gopher Academy

🔷interview golang
https://github.com/mrbardia72/Go-Interview-Questions-And-Answers

حمایت مالی:
https://www.coffeete.ir/mrbardia72

ادمین:
@mrbardia72
Download Telegram
Everything You Always Wanted to Know About Type Inference - And a Little Bit More

Robert Griesemer
9 October 2023


This is the blog version of my talk on type inference at GopherCon 2023 in San Diego, slightly expanded and edited for clarity.

https://go.dev/blog/type-inference


🕊 @gopher_academy
2🕊1🍾1
🎆 Go 1.21.3 and 1.20.10 are released!

🔐 Security: Includes a security fix for net/http (CVE-2023-39325).

📡 Announcement: https://groups.google.com/g/golang-announce/c/iNNxDTCjZvo

📦 Download: go.dev/dl/#go1.21.3


🕊 @gopher_academy
🍾2
🌷A real life use-case for generics in Go: API for client-side pagination - Vladimir Varankin

https://vladimir.varank.in/notes/2022/05/a-real-life-use-case-for-generics-in-go-api-for-client-side-pagination/


🕊 @gopher_academy
1👍1🕊1
🌷PostgreSQL Indexes: What They Are and How They Help - Simple Talk

https://www.red-gate.com/simple-talk/homepage/postgresql-indexes-what-they-are-and-how-they-help/


🕊 @gopher_academy
👍2🕊1
🌷System Design: Netflix | by Karan Pratap Singh | Medium

https://github.com/karanpratapsingh/system-design#netflix


🕊 @gopher_academy
👍3🔥2
Karan Pratap Singh - System Design.pdf
37 MB
کتاب System Design

یک کتاب مفید و کامل درخصوص طراحی نرم افزار با سایر موضوعات مختلف


🕊 @gopher_academy
🔥81🕊1🍾1
حملات DDOS وارد مرحله‌ای جدید شدن، آسیب‌پذیری Rapid Reset که در HTTP/2 پیدا شده روش کارش اینه که مهاجم مثلا یه درخواست GET ساده به سایت شما ارسال میکنه و بلافاصله درخواست رو لغو میکنه
این سرعت حملات رو بیشتر میکنه، مثلا تونستن ۲۰۱ میلیون درخواست در ثانیه فقط به کلادفلر بزنن
در کل آسیب‌پذیری همرو تهدید میکنه ولی کلادفلر و گوگل و ... پچ منتشر کردن پس اگه سایتتون پشت کلادفلر باشه نیاز نیست نگران باشید
مقالاتی از گوگل و کلادفلر
https://cloud.google.com/blog/products/identity-security/how-it-works-the-novel-http2-rapid-reset-ddos-attack

https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/

#DevTwitter | <Soroush Ahmadi/>


🕊 @gopher_academy
👍131🔥1🕊1🍾1

🕊 @gopher_academy
👍5

🕊 @gopher_academy
👍4
Git Commands: The Ultimate Cheatsheet

https://dev.to/mosimidev/git-commands-the-ultimate-cheatsheet-41j2


🕊 @gopher_academy
👍21
Arayeshe Ghaliz
Homayoun Shajarian

🕊 @gopher_academy
7🕊2🍾1
🌷مقاله جالب در مورد روش های retry کردن
به همراه انیمیشن

https://encore.dev/blog/retries


🕊 @gopher_academy
👍9
🔵 مواردی که برای نوشتن بهتر یک داکرفایل باید رعایت بشه توی این مقاله خیلی خوب و مفید توضیح داده
🟢 اگر مورد دیگه ای هم بود کامنت بزارید برامون
🔴https://dev.to/hazarnenni/docker-best-practices-55j0


🕊 @gopher_academy
4👍1🕊1🍾1
🔵 جایگزین رایگان و اوپن‌سورس برای jira و clickup و asana که به سادگی trello میشه باهاش کار کرد ولی تقریبا اکثر feature های jira و نرم‌افزارهای مشابه رو داره و استفاده ازش اصلا گیج کننده نیست.

🔴 https://github.com/Leantime/leantime


🕊 @gopher_academy
👍42🕊1
🔵MVP or TVP? Why Your Internal Developer Platform Needs Both

🔴https://thenewstack.io/mvp-or-tvp-why-your-internal-developer-platform-needs-both/


🕊 @gopher_academy
🔥2🍾2👍1🕊1
Best ways to test system functionality

🕊 @gopher_academy
👍4🕊1
10 Strategies for Better Time Management.pdf
706.9 KB
10 strategies for better time management

🕊 @gopher_academy
🍾4👍1🕊1

🕊 @gopher_academy
👍4🍾1
10 Best Practice for API Design

1. Use nouns instead of verbs
Verbs should not be used in endpoint paths. Instead, the pathname should contain the nouns that identify the object that the endpoint that we are accessing or altering belongs to.

For example, instead of using /getAllClients to fetch all clients, use /clients.

2. Use plural resource nouns
Try to use the plural form for resource nouns, because this fits all types of endpoints.

For example, instead of using /employee/:id/, use /employees/:id/.

3. Be consistent
When we say to be consistent, this means to be predictable. When we have one endpoint defined, others should behave in the same way. So, use the same case for resources, the same auth methods for all endpoints, use the same headers, use the same status codes, etc.

4. Keep it simple
We should make naming all endpoints to be resource-oriented, as they are. If we want to define an API for users, we would define it as:

/users
/users/124

So, the first API gets all users and the second one gets a specific user.

5. User proper status codes
This one is super important. There are many HTTP status codes, but we usually use just some of them. Don't use too many, but use the same status codes for the same outcomes across the API, e.g.,

200 for general success.
201 for successful creation.
202 for successful request.
204 for no content.
307 for redirected content.
400 for bad requests.
401 for unauthorized requests.
403 for missing permissions.
404 for missing resources.
5xx for internal errors.

6. Don’t return plain text
REST APIs should accept JSON for request payload and also respond with JSON because it is a standard for transferring data. Yet, it is not enough just to return a body with JSON-formatted string, we need to specify a Content-Type header too to be application/json. The only exception is if we’re trying to send and receive files between the client and server.

7. Do proper error handling
Here we want to eliminate any confusion when an error occurs, so we need to handle errors properly and return a response code that indicates what error happened (from 400 to 5xx errors). Along with a status code we need to return some details in the response body.

8. Have good security practices
We want that all communication between a client and a server is protected, which means that we need to use SSL/TLS all the time, with no exceptions. Also, allow auth via API keys, which should be passed using a custom HTTP header, with an expiration day.

9. Use pagination
Use pagination if our API needs to return a lot of data, as this will make our API future-proof. Use page and page_size is recommended here.

For example, /products?page=10&page_size=20

10. Versioning
It is very important to version APIs from the first version, as there could be different users for our APIs. This will allow our users not to be affected by changes that we can do in the future. API versions can be passed through HTTP headers or query/path params.

For example, /products/v1/4


🕊 @gopher_academy
👍53🕊1
سلام و درود خدمت همه دوستان

چند روز اخیر برخی از دوستان به دنبال موقعیت کارآموزی بودند، بنده سعی کردم کاری انجام دهم نتوانستم.

خواستم ببینم اگر تو شرکتتان موقعیت کارآموزی زبان گو دارید بی زحمت به بنده معرفی کنید تا به این عزیزان کمک کنم.

یا اینکه اطلاعات تماس و پروفایل شرکتتان را بفرستید تا در اینجا به اشتراک بزارم.


🕊 @gopher_academy
9🕊2
🔵Real-time Analytics in Postgres: Why It's Hard (and How to Solve It)

🟢https://www.timescale.com/blog/real-time-analytics-in-postgres-why-its-hard-and-how-to-solve-it/


🕊 @gopher_academy
👍21🕊1