Code and Thought
418 subscribers
327 photos
31 videos
6 files
252 links
Software Engineer | Builder | Founder | Odoo | Business | Thinker

portfolio - https://neziraworkuu.vercel.app/
Download Telegram
My unpopular opinion

In a startup, hackathon, or whatever, if you have to think about how your product is unique, it's not unique at all.


@codeandthought
๐Ÿค”10๐Ÿ’ฏ1
3 Ways to Insert Data into PostgreSQL: Sequential, Batch, and COPY

Imagine inserting 1 million rows into your database. You have three strategies:

1. Sequential INSERT: One row at a time
Executes a separate INSERT for each row.
Simple, but slow due to repeated database communication.

2. Batch INSERT: Multiple rows at once
Groups many rows into a single INSERT statement.
1M rows with batches of 1,000 = 1,000 INSERT statements.
Faster because it reduces database round trips and statement overhead.

3. COPY: Bulk data loading
PostgreSQL's optimized mechanism for loading large datasets.
Streams data directly into the database without individual INSERT statements.
Usually the fastest option for massive data ingestion.

One important distinction: server-side COPY FROM reads a file accessible to the PostgreSQL server. \copy in psql reads a client-side file, and COPY FROM STDIN lets applications stream data.

How do we compare them?
Measure their throughput:
Throughput = Total rows inserted / Time (seconds)

@codeandthought
๐Ÿ˜ฑ1
Have you ever checked these vulnerabilities, guys?

I didn't care about it before, but I asked GPT about it today, and its response was like๐Ÿคจ๐Ÿ˜’๐Ÿ˜”eskahun atakim?๐Ÿคข
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ˜3๐Ÿคฃ2
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
Me torturing my PC by trying to insert 20M database rows at this time of the night ๐Ÿค“

And I be like gena 80M ykeral๐Ÿ˜ˆ
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ˜ญ5๐Ÿ”ฅ2
Code and Thought
20M
Doing the 50M now ๐Ÿ•บ
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ”ฅ3
The 100M rows are inserted successfully๐Ÿ•บ
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ”ฅ4
This media is not supported in your browser
VIEW IN TELEGRAM
ุฅูู†ูŽู‘ ุงู„ู„ูŽู‘ู‡ูŽ ูˆูŽู…ูŽู„ุงุฆููƒูŽุชูŽู‡ู ูŠูุตูŽู„ูู‘ูˆู†ูŽ ุนูŽู„ูŽู‰
ุงู„ู†ูŽู‘ุจููŠูู‘ ูŠูŽุง ุฃูŽูŠูู‘ู‡ูŽุง ุงู„ูŽู‘ุฐููŠู†ูŽ ุขู…ูŽู†ููˆุง ุตูŽู„ูู‘ูˆุง
ุนูŽู„ูŽูŠู’ู‡ู ูˆูŽุณูŽู„ูู‘ู…ููˆุง ุชูŽุณู’ู„ููŠู…ู‹ุง
ุงู„ู„ู‡ู… ุตู„ู‘ู ูˆุณู„ู… ุนู„ู‰ ุณูŠุฏู†ุง ู…ุญู…ุฏ ูˆุนู„ู‰ ุขู„ู‡ ..๐Ÿ’š๐Ÿ’š
โค4
FeteScript
Go to school every day, miss every dayโ€™s class!!
My 2019 plan is to be strong like fetescript๐Ÿ˜€
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ”ฅ4
Who else thinks this is AI-generated?

https://x.com/Tesla/status/2110913438293647789/video/1
โค2๐Ÿ˜ญ1
Code and Thought
Who else thinks this is AI-generated? https://x.com/Tesla/status/2110913438293647789/video/1
And I saw this ๐Ÿ˜†. So where do you think we (African/Ethiopian) are at?
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ˜3๐Ÿ˜ญ2
๐Ÿซก8
Code and Thought
@codeandthought
Do you know the 80/20 rule?

Yeah, most of the 80% of things are in the hands of the 20%. Sometimes I feel like this narrows down to 98% or 99% versus 2% or 1%, like intelligence, creativity, and everything of this person; he is 1 in 8B.

Who do you think will be the next Elon Musk in our community?

@codeandthought
๐Ÿ•Š3
Who is up searching for rizq?
๐Ÿฅฐ6โšก2
Code and Thought
Soooooo I learned PostgreSQL yesterday and Instead of building another CRUD app, I decided to see what happens when I put 100 million rows into it. who wanna know the progress?๐Ÿ•บ resource โ€”> https://backend-mastery.seefun.dev/docs/data/postgresql @codeandthought
Imagine building an application that records everything users do. Someone signs in. Someone clicks a button. Someone completes a purchase. Someone opens a page. Each action produces an event.

For a small application, storing these events is relatively straightforward. But what happens when the application grows and accumulates millions of records?

Will searching become slower? Will the database consume too much storage? Can I still retrieve information quickly? What happens when I need to insert millions of new records?

Okay, I have documented every detail on how I built this in a way that not only you but also your high school graduate Grammy can understand. So, if you wanted to take a look, here is:

[Doc]
[github Repo]

@codeandthought
Code and Thought
your high school graduate Grammy can understand.
So... when I was starting my programming journey, one of the most intimidating things was asking other developers for help or understanding them in general.

Everything sounded so technical, and sometimes I felt like I needed a certain level of experience just to have a conversation with them. And someone said โ€œBe the senior you wished you had when you were a junior.โ€

And that's why my notes are always so long, filled with examples, detailed explanations, and things that might seem too obvious or even silly to someone experienced.

But yeah... I know what it's like to be on the other side, trying to understand something everyone else seems to already know.๐Ÿฅธ

@codeandthought
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
Chapi Dev Talks
The 100M Row Reality Check (Community Challenge) Scaling isnโ€™t a vibe; itโ€™s pain you only feel when the data gets real. I challenge you to build a tiny product, then stuff its database with real-sized data: Start at 20M rows Push to 50M Aim for 100M Yourโ€ฆ
If you want to understand PostgreSQL and Express, I really recommend taking on this challenge. I think it's more valuable than watching endless tutorials or building a bunch of mini projects.

But there's one thing I want to point out.
At the 100-million-row mark, my PostgreSQL database occupied approximately 20 GB of disk space. And Omarchy was particularly useful for this project because it gave me a Linux-native, terminal-focused development environment.

So, if you're using Windows or working with a PC that has limited free storage, you might face some challenges on the hardware side.
Just something to consider before jumping in.
โค2
Forwarded from Nahom's Sandbox
Omnispot is out: a 1-click mobile hotspot plugin for the Omarchy top bar.
Share your connection over Wi-Fi , monitor connected devices in real time, and toggle it straight from the bar.
Install:
omarchy plugin add https://github.com/NWGKGIT/omnispot.git --enable

GitHub: https://github.com/NWGKGIT/omnispot
โค1
Forwarded from DEVpoet ูุคูŠุฏ (Fuad.T)
Shawarma is a fancy ertb

The goat @codeandthought

Sijemer ik my people ๐Ÿคฉ
๐Ÿ˜6๐Ÿ•Š3๐Ÿค”2
I've built wealth without reading a book every day.
I've built wealth without making my bed every day.
I've built wealth without journaling every day.
I've built wealth without a 2 hour morning routine every day.
I've built wealth without giving up Netflix every day.
I've built wealth without waiting to marry.
I've built wealth without leverage.

Because the only things you have to do to build wealth are:
1) Find "stuff" that people want
2) Sell it to them for more than it costs you.
3) Do this many times.

There is no "hack" for it.

Alex Hormozi
๐Ÿ‘4