We’ve built a towering pile of shite

栏目: IT技术 · 发布时间: 4年前

内容简介:This a rant, written at midnight, after battling software errors. Set your profanity filters accordingly.I despair over the state of software engineering – specifically, stability. We seem to have lost the understanding that computers are there to do the h

This a rant, written at midnight, after battling software errors. Set your profanity filters accordingly.

I despair over the state of software engineering – specifically, stability. We seem to have lost the understanding that computers are there to do the hard work for us. And I don’t think we ever believed in a user-centred approach to developer tools.

The last time I developed an Android app all by myself was… fuck… Doughnut? Kitkat? Too long ago. Last week, I found a small open source Android app that I wanted to alter. Nothing drastic, just changing a few strings and a couple of images.

The repo was 3 years old. Surely it wouldn’t be that hard to get running again? Ha!

Here’s what went well.

  1. Installing Android Studio. I remember when this was a chore – but I just installed the Flatpak, opened it, and let it update.
  2. Cloning the repo. Again, simple.
  3. Importing the project. Couple of clicks. Done.

Then it all went to hell.

Fail #1 – moving targets

Gradle sync failed: Could not find com.afollestad:bridge:3.2.5.

That’s annoying. One of the libraries the app wanted to import was lost. Where was it?

It appears to be in MVN Repository with a note that:

 this artifact it located at Spring Plugins repository (https://repo.spring.io/plugins-release/)

Things move. I get that. But why isn’t there some form of automatic forwarding in place?

I fixed the issue and moved on.

But, as a new(ish) developer – how do I understand the complicated relationship between an app, the tools, the repositories, and all their weirdness? Where’s the user-centred design in all this?

Fail 2 – automagic updates

Google’s Android Studio is complicated. And it puts all the effort on the user. It kept complaining that targets were too low, and needed to be updated. It didn’t actually offer to update anything itself. It didn’t tell me where the error was. It didn’t say “hey, we can automatically update some things. Here are the risks. Want to proceed?”

It just left me in limbo.

So I found the strings and manually changed 5 numbers.

Why don’t our tools do the hard work for us? An IDE isn’t a screwdriver – it has knowledge about what it is doing and what problems it is encountering. It doesn’t need to make changes unilaterally, but it could at least make helpful suggestions.

It reminds me of one of my earliest frustrations when I first started to learn C++ back in the 1990s. The compiler would say “Missing semicolon on line 427.” To which I’d reply “If you know what is missing, and you know where it is missing, why not add it back yourself? You useless piece of crap!”

Fail 3 – change of syntax

Moving on. Deep breaths. Gradle started complaining that I couldn’t use “compile” any more. Apparently it was deprecated. OK. So what’s the fix? Again, neither Gradle nor Android Studio would tell me. They knew there was a problem, they probably knew what would get it working. But they stayed silent. Because fuck the users, amirite!?

The fix was simple. I manually replaced the word “compile” with the word “implementation”.

That’s it.

I did that a dozen times and it worked. What’s the difference between the two? I don’t know. I don’t particularly care. I’m sure there was a very good reason for replacing one word with another. I’m sure it makes a profound difference to someone. But for me, the end result was the same. The app now compiled.

Imagine a user interface which suddenly said “you must turn things clockwise from now on!” You’d be all like “WTF? What’s wrong with anticlockwise? That’s the way I’ve done it for years.” And they’d be all like “Dude! Clockwise is the way to go. It all has to change.” And you’d go “Mate, can’t you just install them backwards or something so I don’t have to change my behaviour to accommodate your needs?” And then they’d spit at you.

Why doesn’t Android Studio / Gradle / Whatever just go “Mate – you’ve used compile here – that won’t work. Want me to automatically update the syntax? It’ll probably be fine.”

Don’t make me think. And don’t make me waste my time fixing problems that you have caused.

Fail 4 – who are our users?

I ranted on Twitter, of course, and had a series of frustrating conversations with someone from Gradle. Twitter is a crappy mechanism for reasoned discourse. So I’ll try to be more lucid here.

Forums are full of people going “I can’t get this project to work – Gradle is throwing weird error messages. Help me. I don’t understand. Please – help!”

Gradle does not do any user research. It never sits down with independent developers, newbies, or seasoned pros. It never tests its error messages. It doesn’t do developer relations. It doesn’t spot bad implementations in the wild and offer helpful suggestion. It doesn’t relentlessly focus on making things easier for users.

Gradle focusses on large organisations and caters almost exclusively to their needs. That’s fair enough. It’s their business and they can run it how they like.

The same is broadly true of Android. Its development tools are focussed on large teams of highly trained software engineers, who all intimately understand every esoteric aspect of App development.

It’s great if you’re a salaried employee with a large support structure. But for small and amateur developers, it’s a nightmare.

I’ve lost count of the number of projects I’ve seen which start by saying “Simply install Flargnle in the normal way…” Oh, great, another technology that I need to learn in order to make a cool widget.

Fail 5 – extrapolating from limited data

I’ve used this project as an example. And I am being deeply unfair to Gradle, Maven, Android, and everyone else. I’m tired and frustrated.

But I’m sure you’ve found the same thing with other bits of software. You have to download endless libraries – and then get stuck in dependency hell because v1.1 isn’t compatible with v1.2 and the original Google Code link has died and the mailing list hasn’t received a message since 2015 and the author’s GitHub shows they’re more interested in the latest JavaScript framework and the error message points you to a USENET message and the last StackOverflow answer is “ nevermind, figured it out “.

The job of a computer is to do the hard and boring work for us.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

跨越鸿沟

跨越鸿沟

[美] 杰弗里·摩尔(Geoffrey A. Moore) / 赵娅 / 机械工业出版社 / 2009-1 / 36.00元

在真正涉足高科技领域之前,你有必要读一读这本书——在这个节奏飞快、竞争激烈的技术竞技场上,这本书绝对能够帮助你更容易地获得成功。 ——威廉姆·劳森 罗盛软件公司董事会主席兼CEO 最近40年来,本书对高科技营销各个方面所做出的贡献远远超过了其他任何相关书籍。如今已经有无数企业和大学分别在自己的运营和教学过程中引入了鸿沟思想,如果你还不是这些企业或大学中的一员,你可能就要担心自己的未来了......一起来看看 《跨越鸿沟》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

SHA 加密
SHA 加密

SHA 加密工具