• 开源镜像
  • 开源沙龙
  • 媛宝
  • 猿帅
  • 注册
  • 登录
  • 息壤开源生活方式平台
  • 加入我们

开源日报

  • 开源日报第607期:《嗯…… is-idiot》

    12 11 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《嗯…… is-idiot》
    今日推荐英文原文:《Overcoming Developer Fatigue》

    今日推荐开源项目:《嗯…… is-idiot》传送门:GitHub链接
    推荐理由:有的时候我们可以不为了运行而写一段代码,就像你写的小学作文作业一样,它们是给人看的而不是拿来理解的。需要通过代码表达如同一篇文章一样的意思,兴许这个时候你需要摆弄一些新的函数了,你要让它们表达你的意思而且函数名要十分易读。这个项目是一个很没有什么用的玩具,可以用来检测某人是不是个 idiot——我敢保证这个在实际上没什么用(除非你想给你的朋友开个玩笑),不过如果你需要把代码写成一篇文章的话,像这样自己写些函数就能派上用场。
    今日推荐英文原文:《Overcoming Developer Fatigue》作者:Ryan Nehring
    原文链接:https://medium.com/better-programming/overcoming-developer-fatigue-5ed91769c81c
    推荐理由:找出解决问题的方法,或者是找回行动的动力

    Overcoming Developer Fatigue

    How to rediscover that magic you felt when you first started

    For many of us, the line between designer and programmer is pretty blurry. We’re either one-person-shops or work in teams where we have to wear many hats. When I hear the term “developer” applied to a person, I assume they’re doing a little bit of everything to get a project off the ground, and I commend them.

    It would seem at first glance that wearing many hats would help reduce the potential for boredom, but I find just the opposite to be true. Counter-intuitively, the overload of information and choices can lead to serious developer fatigue.

    Developer fatigue can manifest in myriad ways. Sometimes it’s the feeling you get when you’re sitting at your keyboard, staring at your latest project and feeling uninspired or out of ideas. Other times, it’s the inability to get started on a new project because it feels like you’re just doing the same things over and over. Even more debilitating, developer fatigue can make you feel like you don’t have any good ideas left, or that you’ll never be as good as other developers out there.

    All of these thoughts can feel incredibly real and powerful in the moment, and can severely hamper your effectiveness and output. Overcoming them is not as easy as just putting your “nose to the grindstone” and working through it, however. I, and every other developer you know, have been there. Let’s examine some tried-and-true methods to overcome developer fatigue.

    Revisit Your Old Projects

    This always step one for me. When you’re feeling particularly exhausted or uninspired, it’s important to take a moment and remind yourself of the incredible stuff you’ve already built.

    Revisiting old projects will give you a new sense of appreciation for the clever solutions you’ve come up with for difficult problems in the past. It can re-introduce you to really excellent design and UI/UX solutions you’ve built and should be proud of!

    If you’ve been doing this work long enough to suffer from developer fatigue, then you’ve been good at it long enough to have a catalog of self-inspiration you may well have forgotten about, just waiting for you to rediscover.

    Explore New Languages

    Remember the first time you ever made a computer say “Hello World”? That’s an awesome feeling. It’s a cusp moment where you first begin to grasp the power of what code is capable of. It’s inspiring!

    I write most of my code day today in JavaScript, and some days I’m about one addEventListener away from wanting to throw my laptop at the wall. When that happens, I go and play with Python. I’m not a Python developer at all, but seeing how other languages accomplish similar tasks or seeing what new tasks can be accomplished by a different language can be a shot of adrenaline to the brain of a programmer.

    Most of the time, it amounts to nothing more than a moment of inspiration. Sometimes, however, it can open the door to a whole new development paradigm or approach. Understanding how other languages work will always be a net-positive result for any developer, even if you never use those languages for anything more than dabbling.

    Read Developer/Programmer/Design Blogs

    Sometimes, you already know the best way to do something. More often, there are new and better ways of accomplishing a task out there just waiting to be discovered.

    I believe developers thrive on discovery. Our jobs are to build solutions for people’s problems, and in doing so we inherently have to discover the full nature of the problem and the many ways one could go about solving it, before ultimately choosing one solution and building it.

    There are thousands of other developers, programmers, and designers out there writing every day about how they solved something. Take some time and read about their process and see what parts of it you could incorporate into your own.

    Not only will this make you a better developer, but it’ll also help you reignite that fire of discovery and potential that got most of us into this profession in the first place.

    Try Peer Programming

    Peer programming is something I’ve found myself recommending to developers more and more often lately. Working with another developer on a project can open the door to entirely new ways of thinking.

    Exposing yourself to someone else’s expertise can teach you so much, so quickly, that it’d be difficult to overstate how valuable it can be. Quite likely they will have completely new approaches to problems you’ve solved the same way for years. You may find their approach to be better, in which case you learn from it, or inferior, in which case it’s a validation of the quality of work you do.

    Peer programming also opens up the opportunity for you to act as a teacher to someone less skilled than you, which can be an immensely rewarding experience. Watching them get excited about the things you’re showing them will inevitably lead to the reemergence of your own excitement about your talents. Excitement is contagious!

    Conclusion

    There’s no perfect answer for overcoming developer fatigue. It’s important to remember that it’s a temporary state. It can feel all-consuming and debilitating, but it’s a bump in the road, not the road itself.

    Spending some time remembering all the reasons you became a developer, sharing your experiences, and exploring new methodologies are all great ways to shake off that fatigue.

    Developers are builders. That’s an incredible thing. There are so many incredible reasons to get excited about what we do, but the truth of the human condition is that inevitably you will feel yourself getting bored with it. That doesn’t mean you’re a bad developer, or that you’ll always feel that way; it just means it’s time to rediscover that magic you felt when you first started. You can overcome it, you will overcome it, and you’ll go on to build even more incredible things!
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第606期:《四根棍子 repeat-todo》

    11 11 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《四根棍子 repeat-todo》
    今日推荐英文原文:《Write Better Programming Tutorials》

    今日推荐开源项目:《四根棍子 repeat-todo》传送门:GitHub链接
    推荐理由:在著名的光棍节要推荐什么最好呢?当然是别人秀恩爱的开源项目了,项目的介绍栏里大大的写着“I made for my wife”就证明了这一点。别说什么程序员就不知道浪漫两个字怎么写,不管是有伴的人也好没有伴的人也罢,能够为了他人去行动这一点就值得肯定,虽然有各种各样不同的形式,但是根源都一样来自于喜爱这种情感,有喜欢别人的能力,自然能找到能让自己喜欢的人。浪漫只不过是一种更合乎气氛的表达形式,在喜欢一个人的时候,可不要为了形式而忘记根源才好。
    今日推荐英文原文:《Write Better Programming Tutorials》作者:Adam Ing
    原文链接:https://medium.com/better-programming/write-better-programming-tutorials-5619b9cf5ca2
    推荐理由:学习需要技巧,讲课也需要技巧

    Write Better Programming Tutorials

    Share your knowledge more effectively, with more people

    We publish a lot of tutorials at Better Programming. If you’ve mastered something in programming — a process, a task, a method — you can probably write a tutorial about it that other people will find useful. It could get lots of views!

    Say you’re working with a newly released version of a highly popular tool or framework and you learn how to do something tricky that’s not yet well documented — you have valuable knowledge to share.

    Even if you’re just starting out on your programming journey, you could create something useful for other learners. In fact, basic subjects have a larger potential audience — there are always more beginners than advanced practitioners in any field.

    But … to be successful you do need to know how to write an effective tutorial.

    Remember:

    It’s a learning resource

    The style, structure, and scope of the piece should be designed to fit a learning objective. Ideally, the learning objective is clearly stated, right in the title.

    In this piece, I’m going to list the ingredients that go into a well-designed programming tutorial.

    A Strong Introduction

    You should always have an introduction.

    Some writers, usually with very short pieces, jump straight into the walk-through, but I think this is usually a mistake. Yes, if you’ve picked a good topic lots of your readers will know from the headline that they want to read it, but there are lots of other readers out there — people curious enough to click but who still need convincing. A short introduction before the instructions gives more people an opportunity to discover that they want to read the rest of the piece.

    The introduction should cover:
    • What the reader will learn from the tutorial (the learning objective)
    • Whether it’s part of a larger process (is this one of a series of pieces?)
    • Knowledge prerequisites (what the learner needs to know to understand this process)
    • Physical prerequisites (what the learner needs to have installed on their computer)

    Write Clearly and Simply

    It’s always important to write clearly — but it’s absolutely crucial that a walk-through is written as clearly and simply as possible.

    In the introduction, you can make jokes and express a bit of your personality, but when you get to the process you should adopt a totally straightforward, transparent writing style. Transparent means the reader doesn’t even notice it. They don’t think “what great writing” or “how beautifully put” because they’re too busy taking in the information without noticing how it has been presented.

    You should also stick rigorously to the steps you’re covering — this is not the place for asides or tangents. Think of it as a lesson. A good teacher might take a relaxed, informal approach in a class, but when the time comes to get down to it they’ll focus on the work and make sure the students are doing the same.

    This is one of those situations where you don’t necessarily want to write the same way that you talk. “Now go ahead and open up your terminal” might sound winningly informal in person, but in a written tutorial, that type of casual language just slows the transmission of information and increases the chance of confusion. Just write “Open the terminal.” This isn’t bossy or overly formal in the right context: It’s simply neutral.

    To write clearly:
    • Don’t use long complicated sentences — if in doubt, split it into two
    • Don’t combine steps into long paragraphs — give each step its own space
    • Don’t use unnecessarily long words
    • Avoid grammatical redundancies (always)

    Use the Right Voice

    One issue I’ve come across a few times is when a tutorial opens with something like this: “Let’s say you are working on a project in React …” Because they’ve presented a hypothetical situation (“Let’s say …”), the writer then starts using the conditional tense, “You would then have to create …” “Next, you would build it and run it.” Ten or 20 steps later, and they’re still using “You would” for every instruction. This is unnecessary, and it makes things difficult to read — it introduces friction. Use the conditional tense sparingly.

    Instead, use the imperative form. This is what you use when you’re telling someone to do something, like “Now open your terminal.” Don’t worry if you don’t expect anyone to actually be following along. Writing instructions like this is the most common way to do it — therefore its expected by readers and is thus the most transparent.

    Break It Up

    Walk-throughs can get repetitive. Systems walk-throughs can involve scrolling through endless “click here” instructions, so it’s important to keep the reader engaged and oriented. If you have more than 15 or so separate steps, it’s a good idea to break it up somehow.

    Look for natural pauses — where you’ve finished a stage of the process, for example — to take a break from the main flow of the process. Use this moment’s pause to review what’s been achieved and what steps are left.

    Use Screengrabs … But Not Too Many

    For systems walk-throughs, screengrabs can be a real aid to understanding. However, they take up a lot of screen space, and if each screen is only minimally different from the last, they can make a short process walk-through difficult to navigate. It’s too easy to lose your place when you’re scrolling through numerous, similar-looking screengrabs.

    Save screengrabs for new screens and to highlight any easy-to-miss visual elements in the process.

    Code

    The most important thing to stress about code in your Better Programming tutorials is this: You should include it. It’s better to show what you’re talking about than to just link to a GitHub repository for the piece (although, please, do that as well).

    If you need to include very long chunks of code in the middle of a tutorial, be sure to consider how long it’ll take for the reader to digest them and how they will look on the page. A big formatted piece of code will disrupt the flow of a walk-through, so it’s a good time to take a break to reorient the reader, as discussed above.

    A Final Word

    In many ways, tutorials are easy to write. You’ve already done all the hard work by learning the process in the first place. If you’re an inexperienced writer, they’re a good way to get started writing because they have a clearly defined scope. Just outline exactly what task or process you’re covering and then carefully go through it, step by step. You don’t really need to argue or make a case for anything (although, as I said, making a case that the task is widely useful can increase your readership.)

    So, what are you waiting for? Write a tutorial today!
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第605期:《战争模拟 coldwar》

    10 11 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《战争模拟 coldwar》
    今日推荐英文原文:《Why Product Roadmaps Matter More Than Releasing Everything at Once》

    今日推荐开源项目:《战争模拟 coldwar》传送门:GitHub链接
    推荐理由:这个项目提供了一系列简单战争游戏或是别的什么的场景模拟——你可以调整其中的参数,然后坐山观虎斗。兴许你只是想寻找点灵感,或者说打发一下时间,看着这些程序操纵着像素光点在屏幕上晃来晃去似乎并没有什么特别的意义,它们就像以前的屏保一样,在画面上翻来覆去,就这样发发呆似乎也挺好的。
    今日推荐英文原文:《Why Product Roadmaps Matter More Than Releasing Everything at Once》作者:Aphinya Dechalert
    原文链接:https://medium.com/better-programming/why-product-roadmaps-matter-more-than-releasing-everything-at-once-c85941012593
    推荐理由:走得越远,计划就越重要

    Why Product Roadmaps Matter More Than Releasing Everything at Once

    How can you maximize your potential for true business agility?

    There is a misconception that software is a static product. You build it, you ship it and then you call it a day—or maybe a week or a few months. But for a lot of businesses, it becomes a project that ends up ballooning out longer than the year, potentially blowing the budget before it ever gets released. With this approach there is no true customer/market validation, only speculation; even controlled focus groups often respond differently to reality.

    Having a product roadmap and releasing features in iterations can be better for business, in the short and long term. This is because data, and an accurate gauge of market response, can help determine if your software development is going down the correct path.

    Why Agile Is So Popular Among Startups

    Agile startups are disrupting almost every industry due to their ability to ship quickly and respond to change. It’s a completely different organizational approach and runs on the mentality of getting true customer feedback as quickly as possible.

    In order to achieve this goal, the software development process has to deliver at the same speed.

    The issue that many businesses, especially established structures, face is that they can’t properly enforce such a high velocity of idea implementation and turnover. Driving the business at high speed can also result in haphazard software getting delivered.

    A product roadmap can help solve these two major issues regardless of organizational structure. It gives the business direction without being completely prescriptive, and lets developers understand where the software is expected to go and code accordingly.

    Product Roadmaps Should Be Part of Your Strategy

    Your business strategies are expected to help achieve your vision. Having a fluid product roadmap is a method that keeps your software development releases focused on the targets.

    When you incrementally release product features, you gain more perspective and qualitative data based on customer responses. It lets you prove your hypothesis against real reactions, rather than speculation. When your business has data, it gives you true insight into the reality of your market and how your potential competitors are performing.

    A product roadmap is a series of milestone features that make up the completed vision for the software. However, unlike a completely shipped software, the undeveloped parts can be moved around, added to, or discarded based on the responses to previous features.

    How Product Roadmaps Can Apply to Any Business

    When you release software with a “big bang” approach, your risk of product failure increases. There’s a difference between creating software with core functionality vs. something that encompasses everything on the agenda.

    When you develop a core release, business- and software-related issues tend to be smaller, fewer, and much more manageable. The “incompleteness” of the software is only conceptual. What customers actually get is a working product with consistent improvements and upgrades based on their real experiences. This can help build a positive long-term relationship with your users. On the business side, your conceptually incomplete software is delivered in parts, with each part being a stand-alone product or supplementary to a proven revenue-generating concept.

    Your return on investment incrementally compounds via software robustness, ability to respond to change, the ability to acid-test for potential cash cows, and a shorter feedback loop.

    Final Thoughts

    A “big bang” approach is often a riskier method than an Agile release cycle. When the expected results fail to be delivered, the sunk cost of product development is limited to that particular feature release.

    Having a product roadmap and releasing products and features against it pushes your organization and work methodologies closer to Agile. The product roadmap acts as a strategic supplement that can change in accordance with market demands.

    When you release everything at once, it puts your business in a potentially precarious financial situation where failure is not an option. This is often caused by software that runs overtime or finds itself stuck in a roadblock.

    The product roadmap gives you clarity but isn’t as binding as releasing a large piece of software with multiple parts and features to it. Releasing in cycles gives your business and the software less surface area for failure. It also lets you prove which ideas and features will positively impact your metrics.

    So be sure to have a product roadmap and de-risk your business by shortening the feedback loop. You can never truly know which ideas will take off until you test them in the market.
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第604期:《玩蛇 SnakeAI》

    9 11 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《玩蛇 SnakeAI》
    今日推荐英文原文:《Stop Using i++ in Your Loops》

    今日推荐开源项目:《玩蛇 SnakeAI》传送门:GitHub链接
    推荐理由:将人工智能与一些古老游戏结合起来会是什么样呢?这个项目使用 AI 来玩贪吃蛇,并且通过类似现实世界的适者生存交配等方式来选出更好的蛇 AI。虽然这两个东西结合起来看上去让人感觉有些小题大做……不过试着让机器来玩简单的游戏会是个挺有意思的事情,在我们的帮助下它能比小时候的我们更强。
    今日推荐英文原文:《Stop Using i++ in Your Loops》作者:Devin Soni
    原文链接:https://medium.com/better-programming/stop-using-i-in-your-loops-1f906520d548
    推荐理由:看看日常生活中的细节有哪些可以优化的

    Stop Using i++ in Your Loops

    Why ++i is often better than i++ (pre-increment vs. post-increment)

    Introduction

    If you’ve written a for-loop before, then you have almost definitely used i++ before to increment your loop variable.

    However, have you ever thought about why you choose to do it like that?

    Clearly, the end result of i++ is that i is one higher than it was before — which is what we want. But, there are many ways to accomplish this, such as ++i, i++, and even i = i + 1.

    In this article, I will cover two methods of adding 1, ++i, and i++, and explain why ++i may be better than i++ in most situations.

    Post-Increment (i++)

    The i++ method, or post-increment, is the most common way.

    In psuedocode, the post-increment operator looks roughly as follows for a variable i:
    int j = i;
    i = i + 1;
    return j;
    
    Since the post-increment operator has to return the original value of i, and not the incremented value i + 1, it has to store the old version of i.

    This means that it typically needlessly uses additional memory to store that value, since, in most cases, we do not actually use the old version of i, and it is simply discarded.

    Pre-Increment (++i)

    The ++i method, or pre-increment, is much less common and is typically used by older programmers in languages such as C and C++.

    In psuedocode, the pre-increment operator looks roughly like this for a variable i:
    i = i + 1;
    return i;
    
    Notably, here, we do not have to save the old value of i — we can simply add to it and return. This aligns much better with the typical use-case in a for-loop, since we rarely need the old value of i in that context.

    Caveats

    After seeing the difference between post-increment and pre-increment, one might notice that, since the cached value of i is never used in post-increment, the compiler will just optimize that line away, making the two operators equivalent.

    This is most likely true for primitive types, such as an integer.

    However, for more complex types, such as user-defined types or iterators with the + operation overloaded, the compiler may not be able to safely optimize the caching operation.

    So, it seems that in most cases, the pre-increment operator is better than, or equal to, the post-increment operator, as long as you do not need the previous value of whatever you are incrementing.
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
←上一页
1 … 107 108 109 110 111 … 262
下一页→

Proudly powered by WordPress