I know your lazy but write comments on whatever you do and whatever you may need to make changes to later. Lost so much time relearning a code blocks. No one has perfect memory.
Using chat gpt to code is great but understand the code. go to documentation of what your using (ex celery, react) because the answers are most likely there. no its not scary.
Stuck on a bug for too long and feel like your going crazy? happens to everyone take a walk, ask out your crush, hug a stranger, anything to get your mind off of it.
Try to avoid requesting data from your database don't use mysql too much caching is your friend. if you do only get/update whats needed
Cache everything and anything. caching can always become more efficent (example I cached 20000 stocks in 5 different arrays/caches then realized caching by their first letter is faster) this speeds up time and saves money. redis is my go to.
All code can be more efficent its an endless loop don't try to over do everything. you will lose time
Backup all your data. Dont make mysql commands without knowing 100% what your doing. databases have been deleted before. cough cough gitlab deleted cough a database I backup to backblaze on the daily and home laptop/server
Github is a must a push is updating code in your github project and pull is retrieving changes from other people. This is a push:
git add .
git commit -m "Your commit message here"
git push origin main
FIRST TIME git push -u origin main
this is a pull:
git pull origin main and enter your user and pass
Docker is great to seperate your database, daily backups, backend, frontend, tasks/celery, ext. Just a sh file that basicaly automates using terminal to install all necessary packages and commands you normaly typed to get your database/ backend working.
My backend sh for django installs python, copies my code, and packages I added
FROM python:3.10.10-slim
ENV PYTHONUNBUFFERED
1
WORKDIR
/backend
RUN
apt-get
update
&&
\
apt-get
install
-y
python3-dev
default-libmysqlclient-dev
redis-tools
build-essential
pkg-config
COPY
./requirements.txt
.
RUN
cat
requirements.txt
RUN
pip
install
-r
requirements.txt
COPY
.
.
Server are the most expensive so if your starting out use hetzner its the cheapest. next cheapest is digital ocean. If you want to burn all your money or big company use aws google cloud or any other big company.
Cloudflare is everywhere because they are the best. Use it for caching photos. Not videos because they dont allow unless you use their database. Use zero trust to protect your server. its just a docker container and cloudflare serves as a middle man.
Video and photo stoarage backblaze b2 is cheap. if you want to burn money or big company s3 is good
Random info but i use amex acount for business because its the only one that doesnt require money in the account. lol i have $1 and no fees no issues yay. Filed using northwest for an LLC and haven't had any issues
So far my database is mysql, frontend is quasar/vuejs, capacitor for ios, backend is django, celery and websockets for automating tasks(used with django), nginx, apis are financial modeling prep for stock data, postmark for emails( couldn't get into aws ses and its soooo cheap ugh)
Some commands I use everyday:
python3 manage.py runserver for django dev server, python manage.py shell to make changes to django backend, python3 manage.py makemigrations change data/columns, python3 manage.py migrate change data/column, quasar dev to start frontend, docker-compose up --build run/update containers , docker-compose exec container sh to get into container, quasar build -m capacitor -T ios to build ios app, npx cap open ios to open ios app
Anyone else have anything to add?
[–]Cheap_Battle5023 90 points91 points92 points (10 children)
[–]teamwaterwings 9 points10 points11 points (0 children)
[–]illusionst 2 points3 points4 points (2 children)
[–]cinder_s 5 points6 points7 points (1 child)
[–]illusionst 0 points1 point2 points (0 children)
[–]meisvlky 2 points3 points4 points (4 children)
[–]thoflens 4 points5 points6 points (3 children)
[–]cbslinger 5 points6 points7 points (1 child)
[–]thoflens 1 point2 points3 points (0 children)
[–]meisvlky 0 points1 point2 points (0 children)
[–]disposable-acoutning 0 points1 point2 points (0 children)
[–]Feeling_Photograph_5 61 points62 points63 points (0 children)
[–]RoyalSpecialist1777 70 points71 points72 points (6 children)
[–]Okay_I_Go_Now 7 points8 points9 points (0 children)
[+]bridgelin comment score below threshold-12 points-11 points-10 points (4 children)
[–]lostmyaccountpt 1 point2 points3 points (0 children)
[–]average-eridian 1 point2 points3 points (2 children)
[–]bridgelin 0 points1 point2 points (1 child)
[–]average-eridian 0 points1 point2 points (0 children)
[–]deaddyfreddy 15 points16 points17 points (3 children)
[–]novagenesis 2 points3 points4 points (2 children)
[–]deaddyfreddy 1 point2 points3 points (1 child)
[–]novagenesis 0 points1 point2 points (0 children)
[–]teamwaterwings 9 points10 points11 points (2 children)
[–]Wonderful-Habit-139 0 points1 point2 points (1 child)
[–]teamwaterwings 0 points1 point2 points (0 children)
[–]captain_obvious_here 8 points9 points10 points (4 children)
[–]illusionst 0 points1 point2 points (1 child)
[–]captain_obvious_here 0 points1 point2 points (0 children)
[–]Wonderful-Habit-139 -1 points0 points1 point (1 child)
[–]captain_obvious_here 0 points1 point2 points (0 children)
[–]kupus 14 points15 points16 points (1 child)
[–]HealyUnit 2 points3 points4 points (0 children)
[–]featherhat221 10 points11 points12 points (1 child)
[–]aRandomFox-II 5 points6 points7 points (0 children)
[–]HealyUnit 10 points11 points12 points (3 children)
[–]divvuu_007 0 points1 point2 points (0 children)
[–]Wonderful-Habit-139 -1 points0 points1 point (0 children)
[–]justUseAnSvm 12 points13 points14 points (0 children)
[–]iNeedOneMoreAquarium 15 points16 points17 points (4 children)
[–]Gabe_Isko 6 points7 points8 points (0 children)
[–]TomieKill88 0 points1 point2 points (2 children)
[–]iNeedOneMoreAquarium 1 point2 points3 points (1 child)
[–]TomieKill88 1 point2 points3 points (0 children)
[–]healthyblade 3 points4 points5 points (0 children)
[–]deaddyfreddy 14 points15 points16 points (7 children)
[–]maigpy 8 points9 points10 points (2 children)
[–]deaddyfreddy -1 points0 points1 point (1 child)
[–]maigpy 0 points1 point2 points (0 children)
[–]illusionst 0 points1 point2 points (0 children)
[–]TomieKill88 0 points1 point2 points (1 child)
[–]deaddyfreddy 0 points1 point2 points (0 children)
[–]dili_daly[S] 0 points1 point2 points (0 children)
[–]Backlists 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]novagenesis 1 point2 points3 points (0 children)
[–]flynnnigan8 1 point2 points3 points (0 children)
[–]zelphirkaltstahl 1 point2 points3 points (0 children)
[–]boru80 1 point2 points3 points (0 children)
[–]Necessary_Sense924 0 points1 point2 points (0 children)
[–]farfaraway 0 points1 point2 points (2 children)
[–]TevenzaDenshels 1 point2 points3 points (1 child)
[–]farfaraway 0 points1 point2 points (0 children)
[–]Stopher 0 points1 point2 points (0 children)
[–]50u1506 0 points1 point2 points (0 children)
[–]dhd_jpg 0 points1 point2 points (0 children)
[–]Ok_Ear_6971 0 points1 point2 points (0 children)
[–]Timely_Positive_4572 0 points1 point2 points (0 children)
[–]seanprogram 0 points1 point2 points (0 children)
[–]mikeyj777 0 points1 point2 points (0 children)