News for hackers. Stuff that matters.
Re:Lessons for software developers from 1970s mainframe prog... by yodon on Saturday January 13, 2018 @06:42PM (#16142017)
Interesting article but the author seems trapped in an antiquated “compute time is more expensive than developer time” mindset. For most startups today the EC2 budget is negligible compared to the dev team budget. If you’re successful enough that the compute cost matters that’s a good thing and you can deal with it then.

Optimizing for problems you don’t yet have just keeps you from launching and getting successful enough to actually care about your compute costs.

Re:Lessons for software developers from 1970s mainframe prog... by js8 on Sunday January 14, 2018 @03:01AM (#16143280)
This is an economically rational decision. But it is also a bad one.

It's a good way to build non-scalable applications. Because if you scale the application, then at some point, the computer's time will become more expensive than developer's time. Of course, that cost is economic externality for the development shop, so why should they care?

Edit: I am not sure word "scale" is obvious. There is Google-like scaling, which is we run the software on many machines in house. But there is also Microsoft-like scaling, which is many users run the software. Collectively, they have pay the cost and they have to waste the energy.

Re:Lessons for software developers from 1970s mainframe prog... by joatmon-snoo on Sunday January 14, 2018 @03:08AM (#16143291)
You're arguing against a strawman here.

No one's saying "let's do stuff the stupid way!" - they're saying hey, let's focus on getting users before fleshing out the technical details of the what-if-we-actually-make-it scenario. Or, as the classic saying puts it, don't put the cart before the horse.

Re:Lessons for software developers from 1970s mainframe prog... by hunter23 on Sunday January 14, 2018 @03:36AM (#16143346)
Yes exactly! The point is you don't build a scalable app until you have a scalable business idea. The first iterations of a startup are about testing different ideas, not about building sustainable architecture.

Unless you are building a technical work of art, it's all about finding the right product.

Re:Lessons for software developers from 1970s mainframe prog... by Retric on Sunday January 14, 2018 @08:09AM (#16144106)
Some ideas can't scale.

Ex: If your building a game with N players that can see each other walking around then that's N^2 updates.

Now, plenty of ways of dealing with that problem, but it's something to keep in mind even if you solution is not yet worth implementing.

Re:Lessons for software developers from 1970s mainframe prog... by rbanffy on Sunday January 14, 2018 @04:38AM (#16143494)
Some decisions need to be made early on. You may be fine with MySQL, but you need to think about decoupling different parts of the process and to think about the implications of delays on the interfaces from the start, even if they aren't there.

Most likely you'll never reach Google scale, but, you'll be happy you did that as the application grows more complex and you don't have to test every part of it for each tiny change.

Re:Lessons for software developers from 1970s mainframe prog... by rbanffy on Sunday January 14, 2018 @04:36AM (#16143489)
This is a relatively narrow scenario. Some applications "already made it". I'm helping build an IIoT solution that can process a really ludicrous number of measurements per second. If the code is optimal, we have a pretty positive impact on the company's bottom line. If it's not, we'll become famous for being the first group to unwillingly enter Top500 territory.
Re:Lessons for software developers from 1970s mainframe prog... by TickleSteve on Saturday January 13, 2018 @06:51PM (#16142061)
software development != web software development.

Processing efficiency is still extremely important in the embedded world. Don't think that the embedded market is small, practically every product you buy has s/w in it.

When you make for example a million units of a product, every single byte and every cycle counts as there is a large multiplier to take account of.

Efficiency counts, just not in the web world.

Re:Lessons for software developers from 1970s mainframe prog... by amorphid on Saturday January 13, 2018 @10:19PM (#16142660)
> Efficiency counts, just not in the web world

Knowing how to code efficiently, even if you choose not to, never goes out of style. I don't think I've ever heard anyone say that out loud.

Re:Lessons for software developers from 1970s mainframe prog... by dualogy on Saturday January 13, 2018 @08:13PM (#16142320)
> Efficiency counts, just not in the web world.

Which regrettably by now even end-users are painfully aware of!

Re:Lessons for software developers from 1970s mainframe prog... by lykr0n on Saturday January 13, 2018 @10:05PM (#16142622)
cough javascript cough
Re:Lessons for software developers from 1970s mainframe prog... by rf15 on Sunday January 14, 2018 @12:17AM (#16142923)
You can program efficiently in js. Just maybe drop the fat framework that dynamically checks each and every of your assigned variables to update other hidden functions (and maybe the dom) and avoid dragging things through N functions for "encapsulation" reasons and other inefficient OOP principle application.

what I want to say is: cough javascript developers cough

(for reference: I am a js "fullstack" dev)

Re:Lessons for software developers from 1970s mainframe prog... by TimJYoung on Sunday January 14, 2018 @04:09PM (#16146470)
In terms of performance, bad code is bad code. There's nothing about OOP that inherently results in non-performant code. Like all things, one needs to know what they're doing and, more importantly, what their compiler/runtime is doing.

For example, anyone that has been using OO in a non-GC'ed language for a reasonable amount of time will know that it's bad news to constantly create and free small objects due to the MM overhead. However, I constantly encounter JS-heavy web sites/apps that a) become slower as you use them and use an inordinate amount of memory, and b) really thrash the GC because they simply don't pay attention to allocations at all and constantly use constructs that result in one-off allocations that then need to be recycled.

The fact is that the browser and the DOM is a UI layer, and UI frameworks fit perfectly when implemented using OO architecture.

Re:Lessons for software developers from 1970s mainframe prog... by klibertp on Sunday January 14, 2018 @11:16AM (#16144839)
It's not that simple. My impression - I'm not very knowledgeable about this - is that JS and others started getting around as fast (in best conditions and a lot of voodoo) as unmanaged C code, but they are still behind in terms of memory footprint. For embedded applications, where you may be forced to count every KB of memory and every CPU cycle, the JITted systems are simply not a good fit right now.

You certainly can write a JavaScript implementation which would work in an embedded environment (just found one: http://www.espruino.com/ - it actually looks pretty nice! I wonder how it compares with Arduino?), but, when coughing JavaScript, it most often means "JavaScript as currently implemented in the four most popular implementations" or similar.

So, while it's true that you can write JS code that's 1000s of times more efficient than some bad JavaScript, it's also true that even the good JS is not going to be fast enough for some domains.

This (among others) is where AOT-compiled, GC-less (or with special implementations of those) come in. And even then, there are applications where even the cheap, mostly-compile-time abstractions of such languages prove to be too clunky and you need to drop down to assembly (bootloaders, demos, parts of OSes or language implementations).

So, while you can write efficient JS code, it's not going to be efficient enough for many cases.

Re:Lessons for software developers from 1970s mainframe prog... by rf15 on Sunday January 14, 2018 @05:43PM (#16146958)
Your assessment is definitely sufficiently true, although I would argue that, looking at how v8 essentially increases speed down to just twice the time of a comparable C program (as opposed to a magnitude or two) it is worth the convenience it brings to the table for devs (though c++ 11 and later catch up quite a bit)
Re:Lessons for software developers from 1970s mainframe prog... by rbanffy on Sunday January 14, 2018 @04:53AM (#16143536)
Re:Lessons for software developers from 1970s mainframe prog... by JustSomeNobody on Sunday January 14, 2018 @07:07AM (#16143925)
Back in the day some devs said JavaScript devs weren't real programmers but script kiddies. I wonder how much of this came from wanting legitimacy? They were like, ok let's see how Java devs do it. Next thing you know the JS devs are also using 75 layers of abstraction.
Re:Lessons for software developers from 1970s mainframe prog... by walshemj on Sunday January 14, 2018 @03:12PM (#16146100)
cough massive amounts of javascript form multiple sources of which the page only needs 10% *cough"
Re:Lessons for software developers from 1970s mainframe prog... by vedloseper on Sunday January 14, 2018 @03:31AM (#16143338)
There's also many multipliers that apply to the web. Every page can be loaded by millions or billions of people, more than once, and usually sharing resources with other tabs. It all adds up quite quickly. It's like saying gum wrappers don't matter, while there's a mountains of garbage growing in the background; maybe not enough people care, but it still matters even though they don't care.
Re:Lessons for software developers from 1970s mainframe prog... by yodon on Saturday January 13, 2018 @06:54PM (#16142082)
Well said, but embedded developers already know this and behave as if their compute resources are scarce. I read the author as speaking to developers generally, which I think was his intent.
Re:Lessons for software developers from 1970s mainframe prog... by jacquesm on Saturday January 13, 2018 @07:15PM (#16142155)
If web developers would be so kind as to consider my compute resources as scarce that would tremendously please me. This sort of thinking is important, you just need to be selective about when and where you apply it.
Re:Lessons for software developers from 1970s mainframe prog... by walterbell on Saturday January 13, 2018 @09:36PM (#16142526)
Since browser vendors like telemetry, there could be an optional plugin to monitor website consumption of endpoint resources, similar to weather sensors that submit to a central public database. Measure and track the consumption of the top 100 JS scripts globally, to motivate improvement.
Re:Lessons for software developers from 1970s mainframe prog... by SoreGums on Saturday January 13, 2018 @11:23PM (#16142797)
I want this as a paid service. For example, hey there person using chrome, install this extension and let random people run tests on their website, for the time and resources used you will be paid n, ok?

Then imagine having access to real computers on real networks hit your site over whatever time horizon you want. It would be great. If this could somehow be done on mobile that would be great too (maybe in a push notification way "1x test ready to run, click here to start", app opens, does it's thing, then closes)

Re:Lessons for software developers from 1970s mainframe prog... by walterbell on Sunday January 14, 2018 @12:06AM (#16142883)
For that matter, app stores could profile apps. Apple already has an on-device list of apps which consume the most battery. They could normalize the metrics to account for variables like display time and network traffic.
Re:Lessons for software developers from 1970s mainframe prog... by criddell on Sunday January 14, 2018 @08:41AM (#16144204)
I don't know if it counts as embedded, but about a month ago we bought a new TV (Sony xbr65x900e) and the built in software is unbelievably bad. Our three year old Roku has better software than this thing.

I wish Sony sold a non-smart version of this TV because other than the software, it's pretty nice.

Re:Lessons for software developers from 1970s mainframe prog... by walshemj on Sunday January 14, 2018 @03:14PM (#16146104)
I don't use my sonny's smart function just use an xbox to feed it.
Re:Lessons for software developers from 1970s mainframe prog... by criddell on Monday January 15, 2018 @07:50AM (#16150160)
How can you not use it? IIRC, you have to go through the setup steps for the TV to work.

Even if you aren't actively using it, there are things running in the background that crash. I was watching football yesterday and I kept getting "The Samba Service has Stopped" messages. The only option in the box was OK to acknowledge it. What am I supposed to do with that? It kept coming back so I googled it and found how to disable notifications for that app and that eventually stopped the problem.

I also found the Samba service watches what you watch so that it can target ads better.

Re:Lessons for software developers from 1970s mainframe prog... by yodon on Saturday January 13, 2018 @07:31PM (#16142219)
The parent comment (which I didn’t write) seems to be getting up voted and down voted repeatedly, bouncing in and out of gray. Could one of the downvoters explain your objection? (Genuinely curious, looking to learn)
Re:Lessons for software developers from 1970s mainframe prog... by AlanSE on Saturday January 13, 2018 @09:18PM (#16142475)
I don't have the ability to downvote, but I can explain why I might have downvoted.

The comment is repeating a saying, it's not original. I have heard it a ton of times. It's really an entire category of arguments which can be called "premature optimization".

While some optimization is premature, the saying is repeated in a way that is crazy overly-broad. It's based on a false assumption that is only approximately true in some of the cases for web development. The assumption is that bad performance can be traded for more compute power without other negative side effects. This is very untrue for most practical systems in web development. Most compute-heavy decisions will do both things - increase the compute resources you need, and degrade user experience. If you're super tiny working on super simple systems, then there's a certain envelope of request response times where it won't matter if you are faster or slower. So there are some cases where it is a valid argument, but to me, these seem incredibly specific to a certain stage of a startup. Beyond that, what matters is prioritization, not complete disregard for performance concerns.

Re:Lessons for software developers from 1970s mainframe prog... by kabouseng on Sunday January 14, 2018 @03:01AM (#16143281)
"This is very untrue for most practical systems in web development."

And yet the very first sentence in gp's comment:

"software development != web software development"

So gp already qualified his statement is not applicable to web development, and then you criticise his comment with a web development example...

Re:Lessons for software developers from 1970s mainframe prog... by kinkrtyavimoodh on Saturday January 13, 2018 @10:54PM (#16142743)
And software development != embedded software development either.
Re:Lessons for software developers from 1970s mainframe prog... by walshemj on Sunday January 14, 2018 @03:11PM (#16146094)
Sorry it does at large scale you might be optimising for page speed rather than pure cpu but it defiantly does count.
Re:Lessons for software developers from 1970s mainframe prog... by chiph on Saturday January 13, 2018 @07:18PM (#16142175)
In a non-startup world (established business), imagine if you went to the boss and said "If you give me 3 or 4 weeks for optimization I believe I can cut our Azure bill by 15%, year over year". You'd get his attention pretty quickly.
Re:Lessons for software developers from 1970s mainframe prog... by scarface74 on Saturday January 13, 2018 @11:55PM (#16142858)
I've made just the opposite argument. If you give me three weeks and a few EC2 instances,I can set up an integration environment that runs some automated test and we can cut the amount we spend on QA by x%.
Re:Lessons for software developers from 1970s mainframe prog... by falcolas on Sunday January 14, 2018 @09:26AM (#16144357)
Small tip from an ex-QAer: Don't worry, once the easy cases are automated, they'll have plenty of work to still do. At least the good ones will. They'll start doing more extreme exploratory testing, setting up combinatorial testing, fuzz testing...

A good QA analyst is like any other good employee - they always have something else they'd like to test.

Re:Lessons for software developers from 1970s mainframe prog... by scarface74 on Sunday January 14, 2018 @02:14PM (#16145718)
We are real QA heavy right now with non FTEs. I'm not saying they don't bring value, but the types of things they are QAing now is both new functionality and regression testing. I can't think of any good reason that regression testing shouldn't be completely automated.
Re:Lessons for software developers from 1970s mainframe prog... by wslh on Saturday January 13, 2018 @11:15PM (#16142786)
Yes, nowadays it is very easy to end up with zillions of VMs (and services) running in the cloud without a little organized plan. In the recent past you should trigger purchase orders to buy hardware. Not saying that the past was better but flexibility has a high price without coordination. Imagine thousands of developers launching new VMs with a single click.
Re:Lessons for software developers from 1970s mainframe prog... by walshemj on Sunday January 14, 2018 @03:16PM (#16146114)
If your AWS or Asure bill is a problem you need to think about going back to on prem or private cloud.
Re:Lessons for software developers from 1970s mainframe prog... by Yetanfou on Saturday January 13, 2018 @06:53PM (#16142070)
...but giving the design a bit more thought to end up with something which either is more performant or can be easily optimised at a later stage does pay off in the long term.
Re:Lessons for software developers from 1970s mainframe prog... by fsloth on Sunday January 14, 2018 @02:46AM (#16143252)
I'm guessing the original meme (it's been around a long time) originated from hardware vendors. Of course you want to buy more machines!

I've never seen any detailed case studies to prove it in either way.