6

How To Be A Developer 001 - Commit

 4 years ago
source link: https://fuzzyblog.io/blog/how_to_be_a_developer/2017/07/02/how-to-be-a-developer-001.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Background

I've taken on a new project recently. I'm helping teach some local (Indianapolis) homeless youth basic software engineering using the web developer curriculum from Free Code Camp. Initially I'm teaching two students and we're working out of the Outreach Indiana facility in downtown Indianapolis. Outreach Indiana is a fantastic charity that truly does good work.

I thought I'd write a series of essays on How to Be a Developer that reflect some of the things I've learned over a career working in high tech. While I am a fan of what Free Code Camp does, I thought some practical, hands on advice might add some value for my students. I've structured these as a series of single topic narratives arranged numerically.

Lesson 001 - Commit

The topic for my first lesson is that to be a developer you need to commit. Now I don't mean a git commit (more on that in #19), what I mean is that the nature of being a developer is committing to solving problems. I'm going to give you an example of a problem I solved just three days ago:

Broken:

docker-compose -f docker-compose.production.yml exec web bundle exec rake db:migrate

Working:

docker-compose -f docker-compose.production.yml exec -T web bundle exec rake db:migrate

What these commands do doesn't really matter but the only difference between these two commands is a small -T flag that only discovered after troubleshooting an obscure Ansible to Docker error:

Traceback (most recent call last):\n  File \"/usr/bin/docker-compose\", line 9, in 
<module>\n    load_entry_point('docker-compose==1.8.0', 
'console_scripts', 'docker-compose')()
File \"/usr/lib/python2.7/dist-packages/compose/cli/main.py\", 
line 61, in main
command()
File \"/usr/lib/python2.7/dist-packages/compose/cli/main.py\", line 113, 
in perform_command handler(command, command_options)
File \"/usr/lib/python2.7/dist-packages/compose/cli/main.py\", line 441, in exec_command
pty.start()
File \"/usr/lib/python2.7/dist-packages/dockerpty/pty.py\", line 338, in start
io.set_blocking(pump, flag)
File \"/usr/lib/python2.7/dist-packages/dockerpty/io.py\", line 32, 
in set_blocking
old_flag = fcntl.fcntl(fd, fcntl.F_GETFL)\nValueError: file descriptor cannot be a negative integer (-1)

It took considerable sleuthing to figure this out and the error was identified in a single Github issue on the underlying Docker project. And when I say that this problem was obscure, even Docker experts I know had no idea about the -T flag. Here's part of the problem description:

So basically, you need -i for docker exec when you are piping in data to the command.

And you should not use -t for docker exec when you are piping data out from the command.

And docker-compose exec only have -T, which means neither -i or -t. But you cannot represent -i without -t in docker-compose.

And that's what I mean by obscure… As a developer you run into this kind of stuff all the time – there's a reason why when you start with Free Code Camp, it emphasizes using Google before you ever get into a programming language. A huge part of being a developer is now your skill at using Google and that's something that I'll cover in #11.

To me the very essence of being a developer is being willing to commit to problem solving at this level. It means:

  • accepting that you will continually be encountering new things that you don't know in depth
  • trying hard to understand whatever the problem you encounter
  • researching things in depth, sometimes over and over as the problems shift
  • sometimes solving things by experimenting until you come up with a solution that works

As a developer, sometimes the problem you solve:

  • is one of languages where you can't figure out how to do something using your language of choice
  • is one of your tooling where the tool you're using either doesn't work or doesn't work as expected
  • is one of an algorithm where the underlying approach to solving the problem is unclear
  • is an obscure bug which only happens from in certain circumstances; in this case you need to figure out what those circumstances are and how to repeat them

And there are perhaps an infinite number of variants on these but the underlying nature of being a developer is really problem solving and in order to do that a developer has to commit himself or herself fully. I'm going to close this with a song lyric that really reminds me of being a developer:

I get knocked down, but I get up again
You are never gonna keep me down
I get knocked down, but I get up again
You are never gonna keep me down
I get knocked down, but I get up again
You are never gonna keep me down
I get knocked down, but I get up again
You are never gonna keep me down

[TubThumping by Chumbawamba](https://www.google.com/search?q=i+get+knocked+down+lyrics&ie=utf-8&oe=utf-8) | [Youtube](https://www.youtube.com/watch?v=2H5uWRjFsGc)

The problems you solve will continually knock you down and you have to get back up again. Some of the best developers I have ever worked with actually weren't the smartest but they knew how to commit and how to just stick with problems like a terrier until it was solved.


Recommend

  • 41
    • www.sdnlab.com 6 years ago
    • Cache

    【招聘】CTO/TD/001

    公司名称: Hong Kong Applied Science and Technology Research Institute (ASTRI) 工作地点: 香港 薪酬范围: 面议 简历投递: [email protected] 岗位描述、岗位要求: Refere...

  • 29
    • UncleCatMySelf.github.io 6 years ago
    • Cache

    Redis | 001能做什么?

    本博客猫叔的博客,转载请申明出处 前言 本系列整理出于《Redis深度历险:核心原理与应用实践》一书,摘抄整理读后感与总结。 好的程序员都会Redis 说说Redis能做什么呢? 1、记...

  • 6

    PostMac 001 -- Adding pbcopy to ElementaryOS or Another Unix Nov 5, 2016 Well as will become clear in another few blog posts, I took ElementaryOS and installed it on my 2012 MBP with 16 gigs RAM and 768 mb SSD...

  • 11

    播放控件的本地化与国际化 | 交互问答 001呆呆只是个会写点字的普通设计师各位好,我是...

  • 15
    • quangelab.com 4 years ago
    • Cache

    500px技术周报001

    Xcode9的无线调试 Facebook开源库fishhook的使用 UIViewController的调试小工具 自定义导航栏的侧滑返回 QGCollectionMenu简介 Xcode9的无线调试 环境:Xcode9-beta5 iOS-beta5 新的Macbook已经将充...

  • 16

    QQ 群聊天记录 001 号:关于盗版书的讨论¶ 在我创建的两个技术 QQ 群里面, 时不时会出现一些有趣的讨论内容, 有群友建议我把这些内容记录下来并在网上进行分享, 我一直觉...

  • 16

    SSQ22667-001: An 80C186 for the Space Station

  • 9

    PHPLarge -- FuzzyOffice -- 001 - Constraints Aug 9, 2002 PHPLarge :: FuzzyOffice :: 001 - Constraints Last updated: 8/15/2002; 6:20:28 AM   The FuzzyBlog...

  • 7
    • notes.elmiko.dev 4 years ago
    • Cache

    Weekend Code Hacker 001

    Weekend Code Hacker 001 Building a bookmark service with the Django REST framework 02 Sep 2017 I used to be a huge fan of the old Delicious book...

  • 8
    • segmentfault.com 4 years ago
    • Cache

    数据库 | 001-MySQL梳理系列(一)

    MySQL基本组成 SQL执行流程

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK