https://www.youtube.com/watch?v=5HCdqV4nQkQ&list=PLOXvU5Ov-cqpjd1_OnczdizY0I64OfH-T
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
YouTube
Gaming in Go: Episode 1 - Introduction
Welcome to a new series I'm calling Gaming in Go, where we'll be exploring the feasibility of using the Go programming language to write games! This video introduces the series and talks about what to expect and the motivation behind it.
🔥4
Product Validation Playbooks contains list of items for validating the problem, market, product and willingness to pay
یه لیست نسبتا کامل از تقریبا تمام تستهای ممکن برای validate کردن محصولتون یا مارکت یا موارد دیگه به صورت طبقهبندی شده برای هرکدوم توضیحات جامعی دادند.
#validation #test #list #category #categories #playbook #product #market #problem
https://learningloop.io
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
یه لیست نسبتا کامل از تقریبا تمام تستهای ممکن برای validate کردن محصولتون یا مارکت یا موارد دیگه به صورت طبقهبندی شده برای هرکدوم توضیحات جامعی دادند.
#validation #test #list #category #categories #playbook #product #market #problem
https://learningloop.io
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍2🔥2
Markdown code for lots of small badges that can be included in a README.md file for a github or bitbucket or gitlab project.
لیستی از badge های مختلف برای قراردادن داخل فایل README.md پروژههاتون خیلی جذابن و میتونین توی github یا gitlab یا bitbucket یا بقیه سایتهای مشابه استفاده کنید.
#github #badge #readme #markdown #list #small #ribbon #pushpin #opensource
https://naereen.github.io/badges
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
لیستی از badge های مختلف برای قراردادن داخل فایل README.md پروژههاتون خیلی جذابن و میتونین توی github یا gitlab یا bitbucket یا بقیه سایتهای مشابه استفاده کنید.
#github #badge #readme #markdown #list #small #ribbon #pushpin #opensource
https://naereen.github.io/badges
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🤩3🎉2
Customizing Go Binaries with Build Tags
https://www.digitalocean.com/community/tutorials/customizing-go-binaries-with-build-tags
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://www.digitalocean.com/community/tutorials/customizing-go-binaries-with-build-tags
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔥3
Forwarded from Geniuses Group (Delaram)
بسیاری از متخصصان حوزه ی #امنیت نگران فراگیریه مفاهیم (قدیمی تر) مانند PaaS, SaaS و (کمی جدیدتر) low code / no code در توسعه نرم افزار ها هستند. تحقیقات نشون داده که شرکت ها کمبود بسیاری در دید کنترل و دانش لازم برای برآورد کردن امنیت در نرم افزار(های) سازمانی دارند. چند مورد از مشکلاتی که این اپلیکیشن ها فراهم می کنند را در ادامه ی مطلب که برگرفته از این مقاله هست، براتون فراهم کنم:
- هیچ نظارتی مبنی بر اینکه نرم افزارهای برون سپاری شده چجوری به داده های ما دسترسی پیدا می کنند وجود نداره .
- اعتماد کردن واقعا مسئله ی مهمیه. اگه بخواهیم اینجا تست امنیتی رو در نظر بگیریم نرم افزارها های pro-code معمولا با ابزار های اسکن و config به عنوان بخشی از ci/cd ساخته میشوند و این مسئله واقعا بسته به اینکه شما چقدر روی دادها سازمان خود حساس هستید میتونه برای نرم افزار و سازمان شما آسیب زا باشه.
- ما اصلا نمی دونیم چجوری این آسیب پذیری ها رو در نرم افزارهای برون سپاری شده چک کنیم . مسلما شما نمی تونید امنیت کدی که بهش دسترسی ندارید رو حفظ کنید. (یا چک کنید)
- با بوجود اومدن مفاهیمی مثل platform as a service / kubernetes / serverless functions نگرانی های زیادی در باب کنترل ، امنیت و مشاهده ی داده بوجود اومده.
درک مشکلاتی که توسعه بر پایه نرم افزارهای low code / no code به همراه خودشون میارن اولین قدمی هست که ما باید برداریم. برای ارائه ی راه حل های جایگزین احتیاج هست کار کردن با "داده" رو یاد بگیریم و سعی کنیم به درک بالایی از داده برسیم. شرکت ها در مراحل متفاوتی از توسعه ی نرم افزارها، نیازمندی به control , visibility و necessary knowledge رو در جریان داده های خودشون درک می کنند. امیدواریم یکی از افراد اون سازمان خواننده ی این پست باشه.
درصدد رفع این مشکل و بدست آوردن این علم در توسعه ی این ابزار ها و درک کافی در کار با #داده لازم دیدیم جلساتی مبنی بر عنوان "data governance" را در کنار همه ی توسعه دهندگان نرم افزار (برنامه نویسان در حوزه ی IT) داشته باشیم تا بتونیم در درجه ی اول سوالات صحیحی رو در طی توسعه ی نرم افزار بپرسیم و در درجه ی دوم توانایی پاسخ به اون نیازمندی ها رو در خودمون ایجاد کنیم. در اولین سری این جلسات به بررسی کتاب با نام مشابه یعنی data governance: The Definitive Guide: People, Processes, and Tools می پردازیم.
راوی: دلارام غلام پور سقا
زمان: اولین جلسه شنبه سه اردیبهشت در سرور دیسکورد گروه توسعه برگزار میشه و جلسات بعدی در ایونت مربوطه در همان سرور دیسکورد به اطلاع علاقه مندان میرسه
- هیچ نظارتی مبنی بر اینکه نرم افزارهای برون سپاری شده چجوری به داده های ما دسترسی پیدا می کنند وجود نداره .
- اعتماد کردن واقعا مسئله ی مهمیه. اگه بخواهیم اینجا تست امنیتی رو در نظر بگیریم نرم افزارها های pro-code معمولا با ابزار های اسکن و config به عنوان بخشی از ci/cd ساخته میشوند و این مسئله واقعا بسته به اینکه شما چقدر روی دادها سازمان خود حساس هستید میتونه برای نرم افزار و سازمان شما آسیب زا باشه.
- ما اصلا نمی دونیم چجوری این آسیب پذیری ها رو در نرم افزارهای برون سپاری شده چک کنیم . مسلما شما نمی تونید امنیت کدی که بهش دسترسی ندارید رو حفظ کنید. (یا چک کنید)
- با بوجود اومدن مفاهیمی مثل platform as a service / kubernetes / serverless functions نگرانی های زیادی در باب کنترل ، امنیت و مشاهده ی داده بوجود اومده.
درک مشکلاتی که توسعه بر پایه نرم افزارهای low code / no code به همراه خودشون میارن اولین قدمی هست که ما باید برداریم. برای ارائه ی راه حل های جایگزین احتیاج هست کار کردن با "داده" رو یاد بگیریم و سعی کنیم به درک بالایی از داده برسیم. شرکت ها در مراحل متفاوتی از توسعه ی نرم افزارها، نیازمندی به control , visibility و necessary knowledge رو در جریان داده های خودشون درک می کنند. امیدواریم یکی از افراد اون سازمان خواننده ی این پست باشه.
درصدد رفع این مشکل و بدست آوردن این علم در توسعه ی این ابزار ها و درک کافی در کار با #داده لازم دیدیم جلساتی مبنی بر عنوان "data governance" را در کنار همه ی توسعه دهندگان نرم افزار (برنامه نویسان در حوزه ی IT) داشته باشیم تا بتونیم در درجه ی اول سوالات صحیحی رو در طی توسعه ی نرم افزار بپرسیم و در درجه ی دوم توانایی پاسخ به اون نیازمندی ها رو در خودمون ایجاد کنیم. در اولین سری این جلسات به بررسی کتاب با نام مشابه یعنی data governance: The Definitive Guide: People, Processes, and Tools می پردازیم.
راوی: دلارام غلام پور سقا
زمان: اولین جلسه شنبه سه اردیبهشت در سرور دیسکورد گروه توسعه برگزار میشه و جلسات بعدی در ایونت مربوطه در همان سرور دیسکورد به اطلاع علاقه مندان میرسه
Dark Reading
Why So Many Security Experts Are Concerned About Low-Code/No-Code Apps
IT departments must account for the business impact and security risks such applications introduce.
👍7🔥2🎉1
Forwarded from زبان برنامه نویسی سالیدیتی (saracodic)
سلام دوستان👋🏼👋🏼
❗️این پست برای دسترسی سریع به بعضی از محتواهای کانال هستش
اگه منابعی میشناسین که جاشون خالی هستش، میتونید به آیدی زیر پیام بدین.
@Soliditylangfa
فهرست محتوا
◀️ لینک ترجمه داکیومنت سالیدیتی
◀️ لینک ویدیو آموزش دسترسی به محتوای داکیومنت سالیدیتی به صورت محلی
◀️ نقشه راه برنامه نویسی سالیدیتی از دیدگاه امیر حبیب زاده هم بنیان گذار پروژه تریژر
◀️ راهنمای برنامه نویسی بلاکچین (زبان انگلیسی)
◀️ لینک انجمن توسعه قرارداد هوشمند (مجموعه کوین ایران): جهت تبادل نظر
◀️ لینک فروم فاندیشن اتریوم که میتونید هر سوالی دارین بپرسین و یا جواب سوالاتتون رو پیدا کنید
◀️ لینک دوره آموزش سالیدیتی eaththeblocks (زبان انگلیسی)
◀️ لینک دوره آموزش سالیدیتی smart contract programming (زبان انگلیسی)
◀️ لینک دانلود دوره آموزش سالیدیتی بر بستر اتریوم (زبان انگلیسی)
◀️ لینک دوره دانلود آموزش سالیدیتی و اتریوم یودمی (زبان انگلیسی)
◀️ لینک دوره ساخت Dapp با ساخت دپ با ریاکت نیتیو (زبان انگلیسی)
◀️ 🔽لینکهای دورههای زیر : (زبان انگلیسی)
➖➖قراردادهای هوشمند Solidity: ساخت DApps در بلاک چین اتریوم
➖➖آموزش ایجاد اپلیکیشن های Ethereum و Blockchain با Solidity
➖➖دوره بلاک چین - یادگیری Solidity
➖➖ساخت اپلیکیشن بلاک چین اتریوم: بخش 1 - آشنایی با بلاک چین
➖➖یادگیری Blockchain با ساخت بلاک چین شخصی خود در JavaScript
➖➖آموزش ساخت بلاک چین و ارز دیجیتال از ابتدا - بخش 1
➖➖توسعه اپلیکیشن در Ethereum Blockchain
◀️ لینک دوره امنیت قراردادهای هوشمند ایمان و مهدی_کوین ایران (زبان فارسی)
◀️ لینک دوره آموز سالیدیتی کوین ایران (زبان فارسی)
◀️ لینک دوره فرا زمان (زبان فارسی)
◀️لینک کانال ترجمه یکی از دوره های یودمی (زبان فارسی)
◀️ لینک دوره آموزش سایت تاپ لرن سالیدیتی روی بلاکچین ترون (زبان فارسی)
◀️ لینک آموزش سالیدیتی (زبان فارسی)
◀️ لینک دوره آموزش سالیدیتی (زبان فارسی)
◀️ لینک ساخت توکن ERC20 محتوای پیج رضا نورمحمدی (زبان فارسی)
#معرفی_کتاب
◀️ فایل کتاب مسترینک بیتکوین (زبان انگلیسی)
◀️ فایل کتاب مسترینگ اتریوم(زبان انگلیسی)
◀️ فایل کتاب توسعه قراردادهای هوشمند با سالیدیتی(زبان انگلیسی)
◀️فایل کتاب توسعه Dapp اتریومی(زبان انگلیسی)
◀️فایل کتاب اتریوم برای توسعه دهندگان وب: آموزش ساخت اپلیکیشنهای وب بر روی بلاکچین اتریوم(زبان انگلیسی)
◀️فایل کتاب ضروریات برنامه نویسی سالیدیتی،راهنمای مبتدیان برای ایجاد قراردادهای هوشمند برای اتریوم و بلاکچین(زبان انگلیسی)
◀️لینک خرید کتاب آموزش سالیدیتی به زبان فارسی
◀️ لینک کتاب دیفای و آینده مالی (زبان انگلیسی)
◀️لینک معرفی منابع وب3 (زبان انگلیسی)
◀️لینک سایت نمونه قراردادهای هوشمند برای یادگیری از مبتدی تا پیشرفته
🌐 راه ارتباطی کانال سالیدیتی با شما در تمام شبکههای اجتماعی👇👇
🆔@soliditylang_fa
❗️این پست برای دسترسی سریع به بعضی از محتواهای کانال هستش
اگه منابعی میشناسین که جاشون خالی هستش، میتونید به آیدی زیر پیام بدین.
@Soliditylangfa
فهرست محتوا
◀️ لینک ترجمه داکیومنت سالیدیتی
◀️ لینک ویدیو آموزش دسترسی به محتوای داکیومنت سالیدیتی به صورت محلی
◀️ نقشه راه برنامه نویسی سالیدیتی از دیدگاه امیر حبیب زاده هم بنیان گذار پروژه تریژر
◀️ راهنمای برنامه نویسی بلاکچین (زبان انگلیسی)
◀️ لینک انجمن توسعه قرارداد هوشمند (مجموعه کوین ایران): جهت تبادل نظر
◀️ لینک فروم فاندیشن اتریوم که میتونید هر سوالی دارین بپرسین و یا جواب سوالاتتون رو پیدا کنید
◀️ لینک دوره آموزش سالیدیتی eaththeblocks (زبان انگلیسی)
◀️ لینک دوره آموزش سالیدیتی smart contract programming (زبان انگلیسی)
◀️ لینک دانلود دوره آموزش سالیدیتی بر بستر اتریوم (زبان انگلیسی)
◀️ لینک دوره دانلود آموزش سالیدیتی و اتریوم یودمی (زبان انگلیسی)
◀️ لینک دوره ساخت Dapp با ساخت دپ با ریاکت نیتیو (زبان انگلیسی)
◀️ 🔽لینکهای دورههای زیر : (زبان انگلیسی)
➖➖قراردادهای هوشمند Solidity: ساخت DApps در بلاک چین اتریوم
➖➖آموزش ایجاد اپلیکیشن های Ethereum و Blockchain با Solidity
➖➖دوره بلاک چین - یادگیری Solidity
➖➖ساخت اپلیکیشن بلاک چین اتریوم: بخش 1 - آشنایی با بلاک چین
➖➖یادگیری Blockchain با ساخت بلاک چین شخصی خود در JavaScript
➖➖آموزش ساخت بلاک چین و ارز دیجیتال از ابتدا - بخش 1
➖➖توسعه اپلیکیشن در Ethereum Blockchain
◀️ لینک دوره امنیت قراردادهای هوشمند ایمان و مهدی_کوین ایران (زبان فارسی)
◀️ لینک دوره آموز سالیدیتی کوین ایران (زبان فارسی)
◀️ لینک دوره فرا زمان (زبان فارسی)
◀️لینک کانال ترجمه یکی از دوره های یودمی (زبان فارسی)
◀️ لینک دوره آموزش سایت تاپ لرن سالیدیتی روی بلاکچین ترون (زبان فارسی)
◀️ لینک آموزش سالیدیتی (زبان فارسی)
◀️ لینک دوره آموزش سالیدیتی (زبان فارسی)
◀️ لینک ساخت توکن ERC20 محتوای پیج رضا نورمحمدی (زبان فارسی)
#معرفی_کتاب
◀️ فایل کتاب مسترینک بیتکوین (زبان انگلیسی)
◀️ فایل کتاب مسترینگ اتریوم(زبان انگلیسی)
◀️ فایل کتاب توسعه قراردادهای هوشمند با سالیدیتی(زبان انگلیسی)
◀️فایل کتاب توسعه Dapp اتریومی(زبان انگلیسی)
◀️فایل کتاب اتریوم برای توسعه دهندگان وب: آموزش ساخت اپلیکیشنهای وب بر روی بلاکچین اتریوم(زبان انگلیسی)
◀️فایل کتاب ضروریات برنامه نویسی سالیدیتی،راهنمای مبتدیان برای ایجاد قراردادهای هوشمند برای اتریوم و بلاکچین(زبان انگلیسی)
◀️لینک خرید کتاب آموزش سالیدیتی به زبان فارسی
◀️ لینک کتاب دیفای و آینده مالی (زبان انگلیسی)
◀️لینک معرفی منابع وب3 (زبان انگلیسی)
◀️لینک سایت نمونه قراردادهای هوشمند برای یادگیری از مبتدی تا پیشرفته
🌐 راه ارتباطی کانال سالیدیتی با شما در تمام شبکههای اجتماعی👇👇
🆔@soliditylang_fa
Telegram
زبان برنامه نویسی سالیدیتی
با همکاری آرمین شمعچیزاده، داکیومنت #سالیدیتی رو ترجمه کردیم و الان بخشی از آن روی گیتهاب رسمی سالیدیتی قرار گرفت. میتونین از لینک زیر به بخش ترجمه شده دسترسی پیدا کنید. متعاقباً قسمتهای بعدی ترجمعه اضافه خواهد شد.
@shamchizade
ممنون آرمین عزیز که یک همراه…
@shamchizade
ممنون آرمین عزیز که یک همراه…
🤩5👍1🔥1
Learn Go with test-driven development
با روش TDD زبان برنامهنویسی go رو یاد بگیرید.
#go #golang #tdd #test #red #green #refactor #testing #driven #development
https://github.com/quii/learn-go-with-tests
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
با روش TDD زبان برنامهنویسی go رو یاد بگیرید.
#go #golang #tdd #test #red #green #refactor #testing #driven #development
https://github.com/quii/learn-go-with-tests
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔥8
Forwarded from Mohammad Hoseini Rad
توی این مقاله در مورد ساختمان داده Heap بخصوص Min-Heap صحبت کردم و بعد از تحلیل یک شبیه سازی اون رو با Go پیاده میکنیم که به چشم تاثیری که روی سیستممون میذاره رو ببینیم.
https://vrgl.ir/vdLOM
https://vrgl.ir/vdLOM
ویرگول
آشنایی با Heap و مقایسه آن در یک شبیه سازی
فرض کنید یک لیست از اعداد داریم و میخوایم دنبال minimum ها بگردیم. توی این مقاله در مورد راه حل معمولی و مقایسش با Heap میپردازیم و با شبیه
🔥4🎉3
🟢 Authentication Security: Password Reset Best Practices and More🟢
🔵 Bringing it all together, your general application flow should look something like this:
1) The user requests a password reset, providing their email
2) Look up the user in the database using the email address
3) Securely create a token, and store it in the database together with its creation time.
4) Send an email with a link to your password recovery page, and the token as a query string parameter
5) Lookup the user in the database using the token, if found, and not expired, prompt him for a new password
6) Store the new password in the database
7) Delete the used token from the database.
🔵 Remember, Don’ts:
1) Don’t store the plaintext passwords in the database.
2) Don’t use public information as a password recovery token.
3) Don’t use sequential id numbers as password recovery tokens.
4) Don’t make your security depend on the fact that your code is secret.
5) Don’t generate tokens in a way that can also be generated offline
6) Don’t use encryption
7) Don’t generate your tokens based on time
🔵 Remember, Do:
1) Generate tokens that don’t depend on the user data and store them in the database.
2) Set a lifetime for your reset tokens.
3) Discard the reset tokens after use.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔵 Bringing it all together, your general application flow should look something like this:
1) The user requests a password reset, providing their email
2) Look up the user in the database using the email address
3) Securely create a token, and store it in the database together with its creation time.
4) Send an email with a link to your password recovery page, and the token as a query string parameter
5) Lookup the user in the database using the token, if found, and not expired, prompt him for a new password
6) Store the new password in the database
7) Delete the used token from the database.
🔵 Remember, Don’ts:
1) Don’t store the plaintext passwords in the database.
2) Don’t use public information as a password recovery token.
3) Don’t use sequential id numbers as password recovery tokens.
4) Don’t make your security depend on the fact that your code is secret.
5) Don’t generate tokens in a way that can also be generated offline
6) Don’t use encryption
7) Don’t generate your tokens based on time
🔵 Remember, Do:
1) Generate tokens that don’t depend on the user data and store them in the database.
2) Set a lifetime for your reset tokens.
3) Discard the reset tokens after use.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍5🔥1
🟢 REST API Design Best Practices🟢
1. Use JSON as the Format for Sending and Receiving Data
2. Use Nouns Instead of Verbs in Endpoints
3. Name Collections with Plural Nouns
4. Use Status Codes in Error Handling
5. Use Nesting on Endpoints to Show Relationships
6. Use Filtering, Sorting, and Pagination to Retrieve the Data Requested
7. Use SSL for Security
8. Be Clear with Versioning
9. Provide Accurate API Documentation
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
1. Use JSON as the Format for Sending and Receiving Data
2. Use Nouns Instead of Verbs in Endpoints
3. Name Collections with Plural Nouns
4. Use Status Codes in Error Handling
5. Use Nesting on Endpoints to Show Relationships
6. Use Filtering, Sorting, and Pagination to Retrieve the Data Requested
7. Use SSL for Security
8. Be Clear with Versioning
9. Provide Accurate API Documentation
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍3
🔵 Token Best Practices 🔵
*Here are some basic considerations to keep in mind when using tokens: Keep it secret. Keep it safe: The signing key should be treated like any other credential and revealed only to services that need it.
*
Do not add sensitive data to the payload:
Tokens are signed to protect against manipulation and are easily decoded. Add the bare minimum number of claims to the payload for best performance and security.
Give tokens an expiration:
Technically, once a token is signed, it is valid forever—unless the signing key is changed or expiration explicitly set. This could pose potential issues so have a strategy for expiring and/or revoking tokens.
Embrace HTTPS:
Do not send tokens over non-HTTPS connections as those requests can be intercepted and tokens compromised.
Consider all of your authorization use cases:
Adding a secondary token verification system that ensures tokens were generated from your server may be necessary to meet your requirements.
Store and reuse:
Reduce unnecessary roundtrips that extend your application's attack surface, and optimize plan token limits (where applicable) by storing access tokens obtained from the authorization server. Rather than requesting a new token, use the stored token during future calls until it expires. How you store tokens will depend on the characteristics of your application: typical solutions include databases (for apps that need to perform API calls regardless of the presence of a session) and HTTP sessions (for apps that have an activity window limited to an interactive session). For an example of server-side storage and token reuse.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
*Here are some basic considerations to keep in mind when using tokens: Keep it secret. Keep it safe: The signing key should be treated like any other credential and revealed only to services that need it.
*
Do not add sensitive data to the payload:
Tokens are signed to protect against manipulation and are easily decoded. Add the bare minimum number of claims to the payload for best performance and security.
Give tokens an expiration:
Technically, once a token is signed, it is valid forever—unless the signing key is changed or expiration explicitly set. This could pose potential issues so have a strategy for expiring and/or revoking tokens.
Embrace HTTPS:
Do not send tokens over non-HTTPS connections as those requests can be intercepted and tokens compromised.
Consider all of your authorization use cases:
Adding a secondary token verification system that ensures tokens were generated from your server may be necessary to meet your requirements.
Store and reuse:
Reduce unnecessary roundtrips that extend your application's attack surface, and optimize plan token limits (where applicable) by storing access tokens obtained from the authorization server. Rather than requesting a new token, use the stored token during future calls until it expires. How you store tokens will depend on the characteristics of your application: typical solutions include databases (for apps that need to perform API calls regardless of the presence of a session) and HTTP sessions (for apps that have an activity window limited to an interactive session). For an example of server-side storage and token reuse.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍4🔥1
🔵 How Are Best Practices Relevant in Software Engineering?🔵
1. Enhance Code Readability
2. Ensure Your Code Works Efficiently
3. Refactor Your Code
4. Develop A Professional Coding Style
5. Use Version Control
6. Test Your Code
7. The KISS Principle
8. The YAGNI Principle
9. The DRY Principle
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
1. Enhance Code Readability
2. Ensure Your Code Works Efficiently
3. Refactor Your Code
4. Develop A Professional Coding Style
5. Use Version Control
6. Test Your Code
7. The KISS Principle
8. The YAGNI Principle
9. The DRY Principle
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍3❤1
🔵 Best practices using context in golang 🔵
1- context.Background should be used only at the highest level, as the root of all derived contexts
2- context.TODO should be used where not sure what to use or if the current function will be updated to use context in future
3- context cancelations are advisory, the functions may take time to clean up and exit
4- context.Value should be used very rarely, it should never be used to pass in optional parameters. This makes the API implicit and can introduce bugs. Instead, such values should be passed in as arguments.
5- Don’t store contexts in a struct, pass them explicitly in functions, preferably, as the first argument.
6- Never pass nil context, instead, use a TODO if you are not sure what to use.
7- The Context struct does not have a cancel method because only the function that derives the context should cancel it.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
1- context.Background should be used only at the highest level, as the root of all derived contexts
2- context.TODO should be used where not sure what to use or if the current function will be updated to use context in future
3- context cancelations are advisory, the functions may take time to clean up and exit
4- context.Value should be used very rarely, it should never be used to pass in optional parameters. This makes the API implicit and can introduce bugs. Instead, such values should be passed in as arguments.
5- Don’t store contexts in a struct, pass them explicitly in functions, preferably, as the first argument.
6- Never pass nil context, instead, use a TODO if you are not sure what to use.
7- The Context struct does not have a cancel method because only the function that derives the context should cancel it.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍5
🔵 part-1:Go Best Practices: Optimize Golang Code For Better Performance🔵
🔴 Syntax and Folder Structure
1-Define data types of variables
2-Use comments
3-Maintain naming conventions
You can keep the following things in mind:
3-1-Avoid using underscores.
3-2-Use Mixed Case Capital acronyms
3-3-Short local variables or single letters for loop argument or index
4-Modularization
5-Splitting up projects
🔴 Package
1-Take care of documentation
2-Managing multiple files in the same package
Should you break a specific package into numerous files?
2-1-Prevent long files: Standard library’s net/http package comprises 15734 lines in 47 files.
2-2-Divide code and tests: net/http/cookie_test.go and net/http/cookie.go, both are parts of the http package. Ideally, test code is only compiled at test time.
2-3-Divided package documentation: When the package has more than one file, it is an agreement to create a doc.go comprising the package documentation.
3-Pack your packages properly
🔴 Code Practices to maintain readability
1-Avoid Nesting
2-Do not repeat unnecessary code
3-Prioritize essential code
🔴 Handling Go errors
1-Using multiple return values
2-Wrap Golang errors
For wrapping errors, fmt.Errorf provides %w verb to inspect and unwrap errors. Functions like
2-1-errors.Unwrap: For inspecting and exposing the underlying errors in the code.
2-2-errors.Is: For comparing every error value of the error chain against the sentinel value. The Is method implemented on the error is used to post the error itself as the sentinel value in case we don’t have a sentinel value.
2-3-errors.As: The function is used to cast a particular error type. For that, it looks for the very first error encountered in the error chain and sets that specific error as a sentinel value, and returns true.
🔴State Management With Goroutines
1-Avoid Goroutine Leaks
1-1-The goroutine is blocked on chan write
1-2-The goroutine carries a source to the chan
1-3-The chan will never be accumulated with garbage.
🔴Golang CI/CD
1-Use Go Modules
2-Use Artifactory Repository Layouts
🔴Testing in Go App
1-Keep your tests in a different package
2-A different file for internal tests
3-Write table-driven tests
🔴 Syntax and Folder Structure
1-Define data types of variables
2-Use comments
3-Maintain naming conventions
You can keep the following things in mind:
3-1-Avoid using underscores.
3-2-Use Mixed Case Capital acronyms
3-3-Short local variables or single letters for loop argument or index
4-Modularization
5-Splitting up projects
🔴 Package
1-Take care of documentation
2-Managing multiple files in the same package
Should you break a specific package into numerous files?
2-1-Prevent long files: Standard library’s net/http package comprises 15734 lines in 47 files.
2-2-Divide code and tests: net/http/cookie_test.go and net/http/cookie.go, both are parts of the http package. Ideally, test code is only compiled at test time.
2-3-Divided package documentation: When the package has more than one file, it is an agreement to create a doc.go comprising the package documentation.
3-Pack your packages properly
🔴 Code Practices to maintain readability
1-Avoid Nesting
2-Do not repeat unnecessary code
3-Prioritize essential code
🔴 Handling Go errors
1-Using multiple return values
2-Wrap Golang errors
For wrapping errors, fmt.Errorf provides %w verb to inspect and unwrap errors. Functions like
2-1-errors.Unwrap: For inspecting and exposing the underlying errors in the code.
2-2-errors.Is: For comparing every error value of the error chain against the sentinel value. The Is method implemented on the error is used to post the error itself as the sentinel value in case we don’t have a sentinel value.
2-3-errors.As: The function is used to cast a particular error type. For that, it looks for the very first error encountered in the error chain and sets that specific error as a sentinel value, and returns true.
🔴State Management With Goroutines
1-Avoid Goroutine Leaks
1-1-The goroutine is blocked on chan write
1-2-The goroutine carries a source to the chan
1-3-The chan will never be accumulated with garbage.
🔴Golang CI/CD
1-Use Go Modules
2-Use Artifactory Repository Layouts
🔴Testing in Go App
1-Keep your tests in a different package
2-A different file for internal tests
3-Write table-driven tests
👍9
Forwarded from Gopher Academy
🔺نقشه یادگیری زبان برنامه نویسی گولنگ🔺
🔹️roadmap part 1
https://t.me/gopher_academy/7
🔹️roadmap part 2
https://t.me/gopher_academy/9
🔹️roadmap part 3
https://t.me/gopher_academy/11
✋ @gopher_academy
🔹️roadmap part 1
https://t.me/gopher_academy/7
🔹️roadmap part 2
https://t.me/gopher_academy/9
🔹️roadmap part 3
https://t.me/gopher_academy/11
✋ @gopher_academy
🤩6❤2🎉2👍1
یه سایت جالب که ۸ تا سوال مختلف در مورد SQL داره و بصورت عملی میتونید دانش SQL خودتون رو محک بزنید.
https://8weeksqlchallenge.com
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://8weeksqlchallenge.com
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍4❤1🎉1