pseudoyu

pseudoyu

Blockchain | Programming | Photography | Boyi
github
twitter
telegram
mastodon
bilibili
jike

Weekly Report #31 - Open Source, Frontend Development, and ChatGPT Practice

Preface#

This article is a record and reflection of life from 2023-02-13 to 2023-02-20.

This week was exceptionally full of work and various personal project arrangements. Although I wasn't really busy to the point of having no time to sleep, I experienced a lot of inexplicable anxiety and low moods, leading to a tendency to stay up late in a sort of revengeful manner. I checked my phone and saw that my average sleep was less than 3 hours a day.

This week, Valentine's Day triggered some emotions through the Douban movie calendar, reminding me of some past events; I made the decision to buy ChatGPT Plus, which, combined with GitHub Copilot, saved me a lot of repetitive work; because I had been tinkering with this recently, I also went to a financial live stream hosted by a senior student to explain AIGC and ChatGPT for an hour, which was a novel experience for my live stream debut; on the weekend, feeling too depressed, I went to a seaside tavern with friends to have a drink, which was a rare moment of relaxation; I had been procrastinating on a previous Side Project, and by the weekend, I almost pulled two all-nighters, crazily writing front-end code; I joined the development team for Cusdis v2 and wrote my first feature, which was surprisingly a PR for Next.js as a backend developer for my first relatively large open-source project; there were many other interesting things as well.

Open Source and Front-end Learning#

Although I seem to be quite active on GitHub, Twitter, and my blog, I haven't really participated in any large open-source projects through code contributions due to my relatively short work experience and the fact that my current job isn't open-source in nature. However, I have received quite a few stars on several Markdown and course assignment projects, which often makes me feel a bit embarrassed.

So at the beginning of this year, I set some goals to participate in various open-source projects that interest me in different forms, including setting an open-source budget for myself last week (see 'Weekly Report #30 - Open Source Budget, Writing Original Intent, and Humility Towards Technology'), and I also raised some issues for RSS3, which is a good start.

An interesting thing was seeing Randy looking for partners to develop the Cusdis v2 version on Twitter. I have been using Cusdis for nearly two years (which is the comment system for this blog), and I really like this simple yet powerful system. I have also helped some friends create or solve some deployment and usage issues, making it almost a mobile billboard.

Although I'm not a front-end developer, I was so interested that I joined a Telegram group to chat a bit. Randy is truly a pure tech person and very friendly. After I briefly stated my situation and thoughts, he asked me to pull the latest code first and see if I could run it before we continued chatting (it felt a bit like an interview).

I took a rough look at the code structure and commands. Since I had been using the JavaScript-based Hardhat framework for writing Solidity and later learned about TypeScript while studying front-end development, I was somewhat familiar with package management and some basic commands, just switching from yarn to pnpm. I set up a PostgreSQL instance using Docker on the server, and it ran smoothly (later I found out that local sqlite would have sufficed without going through such a big detour).

Then he showed me the current basic features to see which part I was interested in, so I started to slowly look at the code and even reported some bugs from the v1 version to him (which he quickly fixed, showing great execution power). Then I got busy with work projects and didn't start writing, but during that time, I read a small book written by Randy on Next.js development:

This book is really excellent; it's the clearest resource I've encountered in terms of practical coding since I started writing Next.js. It covers best practices such as Query, Mutation, and forcing data refresh through Query Invalidation, and it also recommends Prisma, an incredibly useful ORM library. The theoretical explanations at the beginning are clear and easy to understand, and it includes two example projects at the end, making it very worthwhile to read.

side_project_api_structure

After finishing this book, I abandoned the Go backend I had halfway done for my Side Project and spent an entire weekend refactoring the backend logic in the Next.js API module using Prisma to connect to the PostgreSQL database. At first, I was a bit unaccustomed to it, modifying the user management and authentication parts while looking at the code from that small book, but the other features came together more smoothly. It was a relatively complete practice, and I must praise the combination of Next.js + TailwindCSS + Prisma for providing a very good development experience, making it suitable for independently developing some projects.

After two days of intense coding over the weekend, my confidence in implementing front-end features grew significantly, so I reached out to Randy to take on a development task. The functionality wasn't complex; it involved using Mutation to implement the logic for configuring the Webhook connection needed for user comment saving notifications, along with some loading states, toast prompts, and other effects. It was a good start.

chat_with_randy_01

During the implementation process, I encountered some issues and consulted him, who provided very patient answers. Finally, I completed this PR in the evening.

chat_with_randy_02

This experience was quite interesting; I attempted to participate in open source without having written much front-end code before and received help and guidance from a developer I greatly admire. Sometimes being proactive can lead to unexpected rewards. However, it's also a peculiar experience to think that as a blockchain backend developer, my first relatively large open-source project and the first functional PR I submitted were actually front-end related.

If anyone is interested, you can try Cusdis. I previously wrote an article introducing its deployment, which you can refer to:

ChatGPT#

I was one of the early testers of GitHub Copilot, and I was amazed the first time I used it, realizing that AI could already achieve such a level in coding. I continued to use it for about a year; later, I also frequently used DeepL's machine translation, which I feel is much better than Google Translate and has helped me complete many open-source translation projects. After that, I tried Notion AI, but since I completely transitioned from Notion to Logseq, I set it aside after a brief trial. I also bought Craft, an online note-taking software, during Black Friday, which has a built-in assistant to optimize text. However, the most significant release was ChatGPT, which launched at the end of last year.

I remember it was launched around the end of November, and I started experiencing it in early December after getting a phone verification code from Ni in Australia. At that time, I often used it to ask coding questions, and it could generally provide quite accurate answers. However, since I preferred the more seamless experience of GitHub Copilot and didn't want to organize a bunch of language to ask questions and then paste code back for editing, I eventually set it aside after a while, only occasionally opening it to check when learning new technologies.

chatgpt_assistant_usage

Last week, I happened to see Zili using ChatGPT as a little assistant, which inspired me. After some hassle with virtual credit cards, I finally managed to get the Plus membership. The $20 monthly fee prompted me to sort out my daily usage needs, ultimately dividing my requirements for programming code questions, Japanese learning, Chinese-English translation, search engine use, and copywriting optimization into multiple chat windows, making it feel like I had a bunch of little assistants every day.

Recently, I've had quite a few front-end tasks. Although I had studied them before, there were still many details I wasn't very clear about. At this point, asking ChatGPT questions and filtering the correct answers from its responses to digest into my own knowledge has proven quite effective, and it's very practical. It also proposes many novel implementation ideas. Language learning should be similar, but I haven't had the chance to properly test the effectiveness of learning Japanese yet. If it turns out interesting, I might record some dialogues.

Interesting Things and Items#

Inputs#

Although most interesting inputs will automatically sync in the 'Yu's Life' Telegram channel, I still selected a portion to list here, feeling more like a newsletter.

Articles#

Podcasts#

I recorded some podcasts I listened to:

Videos#

Similarly, I also recorded some interesting videos I watched:

Personal Life Snapshot#

Seaside Tavern#

sea_bar_outside

sea_bar_wine

On the weekend, I went to the seaside tavern with friends, a small bar in an alley, crowded but not noisy, yet it had a unique liveliness, with big letters saying "Someone Jumped into the Sea." I had a long chat with a friend who happened to be on a business trip to Beijing, and even the gloomy emotions of the week were alleviated a lot. I need to adjust well for the new week.

Nene#

my_lovely_nie_nie_01

After going to the 'Seaside Tavern' for a drink, I got home around 1 AM and soon fell into a deep sleep. When I groggily opened my eyes, I found Nene seemingly trying to sniff something on my face, occasionally poking me with her little paws. It took me a while to realize (after rebooting my brain) that she was worried about whether I was still alive. In the dark, I hurriedly took a snapshot with my phone and immediately felt a sense of warmth and reliance that I hadn't felt in a long time.

my_lovely_nie_nie_02

She must know she is very cute!

Valentine's Day#

valentine_douban

I must say that the person selecting films for the Douban movie calendar has some thought; for Valentine's Day, they featured a bouquet-like romance and paired it with a line:

Love is like a party; it will eventually come to an end.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.