News for hackers. Stuff that matters.
Re:How to Design Software Good by koonsolo on Friday November 09, 2018 @03:58AM (#18413202)
Very senior developers know things that are not intuitive, but very true. So I'll let you in on a few secrets.

"Good enough is always good enough". You probably want to do more than good enough. Those developers you talked about, probably knew the amount of quality that was actually needed, no more, no less.

Clean code doesn't mean "no bugs" and "good software":

- I've seen very cool, popular, money making games that had terrible code (all in 1 C file for example).

- I've seen a terrible mess of code, that was practically bug free (because it was running for years in production). And have seen that same code refactored to clean code by a junior (who thought he would 'fix things'), and introduced a lot of bugs (because that is just what happens when you write code, even clean one, even by a senior developer).

If you deliver a final product (such as a game for example), that will not need extra features, you can hack stuff in at the end. When you would hack code together at the start, you will shoot yourself in the foot by needing to go through your mess all the time. But when you do this at the end of the project, you can save time by adding in quick hacks. The technical dept that you introduce doesn't need to be paid off. Of course you cannot do this with a long running project. But with a deliverable product go right ahead.

The main thing that you have to consider is this: EVERYTHING IS A TRADE-OFF. I see juniors make this mistake all the time, selecting the best programming language, the best VCS, the best whatever. You know, that 'best' thing also has drawbacks. So it's always about making trade-offs, selecting something despite the drawbacks, because of the benefits.

General rule: if something only has benefits, it's probably because you didn't figure out the drawbacks yet.

How to make the proper trade-offs? Experience ;).

Re:How to Design Software Good by lmilcin on Friday November 09, 2018 @06:24AM (#18413704)
Very true, I agree on all points.

I would add the amount of effort put into designing and polishing any project that you can defend is correct is related to how much future development and use the project will see and how critical the project is for the company.

So, if you want to work o a nice quality project or want to spend a lot of your time on improvements to quality find yourself a project that will either see a lot of future development or a lot of future use or is extremely critical to the business or, best, all of these characteristics.

I see this mistake happen all the time -- people complaining on quality, disparaging previous developers or demanding effort to improve it just for quality sake ("because I just read this book and it can be done better") without reasonable arguments to support from business POV.

Also I see people categorizing all project deficiencies as technical debt where what they should be doing is to first establish what would be reasonable expectation regarding quality and then the debt is only what would be absolutely necessary to reach that reasonable expectation.

So for example, if you make a small app that will not reasonably see a lot of future development but is critical to work reliably in production (and it isn't) your debt would most likely be centered around making the application reliable enough and probably not around making the code nice (as long as it isn't preventing makeing the application reliable).

Re:How to Design Software Good by skohan on Friday November 09, 2018 @05:17AM (#18413504)
> Clean code doesn't mean "no bugs" and "good software"

This gets missed too often: clean interfaces are important, whether it's a UI or an API. Clean code? It depends.

I once interviewed a dev who had all the right answers when it came to software development practices, TDD, etc, but when we looked at the product he was working on, the UX was a stuttering mess.

I don't care what your code looks like if you did not achieve a good end-product.

Re:How to Design Software Good by lou1306 on Friday November 09, 2018 @06:32AM (#18413744)
> the UX was a stuttering mess.

Is that a good metric to judge a developer, though? Good UX requires either formal training in the field, or a very gifted individual. In my opinion it has very little to do with the quality of either the code or the developer.

Re:How to Design Software Good by skohan on Friday November 09, 2018 @06:38AM (#18413767)
The UX design is not something I would judge someone on, but UX as a function of UI performance definitely is. If the UI is hitching, non-responsive, or getting into strange and incomprehensible states without giving me any indication how or why, I place the fault of that on the developer who implemented it.
Re:How to Design Software Good by quakenul on Friday November 09, 2018 @09:06AM (#18414381)
It is a very good metric.

To have baseline UX awareness is crucial for every developer on any team that sets out to build a great product, just like any effective designer has to be aware of physical limitations of his design space (for example speed of light, bandwidth)

If your UX designers job is to point out that responsive UI is indeed important for your product, he is not actually doing UX design and you are likely in deep trouble.

Re:How to Design Software Good by mort96 on Saturday November 10, 2018 @10:03AM (#18421559)
You're assuming all products are apps or websites or something with a GUI. A product could be a library, or an OS kernel, or a web API, or any number of things, where knowledge of how to make a GUI with a good UX is completely irrelevant; or the programmer could be working on a very technical part; the engineers working on, say, Safari to optimize the javascript engine's performance similarly don't need any knowledge of what good UX means for a graphical interface.

Apple and Google shouldn't fire their best compiler/JIT writers just because they write lousy GUIs.

Re:How to Design Software Good by Volt on Saturday November 10, 2018 @06:43PM (#18424139)
There's a UX for those things too. The users would be the consumers of the API.
Re:How to Design Software Good by mort96 on Monday November 12, 2018 @05:32AM (#18431722)
Obviously, but the kind of UX discussed here is obviously that of graphical applications; nobody would say that a web API's or a compiler's UX is a "stuttering mess".
Re:How to Design Software Good by quakenul on Wednesday November 14, 2018 @10:35AM (#18450602)
Basically everything computer that interfaces with humans is graphical. That doesn't mean it's in the designers domain to fix.

A designer is not responsible for making sure that the implementation of their design runs at stutter free at 60fps in a browser -- that is an engineers job. If the engineer who implements such a design is insensitive to these things and needs convincing that it's important to not have the implementation not stutter, jerk or jank you are never gonna get good results.

Re:How to Design Software Good by dasil003 on Friday November 09, 2018 @10:37AM (#18415149)
Not necessarily, but good developers need to be thinking about their upstreams and downstreams. This is often uncomfortable because a developer personality often wants to know all the minute details and not have to worry about areas outside their core competence, but you can't build large scale software without at least a critical mass of developers thinking big picture. UX in particular depends on the task at hand, but if it's a consumer product and you're working fairly close to the surface (client or API tier) then yeah I'd expect some awareness of UX.
Re:How to Design Software Good by fredrb on Friday November 09, 2018 @06:30AM (#18413730)
> don't care what your code looks like if you did not achieve a good end-product.

I do care if your code is a mess if other engineers have to maintain it.

Re:How to Design Software Good by skohan on Friday November 09, 2018 @06:43AM (#18413783)
I'm not saying clean code is not desirable. Code which is easy to maintain and modify is absolutely better than messy code.

My point is that "good code" should be prioritized behind a good product. The purpose of code is to deliver a product, not to be well-factored or to embody certain principals. If your product is bad, your code is already categorically bad, no matter how beautiful it is.

Re:How to Design Software Good by ensiferum on Friday November 09, 2018 @09:28AM (#18414550)
But it's really difficult to make a good product and good product experience on a messy code base. Quality code leads to better product IMHO. (of course good quality code base can still suffer from badly designed UX)
Re:How to Design Software Good by skohan on Friday November 09, 2018 @10:21AM (#18415016)
The devil is in the details. Sure, if your codebase is systemically messy, it's probably going to take forever to get anything done, and you will probably end up with bugs in the final product.

But what if you have a component here or there with well defined, well tested interfaces, but internally it's a bit of a mess? Or what if you hack together a proof-of-concept for a new feature to get it out the door and see what users do with it before investing a lot of time in making it perfect? Those kinds of things can help your organization move faster.

As with most things, clean vs messy code is not a binary. It's the sum of a lot of individual value judgements about when it's pragmatic to focus on code quality.

Re:How to Design Software Good by kingdomcome50 on Saturday November 10, 2018 @10:47AM (#18421783)
Without fully qualifying what “easier”, “good product”, and “good experience” mean as well as delineating project constraints such as time, business value, and life it’s not possible to truly have this discussion.

Even so, I am inclined to argue that in most cases the exact opposite is true. That is, it is actually “easier” to create a “good product” with a messy codebase, because in most cases “easier” and “good product” are understood by primary stakeholders to mean business value at this moment.

Re:How to Design Software Good by koonsolo on Saturday November 10, 2018 @08:52AM (#18421321)
I would love to do the following experiment:

- One coder writes his product with a high quality code base.

- Another coder sits next to 3 users of his product, and hacks stuff in as fast as possible.

I would bet on the 2nd one for having the better user interface.

Re:How to Design Software Good by dullroar on Friday November 09, 2018 @08:52AM (#18414292)
Agree with all points. Here's another - depending on the size of the shop and the population of users it will be delivered to, there are trade-offs that must be made as you go towards zero on both of those axes. For example, if you have two developers delivering in-house apps to 250 end-users in a SMB company, then the answer is never, "That will take two years and $2M." It is, "We can have that for you in a month," and then you deal later with things that necessarily got skipped. Sometimes it means refactoring and bug fixing, if the pain points to the business are large enough. Sometimes that may mean reaching into a database to fix data that is caused by a complex bug that only manifests itself once a year and isn't worth fixing outright (because there are other things you're working on now). That outlook is probably way to "Realpolitik" for the purists, but it is reality in small shops (which still do exist).
Re:How to Design Software Good by marcosdumay on Friday November 09, 2018 @01:58PM (#18416894)
> General rule: if something only has benefits, it's probably because you didn't figure out the drawbacks yet.

And that, of course, has it's exceptions too. Non-optimized stuff exist, and everything that isn't on the optimum line can be improved in some way without drawbacks. Besides, the optimum line is always moving.

Re:How to Design Software Good by koonsolo on Saturday November 10, 2018 @04:15AM (#18420563)
So you optimized some code, cool!

- How certain are you that you didn't introduce a bug? - Is it also running faster on this exotic platform that we still need to support? - Did it involve API changes? - Do we need to put this into production now, or wait for the next optimization to save some time? - How much time did we spend on this? Was there something else that would have made a bigger impact?

In theory you can improve things without drawbacks, but in practice you always have to make the right trade-offs.

Re:How to Design Software Good by marcosdumay on Saturday November 10, 2018 @12:14PM (#18422225)
Just to point, my comment wasn't about code optimization (but can apply to it too).
Re:How to Design Software Good by carlmr on Friday November 09, 2018 @04:10AM (#18413256)
>- I've seen very cool, popular, money making games that had terrible code (all in 1 C file for example).

Are you sure that wasn't an optimization to get "LTO" with a non-LTO linker?

Re:How to Design Software Good by Asooka on Friday November 09, 2018 @05:25AM (#18413536)
No, in that case you would #include all your .c files in one .c file and compile that for release, but would otherwise work in the usual manner. CMake actually has builtin support for doing just that.
Re:How to Design Software Good by carlmr on Friday November 09, 2018 @07:54AM (#18414008)
That would be a nicer way to do it, but it doesn't contradict what I said.
Re:How to Design Software Good by paulddraper on Sunday November 11, 2018 @03:05PM (#18428266)
Any halfway decent developer that wants single file optimization but doesn't want to author the source code in one file will do this.

See "Unity build".

Re:How to Design Software Good by koonsolo on Friday November 09, 2018 @05:58AM (#18413635)
I talked to the developer, and it was him who mentioned this, and he was not proud of that part ;).