技术控

    今日:117| 主题:49225
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Codebattles: Competitive Coding in the Workplace

[复制链接]
我的独一无二 发表于 5 天前
64 1

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
By Dan Stark | @danstarkdevops
  At Zonoff, we have a general Slack channel “#nerds” where anyone can ask quick engineering questions. Often, the answers yield highly technical discussion. People can get very into it.
   
Codebattles: Competitive Coding in the Workplace-1 (background,counseling,technical,solution,question)

  A couple months ago, I posted a relatively straightforward question about the best way to parse a blob of JSON. Before I knew it, people were writing test scripts proving that their solution was the fastest when executed 100 times. I felt like there was some magic there we could tap into. After talking it over with a few coworkers, Codebattles was born.
  A quick introduction: I’m a DevOps engineer with a Master’s in counseling psychology. I don’t have a traditional engineering background, and neither do some of my co-workers. I’m jealous that I never got to participate in hackathons or coding competitions in school. Although I’ve seen them attempted in previous jobs, they typically failed to meet my expectations. I can think of a number of reasons why they fail most places and why they succeed at Zonoff:
  
       
  • Identifying a topic of wide interest can be difficult . The engineers we hire share a desire to learn and are willing to tackle just about anything.   
  • Lack of planning/organization . I was pretty sure I could figure this out with help from the participants.   
  • Waning interest . Gamification might keep people engaged.   
  • People feel that their voices/ideas aren’t heard . We encourage empathy and foster communication.  
   1. Picking your battles

  Codebattles are lightweight engineering competitions held monthly at Zonoff. They’re entirely self-organized. Anyone can recommend a topic, and participants collectively decide the ground rules and scoring for that battle. A good topic is short, definitively scoped, and bridges a variety of specialties. We’ve covered everything from parsing JSON to writing a small game. Some specialties don’t lend themselves to challenges as easily, but, in general, we pick topics that many developers are familiar with and excited about. It’s a lot easier to create interest for a codebattle when someone is motivated and willing to help define the topic. Part of the challenge is making sure it’s an idea open to the wide majority of the engineering team. Not everyone participates every month, and that’s natural; it doesn’t discourage the rest of us. Every idea presented gets talked out with multiple battlers to see if it’s scoped and accessible.
   2. The Git down

  Since we use git for version controlling our product source code, it seemed natural to use it to organize the submissions for Codebattles. Before the battle, the moderator creates a folder in the main codebattles repository for the upcoming challenge. The challenge is described in a README and placed in the folder alongside related supporting files. As this is happening, each participant clones the repository and creates their own named local branch as follows:
  git clone https:///codebattles
  git checkout -b dstark
  The challenges kick off when the moderator announces a push to the battles directory on the master branch. The battlers then merge it to their local working set.
  git merge master dstark
  When battlers arrive at their solution, they simply push to their remote.
  git commit -am ‘codebattles 1 submission’
  git push -u origin dstark
  Battle one extended my parsing json exercise. Here is the directory structure for the first challenge after the moderator pushed the first challenge to master:
  codebattles [master] % tree
  .
   ├── README.md
└── battles
├── one
│ ├── README.md
│ ├── raw_data.json
│ └── results.txt
  The instructions are in README.md:
     Battle One: Data parsing
   ============================
   ## Constraints
   You may use any language, tool, resource, etc.
   ## Background
   Let’s say we have a hub check in multiple times during the day and we want to evaluate CPU utilization. All of the data in this example is from one hub. You’ll notice output regarding CPU load average in raw_data.json. Sort checkins descending by 1 minute CPU load average and ID so we can look it up easily.
   ## Given
   A data set from [ElasticSearch](https://link-to-dataset) (This data is in: *raw_data.json*)
   ## Objective
   Save to a file ‘results.json’ desc list of “LoadAvg (1 minute), _id” sort by LoadAvg.
   ## Example result of ‘results.txt’
        “`
  3.00, 12345678912345678912345678912345678912345678912345678910.0
  1.36, 12345678912345678912345678912345678912345678912345678966.0
0.15, 12345678912345678912345678912345678912345678912345678907.0       “`
   Please share your solution – if you have any code leave it in this directory so others can see how you derived your answer
    3. Quit playing games with my code

  Like many side projects, it’s easy to start with burning fury only to fizzle out weeks later. To combat this, we incorporate a reward system where battlers can score points across multiple battles. As this is a friendly competition, the points aren’t the point of the challenge. We’re all competitive people; it’s natural for us to be measuring our skills against each other. But we didn’t want this to be a chest-thumping, king-of-the-jungle competition. We wanted it to be fun, so we built in gamification. A point system that runs across multiple challenges encourages people to build their skills in other areas and see whom they can learn from over time. At the end of the season, the engineer with the most points takes home the coveted Golden Keyboard trophy.
   4. “Just hear me out, what if we all build a compiler”

  When we first began Codebattles, a funny thing happened. We had a huge influx of ideas, from engineers, managers, marketing, and more. I believe my role as organizer is twofold:
  
       
  • Make sure everyone feels heard , that I’m not dismissive of their ideas (I genuinely am not); and   
  • Ask open-ended questions about their idea. How would it be judged? How would a UI developer react to this challenge? What would be the benefit to the engineering team if we choose this?  
  Having someone expand on their idea builds excitement and makes them feel ownership, and I support them to see it through if they’re passionate. Ideas are most powerful when they can be driven from dev to production, and I treat Codebattles the same way.

Codebattles: Competitive Coding in the Workplace-2 (background,counseling,technical,solution,question)

  One of the reasons I came to work at Zonoff a year ago was the diverse engineering backgrounds of the people here. Codebattles are a way to leverage the entrepreneurial spirit we all share and learn from our peers. And while I know I’d lose writing C++ code, I’ll happily throw down against anyone in sed/grep/awk one-liners!
友荐云推荐




上一篇:SiFive open sources RISC-V chips
下一篇:Downloading files from web using Python
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

z1002401564 发表于 4 天前
各位兄台,通融通融,沙发我来啦!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表