开源日报 每天推荐一个 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/