Skip to content

Commit 394f087

Browse files
committed
Add hackernews links to a few posts
1 parent 4c2008d commit 394f087

9 files changed

+47
-3
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "The beautiful baby of GraphQL and RESTful"
3+
publishedAt: '2026-07-08'
4+
category: 'api'
5+
isFeatured: true
6+
---
7+
8+
The debate between proponents of GraphQL and RESTful APIs seems never-ending.
9+
10+
GraphQL stands out by allowing clients to specify exactly what data they want to retrieve in a single request, reducing both [over-fetching and under-fetching](https://stackoverflow.com/a/44568365). However, It can run into [challenges with deeply nested queries](https://hygraph.com/blog/graphql-pain-points) and there are known performance concerns that require careful handling or specific optimizations.
11+
12+
REST APIs emphasize resource-oriented design with clear separation of concerns (different endpoints for different resources) and predictable URL structures (detail and resource endpoints). It makes them well-suited for straightforward CRUD operations. Their alignment with HTTP semantics also supports mature caching and status handling, giving backend developers more explicit control over resource management and optimization. As your application grows and scales, There will be more data in the response. However, you’ll see that [not all API consumers need all the data in the respone](https://softwareengineering.stackexchange.com/questions/454478/how-to-maintain-consistency-when-retrieving-partial-vs-full-data-in-an-api-reso?utm_source=chatgpt.com).
13+
14+
Can we make peace and learn from each other? **Yes, RestfulQL!**
15+
16+
## Design Details
17+
18+
### Creates, Updates and Deletes (Mutations)
19+
20+
For creating, updating and deleting data, I prefer to retain the conventional REST approach. In my view, it’s simply more practical. Handling the creation of multiple objects in a single request, as GraphQL allows, can quickly become problematic. If part of the request fails, it forces tough decisions: should everything fail or only the problematic items? Partial failures can frustrate users and often require implementing rollback endpoints to let users undo operations if they change their minds. What about side effects of the action to rollback? Keeping mutations in REST keeps this logic clear, predictable and easier to manage from the backend perspective.
21+
22+
### Retrieves (Queries)
23+
24+
This is the place when GraphQL shines. API Consumer can just set
25+
26+
### Adaptation
27+
28+
According to [Postman’s 2023 State of the API report](https://blog.postman.com/graphql-vs-rest/), 86% of developers use REST, while 29% use GraphQL. This is the the latest large-scope survey I could found about usage of these two camps.
29+
30+
There are already some API Specifications which

src/content/blog/2022-05-29-how-i-became-a-speaker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "How I Became a Speaker"
33
publishedAt: '2022-05-29'
44
category: "career"
5+
hackernews_item_id: 31574773
56
---
67

78
![Efe Öge at PyConDe 2022](https://efe.me/images/posts/how-i-became-a-speaker/efe-oge-pyconde-2022.jpeg)

src/content/blog/2023-06-16-on-the-minimal-entrepreneur-book.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "On The Minimalist Entrepreneur book"
33
image: /images/posts/the-minimalist-entrepreneur-book/cover.jpeg
44
publishedAt: '2023-06-16'
55
category: 'book'
6+
hackernews_item_id: 36379303
67
---
78
I'm always coming up with side project ideas. As a product-minded developer, I strive to understand the flow of everyday applications and generate new ideas. I envision prototypes in my mind, create their basic flow, and even purchase domains for them. However, I have never successfully turned any of these side projects into revenue-generating ventures. Consequently, they all end up languishing in my “side-projects list”.
89

src/content/blog/2024-04-20-turkish-language-browsers-and-punycode.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "Turkish Language, Browsers and Punycode"
33
publishedAt: '2024-04-20'
44
isFeatured: true
5+
hackernews_item_id: 40117820
56
---
67

78
[The Turkish alphabet](https://wikipedia.org/wiki/Turkish_alphabet) has been a version of the Latin alphabet for almost a hundred years thanks to the [Turkish alphabet reform](https://en.wikipedia.org/wiki/Turkish_alphabet_reform). There are two main differences between the Turkish and English alphabets.

src/content/blog/2025-03-12-the-interview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "The Interview"
33
publishedAt: '2025-03-12'
44
category: 'company-culture'
55
isFeatured: true
6+
hackernews_item_id: 43344617
67
---
78

89
What interview question tells you if someone will pick up a teammate when they’re down? When you think of company culture, is it just the pool table in the breakroom, or is it something more?

src/content/blog/nullable-but-not-null.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Nullable but not null"
33
publishedAt: '2025-07-25'
44
category: 'django'
55
isFeatured: true
6+
hackernews_item_id: 44684168
67
---
78

89
When working on backend applications, especially those with evolving database schemas, it's common to see a recurring pattern:

src/content/blog/prizes-at-work.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Prizes at Work"
33
publishedAt: '2025-03-17'
44
category: 'company-culture'
55
isFeatured: true
6+
hackernews_item_id: 43391192
67
---
78

89
Some companies offer prizes like a bluetooth speakers, mechanical keyboards to employees who complete certain tasks or projects. At first, this might seem like a fun and harmless way to motivate people. But when you look deeper, it raises an important question: **why do employees need extra rewards to do their jobs?**

src/content/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const blog = defineCollection({
2323
tags: z.array(z.string()).default([]),
2424
seo: seoSchema.optional(),
2525
draft: z.boolean().default(false),
26+
hackernews_item_id: z.number().optional(),
2627
}),
2728
});
2829

src/pages/posts/[slug].astro

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,20 @@ const { Content } = await post.render();
5151
<article class="prose prose-invert pb-10 animate-slide-from-down-and-fade-4 my-8">
5252
<Content />
5353
</article>
54+
<div class="flex w-full items-center justify-center my-6 animate-slide-from-down-and-fade-4">
55+
<span class="w-8 bg-secondaryDarker h-[1px] rounded-full"></span>
56+
</div>
5457
<div class="flex justify-center items-center text-sm max-w-[650px] animate-slide-from-down-and-fade-3">
5558
<span class="text-secondaryDark">
5659
Published: {reformatDate(post.data.publishedAt)}
5760
</span>
5861
</div>
59-
<div class="flex w-full items-center justify-center my-6 animate-slide-from-down-and-fade-4">
60-
<span class="w-8 bg-secondaryDarker h-[1px] rounded-full"></span>
61-
</div>
62+
{post.data.hackernews_item_id && (
63+
<div class="flex justify-center items-center text-sm max-w-[650px] animate-slide-from-down-and-fade-3">
64+
<span class="text-secondaryDark">
65+
<br>Comment and read more on <a href={`https://news.ycombinator.com/item?id=${post.data.hackernews_item_id}`} target="_blank"><strong>Hacker News</strong></a>.
66+
</span>
67+
</div>
68+
)}
6269
</div>
6370
</BaseLayout>

0 commit comments

Comments
 (0)