開源日報 每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,堅持閱讀《開源日報》,保持每日學習的好習慣。
今日推薦開源項目:《不登錄 awesome-no-login-web-apps》
今日推薦英文原文:《On the Joys of Programming》

今日推薦開源項目:《不登錄 awesome-no-login-web-apps》傳送門:GitHub鏈接
推薦理由:說到保存用戶信息,第一個想到的估計就是註冊登錄系統了——所以我們擁有非常多的帳號,以至於不得不找個小本本記下他們。這個項目收集了不需要登錄的 web 應用,當然這並不是說它們都不存儲用戶數據,只是換了個方法存儲而不是讓用戶為每一個應用記下一個單獨的帳號密碼來簡化用戶的使用流程(眾所周知在所有地方使用同一個帳號密碼是極其危險的)
今日推薦英文原文:《On the Joys of Programming》作者:Matthew MacDonald
原文鏈接:https://medium.com/young-coder/what-makes-programming-fun-9c5ab05a5440
推薦理由:作者分享的自己從編程中獲得的樂趣

On the Joys of Programming

Coding is part career, part passion. Here』s what makes it worthwhile.

The dream of becoming a programmer is alive and well. College computer science courses are struggling to meet the demand. Coding bootcamps, stuffed full of would-be career changers, are surging in popularity. Even grade school educators are teaching coding as a sort of 21ˢᵗ century literacy.

For some, the motivation is simple. It』s the dream of being paid well and getting to call the shots (maybe even wearing flip-flops to the office). That can definitely happen, and it』s no small detail. After all, any work is more rewarding when you』re respected for your skills and rewarded for your efforts.

#CoderLife

But like so many pursuits that require single-minded, self-motivated work, programming is only worthwhile if you have a spark of passion for the craft. On some level, you need to like coding — to have the drudgery interrupted by moments of satisfaction and even joy. And that also happens.

In this article I』ll share what motivated my coding sessions back in the day when I typed many more semicolons than I do now, and why the blinking cursor still calls to me from my white-on-black Material-themed VS Code window.

1. Solving the puzzle

When people used to ask me what programming was all about, I』d say something like this: 「Puzzles are fun, right? What if you could solve puzzles all day long?」

For me, programming starts at the puzzle. Every code routine is an invitation to face down a mental challenge. Except this challenge isn』t a mere diversion like a Sudoku puzzle, but a real-life riddle with real-life consequences. And these puzzles are all around us. They can be challenging, like calculating real-life movement for imaginary objects. Or they can be simple, like writing the most efficient code to send periodic WhatsApp notifications to your parents. The puzzles are infinite. You will quite literally never run out of them.

Here』s another interesting thing about every programming puzzle: it doesn』t have just one answer. It』s a puzzle that you』re almost guaranteed to get right but not perfect. It』s a puzzle you can return to a week, a month, a year later, and keep polishing it into a better state. (If you like to spend hours organizing your to-do list or alphabetizing your record collection, you』ll like this part.)

There』s a balance here. Solving a new problem is joy. Improving an old solution is satisfaction. And the whole cycle — solve, test, refine — is addictive.

Of course, programming isn』t all solutions. Between the challenge and the joy is a long slog of frustration, where a lifeless piece of metal points out your every tiny syntactical slip-up. But if you』re motivated by things you know you can do — even when you can』t quite figure out how you』re going to do them — programming is the perfect perpetual challenge.

Sisyphus did not invent code, but he understood the struggle

2. The satisfaction of building something

If programming was just a series of puzzles, it wouldn』t amount to much. Eventually you』d feel like you were playing endless rounds of Freecell.

But here』s the difference. Every coding project ends by interfacing with the real world. Whatever you make has a purpose — maybe it』s just a laugh, maybe it』s just an experiment, maybe it』s just for you — but all code exists to create things that will be used.

When you build something that』s genuinely useful, you get a feeling of satisfaction. You didn』t just contribute your effort. You made a tangible product! Maybe that』s similar to the pride a carpenter feels when fitting together a new piece of custom furniture. (I don』t know — I just Ikea my way through every home decor challenge.)

Programming is also more personal than most non-coders realized. As a programmer, you probably don』t think of yourself as an artist, but somewhere in every new digital creation are your fingerprints. That makes life awkward when things go wrong, but immensely gratifying when they go right. (At least until the next refactoring.)

3. The magic button click

Developers like to say that programming is about problem solving, but we also have a secret. We are happy each and every time something comes from nothing. It』s a magic trick. It』s a new toy. You click a button, and something happens. A piece of hardware has submitted to your will, reacted to your commands. Even a 「Hello, World!」 program is fun. The magic is in making something happen.

Most programs are — on their own — not that dazzling. But every time you put your fingers to the keyboard, you have the ability to create something using nothing but mad skillz and imagination. And that new something can entertain, amuse, or challenge others, or just plain make their life a bit easier. That』s a super power.

See what I did there?

4. There』s always something new

In many walks of life, you can make a choice. Take the easy path, try to get as comfortable as possible, and work to keep the good times rolling. Or, you can take the steeper climb, and dedicate yourself to something that you』ll need to work at — forever.

Software development is an example of the second path. To be successful, you need to be constantly learning. I remember a year that saw three different databases APIs come through the door. All three had a different set of objects and slightly different abstractions, but they served the same basic purpose for the same underlying database. In other words, these were small changes.

Constant learning keeps life from getting stagnant. And who doesn』t want to play with the latest tech toys? Coding is like that — there are always shiny new things on the horizon. New tools, new libraries, new tricks and techniques.(This week I』m playing with Blazor, an early-stage framework for building web browser applications in WebAssembly. If it succeeds — and it』s a big 「if」 — the entire world of client-side development will be reinvented once again.)

But the pace of change in tech can be exhausting. Few years pass without at least one small revolution. Just at the moment where you think you』ve figured out every detail of the inner workings of the latest JavaScript framework, a tech megacompany pops out a new one. If I had a dollar for every paradigm-shifting coding library that』s dropped in my lap, I could retire and code for free.

This is also the life of a programmer — always learning and often confused, peering around in the darkness, and Googling through the late-night hours.
In coding, there is often tedium, but there is rarely boredom.

Final thoughts

No discipline is straight up joy from beginning to end, and there are plenty of things about programming that aren』t fun, from sunless days in a Aeron chair to pages of code that won』t work even though they should (or, worse, work even though they shouldn』t). But those who stick with it — those who make software coding their life — know the rewards. Because what other field invites you to imagine something new — and then design it? What else gives you the chance to create every day?
下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/