News for hackers. Stuff that matters.
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.