-
Define Your Goal
Clearly state what you want to build or solve.
Example: “Create a REST API endpoint for user registration.” -
Break Down the Problem
Divide the goal into smaller, manageable tasks.
Example: “Set up routing, handle input validation, connect to the database, write tests.”
-
Code Review and Comment
Instantly review code for bugs, improvements, and best practices.
Example: “Review this function for issues and suggest improvements.” -
Code Explanation
Quickly understand complex or unfamiliar code.
Example: “Explain what this function does.”
The TCREI framework is a powerful approach to writing clear and effective prompts for Generative AI (Gen AI) tools. It emphasizes a structured initial setup followed by a continuous refinement process.
- T (Task): Clearly define what you want the AI to do. This is the core action or output you expect.
- C (Context): Provide all necessary background information relevant to your task. The more context you give, the better the AI can tailor its response.
- R (References): Offer examples, specific formatting requirements, desired tones, or other guidelines to help the AI understand your expectations more precisely.
- E (Evaluate): After receiving an AI's output, critically assess whether it meets your goals and expectations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module zicarecoding | |
go 1.18 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Docker-compose check if mysql connection is ready | |
# https://stackoverflow.com/a/51641089 | |
maxcounter=30 | |
counter=1 | |
while ! mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" -h"0.0.0.0" -P"3306" -e "SHOW DATABASES;" > /dev/null 2>&1; do | |
sleep 1 | |
counter=`expr $counter + 1` | |
if [ $counter -gt $maxcounter ]; then |
go-switch
Switching between Go version with ease
➜ ~ go-switch list
go1.13.15
go1.15
go1.16
go1.16.13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Proxy servers are not the holy grail of internet surfing, that this video makes them out to be. There are drawbacks, too. | |
1) Proxy servers will speed up the retrieval of requests that you make -- but only if those requests were already made, and are in the proxy's cache. Otherwise, your request will be slower (even if you do not notice), because you are involving yet another computer to be a middle-man for a request that could be done directly, without the proxy. | |
Also know that your own computer has cache, that does the same thing. The advantage of using a proxy, is that if anyone else (that also uses the same proxy) has visited a site, and you visit the same site, then you will reap the benefit of using the proxy's cache for a faster response. But to be clear... if you both visit amazon, and you shop for different things, the cache will not help (only slight help, for data in common, like amazon specific logos, etc). | |
2) Your IP address is hidden, and it is not hidden. It depends on how much you trust |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"time" | |
) | |
const ( | |
NUMBER_OF_JOBS = 25 | |
NUMBER_OF_WORKERS = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD_TEST_ENV=env $$(cat .env.testing | xargs) | |
GOTEST=go test | |
GOTEST_PATH=./internal/usecase/... | |
GOCOVER=go tool cover | |
coverage: | |
$(LOAD_TEST_ENV) \ | |
$(GOTEST) -tags=unit -coverprofile=cover.out $(GOTEST_PATH) | |
$(GOCOVER) -html=cover.out && unlink cover.out |